@maxim_mazurok/gapi.client.recommendationengine-v1beta1 0.0.20220804
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/index.d.ts +1658 -0
- package/package.json +20 -0
- package/readme.md +68 -0
- package/tests.ts +833 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/tests.ts
ADDED
|
@@ -0,0 +1,833 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.recommendationengine-v1beta1 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: 20220804
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://recommendationengine.googleapis.com/$discovery/rest?version=v1beta1');
|
|
12
|
+
/** now we can use gapi.client.recommendationengine */
|
|
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
|
+
/** Lists all the catalog configurations associated with the project. */
|
|
33
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.list({
|
|
34
|
+
pageSize: 42,
|
|
35
|
+
pageToken: "Test string",
|
|
36
|
+
parent: "Test string",
|
|
37
|
+
});
|
|
38
|
+
/** Updates the catalog configuration. */
|
|
39
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.patch({
|
|
40
|
+
name: "Test string",
|
|
41
|
+
updateMask: "Test string",
|
|
42
|
+
}, {
|
|
43
|
+
catalogItemLevelConfig: {
|
|
44
|
+
eventItemLevel: "Test string",
|
|
45
|
+
predictItemLevel: "Test string",
|
|
46
|
+
},
|
|
47
|
+
defaultEventStoreId: "Test string",
|
|
48
|
+
displayName: "Test string",
|
|
49
|
+
name: "Test string",
|
|
50
|
+
});
|
|
51
|
+
/** Creates a catalog item. */
|
|
52
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.catalogItems.create({
|
|
53
|
+
parent: "Test string",
|
|
54
|
+
}, {
|
|
55
|
+
categoryHierarchies: [
|
|
56
|
+
{
|
|
57
|
+
categories: [
|
|
58
|
+
"Test string"
|
|
59
|
+
],
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
description: "Test string",
|
|
63
|
+
id: "Test string",
|
|
64
|
+
itemAttributes: {
|
|
65
|
+
categoricalFeatures: {
|
|
66
|
+
A: {
|
|
67
|
+
value: [
|
|
68
|
+
"Test string"
|
|
69
|
+
],
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
numericalFeatures: {
|
|
73
|
+
A: {
|
|
74
|
+
value: [
|
|
75
|
+
42
|
|
76
|
+
],
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
itemGroupId: "Test string",
|
|
81
|
+
languageCode: "Test string",
|
|
82
|
+
productMetadata: {
|
|
83
|
+
availableQuantity: "Test string",
|
|
84
|
+
canonicalProductUri: "Test string",
|
|
85
|
+
costs: {
|
|
86
|
+
A: 42
|
|
87
|
+
},
|
|
88
|
+
currencyCode: "Test string",
|
|
89
|
+
exactPrice: {
|
|
90
|
+
displayPrice: 42,
|
|
91
|
+
originalPrice: 42,
|
|
92
|
+
},
|
|
93
|
+
images: [
|
|
94
|
+
{
|
|
95
|
+
height: 42,
|
|
96
|
+
uri: "Test string",
|
|
97
|
+
width: 42,
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
priceRange: {
|
|
101
|
+
max: 42,
|
|
102
|
+
min: 42,
|
|
103
|
+
},
|
|
104
|
+
stockState: "Test string",
|
|
105
|
+
},
|
|
106
|
+
tags: [
|
|
107
|
+
"Test string"
|
|
108
|
+
],
|
|
109
|
+
title: "Test string",
|
|
110
|
+
});
|
|
111
|
+
/** Deletes a catalog item. */
|
|
112
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.catalogItems.delete({
|
|
113
|
+
name: "Test string",
|
|
114
|
+
});
|
|
115
|
+
/** Gets a specific catalog item. */
|
|
116
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.catalogItems.get({
|
|
117
|
+
name: "Test string",
|
|
118
|
+
});
|
|
119
|
+
/**
|
|
120
|
+
* Bulk import of multiple catalog items. Request processing may be synchronous. No partial updating supported. Non-existing items will be created. Operation.response is of type
|
|
121
|
+
* ImportResponse. Note that it is possible for a subset of the items to be successfully updated.
|
|
122
|
+
*/
|
|
123
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.catalogItems.import({
|
|
124
|
+
parent: "Test string",
|
|
125
|
+
}, {
|
|
126
|
+
errorsConfig: {
|
|
127
|
+
gcsPrefix: "Test string",
|
|
128
|
+
},
|
|
129
|
+
inputConfig: {
|
|
130
|
+
bigQuerySource: {
|
|
131
|
+
dataSchema: "Test string",
|
|
132
|
+
datasetId: "Test string",
|
|
133
|
+
gcsStagingDir: "Test string",
|
|
134
|
+
projectId: "Test string",
|
|
135
|
+
tableId: "Test string",
|
|
136
|
+
},
|
|
137
|
+
catalogInlineSource: {
|
|
138
|
+
catalogItems: [
|
|
139
|
+
{
|
|
140
|
+
categoryHierarchies: [
|
|
141
|
+
{
|
|
142
|
+
categories: [
|
|
143
|
+
"Test string"
|
|
144
|
+
],
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
description: "Test string",
|
|
148
|
+
id: "Test string",
|
|
149
|
+
itemAttributes: {
|
|
150
|
+
categoricalFeatures: {
|
|
151
|
+
A: {
|
|
152
|
+
value: [
|
|
153
|
+
"Test string"
|
|
154
|
+
],
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
numericalFeatures: {
|
|
158
|
+
A: {
|
|
159
|
+
value: [
|
|
160
|
+
42
|
|
161
|
+
],
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
itemGroupId: "Test string",
|
|
166
|
+
languageCode: "Test string",
|
|
167
|
+
productMetadata: {
|
|
168
|
+
availableQuantity: "Test string",
|
|
169
|
+
canonicalProductUri: "Test string",
|
|
170
|
+
costs: {
|
|
171
|
+
A: 42
|
|
172
|
+
},
|
|
173
|
+
currencyCode: "Test string",
|
|
174
|
+
exactPrice: {
|
|
175
|
+
displayPrice: 42,
|
|
176
|
+
originalPrice: 42,
|
|
177
|
+
},
|
|
178
|
+
images: [
|
|
179
|
+
{
|
|
180
|
+
height: 42,
|
|
181
|
+
uri: "Test string",
|
|
182
|
+
width: 42,
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
priceRange: {
|
|
186
|
+
max: 42,
|
|
187
|
+
min: 42,
|
|
188
|
+
},
|
|
189
|
+
stockState: "Test string",
|
|
190
|
+
},
|
|
191
|
+
tags: [
|
|
192
|
+
"Test string"
|
|
193
|
+
],
|
|
194
|
+
title: "Test string",
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
gcsSource: {
|
|
199
|
+
inputUris: [
|
|
200
|
+
"Test string"
|
|
201
|
+
],
|
|
202
|
+
jsonSchema: "Test string",
|
|
203
|
+
},
|
|
204
|
+
userEventInlineSource: {
|
|
205
|
+
userEvents: [
|
|
206
|
+
{
|
|
207
|
+
eventDetail: {
|
|
208
|
+
eventAttributes: {
|
|
209
|
+
categoricalFeatures: {
|
|
210
|
+
A: {
|
|
211
|
+
value: [
|
|
212
|
+
"Test string"
|
|
213
|
+
],
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
numericalFeatures: {
|
|
217
|
+
A: {
|
|
218
|
+
value: [
|
|
219
|
+
42
|
|
220
|
+
],
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
experimentIds: [
|
|
225
|
+
"Test string"
|
|
226
|
+
],
|
|
227
|
+
pageViewId: "Test string",
|
|
228
|
+
recommendationToken: "Test string",
|
|
229
|
+
referrerUri: "Test string",
|
|
230
|
+
uri: "Test string",
|
|
231
|
+
},
|
|
232
|
+
eventSource: "Test string",
|
|
233
|
+
eventTime: "Test string",
|
|
234
|
+
eventType: "Test string",
|
|
235
|
+
productEventDetail: {
|
|
236
|
+
cartId: "Test string",
|
|
237
|
+
listId: "Test string",
|
|
238
|
+
pageCategories: [
|
|
239
|
+
{
|
|
240
|
+
categories: [
|
|
241
|
+
"Test string"
|
|
242
|
+
],
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
productDetails: [
|
|
246
|
+
{
|
|
247
|
+
availableQuantity: 42,
|
|
248
|
+
currencyCode: "Test string",
|
|
249
|
+
displayPrice: 42,
|
|
250
|
+
id: "Test string",
|
|
251
|
+
itemAttributes: {
|
|
252
|
+
categoricalFeatures: {
|
|
253
|
+
A: {
|
|
254
|
+
value: [
|
|
255
|
+
"Test string"
|
|
256
|
+
],
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
numericalFeatures: {
|
|
260
|
+
A: {
|
|
261
|
+
value: [
|
|
262
|
+
42
|
|
263
|
+
],
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
originalPrice: 42,
|
|
268
|
+
quantity: 42,
|
|
269
|
+
stockState: "Test string",
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
purchaseTransaction: {
|
|
273
|
+
costs: {
|
|
274
|
+
A: 42
|
|
275
|
+
},
|
|
276
|
+
currencyCode: "Test string",
|
|
277
|
+
id: "Test string",
|
|
278
|
+
revenue: 42,
|
|
279
|
+
taxes: {
|
|
280
|
+
A: 42
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
searchQuery: "Test string",
|
|
284
|
+
},
|
|
285
|
+
userInfo: {
|
|
286
|
+
directUserRequest: true,
|
|
287
|
+
ipAddress: "Test string",
|
|
288
|
+
userAgent: "Test string",
|
|
289
|
+
userId: "Test string",
|
|
290
|
+
visitorId: "Test string",
|
|
291
|
+
},
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
requestId: "Test string",
|
|
297
|
+
updateMask: "Test string",
|
|
298
|
+
});
|
|
299
|
+
/** Gets a list of catalog items. */
|
|
300
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.catalogItems.list({
|
|
301
|
+
filter: "Test string",
|
|
302
|
+
pageSize: 42,
|
|
303
|
+
pageToken: "Test string",
|
|
304
|
+
parent: "Test string",
|
|
305
|
+
});
|
|
306
|
+
/** Updates a catalog item. Partial updating is supported. Non-existing items will be created. */
|
|
307
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.catalogItems.patch({
|
|
308
|
+
name: "Test string",
|
|
309
|
+
updateMask: "Test string",
|
|
310
|
+
}, {
|
|
311
|
+
categoryHierarchies: [
|
|
312
|
+
{
|
|
313
|
+
categories: [
|
|
314
|
+
"Test string"
|
|
315
|
+
],
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
description: "Test string",
|
|
319
|
+
id: "Test string",
|
|
320
|
+
itemAttributes: {
|
|
321
|
+
categoricalFeatures: {
|
|
322
|
+
A: {
|
|
323
|
+
value: [
|
|
324
|
+
"Test string"
|
|
325
|
+
],
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
numericalFeatures: {
|
|
329
|
+
A: {
|
|
330
|
+
value: [
|
|
331
|
+
42
|
|
332
|
+
],
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
itemGroupId: "Test string",
|
|
337
|
+
languageCode: "Test string",
|
|
338
|
+
productMetadata: {
|
|
339
|
+
availableQuantity: "Test string",
|
|
340
|
+
canonicalProductUri: "Test string",
|
|
341
|
+
costs: {
|
|
342
|
+
A: 42
|
|
343
|
+
},
|
|
344
|
+
currencyCode: "Test string",
|
|
345
|
+
exactPrice: {
|
|
346
|
+
displayPrice: 42,
|
|
347
|
+
originalPrice: 42,
|
|
348
|
+
},
|
|
349
|
+
images: [
|
|
350
|
+
{
|
|
351
|
+
height: 42,
|
|
352
|
+
uri: "Test string",
|
|
353
|
+
width: 42,
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
priceRange: {
|
|
357
|
+
max: 42,
|
|
358
|
+
min: 42,
|
|
359
|
+
},
|
|
360
|
+
stockState: "Test string",
|
|
361
|
+
},
|
|
362
|
+
tags: [
|
|
363
|
+
"Test string"
|
|
364
|
+
],
|
|
365
|
+
title: "Test string",
|
|
366
|
+
});
|
|
367
|
+
/** 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. */
|
|
368
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.operations.get({
|
|
369
|
+
name: "Test string",
|
|
370
|
+
});
|
|
371
|
+
/**
|
|
372
|
+
* 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
|
|
373
|
+
* 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
|
|
374
|
+
* `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
|
|
375
|
+
* ensure the name binding is the parent resource, without the operations collection id.
|
|
376
|
+
*/
|
|
377
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.operations.list({
|
|
378
|
+
filter: "Test string",
|
|
379
|
+
name: "Test string",
|
|
380
|
+
pageSize: 42,
|
|
381
|
+
pageToken: "Test string",
|
|
382
|
+
});
|
|
383
|
+
/**
|
|
384
|
+
* Makes a recommendation prediction. If using API Key based authentication, the API Key must be registered using the PredictionApiKeyRegistry service. [Learn
|
|
385
|
+
* more](https://cloud.google.com/recommendations-ai/docs/setting-up#register-key).
|
|
386
|
+
*/
|
|
387
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.placements.predict({
|
|
388
|
+
name: "Test string",
|
|
389
|
+
}, {
|
|
390
|
+
dryRun: true,
|
|
391
|
+
filter: "Test string",
|
|
392
|
+
labels: {
|
|
393
|
+
A: "Test string"
|
|
394
|
+
},
|
|
395
|
+
pageSize: 42,
|
|
396
|
+
pageToken: "Test string",
|
|
397
|
+
params: {
|
|
398
|
+
A: 42
|
|
399
|
+
},
|
|
400
|
+
userEvent: {
|
|
401
|
+
eventDetail: {
|
|
402
|
+
eventAttributes: {
|
|
403
|
+
categoricalFeatures: {
|
|
404
|
+
A: {
|
|
405
|
+
value: [
|
|
406
|
+
"Test string"
|
|
407
|
+
],
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
numericalFeatures: {
|
|
411
|
+
A: {
|
|
412
|
+
value: [
|
|
413
|
+
42
|
|
414
|
+
],
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
},
|
|
418
|
+
experimentIds: [
|
|
419
|
+
"Test string"
|
|
420
|
+
],
|
|
421
|
+
pageViewId: "Test string",
|
|
422
|
+
recommendationToken: "Test string",
|
|
423
|
+
referrerUri: "Test string",
|
|
424
|
+
uri: "Test string",
|
|
425
|
+
},
|
|
426
|
+
eventSource: "Test string",
|
|
427
|
+
eventTime: "Test string",
|
|
428
|
+
eventType: "Test string",
|
|
429
|
+
productEventDetail: {
|
|
430
|
+
cartId: "Test string",
|
|
431
|
+
listId: "Test string",
|
|
432
|
+
pageCategories: [
|
|
433
|
+
{
|
|
434
|
+
categories: [
|
|
435
|
+
"Test string"
|
|
436
|
+
],
|
|
437
|
+
}
|
|
438
|
+
],
|
|
439
|
+
productDetails: [
|
|
440
|
+
{
|
|
441
|
+
availableQuantity: 42,
|
|
442
|
+
currencyCode: "Test string",
|
|
443
|
+
displayPrice: 42,
|
|
444
|
+
id: "Test string",
|
|
445
|
+
itemAttributes: {
|
|
446
|
+
categoricalFeatures: {
|
|
447
|
+
A: {
|
|
448
|
+
value: [
|
|
449
|
+
"Test string"
|
|
450
|
+
],
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
numericalFeatures: {
|
|
454
|
+
A: {
|
|
455
|
+
value: [
|
|
456
|
+
42
|
|
457
|
+
],
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
originalPrice: 42,
|
|
462
|
+
quantity: 42,
|
|
463
|
+
stockState: "Test string",
|
|
464
|
+
}
|
|
465
|
+
],
|
|
466
|
+
purchaseTransaction: {
|
|
467
|
+
costs: {
|
|
468
|
+
A: 42
|
|
469
|
+
},
|
|
470
|
+
currencyCode: "Test string",
|
|
471
|
+
id: "Test string",
|
|
472
|
+
revenue: 42,
|
|
473
|
+
taxes: {
|
|
474
|
+
A: 42
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
searchQuery: "Test string",
|
|
478
|
+
},
|
|
479
|
+
userInfo: {
|
|
480
|
+
directUserRequest: true,
|
|
481
|
+
ipAddress: "Test string",
|
|
482
|
+
userAgent: "Test string",
|
|
483
|
+
userId: "Test string",
|
|
484
|
+
visitorId: "Test string",
|
|
485
|
+
},
|
|
486
|
+
},
|
|
487
|
+
});
|
|
488
|
+
/** Register an API key for use with predict method. */
|
|
489
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.create({
|
|
490
|
+
parent: "Test string",
|
|
491
|
+
}, {
|
|
492
|
+
predictionApiKeyRegistration: {
|
|
493
|
+
apiKey: "Test string",
|
|
494
|
+
},
|
|
495
|
+
});
|
|
496
|
+
/** Unregister an apiKey from using for predict method. */
|
|
497
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.delete({
|
|
498
|
+
name: "Test string",
|
|
499
|
+
});
|
|
500
|
+
/** List the registered apiKeys for use with predict method. */
|
|
501
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.list({
|
|
502
|
+
pageSize: 42,
|
|
503
|
+
pageToken: "Test string",
|
|
504
|
+
parent: "Test string",
|
|
505
|
+
});
|
|
506
|
+
/**
|
|
507
|
+
* 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 Recommendations AI
|
|
508
|
+
* JavaScript pixel. Users should not call this method directly.
|
|
509
|
+
*/
|
|
510
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.userEvents.collect({
|
|
511
|
+
ets: "Test string",
|
|
512
|
+
parent: "Test string",
|
|
513
|
+
uri: "Test string",
|
|
514
|
+
userEvent: "Test string",
|
|
515
|
+
});
|
|
516
|
+
/**
|
|
517
|
+
* 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
|
|
518
|
+
* of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.
|
|
519
|
+
*/
|
|
520
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.userEvents.import({
|
|
521
|
+
parent: "Test string",
|
|
522
|
+
}, {
|
|
523
|
+
errorsConfig: {
|
|
524
|
+
gcsPrefix: "Test string",
|
|
525
|
+
},
|
|
526
|
+
inputConfig: {
|
|
527
|
+
bigQuerySource: {
|
|
528
|
+
dataSchema: "Test string",
|
|
529
|
+
datasetId: "Test string",
|
|
530
|
+
gcsStagingDir: "Test string",
|
|
531
|
+
projectId: "Test string",
|
|
532
|
+
tableId: "Test string",
|
|
533
|
+
},
|
|
534
|
+
catalogInlineSource: {
|
|
535
|
+
catalogItems: [
|
|
536
|
+
{
|
|
537
|
+
categoryHierarchies: [
|
|
538
|
+
{
|
|
539
|
+
categories: [
|
|
540
|
+
"Test string"
|
|
541
|
+
],
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
description: "Test string",
|
|
545
|
+
id: "Test string",
|
|
546
|
+
itemAttributes: {
|
|
547
|
+
categoricalFeatures: {
|
|
548
|
+
A: {
|
|
549
|
+
value: [
|
|
550
|
+
"Test string"
|
|
551
|
+
],
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
numericalFeatures: {
|
|
555
|
+
A: {
|
|
556
|
+
value: [
|
|
557
|
+
42
|
|
558
|
+
],
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
itemGroupId: "Test string",
|
|
563
|
+
languageCode: "Test string",
|
|
564
|
+
productMetadata: {
|
|
565
|
+
availableQuantity: "Test string",
|
|
566
|
+
canonicalProductUri: "Test string",
|
|
567
|
+
costs: {
|
|
568
|
+
A: 42
|
|
569
|
+
},
|
|
570
|
+
currencyCode: "Test string",
|
|
571
|
+
exactPrice: {
|
|
572
|
+
displayPrice: 42,
|
|
573
|
+
originalPrice: 42,
|
|
574
|
+
},
|
|
575
|
+
images: [
|
|
576
|
+
{
|
|
577
|
+
height: 42,
|
|
578
|
+
uri: "Test string",
|
|
579
|
+
width: 42,
|
|
580
|
+
}
|
|
581
|
+
],
|
|
582
|
+
priceRange: {
|
|
583
|
+
max: 42,
|
|
584
|
+
min: 42,
|
|
585
|
+
},
|
|
586
|
+
stockState: "Test string",
|
|
587
|
+
},
|
|
588
|
+
tags: [
|
|
589
|
+
"Test string"
|
|
590
|
+
],
|
|
591
|
+
title: "Test string",
|
|
592
|
+
}
|
|
593
|
+
],
|
|
594
|
+
},
|
|
595
|
+
gcsSource: {
|
|
596
|
+
inputUris: [
|
|
597
|
+
"Test string"
|
|
598
|
+
],
|
|
599
|
+
jsonSchema: "Test string",
|
|
600
|
+
},
|
|
601
|
+
userEventInlineSource: {
|
|
602
|
+
userEvents: [
|
|
603
|
+
{
|
|
604
|
+
eventDetail: {
|
|
605
|
+
eventAttributes: {
|
|
606
|
+
categoricalFeatures: {
|
|
607
|
+
A: {
|
|
608
|
+
value: [
|
|
609
|
+
"Test string"
|
|
610
|
+
],
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
numericalFeatures: {
|
|
614
|
+
A: {
|
|
615
|
+
value: [
|
|
616
|
+
42
|
|
617
|
+
],
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
experimentIds: [
|
|
622
|
+
"Test string"
|
|
623
|
+
],
|
|
624
|
+
pageViewId: "Test string",
|
|
625
|
+
recommendationToken: "Test string",
|
|
626
|
+
referrerUri: "Test string",
|
|
627
|
+
uri: "Test string",
|
|
628
|
+
},
|
|
629
|
+
eventSource: "Test string",
|
|
630
|
+
eventTime: "Test string",
|
|
631
|
+
eventType: "Test string",
|
|
632
|
+
productEventDetail: {
|
|
633
|
+
cartId: "Test string",
|
|
634
|
+
listId: "Test string",
|
|
635
|
+
pageCategories: [
|
|
636
|
+
{
|
|
637
|
+
categories: [
|
|
638
|
+
"Test string"
|
|
639
|
+
],
|
|
640
|
+
}
|
|
641
|
+
],
|
|
642
|
+
productDetails: [
|
|
643
|
+
{
|
|
644
|
+
availableQuantity: 42,
|
|
645
|
+
currencyCode: "Test string",
|
|
646
|
+
displayPrice: 42,
|
|
647
|
+
id: "Test string",
|
|
648
|
+
itemAttributes: {
|
|
649
|
+
categoricalFeatures: {
|
|
650
|
+
A: {
|
|
651
|
+
value: [
|
|
652
|
+
"Test string"
|
|
653
|
+
],
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
numericalFeatures: {
|
|
657
|
+
A: {
|
|
658
|
+
value: [
|
|
659
|
+
42
|
|
660
|
+
],
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
},
|
|
664
|
+
originalPrice: 42,
|
|
665
|
+
quantity: 42,
|
|
666
|
+
stockState: "Test string",
|
|
667
|
+
}
|
|
668
|
+
],
|
|
669
|
+
purchaseTransaction: {
|
|
670
|
+
costs: {
|
|
671
|
+
A: 42
|
|
672
|
+
},
|
|
673
|
+
currencyCode: "Test string",
|
|
674
|
+
id: "Test string",
|
|
675
|
+
revenue: 42,
|
|
676
|
+
taxes: {
|
|
677
|
+
A: 42
|
|
678
|
+
},
|
|
679
|
+
},
|
|
680
|
+
searchQuery: "Test string",
|
|
681
|
+
},
|
|
682
|
+
userInfo: {
|
|
683
|
+
directUserRequest: true,
|
|
684
|
+
ipAddress: "Test string",
|
|
685
|
+
userAgent: "Test string",
|
|
686
|
+
userId: "Test string",
|
|
687
|
+
visitorId: "Test string",
|
|
688
|
+
},
|
|
689
|
+
}
|
|
690
|
+
],
|
|
691
|
+
},
|
|
692
|
+
},
|
|
693
|
+
requestId: "Test string",
|
|
694
|
+
});
|
|
695
|
+
/**
|
|
696
|
+
* Gets a list of user events within a time range, with potential filtering. The method does not list unjoined user events. Unjoined user event definition: when a user event is ingested
|
|
697
|
+
* from Recommendations AI User Event APIs, the catalog item included in the user event is connected with the current catalog. If a catalog item of the ingested event is not in the current
|
|
698
|
+
* catalog, it could lead to degraded model quality. This is called an unjoined event.
|
|
699
|
+
*/
|
|
700
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.userEvents.list({
|
|
701
|
+
filter: "Test string",
|
|
702
|
+
pageSize: 42,
|
|
703
|
+
pageToken: "Test string",
|
|
704
|
+
parent: "Test string",
|
|
705
|
+
});
|
|
706
|
+
/**
|
|
707
|
+
* 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
|
|
708
|
+
* test a filter, use the list command first.
|
|
709
|
+
*/
|
|
710
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.userEvents.purge({
|
|
711
|
+
parent: "Test string",
|
|
712
|
+
}, {
|
|
713
|
+
filter: "Test string",
|
|
714
|
+
force: true,
|
|
715
|
+
});
|
|
716
|
+
/**
|
|
717
|
+
* Triggers a user event rejoin operation with latest catalog data. Events will not be annotated with detailed catalog information if catalog item is missing at the time the user event is
|
|
718
|
+
* ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest
|
|
719
|
+
* version of catalog items. It can also be used to correct events joined with wrong catalog items.
|
|
720
|
+
*/
|
|
721
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.userEvents.rejoin({
|
|
722
|
+
parent: "Test string",
|
|
723
|
+
}, {
|
|
724
|
+
userEventRejoinScope: "Test string",
|
|
725
|
+
});
|
|
726
|
+
/** Writes a single user event. */
|
|
727
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.eventStores.userEvents.write({
|
|
728
|
+
parent: "Test string",
|
|
729
|
+
}, {
|
|
730
|
+
eventDetail: {
|
|
731
|
+
eventAttributes: {
|
|
732
|
+
categoricalFeatures: {
|
|
733
|
+
A: {
|
|
734
|
+
value: [
|
|
735
|
+
"Test string"
|
|
736
|
+
],
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
numericalFeatures: {
|
|
740
|
+
A: {
|
|
741
|
+
value: [
|
|
742
|
+
42
|
|
743
|
+
],
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
},
|
|
747
|
+
experimentIds: [
|
|
748
|
+
"Test string"
|
|
749
|
+
],
|
|
750
|
+
pageViewId: "Test string",
|
|
751
|
+
recommendationToken: "Test string",
|
|
752
|
+
referrerUri: "Test string",
|
|
753
|
+
uri: "Test string",
|
|
754
|
+
},
|
|
755
|
+
eventSource: "Test string",
|
|
756
|
+
eventTime: "Test string",
|
|
757
|
+
eventType: "Test string",
|
|
758
|
+
productEventDetail: {
|
|
759
|
+
cartId: "Test string",
|
|
760
|
+
listId: "Test string",
|
|
761
|
+
pageCategories: [
|
|
762
|
+
{
|
|
763
|
+
categories: [
|
|
764
|
+
"Test string"
|
|
765
|
+
],
|
|
766
|
+
}
|
|
767
|
+
],
|
|
768
|
+
productDetails: [
|
|
769
|
+
{
|
|
770
|
+
availableQuantity: 42,
|
|
771
|
+
currencyCode: "Test string",
|
|
772
|
+
displayPrice: 42,
|
|
773
|
+
id: "Test string",
|
|
774
|
+
itemAttributes: {
|
|
775
|
+
categoricalFeatures: {
|
|
776
|
+
A: {
|
|
777
|
+
value: [
|
|
778
|
+
"Test string"
|
|
779
|
+
],
|
|
780
|
+
}
|
|
781
|
+
},
|
|
782
|
+
numericalFeatures: {
|
|
783
|
+
A: {
|
|
784
|
+
value: [
|
|
785
|
+
42
|
|
786
|
+
],
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
},
|
|
790
|
+
originalPrice: 42,
|
|
791
|
+
quantity: 42,
|
|
792
|
+
stockState: "Test string",
|
|
793
|
+
}
|
|
794
|
+
],
|
|
795
|
+
purchaseTransaction: {
|
|
796
|
+
costs: {
|
|
797
|
+
A: 42
|
|
798
|
+
},
|
|
799
|
+
currencyCode: "Test string",
|
|
800
|
+
id: "Test string",
|
|
801
|
+
revenue: 42,
|
|
802
|
+
taxes: {
|
|
803
|
+
A: 42
|
|
804
|
+
},
|
|
805
|
+
},
|
|
806
|
+
searchQuery: "Test string",
|
|
807
|
+
},
|
|
808
|
+
userInfo: {
|
|
809
|
+
directUserRequest: true,
|
|
810
|
+
ipAddress: "Test string",
|
|
811
|
+
userAgent: "Test string",
|
|
812
|
+
userId: "Test string",
|
|
813
|
+
visitorId: "Test string",
|
|
814
|
+
},
|
|
815
|
+
});
|
|
816
|
+
/** 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. */
|
|
817
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.operations.get({
|
|
818
|
+
name: "Test string",
|
|
819
|
+
});
|
|
820
|
+
/**
|
|
821
|
+
* 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
|
|
822
|
+
* 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
|
|
823
|
+
* `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
|
|
824
|
+
* ensure the name binding is the parent resource, without the operations collection id.
|
|
825
|
+
*/
|
|
826
|
+
await gapi.client.recommendationengine.projects.locations.catalogs.operations.list({
|
|
827
|
+
filter: "Test string",
|
|
828
|
+
name: "Test string",
|
|
829
|
+
pageSize: 42,
|
|
830
|
+
pageToken: "Test string",
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
});
|