@maxim_mazurok/gapi.client.retail-v2alpha 0.0.20230321 → 0.0.20230406

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.
Files changed (3) hide show
  1. package/index.d.ts +27 -14
  2. package/package.json +1 -1
  3. package/tests.ts +8 -8
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: 20230321
12
+ // Revision: 20230406
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -329,8 +329,18 @@ declare namespace gapi.client {
329
329
  * product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly.
330
330
  */
331
331
  attributes?: { [P in string]: GoogleCloudRetailV2alphaCustomAttribute };
332
+ /**
333
+ * 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
334
+ * customers. Please reach out to the support team if you would like to receive this information.
335
+ */
336
+ facets?: GoogleCloudRetailV2alphaSearchResponseFacet[];
332
337
  /** The suggestion for the query. */
333
338
  suggestion?: string;
339
+ /**
340
+ * Total number of products associated with a search with this suggestion. This is an experimental feature for limited customers. Please reach out to the support team if you would like
341
+ * to receive this information.
342
+ */
343
+ totalProductCount?: number;
334
344
  }
335
345
  interface GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult {
336
346
  /** The recent search query. */
@@ -1497,11 +1507,6 @@ declare namespace gapi.client {
1497
1507
  synonyms?: string[];
1498
1508
  }
1499
1509
  interface GoogleCloudRetailV2alphaSearchRequest {
1500
- /**
1501
- * Represents the banner in request, for projects that combine banners. For example: a retailer can sell products under different banners like retailer-main, retailer-baby,
1502
- * retailer-meds, etc. under one project.
1503
- */
1504
- banner?: string;
1505
1510
  /**
1506
1511
  * Boost specification to boost certain products. See more details at this [user guide](https://cloud.google.com/retail/docs/boosting). Notice that if both
1507
1512
  * ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the
@@ -1524,7 +1529,12 @@ declare namespace gapi.client {
1524
1529
  * that only textual facets can be dynamically generated.
1525
1530
  */
1526
1531
  dynamicFacetSpec?: GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec;
1527
- /** Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. */
1532
+ /**
1533
+ * 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
1534
+ * this is set, it should be exactly matched with UserEvent.entity to get search results boosted by entity.
1535
+ */
1536
+ entity?: string;
1537
+ /** Facet specifications for faceted search. If empty, no facets are returned. A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. */
1528
1538
  facetSpecs?: GoogleCloudRetailV2alphaSearchRequestFacetSpec[];
1529
1539
  /**
1530
1540
  * 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. See
@@ -2002,11 +2012,6 @@ declare namespace gapi.client {
2002
2012
  * recording events on product K's page, log the PredictResponse.attribution_token to this field.
2003
2013
  */
2004
2014
  attributionToken?: string;
2005
- /**
2006
- * Represents the banner of the user event, for projects that combine banners. For example: retailer can have events from multiple banners like retailer-main, retailer-baby,
2007
- * retailer-meds, etc. under one project.
2008
- */
2009
- banner?: string;
2010
2015
  /**
2011
2016
  * 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 `add-to-cart`,
2012
2017
  * `purchase-complete`, or `shopping-cart-page-view` events.
@@ -2014,6 +2019,11 @@ declare namespace gapi.client {
2014
2019
  cartId?: string;
2015
2020
  /** The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search. */
2016
2021
  completionDetail?: GoogleCloudRetailV2alphaCompletionDetail;
2022
+ /**
2023
+ * 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. It
2024
+ * is recommended to set this field to get better per-entity search, completion and prediction results.
2025
+ */
2026
+ entity?: string;
2017
2027
  /** Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. */
2018
2028
  eventTime?: string;
2019
2029
  /**
@@ -5386,8 +5396,6 @@ declare namespace gapi.client {
5386
5396
  access_token?: string;
5387
5397
  /** Data format for response. */
5388
5398
  alt?: string;
5389
- /** The banner context for completion suggestions. */
5390
- banner?: string;
5391
5399
  /** JSONP */
5392
5400
  callback?: string;
5393
5401
  /** Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*‍/locations/global/catalogs/default_catalog`. */
@@ -5406,6 +5414,11 @@ declare namespace gapi.client {
5406
5414
  deviceType?: string;
5407
5415
  /** If true, attribute suggestions are enabled and provided in response. This field is only available for "cloud-retail" dataset. */
5408
5416
  enableAttributeSuggestions?: boolean;
5417
+ /**
5418
+ * 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.
5419
+ * If this is set, it should be exactly matched with UserEvent.entity to get per-entity autocomplete results.
5420
+ */
5421
+ entity?: string;
5409
5422
  /** Selector specifying which fields to include in a partial response. */
5410
5423
  fields?: string;
5411
5424
  /** 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. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.retail-v2alpha",
3
- "version": "0.0.20230321",
3
+ "version": "0.0.20230406",
4
4
  "description": "TypeScript typings for Retail API v2alpha",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230321
6
+ // Revision: 20230406
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -34,11 +34,11 @@ gapi.load('client', async () => {
34
34
  * feature.
35
35
  */
36
36
  await gapi.client.retail.projects.locations.catalogs.completeQuery({
37
- banner: "Test string",
38
37
  catalog: "Test string",
39
38
  dataset: "Test string",
40
39
  deviceType: "Test string",
41
40
  enableAttributeSuggestions: true,
41
+ entity: "Test string",
42
42
  languageCodes: "Test string",
43
43
  maxSuggestions: 42,
44
44
  query: "Test string",
@@ -1548,13 +1548,13 @@ gapi.load('client', async () => {
1548
1548
  }
1549
1549
  },
1550
1550
  attributionToken: "Test string",
1551
- banner: "Test string",
1552
1551
  cartId: "Test string",
1553
1552
  completionDetail: {
1554
1553
  completionAttributionToken: "Test string",
1555
1554
  selectedPosition: 42,
1556
1555
  selectedSuggestion: "Test string",
1557
1556
  },
1557
+ entity: "Test string",
1558
1558
  eventTime: "Test string",
1559
1559
  eventType: "Test string",
1560
1560
  experimentIds: [
@@ -1759,7 +1759,6 @@ gapi.load('client', async () => {
1759
1759
  await gapi.client.retail.projects.locations.catalogs.placements.search({
1760
1760
  placement: "Test string",
1761
1761
  }, {
1762
- banner: "Test string",
1763
1762
  boostSpec: {
1764
1763
  conditionBoostSpecs: [
1765
1764
  {
@@ -1774,6 +1773,7 @@ gapi.load('client', async () => {
1774
1773
  dynamicFacetSpec: {
1775
1774
  mode: "Test string",
1776
1775
  },
1776
+ entity: "Test string",
1777
1777
  facetSpecs: [
1778
1778
  {
1779
1779
  enableDynamicPosition: true,
@@ -1991,13 +1991,13 @@ gapi.load('client', async () => {
1991
1991
  }
1992
1992
  },
1993
1993
  attributionToken: "Test string",
1994
- banner: "Test string",
1995
1994
  cartId: "Test string",
1996
1995
  completionDetail: {
1997
1996
  completionAttributionToken: "Test string",
1998
1997
  selectedPosition: 42,
1999
1998
  selectedSuggestion: "Test string",
2000
1999
  },
2000
+ entity: "Test string",
2001
2001
  eventTime: "Test string",
2002
2002
  eventType: "Test string",
2003
2003
  experimentIds: [
@@ -2208,7 +2208,6 @@ gapi.load('client', async () => {
2208
2208
  await gapi.client.retail.projects.locations.catalogs.servingConfigs.search({
2209
2209
  placement: "Test string",
2210
2210
  }, {
2211
- banner: "Test string",
2212
2211
  boostSpec: {
2213
2212
  conditionBoostSpecs: [
2214
2213
  {
@@ -2223,6 +2222,7 @@ gapi.load('client', async () => {
2223
2222
  dynamicFacetSpec: {
2224
2223
  mode: "Test string",
2225
2224
  },
2225
+ entity: "Test string",
2226
2226
  facetSpecs: [
2227
2227
  {
2228
2228
  enableDynamicPosition: true,
@@ -2348,13 +2348,13 @@ gapi.load('client', async () => {
2348
2348
  }
2349
2349
  },
2350
2350
  attributionToken: "Test string",
2351
- banner: "Test string",
2352
2351
  cartId: "Test string",
2353
2352
  completionDetail: {
2354
2353
  completionAttributionToken: "Test string",
2355
2354
  selectedPosition: 42,
2356
2355
  selectedSuggestion: "Test string",
2357
2356
  },
2357
+ entity: "Test string",
2358
2358
  eventTime: "Test string",
2359
2359
  eventType: "Test string",
2360
2360
  experimentIds: [
@@ -2595,13 +2595,13 @@ gapi.load('client', async () => {
2595
2595
  }
2596
2596
  },
2597
2597
  attributionToken: "Test string",
2598
- banner: "Test string",
2599
2598
  cartId: "Test string",
2600
2599
  completionDetail: {
2601
2600
  completionAttributionToken: "Test string",
2602
2601
  selectedPosition: 42,
2603
2602
  selectedSuggestion: "Test string",
2604
2603
  },
2604
+ entity: "Test string",
2605
2605
  eventTime: "Test string",
2606
2606
  eventType: "Test string",
2607
2607
  experimentIds: [