@maxim_mazurok/gapi.client.retail-v2alpha 0.3.20260723 → 0.3.20260813
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 +13 -3
- package/package.json +2 -2
- package/readme.md +4 -4
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Type definitions for non-npm package
|
|
1
|
+
/* Type definitions for non-npm package AI Commerce Search API v2alpha 0.0 */
|
|
2
2
|
// Project: https://cloud.google.com/recommendations
|
|
3
3
|
// Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
|
|
4
4
|
// Nick Amoscato <https://github.com/namoscato>
|
|
@@ -9,12 +9,12 @@
|
|
|
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: 20260813
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
16
16
|
declare namespace gapi.client {
|
|
17
|
-
/** Load
|
|
17
|
+
/** Load AI Commerce Search API v2alpha */
|
|
18
18
|
function load(
|
|
19
19
|
urlOrObject: 'https://retail.googleapis.com/$discovery/rest?version=v2alpha',
|
|
20
20
|
): Promise<void>;
|
|
@@ -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;
|
|
@@ -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. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxim_mazurok/gapi.client.retail-v2alpha",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "TypeScript typings for
|
|
3
|
+
"version": "0.3.20260813",
|
|
4
|
+
"description": "TypeScript typings for AI Commerce Search API v2alpha",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
package/readme.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# TypeScript typings for
|
|
1
|
+
# TypeScript typings for AI Commerce Search API v2alpha
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The AI Commerce Search API is made up of Retail Search, Browse and Recommendations. These discovery AI solutions help you implement personalized search, browse and recommendations, based on machine learning models, across your websites and mobile applications.
|
|
4
4
|
For detailed description please check [documentation](https://cloud.google.com/recommendations).
|
|
5
5
|
|
|
6
6
|
## Installing
|
|
7
7
|
|
|
8
|
-
Install typings for
|
|
8
|
+
Install typings for AI Commerce Search API:
|
|
9
9
|
|
|
10
10
|
```
|
|
11
11
|
npm install @types/gapi.client.retail-v2alpha --save-dev
|
|
@@ -78,7 +78,7 @@ gapi.auth.authorize(
|
|
|
78
78
|
);
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
After that you can use
|
|
81
|
+
After that you can use AI Commerce Search API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
82
82
|
|
|
83
83
|
```typescript
|
|
84
84
|
/*
|