-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
v1.ts
5980 lines (5687 loc) · 214 KB
/
v1.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {GaxiosPromise} from 'gaxios';
import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library';
import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common';
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
export namespace cloudsearch_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
let context: APIRequestContext;
interface StandardParameters {
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API
* access, quota, and reports. Required unless you provide an OAuth 2.0
* token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be
* any arbitrary string assigned to a user, but should not exceed 40
* characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Cloud Search API
*
* Cloud Search provides cloud-based search capabilities over G Suite data.
* The Cloud Search API allows indexing of non-G Suite data into Cloud Search.
*
* @example
* const {google} = require('googleapis');
* const cloudsearch = google.cloudsearch('v1');
*
* @namespace cloudsearch
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Cloudsearch
*/
export class Cloudsearch {
debug: Resource$Debug;
indexing: Resource$Indexing;
media: Resource$Media;
operations: Resource$Operations;
query: Resource$Query;
settings: Resource$Settings;
stats: Resource$Stats;
constructor(options: GlobalOptions, google?: GoogleConfigurable) {
context = {_options: options || {}, google};
this.debug = new Resource$Debug();
this.indexing = new Resource$Indexing();
this.media = new Resource$Media();
this.operations = new Resource$Operations();
this.query = new Resource$Query();
this.settings = new Resource$Settings();
this.stats = new Resource$Stats();
}
}
/**
* Used to provide a search operator for boolean properties. This is optional.
* Search operators let users restrict the query to specific fields relevant
* to the type of item being searched.
*/
export interface Schema$BooleanOperatorOptions {
/**
* Indicates the operator name required in the query in order to isolate the
* boolean property. For example, if operatorName is *closed* and the
* property's name is *isClosed*, then queries like
* *closed:<value>* will show results only where the value of
* the property named *isClosed* matches *<value>*. By
* contrast, a search that uses the same *<value>* without an
* operator will return all items where *<value>* matches the
* value of any String properties or text within the content field for the
* item. The operator name can only contain lowercase letters (a-z). The
* maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for boolean properties.
*/
export interface Schema$BooleanPropertyOptions {
/**
* If set, describes how the boolean should be used as a search operator.
*/
operatorOptions?: Schema$BooleanOperatorOptions;
}
export interface Schema$CheckAccessResponse {
/**
* Returns true if principal has access. Returns false otherwise.
*/
hasAccess?: boolean;
}
export interface Schema$CompositeFilter {
/**
* The logic operator of the sub filter.
*/
logicOperator?: string;
/**
* Sub filters.
*/
subFilters?: Schema$Filter[];
}
/**
* Aggregation of items by status code as of the specified date.
*/
export interface Schema$CustomerIndexStats {
/**
* Date for which statistics were calculated.
*/
date?: Schema$Date;
/**
* Number of items aggregrated by status code.
*/
itemCountByStatus?: Schema$ItemCountByStatus[];
}
/**
* Frontend protos implement autoconverters for this message type. If you add
* fields to this proto, please add corresponding fields to the frontend proto
* with the same names. LINT.IfChange
*/
export interface Schema$DataSource {
/**
* If true, Indexing API rejects any modification calls to this datasource
* such as create, update, and delete. Disabling this does not imply halting
* process of previously accepted data.
*/
disableModifications?: boolean;
/**
* Disable serving any search or assist results.
*/
disableServing?: boolean;
/**
* Required. Display name of the datasource The maximum length is 300
* characters.
*/
displayName?: string;
/**
* List of service accounts that have indexing access.
*/
indexingServiceAccounts?: string[];
/**
* This field restricts visibility to items at the datasource level. Items
* within the datasource are restricted to the union of users and groups
* included in this field. Note that, this does not ensure access to a
* specific item, as users need to have ACL permissions on the contained
* items. This ensures a high level access on the entire datasource, and
* that the individual items are not shared outside this visibility.
*/
itemsVisibility?: Schema$GSuitePrincipal[];
/**
* Name of the datasource resource. Format: datasources/{source_id}. <br
* />The name is ignored when creating a datasource.
*/
name?: string;
/**
* IDs of the Long Running Operations (LROs) currently running for this
* schema.
*/
operationIds?: string[];
/**
* A short name or alias for the source. This value will be used to match
* the 'source' operator. For example, if the short name is
* *&lt;value&gt;* then queries like *source:&lt;value&gt;*
* will only return results for this source. The value must be unique across
* all datasources. The value must only contain alphanumeric characters
* (a-zA-Z0-9). The value cannot start with 'google' and cannot be
* one of the following: mail, gmail, docs, drive, groups, sites, calendar,
* hangouts, gplus, keep, people, teams. Its maximum length is 32
* characters.
*/
shortName?: string;
}
/**
* Aggregation of items by status code as of the specified date.
*/
export interface Schema$DataSourceIndexStats {
/**
* Date for which index stats were calculated. If the date of request is not
* the current date then stats calculated on the next day are returned.
* Stats are calculated close to mid night in this case. If date of request
* is current date, then real time stats are returned.
*/
date?: Schema$Date;
/**
* Number of items aggregrated by status code.
*/
itemCountByStatus?: Schema$ItemCountByStatus[];
}
/**
* Restriction on Datasource.
*/
export interface Schema$DataSourceRestriction {
/**
* Filter options restricting the results. If multiple filters are present,
* they are grouped by object type before joining. Filters with the same
* object type are joined conjunctively, then the resulting expressions are
* joined disjunctively. The maximum number of elements is 20.
*/
filterOptions?: Schema$FilterOptions[];
/**
* The source of restriction.
*/
source?: Schema$Source;
}
/**
* Represents a whole calendar date, for example a date of birth. The time of
* day and time zone are either specified elsewhere or are not significant.
* The date is relative to the [Proleptic Gregorian
* Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The
* date must be a valid calendar date between the year 1 and 9999.
*/
export interface Schema$Date {
/**
* Day of month. Must be from 1 to 31 and valid for the year and month.
*/
day?: number;
/**
* Month of date. Must be from 1 to 12.
*/
month?: number;
/**
* Year of date. Must be from 1 to 9999.
*/
year?: number;
}
/**
* Optional. Provides a search operator for date properties. Search operators
* let users restrict the query to specific fields relevant to the type of
* item being searched.
*/
export interface Schema$DateOperatorOptions {
/**
* Indicates the operator name required in the query in order to isolate the
* date property using the greater-than operator. For example, if
* greaterThanOperatorName is *closedafter* and the property's name is
* *closeDate*, then queries like *closedafter:&lt;value&gt;* will
* show results only where the value of the property named *closeDate* is
* later than *&lt;value&gt;*. The operator name can only contain
* lowercase letters (a-z). The maximum length is 32 characters.
*/
greaterThanOperatorName?: string;
/**
* Indicates the operator name required in the query in order to isolate the
* date property using the less-than operator. For example, if
* lessThanOperatorName is *closedbefore* and the property's name is
* *closeDate*, then queries like *closedbefore:&lt;value&gt;* will
* show results only where the value of the property named *closeDate* is
* earlier than *&lt;value&gt;*. The operator name can only contain
* lowercase letters (a-z). The maximum length is 32 characters.
*/
lessThanOperatorName?: string;
/**
* Indicates the actual string required in the query in order to isolate the
* date property. For example, suppose an issue tracking schema object has a
* property named *closeDate* that specifies an operator with an
* operatorName of *closedon*. For searches on that data, queries like
* *closedon:&lt;value&gt;* will show results only where the value
* of the *closeDate* property matches *&lt;value&gt;*. By contrast,
* a search that uses the same *&lt;value&gt;* without an operator
* will return all items where *&lt;value&gt;* matches the value of
* any String properties or text within the content field for the indexed
* datasource. The operator name can only contain lowercase letters (a-z).
* The maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for date properties.
*/
export interface Schema$DatePropertyOptions {
/**
* If set, describes how the date should be used as a search operator.
*/
operatorOptions?: Schema$DateOperatorOptions;
}
/**
* List of date values.
*/
export interface Schema$DateValues {
values?: Schema$Date[];
}
/**
* Shared request debug options for all cloudsearch RPC methods.
*/
export interface Schema$DebugOptions {
/**
* If set, the request will enable debugging features of Cloud Search. Only
* turn on this field, if asked by Google to help with debugging.
*/
enableDebugging?: boolean;
}
export interface Schema$DeleteQueueItemsRequest {
/**
* Name of connector making this call. <br />Format:
* datasources/{source_id}/connectors/{ID}
*/
connectorName?: string;
/**
* Common debug options.
*/
debugOptions?: Schema$DebugOptions;
/**
* Name of a queue to delete items from.
*/
queue?: string;
}
/**
* A reference to a top-level property within the object that should be
* displayed in search results. The values of the chosen properties will be
* displayed in the search results along with the dislpay label for that
* property if one is specified. If a display label is not specified, only the
* values will be shown.
*/
export interface Schema$DisplayedProperty {
/**
* The name of the top-level property as defined in a property definition
* for the object. If the name is not a defined property in the schema, an
* error will be given when attempting to update the schema.
*/
propertyName?: string;
}
/**
* Used to provide a search operator for double properties. This is optional.
* Search operators let users restrict the query to specific fields relevant
* to the type of item being searched.
*/
export interface Schema$DoubleOperatorOptions {
/**
* Indicates the operator name required in the query in order to use the
* double property in sorting or as a facet. The operator name can only
* contain lowercase letters (a-z). The maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for double properties.
*/
export interface Schema$DoublePropertyOptions {
/**
* If set, describes how the double should be used as a search operator.
*/
operatorOptions?: Schema$DoubleOperatorOptions;
}
/**
* List of double values.
*/
export interface Schema$DoubleValues {
values?: number[];
}
/**
* Drive follow-up search restricts (e.g. "followup:suggestions").
*/
export interface Schema$DriveFollowUpRestrict {
type?: string;
}
/**
* Drive location search restricts (e.g. "is:starred").
*/
export interface Schema$DriveLocationRestrict {
type?: string;
}
/**
* Drive mime-type search restricts (e.g. "type:pdf").
*/
export interface Schema$DriveMimeTypeRestrict {
type?: string;
}
/**
* The time span search restrict (e.g. "after:2017-09-11
* before:2017-09-12").
*/
export interface Schema$DriveTimeSpanRestrict {
type?: string;
}
/**
* A person's email address.
*/
export interface Schema$EmailAddress {
/**
* The email address.
*/
emailAddress?: string;
}
/**
* Used to provide a search operator for enum properties. This is optional.
* Search operators let users restrict the query to specific fields relevant
* to the type of item being searched. For example, if you provide no operator
* for a *priority* enum property with possible values *p0* and *p1*, a query
* that contains the term *p0* will return items that have *p0* as the value
* of the *priority* property, as well as any items that contain the string
* *p0* in other fields. If you provide an operator name for the enum, such as
* *priority*, then search users can use that operator to refine results to
* only items that have *p0* as this property's value, with the query
* *priority:p0*.
*/
export interface Schema$EnumOperatorOptions {
/**
* Indicates the operator name required in the query in order to isolate the
* enum property. For example, if operatorName is *priority* and the
* property's name is *priorityVal*, then queries like
* *priority:&lt;value&gt;* will show results only where the value
* of the property named *priorityVal* matches *&lt;value&gt;*. By
* contrast, a search that uses the same *&lt;value&gt;* without an
* operator will return all items where *&lt;value&gt;* matches the
* value of any String properties or text within the content field for the
* item. The operator name can only contain lowercase letters (a-z). The
* maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for enum properties, which allow you to define a restricted set of
* strings to match user queries, set rankings for those string values, and
* define an operator name to be paired with those strings so that users can
* narrow results to only items with a specific value. For example, for items
* in a request tracking system with priority information, you could define
* *p0* as an allowable enum value and tie this enum to the operator name
* *priority* so that search users could add *priority:p0* to their query to
* restrict the set of results to only those items indexed with the value
* *p0*.
*/
export interface Schema$EnumPropertyOptions {
/**
* If set, describes how the enum should be used as a search operator.
*/
operatorOptions?: Schema$EnumOperatorOptions;
/**
* Used to specify the ordered ranking for the enumeration that determines
* how the integer values provided in the possible EnumValuePairs are used
* to rank results. If specified, integer values must be provided for all
* possible EnumValuePair values given for this property. Can only be used
* if isRepeatable is false.
*/
orderedRanking?: string;
/**
* The list of possible values for the enumeration property. All
* EnumValuePairs must provide a string value. If you specify an integer
* value for one EnumValuePair, then all possible EnumValuePairs must
* provide an integer value. Both the string value and integer value must be
* unique over all possible values. Once set, possible values cannot be
* removed or modified. If you supply an ordered ranking and think you might
* insert additional enum values in the future, leave gaps in the initial
* integer values to allow adding a value in between previously registered
* values. The maximum number of elements is 100.
*/
possibleValues?: Schema$EnumValuePair[];
}
/**
* The enumeration value pair defines two things: a required string value and
* an optional integer value. The string value defines the necessary query
* term required to retrieve that item, such as *p0* for a priority item. The
* integer value determines the ranking of that string value relative to other
* enumerated values for the same property. For example, you might associate
* *p0* with *0* and define another enum pair such as *p1* and *1*. You must
* use the integer value in combination with ordered ranking to set the
* ranking of a given value relative to other enumerated values for the same
* property name. Here, a ranking order of DESCENDING for *priority*
* properties results in a ranking boost for items indexed with a value of
* *p0* compared to items indexed with a value of *p1*. Without a specified
* ranking order, the integer value has no effect on item ranking.
*/
export interface Schema$EnumValuePair {
/**
* The integer value of the EnumValuePair which must be non-negative.
* Optional.
*/
integerValue?: number;
/**
* The string value of the EnumValuePair. The maximum length is 32
* characters.
*/
stringValue?: string;
}
/**
* List of enum values.
*/
export interface Schema$EnumValues {
/**
* The maximum allowable length for string values is 32 characters.
*/
values?: string[];
}
/**
* Error information about the response.
*/
export interface Schema$ErrorInfo {
errorMessages?: Schema$ErrorMessage[];
}
/**
* Error message per source response.
*/
export interface Schema$ErrorMessage {
errorMessage?: string;
source?: Schema$Source;
}
/**
* A bucket in a facet is the basic unit of operation. A bucket can comprise
* either a single value OR a contiguous range of values, depending on the
* type of the field bucketed. FacetBucket is currently used only for
* returning the response object.
*/
export interface Schema$FacetBucket {
/**
* Number of results that match the bucket value.
*/
count?: number;
/**
* Percent of results that match the bucket value. This value is between
* (0-100]. This may not be accurate and is a best effort estimate.
*/
percentage?: number;
value?: Schema$Value;
}
/**
* Specifies operators to return facet results for. There will be one
* FacetResult for every source_name/object_type/operator_name combination.
*/
export interface Schema$FacetOptions {
/**
* If object_type is set, only those objects of that type will be used to
* compute facets. If empty, then all objects will be used to compute
* facets.
*/
objectType?: string;
/**
* Name of the operator chosen for faceting. @see cloudsearch.SchemaPropertyOptions
*/
operatorName?: string;
/**
* Source name to facet on. Format: datasources/{source_id} If empty, all
* data sources will be used.
*/
sourceName?: string;
}
/**
* Source specific facet response
*/
export interface Schema$FacetResult {
/**
* FacetBuckets for values in response containing atleast a single result.
*/
buckets?: Schema$FacetBucket[];
/**
* Object type for which facet results are returned. Can be empty.
*/
objectType?: string;
/**
* Name of the operator chosen for faceting. @see cloudsearch.SchemaPropertyOptions
*/
operatorName?: string;
/**
* Source name for which facet results are returned. Will not be empty.
*/
sourceName?: string;
}
export interface Schema$FieldViolation {
/**
* Description of the error.
*/
description?: string;
/**
* Path of field with violation.
*/
field?: string;
}
/**
* A generic way of expressing filters in a query, which supports two
* approaches: <br/><br/> **1. Setting a ValueFilter.** The name
* must match an operator_name defined in the schema for your data source.
* <br/> **2. Setting a CompositeFilter.** The filters are evaluated
* using the logical operator. The top-level operators can only be either an
* AND or a NOT. AND can appear only at the top-most level. OR can appear only
* under a top-level AND.
*/
export interface Schema$Filter {
compositeFilter?: Schema$CompositeFilter;
valueFilter?: Schema$ValueFilter;
}
/**
* Filter options to be applied on query.
*/
export interface Schema$FilterOptions {
/**
* Generic filter to restrict the search, such as `lang:en`, `site:xyz`.
*/
filter?: Schema$Filter;
/**
* If object_type is set, only objects of that type are returned. This
* should correspond to the name of the object that was registered within
* the definition of schema. The maximum length is 256 characters.
*/
objectType?: string;
}
/**
* Indicates which freshness property to use when adjusting search ranking for
* an item. Fresher, more recent dates indicate higher quality. Use the
* freshness option property that best works with your data. For fileshare
* documents, last modified time is most relevant. For calendar event data,
* the time when the event occurs is a more relevant freshness indicator. In
* this way, calendar events that occur closer to the time of the search query
* are considered higher quality and ranked accordingly.
*/
export interface Schema$FreshnessOptions {
/**
* The duration after which an object should be considered stale. The
* default value is 180 days (in seconds).
*/
freshnessDuration?: string;
/**
* This property indicates the freshness level of the object in the index.
* If set, this property must be a top-level property within the property
* definitions and it must be a timestamp type or date type. Otherwise, the
* Indexing API uses updateTime as the freshness indicator. The maximum
* length is 256 characters. When a property is used to calculate
* fresheness, the value defaults to 2 years from the current time.
*/
freshnessProperty?: string;
}
export interface Schema$GetCustomerIndexStatsResponse {
/**
* Summary of indexed item counts, one for each day in the requested range.
*/
stats?: Schema$CustomerIndexStats[];
}
export interface Schema$GetDataSourceIndexStatsResponse {
/**
* Summary of indexed item counts, one for each day in the requested range.
*/
stats?: Schema$DataSourceIndexStats[];
}
/**
* Gmail Action restricts (i.e. read/replied/snoozed).
*/
export interface Schema$GmailActionRestrict {
type?: string;
}
/**
* Gmail Attachment restricts (i.e. has:attachment, has:drive, filename:pdf).
*/
export interface Schema$GmailAttachmentRestrict {
type?: string;
}
/**
* Gmail Folder restricts (i.e. in Drafts/Sent/Chats/User Generated Labels).
*/
export interface Schema$GmailFolderRestrict {
type?: string;
}
/**
* Gmail Intelligent restricts (i.e. smartlabels, important).
*/
export interface Schema$GmailIntelligentRestrict {
type?: string;
}
/**
* Gmail Time restricts (i.e. received today, this week).
*/
export interface Schema$GmailTimeRestrict {
type?: string;
}
export interface Schema$GSuitePrincipal {
/**
* This principal represents all users of the G Suite domain of the
* customer.
*/
gsuiteDomain?: boolean;
/**
* This principal references a G Suite group account
*/
gsuiteGroupEmail?: string;
/**
* This principal references a G Suite user account
*/
gsuiteUserEmail?: string;
}
/**
* Used to provide a search operator for html properties. This is optional.
* Search operators let users restrict the query to specific fields relevant
* to the type of item being searched.
*/
export interface Schema$HtmlOperatorOptions {
/**
* Indicates the operator name required in the query in order to isolate the
* html property. For example, if operatorName is *subject* and the
* property's name is *subjectLine*, then queries like
* *subject:&lt;value&gt;* will show results only where the value of
* the property named *subjectLine* matches *&lt;value&gt;*. By
* contrast, a search that uses the same *&lt;value&gt;* without an
* operator will return all items where *&lt;value&gt;* matches the
* value of any html properties or text within the content field for the
* item. The operator name can only contain lowercase letters (a-z). The
* maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for html properties.
*/
export interface Schema$HtmlPropertyOptions {
/**
* If set, describes how the property should be used as a search operator.
*/
operatorOptions?: Schema$HtmlOperatorOptions;
/**
* Indicates the search quality importance of the tokens within the field
* when used for retrieval. Can only be set to DEFAULT or NONE.
*/
retrievalImportance?: Schema$RetrievalImportance;
}
/**
* List of html values.
*/
export interface Schema$HtmlValues {
/**
* The maximum allowable length for html values is 2048 characters.
*/
values?: string[];
}
export interface Schema$IndexItemOptions {
/**
* Specifies if the index request should allow gsuite principals that do not
* exist or are deleted in the index request.
*/
allowUnknownGsuitePrincipals?: boolean;
}
export interface Schema$IndexItemRequest {
/**
* Name of connector making this call. <br />Format:
* datasources/{source_id}/connectors/{ID}
*/
connectorName?: string;
/**
* Common debug options.
*/
debugOptions?: Schema$DebugOptions;
indexItemOptions?: Schema$IndexItemOptions;
/**
* Name of the item. Format: datasources/{source_id}/items/{item_id}
*/
item?: Schema$Item;
/**
* Required. The RequestMode for this request.
*/
mode?: string;
}
/**
* Used to provide a search operator for integer properties. This is optional.
* Search operators let users restrict the query to specific fields relevant
* to the type of item being searched.
*/
export interface Schema$IntegerOperatorOptions {
/**
* Indicates the operator name required in the query in order to isolate the
* integer property using the greater-than operator. For example, if
* greaterThanOperatorName is *priorityabove* and the property's name is
* *priorityVal*, then queries like *priorityabove:&lt;value&gt;*
* will show results only where the value of the property named
* *priorityVal* is greater than *&lt;value&gt;*. The operator name
* can only contain lowercase letters (a-z). The maximum length is 32
* characters.
*/
greaterThanOperatorName?: string;
/**
* Indicates the operator name required in the query in order to isolate the
* integer property using the less-than operator. For example, if
* lessThanOperatorName is *prioritybelow* and the property's name is
* *priorityVal*, then queries like *prioritybelow:&lt;value&gt;*
* will show results only where the value of the property named
* *priorityVal* is less than *&lt;value&gt;*. The operator name can
* only contain lowercase letters (a-z). The maximum length is 32
* characters.
*/
lessThanOperatorName?: string;
/**
* Indicates the operator name required in the query in order to isolate the
* integer property. For example, if operatorName is *priority* and the
* property's name is *priorityVal*, then queries like
* *priority:&lt;value&gt;* will show results only where the value
* of the property named *priorityVal* matches *&lt;value&gt;*. By
* contrast, a search that uses the same *&lt;value&gt;* without an
* operator will return all items where *&lt;value&gt;* matches the
* value of any String properties or text within the content field for the
* item. The operator name can only contain lowercase letters (a-z). The
* maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for integer properties.
*/
export interface Schema$IntegerPropertyOptions {
/**
* The maximum value of the property. The minimum and maximum values for the
* property are used to rank results according to the ordered ranking.
* Indexing requests with values greater than the maximum are accepted and
* ranked with the same weight as items indexed with the maximum value.
*/
maximumValue?: string;
/**
* The minimum value of the property. The minimum and maximum values for the
* property are used to rank results according to the ordered ranking.
* Indexing requests with values less than the minimum are accepted and
* ranked with the same weight as items indexed with the minimum value.
*/
minimumValue?: string;
/**
* If set, describes how the integer should be used as a search operator.
*/
operatorOptions?: Schema$IntegerOperatorOptions;
/**
* Used to specify the ordered ranking for the integer. Can only be used if
* isRepeatable is false.
*/
orderedRanking?: string;
}
/**
* List of integer values.
*/
export interface Schema$IntegerValues {
values?: string[];
}
/**
* Represents an interaction between a user and an item.
*/
export interface Schema$Interaction {
/**
* The time when the user acted on the item. If multiple actions of the
* same type exist for a single user, only the most recent action is
* recorded.
*/
interactionTime?: string;
/**
* The user that acted on the item.
*/
principal?: Schema$Principal;
type?: string;
}
/**
* Represents a single object that is an item in the search index, such as a
* file, folder, or a database record.
*/
export interface Schema$Item {
/**
* Access control list for this item.
*/
acl?: Schema$ItemAcl;
/**
* Item content to be indexed and made text searchable.
*/
content?: Schema$ItemContent;
/**
* Type for this item.
*/
itemType?: string;
/**
* Metadata information.
*/
metadata?: Schema$ItemMetadata;
/**
* Name of the Item. Format: datasources/{source_id}/items/{item_id} <br
* />This is a required field. The maximum length is 1536 characters.
*/
name?: string;
/**
* Additional state connector can store for this item. The maximum length is
* 10000 bytes.
*/
payload?: string;
/**
* Queue this item belongs to. The maximum length is 100 characters.
*/
queue?: string;
/**
* Status of the item. Output only field.
*/
status?: Schema$ItemStatus;
/**
* The structured data for the item that should conform to a registered
* object definition in the schema for the data source.
*/
structuredData?: Schema$ItemStructuredData;
/**
* Required. The indexing system stores the version from the datasource as a
* byte string and compares the Item version in the index to the version of
* the queued Item using lexical ordering. <br /><br /> Cloud
* Search Indexing won't index or delete any queued item with a version
* value that is less than or equal to the version of the currently indexed
* item. The maximum length for this field is 1024 bytes.
*/
version?: string;
}
/**
* Access control list information for the item. For more information see
* https://developers.google.com/cloud-search/docs/guides/index-your-data#acls
*/
export interface Schema$ItemAcl {
/**
* Sets the type of access rules to apply when an item inherits its ACL from
* a parent. This should always be set in tandem with the inheritAclFrom
* field. Also, when the inheritAclFrom field is set, this field should be
* set to a valid AclInheritanceType.
*/
aclInheritanceType?: string;
/**
* List of principals who are explicitly denied access to the item in search
* results. While principals are denied access by default, use denied
* readers to handle exceptions and override the list allowed readers. The
* maximum number of elements is 100.
*/
deniedReaders?: Schema$Principal[];
/**
* Name of the item to inherit the Access Permission List (ACL) from. Note:
* ACL inheritance *only* provides access permissions to child items and
* does not define structural relationships, nor does it provide convenient
* ways to delete large groups of items. Deleting an ACL parent from the
* index only alters the access permissions of child items that reference
* the parent in the inheritAclFrom field. The item is still in the index,
* but may not visible in search results. By contrast, deletion of a
* container item also deletes all items that reference the container via
* the containerName field. The maximum length for this field is 1536
* characters.
*/
inheritAclFrom?: string;
/**
* Optional. List of owners for the item. This field has no bearing on
* document access permissions. It does, however, offer a slight ranking
* boosts items where the querying user is an owner. The maximum number of
* elements is 5.
*/
owners?: Schema$Principal[];
/**
* List of principals who are allowed to see the item in search results.
* Optional if inheriting permissions from another item or if the item is
* not intended to be visible, such as virtual containers. The maximum
* number of elements is 1000.