@maxim_mazurok/gapi.client.retail-v2alpha 0.0.20230622 → 0.0.20230706

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 (4) hide show
  1. package/index.d.ts +286 -1
  2. package/package.json +1 -1
  3. package/readme.md +15 -0
  4. package/tests.ts +24 -1
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: 20230622
12
+ // Revision: 20230706
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -118,6 +118,9 @@ declare namespace gapi.client {
118
118
  // tslint:disable-next-line:no-empty-interface
119
119
  interface GoogleCloudRetailV2AddLocalInventoriesResponse {
120
120
  }
121
+ // tslint:disable-next-line:no-empty-interface
122
+ interface GoogleCloudRetailV2alphaAcceptTermsRequest {
123
+ }
121
124
  interface GoogleCloudRetailV2alphaAddCatalogAttributeRequest {
122
125
  /** Required. The CatalogAttribute to add. */
123
126
  catalogAttribute?:
@@ -588,6 +591,28 @@ declare namespace gapi.client {
588
591
  text?:
589
592
  string[];
590
593
  }
594
+ // tslint:disable-next-line:no-empty-interface
595
+ interface GoogleCloudRetailV2alphaEnrollSolutionMetadata {
596
+ }
597
+ interface GoogleCloudRetailV2alphaEnrollSolutionRequest {
598
+ /**
599
+ * Solution use case to enroll. Currently settable for Browse to enroll. It should be only set when [solution] is set as SolutionType.SOLUTION_TYPE_SEARCH or an INVALID_ARGUMENT error
600
+ * is thrown.
601
+ */
602
+ searchSolutionUseCase?:
603
+ string;
604
+ /** Required. Solution to enroll. */
605
+ solution?:
606
+ string;
607
+ }
608
+ interface GoogleCloudRetailV2alphaEnrollSolutionResponse {
609
+ /** Retail API solution that the project has enrolled. */
610
+ enrolledSolution?:
611
+ string;
612
+ /** Search solution use case that the project has enrolled. */
613
+ searchSolutionUseCase?:
614
+ string;
615
+ }
591
616
  interface GoogleCloudRetailV2alphaExperimentInfo {
592
617
  /**
593
618
  * The fully qualified resource name of the experiment that provides the serving config under test, should an active experiment exist. For example:
@@ -853,6 +878,11 @@ declare namespace gapi.client {
853
878
  nextPageToken?:
854
879
  string;
855
880
  }
881
+ interface GoogleCloudRetailV2alphaListEnrolledSolutionsResponse {
882
+ /** Retail API solutions that the project has enrolled. */
883
+ enrolledSolutions?:
884
+ string[];
885
+ }
856
886
  interface GoogleCloudRetailV2alphaListMerchantCenterAccountLinksResponse {
857
887
  /** The links. */
858
888
  merchantCenterAccountLinks?:
@@ -1566,6 +1596,14 @@ declare namespace gapi.client {
1566
1596
  merchantCenterProductIdField?:
1567
1597
  string;
1568
1598
  }
1599
+ interface GoogleCloudRetailV2alphaProject {
1600
+ /** Output only. Retail API solutions that the project has enrolled. */
1601
+ enrolledSolutions?:
1602
+ string[];
1603
+ /** Output only. Full resource name of the retail project, such as `projects/{project_id_or_number}/retailProject`. */
1604
+ name?:
1605
+ string;
1606
+ }
1569
1607
  interface GoogleCloudRetailV2alphaPromotion {
1570
1608
  /**
1571
1609
  * Promotion identifier, which is the final component of name. For example, this field is "free_gift", if name is
@@ -8011,11 +8049,258 @@ declare namespace gapi.client {
8011
8049
  string;
8012
8050
  }): Request<GoogleLongrunningListOperationsResponse>;
8013
8051
  }
8052
+ interface RetailProjectResource {
8053
+ /** Accepts service terms for this project. By making requests to this API, you agree to the terms of service linked below. https://cloud.google.com/retail/data-use-terms */
8054
+ acceptTerms(request: {
8055
+ /** V1 error format. */
8056
+ "$.xgafv"?:
8057
+ string;
8058
+ /** OAuth access token. */
8059
+ access_token?:
8060
+ string;
8061
+ /** Data format for response. */
8062
+ alt?:
8063
+ string;
8064
+ /** JSONP */
8065
+ callback?:
8066
+ string;
8067
+ /** Selector specifying which fields to include in a partial response. */
8068
+ fields?:
8069
+ string;
8070
+ /** 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. */
8071
+ key?:
8072
+ string;
8073
+ /** OAuth 2.0 token for the current user. */
8074
+ oauth_token?:
8075
+ string;
8076
+ /** Returns response with indentations and line breaks. */
8077
+ prettyPrint?:
8078
+ boolean;
8079
+ /** Required. Full resource name of the project. Format: `projects/{project_number_or_id}/retailProject` */
8080
+ project:
8081
+ string;
8082
+ /** 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. */
8083
+ quotaUser?:
8084
+ string;
8085
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
8086
+ upload_protocol?:
8087
+ string;
8088
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
8089
+ uploadType?:
8090
+ string;
8091
+ /** Request body */
8092
+ resource:
8093
+ GoogleCloudRetailV2alphaAcceptTermsRequest;
8094
+ }): Request<GoogleCloudRetailV2alphaProject>;
8095
+ acceptTerms(request: {
8096
+ /** V1 error format. */
8097
+ "$.xgafv"?:
8098
+ string;
8099
+ /** OAuth access token. */
8100
+ access_token?:
8101
+ string;
8102
+ /** Data format for response. */
8103
+ alt?:
8104
+ string;
8105
+ /** JSONP */
8106
+ callback?:
8107
+ string;
8108
+ /** Selector specifying which fields to include in a partial response. */
8109
+ fields?:
8110
+ string;
8111
+ /** 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. */
8112
+ key?:
8113
+ string;
8114
+ /** OAuth 2.0 token for the current user. */
8115
+ oauth_token?:
8116
+ string;
8117
+ /** Returns response with indentations and line breaks. */
8118
+ prettyPrint?:
8119
+ boolean;
8120
+ /** Required. Full resource name of the project. Format: `projects/{project_number_or_id}/retailProject` */
8121
+ project:
8122
+ string;
8123
+ /** 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. */
8124
+ quotaUser?:
8125
+ string;
8126
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
8127
+ upload_protocol?:
8128
+ string;
8129
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
8130
+ uploadType?:
8131
+ string;
8132
+ },
8133
+ body: GoogleCloudRetailV2alphaAcceptTermsRequest): Request<GoogleCloudRetailV2alphaProject>;
8134
+ }
8014
8135
  interface ProjectsResource {
8136
+ /**
8137
+ * Enrolls retail API solution for the project. Recommendation solution is enrolled by default when your project enables Retail API. You don't need to call this API for the
8138
+ * recommendation solution.
8139
+ */
8140
+ enrollSolution(request: {
8141
+ /** V1 error format. */
8142
+ "$.xgafv"?:
8143
+ string;
8144
+ /** OAuth access token. */
8145
+ access_token?:
8146
+ string;
8147
+ /** Data format for response. */
8148
+ alt?:
8149
+ string;
8150
+ /** JSONP */
8151
+ callback?:
8152
+ string;
8153
+ /** Selector specifying which fields to include in a partial response. */
8154
+ fields?:
8155
+ string;
8156
+ /** 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. */
8157
+ key?:
8158
+ string;
8159
+ /** OAuth 2.0 token for the current user. */
8160
+ oauth_token?:
8161
+ string;
8162
+ /** Returns response with indentations and line breaks. */
8163
+ prettyPrint?:
8164
+ boolean;
8165
+ /** Required. Full resource name of parent. Format: `projects/{project_number_or_id}` */
8166
+ project:
8167
+ string;
8168
+ /** 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. */
8169
+ quotaUser?:
8170
+ string;
8171
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
8172
+ upload_protocol?:
8173
+ string;
8174
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
8175
+ uploadType?:
8176
+ string;
8177
+ /** Request body */
8178
+ resource:
8179
+ GoogleCloudRetailV2alphaEnrollSolutionRequest;
8180
+ }): Request<GoogleLongrunningOperation>;
8181
+ enrollSolution(request: {
8182
+ /** V1 error format. */
8183
+ "$.xgafv"?:
8184
+ string;
8185
+ /** OAuth access token. */
8186
+ access_token?:
8187
+ string;
8188
+ /** Data format for response. */
8189
+ alt?:
8190
+ string;
8191
+ /** JSONP */
8192
+ callback?:
8193
+ string;
8194
+ /** Selector specifying which fields to include in a partial response. */
8195
+ fields?:
8196
+ string;
8197
+ /** 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. */
8198
+ key?:
8199
+ string;
8200
+ /** OAuth 2.0 token for the current user. */
8201
+ oauth_token?:
8202
+ string;
8203
+ /** Returns response with indentations and line breaks. */
8204
+ prettyPrint?:
8205
+ boolean;
8206
+ /** Required. Full resource name of parent. Format: `projects/{project_number_or_id}` */
8207
+ project:
8208
+ string;
8209
+ /** 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. */
8210
+ quotaUser?:
8211
+ string;
8212
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
8213
+ upload_protocol?:
8214
+ string;
8215
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
8216
+ uploadType?:
8217
+ string;
8218
+ },
8219
+ body: GoogleCloudRetailV2alphaEnrollSolutionRequest): Request<GoogleLongrunningOperation>;
8220
+ /** Gets the project. Throws NOT_FOUND if the project wasn't initialized for Retail API Service. */
8221
+ getRetailProject(request?: {
8222
+ /** V1 error format. */
8223
+ "$.xgafv"?:
8224
+ string;
8225
+ /** OAuth access token. */
8226
+ access_token?:
8227
+ string;
8228
+ /** Data format for response. */
8229
+ alt?:
8230
+ string;
8231
+ /** JSONP */
8232
+ callback?:
8233
+ string;
8234
+ /** Selector specifying which fields to include in a partial response. */
8235
+ fields?:
8236
+ string;
8237
+ /** 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. */
8238
+ key?:
8239
+ string;
8240
+ /** Required. Full resource name of the project. Format: `projects/{project_number_or_id}/retailProject` */
8241
+ name:
8242
+ string;
8243
+ /** OAuth 2.0 token for the current user. */
8244
+ oauth_token?:
8245
+ string;
8246
+ /** Returns response with indentations and line breaks. */
8247
+ prettyPrint?:
8248
+ boolean;
8249
+ /** 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. */
8250
+ quotaUser?:
8251
+ string;
8252
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
8253
+ upload_protocol?:
8254
+ string;
8255
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
8256
+ uploadType?:
8257
+ string;
8258
+ }): Request<GoogleCloudRetailV2alphaProject>;
8259
+ /** Lists all the retail API solutions the project has enrolled. */
8260
+ listEnrolledSolutions(request?: {
8261
+ /** V1 error format. */
8262
+ "$.xgafv"?:
8263
+ string;
8264
+ /** OAuth access token. */
8265
+ access_token?:
8266
+ string;
8267
+ /** Data format for response. */
8268
+ alt?:
8269
+ string;
8270
+ /** JSONP */
8271
+ callback?:
8272
+ string;
8273
+ /** Selector specifying which fields to include in a partial response. */
8274
+ fields?:
8275
+ string;
8276
+ /** 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. */
8277
+ key?:
8278
+ string;
8279
+ /** OAuth 2.0 token for the current user. */
8280
+ oauth_token?:
8281
+ string;
8282
+ /** Required. Full resource name of parent. Format: `projects/{project_number_or_id}` */
8283
+ parent:
8284
+ string;
8285
+ /** Returns response with indentations and line breaks. */
8286
+ prettyPrint?:
8287
+ boolean;
8288
+ /** 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. */
8289
+ quotaUser?:
8290
+ string;
8291
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
8292
+ upload_protocol?:
8293
+ string;
8294
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
8295
+ uploadType?:
8296
+ string;
8297
+ }): Request<GoogleCloudRetailV2alphaListEnrolledSolutionsResponse>;
8015
8298
  locations:
8016
8299
  LocationsResource;
8017
8300
  operations:
8018
8301
  OperationsResource;
8302
+ retailProject:
8303
+ RetailProjectResource;
8019
8304
  }
8020
8305
 
8021
8306
  const projects: ProjectsResource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.retail-v2alpha",
3
- "version": "0.0.20230622",
3
+ "version": "0.0.20230706",
4
4
  "description": "TypeScript typings for Retail API v2alpha",
5
5
  "license": "MIT",
6
6
  "author": {
package/readme.md CHANGED
@@ -65,4 +65,19 @@ gapi.auth.authorize(
65
65
  After that you can use Retail API resources: <!-- TODO: make this work for multiple namespaces -->
66
66
 
67
67
  ```typescript
68
+
69
+ /*
70
+ Enrolls retail API solution for the project. Recommendation solution is enrolled by default when your project enables Retail API. You don't need to call this API for the recommendation solution.
71
+ */
72
+ await gapi.client.retail.projects.enrollSolution({ project: "project", });
73
+
74
+ /*
75
+ Gets the project. Throws NOT_FOUND if the project wasn't initialized for Retail API Service.
76
+ */
77
+ await gapi.client.retail.projects.getRetailProject({ name: "name", });
78
+
79
+ /*
80
+ Lists all the retail API solutions the project has enrolled.
81
+ */
82
+ await gapi.client.retail.projects.listEnrolledSolutions({ parent: "parent", });
68
83
  ```
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: 20230622
6
+ // Revision: 20230706
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -29,6 +29,24 @@ gapi.load('client', async () => {
29
29
  });
30
30
 
31
31
  async function run() {
32
+ /**
33
+ * Enrolls retail API solution for the project. Recommendation solution is enrolled by default when your project enables Retail API. You don't need to call this API for the recommendation
34
+ * solution.
35
+ */
36
+ await gapi.client.retail.projects.enrollSolution({
37
+ project: "Test string",
38
+ }, {
39
+ searchSolutionUseCase: "Test string",
40
+ solution: "Test string",
41
+ });
42
+ /** Gets the project. Throws NOT_FOUND if the project wasn't initialized for Retail API Service. */
43
+ await gapi.client.retail.projects.getRetailProject({
44
+ name: "Test string",
45
+ });
46
+ /** Lists all the retail API solutions the project has enrolled. */
47
+ await gapi.client.retail.projects.listEnrolledSolutions({
48
+ parent: "Test string",
49
+ });
32
50
  /**
33
51
  * Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this
34
52
  * feature.
@@ -2832,5 +2850,10 @@ gapi.load('client', async () => {
2832
2850
  pageSize: 42,
2833
2851
  pageToken: "Test string",
2834
2852
  });
2853
+ /** Accepts service terms for this project. By making requests to this API, you agree to the terms of service linked below. https://cloud.google.com/retail/data-use-terms */
2854
+ await gapi.client.retail.projects.retailProject.acceptTerms({
2855
+ project: "Test string",
2856
+ }, {
2857
+ });
2835
2858
  }
2836
2859
  });