@googleapis/merchantapi 11.0.0 → 12.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 +216 -0
  2. package/accounts_v1.ts +13566 -0
  3. package/accounts_v1beta.ts +4 -4
  4. package/build/accounts_v1.d.ts +7784 -0
  5. package/build/accounts_v1.js +2504 -0
  6. package/build/accounts_v1.js.map +1 -0
  7. package/build/accounts_v1beta.d.ts +4 -5
  8. package/build/accounts_v1beta.js +46 -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
@@ -0,0 +1,599 @@
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_ordertracking_v1 {
39
+ export interface Options extends GlobalOptions {
40
+ version: 'ordertracking_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('ordertracking_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
+ * Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.
129
+ */
130
+ export interface Schema$DateTime {
131
+ /**
132
+ * Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
133
+ */
134
+ day?: number | null;
135
+ /**
136
+ * Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value "24:00:00" for scenarios like business closing time.
137
+ */
138
+ hours?: number | null;
139
+ /**
140
+ * Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
141
+ */
142
+ minutes?: number | null;
143
+ /**
144
+ * Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
145
+ */
146
+ month?: number | null;
147
+ /**
148
+ * Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
149
+ */
150
+ nanos?: number | null;
151
+ /**
152
+ * Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
153
+ */
154
+ seconds?: number | null;
155
+ /**
156
+ * Time zone.
157
+ */
158
+ timeZone?: Schema$TimeZone;
159
+ /**
160
+ * UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 \}.
161
+ */
162
+ utcOffset?: string | null;
163
+ /**
164
+ * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
165
+ */
166
+ year?: number | null;
167
+ }
168
+ /**
169
+ * The line items of the order.
170
+ */
171
+ export interface Schema$LineItemDetails {
172
+ /**
173
+ * Optional. Brand of the product.
174
+ */
175
+ brand?: string | null;
176
+ /**
177
+ * Optional. The Global Trade Item Numbers.
178
+ */
179
+ gtins?: string[] | null;
180
+ /**
181
+ * Required. The ID for this line item.
182
+ */
183
+ lineItemId?: string | null;
184
+ /**
185
+ * Optional. The manufacturer part number.
186
+ */
187
+ mpn?: string | null;
188
+ /**
189
+ * Required. The Content API REST ID of the product, in the form channel:contentLanguage:targetCountry:offerId.
190
+ */
191
+ productId?: string | null;
192
+ /**
193
+ * Optional. Plain text title of this product.
194
+ */
195
+ productTitle?: string | null;
196
+ /**
197
+ * Required. The quantity of the line item in the order.
198
+ */
199
+ quantity?: string | null;
200
+ }
201
+ /**
202
+ * Represents a business trade from which signals are extracted, such as shipping.
203
+ */
204
+ export interface Schema$OrderTrackingSignal {
205
+ /**
206
+ * Optional. The shipping fee of the order; this value should be set to zero in the case of free shipping.
207
+ */
208
+ customerShippingFee?: Schema$Price;
209
+ /**
210
+ * Optional. The delivery postal code, as a continuous string without spaces or dashes, for example "95016". This field will be anonymized in returned OrderTrackingSignal creation response.
211
+ */
212
+ deliveryPostalCode?: string | null;
213
+ /**
214
+ * Optional. The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the shipping destination.
215
+ */
216
+ deliveryRegionCode?: string | null;
217
+ /**
218
+ * Required. Information about line items in the order.
219
+ */
220
+ lineItems?: Schema$LineItemDetails[];
221
+ /**
222
+ * Optional. The Google Merchant Center ID of this order tracking signal. This value is optional. If left unset, the caller's Merchant Center ID is used. You must request access in order to provide data on behalf of another business. For more information, see [Submitting Order Tracking Signals](/shopping-content/guides/order-tracking-signals).
223
+ */
224
+ merchantId?: string | null;
225
+ /**
226
+ * Required. The time when the order was created on the businesses side. Include the year and timezone string, if available.
227
+ */
228
+ orderCreatedTime?: Schema$DateTime;
229
+ /**
230
+ * Required. The ID of the order on the businesses side. This field will be hashed in returned OrderTrackingSignal creation response.
231
+ */
232
+ orderId?: string | null;
233
+ /**
234
+ * Output only. The ID that uniquely identifies this order tracking signal.
235
+ */
236
+ orderTrackingSignalId?: string | null;
237
+ /**
238
+ * Optional. The mapping of the line items to the shipment information.
239
+ */
240
+ shipmentLineItemMapping?: Schema$ShipmentLineItemMapping[];
241
+ /**
242
+ * Required. The shipping information for the order.
243
+ */
244
+ shippingInfo?: Schema$ShippingInfo[];
245
+ }
246
+ /**
247
+ * The price represented as a number and currency.
248
+ */
249
+ export interface Schema$Price {
250
+ /**
251
+ * The price represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 USD = 1000000 micros).
252
+ */
253
+ amountMicros?: string | null;
254
+ /**
255
+ * The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217).
256
+ */
257
+ currencyCode?: string | null;
258
+ }
259
+ /**
260
+ * The change that happened to the product including old value, new value, country code as the region code and reporting context.
261
+ */
262
+ export interface Schema$ProductChange {
263
+ /**
264
+ * 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`, ``)
265
+ */
266
+ newValue?: string | null;
267
+ /**
268
+ * 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`, ``)
269
+ */
270
+ oldValue?: string | null;
271
+ /**
272
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
273
+ */
274
+ regionCode?: string | null;
275
+ /**
276
+ * 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)
277
+ */
278
+ reportingContext?: string | null;
279
+ }
280
+ /**
281
+ * The message that the merchant will receive to notify about product status change event
282
+ */
283
+ export interface Schema$ProductStatusChangeMessage {
284
+ /**
285
+ * The target account that owns the entity that changed. Format : `accounts/{merchant_id\}`
286
+ */
287
+ account?: string | null;
288
+ /**
289
+ * The attribute in the resource that changed, in this case it will be always `Status`.
290
+ */
291
+ attribute?: string | null;
292
+ /**
293
+ * A message to describe the change that happened to the product
294
+ */
295
+ changes?: Schema$ProductChange[];
296
+ /**
297
+ * 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.
298
+ */
299
+ eventTime?: string | null;
300
+ /**
301
+ * Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
302
+ */
303
+ expirationTime?: string | null;
304
+ /**
305
+ * 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\}`
306
+ */
307
+ managingAccount?: string | null;
308
+ /**
309
+ * The product name. Format: `accounts/{account\}/products/{product\}`
310
+ */
311
+ resource?: string | null;
312
+ /**
313
+ * The product id.
314
+ */
315
+ resourceId?: string | null;
316
+ /**
317
+ * The resource that changed, in this case it will always be `Product`.
318
+ */
319
+ resourceType?: string | null;
320
+ }
321
+ /**
322
+ * Represents how many items are in the shipment for the given shipment_id and line_item_id.
323
+ */
324
+ export interface Schema$ShipmentLineItemMapping {
325
+ /**
326
+ * Required. The line item ID.
327
+ */
328
+ lineItemId?: string | null;
329
+ /**
330
+ * Required. The line item quantity in the shipment.
331
+ */
332
+ quantity?: string | null;
333
+ /**
334
+ * Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.
335
+ */
336
+ shipmentId?: string | null;
337
+ }
338
+ /**
339
+ * The shipping information for the order.
340
+ */
341
+ export interface Schema$ShippingInfo {
342
+ /**
343
+ * Optional. The time when the shipment was actually delivered. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name.
344
+ */
345
+ actualDeliveryTime?: Schema$DateTime;
346
+ /**
347
+ * Optional. The name of the shipping carrier for the delivery. This field is required if one of the following fields is absent: earliest_delivery_promise_time, latest_delivery_promise_time, and actual_delivery_time.
348
+ */
349
+ carrier?: string | null;
350
+ /**
351
+ * Optional. The service type for fulfillment, such as GROUND, FIRST_CLASS, etc.
352
+ */
353
+ carrierService?: string | null;
354
+ /**
355
+ * Optional. The earliest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name.
356
+ */
357
+ earliestDeliveryPromiseTime?: Schema$DateTime;
358
+ /**
359
+ * Optional. The latest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name.
360
+ */
361
+ latestDeliveryPromiseTime?: Schema$DateTime;
362
+ /**
363
+ * Required. The origin postal code, as a continuous string without spaces or dashes, for example "95016". This field will be anonymized in returned OrderTrackingSignal creation response.
364
+ */
365
+ originPostalCode?: string | null;
366
+ /**
367
+ * Required. The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the shipping origin.
368
+ */
369
+ originRegionCode?: string | null;
370
+ /**
371
+ * Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.
372
+ */
373
+ shipmentId?: string | null;
374
+ /**
375
+ * Optional. The time when the shipment was shipped. Include the year and timezone string, if available.
376
+ */
377
+ shippedTime?: Schema$DateTime;
378
+ /**
379
+ * Required. The status of the shipment.
380
+ */
381
+ shippingStatus?: string | null;
382
+ /**
383
+ * Optional. The tracking ID of the shipment. This field is required if one of the following fields is absent: earliest_delivery_promise_time, latest_delivery_promise_time, and actual_delivery_time.
384
+ */
385
+ trackingId?: string | null;
386
+ }
387
+ /**
388
+ * Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).
389
+ */
390
+ export interface Schema$TimeZone {
391
+ /**
392
+ * IANA Time Zone Database time zone. For example "America/New_York".
393
+ */
394
+ id?: string | null;
395
+ /**
396
+ * Optional. IANA Time Zone Database version number. For example "2019a".
397
+ */
398
+ version?: string | null;
399
+ }
400
+
401
+ export class Resource$Accounts {
402
+ context: APIRequestContext;
403
+ orderTrackingSignals: Resource$Accounts$Ordertrackingsignals;
404
+ constructor(context: APIRequestContext) {
405
+ this.context = context;
406
+ this.orderTrackingSignals = new Resource$Accounts$Ordertrackingsignals(
407
+ this.context
408
+ );
409
+ }
410
+ }
411
+
412
+ export class Resource$Accounts$Ordertrackingsignals {
413
+ context: APIRequestContext;
414
+ constructor(context: APIRequestContext) {
415
+ this.context = context;
416
+ }
417
+
418
+ /**
419
+ * Creates new order tracking signal.
420
+ * @example
421
+ * ```js
422
+ * // Before running the sample:
423
+ * // - Enable the API at:
424
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
425
+ * // - Login into gcloud by running:
426
+ * // ```sh
427
+ * // $ gcloud auth application-default login
428
+ * // ```
429
+ * // - Install the npm module by running:
430
+ * // ```sh
431
+ * // $ npm install googleapis
432
+ * // ```
433
+ *
434
+ * const {google} = require('googleapis');
435
+ * const merchantapi = google.merchantapi('ordertracking_v1');
436
+ *
437
+ * async function main() {
438
+ * const auth = new google.auth.GoogleAuth({
439
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
440
+ * scopes: ['https://www.googleapis.com/auth/content'],
441
+ * });
442
+ *
443
+ * // Acquire an auth client, and bind it to all future calls
444
+ * const authClient = await auth.getClient();
445
+ * google.options({auth: authClient});
446
+ *
447
+ * // Do the magic
448
+ * const res = await merchantapi.accounts.orderTrackingSignals.create({
449
+ * // Output only. The ID that uniquely identifies this order tracking signal.
450
+ * orderTrackingSignalId: 'placeholder-value',
451
+ * // Required. The account of the business for which the order signal is created. Format: accounts/{account\}
452
+ * parent: 'accounts/my-account',
453
+ *
454
+ * // Request body metadata
455
+ * requestBody: {
456
+ * // request body parameters
457
+ * // {
458
+ * // "customerShippingFee": {},
459
+ * // "deliveryPostalCode": "my_deliveryPostalCode",
460
+ * // "deliveryRegionCode": "my_deliveryRegionCode",
461
+ * // "lineItems": [],
462
+ * // "merchantId": "my_merchantId",
463
+ * // "orderCreatedTime": {},
464
+ * // "orderId": "my_orderId",
465
+ * // "orderTrackingSignalId": "my_orderTrackingSignalId",
466
+ * // "shipmentLineItemMapping": [],
467
+ * // "shippingInfo": []
468
+ * // }
469
+ * },
470
+ * });
471
+ * console.log(res.data);
472
+ *
473
+ * // Example response
474
+ * // {
475
+ * // "customerShippingFee": {},
476
+ * // "deliveryPostalCode": "my_deliveryPostalCode",
477
+ * // "deliveryRegionCode": "my_deliveryRegionCode",
478
+ * // "lineItems": [],
479
+ * // "merchantId": "my_merchantId",
480
+ * // "orderCreatedTime": {},
481
+ * // "orderId": "my_orderId",
482
+ * // "orderTrackingSignalId": "my_orderTrackingSignalId",
483
+ * // "shipmentLineItemMapping": [],
484
+ * // "shippingInfo": []
485
+ * // }
486
+ * }
487
+ *
488
+ * main().catch(e => {
489
+ * console.error(e);
490
+ * throw e;
491
+ * });
492
+ *
493
+ * ```
494
+ *
495
+ * @param params - Parameters for request
496
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
497
+ * @param callback - Optional callback that handles the response.
498
+ * @returns A promise if used with async/await, or void if used with a callback.
499
+ */
500
+ create(
501
+ params: Params$Resource$Accounts$Ordertrackingsignals$Create,
502
+ options: StreamMethodOptions
503
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
504
+ create(
505
+ params?: Params$Resource$Accounts$Ordertrackingsignals$Create,
506
+ options?: MethodOptions
507
+ ): Promise<GaxiosResponseWithHTTP2<Schema$OrderTrackingSignal>>;
508
+ create(
509
+ params: Params$Resource$Accounts$Ordertrackingsignals$Create,
510
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
511
+ callback: BodyResponseCallback<Readable>
512
+ ): void;
513
+ create(
514
+ params: Params$Resource$Accounts$Ordertrackingsignals$Create,
515
+ options: MethodOptions | BodyResponseCallback<Schema$OrderTrackingSignal>,
516
+ callback: BodyResponseCallback<Schema$OrderTrackingSignal>
517
+ ): void;
518
+ create(
519
+ params: Params$Resource$Accounts$Ordertrackingsignals$Create,
520
+ callback: BodyResponseCallback<Schema$OrderTrackingSignal>
521
+ ): void;
522
+ create(callback: BodyResponseCallback<Schema$OrderTrackingSignal>): void;
523
+ create(
524
+ paramsOrCallback?:
525
+ | Params$Resource$Accounts$Ordertrackingsignals$Create
526
+ | BodyResponseCallback<Schema$OrderTrackingSignal>
527
+ | BodyResponseCallback<Readable>,
528
+ optionsOrCallback?:
529
+ | MethodOptions
530
+ | StreamMethodOptions
531
+ | BodyResponseCallback<Schema$OrderTrackingSignal>
532
+ | BodyResponseCallback<Readable>,
533
+ callback?:
534
+ | BodyResponseCallback<Schema$OrderTrackingSignal>
535
+ | BodyResponseCallback<Readable>
536
+ ):
537
+ | void
538
+ | Promise<GaxiosResponseWithHTTP2<Schema$OrderTrackingSignal>>
539
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
540
+ let params = (paramsOrCallback ||
541
+ {}) as Params$Resource$Accounts$Ordertrackingsignals$Create;
542
+ let options = (optionsOrCallback || {}) as MethodOptions;
543
+
544
+ if (typeof paramsOrCallback === 'function') {
545
+ callback = paramsOrCallback;
546
+ params = {} as Params$Resource$Accounts$Ordertrackingsignals$Create;
547
+ options = {};
548
+ }
549
+
550
+ if (typeof optionsOrCallback === 'function') {
551
+ callback = optionsOrCallback;
552
+ options = {};
553
+ }
554
+
555
+ const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
556
+ const parameters = {
557
+ options: Object.assign(
558
+ {
559
+ url: (
560
+ rootUrl + '/ordertracking/v1/{+parent}/orderTrackingSignals'
561
+ ).replace(/([^:]\/)\/+/g, '$1'),
562
+ method: 'POST',
563
+ apiVersion: '',
564
+ },
565
+ options
566
+ ),
567
+ params,
568
+ requiredParams: ['parent'],
569
+ pathParams: ['parent'],
570
+ context: this.context,
571
+ };
572
+ if (callback) {
573
+ createAPIRequest<Schema$OrderTrackingSignal>(
574
+ parameters,
575
+ callback as BodyResponseCallback<unknown>
576
+ );
577
+ } else {
578
+ return createAPIRequest<Schema$OrderTrackingSignal>(parameters);
579
+ }
580
+ }
581
+ }
582
+
583
+ export interface Params$Resource$Accounts$Ordertrackingsignals$Create
584
+ extends StandardParameters {
585
+ /**
586
+ * Output only. The ID that uniquely identifies this order tracking signal.
587
+ */
588
+ orderTrackingSignalId?: string;
589
+ /**
590
+ * Required. The account of the business for which the order signal is created. Format: accounts/{account\}
591
+ */
592
+ parent?: string;
593
+
594
+ /**
595
+ * Request body metadata
596
+ */
597
+ requestBody?: Schema$OrderTrackingSignal;
598
+ }
599
+ }
@@ -177,6 +177,10 @@ export namespace merchantapi_ordertracking_v1beta {
177
177
  * Optional. The Global Trade Item Number.
178
178
  */
179
179
  gtin?: string | null;
180
+ /**
181
+ * Optional. The Global Trade Item Numbers.
182
+ */
183
+ gtins?: string[] | null;
180
184
  /**
181
185
  * Required. The ID for this line item.
182
186
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googleapis/merchantapi",
3
- "version": "11.0.0",
3
+ "version": "12.0.0",
4
4
  "description": "merchantapi",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -28,15 +28,15 @@
28
28
  "webpack": "webpack"
29
29
  },
30
30
  "dependencies": {
31
- "googleapis-common": "^8.0.2-rc.0"
31
+ "googleapis-common": "^8.0.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@microsoft/api-documenter": "^7.8.10",
35
35
  "@microsoft/api-extractor": "^7.8.10",
36
- "gts": "^5.0.0",
36
+ "gts": "^6.0.0",
37
37
  "null-loader": "^4.0.0",
38
38
  "ts-loader": "^9.0.0",
39
- "typescript": "~4.8.4",
39
+ "typescript": "5.7.3",
40
40
  "webpack": "^5.0.0",
41
41
  "webpack-cli": "^5.0.0"
42
42
  }