@googleapis/merchantapi 11.0.0 → 13.0.0

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 (100) hide show
  1. package/CHANGELOG.md +227 -0
  2. package/accounts_v1.ts +14278 -0
  3. package/accounts_v1beta.ts +160 -6
  4. package/build/accounts_v1.d.ts +8168 -0
  5. package/build/accounts_v1.js +2632 -0
  6. package/build/accounts_v1.js.map +1 -0
  7. package/build/accounts_v1beta.d.ts +74 -7
  8. package/build/accounts_v1beta.js +78 -1
  9. package/build/accounts_v1beta.js.map +1 -1
  10. package/build/conversions_v1.d.ts +748 -0
  11. package/build/conversions_v1.js +256 -0
  12. package/build/conversions_v1.js.map +1 -0
  13. package/build/conversions_v1beta.d.ts +0 -1
  14. package/build/conversions_v1beta.js +6 -1
  15. package/build/conversions_v1beta.js.map +1 -1
  16. package/build/datasources_v1.d.ts +1075 -0
  17. package/build/datasources_v1.js +297 -0
  18. package/build/datasources_v1.js.map +1 -0
  19. package/build/datasources_v1beta.d.ts +0 -1
  20. package/build/datasources_v1beta.js +8 -1
  21. package/build/datasources_v1beta.js.map +1 -1
  22. package/build/index.d.ts +60 -0
  23. package/build/index.js +38 -2
  24. package/build/index.js.map +1 -1
  25. package/build/inventories_v1.d.ts +766 -0
  26. package/build/inventories_v1.js +280 -0
  27. package/build/inventories_v1.js.map +1 -0
  28. package/build/inventories_v1beta.d.ts +0 -1
  29. package/build/inventories_v1beta.js +10 -1
  30. package/build/inventories_v1beta.js.map +1 -1
  31. package/build/issueresolution_v1.d.ts +1026 -0
  32. package/build/issueresolution_v1.js +202 -0
  33. package/build/issueresolution_v1.js.map +1 -0
  34. package/build/issueresolution_v1beta.d.ts +0 -1
  35. package/build/issueresolution_v1beta.js +8 -1
  36. package/build/issueresolution_v1beta.js.map +1 -1
  37. package/build/lfp_v1.d.ts +1047 -0
  38. package/build/lfp_v1.js +315 -0
  39. package/build/lfp_v1.js.map +1 -0
  40. package/build/lfp_v1beta.d.ts +1 -2
  41. package/build/lfp_v1beta.js +12 -1
  42. package/build/lfp_v1beta.js.map +1 -1
  43. package/build/notifications_v1.d.ts +579 -0
  44. package/build/notifications_v1.js +227 -0
  45. package/build/notifications_v1.js.map +1 -0
  46. package/build/notifications_v1beta.d.ts +0 -1
  47. package/build/notifications_v1beta.js +6 -1
  48. package/build/notifications_v1beta.js.map +1 -1
  49. package/build/ordertracking_v1.d.ts +458 -0
  50. package/build/ordertracking_v1.js +96 -0
  51. package/build/ordertracking_v1.js.map +1 -0
  52. package/build/ordertracking_v1beta.d.ts +4 -1
  53. package/build/ordertracking_v1beta.js +6 -1
  54. package/build/ordertracking_v1beta.js.map +1 -1
  55. package/build/products_v1.d.ts +1555 -0
  56. package/build/products_v1.js +233 -0
  57. package/build/products_v1.js.map +1 -0
  58. package/build/products_v1beta.d.ts +3 -4
  59. package/build/products_v1beta.js +8 -1
  60. package/build/products_v1beta.js.map +1 -1
  61. package/build/promotions_v1.d.ts +698 -0
  62. package/build/promotions_v1.js +160 -0
  63. package/build/promotions_v1.js.map +1 -0
  64. package/build/promotions_v1beta.d.ts +4 -5
  65. package/build/promotions_v1beta.js +6 -1
  66. package/build/promotions_v1beta.js.map +1 -1
  67. package/build/quota_v1.d.ts +283 -0
  68. package/build/quota_v1.js +96 -0
  69. package/build/quota_v1.js.map +1 -0
  70. package/build/quota_v1beta.d.ts +0 -1
  71. package/build/quota_v1beta.js +6 -1
  72. package/build/quota_v1beta.js.map +1 -1
  73. package/build/reports_v1.d.ts +1065 -0
  74. package/build/reports_v1.js +96 -0
  75. package/build/reports_v1.js.map +1 -0
  76. package/build/reports_v1beta.d.ts +1 -2
  77. package/build/reports_v1beta.js +6 -1
  78. package/build/reports_v1beta.js.map +1 -1
  79. package/build/reviews_v1beta.d.ts +0 -1
  80. package/build/reviews_v1beta.js +8 -1
  81. package/build/reviews_v1beta.js.map +1 -1
  82. package/build/tsconfig.tsbuildinfo +1 -0
  83. package/conversions_v1.ts +1284 -0
  84. package/datasources_v1.ts +1690 -0
  85. package/index.ts +142 -0
  86. package/inventories_v1.ts +1321 -0
  87. package/issueresolution_v1.ts +1425 -0
  88. package/lfp_v1.ts +1666 -0
  89. package/lfp_v1beta.ts +1 -1
  90. package/notifications_v1.ts +1052 -0
  91. package/ordertracking_v1.ts +599 -0
  92. package/ordertracking_v1beta.ts +4 -0
  93. package/package.json +4 -4
  94. package/products_v1.ts +2013 -0
  95. package/products_v1beta.ts +3 -3
  96. package/promotions_v1.ts +995 -0
  97. package/promotions_v1beta.ts +4 -4
  98. package/quota_v1.ts +424 -0
  99. package/reports_v1.ts +1205 -0
  100. package/reports_v1beta.ts +1 -1
