@maxim_mazurok/gapi.client.cloudsearch-v1 0.0.20220801

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/tests.ts ADDED
@@ -0,0 +1,1162 @@
1
+ /* This is stub file for gapi.client.cloudsearch-v1 definition tests */
2
+ // IMPORTANT
3
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
+
6
+ // Revision: 20220801
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://cloudsearch.googleapis.com/$discovery/rest?version=v1');
12
+ /** now we can use gapi.client.cloudsearch */
13
+
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** Index and serve your organization's data with Cloud Search */
19
+ 'https://www.googleapis.com/auth/cloud_search',
20
+ /** Index and serve your organization's data with Cloud Search */
21
+ 'https://www.googleapis.com/auth/cloud_search.debug',
22
+ /** Index and serve your organization's data with Cloud Search */
23
+ 'https://www.googleapis.com/auth/cloud_search.indexing',
24
+ /** Search your organization's data in the Cloud Search index */
25
+ 'https://www.googleapis.com/auth/cloud_search.query',
26
+ /** Index and serve your organization's data with Cloud Search */
27
+ 'https://www.googleapis.com/auth/cloud_search.settings',
28
+ /** Index and serve your organization's data with Cloud Search */
29
+ 'https://www.googleapis.com/auth/cloud_search.settings.indexing',
30
+ /** Index and serve your organization's data with Cloud Search */
31
+ 'https://www.googleapis.com/auth/cloud_search.settings.query',
32
+ /** Index and serve your organization's data with Cloud Search */
33
+ 'https://www.googleapis.com/auth/cloud_search.stats',
34
+ /** Index and serve your organization's data with Cloud Search */
35
+ 'https://www.googleapis.com/auth/cloud_search.stats.indexing',
36
+ ];
37
+ const immediate = false;
38
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
39
+ if (authResult && !authResult.error) {
40
+ /** handle successful authorization */
41
+ run();
42
+ } else {
43
+ /** handle authorization error */
44
+ }
45
+ });
46
+
47
+ async function run() {
48
+ /**
49
+ * Checks whether an item is accessible by specified principal. Principal must be a user; groups and domain values aren't supported. **Note:** This API requires an admin account to
50
+ * execute.
51
+ */
52
+ await gapi.client.cloudsearch.debug.datasources.items.checkAccess({
53
+ "debugOptions.enableDebugging": true,
54
+ name: "Test string",
55
+ }, {
56
+ groupResourceName: "Test string",
57
+ gsuitePrincipal: {
58
+ gsuiteDomain: true,
59
+ gsuiteGroupEmail: "Test string",
60
+ gsuiteUserEmail: "Test string",
61
+ },
62
+ userResourceName: "Test string",
63
+ });
64
+ /** Fetches the item whose viewUrl exactly matches that of the URL provided in the request. **Note:** This API requires an admin account to execute. */
65
+ await gapi.client.cloudsearch.debug.datasources.items.searchByViewUrl({
66
+ name: "Test string",
67
+ }, {
68
+ debugOptions: {
69
+ enableDebugging: true,
70
+ },
71
+ pageToken: "Test string",
72
+ viewUrl: "Test string",
73
+ });
74
+ /** List all unmapped identities for a specific item. **Note:** This API requires an admin account to execute. */
75
+ await gapi.client.cloudsearch.debug.datasources.items.unmappedids.list({
76
+ "debugOptions.enableDebugging": true,
77
+ pageSize: 42,
78
+ pageToken: "Test string",
79
+ parent: "Test string",
80
+ });
81
+ /** Lists names of items associated with an unmapped identity. **Note:** This API requires an admin account to execute. */
82
+ await gapi.client.cloudsearch.debug.identitysources.items.listForunmappedidentity({
83
+ "debugOptions.enableDebugging": true,
84
+ groupResourceName: "Test string",
85
+ pageSize: 42,
86
+ pageToken: "Test string",
87
+ parent: "Test string",
88
+ userResourceName: "Test string",
89
+ });
90
+ /** Lists unmapped user identities for an identity source. **Note:** This API requires an admin account to execute. */
91
+ await gapi.client.cloudsearch.debug.identitysources.unmappedids.list({
92
+ "debugOptions.enableDebugging": true,
93
+ pageSize: 42,
94
+ pageToken: "Test string",
95
+ parent: "Test string",
96
+ resolutionStatusCode: "Test string",
97
+ });
98
+ /** Deletes the schema of a data source. **Note:** This API requires an admin or service account to execute. */
99
+ await gapi.client.cloudsearch.indexing.datasources.deleteSchema({
100
+ "debugOptions.enableDebugging": true,
101
+ name: "Test string",
102
+ });
103
+ /** Gets the schema of a data source. **Note:** This API requires an admin or service account to execute. */
104
+ await gapi.client.cloudsearch.indexing.datasources.getSchema({
105
+ "debugOptions.enableDebugging": true,
106
+ name: "Test string",
107
+ });
108
+ /**
109
+ * Updates the schema of a data source. This method does not perform incremental updates to the schema. Instead, this method updates the schema by overwriting the entire schema. **Note:**
110
+ * This API requires an admin or service account to execute.
111
+ */
112
+ await gapi.client.cloudsearch.indexing.datasources.updateSchema({
113
+ name: "Test string",
114
+ }, {
115
+ debugOptions: {
116
+ enableDebugging: true,
117
+ },
118
+ schema: {
119
+ objectDefinitions: [
120
+ {
121
+ name: "Test string",
122
+ options: {
123
+ displayOptions: {
124
+ metalines: [
125
+ {
126
+ properties: [
127
+ {
128
+ propertyName: "Test string",
129
+ }
130
+ ],
131
+ }
132
+ ],
133
+ objectDisplayLabel: "Test string",
134
+ },
135
+ freshnessOptions: {
136
+ freshnessDuration: "Test string",
137
+ freshnessProperty: "Test string",
138
+ },
139
+ suggestionFilteringOperators: [
140
+ "Test string"
141
+ ],
142
+ },
143
+ propertyDefinitions: [
144
+ {
145
+ booleanPropertyOptions: {
146
+ operatorOptions: {
147
+ operatorName: "Test string",
148
+ },
149
+ },
150
+ datePropertyOptions: {
151
+ operatorOptions: {
152
+ greaterThanOperatorName: "Test string",
153
+ lessThanOperatorName: "Test string",
154
+ operatorName: "Test string",
155
+ },
156
+ },
157
+ displayOptions: {
158
+ displayLabel: "Test string",
159
+ },
160
+ doublePropertyOptions: {
161
+ operatorOptions: {
162
+ operatorName: "Test string",
163
+ },
164
+ },
165
+ enumPropertyOptions: {
166
+ operatorOptions: {
167
+ operatorName: "Test string",
168
+ },
169
+ orderedRanking: "Test string",
170
+ possibleValues: [
171
+ {
172
+ integerValue: 42,
173
+ stringValue: "Test string",
174
+ }
175
+ ],
176
+ },
177
+ htmlPropertyOptions: {
178
+ operatorOptions: {
179
+ operatorName: "Test string",
180
+ },
181
+ retrievalImportance: {
182
+ importance: "Test string",
183
+ },
184
+ },
185
+ integerPropertyOptions: {
186
+ maximumValue: "Test string",
187
+ minimumValue: "Test string",
188
+ operatorOptions: {
189
+ greaterThanOperatorName: "Test string",
190
+ lessThanOperatorName: "Test string",
191
+ operatorName: "Test string",
192
+ },
193
+ orderedRanking: "Test string",
194
+ },
195
+ isFacetable: true,
196
+ isRepeatable: true,
197
+ isReturnable: true,
198
+ isSortable: true,
199
+ isSuggestable: true,
200
+ isWildcardSearchable: true,
201
+ name: "Test string",
202
+ objectPropertyOptions: {
203
+ subobjectProperties: undefined,
204
+ },
205
+ textPropertyOptions: {
206
+ operatorOptions: {
207
+ exactMatchWithOperator: true,
208
+ operatorName: "Test string",
209
+ },
210
+ retrievalImportance: {
211
+ importance: "Test string",
212
+ },
213
+ },
214
+ timestampPropertyOptions: {
215
+ operatorOptions: {
216
+ greaterThanOperatorName: "Test string",
217
+ lessThanOperatorName: "Test string",
218
+ operatorName: "Test string",
219
+ },
220
+ },
221
+ }
222
+ ],
223
+ }
224
+ ],
225
+ operationIds: [
226
+ "Test string"
227
+ ],
228
+ },
229
+ validateOnly: true,
230
+ });
231
+ /**
232
+ * Deletes Item resource for the specified resource name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding
233
+ * data source.
234
+ */
235
+ await gapi.client.cloudsearch.indexing.datasources.items.delete({
236
+ connectorName: "Test string",
237
+ "debugOptions.enableDebugging": true,
238
+ mode: "Test string",
239
+ name: "Test string",
240
+ version: "Test string",
241
+ });
242
+ /**
243
+ * Deletes all items in a queue. This method is useful for deleting stale items. This API requires an admin or service account to execute. The service account used is the one whitelisted
244
+ * in the corresponding data source.
245
+ */
246
+ await gapi.client.cloudsearch.indexing.datasources.items.deleteQueueItems({
247
+ name: "Test string",
248
+ }, {
249
+ connectorName: "Test string",
250
+ debugOptions: {
251
+ enableDebugging: true,
252
+ },
253
+ queue: "Test string",
254
+ });
255
+ /** Gets Item resource by item name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source. */
256
+ await gapi.client.cloudsearch.indexing.datasources.items.get({
257
+ connectorName: "Test string",
258
+ "debugOptions.enableDebugging": true,
259
+ name: "Test string",
260
+ });
261
+ /**
262
+ * Updates Item ACL, metadata, and content. It will insert the Item if it does not exist. This method does not support partial updates. Fields with no provided values are cleared out in
263
+ * the Cloud Search index. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
264
+ */
265
+ await gapi.client.cloudsearch.indexing.datasources.items.index({
266
+ name: "Test string",
267
+ }, {
268
+ connectorName: "Test string",
269
+ debugOptions: {
270
+ enableDebugging: true,
271
+ },
272
+ indexItemOptions: {
273
+ allowUnknownGsuitePrincipals: true,
274
+ },
275
+ item: {
276
+ acl: {
277
+ aclInheritanceType: "Test string",
278
+ deniedReaders: [
279
+ {
280
+ groupResourceName: "Test string",
281
+ gsuitePrincipal: {
282
+ gsuiteDomain: true,
283
+ gsuiteGroupEmail: "Test string",
284
+ gsuiteUserEmail: "Test string",
285
+ },
286
+ userResourceName: "Test string",
287
+ }
288
+ ],
289
+ inheritAclFrom: "Test string",
290
+ owners: [
291
+ {
292
+ groupResourceName: "Test string",
293
+ gsuitePrincipal: {
294
+ gsuiteDomain: true,
295
+ gsuiteGroupEmail: "Test string",
296
+ gsuiteUserEmail: "Test string",
297
+ },
298
+ userResourceName: "Test string",
299
+ }
300
+ ],
301
+ readers: [
302
+ {
303
+ groupResourceName: "Test string",
304
+ gsuitePrincipal: {
305
+ gsuiteDomain: true,
306
+ gsuiteGroupEmail: "Test string",
307
+ gsuiteUserEmail: "Test string",
308
+ },
309
+ userResourceName: "Test string",
310
+ }
311
+ ],
312
+ },
313
+ content: {
314
+ contentDataRef: {
315
+ name: "Test string",
316
+ },
317
+ contentFormat: "Test string",
318
+ hash: "Test string",
319
+ inlineContent: "Test string",
320
+ },
321
+ itemType: "Test string",
322
+ metadata: {
323
+ containerName: "Test string",
324
+ contentLanguage: "Test string",
325
+ contextAttributes: [
326
+ {
327
+ name: "Test string",
328
+ values: [
329
+ "Test string"
330
+ ],
331
+ }
332
+ ],
333
+ createTime: "Test string",
334
+ hash: "Test string",
335
+ interactions: [
336
+ {
337
+ interactionTime: "Test string",
338
+ principal: {
339
+ groupResourceName: "Test string",
340
+ gsuitePrincipal: {
341
+ gsuiteDomain: true,
342
+ gsuiteGroupEmail: "Test string",
343
+ gsuiteUserEmail: "Test string",
344
+ },
345
+ userResourceName: "Test string",
346
+ },
347
+ type: "Test string",
348
+ }
349
+ ],
350
+ keywords: [
351
+ "Test string"
352
+ ],
353
+ mimeType: "Test string",
354
+ objectType: "Test string",
355
+ searchQualityMetadata: {
356
+ quality: 42,
357
+ },
358
+ sourceRepositoryUrl: "Test string",
359
+ title: "Test string",
360
+ updateTime: "Test string",
361
+ },
362
+ name: "Test string",
363
+ payload: "Test string",
364
+ queue: "Test string",
365
+ status: {
366
+ code: "Test string",
367
+ processingErrors: [
368
+ {
369
+ code: "Test string",
370
+ errorMessage: "Test string",
371
+ fieldViolations: [
372
+ {
373
+ description: "Test string",
374
+ field: "Test string",
375
+ }
376
+ ],
377
+ }
378
+ ],
379
+ repositoryErrors: [
380
+ {
381
+ errorMessage: "Test string",
382
+ httpStatusCode: 42,
383
+ type: "Test string",
384
+ }
385
+ ],
386
+ },
387
+ structuredData: {
388
+ hash: "Test string",
389
+ object: {
390
+ properties: [
391
+ {
392
+ booleanValue: true,
393
+ dateValues: {
394
+ values: [
395
+ {
396
+ day: 42,
397
+ month: 42,
398
+ year: 42,
399
+ }
400
+ ],
401
+ },
402
+ doubleValues: {
403
+ values: [
404
+ 42
405
+ ],
406
+ },
407
+ enumValues: {
408
+ values: [
409
+ "Test string"
410
+ ],
411
+ },
412
+ htmlValues: {
413
+ values: [
414
+ "Test string"
415
+ ],
416
+ },
417
+ integerValues: {
418
+ values: [
419
+ "Test string"
420
+ ],
421
+ },
422
+ name: "Test string",
423
+ objectValues: {
424
+ values: undefined,
425
+ },
426
+ textValues: {
427
+ values: [
428
+ "Test string"
429
+ ],
430
+ },
431
+ timestampValues: {
432
+ values: [
433
+ "Test string"
434
+ ],
435
+ },
436
+ }
437
+ ],
438
+ },
439
+ },
440
+ version: "Test string",
441
+ },
442
+ mode: "Test string",
443
+ });
444
+ /** Lists all or a subset of Item resources. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source. */
445
+ await gapi.client.cloudsearch.indexing.datasources.items.list({
446
+ brief: true,
447
+ connectorName: "Test string",
448
+ "debugOptions.enableDebugging": true,
449
+ name: "Test string",
450
+ pageSize: 42,
451
+ pageToken: "Test string",
452
+ });
453
+ /**
454
+ * Polls for unreserved items from the indexing queue and marks a set as reserved, starting with items that have the oldest timestamp from the highest priority ItemStatus. The priority
455
+ * order is as follows: ERROR MODIFIED NEW_ITEM ACCEPTED Reserving items ensures that polling from other threads cannot create overlapping sets. After handling the reserved items, the
456
+ * client should put items back into the unreserved state, either by calling index, or by calling push with the type REQUEUE. Items automatically become available (unreserved) after 4
457
+ * hours even if no update or push method is called. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data
458
+ * source.
459
+ */
460
+ await gapi.client.cloudsearch.indexing.datasources.items.poll({
461
+ name: "Test string",
462
+ }, {
463
+ connectorName: "Test string",
464
+ debugOptions: {
465
+ enableDebugging: true,
466
+ },
467
+ limit: 42,
468
+ queue: "Test string",
469
+ statusCodes: [
470
+ "Test string"
471
+ ],
472
+ });
473
+ /**
474
+ * Pushes an item onto a queue for later polling and updating. This API requires an admin or service account to execute. The service account used is the one whitelisted in the
475
+ * corresponding data source.
476
+ */
477
+ await gapi.client.cloudsearch.indexing.datasources.items.push({
478
+ name: "Test string",
479
+ }, {
480
+ connectorName: "Test string",
481
+ debugOptions: {
482
+ enableDebugging: true,
483
+ },
484
+ item: {
485
+ contentHash: "Test string",
486
+ metadataHash: "Test string",
487
+ payload: "Test string",
488
+ queue: "Test string",
489
+ repositoryError: {
490
+ errorMessage: "Test string",
491
+ httpStatusCode: 42,
492
+ type: "Test string",
493
+ },
494
+ structuredDataHash: "Test string",
495
+ type: "Test string",
496
+ },
497
+ });
498
+ /**
499
+ * Unreserves all items from a queue, making them all eligible to be polled. This method is useful for resetting the indexing queue after a connector has been restarted. This API requires
500
+ * an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
501
+ */
502
+ await gapi.client.cloudsearch.indexing.datasources.items.unreserve({
503
+ name: "Test string",
504
+ }, {
505
+ connectorName: "Test string",
506
+ debugOptions: {
507
+ enableDebugging: true,
508
+ },
509
+ queue: "Test string",
510
+ });
511
+ /**
512
+ * Creates an upload session for uploading item content. For items smaller than 100 KB, it's easier to embed the content inline within an index request. This API requires an admin or
513
+ * service account to execute. The service account used is the one whitelisted in the corresponding data source.
514
+ */
515
+ await gapi.client.cloudsearch.indexing.datasources.items.upload({
516
+ name: "Test string",
517
+ }, {
518
+ connectorName: "Test string",
519
+ debugOptions: {
520
+ enableDebugging: true,
521
+ },
522
+ });
523
+ /**
524
+ * Uploads media for indexing. The upload endpoint supports direct and resumable upload protocols and is intended for large items that can not be [inlined during index
525
+ * requests](https://developers.google.com/cloud-search/docs/reference/rest/v1/indexing.datasources.items#itemcontent). To index large content: 1. Call indexing.datasources.items.upload
526
+ * with the item name to begin an upload session and retrieve the UploadItemRef. 1. Call media.upload to upload the content, as a streaming request, using the same resource name from the
527
+ * UploadItemRef from step 1. 1. Call indexing.datasources.items.index to index the item. Populate the
528
+ * [ItemContent](/cloud-search/docs/reference/rest/v1/indexing.datasources.items#ItemContent) with the UploadItemRef from step 1. For additional information, see [Create a content
529
+ * connector using the REST API](https://developers.google.com/cloud-search/docs/guides/content-connector#rest). **Note:** This API requires a service account to execute.
530
+ */
531
+ await gapi.client.cloudsearch.media.upload({
532
+ resourceName: "Test string",
533
+ }, {
534
+ resourceName: "Test string",
535
+ });
536
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
537
+ await gapi.client.cloudsearch.operations.get({
538
+ name: "Test string",
539
+ });
540
+ /**
541
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
542
+ * override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
543
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
544
+ * ensure the name binding is the parent resource, without the operations collection id.
545
+ */
546
+ await gapi.client.cloudsearch.operations.lro.list({
547
+ filter: "Test string",
548
+ name: "Test string",
549
+ pageSize: 42,
550
+ pageToken: "Test string",
551
+ });
552
+ /**
553
+ * The Cloud Search Query API provides the search method, which returns the most relevant results from a user query. The results can come from Google Workspace apps, such as Gmail or
554
+ * Google Drive, or they can come from data that you have indexed from a third party. **Note:** This API requires a standard end user account to execute. A service account can't perform
555
+ * Query API requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of
556
+ * authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
557
+ */
558
+ await gapi.client.cloudsearch.query.search({
559
+ }, {
560
+ contextAttributes: [
561
+ {
562
+ name: "Test string",
563
+ values: [
564
+ "Test string"
565
+ ],
566
+ }
567
+ ],
568
+ dataSourceRestrictions: [
569
+ {
570
+ filterOptions: [
571
+ {
572
+ filter: {
573
+ compositeFilter: {
574
+ logicOperator: "Test string",
575
+ subFilters: undefined,
576
+ },
577
+ valueFilter: {
578
+ operatorName: "Test string",
579
+ value: {
580
+ booleanValue: true,
581
+ dateValue: {
582
+ day: 42,
583
+ month: 42,
584
+ year: 42,
585
+ },
586
+ doubleValue: 42,
587
+ integerValue: "Test string",
588
+ stringValue: "Test string",
589
+ timestampValue: "Test string",
590
+ },
591
+ },
592
+ },
593
+ objectType: "Test string",
594
+ }
595
+ ],
596
+ source: {
597
+ name: "Test string",
598
+ predefinedSource: "Test string",
599
+ },
600
+ }
601
+ ],
602
+ facetOptions: [
603
+ {
604
+ numFacetBuckets: 42,
605
+ objectType: "Test string",
606
+ operatorName: "Test string",
607
+ sourceName: "Test string",
608
+ }
609
+ ],
610
+ pageSize: 42,
611
+ query: "Test string",
612
+ queryInterpretationOptions: {
613
+ disableNlInterpretation: true,
614
+ disableSupplementalResults: true,
615
+ enableVerbatimMode: true,
616
+ },
617
+ requestOptions: {
618
+ debugOptions: {
619
+ enableDebugging: true,
620
+ },
621
+ languageCode: "Test string",
622
+ searchApplicationId: "Test string",
623
+ timeZone: "Test string",
624
+ },
625
+ sortOptions: {
626
+ operatorName: "Test string",
627
+ sortOrder: "Test string",
628
+ },
629
+ start: 42,
630
+ });
631
+ /**
632
+ * Provides suggestions for autocompleting the query. **Note:** This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to
633
+ * use a service account to perform queries, set up [Google Workspace domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
634
+ */
635
+ await gapi.client.cloudsearch.query.suggest({
636
+ }, {
637
+ dataSourceRestrictions: [
638
+ {
639
+ filterOptions: [
640
+ {
641
+ filter: {
642
+ compositeFilter: {
643
+ logicOperator: "Test string",
644
+ subFilters: undefined,
645
+ },
646
+ valueFilter: {
647
+ operatorName: "Test string",
648
+ value: {
649
+ booleanValue: true,
650
+ dateValue: {
651
+ day: 42,
652
+ month: 42,
653
+ year: 42,
654
+ },
655
+ doubleValue: 42,
656
+ integerValue: "Test string",
657
+ stringValue: "Test string",
658
+ timestampValue: "Test string",
659
+ },
660
+ },
661
+ },
662
+ objectType: "Test string",
663
+ }
664
+ ],
665
+ source: {
666
+ name: "Test string",
667
+ predefinedSource: "Test string",
668
+ },
669
+ }
670
+ ],
671
+ query: "Test string",
672
+ requestOptions: {
673
+ debugOptions: {
674
+ enableDebugging: true,
675
+ },
676
+ languageCode: "Test string",
677
+ searchApplicationId: "Test string",
678
+ timeZone: "Test string",
679
+ },
680
+ });
681
+ /**
682
+ * Returns list of sources that user can use for Search and Suggest APIs. **Note:** This API requires a standard end user account to execute. A service account can't perform Query API
683
+ * requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of
684
+ * authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
685
+ */
686
+ await gapi.client.cloudsearch.query.sources.list({
687
+ pageToken: "Test string",
688
+ "requestOptions.debugOptions.enableDebugging": true,
689
+ "requestOptions.languageCode": "Test string",
690
+ "requestOptions.searchApplicationId": "Test string",
691
+ "requestOptions.timeZone": "Test string",
692
+ });
693
+ /** Get customer settings. **Note:** This API requires an admin account to execute. */
694
+ await gapi.client.cloudsearch.settings.getCustomer({
695
+ });
696
+ /** Update customer settings. **Note:** This API requires an admin account to execute. */
697
+ await gapi.client.cloudsearch.settings.updateCustomer({
698
+ updateMask: "Test string",
699
+ }, {
700
+ auditLoggingSettings: {
701
+ logAdminReadActions: true,
702
+ logDataReadActions: true,
703
+ logDataWriteActions: true,
704
+ project: "Test string",
705
+ },
706
+ vpcSettings: {
707
+ project: "Test string",
708
+ },
709
+ });
710
+ /** Creates a datasource. **Note:** This API requires an admin account to execute. */
711
+ await gapi.client.cloudsearch.settings.datasources.create({
712
+ }, {
713
+ disableModifications: true,
714
+ disableServing: true,
715
+ displayName: "Test string",
716
+ indexingServiceAccounts: [
717
+ "Test string"
718
+ ],
719
+ itemsVisibility: [
720
+ {
721
+ gsuiteDomain: true,
722
+ gsuiteGroupEmail: "Test string",
723
+ gsuiteUserEmail: "Test string",
724
+ }
725
+ ],
726
+ name: "Test string",
727
+ operationIds: [
728
+ "Test string"
729
+ ],
730
+ returnThumbnailUrls: true,
731
+ shortName: "Test string",
732
+ });
733
+ /** Deletes a datasource. **Note:** This API requires an admin account to execute. */
734
+ await gapi.client.cloudsearch.settings.datasources.delete({
735
+ "debugOptions.enableDebugging": true,
736
+ name: "Test string",
737
+ });
738
+ /** Gets a datasource. **Note:** This API requires an admin account to execute. */
739
+ await gapi.client.cloudsearch.settings.datasources.get({
740
+ "debugOptions.enableDebugging": true,
741
+ name: "Test string",
742
+ });
743
+ /** Lists datasources. **Note:** This API requires an admin account to execute. */
744
+ await gapi.client.cloudsearch.settings.datasources.list({
745
+ "debugOptions.enableDebugging": true,
746
+ pageSize: 42,
747
+ pageToken: "Test string",
748
+ });
749
+ /** Updates a datasource. **Note:** This API requires an admin account to execute. */
750
+ await gapi.client.cloudsearch.settings.datasources.patch({
751
+ "debugOptions.enableDebugging": true,
752
+ name: "Test string",
753
+ }, {
754
+ disableModifications: true,
755
+ disableServing: true,
756
+ displayName: "Test string",
757
+ indexingServiceAccounts: [
758
+ "Test string"
759
+ ],
760
+ itemsVisibility: [
761
+ {
762
+ gsuiteDomain: true,
763
+ gsuiteGroupEmail: "Test string",
764
+ gsuiteUserEmail: "Test string",
765
+ }
766
+ ],
767
+ name: "Test string",
768
+ operationIds: [
769
+ "Test string"
770
+ ],
771
+ returnThumbnailUrls: true,
772
+ shortName: "Test string",
773
+ });
774
+ /** Updates a datasource. **Note:** This API requires an admin account to execute. */
775
+ await gapi.client.cloudsearch.settings.datasources.update({
776
+ name: "Test string",
777
+ }, {
778
+ debugOptions: {
779
+ enableDebugging: true,
780
+ },
781
+ source: {
782
+ disableModifications: true,
783
+ disableServing: true,
784
+ displayName: "Test string",
785
+ indexingServiceAccounts: [
786
+ "Test string"
787
+ ],
788
+ itemsVisibility: [
789
+ {
790
+ gsuiteDomain: true,
791
+ gsuiteGroupEmail: "Test string",
792
+ gsuiteUserEmail: "Test string",
793
+ }
794
+ ],
795
+ name: "Test string",
796
+ operationIds: [
797
+ "Test string"
798
+ ],
799
+ returnThumbnailUrls: true,
800
+ shortName: "Test string",
801
+ },
802
+ });
803
+ /** Creates a search application. **Note:** This API requires an admin account to execute. */
804
+ await gapi.client.cloudsearch.settings.searchapplications.create({
805
+ }, {
806
+ dataSourceRestrictions: [
807
+ {
808
+ filterOptions: [
809
+ {
810
+ filter: {
811
+ compositeFilter: {
812
+ logicOperator: "Test string",
813
+ subFilters: undefined,
814
+ },
815
+ valueFilter: {
816
+ operatorName: "Test string",
817
+ value: {
818
+ booleanValue: true,
819
+ dateValue: {
820
+ day: 42,
821
+ month: 42,
822
+ year: 42,
823
+ },
824
+ doubleValue: 42,
825
+ integerValue: "Test string",
826
+ stringValue: "Test string",
827
+ timestampValue: "Test string",
828
+ },
829
+ },
830
+ },
831
+ objectType: "Test string",
832
+ }
833
+ ],
834
+ source: {
835
+ name: "Test string",
836
+ predefinedSource: "Test string",
837
+ },
838
+ }
839
+ ],
840
+ defaultFacetOptions: [
841
+ {
842
+ numFacetBuckets: 42,
843
+ objectType: "Test string",
844
+ operatorName: "Test string",
845
+ sourceName: "Test string",
846
+ }
847
+ ],
848
+ defaultSortOptions: {
849
+ operatorName: "Test string",
850
+ sortOrder: "Test string",
851
+ },
852
+ displayName: "Test string",
853
+ enableAuditLog: true,
854
+ name: "Test string",
855
+ operationIds: [
856
+ "Test string"
857
+ ],
858
+ queryInterpretationConfig: {
859
+ forceDisableSupplementalResults: true,
860
+ forceVerbatimMode: true,
861
+ },
862
+ returnResultThumbnailUrls: true,
863
+ scoringConfig: {
864
+ disableFreshness: true,
865
+ disablePersonalization: true,
866
+ },
867
+ sourceConfig: [
868
+ {
869
+ crowdingConfig: {
870
+ numResults: 42,
871
+ numSuggestions: 42,
872
+ },
873
+ scoringConfig: {
874
+ sourceImportance: "Test string",
875
+ },
876
+ source: {
877
+ name: "Test string",
878
+ predefinedSource: "Test string",
879
+ },
880
+ }
881
+ ],
882
+ });
883
+ /** Deletes a search application. **Note:** This API requires an admin account to execute. */
884
+ await gapi.client.cloudsearch.settings.searchapplications.delete({
885
+ "debugOptions.enableDebugging": true,
886
+ name: "Test string",
887
+ });
888
+ /** Gets the specified search application. **Note:** This API requires an admin account to execute. */
889
+ await gapi.client.cloudsearch.settings.searchapplications.get({
890
+ "debugOptions.enableDebugging": true,
891
+ name: "Test string",
892
+ });
893
+ /** Lists all search applications. **Note:** This API requires an admin account to execute. */
894
+ await gapi.client.cloudsearch.settings.searchapplications.list({
895
+ "debugOptions.enableDebugging": true,
896
+ pageSize: 42,
897
+ pageToken: "Test string",
898
+ });
899
+ /** Updates a search application. **Note:** This API requires an admin account to execute. */
900
+ await gapi.client.cloudsearch.settings.searchapplications.patch({
901
+ name: "Test string",
902
+ }, {
903
+ dataSourceRestrictions: [
904
+ {
905
+ filterOptions: [
906
+ {
907
+ filter: {
908
+ compositeFilter: {
909
+ logicOperator: "Test string",
910
+ subFilters: undefined,
911
+ },
912
+ valueFilter: {
913
+ operatorName: "Test string",
914
+ value: {
915
+ booleanValue: true,
916
+ dateValue: {
917
+ day: 42,
918
+ month: 42,
919
+ year: 42,
920
+ },
921
+ doubleValue: 42,
922
+ integerValue: "Test string",
923
+ stringValue: "Test string",
924
+ timestampValue: "Test string",
925
+ },
926
+ },
927
+ },
928
+ objectType: "Test string",
929
+ }
930
+ ],
931
+ source: {
932
+ name: "Test string",
933
+ predefinedSource: "Test string",
934
+ },
935
+ }
936
+ ],
937
+ defaultFacetOptions: [
938
+ {
939
+ numFacetBuckets: 42,
940
+ objectType: "Test string",
941
+ operatorName: "Test string",
942
+ sourceName: "Test string",
943
+ }
944
+ ],
945
+ defaultSortOptions: {
946
+ operatorName: "Test string",
947
+ sortOrder: "Test string",
948
+ },
949
+ displayName: "Test string",
950
+ enableAuditLog: true,
951
+ name: "Test string",
952
+ operationIds: [
953
+ "Test string"
954
+ ],
955
+ queryInterpretationConfig: {
956
+ forceDisableSupplementalResults: true,
957
+ forceVerbatimMode: true,
958
+ },
959
+ returnResultThumbnailUrls: true,
960
+ scoringConfig: {
961
+ disableFreshness: true,
962
+ disablePersonalization: true,
963
+ },
964
+ sourceConfig: [
965
+ {
966
+ crowdingConfig: {
967
+ numResults: 42,
968
+ numSuggestions: 42,
969
+ },
970
+ scoringConfig: {
971
+ sourceImportance: "Test string",
972
+ },
973
+ source: {
974
+ name: "Test string",
975
+ predefinedSource: "Test string",
976
+ },
977
+ }
978
+ ],
979
+ });
980
+ /** Resets a search application to default settings. This will return an empty response. **Note:** This API requires an admin account to execute. */
981
+ await gapi.client.cloudsearch.settings.searchapplications.reset({
982
+ name: "Test string",
983
+ }, {
984
+ debugOptions: {
985
+ enableDebugging: true,
986
+ },
987
+ });
988
+ /** Updates a search application. **Note:** This API requires an admin account to execute. */
989
+ await gapi.client.cloudsearch.settings.searchapplications.update({
990
+ name: "Test string",
991
+ }, {
992
+ dataSourceRestrictions: [
993
+ {
994
+ filterOptions: [
995
+ {
996
+ filter: {
997
+ compositeFilter: {
998
+ logicOperator: "Test string",
999
+ subFilters: undefined,
1000
+ },
1001
+ valueFilter: {
1002
+ operatorName: "Test string",
1003
+ value: {
1004
+ booleanValue: true,
1005
+ dateValue: {
1006
+ day: 42,
1007
+ month: 42,
1008
+ year: 42,
1009
+ },
1010
+ doubleValue: 42,
1011
+ integerValue: "Test string",
1012
+ stringValue: "Test string",
1013
+ timestampValue: "Test string",
1014
+ },
1015
+ },
1016
+ },
1017
+ objectType: "Test string",
1018
+ }
1019
+ ],
1020
+ source: {
1021
+ name: "Test string",
1022
+ predefinedSource: "Test string",
1023
+ },
1024
+ }
1025
+ ],
1026
+ defaultFacetOptions: [
1027
+ {
1028
+ numFacetBuckets: 42,
1029
+ objectType: "Test string",
1030
+ operatorName: "Test string",
1031
+ sourceName: "Test string",
1032
+ }
1033
+ ],
1034
+ defaultSortOptions: {
1035
+ operatorName: "Test string",
1036
+ sortOrder: "Test string",
1037
+ },
1038
+ displayName: "Test string",
1039
+ enableAuditLog: true,
1040
+ name: "Test string",
1041
+ operationIds: [
1042
+ "Test string"
1043
+ ],
1044
+ queryInterpretationConfig: {
1045
+ forceDisableSupplementalResults: true,
1046
+ forceVerbatimMode: true,
1047
+ },
1048
+ returnResultThumbnailUrls: true,
1049
+ scoringConfig: {
1050
+ disableFreshness: true,
1051
+ disablePersonalization: true,
1052
+ },
1053
+ sourceConfig: [
1054
+ {
1055
+ crowdingConfig: {
1056
+ numResults: 42,
1057
+ numSuggestions: 42,
1058
+ },
1059
+ scoringConfig: {
1060
+ sourceImportance: "Test string",
1061
+ },
1062
+ source: {
1063
+ name: "Test string",
1064
+ predefinedSource: "Test string",
1065
+ },
1066
+ }
1067
+ ],
1068
+ });
1069
+ /**
1070
+ * Gets indexed item statistics aggreggated across all data sources. This API only returns statistics for previous dates; it doesn't return statistics for the current day. **Note:** This
1071
+ * API requires a standard end user account to execute.
1072
+ */
1073
+ await gapi.client.cloudsearch.stats.getIndex({
1074
+ "fromDate.day": 42,
1075
+ "fromDate.month": 42,
1076
+ "fromDate.year": 42,
1077
+ "toDate.day": 42,
1078
+ "toDate.month": 42,
1079
+ "toDate.year": 42,
1080
+ });
1081
+ /** Get the query statistics for customer. **Note:** This API requires a standard end user account to execute. */
1082
+ await gapi.client.cloudsearch.stats.getQuery({
1083
+ "fromDate.day": 42,
1084
+ "fromDate.month": 42,
1085
+ "fromDate.year": 42,
1086
+ "toDate.day": 42,
1087
+ "toDate.month": 42,
1088
+ "toDate.year": 42,
1089
+ });
1090
+ /** Get search application stats for customer. **Note:** This API requires a standard end user account to execute. */
1091
+ await gapi.client.cloudsearch.stats.getSearchapplication({
1092
+ "endDate.day": 42,
1093
+ "endDate.month": 42,
1094
+ "endDate.year": 42,
1095
+ "startDate.day": 42,
1096
+ "startDate.month": 42,
1097
+ "startDate.year": 42,
1098
+ });
1099
+ /** Get the # of search sessions, % of successful sessions with a click query statistics for customer. **Note:** This API requires a standard end user account to execute. */
1100
+ await gapi.client.cloudsearch.stats.getSession({
1101
+ "fromDate.day": 42,
1102
+ "fromDate.month": 42,
1103
+ "fromDate.year": 42,
1104
+ "toDate.day": 42,
1105
+ "toDate.month": 42,
1106
+ "toDate.year": 42,
1107
+ });
1108
+ /** Get the users statistics for customer. **Note:** This API requires a standard end user account to execute. */
1109
+ await gapi.client.cloudsearch.stats.getUser({
1110
+ "fromDate.day": 42,
1111
+ "fromDate.month": 42,
1112
+ "fromDate.year": 42,
1113
+ "toDate.day": 42,
1114
+ "toDate.month": 42,
1115
+ "toDate.year": 42,
1116
+ });
1117
+ /** Gets indexed item statistics for a single data source. **Note:** This API requires a standard end user account to execute. */
1118
+ await gapi.client.cloudsearch.stats.index.datasources.get({
1119
+ "fromDate.day": 42,
1120
+ "fromDate.month": 42,
1121
+ "fromDate.year": 42,
1122
+ name: "Test string",
1123
+ "toDate.day": 42,
1124
+ "toDate.month": 42,
1125
+ "toDate.year": 42,
1126
+ });
1127
+ /** Get the query statistics for search application. **Note:** This API requires a standard end user account to execute. */
1128
+ await gapi.client.cloudsearch.stats.query.searchapplications.get({
1129
+ "fromDate.day": 42,
1130
+ "fromDate.month": 42,
1131
+ "fromDate.year": 42,
1132
+ name: "Test string",
1133
+ "toDate.day": 42,
1134
+ "toDate.month": 42,
1135
+ "toDate.year": 42,
1136
+ });
1137
+ /** Get the # of search sessions, % of successful sessions with a click query statistics for search application. **Note:** This API requires a standard end user account to execute. */
1138
+ await gapi.client.cloudsearch.stats.session.searchapplications.get({
1139
+ "fromDate.day": 42,
1140
+ "fromDate.month": 42,
1141
+ "fromDate.year": 42,
1142
+ name: "Test string",
1143
+ "toDate.day": 42,
1144
+ "toDate.month": 42,
1145
+ "toDate.year": 42,
1146
+ });
1147
+ /** Get the users statistics for search application. **Note:** This API requires a standard end user account to execute. */
1148
+ await gapi.client.cloudsearch.stats.user.searchapplications.get({
1149
+ "fromDate.day": 42,
1150
+ "fromDate.month": 42,
1151
+ "fromDate.year": 42,
1152
+ name: "Test string",
1153
+ "toDate.day": 42,
1154
+ "toDate.month": 42,
1155
+ "toDate.year": 42,
1156
+ });
1157
+ /** Enables `third party` support in Google Cloud Search. **Note:** This API requires an admin account to execute. */
1158
+ await gapi.client.cloudsearch.v1.initializeCustomer({
1159
+ }, {
1160
+ });
1161
+ }
1162
+ });