@maxim_mazurok/gapi.client.retail-v2alpha 0.0.20230921 → 0.0.20231005

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 +170 -1
  2. package/package.json +1 -1
  3. package/readme.md +10 -0
  4. package/tests.ts +25 -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: 20230921
12
+ // Revision: 20231005
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -986,6 +986,43 @@ declare namespace gapi.client {
986
986
  priceInfo?:
987
987
  GoogleCloudRetailV2alphaPriceInfo;
988
988
  }
989
+ interface GoogleCloudRetailV2alphaLoggingConfig {
990
+ /** The log generation rule that applies by default to all services supporting log generation. It can be overridden by ServiceLogGenerationRule for service level control. */
991
+ defaultLogGenerationRule?:
992
+ GoogleCloudRetailV2alphaLoggingConfigLogGenerationRule;
993
+ /** Required. Immutable. The name of the LoggingConfig singleton resource. Format: projects/*‍/loggingConfig */
994
+ name?:
995
+ string;
996
+ /**
997
+ * Controls logging configurations more granularly for each supported service. This overrides the default_log_generation_rule for the services specified. For those not mentioned, they
998
+ * will fallback to the default log generation rule.
999
+ */
1000
+ serviceLogGenerationRules?:
1001
+ GoogleCloudRetailV2alphaLoggingConfigServiceLogGenerationRule[];
1002
+ }
1003
+ interface GoogleCloudRetailV2alphaLoggingConfigLogGenerationRule {
1004
+ /**
1005
+ * The log sample rate for INFO level log entries. You can use this to reduce the number of entries generated for INFO level logs. DO NOT set this field if the logging_level is not
1006
+ * LoggingLevel.LOG_ALL. Otherwise, an INVALID_ARGUMENT error is returned. Sample rate for INFO logs defaults to 1 when unset (generate and send all INFO logs to Cloud Logging). Its
1007
+ * value must be greater than 0 and less than or equal to 1.
1008
+ */
1009
+ infoLogSampleRate?:
1010
+ number;
1011
+ /** The logging level. By default it is set to `LOG_WARNINGS_AND_ABOVE`. */
1012
+ loggingLevel?:
1013
+ string;
1014
+ }
1015
+ interface GoogleCloudRetailV2alphaLoggingConfigServiceLogGenerationRule {
1016
+ /** The log generation rule that applies to this service. */
1017
+ logGenerationRule?:
1018
+ GoogleCloudRetailV2alphaLoggingConfigLogGenerationRule;
1019
+ /**
1020
+ * Required. Supported service names: "CatalogService", "CompletionService", "ControlService", "MerchantCenterStreaming", "ModelService", "PredictionService", "ProductService",
1021
+ * "ServingConfigService", "UserEventService",
1022
+ */
1023
+ serviceName?:
1024
+ string;
1025
+ }
989
1026
  interface GoogleCloudRetailV2alphaMerchantCenterAccountLink {
990
1027
  /**
991
1028
  * Required. The branch ID (e.g. 0/1/2) within the catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the
@@ -8287,6 +8324,45 @@ declare namespace gapi.client {
8287
8324
  string;
8288
8325
  },
8289
8326
  body: GoogleCloudRetailV2alphaEnrollSolutionRequest): Request<GoogleLongrunningOperation>;
8327
+ /** Gets the LoggingConfig of the requested project. */
8328
+ getLoggingConfig(request?: {
8329
+ /** V1 error format. */
8330
+ "$.xgafv"?:
8331
+ string;
8332
+ /** OAuth access token. */
8333
+ access_token?:
8334
+ string;
8335
+ /** Data format for response. */
8336
+ alt?:
8337
+ string;
8338
+ /** JSONP */
8339
+ callback?:
8340
+ string;
8341
+ /** Selector specifying which fields to include in a partial response. */
8342
+ fields?:
8343
+ string;
8344
+ /** 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. */
8345
+ key?:
8346
+ string;
8347
+ /** Required. Full LoggingConfig resource name. Format: projects/{project_number}/loggingConfig */
8348
+ name:
8349
+ string;
8350
+ /** OAuth 2.0 token for the current user. */
8351
+ oauth_token?:
8352
+ string;
8353
+ /** Returns response with indentations and line breaks. */
8354
+ prettyPrint?:
8355
+ boolean;
8356
+ /** 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. */
8357
+ quotaUser?:
8358
+ string;
8359
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
8360
+ upload_protocol?:
8361
+ string;
8362
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
8363
+ uploadType?:
8364
+ string;
8365
+ }): Request<GoogleCloudRetailV2alphaLoggingConfig>;
8290
8366
  /** Gets the project. Throws `NOT_FOUND` if the project wasn't initialized for the Retail API service. */
8291
8367
  getRetailProject(request?: {
8292
8368
  /** V1 error format. */
@@ -8365,6 +8441,99 @@ declare namespace gapi.client {
8365
8441
  uploadType?:
8366
8442
  string;
8367
8443
  }): Request<GoogleCloudRetailV2alphaListEnrolledSolutionsResponse>;
8444
+ /** Updates the LoggingConfig of the requested project. */
8445
+ updateLoggingConfig(request: {
8446
+ /** V1 error format. */
8447
+ "$.xgafv"?:
8448
+ string;
8449
+ /** OAuth access token. */
8450
+ access_token?:
8451
+ string;
8452
+ /** Data format for response. */
8453
+ alt?:
8454
+ string;
8455
+ /** JSONP */
8456
+ callback?:
8457
+ string;
8458
+ /** Selector specifying which fields to include in a partial response. */
8459
+ fields?:
8460
+ string;
8461
+ /** 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. */
8462
+ key?:
8463
+ string;
8464
+ /** Required. Immutable. The name of the LoggingConfig singleton resource. Format: projects/*‍/loggingConfig */
8465
+ name:
8466
+ string;
8467
+ /** OAuth 2.0 token for the current user. */
8468
+ oauth_token?:
8469
+ string;
8470
+ /** Returns response with indentations and line breaks. */
8471
+ prettyPrint?:
8472
+ boolean;
8473
+ /** 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. */
8474
+ quotaUser?:
8475
+ string;
8476
+ /**
8477
+ * Indicates which fields in the provided LoggingConfig to update. The following are the only supported fields: * default_log_generation_rule * per_service_log_generation_rules If
8478
+ * not set, all supported fields are updated.
8479
+ */
8480
+ updateMask?:
8481
+ string;
8482
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
8483
+ upload_protocol?:
8484
+ string;
8485
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
8486
+ uploadType?:
8487
+ string;
8488
+ /** Request body */
8489
+ resource:
8490
+ GoogleCloudRetailV2alphaLoggingConfig;
8491
+ }): Request<GoogleCloudRetailV2alphaLoggingConfig>;
8492
+ updateLoggingConfig(request: {
8493
+ /** V1 error format. */
8494
+ "$.xgafv"?:
8495
+ string;
8496
+ /** OAuth access token. */
8497
+ access_token?:
8498
+ string;
8499
+ /** Data format for response. */
8500
+ alt?:
8501
+ string;
8502
+ /** JSONP */
8503
+ callback?:
8504
+ string;
8505
+ /** Selector specifying which fields to include in a partial response. */
8506
+ fields?:
8507
+ string;
8508
+ /** 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. */
8509
+ key?:
8510
+ string;
8511
+ /** Required. Immutable. The name of the LoggingConfig singleton resource. Format: projects/*‍/loggingConfig */
8512
+ name:
8513
+ string;
8514
+ /** OAuth 2.0 token for the current user. */
8515
+ oauth_token?:
8516
+ string;
8517
+ /** Returns response with indentations and line breaks. */
8518
+ prettyPrint?:
8519
+ boolean;
8520
+ /** 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. */
8521
+ quotaUser?:
8522
+ string;
8523
+ /**
8524
+ * Indicates which fields in the provided LoggingConfig to update. The following are the only supported fields: * default_log_generation_rule * per_service_log_generation_rules If
8525
+ * not set, all supported fields are updated.
8526
+ */
8527
+ updateMask?:
8528
+ string;
8529
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
8530
+ upload_protocol?:
8531
+ string;
8532
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
8533
+ uploadType?:
8534
+ string;
8535
+ },
8536
+ body: GoogleCloudRetailV2alphaLoggingConfig): Request<GoogleCloudRetailV2alphaLoggingConfig>;
8368
8537
  locations:
8369
8538
  LocationsResource;
8370
8539
  operations:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.retail-v2alpha",
3
- "version": "0.0.20230921",
3
+ "version": "0.0.20231005",
4
4
  "description": "TypeScript typings for Retail API v2alpha",
5
5
  "license": "MIT",
6
6
  "author": {
package/readme.md CHANGED
@@ -71,6 +71,11 @@ The method enrolls a solution of type Retail Search into a project. The Recommen
71
71
  */
72
72
  await gapi.client.retail.projects.enrollSolution({ project: "project", });
73
73
 
74
+ /*
75
+ Gets the LoggingConfig of the requested project.
76
+ */
77
+ await gapi.client.retail.projects.getLoggingConfig({ name: "name", });
78
+
74
79
  /*
75
80
  Gets the project. Throws `NOT_FOUND` if the project wasn't initialized for the Retail API service.
76
81
  */
@@ -80,4 +85,9 @@ await gapi.client.retail.projects.getRetailProject({ name: "name", });
80
85
  Lists all the retail API solutions the project has enrolled.
81
86
  */
82
87
  await gapi.client.retail.projects.listEnrolledSolutions({ parent: "parent", });
88
+
89
+ /*
90
+ Updates the LoggingConfig of the requested project.
91
+ */
92
+ await gapi.client.retail.projects.updateLoggingConfig({ name: "name", });
83
93
  ```
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: 20230921
6
+ // Revision: 20231005
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -38,6 +38,10 @@ gapi.load('client', async () => {
38
38
  }, {
39
39
  solution: "Test string",
40
40
  });
41
+ /** Gets the LoggingConfig of the requested project. */
42
+ await gapi.client.retail.projects.getLoggingConfig({
43
+ name: "Test string",
44
+ });
41
45
  /** Gets the project. Throws `NOT_FOUND` if the project wasn't initialized for the Retail API service. */
42
46
  await gapi.client.retail.projects.getRetailProject({
43
47
  name: "Test string",
@@ -46,6 +50,26 @@ gapi.load('client', async () => {
46
50
  await gapi.client.retail.projects.listEnrolledSolutions({
47
51
  parent: "Test string",
48
52
  });
53
+ /** Updates the LoggingConfig of the requested project. */
54
+ await gapi.client.retail.projects.updateLoggingConfig({
55
+ name: "Test string",
56
+ updateMask: "Test string",
57
+ }, {
58
+ defaultLogGenerationRule: {
59
+ infoLogSampleRate: 42,
60
+ loggingLevel: "Test string",
61
+ },
62
+ name: "Test string",
63
+ serviceLogGenerationRules: [
64
+ {
65
+ logGenerationRule: {
66
+ infoLogSampleRate: 42,
67
+ loggingLevel: "Test string",
68
+ },
69
+ serviceName: "Test string",
70
+ }
71
+ ],
72
+ });
49
73
  /**
50
74
  * 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
51
75
  * feature.