@maxim_mazurok/gapi.client.retail-v2 0.0.20220811

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,1902 @@
1
+ /* This is stub file for gapi.client.retail-v2 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: 20220811
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://retail.googleapis.com/$discovery/rest?version=v2');
12
+ /** now we can use gapi.client.retail */
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
+ /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
19
+ 'https://www.googleapis.com/auth/cloud-platform',
20
+ ];
21
+ const immediate = false;
22
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
23
+ if (authResult && !authResult.error) {
24
+ /** handle successful authorization */
25
+ run();
26
+ } else {
27
+ /** handle authorization error */
28
+ }
29
+ });
30
+
31
+ async function run() {
32
+ /**
33
+ * Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before
34
+ * using this feature.
35
+ */
36
+ await gapi.client.retail.projects.locations.catalogs.completeQuery({
37
+ catalog: "Test string",
38
+ dataset: "Test string",
39
+ deviceType: "Test string",
40
+ languageCodes: "Test string",
41
+ maxSuggestions: 42,
42
+ query: "Test string",
43
+ visitorId: "Test string",
44
+ });
45
+ /** Gets an AttributesConfig. */
46
+ await gapi.client.retail.projects.locations.catalogs.getAttributesConfig({
47
+ name: "Test string",
48
+ });
49
+ /** Gets a CompletionConfig. */
50
+ await gapi.client.retail.projects.locations.catalogs.getCompletionConfig({
51
+ name: "Test string",
52
+ });
53
+ /** Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog. */
54
+ await gapi.client.retail.projects.locations.catalogs.getDefaultBranch({
55
+ catalog: "Test string",
56
+ });
57
+ /** Lists all the Catalogs associated with the project. */
58
+ await gapi.client.retail.projects.locations.catalogs.list({
59
+ pageSize: 42,
60
+ pageToken: "Test string",
61
+ parent: "Test string",
62
+ });
63
+ /** Updates the Catalogs. */
64
+ await gapi.client.retail.projects.locations.catalogs.patch({
65
+ name: "Test string",
66
+ updateMask: "Test string",
67
+ }, {
68
+ displayName: "Test string",
69
+ name: "Test string",
70
+ productLevelConfig: {
71
+ ingestionProductType: "Test string",
72
+ merchantCenterProductIdField: "Test string",
73
+ },
74
+ });
75
+ /**
76
+ * Set a specified branch id as default branch. API methods such as SearchService.Search, ProductService.GetProduct, ProductService.ListProducts will treat requests using "default_branch"
77
+ * to the actual branch id set as default. For example, if `projects/*‍/locations/*‍/catalogs/*‍/branches/1` is set as default, setting SearchRequest.branch to
78
+ * `projects/*‍/locations/*‍/catalogs/*‍/branches/default_branch` is equivalent to setting SearchRequest.branch to `projects/*‍/locations/*‍/catalogs/*‍/branches/1`. Using multiple
79
+ * branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this
80
+ * API while keeping using `projects/*‍/locations/*‍/catalogs/*‍/branches/default_branch` as SearchRequest.branch to route the traffic to this staging branch. CAUTION: If you have live
81
+ * predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one. More specifically: *
82
+ * PredictionService will only return product IDs from branch {newBranch}. * SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set). *
83
+ * UserEventService will only join events with products from branch {newBranch}.
84
+ */
85
+ await gapi.client.retail.projects.locations.catalogs.setDefaultBranch({
86
+ catalog: "Test string",
87
+ }, {
88
+ branchId: "Test string",
89
+ force: true,
90
+ note: "Test string",
91
+ });
92
+ /**
93
+ * Updates the AttributesConfig. The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the
94
+ * request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned
95
+ * default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.
96
+ */
97
+ await gapi.client.retail.projects.locations.catalogs.updateAttributesConfig({
98
+ name: "Test string",
99
+ updateMask: "Test string",
100
+ }, {
101
+ attributeConfigLevel: "Test string",
102
+ catalogAttributes: {
103
+ A: {
104
+ dynamicFacetableOption: "Test string",
105
+ indexableOption: "Test string",
106
+ inUse: true,
107
+ key: "Test string",
108
+ searchableOption: "Test string",
109
+ type: "Test string",
110
+ }
111
+ },
112
+ name: "Test string",
113
+ });
114
+ /** Updates the CompletionConfigs. */
115
+ await gapi.client.retail.projects.locations.catalogs.updateCompletionConfig({
116
+ name: "Test string",
117
+ updateMask: "Test string",
118
+ }, {
119
+ allowlistInputConfig: {
120
+ bigQuerySource: {
121
+ dataSchema: "Test string",
122
+ datasetId: "Test string",
123
+ gcsStagingDir: "Test string",
124
+ partitionDate: {
125
+ day: 42,
126
+ month: 42,
127
+ year: 42,
128
+ },
129
+ projectId: "Test string",
130
+ tableId: "Test string",
131
+ },
132
+ },
133
+ autoLearning: true,
134
+ denylistInputConfig: {
135
+ bigQuerySource: {
136
+ dataSchema: "Test string",
137
+ datasetId: "Test string",
138
+ gcsStagingDir: "Test string",
139
+ partitionDate: {
140
+ day: 42,
141
+ month: 42,
142
+ year: 42,
143
+ },
144
+ projectId: "Test string",
145
+ tableId: "Test string",
146
+ },
147
+ },
148
+ lastAllowlistImportOperation: "Test string",
149
+ lastDenylistImportOperation: "Test string",
150
+ lastSuggestionsImportOperation: "Test string",
151
+ matchingOrder: "Test string",
152
+ maxSuggestions: 42,
153
+ minPrefixLength: 42,
154
+ name: "Test string",
155
+ suggestionsInputConfig: {
156
+ bigQuerySource: {
157
+ dataSchema: "Test string",
158
+ datasetId: "Test string",
159
+ gcsStagingDir: "Test string",
160
+ partitionDate: {
161
+ day: 42,
162
+ month: 42,
163
+ year: 42,
164
+ },
165
+ projectId: "Test string",
166
+ tableId: "Test string",
167
+ },
168
+ },
169
+ });
170
+ /** Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned. */
171
+ await gapi.client.retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute({
172
+ attributesConfig: "Test string",
173
+ }, {
174
+ catalogAttribute: {
175
+ dynamicFacetableOption: "Test string",
176
+ indexableOption: "Test string",
177
+ inUse: true,
178
+ key: "Test string",
179
+ searchableOption: "Test string",
180
+ type: "Test string",
181
+ },
182
+ });
183
+ /** Removes the specified CatalogAttribute from the AttributesConfig. If the CatalogAttribute to remove does not exist, a NOT_FOUND error is returned. */
184
+ await gapi.client.retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute({
185
+ attributesConfig: "Test string",
186
+ }, {
187
+ key: "Test string",
188
+ });
189
+ /** 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. */
190
+ await gapi.client.retail.projects.locations.catalogs.branches.operations.get({
191
+ name: "Test string",
192
+ });
193
+ /**
194
+ * Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If
195
+ * the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the
196
+ * Product queried by ProductService.GetProduct or ProductService.ListProducts. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on
197
+ * Cloud Console before using this feature.
198
+ */
199
+ await gapi.client.retail.projects.locations.catalogs.branches.products.addFulfillmentPlaces({
200
+ product: "Test string",
201
+ }, {
202
+ addTime: "Test string",
203
+ allowMissing: true,
204
+ placeIds: [
205
+ "Test string"
206
+ ],
207
+ type: "Test string",
208
+ });
209
+ /**
210
+ * Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asynchronous and does not
211
+ * require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is
212
+ * returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be modified
213
+ * using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. This feature is only available for users who have Retail Search
214
+ * enabled. Please enable Retail Search on Cloud Console before using this feature.
215
+ */
216
+ await gapi.client.retail.projects.locations.catalogs.branches.products.addLocalInventories({
217
+ product: "Test string",
218
+ }, {
219
+ addMask: "Test string",
220
+ addTime: "Test string",
221
+ allowMissing: true,
222
+ localInventories: [
223
+ {
224
+ attributes: {
225
+ A: {
226
+ indexable: true,
227
+ numbers: [
228
+ 42
229
+ ],
230
+ searchable: true,
231
+ text: [
232
+ "Test string"
233
+ ],
234
+ }
235
+ },
236
+ fulfillmentTypes: [
237
+ "Test string"
238
+ ],
239
+ placeId: "Test string",
240
+ priceInfo: {
241
+ cost: 42,
242
+ currencyCode: "Test string",
243
+ originalPrice: 42,
244
+ price: 42,
245
+ priceEffectiveTime: "Test string",
246
+ priceExpireTime: "Test string",
247
+ priceRange: {
248
+ originalPrice: {
249
+ exclusiveMaximum: 42,
250
+ exclusiveMinimum: 42,
251
+ maximum: 42,
252
+ minimum: 42,
253
+ },
254
+ price: {
255
+ exclusiveMaximum: 42,
256
+ exclusiveMinimum: 42,
257
+ maximum: 42,
258
+ minimum: 42,
259
+ },
260
+ },
261
+ },
262
+ }
263
+ ],
264
+ });
265
+ /** Creates a Product. */
266
+ await gapi.client.retail.projects.locations.catalogs.branches.products.create({
267
+ parent: "Test string",
268
+ productId: "Test string",
269
+ }, {
270
+ attributes: {
271
+ A: {
272
+ indexable: true,
273
+ numbers: [
274
+ 42
275
+ ],
276
+ searchable: true,
277
+ text: [
278
+ "Test string"
279
+ ],
280
+ }
281
+ },
282
+ audience: {
283
+ ageGroups: [
284
+ "Test string"
285
+ ],
286
+ genders: [
287
+ "Test string"
288
+ ],
289
+ },
290
+ availability: "Test string",
291
+ availableQuantity: 42,
292
+ availableTime: "Test string",
293
+ brands: [
294
+ "Test string"
295
+ ],
296
+ categories: [
297
+ "Test string"
298
+ ],
299
+ collectionMemberIds: [
300
+ "Test string"
301
+ ],
302
+ colorInfo: {
303
+ colorFamilies: [
304
+ "Test string"
305
+ ],
306
+ colors: [
307
+ "Test string"
308
+ ],
309
+ },
310
+ conditions: [
311
+ "Test string"
312
+ ],
313
+ description: "Test string",
314
+ expireTime: "Test string",
315
+ fulfillmentInfo: [
316
+ {
317
+ placeIds: [
318
+ "Test string"
319
+ ],
320
+ type: "Test string",
321
+ }
322
+ ],
323
+ gtin: "Test string",
324
+ id: "Test string",
325
+ images: [
326
+ {
327
+ height: 42,
328
+ uri: "Test string",
329
+ width: 42,
330
+ }
331
+ ],
332
+ languageCode: "Test string",
333
+ materials: [
334
+ "Test string"
335
+ ],
336
+ name: "Test string",
337
+ patterns: [
338
+ "Test string"
339
+ ],
340
+ priceInfo: {
341
+ cost: 42,
342
+ currencyCode: "Test string",
343
+ originalPrice: 42,
344
+ price: 42,
345
+ priceEffectiveTime: "Test string",
346
+ priceExpireTime: "Test string",
347
+ priceRange: {
348
+ originalPrice: {
349
+ exclusiveMaximum: 42,
350
+ exclusiveMinimum: 42,
351
+ maximum: 42,
352
+ minimum: 42,
353
+ },
354
+ price: {
355
+ exclusiveMaximum: 42,
356
+ exclusiveMinimum: 42,
357
+ maximum: 42,
358
+ minimum: 42,
359
+ },
360
+ },
361
+ },
362
+ primaryProductId: "Test string",
363
+ promotions: [
364
+ {
365
+ promotionId: "Test string",
366
+ }
367
+ ],
368
+ publishTime: "Test string",
369
+ rating: {
370
+ averageRating: 42,
371
+ ratingCount: 42,
372
+ ratingHistogram: [
373
+ 42
374
+ ],
375
+ },
376
+ retrievableFields: "Test string",
377
+ sizes: [
378
+ "Test string"
379
+ ],
380
+ tags: [
381
+ "Test string"
382
+ ],
383
+ title: "Test string",
384
+ ttl: "Test string",
385
+ type: "Test string",
386
+ uri: "Test string",
387
+ variants: undefined,
388
+ });
389
+ /** Deletes a Product. */
390
+ await gapi.client.retail.projects.locations.catalogs.branches.products.delete({
391
+ name: "Test string",
392
+ });
393
+ /** Gets a Product. */
394
+ await gapi.client.retail.projects.locations.catalogs.branches.products.get({
395
+ name: "Test string",
396
+ });
397
+ /**
398
+ * Bulk import of multiple Products. Request processing may be synchronous. Non-existing items are created. Note that it is possible for a subset of the Products to be successfully
399
+ * updated.
400
+ */
401
+ await gapi.client.retail.projects.locations.catalogs.branches.products.import({
402
+ parent: "Test string",
403
+ }, {
404
+ errorsConfig: {
405
+ gcsPrefix: "Test string",
406
+ },
407
+ inputConfig: {
408
+ bigQuerySource: {
409
+ dataSchema: "Test string",
410
+ datasetId: "Test string",
411
+ gcsStagingDir: "Test string",
412
+ partitionDate: {
413
+ day: 42,
414
+ month: 42,
415
+ year: 42,
416
+ },
417
+ projectId: "Test string",
418
+ tableId: "Test string",
419
+ },
420
+ gcsSource: {
421
+ dataSchema: "Test string",
422
+ inputUris: [
423
+ "Test string"
424
+ ],
425
+ },
426
+ productInlineSource: {
427
+ products: [
428
+ {
429
+ attributes: {
430
+ A: {
431
+ indexable: true,
432
+ numbers: [
433
+ 42
434
+ ],
435
+ searchable: true,
436
+ text: [
437
+ "Test string"
438
+ ],
439
+ }
440
+ },
441
+ audience: {
442
+ ageGroups: [
443
+ "Test string"
444
+ ],
445
+ genders: [
446
+ "Test string"
447
+ ],
448
+ },
449
+ availability: "Test string",
450
+ availableQuantity: 42,
451
+ availableTime: "Test string",
452
+ brands: [
453
+ "Test string"
454
+ ],
455
+ categories: [
456
+ "Test string"
457
+ ],
458
+ collectionMemberIds: [
459
+ "Test string"
460
+ ],
461
+ colorInfo: {
462
+ colorFamilies: [
463
+ "Test string"
464
+ ],
465
+ colors: [
466
+ "Test string"
467
+ ],
468
+ },
469
+ conditions: [
470
+ "Test string"
471
+ ],
472
+ description: "Test string",
473
+ expireTime: "Test string",
474
+ fulfillmentInfo: [
475
+ {
476
+ placeIds: [
477
+ "Test string"
478
+ ],
479
+ type: "Test string",
480
+ }
481
+ ],
482
+ gtin: "Test string",
483
+ id: "Test string",
484
+ images: [
485
+ {
486
+ height: 42,
487
+ uri: "Test string",
488
+ width: 42,
489
+ }
490
+ ],
491
+ languageCode: "Test string",
492
+ materials: [
493
+ "Test string"
494
+ ],
495
+ name: "Test string",
496
+ patterns: [
497
+ "Test string"
498
+ ],
499
+ priceInfo: {
500
+ cost: 42,
501
+ currencyCode: "Test string",
502
+ originalPrice: 42,
503
+ price: 42,
504
+ priceEffectiveTime: "Test string",
505
+ priceExpireTime: "Test string",
506
+ priceRange: {
507
+ originalPrice: {
508
+ exclusiveMaximum: 42,
509
+ exclusiveMinimum: 42,
510
+ maximum: 42,
511
+ minimum: 42,
512
+ },
513
+ price: {
514
+ exclusiveMaximum: 42,
515
+ exclusiveMinimum: 42,
516
+ maximum: 42,
517
+ minimum: 42,
518
+ },
519
+ },
520
+ },
521
+ primaryProductId: "Test string",
522
+ promotions: [
523
+ {
524
+ promotionId: "Test string",
525
+ }
526
+ ],
527
+ publishTime: "Test string",
528
+ rating: {
529
+ averageRating: 42,
530
+ ratingCount: 42,
531
+ ratingHistogram: [
532
+ 42
533
+ ],
534
+ },
535
+ retrievableFields: "Test string",
536
+ sizes: [
537
+ "Test string"
538
+ ],
539
+ tags: [
540
+ "Test string"
541
+ ],
542
+ title: "Test string",
543
+ ttl: "Test string",
544
+ type: "Test string",
545
+ uri: "Test string",
546
+ variants: undefined,
547
+ }
548
+ ],
549
+ },
550
+ },
551
+ notificationPubsubTopic: "Test string",
552
+ reconciliationMode: "Test string",
553
+ requestId: "Test string",
554
+ updateMask: "Test string",
555
+ });
556
+ /** Gets a list of Products. */
557
+ await gapi.client.retail.projects.locations.catalogs.branches.products.list({
558
+ filter: "Test string",
559
+ pageSize: 42,
560
+ pageToken: "Test string",
561
+ parent: "Test string",
562
+ readMask: "Test string",
563
+ });
564
+ /** Updates a Product. */
565
+ await gapi.client.retail.projects.locations.catalogs.branches.products.patch({
566
+ allowMissing: true,
567
+ name: "Test string",
568
+ updateMask: "Test string",
569
+ }, {
570
+ attributes: {
571
+ A: {
572
+ indexable: true,
573
+ numbers: [
574
+ 42
575
+ ],
576
+ searchable: true,
577
+ text: [
578
+ "Test string"
579
+ ],
580
+ }
581
+ },
582
+ audience: {
583
+ ageGroups: [
584
+ "Test string"
585
+ ],
586
+ genders: [
587
+ "Test string"
588
+ ],
589
+ },
590
+ availability: "Test string",
591
+ availableQuantity: 42,
592
+ availableTime: "Test string",
593
+ brands: [
594
+ "Test string"
595
+ ],
596
+ categories: [
597
+ "Test string"
598
+ ],
599
+ collectionMemberIds: [
600
+ "Test string"
601
+ ],
602
+ colorInfo: {
603
+ colorFamilies: [
604
+ "Test string"
605
+ ],
606
+ colors: [
607
+ "Test string"
608
+ ],
609
+ },
610
+ conditions: [
611
+ "Test string"
612
+ ],
613
+ description: "Test string",
614
+ expireTime: "Test string",
615
+ fulfillmentInfo: [
616
+ {
617
+ placeIds: [
618
+ "Test string"
619
+ ],
620
+ type: "Test string",
621
+ }
622
+ ],
623
+ gtin: "Test string",
624
+ id: "Test string",
625
+ images: [
626
+ {
627
+ height: 42,
628
+ uri: "Test string",
629
+ width: 42,
630
+ }
631
+ ],
632
+ languageCode: "Test string",
633
+ materials: [
634
+ "Test string"
635
+ ],
636
+ name: "Test string",
637
+ patterns: [
638
+ "Test string"
639
+ ],
640
+ priceInfo: {
641
+ cost: 42,
642
+ currencyCode: "Test string",
643
+ originalPrice: 42,
644
+ price: 42,
645
+ priceEffectiveTime: "Test string",
646
+ priceExpireTime: "Test string",
647
+ priceRange: {
648
+ originalPrice: {
649
+ exclusiveMaximum: 42,
650
+ exclusiveMinimum: 42,
651
+ maximum: 42,
652
+ minimum: 42,
653
+ },
654
+ price: {
655
+ exclusiveMaximum: 42,
656
+ exclusiveMinimum: 42,
657
+ maximum: 42,
658
+ minimum: 42,
659
+ },
660
+ },
661
+ },
662
+ primaryProductId: "Test string",
663
+ promotions: [
664
+ {
665
+ promotionId: "Test string",
666
+ }
667
+ ],
668
+ publishTime: "Test string",
669
+ rating: {
670
+ averageRating: 42,
671
+ ratingCount: 42,
672
+ ratingHistogram: [
673
+ 42
674
+ ],
675
+ },
676
+ retrievableFields: "Test string",
677
+ sizes: [
678
+ "Test string"
679
+ ],
680
+ tags: [
681
+ "Test string"
682
+ ],
683
+ title: "Test string",
684
+ ttl: "Test string",
685
+ type: "Test string",
686
+ uri: "Test string",
687
+ variants: undefined,
688
+ });
689
+ /**
690
+ * Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment
691
+ * information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately
692
+ * manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. This feature is only available for users who have Retail Search enabled. Please enable
693
+ * Retail Search on Cloud Console before using this feature.
694
+ */
695
+ await gapi.client.retail.projects.locations.catalogs.branches.products.removeFulfillmentPlaces({
696
+ product: "Test string",
697
+ }, {
698
+ allowMissing: true,
699
+ placeIds: [
700
+ "Test string"
701
+ ],
702
+ removeTime: "Test string",
703
+ type: "Test string",
704
+ });
705
+ /**
706
+ * Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and
707
+ * processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or
708
+ * ProductService.ListProducts. Local inventory information can only be removed using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local
709
+ * inventories. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature.
710
+ */
711
+ await gapi.client.retail.projects.locations.catalogs.branches.products.removeLocalInventories({
712
+ product: "Test string",
713
+ }, {
714
+ allowMissing: true,
715
+ placeIds: [
716
+ "Test string"
717
+ ],
718
+ removeTime: "Test string",
719
+ });
720
+ /**
721
+ * Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist
722
+ * before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not
723
+ * immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. When inventory is updated with ProductService.CreateProduct and
724
+ * ProductService.UpdateProduct, the specified inventory field value(s) will overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last
725
+ * update time for the specified inventory fields will be overwritten to the time of the ProductService.CreateProduct or ProductService.UpdateProduct request. If no inventory fields are
726
+ * set in CreateProductRequest.product, then any pre-existing inventory information for this product will be used. If no inventory fields are set in SetInventoryRequest.set_mask, then any
727
+ * existing inventory information will be preserved. Pre-existing inventory information can only be updated with ProductService.SetInventory, ProductService.AddFulfillmentPlaces, and
728
+ * ProductService.RemoveFulfillmentPlaces. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature.
729
+ */
730
+ await gapi.client.retail.projects.locations.catalogs.branches.products.setInventory({
731
+ name: "Test string",
732
+ }, {
733
+ allowMissing: true,
734
+ inventory: {
735
+ attributes: {
736
+ A: {
737
+ indexable: true,
738
+ numbers: [
739
+ 42
740
+ ],
741
+ searchable: true,
742
+ text: [
743
+ "Test string"
744
+ ],
745
+ }
746
+ },
747
+ audience: {
748
+ ageGroups: [
749
+ "Test string"
750
+ ],
751
+ genders: [
752
+ "Test string"
753
+ ],
754
+ },
755
+ availability: "Test string",
756
+ availableQuantity: 42,
757
+ availableTime: "Test string",
758
+ brands: [
759
+ "Test string"
760
+ ],
761
+ categories: [
762
+ "Test string"
763
+ ],
764
+ collectionMemberIds: [
765
+ "Test string"
766
+ ],
767
+ colorInfo: {
768
+ colorFamilies: [
769
+ "Test string"
770
+ ],
771
+ colors: [
772
+ "Test string"
773
+ ],
774
+ },
775
+ conditions: [
776
+ "Test string"
777
+ ],
778
+ description: "Test string",
779
+ expireTime: "Test string",
780
+ fulfillmentInfo: [
781
+ {
782
+ placeIds: [
783
+ "Test string"
784
+ ],
785
+ type: "Test string",
786
+ }
787
+ ],
788
+ gtin: "Test string",
789
+ id: "Test string",
790
+ images: [
791
+ {
792
+ height: 42,
793
+ uri: "Test string",
794
+ width: 42,
795
+ }
796
+ ],
797
+ languageCode: "Test string",
798
+ materials: [
799
+ "Test string"
800
+ ],
801
+ name: "Test string",
802
+ patterns: [
803
+ "Test string"
804
+ ],
805
+ priceInfo: {
806
+ cost: 42,
807
+ currencyCode: "Test string",
808
+ originalPrice: 42,
809
+ price: 42,
810
+ priceEffectiveTime: "Test string",
811
+ priceExpireTime: "Test string",
812
+ priceRange: {
813
+ originalPrice: {
814
+ exclusiveMaximum: 42,
815
+ exclusiveMinimum: 42,
816
+ maximum: 42,
817
+ minimum: 42,
818
+ },
819
+ price: {
820
+ exclusiveMaximum: 42,
821
+ exclusiveMinimum: 42,
822
+ maximum: 42,
823
+ minimum: 42,
824
+ },
825
+ },
826
+ },
827
+ primaryProductId: "Test string",
828
+ promotions: [
829
+ {
830
+ promotionId: "Test string",
831
+ }
832
+ ],
833
+ publishTime: "Test string",
834
+ rating: {
835
+ averageRating: 42,
836
+ ratingCount: 42,
837
+ ratingHistogram: [
838
+ 42
839
+ ],
840
+ },
841
+ retrievableFields: "Test string",
842
+ sizes: [
843
+ "Test string"
844
+ ],
845
+ tags: [
846
+ "Test string"
847
+ ],
848
+ title: "Test string",
849
+ ttl: "Test string",
850
+ type: "Test string",
851
+ uri: "Test string",
852
+ variants: undefined,
853
+ },
854
+ setMask: "Test string",
855
+ setTime: "Test string",
856
+ });
857
+ /**
858
+ * Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported
859
+ * suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please enable Retail Search
860
+ * on Cloud Console before using this feature.
861
+ */
862
+ await gapi.client.retail.projects.locations.catalogs.completionData.import({
863
+ parent: "Test string",
864
+ }, {
865
+ inputConfig: {
866
+ bigQuerySource: {
867
+ dataSchema: "Test string",
868
+ datasetId: "Test string",
869
+ gcsStagingDir: "Test string",
870
+ partitionDate: {
871
+ day: 42,
872
+ month: 42,
873
+ year: 42,
874
+ },
875
+ projectId: "Test string",
876
+ tableId: "Test string",
877
+ },
878
+ },
879
+ notificationPubsubTopic: "Test string",
880
+ });
881
+ /** 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. */
882
+ await gapi.client.retail.projects.locations.catalogs.operations.get({
883
+ name: "Test string",
884
+ });
885
+ /**
886
+ * 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
887
+ * 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
888
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
889
+ * ensure the name binding is the parent resource, without the operations collection id.
890
+ */
891
+ await gapi.client.retail.projects.locations.catalogs.operations.list({
892
+ filter: "Test string",
893
+ name: "Test string",
894
+ pageSize: 42,
895
+ pageToken: "Test string",
896
+ });
897
+ /** Makes a recommendation prediction. */
898
+ await gapi.client.retail.projects.locations.catalogs.placements.predict({
899
+ placement: "Test string",
900
+ }, {
901
+ filter: "Test string",
902
+ labels: {
903
+ A: "Test string"
904
+ },
905
+ pageSize: 42,
906
+ pageToken: "Test string",
907
+ params: {
908
+ A: 42
909
+ },
910
+ userEvent: {
911
+ attributes: {
912
+ A: {
913
+ indexable: true,
914
+ numbers: [
915
+ 42
916
+ ],
917
+ searchable: true,
918
+ text: [
919
+ "Test string"
920
+ ],
921
+ }
922
+ },
923
+ attributionToken: "Test string",
924
+ cartId: "Test string",
925
+ completionDetail: {
926
+ completionAttributionToken: "Test string",
927
+ selectedPosition: 42,
928
+ selectedSuggestion: "Test string",
929
+ },
930
+ eventTime: "Test string",
931
+ eventType: "Test string",
932
+ experimentIds: [
933
+ "Test string"
934
+ ],
935
+ filter: "Test string",
936
+ offset: 42,
937
+ orderBy: "Test string",
938
+ pageCategories: [
939
+ "Test string"
940
+ ],
941
+ pageViewId: "Test string",
942
+ productDetails: [
943
+ {
944
+ product: {
945
+ attributes: {
946
+ A: {
947
+ indexable: true,
948
+ numbers: [
949
+ 42
950
+ ],
951
+ searchable: true,
952
+ text: [
953
+ "Test string"
954
+ ],
955
+ }
956
+ },
957
+ audience: {
958
+ ageGroups: [
959
+ "Test string"
960
+ ],
961
+ genders: [
962
+ "Test string"
963
+ ],
964
+ },
965
+ availability: "Test string",
966
+ availableQuantity: 42,
967
+ availableTime: "Test string",
968
+ brands: [
969
+ "Test string"
970
+ ],
971
+ categories: [
972
+ "Test string"
973
+ ],
974
+ collectionMemberIds: [
975
+ "Test string"
976
+ ],
977
+ colorInfo: {
978
+ colorFamilies: [
979
+ "Test string"
980
+ ],
981
+ colors: [
982
+ "Test string"
983
+ ],
984
+ },
985
+ conditions: [
986
+ "Test string"
987
+ ],
988
+ description: "Test string",
989
+ expireTime: "Test string",
990
+ fulfillmentInfo: [
991
+ {
992
+ placeIds: [
993
+ "Test string"
994
+ ],
995
+ type: "Test string",
996
+ }
997
+ ],
998
+ gtin: "Test string",
999
+ id: "Test string",
1000
+ images: [
1001
+ {
1002
+ height: 42,
1003
+ uri: "Test string",
1004
+ width: 42,
1005
+ }
1006
+ ],
1007
+ languageCode: "Test string",
1008
+ materials: [
1009
+ "Test string"
1010
+ ],
1011
+ name: "Test string",
1012
+ patterns: [
1013
+ "Test string"
1014
+ ],
1015
+ priceInfo: {
1016
+ cost: 42,
1017
+ currencyCode: "Test string",
1018
+ originalPrice: 42,
1019
+ price: 42,
1020
+ priceEffectiveTime: "Test string",
1021
+ priceExpireTime: "Test string",
1022
+ priceRange: {
1023
+ originalPrice: {
1024
+ exclusiveMaximum: 42,
1025
+ exclusiveMinimum: 42,
1026
+ maximum: 42,
1027
+ minimum: 42,
1028
+ },
1029
+ price: {
1030
+ exclusiveMaximum: 42,
1031
+ exclusiveMinimum: 42,
1032
+ maximum: 42,
1033
+ minimum: 42,
1034
+ },
1035
+ },
1036
+ },
1037
+ primaryProductId: "Test string",
1038
+ promotions: [
1039
+ {
1040
+ promotionId: "Test string",
1041
+ }
1042
+ ],
1043
+ publishTime: "Test string",
1044
+ rating: {
1045
+ averageRating: 42,
1046
+ ratingCount: 42,
1047
+ ratingHistogram: [
1048
+ 42
1049
+ ],
1050
+ },
1051
+ retrievableFields: "Test string",
1052
+ sizes: [
1053
+ "Test string"
1054
+ ],
1055
+ tags: [
1056
+ "Test string"
1057
+ ],
1058
+ title: "Test string",
1059
+ ttl: "Test string",
1060
+ type: "Test string",
1061
+ uri: "Test string",
1062
+ variants: undefined,
1063
+ },
1064
+ quantity: 42,
1065
+ }
1066
+ ],
1067
+ purchaseTransaction: {
1068
+ cost: 42,
1069
+ currencyCode: "Test string",
1070
+ id: "Test string",
1071
+ revenue: 42,
1072
+ tax: 42,
1073
+ },
1074
+ referrerUri: "Test string",
1075
+ searchQuery: "Test string",
1076
+ sessionId: "Test string",
1077
+ uri: "Test string",
1078
+ userInfo: {
1079
+ directUserRequest: true,
1080
+ ipAddress: "Test string",
1081
+ userAgent: "Test string",
1082
+ userId: "Test string",
1083
+ },
1084
+ visitorId: "Test string",
1085
+ },
1086
+ validateOnly: true,
1087
+ });
1088
+ /** Performs a search. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature. */
1089
+ await gapi.client.retail.projects.locations.catalogs.placements.search({
1090
+ placement: "Test string",
1091
+ }, {
1092
+ boostSpec: {
1093
+ conditionBoostSpecs: [
1094
+ {
1095
+ boost: 42,
1096
+ condition: "Test string",
1097
+ }
1098
+ ],
1099
+ skipBoostSpecValidation: true,
1100
+ },
1101
+ branch: "Test string",
1102
+ canonicalFilter: "Test string",
1103
+ dynamicFacetSpec: {
1104
+ mode: "Test string",
1105
+ },
1106
+ facetSpecs: [
1107
+ {
1108
+ enableDynamicPosition: true,
1109
+ excludedFilterKeys: [
1110
+ "Test string"
1111
+ ],
1112
+ facetKey: {
1113
+ caseInsensitive: true,
1114
+ contains: [
1115
+ "Test string"
1116
+ ],
1117
+ intervals: [
1118
+ {
1119
+ exclusiveMaximum: 42,
1120
+ exclusiveMinimum: 42,
1121
+ maximum: 42,
1122
+ minimum: 42,
1123
+ }
1124
+ ],
1125
+ key: "Test string",
1126
+ orderBy: "Test string",
1127
+ prefixes: [
1128
+ "Test string"
1129
+ ],
1130
+ query: "Test string",
1131
+ restrictedValues: [
1132
+ "Test string"
1133
+ ],
1134
+ returnMinMax: true,
1135
+ },
1136
+ limit: 42,
1137
+ }
1138
+ ],
1139
+ filter: "Test string",
1140
+ labels: {
1141
+ A: "Test string"
1142
+ },
1143
+ offset: 42,
1144
+ orderBy: "Test string",
1145
+ pageCategories: [
1146
+ "Test string"
1147
+ ],
1148
+ pageSize: 42,
1149
+ pageToken: "Test string",
1150
+ personalizationSpec: {
1151
+ mode: "Test string",
1152
+ },
1153
+ query: "Test string",
1154
+ queryExpansionSpec: {
1155
+ condition: "Test string",
1156
+ pinUnexpandedResults: true,
1157
+ },
1158
+ searchMode: "Test string",
1159
+ spellCorrectionSpec: {
1160
+ mode: "Test string",
1161
+ },
1162
+ userInfo: {
1163
+ directUserRequest: true,
1164
+ ipAddress: "Test string",
1165
+ userAgent: "Test string",
1166
+ userId: "Test string",
1167
+ },
1168
+ variantRollupKeys: [
1169
+ "Test string"
1170
+ ],
1171
+ visitorId: "Test string",
1172
+ });
1173
+ /** Makes a recommendation prediction. */
1174
+ await gapi.client.retail.projects.locations.catalogs.servingConfigs.predict({
1175
+ placement: "Test string",
1176
+ }, {
1177
+ filter: "Test string",
1178
+ labels: {
1179
+ A: "Test string"
1180
+ },
1181
+ pageSize: 42,
1182
+ pageToken: "Test string",
1183
+ params: {
1184
+ A: 42
1185
+ },
1186
+ userEvent: {
1187
+ attributes: {
1188
+ A: {
1189
+ indexable: true,
1190
+ numbers: [
1191
+ 42
1192
+ ],
1193
+ searchable: true,
1194
+ text: [
1195
+ "Test string"
1196
+ ],
1197
+ }
1198
+ },
1199
+ attributionToken: "Test string",
1200
+ cartId: "Test string",
1201
+ completionDetail: {
1202
+ completionAttributionToken: "Test string",
1203
+ selectedPosition: 42,
1204
+ selectedSuggestion: "Test string",
1205
+ },
1206
+ eventTime: "Test string",
1207
+ eventType: "Test string",
1208
+ experimentIds: [
1209
+ "Test string"
1210
+ ],
1211
+ filter: "Test string",
1212
+ offset: 42,
1213
+ orderBy: "Test string",
1214
+ pageCategories: [
1215
+ "Test string"
1216
+ ],
1217
+ pageViewId: "Test string",
1218
+ productDetails: [
1219
+ {
1220
+ product: {
1221
+ attributes: {
1222
+ A: {
1223
+ indexable: true,
1224
+ numbers: [
1225
+ 42
1226
+ ],
1227
+ searchable: true,
1228
+ text: [
1229
+ "Test string"
1230
+ ],
1231
+ }
1232
+ },
1233
+ audience: {
1234
+ ageGroups: [
1235
+ "Test string"
1236
+ ],
1237
+ genders: [
1238
+ "Test string"
1239
+ ],
1240
+ },
1241
+ availability: "Test string",
1242
+ availableQuantity: 42,
1243
+ availableTime: "Test string",
1244
+ brands: [
1245
+ "Test string"
1246
+ ],
1247
+ categories: [
1248
+ "Test string"
1249
+ ],
1250
+ collectionMemberIds: [
1251
+ "Test string"
1252
+ ],
1253
+ colorInfo: {
1254
+ colorFamilies: [
1255
+ "Test string"
1256
+ ],
1257
+ colors: [
1258
+ "Test string"
1259
+ ],
1260
+ },
1261
+ conditions: [
1262
+ "Test string"
1263
+ ],
1264
+ description: "Test string",
1265
+ expireTime: "Test string",
1266
+ fulfillmentInfo: [
1267
+ {
1268
+ placeIds: [
1269
+ "Test string"
1270
+ ],
1271
+ type: "Test string",
1272
+ }
1273
+ ],
1274
+ gtin: "Test string",
1275
+ id: "Test string",
1276
+ images: [
1277
+ {
1278
+ height: 42,
1279
+ uri: "Test string",
1280
+ width: 42,
1281
+ }
1282
+ ],
1283
+ languageCode: "Test string",
1284
+ materials: [
1285
+ "Test string"
1286
+ ],
1287
+ name: "Test string",
1288
+ patterns: [
1289
+ "Test string"
1290
+ ],
1291
+ priceInfo: {
1292
+ cost: 42,
1293
+ currencyCode: "Test string",
1294
+ originalPrice: 42,
1295
+ price: 42,
1296
+ priceEffectiveTime: "Test string",
1297
+ priceExpireTime: "Test string",
1298
+ priceRange: {
1299
+ originalPrice: {
1300
+ exclusiveMaximum: 42,
1301
+ exclusiveMinimum: 42,
1302
+ maximum: 42,
1303
+ minimum: 42,
1304
+ },
1305
+ price: {
1306
+ exclusiveMaximum: 42,
1307
+ exclusiveMinimum: 42,
1308
+ maximum: 42,
1309
+ minimum: 42,
1310
+ },
1311
+ },
1312
+ },
1313
+ primaryProductId: "Test string",
1314
+ promotions: [
1315
+ {
1316
+ promotionId: "Test string",
1317
+ }
1318
+ ],
1319
+ publishTime: "Test string",
1320
+ rating: {
1321
+ averageRating: 42,
1322
+ ratingCount: 42,
1323
+ ratingHistogram: [
1324
+ 42
1325
+ ],
1326
+ },
1327
+ retrievableFields: "Test string",
1328
+ sizes: [
1329
+ "Test string"
1330
+ ],
1331
+ tags: [
1332
+ "Test string"
1333
+ ],
1334
+ title: "Test string",
1335
+ ttl: "Test string",
1336
+ type: "Test string",
1337
+ uri: "Test string",
1338
+ variants: undefined,
1339
+ },
1340
+ quantity: 42,
1341
+ }
1342
+ ],
1343
+ purchaseTransaction: {
1344
+ cost: 42,
1345
+ currencyCode: "Test string",
1346
+ id: "Test string",
1347
+ revenue: 42,
1348
+ tax: 42,
1349
+ },
1350
+ referrerUri: "Test string",
1351
+ searchQuery: "Test string",
1352
+ sessionId: "Test string",
1353
+ uri: "Test string",
1354
+ userInfo: {
1355
+ directUserRequest: true,
1356
+ ipAddress: "Test string",
1357
+ userAgent: "Test string",
1358
+ userId: "Test string",
1359
+ },
1360
+ visitorId: "Test string",
1361
+ },
1362
+ validateOnly: true,
1363
+ });
1364
+ /** Performs a search. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature. */
1365
+ await gapi.client.retail.projects.locations.catalogs.servingConfigs.search({
1366
+ placement: "Test string",
1367
+ }, {
1368
+ boostSpec: {
1369
+ conditionBoostSpecs: [
1370
+ {
1371
+ boost: 42,
1372
+ condition: "Test string",
1373
+ }
1374
+ ],
1375
+ skipBoostSpecValidation: true,
1376
+ },
1377
+ branch: "Test string",
1378
+ canonicalFilter: "Test string",
1379
+ dynamicFacetSpec: {
1380
+ mode: "Test string",
1381
+ },
1382
+ facetSpecs: [
1383
+ {
1384
+ enableDynamicPosition: true,
1385
+ excludedFilterKeys: [
1386
+ "Test string"
1387
+ ],
1388
+ facetKey: {
1389
+ caseInsensitive: true,
1390
+ contains: [
1391
+ "Test string"
1392
+ ],
1393
+ intervals: [
1394
+ {
1395
+ exclusiveMaximum: 42,
1396
+ exclusiveMinimum: 42,
1397
+ maximum: 42,
1398
+ minimum: 42,
1399
+ }
1400
+ ],
1401
+ key: "Test string",
1402
+ orderBy: "Test string",
1403
+ prefixes: [
1404
+ "Test string"
1405
+ ],
1406
+ query: "Test string",
1407
+ restrictedValues: [
1408
+ "Test string"
1409
+ ],
1410
+ returnMinMax: true,
1411
+ },
1412
+ limit: 42,
1413
+ }
1414
+ ],
1415
+ filter: "Test string",
1416
+ labels: {
1417
+ A: "Test string"
1418
+ },
1419
+ offset: 42,
1420
+ orderBy: "Test string",
1421
+ pageCategories: [
1422
+ "Test string"
1423
+ ],
1424
+ pageSize: 42,
1425
+ pageToken: "Test string",
1426
+ personalizationSpec: {
1427
+ mode: "Test string",
1428
+ },
1429
+ query: "Test string",
1430
+ queryExpansionSpec: {
1431
+ condition: "Test string",
1432
+ pinUnexpandedResults: true,
1433
+ },
1434
+ searchMode: "Test string",
1435
+ spellCorrectionSpec: {
1436
+ mode: "Test string",
1437
+ },
1438
+ userInfo: {
1439
+ directUserRequest: true,
1440
+ ipAddress: "Test string",
1441
+ userAgent: "Test string",
1442
+ userId: "Test string",
1443
+ },
1444
+ variantRollupKeys: [
1445
+ "Test string"
1446
+ ],
1447
+ visitorId: "Test string",
1448
+ });
1449
+ /**
1450
+ * Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API
1451
+ * JavaScript pixel and Google Tag Manager. Users should not call this method directly.
1452
+ */
1453
+ await gapi.client.retail.projects.locations.catalogs.userEvents.collect({
1454
+ ets: "Test string",
1455
+ parent: "Test string",
1456
+ uri: "Test string",
1457
+ userEvent: "Test string",
1458
+ });
1459
+ /**
1460
+ * Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is
1461
+ * of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.
1462
+ */
1463
+ await gapi.client.retail.projects.locations.catalogs.userEvents.import({
1464
+ parent: "Test string",
1465
+ }, {
1466
+ errorsConfig: {
1467
+ gcsPrefix: "Test string",
1468
+ },
1469
+ inputConfig: {
1470
+ bigQuerySource: {
1471
+ dataSchema: "Test string",
1472
+ datasetId: "Test string",
1473
+ gcsStagingDir: "Test string",
1474
+ partitionDate: {
1475
+ day: 42,
1476
+ month: 42,
1477
+ year: 42,
1478
+ },
1479
+ projectId: "Test string",
1480
+ tableId: "Test string",
1481
+ },
1482
+ gcsSource: {
1483
+ dataSchema: "Test string",
1484
+ inputUris: [
1485
+ "Test string"
1486
+ ],
1487
+ },
1488
+ userEventInlineSource: {
1489
+ userEvents: [
1490
+ {
1491
+ attributes: {
1492
+ A: {
1493
+ indexable: true,
1494
+ numbers: [
1495
+ 42
1496
+ ],
1497
+ searchable: true,
1498
+ text: [
1499
+ "Test string"
1500
+ ],
1501
+ }
1502
+ },
1503
+ attributionToken: "Test string",
1504
+ cartId: "Test string",
1505
+ completionDetail: {
1506
+ completionAttributionToken: "Test string",
1507
+ selectedPosition: 42,
1508
+ selectedSuggestion: "Test string",
1509
+ },
1510
+ eventTime: "Test string",
1511
+ eventType: "Test string",
1512
+ experimentIds: [
1513
+ "Test string"
1514
+ ],
1515
+ filter: "Test string",
1516
+ offset: 42,
1517
+ orderBy: "Test string",
1518
+ pageCategories: [
1519
+ "Test string"
1520
+ ],
1521
+ pageViewId: "Test string",
1522
+ productDetails: [
1523
+ {
1524
+ product: {
1525
+ attributes: {
1526
+ A: {
1527
+ indexable: true,
1528
+ numbers: [
1529
+ 42
1530
+ ],
1531
+ searchable: true,
1532
+ text: [
1533
+ "Test string"
1534
+ ],
1535
+ }
1536
+ },
1537
+ audience: {
1538
+ ageGroups: [
1539
+ "Test string"
1540
+ ],
1541
+ genders: [
1542
+ "Test string"
1543
+ ],
1544
+ },
1545
+ availability: "Test string",
1546
+ availableQuantity: 42,
1547
+ availableTime: "Test string",
1548
+ brands: [
1549
+ "Test string"
1550
+ ],
1551
+ categories: [
1552
+ "Test string"
1553
+ ],
1554
+ collectionMemberIds: [
1555
+ "Test string"
1556
+ ],
1557
+ colorInfo: {
1558
+ colorFamilies: [
1559
+ "Test string"
1560
+ ],
1561
+ colors: [
1562
+ "Test string"
1563
+ ],
1564
+ },
1565
+ conditions: [
1566
+ "Test string"
1567
+ ],
1568
+ description: "Test string",
1569
+ expireTime: "Test string",
1570
+ fulfillmentInfo: [
1571
+ {
1572
+ placeIds: [
1573
+ "Test string"
1574
+ ],
1575
+ type: "Test string",
1576
+ }
1577
+ ],
1578
+ gtin: "Test string",
1579
+ id: "Test string",
1580
+ images: [
1581
+ {
1582
+ height: 42,
1583
+ uri: "Test string",
1584
+ width: 42,
1585
+ }
1586
+ ],
1587
+ languageCode: "Test string",
1588
+ materials: [
1589
+ "Test string"
1590
+ ],
1591
+ name: "Test string",
1592
+ patterns: [
1593
+ "Test string"
1594
+ ],
1595
+ priceInfo: {
1596
+ cost: 42,
1597
+ currencyCode: "Test string",
1598
+ originalPrice: 42,
1599
+ price: 42,
1600
+ priceEffectiveTime: "Test string",
1601
+ priceExpireTime: "Test string",
1602
+ priceRange: {
1603
+ originalPrice: {
1604
+ exclusiveMaximum: 42,
1605
+ exclusiveMinimum: 42,
1606
+ maximum: 42,
1607
+ minimum: 42,
1608
+ },
1609
+ price: {
1610
+ exclusiveMaximum: 42,
1611
+ exclusiveMinimum: 42,
1612
+ maximum: 42,
1613
+ minimum: 42,
1614
+ },
1615
+ },
1616
+ },
1617
+ primaryProductId: "Test string",
1618
+ promotions: [
1619
+ {
1620
+ promotionId: "Test string",
1621
+ }
1622
+ ],
1623
+ publishTime: "Test string",
1624
+ rating: {
1625
+ averageRating: 42,
1626
+ ratingCount: 42,
1627
+ ratingHistogram: [
1628
+ 42
1629
+ ],
1630
+ },
1631
+ retrievableFields: "Test string",
1632
+ sizes: [
1633
+ "Test string"
1634
+ ],
1635
+ tags: [
1636
+ "Test string"
1637
+ ],
1638
+ title: "Test string",
1639
+ ttl: "Test string",
1640
+ type: "Test string",
1641
+ uri: "Test string",
1642
+ variants: undefined,
1643
+ },
1644
+ quantity: 42,
1645
+ }
1646
+ ],
1647
+ purchaseTransaction: {
1648
+ cost: 42,
1649
+ currencyCode: "Test string",
1650
+ id: "Test string",
1651
+ revenue: 42,
1652
+ tax: 42,
1653
+ },
1654
+ referrerUri: "Test string",
1655
+ searchQuery: "Test string",
1656
+ sessionId: "Test string",
1657
+ uri: "Test string",
1658
+ userInfo: {
1659
+ directUserRequest: true,
1660
+ ipAddress: "Test string",
1661
+ userAgent: "Test string",
1662
+ userId: "Test string",
1663
+ },
1664
+ visitorId: "Test string",
1665
+ }
1666
+ ],
1667
+ },
1668
+ },
1669
+ });
1670
+ /**
1671
+ * Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To
1672
+ * test a filter, use the list command first.
1673
+ */
1674
+ await gapi.client.retail.projects.locations.catalogs.userEvents.purge({
1675
+ parent: "Test string",
1676
+ }, {
1677
+ filter: "Test string",
1678
+ force: true,
1679
+ });
1680
+ /**
1681
+ * Starts a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the
1682
+ * user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This method can be used to start a join operation on specified
1683
+ * events with latest version of product catalog. It can also be used to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.
1684
+ */
1685
+ await gapi.client.retail.projects.locations.catalogs.userEvents.rejoin({
1686
+ parent: "Test string",
1687
+ }, {
1688
+ userEventRejoinScope: "Test string",
1689
+ });
1690
+ /** Writes a single user event. */
1691
+ await gapi.client.retail.projects.locations.catalogs.userEvents.write({
1692
+ parent: "Test string",
1693
+ }, {
1694
+ attributes: {
1695
+ A: {
1696
+ indexable: true,
1697
+ numbers: [
1698
+ 42
1699
+ ],
1700
+ searchable: true,
1701
+ text: [
1702
+ "Test string"
1703
+ ],
1704
+ }
1705
+ },
1706
+ attributionToken: "Test string",
1707
+ cartId: "Test string",
1708
+ completionDetail: {
1709
+ completionAttributionToken: "Test string",
1710
+ selectedPosition: 42,
1711
+ selectedSuggestion: "Test string",
1712
+ },
1713
+ eventTime: "Test string",
1714
+ eventType: "Test string",
1715
+ experimentIds: [
1716
+ "Test string"
1717
+ ],
1718
+ filter: "Test string",
1719
+ offset: 42,
1720
+ orderBy: "Test string",
1721
+ pageCategories: [
1722
+ "Test string"
1723
+ ],
1724
+ pageViewId: "Test string",
1725
+ productDetails: [
1726
+ {
1727
+ product: {
1728
+ attributes: {
1729
+ A: {
1730
+ indexable: true,
1731
+ numbers: [
1732
+ 42
1733
+ ],
1734
+ searchable: true,
1735
+ text: [
1736
+ "Test string"
1737
+ ],
1738
+ }
1739
+ },
1740
+ audience: {
1741
+ ageGroups: [
1742
+ "Test string"
1743
+ ],
1744
+ genders: [
1745
+ "Test string"
1746
+ ],
1747
+ },
1748
+ availability: "Test string",
1749
+ availableQuantity: 42,
1750
+ availableTime: "Test string",
1751
+ brands: [
1752
+ "Test string"
1753
+ ],
1754
+ categories: [
1755
+ "Test string"
1756
+ ],
1757
+ collectionMemberIds: [
1758
+ "Test string"
1759
+ ],
1760
+ colorInfo: {
1761
+ colorFamilies: [
1762
+ "Test string"
1763
+ ],
1764
+ colors: [
1765
+ "Test string"
1766
+ ],
1767
+ },
1768
+ conditions: [
1769
+ "Test string"
1770
+ ],
1771
+ description: "Test string",
1772
+ expireTime: "Test string",
1773
+ fulfillmentInfo: [
1774
+ {
1775
+ placeIds: [
1776
+ "Test string"
1777
+ ],
1778
+ type: "Test string",
1779
+ }
1780
+ ],
1781
+ gtin: "Test string",
1782
+ id: "Test string",
1783
+ images: [
1784
+ {
1785
+ height: 42,
1786
+ uri: "Test string",
1787
+ width: 42,
1788
+ }
1789
+ ],
1790
+ languageCode: "Test string",
1791
+ materials: [
1792
+ "Test string"
1793
+ ],
1794
+ name: "Test string",
1795
+ patterns: [
1796
+ "Test string"
1797
+ ],
1798
+ priceInfo: {
1799
+ cost: 42,
1800
+ currencyCode: "Test string",
1801
+ originalPrice: 42,
1802
+ price: 42,
1803
+ priceEffectiveTime: "Test string",
1804
+ priceExpireTime: "Test string",
1805
+ priceRange: {
1806
+ originalPrice: {
1807
+ exclusiveMaximum: 42,
1808
+ exclusiveMinimum: 42,
1809
+ maximum: 42,
1810
+ minimum: 42,
1811
+ },
1812
+ price: {
1813
+ exclusiveMaximum: 42,
1814
+ exclusiveMinimum: 42,
1815
+ maximum: 42,
1816
+ minimum: 42,
1817
+ },
1818
+ },
1819
+ },
1820
+ primaryProductId: "Test string",
1821
+ promotions: [
1822
+ {
1823
+ promotionId: "Test string",
1824
+ }
1825
+ ],
1826
+ publishTime: "Test string",
1827
+ rating: {
1828
+ averageRating: 42,
1829
+ ratingCount: 42,
1830
+ ratingHistogram: [
1831
+ 42
1832
+ ],
1833
+ },
1834
+ retrievableFields: "Test string",
1835
+ sizes: [
1836
+ "Test string"
1837
+ ],
1838
+ tags: [
1839
+ "Test string"
1840
+ ],
1841
+ title: "Test string",
1842
+ ttl: "Test string",
1843
+ type: "Test string",
1844
+ uri: "Test string",
1845
+ variants: undefined,
1846
+ },
1847
+ quantity: 42,
1848
+ }
1849
+ ],
1850
+ purchaseTransaction: {
1851
+ cost: 42,
1852
+ currencyCode: "Test string",
1853
+ id: "Test string",
1854
+ revenue: 42,
1855
+ tax: 42,
1856
+ },
1857
+ referrerUri: "Test string",
1858
+ searchQuery: "Test string",
1859
+ sessionId: "Test string",
1860
+ uri: "Test string",
1861
+ userInfo: {
1862
+ directUserRequest: true,
1863
+ ipAddress: "Test string",
1864
+ userAgent: "Test string",
1865
+ userId: "Test string",
1866
+ },
1867
+ visitorId: "Test string",
1868
+ });
1869
+ /** 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. */
1870
+ await gapi.client.retail.projects.locations.operations.get({
1871
+ name: "Test string",
1872
+ });
1873
+ /**
1874
+ * 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
1875
+ * 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
1876
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
1877
+ * ensure the name binding is the parent resource, without the operations collection id.
1878
+ */
1879
+ await gapi.client.retail.projects.locations.operations.list({
1880
+ filter: "Test string",
1881
+ name: "Test string",
1882
+ pageSize: 42,
1883
+ pageToken: "Test string",
1884
+ });
1885
+ /** 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. */
1886
+ await gapi.client.retail.projects.operations.get({
1887
+ name: "Test string",
1888
+ });
1889
+ /**
1890
+ * 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
1891
+ * 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
1892
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
1893
+ * ensure the name binding is the parent resource, without the operations collection id.
1894
+ */
1895
+ await gapi.client.retail.projects.operations.list({
1896
+ filter: "Test string",
1897
+ name: "Test string",
1898
+ pageSize: 42,
1899
+ pageToken: "Test string",
1900
+ });
1901
+ }
1902
+ });