@maxim_mazurok/gapi.client.retail-v2alpha 0.3.20260716 → 0.3.20260803
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 +20 -10
- package/package.json +1 -1
- package/readme.md +3 -3
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://retail.googleapis.com/$discovery/rest?version=v2alpha
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20260803
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -350,6 +350,8 @@ declare namespace gapi.client {
|
|
|
350
350
|
suggestions?: string[];
|
|
351
351
|
}
|
|
352
352
|
interface GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult {
|
|
353
|
+
/** Conversational prompts to trigger agents like Shopping Agent. There may be multiple prompts for a single suggestion. This is an experimental feature for select customers. If you want to receive this prompt information, reach out to the Retail support team. */
|
|
354
|
+
agentPrompts?: GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResultAgentPrompt[];
|
|
353
355
|
/** Custom attributes for the suggestion term. * For `user-data`, the attributes are additional custom attributes ingested through BigQuery. * For `cloud-retail`, the attributes are product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly. */
|
|
354
356
|
attributes?: {[P in string]: GoogleCloudRetailV2alphaCustomAttribute};
|
|
355
357
|
/** Facet information for the suggestion term. Gives the number of items resulting from a search with this suggestion term for each facet. This is an experimental feature for limited customers. If you want to receive this facet information, reach out to the Retail support team. */
|
|
@@ -359,6 +361,10 @@ declare namespace gapi.client {
|
|
|
359
361
|
/** Total number of products associated with a search with this suggestion. This is an experimental feature for limited customers. If you want to receive this product count information, reach out to the Retail support team. */
|
|
360
362
|
totalProductCount?: number;
|
|
361
363
|
}
|
|
364
|
+
interface GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResultAgentPrompt {
|
|
365
|
+
/** The conversational prompt string. */
|
|
366
|
+
prompt?: string;
|
|
367
|
+
}
|
|
362
368
|
interface GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult {
|
|
363
369
|
/** The recent search query. */
|
|
364
370
|
recentSearch?: string;
|
|
@@ -574,7 +580,7 @@ declare namespace gapi.client {
|
|
|
574
580
|
| 'SOLUTION_TYPE_SEARCH';
|
|
575
581
|
}
|
|
576
582
|
interface GoogleCloudRetailV2alphaEnrollSolutionResponse {
|
|
577
|
-
/**
|
|
583
|
+
/** AI Commerce Search API solution that the project has enrolled. */
|
|
578
584
|
enrolledSolution?:
|
|
579
585
|
| 'SOLUTION_TYPE_UNSPECIFIED'
|
|
580
586
|
| 'SOLUTION_TYPE_RECOMMENDATION'
|
|
@@ -828,7 +834,7 @@ declare namespace gapi.client {
|
|
|
828
834
|
nextPageToken?: string;
|
|
829
835
|
}
|
|
830
836
|
interface GoogleCloudRetailV2alphaListEnrolledSolutionsResponse {
|
|
831
|
-
/**
|
|
837
|
+
/** AI Commerce Search API solutions that the project has enrolled. */
|
|
832
838
|
enrolledSolutions?:
|
|
833
839
|
| 'SOLUTION_TYPE_UNSPECIFIED'
|
|
834
840
|
| 'SOLUTION_TYPE_RECOMMENDATION'
|
|
@@ -1261,7 +1267,7 @@ declare namespace gapi.client {
|
|
|
1261
1267
|
merchantCenterProductIdField?: string;
|
|
1262
1268
|
}
|
|
1263
1269
|
interface GoogleCloudRetailV2alphaProject {
|
|
1264
|
-
/** Output only.
|
|
1270
|
+
/** Output only. AI Commerce Search API solutions that the project has enrolled. */
|
|
1265
1271
|
enrolledSolutions?:
|
|
1266
1272
|
| 'SOLUTION_TYPE_UNSPECIFIED'
|
|
1267
1273
|
| 'SOLUTION_TYPE_RECOMMENDATION'
|
|
@@ -1494,6 +1500,8 @@ declare namespace gapi.client {
|
|
|
1494
1500
|
canonicalFilter?: string;
|
|
1495
1501
|
/** Optional. This field specifies all conversational related parameters addition to traditional retail search. */
|
|
1496
1502
|
conversationalSearchSpec?: GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpec;
|
|
1503
|
+
/** Optional. A set of controls that are applied dynamically to the search request. These controls are applied in addition to the controls specified in the serving config. These controls are expected to not yet be persisted in storage. A control could be applied twice if it is in both the serving config and specified here. A maximum of 5 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. */
|
|
1504
|
+
dynamicControls?: GoogleCloudRetailV2alphaControl[];
|
|
1497
1505
|
/** Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic facets. Do not set this field. The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. */
|
|
1498
1506
|
dynamicFacetSpec?: GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec;
|
|
1499
1507
|
/** The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. If this is set, it should be exactly matched with UserEvent.entity to get search results boosted by entity. */
|
|
@@ -1504,6 +1512,8 @@ declare namespace gapi.client {
|
|
|
1504
1512
|
facetSpecs?: GoogleCloudRetailV2alphaSearchRequestFacetSpec[];
|
|
1505
1513
|
/** The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. Filter expression is case-sensitive. For more information, see [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter). If this field is unrecognizable, an INVALID_ARGUMENT is returned. */
|
|
1506
1514
|
filter?: string;
|
|
1515
|
+
/** Optional. A list of control IDs to ignore. These controls will not be applied to the search request, even if they are specified in the serving config. */
|
|
1516
|
+
ignoredControlIds?: string[];
|
|
1507
1517
|
/** The labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. For more information, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) in the Resource Manager documentation. */
|
|
1508
1518
|
labels?: {[P in string]: string};
|
|
1509
1519
|
/** Optional. The BCP-47 language code, such as "en-US" or "sr-Latn" [list](https://www.unicode.org/cldr/charts/46/summary/root.html). For more information, see [Standardized codes](https://google.aip.dev/143). This field helps to better interpret the query. If a value isn't specified, the query language code is automatically detected, which may not be accurate. */
|
|
@@ -1836,7 +1846,7 @@ declare namespace gapi.client {
|
|
|
1836
1846
|
updateMask?: string;
|
|
1837
1847
|
}
|
|
1838
1848
|
interface GoogleCloudRetailV2alphaUserEvent {
|
|
1839
|
-
/** Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the
|
|
1849
|
+
/** Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the AI Commerce Search API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways. */
|
|
1840
1850
|
attributes?: {[P in string]: GoogleCloudRetailV2alphaCustomAttribute};
|
|
1841
1851
|
/** Highly recommended for user events that are the result of PredictionService.Predict. This field enables accurate attribution of recommendation model performance. The value must be a valid PredictResponse.attribution_token for user events that are the result of PredictionService.Predict. The value must be a valid SearchResponse.attribution_token for user events that are the result of SearchService.Search. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass PredictResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the PredictResponse.attribution_token to this field. */
|
|
1842
1852
|
attributionToken?: string;
|
|
@@ -1850,7 +1860,7 @@ declare namespace gapi.client {
|
|
|
1850
1860
|
eventTime?: string;
|
|
1851
1861
|
/** Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `remove-from-cart`: Products being removed from cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart. */
|
|
1852
1862
|
eventType?: string;
|
|
1853
|
-
/** 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 experiment setups (
|
|
1863
|
+
/** 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 experiment setups (such as by using AI Commerce Search API, or using different recommendation models). */
|
|
1854
1864
|
experimentIds?: string[];
|
|
1855
1865
|
/** The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. See SearchRequest.filter for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. */
|
|
1856
1866
|
filter?: string;
|
|
@@ -4960,7 +4970,7 @@ declare namespace gapi.client {
|
|
|
4960
4970
|
): Request<GoogleCloudRetailV2alphaSearchResponse>;
|
|
4961
4971
|
}
|
|
4962
4972
|
interface UserEventsResource {
|
|
4963
|
-
/** Writes a single user event from the browser. For larger user event payload over 16 KB, the POST method should be used instead, otherwise a 400 Bad Request error is returned. This method is used only by the
|
|
4973
|
+
/** Writes a single user event from the browser. For larger user event payload over 16 KB, the POST method should be used instead, otherwise a 400 Bad Request error is returned. This method is used only by the AI Commerce Search API JavaScript pixel and Google Tag Manager. Users should not call this method directly. */
|
|
4964
4974
|
collect(request: {
|
|
4965
4975
|
/** V1 error format. */
|
|
4966
4976
|
'$.xgafv'?: '1' | '2';
|
|
@@ -6217,7 +6227,7 @@ declare namespace gapi.client {
|
|
|
6217
6227
|
): Request<GoogleCloudRetailV2alphaProject>;
|
|
6218
6228
|
}
|
|
6219
6229
|
interface ProjectsResource {
|
|
6220
|
-
/** The method enrolls a solution of type Retail Search into a project. The Recommendations AI solution type is enrolled by default when your project enables
|
|
6230
|
+
/** The method enrolls a solution of type Retail Search into a project. The Recommendations AI solution type is enrolled by default when your project enables AI Commerce Search API, so you don't need to call the enrollSolution method for recommendations. */
|
|
6221
6231
|
enrollSolution(request: {
|
|
6222
6232
|
/** V1 error format. */
|
|
6223
6233
|
'$.xgafv'?: '1' | '2';
|
|
@@ -6329,7 +6339,7 @@ declare namespace gapi.client {
|
|
|
6329
6339
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
6330
6340
|
uploadType?: string;
|
|
6331
6341
|
}): Request<GoogleCloudRetailV2alphaLoggingConfig>;
|
|
6332
|
-
/** Gets the project. Throws `NOT_FOUND` if the project wasn't initialized for the
|
|
6342
|
+
/** Gets the project. Throws `NOT_FOUND` if the project wasn't initialized for the AI Commerce Search API service. */
|
|
6333
6343
|
getRetailProject(request?: {
|
|
6334
6344
|
/** V1 error format. */
|
|
6335
6345
|
'$.xgafv'?: '1' | '2';
|
|
@@ -6356,7 +6366,7 @@ declare namespace gapi.client {
|
|
|
6356
6366
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
6357
6367
|
uploadType?: string;
|
|
6358
6368
|
}): Request<GoogleCloudRetailV2alphaProject>;
|
|
6359
|
-
/** Lists all the
|
|
6369
|
+
/** Lists all the AI Commerce Search API solutions the project has enrolled. */
|
|
6360
6370
|
listEnrolledSolutions(request?: {
|
|
6361
6371
|
/** V1 error format. */
|
|
6362
6372
|
'$.xgafv'?: '1' | '2';
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -82,7 +82,7 @@ After that you can use Vertex AI Search for commerce API resources: <!-- TODO: m
|
|
|
82
82
|
|
|
83
83
|
```typescript
|
|
84
84
|
/*
|
|
85
|
-
The method enrolls a solution of type Retail Search into a project. The Recommendations AI solution type is enrolled by default when your project enables
|
|
85
|
+
The method enrolls a solution of type Retail Search into a project. The Recommendations AI solution type is enrolled by default when your project enables AI Commerce Search API, so you don't need to call the enrollSolution method for recommendations.
|
|
86
86
|
*/
|
|
87
87
|
await gapi.client.retail.projects.enrollSolution({project: 'project'});
|
|
88
88
|
|
|
@@ -97,12 +97,12 @@ Gets the LoggingConfig of the requested project.
|
|
|
97
97
|
await gapi.client.retail.projects.getLoggingConfig({name: 'name'});
|
|
98
98
|
|
|
99
99
|
/*
|
|
100
|
-
Gets the project. Throws `NOT_FOUND` if the project wasn't initialized for the
|
|
100
|
+
Gets the project. Throws `NOT_FOUND` if the project wasn't initialized for the AI Commerce Search API service.
|
|
101
101
|
*/
|
|
102
102
|
await gapi.client.retail.projects.getRetailProject({name: 'name'});
|
|
103
103
|
|
|
104
104
|
/*
|
|
105
|
-
Lists all the
|
|
105
|
+
Lists all the AI Commerce Search API solutions the project has enrolled.
|
|
106
106
|
*/
|
|
107
107
|
await gapi.client.retail.projects.listEnrolledSolutions({parent: 'parent'});
|
|
108
108
|
|