@@ -844,9 +844,9 @@ export namespace merchantapi_promotions_v1beta {
844
844
  *
845
845
  * // Do the magic
846
846
  * const res = await merchantapi.accounts.promotions.list({
847
- * // Output only. The maximum number of promotions to return. The service may return fewer than this value. The maximum value is 250; values above 250 will be coerced to 250. If unspecified, the maximum number of promotions will be returned.
847
+ * // Optional. The maximum number of promotions to return. The service may return fewer than this value. The maximum value is 250; values above 250 will be coerced to 250. If unspecified, the maximum number of promotions will be returned.
848
848
  * pageSize: 'placeholder-value',
849
- * // Output only. A page token, received from a previous `ListPromotions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotions` must match the call that provided the page token.
849
+ * // Optional. A page token, received from a previous `ListPromotions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotions` must match the call that provided the page token.
850
850
  * pageToken: 'placeholder-value',
851
851
  * // Required. The account to list processed promotions for. Format: `accounts/{account\}`
852
852
  * parent: 'accounts/my-account',
@@ -980,11 +980,11 @@ export namespace merchantapi_promotions_v1beta {
980
980
  export interface Params$Resource$Accounts$Promotions$List
981
981
  extends StandardParameters {
982
982
  /**
983
- * Output only. The maximum number of promotions to return. The service may return fewer than this value. The maximum value is 250; values above 250 will be coerced to 250. If unspecified, the maximum number of promotions will be returned.
983
+ * Optional. The maximum number of promotions to return. The service may return fewer than this value. The maximum value is 250; values above 250 will be coerced to 250. If unspecified, the maximum number of promotions will be returned.
984
984
  */
985
985
  pageSize?: number;
986
986
  /**
987
- * Output only. A page token, received from a previous `ListPromotions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotions` must match the call that provided the page token.
987
+ * Optional. A page token, received from a previous `ListPromotions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotions` must match the call that provided the page token.
988
988
  */
989
989
  pageToken?: string;
990
990
  /**
package/quota_v1.ts ADDED
@@ -0,0 +1,424 @@
1
+ // Copyright 2020 Google LLC
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ /* eslint-disable @typescript-eslint/no-explicit-any */
15
+ /* eslint-disable @typescript-eslint/no-unused-vars */
16
+ /* eslint-disable @typescript-eslint/no-empty-interface */
17
+ /* eslint-disable @typescript-eslint/no-namespace */
18
+ /* eslint-disable no-irregular-whitespace */
19
+
20
+ import {
21
+ OAuth2Client,
22
+ JWT,
23
+ Compute,
24
+ UserRefreshClient,
25
+ BaseExternalAccountClient,
26
+ GaxiosResponseWithHTTP2,
27
+ GoogleConfigurable,
28
+ createAPIRequest,
29
+ MethodOptions,
30
+ StreamMethodOptions,
31
+ GlobalOptions,
32
+ GoogleAuth,
33
+ BodyResponseCallback,
34
+ APIRequestContext,
35
+ } from 'googleapis-common';
36
+ import {Readable} from 'stream';
37
+
38
+ export namespace merchantapi_quota_v1 {
39
+ export interface Options extends GlobalOptions {
40
+ version: 'quota_v1';
41
+ }
42
+
43
+ interface StandardParameters {
44
+ /**
45
+ * Auth client or API Key for the request
46
+ */
47
+ auth?:
48
+ | string
49
+ | OAuth2Client
50
+ | JWT
51
+ | Compute
52
+ | UserRefreshClient
53
+ | BaseExternalAccountClient
54
+ | GoogleAuth;
55
+
56
+ /**
57
+ * V1 error format.
58
+ */
59
+ '$.xgafv'?: string;
60
+ /**
61
+ * OAuth access token.
62
+ */
63
+ access_token?: string;
64
+ /**
65
+ * Data format for response.
66
+ */
67
+ alt?: string;
68
+ /**
69
+ * JSONP
70
+ */
71
+ callback?: string;
72
+ /**
73
+ * Selector specifying which fields to include in a partial response.
74
+ */
75
+ fields?: string;
76
+ /**
77
+ * 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.
78
+ */
79
+ key?: string;
80
+ /**
81
+ * OAuth 2.0 token for the current user.
82
+ */
83
+ oauth_token?: string;
84
+ /**
85
+ * Returns response with indentations and line breaks.
86
+ */
87
+ prettyPrint?: boolean;
88
+ /**
89
+ * 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.
90
+ */
91
+ quotaUser?: string;
92
+ /**
93
+ * Legacy upload protocol for media (e.g. "media", "multipart").
94
+ */
95
+ uploadType?: string;
96
+ /**
97
+ * Upload protocol for media (e.g. "raw", "multipart").
98
+ */
99
+ upload_protocol?: string;
100
+ }
101
+
102
+ /**
103
+ * Merchant API
104
+ *
105
+ * Programmatically manage your Merchant Center Accounts.
106
+ *
107
+ * @example
108
+ * ```js
109
+ * const {google} = require('googleapis');
110
+ * const merchantapi = google.merchantapi('quota_v1');
111
+ * ```
112
+ */
113
+ export class Merchantapi {
114
+ context: APIRequestContext;
115
+ accounts: Resource$Accounts;
116
+
117
+ constructor(options: GlobalOptions, google?: GoogleConfigurable) {
118
+ this.context = {
119
+ _options: options || {},
120
+ google,
121
+ };
122
+
123
+ this.accounts = new Resource$Accounts(this.context);
124
+ }
125
+ }
126
+
127
+ /**
128
+ * Response message for the ListMethodGroups method.
129
+ */
130
+ export interface Schema$ListQuotaGroupsResponse {
131
+ /**
132
+ * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
133
+ */
134
+ nextPageToken?: string | null;
135
+ /**
136
+ * The methods, current quota usage and limits per each group. The quota is shared between all methods in the group. The groups are sorted in descending order based on quota_usage.
137
+ */
138
+ quotaGroups?: Schema$QuotaGroup[];
139
+ }
140
+ /**
141
+ * The method details per method in the Merchant API.
142
+ */
143
+ export interface Schema$MethodDetails {
144
+ /**
145
+ * Output only. The name of the method for example `products.list`.
146
+ */
147
+ method?: string | null;
148
+ /**
149
+ * Output only. The path for the method such as `products/v1/productInputs.insert`
150
+ */
151
+ path?: string | null;
152
+ /**
153
+ * Output only. The sub-API that the method belongs to.
154
+ */
155
+ subapi?: string | null;
156
+ /**
157
+ * Output only. The API version that the method belongs to.
158
+ */
159
+ version?: string | null;
160
+ }
161
+ /**
162
+ * The change that happened to the product including old value, new value, country code as the region code and reporting context.
163
+ */
164
+ export interface Schema$ProductChange {
165
+ /**
166
+ * The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
167
+ */
168
+ newValue?: string | null;
169
+ /**
170
+ * The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
171
+ */
172
+ oldValue?: string | null;
173
+ /**
174
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
175
+ */
176
+ regionCode?: string | null;
177
+ /**
178
+ * Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)
179
+ */
180
+ reportingContext?: string | null;
181
+ }
182
+ /**
183
+ * The message that the merchant will receive to notify about product status change event
184
+ */
185
+ export interface Schema$ProductStatusChangeMessage {
186
+ /**
187
+ * The target account that owns the entity that changed. Format : `accounts/{merchant_id\}`
188
+ */
189
+ account?: string | null;
190
+ /**
191
+ * The attribute in the resource that changed, in this case it will be always `Status`.
192
+ */
193
+ attribute?: string | null;
194
+ /**
195
+ * A message to describe the change that happened to the product
196
+ */
197
+ changes?: Schema$ProductChange[];
198
+ /**
199
+ * The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications.
200
+ */
201
+ eventTime?: string | null;
202
+ /**
203
+ * Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
204
+ */
205
+ expirationTime?: string | null;
206
+ /**
207
+ * The account that manages the merchant's account. can be the same as merchant id if it is standalone account. Format : `accounts/{service_provider_id\}`
208
+ */
209
+ managingAccount?: string | null;
210
+ /**
211
+ * The product name. Format: `accounts/{account\}/products/{product\}`
212
+ */
213
+ resource?: string | null;
214
+ /**
215
+ * The product id.
216
+ */
217
+ resourceId?: string | null;
218
+ /**
219
+ * The resource that changed, in this case it will always be `Product`.
220
+ */
221
+ resourceType?: string | null;
222
+ }
223
+ /**
224
+ * The group information for methods in the Merchant API. The quota is shared between all methods in the group. Even if none of the methods within the group have usage the information for the group is returned.
225
+ */
226
+ export interface Schema$QuotaGroup {
227
+ /**
228
+ * Output only. List of all methods group quota applies to.
229
+ */
230
+ methodDetails?: Schema$MethodDetails[];
231
+ /**
232
+ * Identifier. The resource name of the quota group. Format: accounts/{account\}/quotas/{group\} Note: There is no guarantee on the format of {group\}
233
+ */
234
+ name?: string | null;
235
+ /**
236
+ * Output only. The maximum number of calls allowed per day for the group.
237
+ */
238
+ quotaLimit?: string | null;
239
+ /**
240
+ * Output only. The maximum number of calls allowed per minute for the group.
241
+ */
242
+ quotaMinuteLimit?: string | null;
243
+ /**
244
+ * Output only. The current quota usage, meaning the number of calls already made on a given day to the methods in the group. The daily quota limits reset at at 12:00 PM midday UTC.
245
+ */
246
+ quotaUsage?: string | null;
247
+ }
248
+
249
+ export class Resource$Accounts {
250
+ context: APIRequestContext;
251
+ quotas: Resource$Accounts$Quotas;
252
+ constructor(context: APIRequestContext) {
253
+ this.context = context;
254
+ this.quotas = new Resource$Accounts$Quotas(this.context);
255
+ }
256
+ }
257
+
258
+ export class Resource$Accounts$Quotas {
259
+ context: APIRequestContext;
260
+ constructor(context: APIRequestContext) {
261
+ this.context = context;
262
+ }
263
+
264
+ /**
265
+ * Lists the daily call quota and usage per group for your Merchant Center account.
266
+ * @example
267
+ * ```js
268
+ * // Before running the sample:
269
+ * // - Enable the API at:
270
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
271
+ * // - Login into gcloud by running:
272
+ * // ```sh
273
+ * // $ gcloud auth application-default login
274
+ * // ```
275
+ * // - Install the npm module by running:
276
+ * // ```sh
277
+ * // $ npm install googleapis
278
+ * // ```
279
+ *
280
+ * const {google} = require('googleapis');
281
+ * const merchantapi = google.merchantapi('quota_v1');
282
+ *
283
+ * async function main() {
284
+ * const auth = new google.auth.GoogleAuth({
285
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
286
+ * scopes: ['https://www.googleapis.com/auth/content'],
287
+ * });
288
+ *
289
+ * // Acquire an auth client, and bind it to all future calls
290
+ * const authClient = await auth.getClient();
291
+ * google.options({auth: authClient});
292
+ *
293
+ * // Do the magic
294
+ * const res = await merchantapi.accounts.quotas.list({
295
+ * // Optional. The maximum number of quotas to return in the response, used for paging. Defaults to 500; values above 1000 will be coerced to 1000.
296
+ * pageSize: 'placeholder-value',
297
+ * // Optional. Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.
298
+ * pageToken: 'placeholder-value',
299
+ * // Required. The merchant account who owns the collection of method quotas Format: accounts/{account\}
300
+ * parent: 'accounts/my-account',
301
+ * });
302
+ * console.log(res.data);
303
+ *
304
+ * // Example response
305
+ * // {
306
+ * // "nextPageToken": "my_nextPageToken",
307
+ * // "quotaGroups": []
308
+ * // }
309
+ * }
310
+ *
311
+ * main().catch(e => {
312
+ * console.error(e);
313
+ * throw e;
314
+ * });
315
+ *
316
+ * ```
317
+ *
318
+ * @param params - Parameters for request
319
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
320
+ * @param callback - Optional callback that handles the response.
321
+ * @returns A promise if used with async/await, or void if used with a callback.
322
+ */
323
+ list(
324
+ params: Params$Resource$Accounts$Quotas$List,
325
+ options: StreamMethodOptions
326
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
327
+ list(
328
+ params?: Params$Resource$Accounts$Quotas$List,
329
+ options?: MethodOptions
330
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListQuotaGroupsResponse>>;
331
+ list(
332
+ params: Params$Resource$Accounts$Quotas$List,
333
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
334
+ callback: BodyResponseCallback<Readable>
335
+ ): void;
336
+ list(
337
+ params: Params$Resource$Accounts$Quotas$List,
338
+ options:
339
+ | MethodOptions
340
+ | BodyResponseCallback<Schema$ListQuotaGroupsResponse>,
341
+ callback: BodyResponseCallback<Schema$ListQuotaGroupsResponse>
342
+ ): void;
343
+ list(
344
+ params: Params$Resource$Accounts$Quotas$List,
345
+ callback: BodyResponseCallback<Schema$ListQuotaGroupsResponse>
346
+ ): void;
347
+ list(callback: BodyResponseCallback<Schema$ListQuotaGroupsResponse>): void;
348
+ list(
349
+ paramsOrCallback?:
350
+ | Params$Resource$Accounts$Quotas$List
351
+ | BodyResponseCallback<Schema$ListQuotaGroupsResponse>
352
+ | BodyResponseCallback<Readable>,
353
+ optionsOrCallback?:
354
+ | MethodOptions
355
+ | StreamMethodOptions
356
+ | BodyResponseCallback<Schema$ListQuotaGroupsResponse>
357
+ | BodyResponseCallback<Readable>,
358
+ callback?:
359
+ | BodyResponseCallback<Schema$ListQuotaGroupsResponse>
360
+ | BodyResponseCallback<Readable>
361
+ ):
362
+ | void
363
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListQuotaGroupsResponse>>
364
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
365
+ let params = (paramsOrCallback ||
366
+ {}) as Params$Resource$Accounts$Quotas$List;
367
+ let options = (optionsOrCallback || {}) as MethodOptions;
368
+
369
+ if (typeof paramsOrCallback === 'function') {
370
+ callback = paramsOrCallback;
371
+ params = {} as Params$Resource$Accounts$Quotas$List;
372
+ options = {};
373
+ }
374
+
375
+ if (typeof optionsOrCallback === 'function') {
376
+ callback = optionsOrCallback;
377
+ options = {};
378
+ }
379
+
380
+ const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
381
+ const parameters = {
382
+ options: Object.assign(
383
+ {
384
+ url: (rootUrl + '/quota/v1/{+parent}/quotas').replace(
385
+ /([^:]\/)\/+/g,
386
+ '$1'
387
+ ),
388
+ method: 'GET',
389
+ apiVersion: '',
390
+ },
391
+ options
392
+ ),
393
+ params,
394
+ requiredParams: ['parent'],
395
+ pathParams: ['parent'],
396
+ context: this.context,
397
+ };
398
+ if (callback) {
399
+ createAPIRequest<Schema$ListQuotaGroupsResponse>(
400
+ parameters,
401
+ callback as BodyResponseCallback<unknown>
402
+ );
403
+ } else {
404
+ return createAPIRequest<Schema$ListQuotaGroupsResponse>(parameters);
405
+ }
406
+ }
407
+ }
408
+
409
+ export interface Params$Resource$Accounts$Quotas$List
410
+ extends StandardParameters {
411
+ /**
412
+ * Optional. The maximum number of quotas to return in the response, used for paging. Defaults to 500; values above 1000 will be coerced to 1000.
413
+ */
414
+ pageSize?: number;
415
+ /**
416
+ * Optional. Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.
417
+ */
418
+ pageToken?: string;
419
+ /**
420
+ * Required. The merchant account who owns the collection of method quotas Format: accounts/{account\}
421
+ */
422
+ parent?: string;
423
+ }
424
+ }