@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 ADDED
@@ -0,0 +1,1658 @@
1
+ /* Type definitions for non-npm package Recommendations AI (Beta) v1beta1 0.0 */
2
+ // Project: https://cloud.google.com/recommendations-ai/docs
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://recommendationengine.googleapis.com/$discovery/rest?version=v1beta1
13
+ // Revision: 20220804
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Recommendations AI (Beta) v1beta1 */
19
+ function load(urlOrObject: "https://recommendationengine.googleapis.com/$discovery/rest?version=v1beta1"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "recommendationengine", version: "v1beta1"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "recommendationengine", version: "v1beta1", callback: () => any): void;
24
+
25
+ namespace recommendationengine {
26
+ interface GoogleApiHttpBody {
27
+ /** The HTTP Content-Type header value specifying the content type of the body. */
28
+ contentType?: string;
29
+ /** The HTTP request/response body as raw binary. */
30
+ data?: string;
31
+ /** Application specific response metadata. Must be set in the first response for streaming APIs. */
32
+ extensions?: Array<{ [P in string]: any }>;
33
+ }
34
+ // tslint:disable-next-line:no-empty-interface
35
+ interface GoogleCloudRecommendationengineV1alphaRejoinCatalogMetadata {
36
+ }
37
+ interface GoogleCloudRecommendationengineV1alphaRejoinCatalogResponse {
38
+ /** Number of user events that were joined with latest catalog items. */
39
+ rejoinedUserEventsCount?: string;
40
+ }
41
+ interface GoogleCloudRecommendationengineV1alphaTuningMetadata {
42
+ /**
43
+ * The resource name of the recommendation model that this tune applies to. Format:
44
+ * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/eventStores/{event_store_id}/recommendationModels/{recommendation_model_id}
45
+ */
46
+ recommendationModel?: string;
47
+ }
48
+ // tslint:disable-next-line:no-empty-interface
49
+ interface GoogleCloudRecommendationengineV1alphaTuningResponse {
50
+ }
51
+ interface GoogleCloudRecommendationengineV1beta1BigQuerySource {
52
+ /**
53
+ * Optional. The schema to use when parsing the data from the source. Supported values for catalog imports: 1: "catalog_recommendations_ai" using
54
+ * https://cloud.google.com/recommendations-ai/docs/upload-catalog#json (Default for catalogItems.import) 2: "catalog_merchant_center" using
55
+ * https://cloud.google.com/recommendations-ai/docs/upload-catalog#mc Supported values for user event imports: 1: "user_events_recommendations_ai" using
56
+ * https://cloud.google.com/recommendations-ai/docs/manage-user-events#import (Default for userEvents.import) 2. "user_events_ga360" using
57
+ * https://support.google.com/analytics/answer/3437719?hl=en
58
+ */
59
+ dataSchema?: string;
60
+ /** Required. The BigQuery data set to copy the data from. */
61
+ datasetId?: string;
62
+ /** Optional. Intermediate Cloud Storage directory used for the import. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory. */
63
+ gcsStagingDir?: string;
64
+ /** Optional. The project id (can be project # or id) that the BigQuery source is in. If not specified, inherits the project id from the parent request. */
65
+ projectId?: string;
66
+ /** Required. The BigQuery table to copy the data from. */
67
+ tableId?: string;
68
+ }
69
+ interface GoogleCloudRecommendationengineV1beta1Catalog {
70
+ /** Required. The catalog item level configuration. */
71
+ catalogItemLevelConfig?: GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig;
72
+ /** Required. The ID of the default event store. */
73
+ defaultEventStoreId?: string;
74
+ /** Required. The catalog display name. */
75
+ displayName?: string;
76
+ /** The fully qualified resource name of the catalog. */
77
+ name?: string;
78
+ }
79
+ interface GoogleCloudRecommendationengineV1beta1CatalogInlineSource {
80
+ /** Optional. A list of catalog items to update/create. Recommended max of 10k items. */
81
+ catalogItems?: GoogleCloudRecommendationengineV1beta1CatalogItem[];
82
+ }
83
+ interface GoogleCloudRecommendationengineV1beta1CatalogItem {
84
+ /**
85
+ * Required. Catalog item categories. This field is repeated for supporting one catalog item belonging to several parallel category hierarchies. For example, if a shoes product belongs
86
+ * to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categoryHierarchies": [ { "categories": ["Shoes &
87
+ * Accessories", "Shoes"]}, { "categories": ["Sports & Fitness", "Athletic Clothing", "Shoes"] } ]
88
+ */
89
+ categoryHierarchies?: GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy[];
90
+ /** Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB. */
91
+ description?: string;
92
+ /**
93
+ * Required. Catalog item identifier. UTF-8 encoded string with a length limit of 128 bytes. This id must be unique among all catalog items within the same catalog. It should also be
94
+ * used when logging user events in order for the user events to be joined with the Catalog.
95
+ */
96
+ id?: string;
97
+ /**
98
+ * Optional. Highly encouraged. Extra catalog item attributes to be included in the recommendation model. For example, for retail products, this could include the store name, vendor,
99
+ * style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the item attributes here.
100
+ */
101
+ itemAttributes?: GoogleCloudRecommendationengineV1beta1FeatureMap;
102
+ /**
103
+ * Optional. Variant group identifier for prediction results. UTF-8 encoded string with a length limit of 128 bytes. This field must be enabled before it can be used. [Learn
104
+ * more](/recommendations-ai/docs/catalog#item-group-id).
105
+ */
106
+ itemGroupId?: string;
107
+ /**
108
+ * Optional. Deprecated. The model automatically detects the text language. Your catalog can include text in different languages, but duplicating catalog items to provide text in
109
+ * multiple languages can result in degraded model performance.
110
+ */
111
+ languageCode?: string;
112
+ /** Optional. Metadata specific to retail products. */
113
+ productMetadata?: GoogleCloudRecommendationengineV1beta1ProductCatalogItem;
114
+ /**
115
+ * Optional. Filtering tags associated with the catalog item. Each tag should be a UTF-8 encoded string with a length limit of 1 KiB. This tag can be used for filtering recommendation
116
+ * results by passing the tag as part of the predict request filter.
117
+ */
118
+ tags?: string[];
119
+ /** Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB. */
120
+ title?: string;
121
+ }
122
+ interface GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy {
123
+ /**
124
+ * Required. Catalog item categories. Each category should be a UTF-8 encoded string with a length limit of 2 KiB. Note that the order in the list denotes the specificity (from least
125
+ * to most specific).
126
+ */
127
+ categories?: string[];
128
+ }
129
+ interface GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig {
130
+ /** Optional. Level of the catalog at which events are uploaded. See https://cloud.google.com/recommendations-ai/docs/catalog#catalog-levels for more details. */
131
+ eventItemLevel?: string;
132
+ /** Optional. Level of the catalog at which predictions are made. See https://cloud.google.com/recommendations-ai/docs/catalog#catalog-levels for more details. */
133
+ predictItemLevel?: string;
134
+ }
135
+ interface GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest {
136
+ /** Required. The prediction API key registration. */
137
+ predictionApiKeyRegistration?: GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration;
138
+ }
139
+ interface GoogleCloudRecommendationengineV1beta1EventDetail {
140
+ /**
141
+ * Optional. Extra user event features to include in the recommendation model. For product recommendation, an example of extra user information is traffic_channel, i.e. how user
142
+ * arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.
143
+ */
144
+ eventAttributes?: GoogleCloudRecommendationengineV1beta1FeatureMap;
145
+ /**
146
+ * Optional. A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different
147
+ * experiment setups (e.g. using Recommendation Engine system, using different recommendation models).
148
+ */
149
+ experimentIds?: string[];
150
+ /**
151
+ * Optional. A unique id of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger
152
+ * multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. This
153
+ * `pageViewId` will be automatically generated if using the JavaScript pixel.
154
+ */
155
+ pageViewId?: string;
156
+ /**
157
+ * Optional. Recommendation token included in the recommendation prediction response. This field enables accurate attribution of recommendation model performance. This token enables us
158
+ * to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased item. If user clicks on product K in the
159
+ * recommendation results, pass the `PredictResponse.recommendationToken` property as a url parameter to product K's page. When recording events on product K's page, log the
160
+ * PredictResponse.recommendation_token to this field. Optional, but highly encouraged for user events that are the result of a recommendation prediction query.
161
+ */
162
+ recommendationToken?: string;
163
+ /** Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically. */
164
+ referrerUri?: string;
165
+ /** Optional. Complete url (window.location.href) of the user's current page. When using the JavaScript pixel, this value is filled in automatically. Maximum length 5KB. */
166
+ uri?: string;
167
+ }
168
+ interface GoogleCloudRecommendationengineV1beta1FeatureMap {
169
+ /**
170
+ * Categorical features that can take on one of a limited number of possible values. Some examples would be the brand/maker of a product, or country of a customer. Feature names and
171
+ * values must be UTF-8 encoded strings. For example: `{ "colors": {"value": ["yellow", "green"]}, "sizes": {"value":["S", "M"]}`
172
+ */
173
+ categoricalFeatures?: { [P in string]: GoogleCloudRecommendationengineV1beta1FeatureMapStringList };
174
+ /**
175
+ * Numerical features. Some examples would be the height/weight of a product, or age of a customer. Feature names must be UTF-8 encoded strings. For example: `{ "lengths_cm":
176
+ * {"value":[2.3, 15.4]}, "heights_cm": {"value":[8.1, 6.4]} }`
177
+ */
178
+ numericalFeatures?: { [P in string]: GoogleCloudRecommendationengineV1beta1FeatureMapFloatList };
179
+ }
180
+ interface GoogleCloudRecommendationengineV1beta1FeatureMapFloatList {
181
+ /** Float feature value. */
182
+ value?: number[];
183
+ }
184
+ interface GoogleCloudRecommendationengineV1beta1FeatureMapStringList {
185
+ /** String feature value with a length limit of 128 bytes. */
186
+ value?: string[];
187
+ }
188
+ interface GoogleCloudRecommendationengineV1beta1GcsSource {
189
+ /**
190
+ * Required. Google Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or
191
+ * a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files, and each file can be up to 2 GB. See [Importing catalog
192
+ * information](/recommendations-ai/docs/upload-catalog) for the expected file format and setup instructions.
193
+ */
194
+ inputUris?: string[];
195
+ /**
196
+ * Optional. The schema to use when parsing the data from the source. Supported values for catalog imports: 1: "catalog_recommendations_ai" using
197
+ * https://cloud.google.com/recommendations-ai/docs/upload-catalog#json (Default for catalogItems.import) 2: "catalog_merchant_center" using
198
+ * https://cloud.google.com/recommendations-ai/docs/upload-catalog#mc Supported values for user events imports: 1: "user_events_recommendations_ai" using
199
+ * https://cloud.google.com/recommendations-ai/docs/manage-user-events#import (Default for userEvents.import) 2. "user_events_ga360" using
200
+ * https://support.google.com/analytics/answer/3437719?hl=en
201
+ */
202
+ jsonSchema?: string;
203
+ }
204
+ interface GoogleCloudRecommendationengineV1beta1Image {
205
+ /** Optional. Height of the image in number of pixels. */
206
+ height?: number;
207
+ /** Required. URL of the image with a length limit of 5 KiB. */
208
+ uri?: string;
209
+ /** Optional. Width of the image in number of pixels. */
210
+ width?: number;
211
+ }
212
+ interface GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest {
213
+ /** Optional. The desired location of errors incurred during the Import. */
214
+ errorsConfig?: GoogleCloudRecommendationengineV1beta1ImportErrorsConfig;
215
+ /** Required. The desired input location of the data. */
216
+ inputConfig?: GoogleCloudRecommendationengineV1beta1InputConfig;
217
+ /**
218
+ * Optional. Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency and used for request deduplication. Server-generated if unspecified. Up to 128
219
+ * characters long. This is returned as google.longrunning.Operation.name in the response.
220
+ */
221
+ requestId?: string;
222
+ /** Optional. Indicates which fields in the provided imported 'items' to update. If not set, will by default update all fields. */
223
+ updateMask?: string;
224
+ }
225
+ interface GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse {
226
+ /** A sample of errors encountered while processing the request. */
227
+ errorSamples?: GoogleRpcStatus[];
228
+ /** Echoes the destination for the complete errors in the request if set. */
229
+ errorsConfig?: GoogleCloudRecommendationengineV1beta1ImportErrorsConfig;
230
+ }
231
+ interface GoogleCloudRecommendationengineV1beta1ImportErrorsConfig {
232
+ /**
233
+ * Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Import errors will be written to a file in this bucket, one per line, as a
234
+ * JSON-encoded `google.rpc.Status` message.
235
+ */
236
+ gcsPrefix?: string;
237
+ }
238
+ interface GoogleCloudRecommendationengineV1beta1ImportMetadata {
239
+ /** Operation create time. */
240
+ createTime?: string;
241
+ /** Count of entries that encountered errors while processing. */
242
+ failureCount?: string;
243
+ /** Name of the operation. */
244
+ operationName?: string;
245
+ /** Id of the request / operation. This is parroting back the requestId that was passed in the request. */
246
+ requestId?: string;
247
+ /** Count of entries that were processed successfully. */
248
+ successCount?: string;
249
+ /** Operation last update time. If the operation is done, this is also the finish time. */
250
+ updateTime?: string;
251
+ }
252
+ interface GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest {
253
+ /** Optional. The desired location of errors incurred during the Import. */
254
+ errorsConfig?: GoogleCloudRecommendationengineV1beta1ImportErrorsConfig;
255
+ /** Required. The desired input location of the data. */
256
+ inputConfig?: GoogleCloudRecommendationengineV1beta1InputConfig;
257
+ /**
258
+ * Optional. Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency for expensive long running operations. Server-generated if unspecified. Up to
259
+ * 128 characters long. This is returned as google.longrunning.Operation.name in the response. Note that this field must not be set if the desired input config is
260
+ * catalog_inline_source.
261
+ */
262
+ requestId?: string;
263
+ }
264
+ interface GoogleCloudRecommendationengineV1beta1ImportUserEventsResponse {
265
+ /** A sample of errors encountered while processing the request. */
266
+ errorSamples?: GoogleRpcStatus[];
267
+ /** Echoes the destination for the complete errors if this field was set in the request. */
268
+ errorsConfig?: GoogleCloudRecommendationengineV1beta1ImportErrorsConfig;
269
+ /** Aggregated statistics of user event import status. */
270
+ importSummary?: GoogleCloudRecommendationengineV1beta1UserEventImportSummary;
271
+ }
272
+ interface GoogleCloudRecommendationengineV1beta1InputConfig {
273
+ /** BigQuery input source. */
274
+ bigQuerySource?: GoogleCloudRecommendationengineV1beta1BigQuerySource;
275
+ /** The Inline source for the input content for Catalog items. */
276
+ catalogInlineSource?: GoogleCloudRecommendationengineV1beta1CatalogInlineSource;
277
+ /** Google Cloud Storage location for the input content. */
278
+ gcsSource?: GoogleCloudRecommendationengineV1beta1GcsSource;
279
+ /** The Inline source for the input content for UserEvents. */
280
+ userEventInlineSource?: GoogleCloudRecommendationengineV1beta1UserEventInlineSource;
281
+ }
282
+ interface GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse {
283
+ /** The catalog items. */
284
+ catalogItems?: GoogleCloudRecommendationengineV1beta1CatalogItem[];
285
+ /** If empty, the list is complete. If nonempty, the token to pass to the next request's ListCatalogItemRequest.page_token. */
286
+ nextPageToken?: string;
287
+ }
288
+ interface GoogleCloudRecommendationengineV1beta1ListCatalogsResponse {
289
+ /** Output only. All the customer's catalogs. */
290
+ catalogs?: GoogleCloudRecommendationengineV1beta1Catalog[];
291
+ /** Pagination token, if not returned indicates the last page. */
292
+ nextPageToken?: string;
293
+ }
294
+ interface GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse {
295
+ /** If empty, the list is complete. If nonempty, pass the token to the next request's `ListPredictionApiKeysRegistrationsRequest.pageToken`. */
296
+ nextPageToken?: string;
297
+ /** The list of registered API keys. */
298
+ predictionApiKeyRegistrations?: GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration[];
299
+ }
300
+ interface GoogleCloudRecommendationengineV1beta1ListUserEventsResponse {
301
+ /** If empty, the list is complete. If nonempty, the token to pass to the next request's ListUserEvents.page_token. */
302
+ nextPageToken?: string;
303
+ /** The user events. */
304
+ userEvents?: GoogleCloudRecommendationengineV1beta1UserEvent[];
305
+ }
306
+ interface GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration {
307
+ /** The API key. */
308
+ apiKey?: string;
309
+ }
310
+ interface GoogleCloudRecommendationengineV1beta1PredictRequest {
311
+ /**
312
+ * Optional. Use dryRun mode for this prediction query. If set to true, a fake model will be used that returns arbitrary catalog items. Note that the dryRun mode should only be used
313
+ * for testing the API, or if the model is not ready.
314
+ */
315
+ dryRun?: boolean;
316
+ /**
317
+ * Optional. Filter for restricting prediction results. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to items that match all
318
+ * of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-"tagA"`
319
+ * is also supported and is equivalent to `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1 KiB. * filterOutOfStockItems. Restricts
320
+ * predictions to items that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") * filterOutOfStockItems
321
+ * tag=(-"promotional") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular items to be returned
322
+ * instead, set `strictFiltering` to false in `PredictRequest.params`.
323
+ */
324
+ filter?: string;
325
+ /**
326
+ * Optional. The labels for the predict request. * Label keys can contain lowercase letters, digits and hyphens, must start with a letter, and must end with a letter or digit. *
327
+ * Non-zero label values can contain lowercase letters, digits and hyphens, must start with a letter, and must end with a letter or digit. * No more than 64 labels can be associated
328
+ * with a given request. See https://goo.gl/xmQnxf for more information on and examples of labels.
329
+ */
330
+ labels?: { [P in string]: string };
331
+ /** Optional. Maximum number of results to return per page. Set this property to the number of prediction results required. If zero, the service will choose a reasonable default. */
332
+ pageSize?: number;
333
+ /** Optional. The previous PredictResponse.next_page_token. */
334
+ pageToken?: string;
335
+ /**
336
+ * Optional. Additional domain specific parameters for the predictions. Allowed values: * `returnCatalogItem`: Boolean. If set to true, the associated catalogItem object will be
337
+ * returned in the `PredictResponse.PredictionResult.itemMetadata` object in the method response. * `returnItemScore`: Boolean. If set to true, the prediction 'score' corresponding to
338
+ * each returned item will be set in the `metadata` field in the prediction response. The given 'score' indicates the probability of an item being clicked/purchased given the user's
339
+ * context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular items instead of empty if your filter
340
+ * blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking',
341
+ * 'medium-price-reranking', 'high-price-reranking'}. This gives request level control and adjust prediction results based on product price. * `diversityLevel`: String. Default empty.
342
+ * If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request level control and
343
+ * adjust prediction results based on product category.
344
+ */
345
+ params?: { [P in string]: any };
346
+ /**
347
+ * Required. Context about the user, what they are looking at and what action they took to trigger the predict request. Note that this user event detail won't be ingested to userEvent
348
+ * logs. Thus, a separate userEvent write request is required for event logging. Don't set UserInfo.visitor_id or UserInfo.user_id to the same fixed ID for different users. If you are
349
+ * trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserInfo.visitor_id to a random unique ID and leave
350
+ * UserInfo.user_id unset.
351
+ */
352
+ userEvent?: GoogleCloudRecommendationengineV1beta1UserEvent;
353
+ }
354
+ interface GoogleCloudRecommendationengineV1beta1PredictResponse {
355
+ /** True if the dryRun property was set in the request. */
356
+ dryRun?: boolean;
357
+ /** IDs of items in the request that were missing from the catalog. */
358
+ itemsMissingInCatalog?: string[];
359
+ /** Additional domain specific prediction response metadata. */
360
+ metadata?: { [P in string]: any };
361
+ /** If empty, the list is complete. If nonempty, the token to pass to the next request's PredictRequest.page_token. */
362
+ nextPageToken?: string;
363
+ /**
364
+ * A unique recommendation token. This should be included in the user event logs resulting from this recommendation, which enables accurate attribution of recommendation model
365
+ * performance.
366
+ */
367
+ recommendationToken?: string;
368
+ /** A list of recommended items. The order represents the ranking (from the most relevant item to the least). */
369
+ results?: GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult[];
370
+ }
371
+ interface GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult {
372
+ /** ID of the recommended catalog item */
373
+ id?: string;
374
+ /**
375
+ * Additional item metadata / annotations. Possible values: * `catalogItem`: JSON representation of the catalogItem. Will be set if `returnCatalogItem` is set to true in
376
+ * `PredictRequest.params`. * `score`: Prediction score in double value. Will be set if `returnItemScore` is set to true in `PredictRequest.params`.
377
+ */
378
+ itemMetadata?: { [P in string]: any };
379
+ }
380
+ interface GoogleCloudRecommendationengineV1beta1ProductCatalogItem {
381
+ /** Optional. The available quantity of the item. */
382
+ availableQuantity?: string;
383
+ /** Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB.. */
384
+ canonicalProductUri?: string;
385
+ /**
386
+ * Optional. A map to pass the costs associated with the product. For example: {"manufacturing": 45.5} The profit of selling this item is computed like so: * If 'exactPrice' is
387
+ * provided, profit = displayPrice - sum(costs) * If 'priceRange' is provided, profit = minPrice - sum(costs)
388
+ */
389
+ costs?: { [P in string]: number };
390
+ /** Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code. */
391
+ currencyCode?: string;
392
+ /** Optional. The exact product price. */
393
+ exactPrice?: GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice;
394
+ /** Optional. Product images for the catalog item. */
395
+ images?: GoogleCloudRecommendationengineV1beta1Image[];
396
+ /** Optional. The product price range. */
397
+ priceRange?: GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange;
398
+ /** Optional. Online stock state of the catalog item. Default is `IN_STOCK`. */
399
+ stockState?: string;
400
+ }
401
+ interface GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice {
402
+ /** Optional. Display price of the product. */
403
+ displayPrice?: number;
404
+ /** Optional. Price of the product without any discount. If zero, by default set to be the 'displayPrice'. */
405
+ originalPrice?: number;
406
+ }
407
+ interface GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange {
408
+ /** Required. The maximum product price. */
409
+ max?: number;
410
+ /** Required. The minimum product price. */
411
+ min?: number;
412
+ }
413
+ interface GoogleCloudRecommendationengineV1beta1ProductDetail {
414
+ /**
415
+ * Optional. Quantity of the products in stock when a user event happens. Optional. If provided, this overrides the available quantity in Catalog for this event. and can only be set if
416
+ * `stock_status` is set to `IN_STOCK`. Note that if an item is out of stock, you must set the `stock_state` field to be `OUT_OF_STOCK`. Leaving this field unspecified / as zero is not
417
+ * sufficient to mark the item out of stock.
418
+ */
419
+ availableQuantity?: number;
420
+ /** Optional. Currency code for price/costs. Use three-character ISO-4217 code. Required only if originalPrice or displayPrice is set. */
421
+ currencyCode?: string;
422
+ /** Optional. Display price of the product (e.g. discounted price). If provided, this will override the display price in Catalog for this product. */
423
+ displayPrice?: number;
424
+ /** Required. Catalog item ID. UTF-8 encoded string with a length limit of 128 characters. */
425
+ id?: string;
426
+ /** Optional. Extra features associated with a product in the user event. */
427
+ itemAttributes?: GoogleCloudRecommendationengineV1beta1FeatureMap;
428
+ /** Optional. Original price of the product. If provided, this will override the original price in Catalog for this product. */
429
+ originalPrice?: number;
430
+ /**
431
+ * Optional. Quantity of the product associated with the user event. For example, this field will be 2 if two products are added to the shopping cart for `add-to-cart` event. Required
432
+ * for `add-to-cart`, `add-to-list`, `remove-from-cart`, `checkout-start`, `purchase-complete`, `refund` event types.
433
+ */
434
+ quantity?: number;
435
+ /** Optional. Item stock state. If provided, this overrides the stock state in Catalog for items in this event. */
436
+ stockState?: string;
437
+ }
438
+ interface GoogleCloudRecommendationengineV1beta1ProductEventDetail {
439
+ /**
440
+ * Optional. The id or name of the associated shopping cart. This id is used to associate multiple items added or present in the cart before purchase. This can only be set for
441
+ * `add-to-cart`, `remove-from-cart`, `checkout-start`, `purchase-complete`, or `shopping-cart-page-view` events.
442
+ */
443
+ cartId?: string;
444
+ /** Required for `add-to-list` and `remove-from-list` events. The id or name of the list that the item is being added to or removed from. Other event types should not set this field. */
445
+ listId?: string;
446
+ /**
447
+ * Required for `category-page-view` events. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. The
448
+ * categories associated with a category page. Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy:
449
+ * categories : ["Sales", "2017 Black Friday Deals"].
450
+ */
451
+ pageCategories?: GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy[];
452
+ /**
453
+ * The main product details related to the event. This field is required for the following event types: * `add-to-cart` * `add-to-list` * `checkout-start` * `detail-page-view` *
454
+ * `purchase-complete` * `refund` * `remove-from-cart` * `remove-from-list` This field is optional for the following event types: * `page-visit` * `shopping-cart-page-view` - note that
455
+ * 'product_details' should be set for this unless the shopping cart is empty. * `search` (highly encouraged) In a `search` event, this field represents the products returned to the
456
+ * end user on the current page (the end user may have not finished broswing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even
457
+ * for the same query, a new SEARCH event with different product_details is desired. The end user may have not finished broswing the whole page yet. This field is not allowed for the
458
+ * following event types: * `category-page-view` * `home-page-view`
459
+ */
460
+ productDetails?: GoogleCloudRecommendationengineV1beta1ProductDetail[];
461
+ /**
462
+ * Optional. A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Optional for `checkout-start` events. Other event types should not set
463
+ * this field.
464
+ */
465
+ purchaseTransaction?: GoogleCloudRecommendationengineV1beta1PurchaseTransaction;
466
+ /**
467
+ * At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. The user's search query as UTF-8 encoded text with a
468
+ * length limit of 5 KiB.
469
+ */
470
+ searchQuery?: string;
471
+ }
472
+ interface GoogleCloudRecommendationengineV1beta1PurchaseTransaction {
473
+ /**
474
+ * Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs. Total product cost such that
475
+ * profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs). If CatalogItem.cost is not specified for
476
+ * one of the items, CatalogItem.cost based profit *cannot* be calculated for this Transaction.
477
+ */
478
+ costs?: { [P in string]: number };
479
+ /** Required. Currency code. Use three-character ISO-4217 code. This field is not required if the event type is `refund`. */
480
+ currencyCode?: string;
481
+ /** Optional. The transaction ID with a length limit of 128 bytes. */
482
+ id?: string;
483
+ /**
484
+ * Required. Total revenue or grand total associated with the transaction. This value include shipping, tax, or other adjustments to total revenue that you want to include as part of
485
+ * your revenue calculations. This field is not required if the event type is `refund`.
486
+ */
487
+ revenue?: number;
488
+ /** Optional. All the taxes associated with the transaction. */
489
+ taxes?: { [P in string]: number };
490
+ }
491
+ interface GoogleCloudRecommendationengineV1beta1PurgeUserEventsMetadata {
492
+ /** Operation create time. */
493
+ createTime?: string;
494
+ /** The ID of the request / operation. */
495
+ operationName?: string;
496
+ }
497
+ interface GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest {
498
+ /**
499
+ * Required. The filter string to specify the events to be deleted. Empty string filter is not allowed. The eligible fields for filtering are: * `eventType`: UserEvent.eventType field
500
+ * of type string. * `eventTime`: in ISO 8601 "zulu" format. * `visitorId`: field of type string. Specifying this will delete all events associated with a visitor. * `userId`: field of
501
+ * type string. Specifying this will delete all events associated with a user. Examples: * Deleting all events in a time range: `eventTime > "2012-04-23T18:25:43.511Z" eventTime <
502
+ * "2012-04-23T18:30:43.511Z"` * Deleting specific eventType in time range: `eventTime > "2012-04-23T18:25:43.511Z" eventType = "detail-page-view"` * Deleting all events for a specific
503
+ * visitor: `visitorId = "visitor1024"` The filtering fields are assumed to have an implicit AND.
504
+ */
505
+ filter?: string;
506
+ /** Optional. The default value is false. Override this flag to true to actually perform the purge. If the field is not set to true, a sampling of events to be deleted will be returned. */
507
+ force?: boolean;
508
+ }
509
+ interface GoogleCloudRecommendationengineV1beta1PurgeUserEventsResponse {
510
+ /** The total count of events purged as a result of the operation. */
511
+ purgedEventsCount?: string;
512
+ /** A sampling of events deleted (or will be deleted) depending on the `force` property in the request. Max of 500 items will be returned. */
513
+ userEventsSample?: GoogleCloudRecommendationengineV1beta1UserEvent[];
514
+ }
515
+ // tslint:disable-next-line:no-empty-interface
516
+ interface GoogleCloudRecommendationengineV1beta1RejoinUserEventsMetadata {
517
+ }
518
+ interface GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest {
519
+ /** Required. The type of the catalog rejoin to define the scope and range of the user events to be rejoined with catalog items. */
520
+ userEventRejoinScope?: string;
521
+ }
522
+ interface GoogleCloudRecommendationengineV1beta1RejoinUserEventsResponse {
523
+ /** Number of user events that were joined with latest catalog items. */
524
+ rejoinedUserEventsCount?: string;
525
+ }
526
+ interface GoogleCloudRecommendationengineV1beta1UserEvent {
527
+ /** Optional. User event detailed information common across different recommendation types. */
528
+ eventDetail?: GoogleCloudRecommendationengineV1beta1EventDetail;
529
+ /** Optional. This field should *not* be set when using JavaScript pixel or the Recommendations AI Tag. Defaults to `EVENT_SOURCE_UNSPECIFIED`. */
530
+ eventSource?: string;
531
+ /** Optional. Only required for ImportUserEvents method. Timestamp of user event created. */
532
+ eventTime?: string;
533
+ /**
534
+ * Required. User event type. Allowed values are: * `add-to-cart` Products being added to cart. * `add-to-list` Items being added to a list (shopping list, favorites etc). *
535
+ * `category-page-view` Special pages such as sale or promotion pages viewed. * `checkout-start` User starting a checkout process. * `detail-page-view` Products detail page viewed. *
536
+ * `home-page-view` Homepage viewed. * `page-visit` Generic page visits not included in the event types above. * `purchase-complete` User finishing a purchase. * `refund` Purchased
537
+ * items being refunded or returned. * `remove-from-cart` Products being removed from cart. * `remove-from-list` Items being removed from a list. * `search` Product search. *
538
+ * `shopping-cart-page-view` User viewing a shopping cart. * `impression` List of items displayed. Used by Google Tag Manager.
539
+ */
540
+ eventType?: string;
541
+ /**
542
+ * Optional. Retail product specific user event metadata. This field is required for the following event types: * `add-to-cart` * `add-to-list` * `category-page-view` *
543
+ * `checkout-start` * `detail-page-view` * `purchase-complete` * `refund` * `remove-from-cart` * `remove-from-list` * `search` This field is optional for the following event types: *
544
+ * `page-visit` * `shopping-cart-page-view` - note that 'product_event_detail' should be set for this unless the shopping cart is empty. This field is not allowed for the following
545
+ * event types: * `home-page-view`
546
+ */
547
+ productEventDetail?: GoogleCloudRecommendationengineV1beta1ProductEventDetail;
548
+ /** Required. User information. */
549
+ userInfo?: GoogleCloudRecommendationengineV1beta1UserInfo;
550
+ }
551
+ interface GoogleCloudRecommendationengineV1beta1UserEventImportSummary {
552
+ /** Count of user events imported with complete existing catalog information. */
553
+ joinedEventsCount?: string;
554
+ /** Count of user events imported, but with catalog information not found in the imported catalog. */
555
+ unjoinedEventsCount?: string;
556
+ }
557
+ interface GoogleCloudRecommendationengineV1beta1UserEventInlineSource {
558
+ /** Optional. A list of user events to import. Recommended max of 10k items. */
559
+ userEvents?: GoogleCloudRecommendationengineV1beta1UserEvent[];
560
+ }
561
+ interface GoogleCloudRecommendationengineV1beta1UserInfo {
562
+ /**
563
+ * Optional. Indicates if the request is made directly from the end user in which case the user_agent and ip_address fields can be populated from the HTTP request. This should *not* be
564
+ * set when using the javascript pixel. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is
565
+ * processing and pushing the user events).
566
+ */
567
+ directUserRequest?: boolean;
568
+ /**
569
+ * Optional. IP address of the user. This could be either IPv4 (e.g. 104.133.9.80) or IPv6 (e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334). This should *not* be set when using the
570
+ * javascript pixel or if `direct_user_request` is set. Used to extract location information for personalization.
571
+ */
572
+ ipAddress?: string;
573
+ /**
574
+ * Optional. User agent as included in the HTTP header. UTF-8 encoded string with a length limit of 1 KiB. This should *not* be set when using the JavaScript pixel or if
575
+ * `directUserRequest` is set.
576
+ */
577
+ userAgent?: string;
578
+ /**
579
+ * Optional. Unique identifier for logged-in user with a length limit of 128 bytes. Required only for logged-in users. Don't set for anonymous users. Don't set the field to the same
580
+ * fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality.
581
+ */
582
+ userId?: string;
583
+ /**
584
+ * Required. A unique identifier for tracking visitors with a length limit of 128 bytes. For example, this could be implemented with an HTTP cookie, which should be able to uniquely
585
+ * identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. Maximum length 128 bytes. Cannot be empty. Don't set
586
+ * the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality.
587
+ */
588
+ visitorId?: string;
589
+ }
590
+ interface GoogleLongrunningListOperationsResponse {
591
+ /** The standard List next-page token. */
592
+ nextPageToken?: string;
593
+ /** A list of operations that matches the specified filter in the request. */
594
+ operations?: GoogleLongrunningOperation[];
595
+ }
596
+ interface GoogleLongrunningOperation {
597
+ /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
598
+ done?: boolean;
599
+ /** The error result of the operation in case of failure or cancellation. */
600
+ error?: GoogleRpcStatus;
601
+ /**
602
+ * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such
603
+ * metadata. Any method that returns a long-running operation should document the metadata type, if any.
604
+ */
605
+ metadata?: { [P in string]: any };
606
+ /**
607
+ * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending
608
+ * with `operations/{unique_id}`.
609
+ */
610
+ name?: string;
611
+ /**
612
+ * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the
613
+ * original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the
614
+ * original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
615
+ */
616
+ response?: { [P in string]: any };
617
+ }
618
+ // tslint:disable-next-line:no-empty-interface
619
+ interface GoogleProtobufEmpty {
620
+ }
621
+ interface GoogleRpcStatus {
622
+ /** The status code, which should be an enum value of google.rpc.Code. */
623
+ code?: number;
624
+ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
625
+ details?: Array<{ [P in string]: any }>;
626
+ /**
627
+ * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the
628
+ * client.
629
+ */
630
+ message?: string;
631
+ }
632
+ interface CatalogItemsResource {
633
+ /** Creates a catalog item. */
634
+ create(request: {
635
+ /** V1 error format. */
636
+ "$.xgafv"?: string;
637
+ /** OAuth access token. */
638
+ access_token?: string;
639
+ /** Data format for response. */
640
+ alt?: string;
641
+ /** JSONP */
642
+ callback?: string;
643
+ /** Selector specifying which fields to include in a partial response. */
644
+ fields?: string;
645
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
646
+ key?: string;
647
+ /** OAuth 2.0 token for the current user. */
648
+ oauth_token?: string;
649
+ /** Required. The parent catalog resource name, such as `projects/*‍/locations/global/catalogs/default_catalog`. */
650
+ parent: string;
651
+ /** Returns response with indentations and line breaks. */
652
+ prettyPrint?: boolean;
653
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
654
+ quotaUser?: string;
655
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
656
+ upload_protocol?: string;
657
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
658
+ uploadType?: string;
659
+ /** Request body */
660
+ resource: GoogleCloudRecommendationengineV1beta1CatalogItem;
661
+ }): Request<GoogleCloudRecommendationengineV1beta1CatalogItem>;
662
+ create(request: {
663
+ /** V1 error format. */
664
+ "$.xgafv"?: string;
665
+ /** OAuth access token. */
666
+ access_token?: string;
667
+ /** Data format for response. */
668
+ alt?: string;
669
+ /** JSONP */
670
+ callback?: string;
671
+ /** Selector specifying which fields to include in a partial response. */
672
+ fields?: string;
673
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
674
+ key?: string;
675
+ /** OAuth 2.0 token for the current user. */
676
+ oauth_token?: string;
677
+ /** Required. The parent catalog resource name, such as `projects/*‍/locations/global/catalogs/default_catalog`. */
678
+ parent: string;
679
+ /** Returns response with indentations and line breaks. */
680
+ prettyPrint?: boolean;
681
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
682
+ quotaUser?: string;
683
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
684
+ upload_protocol?: string;
685
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
686
+ uploadType?: string;
687
+ },
688
+ body: GoogleCloudRecommendationengineV1beta1CatalogItem): Request<GoogleCloudRecommendationengineV1beta1CatalogItem>;
689
+ /** Deletes a catalog item. */
690
+ delete(request?: {
691
+ /** V1 error format. */
692
+ "$.xgafv"?: string;
693
+ /** OAuth access token. */
694
+ access_token?: string;
695
+ /** Data format for response. */
696
+ alt?: string;
697
+ /** JSONP */
698
+ callback?: string;
699
+ /** Selector specifying which fields to include in a partial response. */
700
+ fields?: string;
701
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
702
+ key?: string;
703
+ /** Required. Full resource name of catalog item, such as `projects/*‍/locations/global/catalogs/default_catalog/catalogItems/some_catalog_item_id`. */
704
+ name: string;
705
+ /** OAuth 2.0 token for the current user. */
706
+ oauth_token?: string;
707
+ /** Returns response with indentations and line breaks. */
708
+ prettyPrint?: boolean;
709
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
710
+ quotaUser?: string;
711
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
712
+ upload_protocol?: string;
713
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
714
+ uploadType?: string;
715
+ }): Request<{}>;
716
+ /** Gets a specific catalog item. */
717
+ get(request?: {
718
+ /** V1 error format. */
719
+ "$.xgafv"?: string;
720
+ /** OAuth access token. */
721
+ access_token?: string;
722
+ /** Data format for response. */
723
+ alt?: string;
724
+ /** JSONP */
725
+ callback?: string;
726
+ /** Selector specifying which fields to include in a partial response. */
727
+ fields?: string;
728
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
729
+ key?: string;
730
+ /** Required. Full resource name of catalog item, such as `projects/*‍/locations/global/catalogs/default_catalog/catalogitems/some_catalog_item_id`. */
731
+ name: string;
732
+ /** OAuth 2.0 token for the current user. */
733
+ oauth_token?: string;
734
+ /** Returns response with indentations and line breaks. */
735
+ prettyPrint?: boolean;
736
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
737
+ quotaUser?: string;
738
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
739
+ upload_protocol?: string;
740
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
741
+ uploadType?: string;
742
+ }): Request<GoogleCloudRecommendationengineV1beta1CatalogItem>;
743
+ /**
744
+ * 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
745
+ * ImportResponse. Note that it is possible for a subset of the items to be successfully updated.
746
+ */
747
+ import(request: {
748
+ /** V1 error format. */
749
+ "$.xgafv"?: string;
750
+ /** OAuth access token. */
751
+ access_token?: string;
752
+ /** Data format for response. */
753
+ alt?: string;
754
+ /** JSONP */
755
+ callback?: string;
756
+ /** Selector specifying which fields to include in a partial response. */
757
+ fields?: string;
758
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
759
+ key?: string;
760
+ /** OAuth 2.0 token for the current user. */
761
+ oauth_token?: string;
762
+ /**
763
+ * Required. `projects/1234/locations/global/catalogs/default_catalog` If no updateMask is specified, requires catalogItems.create permission. If updateMask is specified, requires
764
+ * catalogItems.update permission.
765
+ */
766
+ parent: string;
767
+ /** Returns response with indentations and line breaks. */
768
+ prettyPrint?: boolean;
769
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
770
+ quotaUser?: string;
771
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
772
+ upload_protocol?: string;
773
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
774
+ uploadType?: string;
775
+ /** Request body */
776
+ resource: GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest;
777
+ }): Request<GoogleLongrunningOperation>;
778
+ import(request: {
779
+ /** V1 error format. */
780
+ "$.xgafv"?: string;
781
+ /** OAuth access token. */
782
+ access_token?: string;
783
+ /** Data format for response. */
784
+ alt?: string;
785
+ /** JSONP */
786
+ callback?: string;
787
+ /** Selector specifying which fields to include in a partial response. */
788
+ fields?: string;
789
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
790
+ key?: string;
791
+ /** OAuth 2.0 token for the current user. */
792
+ oauth_token?: string;
793
+ /**
794
+ * Required. `projects/1234/locations/global/catalogs/default_catalog` If no updateMask is specified, requires catalogItems.create permission. If updateMask is specified, requires
795
+ * catalogItems.update permission.
796
+ */
797
+ parent: string;
798
+ /** Returns response with indentations and line breaks. */
799
+ prettyPrint?: boolean;
800
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
801
+ quotaUser?: string;
802
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
803
+ upload_protocol?: string;
804
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
805
+ uploadType?: string;
806
+ },
807
+ body: GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest): Request<GoogleLongrunningOperation>;
808
+ /** Gets a list of catalog items. */
809
+ list(request?: {
810
+ /** V1 error format. */
811
+ "$.xgafv"?: string;
812
+ /** OAuth access token. */
813
+ access_token?: string;
814
+ /** Data format for response. */
815
+ alt?: string;
816
+ /** JSONP */
817
+ callback?: string;
818
+ /** Selector specifying which fields to include in a partial response. */
819
+ fields?: string;
820
+ /** Optional. Use of this field is not supported by version v1beta1. */
821
+ filter?: string;
822
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
823
+ key?: string;
824
+ /** OAuth 2.0 token for the current user. */
825
+ oauth_token?: string;
826
+ /** Optional. Maximum number of results to return per page. If zero, the service will choose a reasonable default. */
827
+ pageSize?: number;
828
+ /** Optional. The previous ListCatalogItemsResponse.next_page_token. */
829
+ pageToken?: string;
830
+ /** Required. The parent catalog resource name, such as `projects/*‍/locations/global/catalogs/default_catalog`. */
831
+ parent: string;
832
+ /** Returns response with indentations and line breaks. */
833
+ prettyPrint?: boolean;
834
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
835
+ quotaUser?: string;
836
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
837
+ upload_protocol?: string;
838
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
839
+ uploadType?: string;
840
+ }): Request<GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse>;
841
+ /** Updates a catalog item. Partial updating is supported. Non-existing items will be created. */
842
+ patch(request: {
843
+ /** V1 error format. */
844
+ "$.xgafv"?: string;
845
+ /** OAuth access token. */
846
+ access_token?: string;
847
+ /** Data format for response. */
848
+ alt?: string;
849
+ /** JSONP */
850
+ callback?: string;
851
+ /** Selector specifying which fields to include in a partial response. */
852
+ fields?: string;
853
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
854
+ key?: string;
855
+ /** Required. Full resource name of catalog item, such as `projects/*‍/locations/global/catalogs/default_catalog/catalogItems/some_catalog_item_id`. */
856
+ name: string;
857
+ /** OAuth 2.0 token for the current user. */
858
+ oauth_token?: string;
859
+ /** Returns response with indentations and line breaks. */
860
+ prettyPrint?: boolean;
861
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
862
+ quotaUser?: string;
863
+ /** Optional. Indicates which fields in the provided 'item' to update. If not set, will by default update all fields. */
864
+ updateMask?: string;
865
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
866
+ upload_protocol?: string;
867
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
868
+ uploadType?: string;
869
+ /** Request body */
870
+ resource: GoogleCloudRecommendationengineV1beta1CatalogItem;
871
+ }): Request<GoogleCloudRecommendationengineV1beta1CatalogItem>;
872
+ patch(request: {
873
+ /** V1 error format. */
874
+ "$.xgafv"?: string;
875
+ /** OAuth access token. */
876
+ access_token?: string;
877
+ /** Data format for response. */
878
+ alt?: string;
879
+ /** JSONP */
880
+ callback?: string;
881
+ /** Selector specifying which fields to include in a partial response. */
882
+ fields?: string;
883
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
884
+ key?: string;
885
+ /** Required. Full resource name of catalog item, such as `projects/*‍/locations/global/catalogs/default_catalog/catalogItems/some_catalog_item_id`. */
886
+ name: string;
887
+ /** OAuth 2.0 token for the current user. */
888
+ oauth_token?: string;
889
+ /** Returns response with indentations and line breaks. */
890
+ prettyPrint?: boolean;
891
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
892
+ quotaUser?: string;
893
+ /** Optional. Indicates which fields in the provided 'item' to update. If not set, will by default update all fields. */
894
+ updateMask?: string;
895
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
896
+ upload_protocol?: string;
897
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
898
+ uploadType?: string;
899
+ },
900
+ body: GoogleCloudRecommendationengineV1beta1CatalogItem): Request<GoogleCloudRecommendationengineV1beta1CatalogItem>;
901
+ }
902
+ interface OperationsResource {
903
+ /** 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. */
904
+ get(request?: {
905
+ /** V1 error format. */
906
+ "$.xgafv"?: string;
907
+ /** OAuth access token. */
908
+ access_token?: string;
909
+ /** Data format for response. */
910
+ alt?: string;
911
+ /** JSONP */
912
+ callback?: string;
913
+ /** Selector specifying which fields to include in a partial response. */
914
+ fields?: string;
915
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
916
+ key?: string;
917
+ /** The name of the operation resource. */
918
+ name: string;
919
+ /** OAuth 2.0 token for the current user. */
920
+ oauth_token?: string;
921
+ /** Returns response with indentations and line breaks. */
922
+ prettyPrint?: boolean;
923
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
924
+ quotaUser?: string;
925
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
926
+ upload_protocol?: string;
927
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
928
+ uploadType?: string;
929
+ }): Request<GoogleLongrunningOperation>;
930
+ /**
931
+ * 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
932
+ * to 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
933
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
934
+ * ensure the name binding is the parent resource, without the operations collection id.
935
+ */
936
+ list(request?: {
937
+ /** V1 error format. */
938
+ "$.xgafv"?: string;
939
+ /** OAuth access token. */
940
+ access_token?: string;
941
+ /** Data format for response. */
942
+ alt?: string;
943
+ /** JSONP */
944
+ callback?: string;
945
+ /** Selector specifying which fields to include in a partial response. */
946
+ fields?: string;
947
+ /** The standard list filter. */
948
+ filter?: string;
949
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
950
+ key?: string;
951
+ /** The name of the operation's parent resource. */
952
+ name: string;
953
+ /** OAuth 2.0 token for the current user. */
954
+ oauth_token?: string;
955
+ /** The standard list page size. */
956
+ pageSize?: number;
957
+ /** The standard list page token. */
958
+ pageToken?: string;
959
+ /** Returns response with indentations and line breaks. */
960
+ prettyPrint?: boolean;
961
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
962
+ quotaUser?: string;
963
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
964
+ upload_protocol?: string;
965
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
966
+ uploadType?: string;
967
+ }): Request<GoogleLongrunningListOperationsResponse>;
968
+ }
969
+ interface PlacementsResource {
970
+ /**
971
+ * Makes a recommendation prediction. If using API Key based authentication, the API Key must be registered using the PredictionApiKeyRegistry service. [Learn
972
+ * more](https://cloud.google.com/recommendations-ai/docs/setting-up#register-key).
973
+ */
974
+ predict(request: {
975
+ /** V1 error format. */
976
+ "$.xgafv"?: string;
977
+ /** OAuth access token. */
978
+ access_token?: string;
979
+ /** Data format for response. */
980
+ alt?: string;
981
+ /** JSONP */
982
+ callback?: string;
983
+ /** Selector specifying which fields to include in a partial response. */
984
+ fields?: string;
985
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
986
+ key?: string;
987
+ name: string;
988
+ /** OAuth 2.0 token for the current user. */
989
+ oauth_token?: string;
990
+ /** Returns response with indentations and line breaks. */
991
+ prettyPrint?: boolean;
992
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
993
+ quotaUser?: string;
994
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
995
+ upload_protocol?: string;
996
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
997
+ uploadType?: string;
998
+ /** Request body */
999
+ resource: GoogleCloudRecommendationengineV1beta1PredictRequest;
1000
+ }): Request<GoogleCloudRecommendationengineV1beta1PredictResponse>;
1001
+ predict(request: {
1002
+ /** V1 error format. */
1003
+ "$.xgafv"?: string;
1004
+ /** OAuth access token. */
1005
+ access_token?: string;
1006
+ /** Data format for response. */
1007
+ alt?: string;
1008
+ /** JSONP */
1009
+ callback?: string;
1010
+ /** Selector specifying which fields to include in a partial response. */
1011
+ fields?: string;
1012
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1013
+ key?: string;
1014
+ name: string;
1015
+ /** OAuth 2.0 token for the current user. */
1016
+ oauth_token?: string;
1017
+ /** Returns response with indentations and line breaks. */
1018
+ prettyPrint?: boolean;
1019
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1020
+ quotaUser?: string;
1021
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1022
+ upload_protocol?: string;
1023
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1024
+ uploadType?: string;
1025
+ },
1026
+ body: GoogleCloudRecommendationengineV1beta1PredictRequest): Request<GoogleCloudRecommendationengineV1beta1PredictResponse>;
1027
+ }
1028
+ interface PredictionApiKeyRegistrationsResource {
1029
+ /** Register an API key for use with predict method. */
1030
+ create(request: {
1031
+ /** V1 error format. */
1032
+ "$.xgafv"?: string;
1033
+ /** OAuth access token. */
1034
+ access_token?: string;
1035
+ /** Data format for response. */
1036
+ alt?: string;
1037
+ /** JSONP */
1038
+ callback?: string;
1039
+ /** Selector specifying which fields to include in a partial response. */
1040
+ fields?: string;
1041
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1042
+ key?: string;
1043
+ /** OAuth 2.0 token for the current user. */
1044
+ oauth_token?: string;
1045
+ /** Required. The parent resource path. `projects/*‍/locations/global/catalogs/default_catalog/eventStores/default_event_store`. */
1046
+ parent: string;
1047
+ /** Returns response with indentations and line breaks. */
1048
+ prettyPrint?: boolean;
1049
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1050
+ quotaUser?: string;
1051
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1052
+ upload_protocol?: string;
1053
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1054
+ uploadType?: string;
1055
+ /** Request body */
1056
+ resource: GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest;
1057
+ }): Request<GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration>;
1058
+ create(request: {
1059
+ /** V1 error format. */
1060
+ "$.xgafv"?: string;
1061
+ /** OAuth access token. */
1062
+ access_token?: string;
1063
+ /** Data format for response. */
1064
+ alt?: string;
1065
+ /** JSONP */
1066
+ callback?: string;
1067
+ /** Selector specifying which fields to include in a partial response. */
1068
+ fields?: string;
1069
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1070
+ key?: string;
1071
+ /** OAuth 2.0 token for the current user. */
1072
+ oauth_token?: string;
1073
+ /** Required. The parent resource path. `projects/*‍/locations/global/catalogs/default_catalog/eventStores/default_event_store`. */
1074
+ parent: string;
1075
+ /** Returns response with indentations and line breaks. */
1076
+ prettyPrint?: boolean;
1077
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1078
+ quotaUser?: string;
1079
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1080
+ upload_protocol?: string;
1081
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1082
+ uploadType?: string;
1083
+ },
1084
+ body: GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest): Request<GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration>;
1085
+ /** Unregister an apiKey from using for predict method. */
1086
+ delete(request?: {
1087
+ /** V1 error format. */
1088
+ "$.xgafv"?: string;
1089
+ /** OAuth access token. */
1090
+ access_token?: string;
1091
+ /** Data format for response. */
1092
+ alt?: string;
1093
+ /** JSONP */
1094
+ callback?: string;
1095
+ /** Selector specifying which fields to include in a partial response. */
1096
+ fields?: string;
1097
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1098
+ key?: string;
1099
+ /**
1100
+ * Required. The API key to unregister including full resource path.
1101
+ * `projects/*‍/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/`
1102
+ */
1103
+ name: string;
1104
+ /** OAuth 2.0 token for the current user. */
1105
+ oauth_token?: string;
1106
+ /** Returns response with indentations and line breaks. */
1107
+ prettyPrint?: boolean;
1108
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1109
+ quotaUser?: string;
1110
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1111
+ upload_protocol?: string;
1112
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1113
+ uploadType?: string;
1114
+ }): Request<{}>;
1115
+ /** List the registered apiKeys for use with predict method. */
1116
+ list(request?: {
1117
+ /** V1 error format. */
1118
+ "$.xgafv"?: string;
1119
+ /** OAuth access token. */
1120
+ access_token?: string;
1121
+ /** Data format for response. */
1122
+ alt?: string;
1123
+ /** JSONP */
1124
+ callback?: string;
1125
+ /** Selector specifying which fields to include in a partial response. */
1126
+ fields?: string;
1127
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1128
+ key?: string;
1129
+ /** OAuth 2.0 token for the current user. */
1130
+ oauth_token?: string;
1131
+ /** Optional. Maximum number of results to return per page. If unset, the service will choose a reasonable default. */
1132
+ pageSize?: number;
1133
+ /** Optional. The previous `ListPredictionApiKeyRegistration.nextPageToken`. */
1134
+ pageToken?: string;
1135
+ /** Required. The parent placement resource name such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store` */
1136
+ parent: string;
1137
+ /** Returns response with indentations and line breaks. */
1138
+ prettyPrint?: boolean;
1139
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1140
+ quotaUser?: string;
1141
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1142
+ upload_protocol?: string;
1143
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1144
+ uploadType?: string;
1145
+ }): Request<GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse>;
1146
+ }
1147
+ interface UserEventsResource {
1148
+ /**
1149
+ * 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
1150
+ * AI JavaScript pixel. Users should not call this method directly.
1151
+ */
1152
+ collect(request?: {
1153
+ /** V1 error format. */
1154
+ "$.xgafv"?: string;
1155
+ /** OAuth access token. */
1156
+ access_token?: string;
1157
+ /** Data format for response. */
1158
+ alt?: string;
1159
+ /** JSONP */
1160
+ callback?: string;
1161
+ /** Optional. The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes. */
1162
+ ets?: string;
1163
+ /** Selector specifying which fields to include in a partial response. */
1164
+ fields?: string;
1165
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1166
+ key?: string;
1167
+ /** OAuth 2.0 token for the current user. */
1168
+ oauth_token?: string;
1169
+ /** Required. The parent eventStore name, such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`. */
1170
+ parent: string;
1171
+ /** Returns response with indentations and line breaks. */
1172
+ prettyPrint?: boolean;
1173
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1174
+ quotaUser?: string;
1175
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1176
+ upload_protocol?: string;
1177
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1178
+ uploadType?: string;
1179
+ /**
1180
+ * Optional. The url including cgi-parameters but excluding the hash fragment. The URL must be truncated to 1.5K bytes to conservatively be under the 2K bytes. This is often more
1181
+ * useful than the referer url, because many browsers only send the domain for 3rd party requests.
1182
+ */
1183
+ uri?: string;
1184
+ /** Required. URL encoded UserEvent proto. */
1185
+ userEvent?: string;
1186
+ }): Request<GoogleApiHttpBody>;
1187
+ /**
1188
+ * Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events.
1189
+ * Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.
1190
+ */
1191
+ import(request: {
1192
+ /** V1 error format. */
1193
+ "$.xgafv"?: string;
1194
+ /** OAuth access token. */
1195
+ access_token?: string;
1196
+ /** Data format for response. */
1197
+ alt?: string;
1198
+ /** JSONP */
1199
+ callback?: string;
1200
+ /** Selector specifying which fields to include in a partial response. */
1201
+ fields?: string;
1202
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1203
+ key?: string;
1204
+ /** OAuth 2.0 token for the current user. */
1205
+ oauth_token?: string;
1206
+ /** Required. `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store` */
1207
+ parent: string;
1208
+ /** Returns response with indentations and line breaks. */
1209
+ prettyPrint?: boolean;
1210
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1211
+ quotaUser?: string;
1212
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1213
+ upload_protocol?: string;
1214
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1215
+ uploadType?: string;
1216
+ /** Request body */
1217
+ resource: GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest;
1218
+ }): Request<GoogleLongrunningOperation>;
1219
+ import(request: {
1220
+ /** V1 error format. */
1221
+ "$.xgafv"?: string;
1222
+ /** OAuth access token. */
1223
+ access_token?: string;
1224
+ /** Data format for response. */
1225
+ alt?: string;
1226
+ /** JSONP */
1227
+ callback?: string;
1228
+ /** Selector specifying which fields to include in a partial response. */
1229
+ fields?: string;
1230
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1231
+ key?: string;
1232
+ /** OAuth 2.0 token for the current user. */
1233
+ oauth_token?: string;
1234
+ /** Required. `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store` */
1235
+ parent: string;
1236
+ /** Returns response with indentations and line breaks. */
1237
+ prettyPrint?: boolean;
1238
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1239
+ quotaUser?: string;
1240
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1241
+ upload_protocol?: string;
1242
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1243
+ uploadType?: string;
1244
+ },
1245
+ body: GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest): Request<GoogleLongrunningOperation>;
1246
+ /**
1247
+ * 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
1248
+ * ingested 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
1249
+ * in the current catalog, it could lead to degraded model quality. This is called an unjoined event.
1250
+ */
1251
+ list(request?: {
1252
+ /** V1 error format. */
1253
+ "$.xgafv"?: string;
1254
+ /** OAuth access token. */
1255
+ access_token?: string;
1256
+ /** Data format for response. */
1257
+ alt?: string;
1258
+ /** JSONP */
1259
+ callback?: string;
1260
+ /** Selector specifying which fields to include in a partial response. */
1261
+ fields?: string;
1262
+ /**
1263
+ * Optional. Filtering expression to specify restrictions over returned events. This is a sequence of terms, where each term applies some kind of a restriction to the returned user
1264
+ * events. Use this expression to restrict results to a specific time range, or filter events by eventType. eg: eventTime > "2012-04-23T18:25:43.511Z" eventsMissingCatalogItems
1265
+ * eventTime<"2012-04-23T18:25:43.511Z" eventType=search We expect only 3 types of fields: * eventTime: this can be specified a maximum of 2 times, once with a less than operator
1266
+ * and once with a greater than operator. The eventTime restrict should result in one contiguous valid eventTime range. * eventType: only 1 eventType restriction can be specified.
1267
+ * * eventsMissingCatalogItems: specififying this will restrict results to events for which catalog items were not found in the catalog. The default behavior is to return only
1268
+ * those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: eventTime > "2012-04-23T18:25:43.511Z" eventTime <
1269
+ * "2012-04-23T18:30:43.511Z" * Example 2: eventTime > "2012-04-23T18:25:43.511Z" eventType = detail-page-view * Example 3: eventsMissingCatalogItems eventType = search eventTime <
1270
+ * "2018-04-23T18:30:43.511Z" * Example 4: eventTime > "2012-04-23T18:25:43.511Z" * Example 5: eventType = search * Example 6: eventsMissingCatalogItems
1271
+ */
1272
+ filter?: string;
1273
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1274
+ key?: string;
1275
+ /** OAuth 2.0 token for the current user. */
1276
+ oauth_token?: string;
1277
+ /** Optional. Maximum number of results to return per page. If zero, the service will choose a reasonable default. */
1278
+ pageSize?: number;
1279
+ /** Optional. The previous ListUserEventsResponse.next_page_token. */
1280
+ pageToken?: string;
1281
+ /** Required. The parent eventStore resource name, such as `projects/*‍/locations/*‍/catalogs/default_catalog/eventStores/default_event_store`. */
1282
+ parent: string;
1283
+ /** Returns response with indentations and line breaks. */
1284
+ prettyPrint?: boolean;
1285
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1286
+ quotaUser?: string;
1287
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1288
+ upload_protocol?: string;
1289
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1290
+ uploadType?: string;
1291
+ }): Request<GoogleCloudRecommendationengineV1beta1ListUserEventsResponse>;
1292
+ /**
1293
+ * 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.
1294
+ * To test a filter, use the list command first.
1295
+ */
1296
+ purge(request: {
1297
+ /** V1 error format. */
1298
+ "$.xgafv"?: string;
1299
+ /** OAuth access token. */
1300
+ access_token?: string;
1301
+ /** Data format for response. */
1302
+ alt?: string;
1303
+ /** JSONP */
1304
+ callback?: string;
1305
+ /** Selector specifying which fields to include in a partial response. */
1306
+ fields?: string;
1307
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1308
+ key?: string;
1309
+ /** OAuth 2.0 token for the current user. */
1310
+ oauth_token?: string;
1311
+ /**
1312
+ * Required. The resource name of the event_store under which the events are created. The format is
1313
+ * `projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId}`
1314
+ */
1315
+ parent: string;
1316
+ /** Returns response with indentations and line breaks. */
1317
+ prettyPrint?: boolean;
1318
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1319
+ quotaUser?: string;
1320
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1321
+ upload_protocol?: string;
1322
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1323
+ uploadType?: string;
1324
+ /** Request body */
1325
+ resource: GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest;
1326
+ }): Request<GoogleLongrunningOperation>;
1327
+ purge(request: {
1328
+ /** V1 error format. */
1329
+ "$.xgafv"?: string;
1330
+ /** OAuth access token. */
1331
+ access_token?: string;
1332
+ /** Data format for response. */
1333
+ alt?: string;
1334
+ /** JSONP */
1335
+ callback?: string;
1336
+ /** Selector specifying which fields to include in a partial response. */
1337
+ fields?: string;
1338
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1339
+ key?: string;
1340
+ /** OAuth 2.0 token for the current user. */
1341
+ oauth_token?: string;
1342
+ /**
1343
+ * Required. The resource name of the event_store under which the events are created. The format is
1344
+ * `projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId}`
1345
+ */
1346
+ parent: string;
1347
+ /** Returns response with indentations and line breaks. */
1348
+ prettyPrint?: boolean;
1349
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1350
+ quotaUser?: string;
1351
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1352
+ upload_protocol?: string;
1353
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1354
+ uploadType?: string;
1355
+ },
1356
+ body: GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest): Request<GoogleLongrunningOperation>;
1357
+ /**
1358
+ * 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
1359
+ * is 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
1360
+ * latest version of catalog items. It can also be used to correct events joined with wrong catalog items.
1361
+ */
1362
+ rejoin(request: {
1363
+ /** V1 error format. */
1364
+ "$.xgafv"?: string;
1365
+ /** OAuth access token. */
1366
+ access_token?: string;
1367
+ /** Data format for response. */
1368
+ alt?: string;
1369
+ /** JSONP */
1370
+ callback?: string;
1371
+ /** Selector specifying which fields to include in a partial response. */
1372
+ fields?: string;
1373
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1374
+ key?: string;
1375
+ /** OAuth 2.0 token for the current user. */
1376
+ oauth_token?: string;
1377
+ /** Required. Full resource name of user event, such as `projects/*‍/locations/*‍/catalogs/default_catalog/eventStores/default_event_store`. */
1378
+ parent: string;
1379
+ /** Returns response with indentations and line breaks. */
1380
+ prettyPrint?: boolean;
1381
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1382
+ quotaUser?: string;
1383
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1384
+ upload_protocol?: string;
1385
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1386
+ uploadType?: string;
1387
+ /** Request body */
1388
+ resource: GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest;
1389
+ }): Request<GoogleLongrunningOperation>;
1390
+ rejoin(request: {
1391
+ /** V1 error format. */
1392
+ "$.xgafv"?: string;
1393
+ /** OAuth access token. */
1394
+ access_token?: string;
1395
+ /** Data format for response. */
1396
+ alt?: string;
1397
+ /** JSONP */
1398
+ callback?: string;
1399
+ /** Selector specifying which fields to include in a partial response. */
1400
+ fields?: string;
1401
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1402
+ key?: string;
1403
+ /** OAuth 2.0 token for the current user. */
1404
+ oauth_token?: string;
1405
+ /** Required. Full resource name of user event, such as `projects/*‍/locations/*‍/catalogs/default_catalog/eventStores/default_event_store`. */
1406
+ parent: string;
1407
+ /** Returns response with indentations and line breaks. */
1408
+ prettyPrint?: boolean;
1409
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1410
+ quotaUser?: string;
1411
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1412
+ upload_protocol?: string;
1413
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1414
+ uploadType?: string;
1415
+ },
1416
+ body: GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest): Request<GoogleLongrunningOperation>;
1417
+ /** Writes a single user event. */
1418
+ write(request: {
1419
+ /** V1 error format. */
1420
+ "$.xgafv"?: string;
1421
+ /** OAuth access token. */
1422
+ access_token?: string;
1423
+ /** Data format for response. */
1424
+ alt?: string;
1425
+ /** JSONP */
1426
+ callback?: string;
1427
+ /** Selector specifying which fields to include in a partial response. */
1428
+ fields?: string;
1429
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1430
+ key?: string;
1431
+ /** OAuth 2.0 token for the current user. */
1432
+ oauth_token?: string;
1433
+ /** Required. The parent eventStore resource name, such as "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store". */
1434
+ parent: string;
1435
+ /** Returns response with indentations and line breaks. */
1436
+ prettyPrint?: boolean;
1437
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1438
+ quotaUser?: string;
1439
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1440
+ upload_protocol?: string;
1441
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1442
+ uploadType?: string;
1443
+ /** Request body */
1444
+ resource: GoogleCloudRecommendationengineV1beta1UserEvent;
1445
+ }): Request<GoogleCloudRecommendationengineV1beta1UserEvent>;
1446
+ write(request: {
1447
+ /** V1 error format. */
1448
+ "$.xgafv"?: string;
1449
+ /** OAuth access token. */
1450
+ access_token?: string;
1451
+ /** Data format for response. */
1452
+ alt?: string;
1453
+ /** JSONP */
1454
+ callback?: string;
1455
+ /** Selector specifying which fields to include in a partial response. */
1456
+ fields?: string;
1457
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1458
+ key?: string;
1459
+ /** OAuth 2.0 token for the current user. */
1460
+ oauth_token?: string;
1461
+ /** Required. The parent eventStore resource name, such as "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store". */
1462
+ parent: string;
1463
+ /** Returns response with indentations and line breaks. */
1464
+ prettyPrint?: boolean;
1465
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1466
+ quotaUser?: string;
1467
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1468
+ upload_protocol?: string;
1469
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1470
+ uploadType?: string;
1471
+ },
1472
+ body: GoogleCloudRecommendationengineV1beta1UserEvent): Request<GoogleCloudRecommendationengineV1beta1UserEvent>;
1473
+ }
1474
+ interface EventStoresResource {
1475
+ operations: OperationsResource;
1476
+ placements: PlacementsResource;
1477
+ predictionApiKeyRegistrations: PredictionApiKeyRegistrationsResource;
1478
+ userEvents: UserEventsResource;
1479
+ }
1480
+ interface OperationsResource {
1481
+ /** 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. */
1482
+ get(request?: {
1483
+ /** V1 error format. */
1484
+ "$.xgafv"?: string;
1485
+ /** OAuth access token. */
1486
+ access_token?: string;
1487
+ /** Data format for response. */
1488
+ alt?: string;
1489
+ /** JSONP */
1490
+ callback?: string;
1491
+ /** Selector specifying which fields to include in a partial response. */
1492
+ fields?: string;
1493
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1494
+ key?: string;
1495
+ /** The name of the operation resource. */
1496
+ name: string;
1497
+ /** OAuth 2.0 token for the current user. */
1498
+ oauth_token?: string;
1499
+ /** Returns response with indentations and line breaks. */
1500
+ prettyPrint?: boolean;
1501
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1502
+ quotaUser?: string;
1503
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1504
+ upload_protocol?: string;
1505
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1506
+ uploadType?: string;
1507
+ }): Request<GoogleLongrunningOperation>;
1508
+ /**
1509
+ * 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
1510
+ * to 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
1511
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
1512
+ * ensure the name binding is the parent resource, without the operations collection id.
1513
+ */
1514
+ list(request?: {
1515
+ /** V1 error format. */
1516
+ "$.xgafv"?: string;
1517
+ /** OAuth access token. */
1518
+ access_token?: string;
1519
+ /** Data format for response. */
1520
+ alt?: string;
1521
+ /** JSONP */
1522
+ callback?: string;
1523
+ /** Selector specifying which fields to include in a partial response. */
1524
+ fields?: string;
1525
+ /** The standard list filter. */
1526
+ filter?: string;
1527
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1528
+ key?: string;
1529
+ /** The name of the operation's parent resource. */
1530
+ name: string;
1531
+ /** OAuth 2.0 token for the current user. */
1532
+ oauth_token?: string;
1533
+ /** The standard list page size. */
1534
+ pageSize?: number;
1535
+ /** The standard list page token. */
1536
+ pageToken?: string;
1537
+ /** Returns response with indentations and line breaks. */
1538
+ prettyPrint?: boolean;
1539
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1540
+ quotaUser?: string;
1541
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1542
+ upload_protocol?: string;
1543
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1544
+ uploadType?: string;
1545
+ }): Request<GoogleLongrunningListOperationsResponse>;
1546
+ }
1547
+ interface CatalogsResource {
1548
+ /** Lists all the catalog configurations associated with the project. */
1549
+ list(request?: {
1550
+ /** V1 error format. */
1551
+ "$.xgafv"?: string;
1552
+ /** OAuth access token. */
1553
+ access_token?: string;
1554
+ /** Data format for response. */
1555
+ alt?: string;
1556
+ /** JSONP */
1557
+ callback?: string;
1558
+ /** Selector specifying which fields to include in a partial response. */
1559
+ fields?: string;
1560
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1561
+ key?: string;
1562
+ /** OAuth 2.0 token for the current user. */
1563
+ oauth_token?: string;
1564
+ /** Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. */
1565
+ pageSize?: number;
1566
+ /** Optional. A page token, received from a previous `ListCatalogs` call. Provide this to retrieve the subsequent page. */
1567
+ pageToken?: string;
1568
+ /** Required. The account resource name with an associated location. */
1569
+ parent: string;
1570
+ /** Returns response with indentations and line breaks. */
1571
+ prettyPrint?: boolean;
1572
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1573
+ quotaUser?: string;
1574
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1575
+ upload_protocol?: string;
1576
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1577
+ uploadType?: string;
1578
+ }): Request<GoogleCloudRecommendationengineV1beta1ListCatalogsResponse>;
1579
+ /** Updates the catalog configuration. */
1580
+ patch(request: {
1581
+ /** V1 error format. */
1582
+ "$.xgafv"?: string;
1583
+ /** OAuth access token. */
1584
+ access_token?: string;
1585
+ /** Data format for response. */
1586
+ alt?: string;
1587
+ /** JSONP */
1588
+ callback?: string;
1589
+ /** Selector specifying which fields to include in a partial response. */
1590
+ fields?: string;
1591
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1592
+ key?: string;
1593
+ /** The fully qualified resource name of the catalog. */
1594
+ name: string;
1595
+ /** OAuth 2.0 token for the current user. */
1596
+ oauth_token?: string;
1597
+ /** Returns response with indentations and line breaks. */
1598
+ prettyPrint?: boolean;
1599
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1600
+ quotaUser?: string;
1601
+ /**
1602
+ * Optional. Indicates which fields in the provided 'catalog' to update. If not set, will only update the catalog_item_level_config field. Currently only fields that can be updated
1603
+ * are catalog_item_level_config.
1604
+ */
1605
+ updateMask?: string;
1606
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1607
+ upload_protocol?: string;
1608
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1609
+ uploadType?: string;
1610
+ /** Request body */
1611
+ resource: GoogleCloudRecommendationengineV1beta1Catalog;
1612
+ }): Request<GoogleCloudRecommendationengineV1beta1Catalog>;
1613
+ patch(request: {
1614
+ /** V1 error format. */
1615
+ "$.xgafv"?: string;
1616
+ /** OAuth access token. */
1617
+ access_token?: string;
1618
+ /** Data format for response. */
1619
+ alt?: string;
1620
+ /** JSONP */
1621
+ callback?: string;
1622
+ /** Selector specifying which fields to include in a partial response. */
1623
+ fields?: string;
1624
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1625
+ key?: string;
1626
+ /** The fully qualified resource name of the catalog. */
1627
+ name: string;
1628
+ /** OAuth 2.0 token for the current user. */
1629
+ oauth_token?: string;
1630
+ /** Returns response with indentations and line breaks. */
1631
+ prettyPrint?: boolean;
1632
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1633
+ quotaUser?: string;
1634
+ /**
1635
+ * Optional. Indicates which fields in the provided 'catalog' to update. If not set, will only update the catalog_item_level_config field. Currently only fields that can be updated
1636
+ * are catalog_item_level_config.
1637
+ */
1638
+ updateMask?: string;
1639
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1640
+ upload_protocol?: string;
1641
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1642
+ uploadType?: string;
1643
+ },
1644
+ body: GoogleCloudRecommendationengineV1beta1Catalog): Request<GoogleCloudRecommendationengineV1beta1Catalog>;
1645
+ catalogItems: CatalogItemsResource;
1646
+ eventStores: EventStoresResource;
1647
+ operations: OperationsResource;
1648
+ }
1649
+ interface LocationsResource {
1650
+ catalogs: CatalogsResource;
1651
+ }
1652
+ interface ProjectsResource {
1653
+ locations: LocationsResource;
1654
+ }
1655
+
1656
+ const projects: ProjectsResource;
1657
+ }
1658
+ }