@commercetools/importapi-sdk 5.1.0 → 5.3.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.
@@ -1,21 +1,21 @@
1
- function _toPrimitive(input, hint) {
2
- if (typeof input !== "object" || input === null) return input;
3
- var prim = input[Symbol.toPrimitive];
4
- if (prim !== undefined) {
5
- var res = prim.call(input, hint || "default");
6
- if (typeof res !== "object") return res;
1
+ function toPrimitive(t, r) {
2
+ if ("object" != typeof t || !t) return t;
3
+ var e = t[Symbol.toPrimitive];
4
+ if (void 0 !== e) {
5
+ var i = e.call(t, r || "default");
6
+ if ("object" != typeof i) return i;
7
7
  throw new TypeError("@@toPrimitive must return a primitive value.");
8
8
  }
9
- return (hint === "string" ? String : Number)(input);
9
+ return ("string" === r ? String : Number)(t);
10
10
  }
11
11
 
12
- function _toPropertyKey(arg) {
13
- var key = _toPrimitive(arg, "string");
14
- return typeof key === "symbol" ? key : String(key);
12
+ function toPropertyKey(t) {
13
+ var i = toPrimitive(t, "string");
14
+ return "symbol" == typeof i ? i : String(i);
15
15
  }
16
16
 
17
17
  function _defineProperty(obj, key, value) {
18
- key = _toPropertyKey(key);
18
+ key = toPropertyKey(key);
19
19
  if (key in obj) {
20
20
  Object.defineProperty(obj, key, {
21
21
  value: value,
@@ -128,9 +128,9 @@ class ByProjectKeyCategoriesImportContainersByImportContainerKeyRequestBuilder {
128
128
  pathVariables: this.args.pathArgs,
129
129
  headers: {
130
130
  'Content-Type': 'application/json',
131
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
131
+ ...methodArgs?.headers
132
132
  },
133
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
133
+ body: methodArgs?.body
134
134
  }, this.args.executeRequest);
135
135
  }
136
136
  }
@@ -202,9 +202,9 @@ class ByProjectKeyCustomersImportContainersByImportContainerKeyRequestBuilder {
202
202
  pathVariables: this.args.pathArgs,
203
203
  headers: {
204
204
  'Content-Type': 'application/json',
205
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
205
+ ...methodArgs?.headers
206
206
  },
207
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
207
+ body: methodArgs?.body
208
208
  }, this.args.executeRequest);
209
209
  }
210
210
  }
@@ -254,6 +254,80 @@ class ByProjectKeyCustomersRequestBuilder {
254
254
  }
255
255
  }
256
256
 
257
+ /**
258
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
259
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
260
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
261
+ */
262
+ /**
263
+ **/
264
+ class ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder {
265
+ constructor(args) {
266
+ this.args = args;
267
+ }
268
+ /**
269
+ * Creates a request for creating new Discount Codes or updating existing ones.
270
+ */
271
+ post(methodArgs) {
272
+ return new ApiRequest({
273
+ baseUri: this.args.baseUri,
274
+ method: 'POST',
275
+ uriTemplate: '/{projectKey}/discount-codes/import-containers/{importContainerKey}',
276
+ pathVariables: this.args.pathArgs,
277
+ headers: {
278
+ 'Content-Type': 'application/json',
279
+ ...methodArgs?.headers
280
+ },
281
+ body: methodArgs?.body
282
+ }, this.args.executeRequest);
283
+ }
284
+ }
285
+
286
+ /**
287
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
288
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
289
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
290
+ */
291
+ /**
292
+ **/
293
+ class ByProjectKeyDiscountCodesImportContainersRequestBuilder {
294
+ constructor(args) {
295
+ this.args = args;
296
+ }
297
+ withImportContainerKeyValue(childPathArgs) {
298
+ return new ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder({
299
+ pathArgs: {
300
+ ...this.args.pathArgs,
301
+ ...childPathArgs
302
+ },
303
+ executeRequest: this.args.executeRequest,
304
+ baseUri: this.args.baseUri
305
+ });
306
+ }
307
+ }
308
+
309
+ /**
310
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
311
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
312
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
313
+ */
314
+ /**
315
+ **/
316
+ class ByProjectKeyDiscountCodesRequestBuilder {
317
+ constructor(args) {
318
+ this.args = args;
319
+ }
320
+ importContainers() {
321
+ return new ByProjectKeyDiscountCodesImportContainersRequestBuilder({
322
+ pathArgs: {
323
+ ...this.args.pathArgs
324
+ },
325
+ executeRequest: this.args.executeRequest,
326
+ baseUri: this.args.baseUri
327
+ });
328
+ }
329
+ }
330
+
257
331
  /**
258
332
  * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
259
333
  * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
@@ -276,9 +350,9 @@ class ByProjectKeyImportContainersByImportContainerKeyImportOperationsRequestBui
276
350
  uriTemplate: '/{projectKey}/import-containers/{importContainerKey}/import-operations',
277
351
  pathVariables: this.args.pathArgs,
278
352
  headers: {
279
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
353
+ ...methodArgs?.headers
280
354
  },
281
- queryParams: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.queryArgs
355
+ queryParams: methodArgs?.queryArgs
282
356
  }, this.args.executeRequest);
283
357
  }
284
358
  }
@@ -305,7 +379,7 @@ class ByProjectKeyImportContainersByImportContainerKeyImportSummariesRequestBuil
305
379
  uriTemplate: '/{projectKey}/import-containers/{importContainerKey}/import-summaries',
306
380
  pathVariables: this.args.pathArgs,
307
381
  headers: {
308
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
382
+ ...methodArgs?.headers
309
383
  }
310
384
  }, this.args.executeRequest);
311
385
  }
@@ -352,9 +426,9 @@ class ByProjectKeyImportContainersByImportContainerKeyRequestBuilder {
352
426
  pathVariables: this.args.pathArgs,
353
427
  headers: {
354
428
  'Content-Type': 'application/json',
355
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
429
+ ...methodArgs?.headers
356
430
  },
357
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
431
+ body: methodArgs?.body
358
432
  }, this.args.executeRequest);
359
433
  }
360
434
  /**
@@ -367,7 +441,7 @@ class ByProjectKeyImportContainersByImportContainerKeyRequestBuilder {
367
441
  uriTemplate: '/{projectKey}/import-containers/{importContainerKey}',
368
442
  pathVariables: this.args.pathArgs,
369
443
  headers: {
370
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
444
+ ...methodArgs?.headers
371
445
  }
372
446
  }, this.args.executeRequest);
373
447
  }
@@ -381,7 +455,7 @@ class ByProjectKeyImportContainersByImportContainerKeyRequestBuilder {
381
455
  uriTemplate: '/{projectKey}/import-containers/{importContainerKey}',
382
456
  pathVariables: this.args.pathArgs,
383
457
  headers: {
384
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
458
+ ...methodArgs?.headers
385
459
  }
386
460
  }, this.args.executeRequest);
387
461
  }
@@ -420,9 +494,9 @@ class ByProjectKeyImportContainersRequestBuilder {
420
494
  pathVariables: this.args.pathArgs,
421
495
  headers: {
422
496
  'Content-Type': 'application/json',
423
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
497
+ ...methodArgs?.headers
424
498
  },
425
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
499
+ body: methodArgs?.body
426
500
  }, this.args.executeRequest);
427
501
  }
428
502
  /**
@@ -435,9 +509,9 @@ class ByProjectKeyImportContainersRequestBuilder {
435
509
  uriTemplate: '/{projectKey}/import-containers',
436
510
  pathVariables: this.args.pathArgs,
437
511
  headers: {
438
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
512
+ ...methodArgs?.headers
439
513
  },
440
- queryParams: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.queryArgs
514
+ queryParams: methodArgs?.queryArgs
441
515
  }, this.args.executeRequest);
442
516
  }
443
517
  }
@@ -464,7 +538,7 @@ class ByProjectKeyImportOperationsByIdRequestBuilder {
464
538
  uriTemplate: '/{projectKey}/import-operations/{id}',
465
539
  pathVariables: this.args.pathArgs,
466
540
  headers: {
467
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
541
+ ...methodArgs?.headers
468
542
  }
469
543
  }, this.args.executeRequest);
470
544
  }
@@ -515,9 +589,9 @@ class ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder
515
589
  pathVariables: this.args.pathArgs,
516
590
  headers: {
517
591
  'Content-Type': 'application/json',
518
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
592
+ ...methodArgs?.headers
519
593
  },
520
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
594
+ body: methodArgs?.body
521
595
  }, this.args.executeRequest);
522
596
  }
523
597
  }
@@ -589,9 +663,9 @@ class ByProjectKeyOrderPatchesImportContainersByImportContainerKeyRequestBuilder
589
663
  pathVariables: this.args.pathArgs,
590
664
  headers: {
591
665
  'Content-Type': 'application/json',
592
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
666
+ ...methodArgs?.headers
593
667
  },
594
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
668
+ body: methodArgs?.body
595
669
  }, this.args.executeRequest);
596
670
  }
597
671
  }
@@ -663,9 +737,9 @@ class ByProjectKeyOrdersImportContainersByImportContainerKeyRequestBuilder {
663
737
  pathVariables: this.args.pathArgs,
664
738
  headers: {
665
739
  'Content-Type': 'application/json',
666
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
740
+ ...methodArgs?.headers
667
741
  },
668
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
742
+ body: methodArgs?.body
669
743
  }, this.args.executeRequest);
670
744
  }
671
745
  }
@@ -737,9 +811,9 @@ class ByProjectKeyPricesImportContainersByImportContainerKeyRequestBuilder {
737
811
  pathVariables: this.args.pathArgs,
738
812
  headers: {
739
813
  'Content-Type': 'application/json',
740
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
814
+ ...methodArgs?.headers
741
815
  },
742
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
816
+ body: methodArgs?.body
743
817
  }, this.args.executeRequest);
744
818
  }
745
819
  }
@@ -812,9 +886,9 @@ class ByProjectKeyProductDraftsImportContainersByImportContainerKeyRequestBuilde
812
886
  pathVariables: this.args.pathArgs,
813
887
  headers: {
814
888
  'Content-Type': 'application/json',
815
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
889
+ ...methodArgs?.headers
816
890
  },
817
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
891
+ body: methodArgs?.body
818
892
  }, this.args.executeRequest);
819
893
  }
820
894
  }
@@ -886,9 +960,9 @@ class ByProjectKeyProductTypesImportContainersByImportContainerKeyRequestBuilder
886
960
  pathVariables: this.args.pathArgs,
887
961
  headers: {
888
962
  'Content-Type': 'application/json',
889
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
963
+ ...methodArgs?.headers
890
964
  },
891
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
965
+ body: methodArgs?.body
892
966
  }, this.args.executeRequest);
893
967
  }
894
968
  }
@@ -960,9 +1034,9 @@ class ByProjectKeyProductVariantPatchesImportContainersByImportContainerKeyReque
960
1034
  pathVariables: this.args.pathArgs,
961
1035
  headers: {
962
1036
  'Content-Type': 'application/json',
963
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
1037
+ ...methodArgs?.headers
964
1038
  },
965
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
1039
+ body: methodArgs?.body
966
1040
  }, this.args.executeRequest);
967
1041
  }
968
1042
  }
@@ -1034,9 +1108,9 @@ class ByProjectKeyProductVariantsImportContainersByImportContainerKeyRequestBuil
1034
1108
  pathVariables: this.args.pathArgs,
1035
1109
  headers: {
1036
1110
  'Content-Type': 'application/json',
1037
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
1111
+ ...methodArgs?.headers
1038
1112
  },
1039
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
1113
+ body: methodArgs?.body
1040
1114
  }, this.args.executeRequest);
1041
1115
  }
1042
1116
  }
@@ -1108,9 +1182,9 @@ class ByProjectKeyProductsImportContainersByImportContainerKeyRequestBuilder {
1108
1182
  pathVariables: this.args.pathArgs,
1109
1183
  headers: {
1110
1184
  'Content-Type': 'application/json',
1111
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
1185
+ ...methodArgs?.headers
1112
1186
  },
1113
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
1187
+ body: methodArgs?.body
1114
1188
  }, this.args.executeRequest);
1115
1189
  }
1116
1190
  }
@@ -1182,9 +1256,9 @@ class ByProjectKeyStandalonePricesImportContainersByImportContainerKeyRequestBui
1182
1256
  pathVariables: this.args.pathArgs,
1183
1257
  headers: {
1184
1258
  'Content-Type': 'application/json',
1185
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
1259
+ ...methodArgs?.headers
1186
1260
  },
1187
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
1261
+ body: methodArgs?.body
1188
1262
  }, this.args.executeRequest);
1189
1263
  }
1190
1264
  }
@@ -1256,9 +1330,9 @@ class ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder {
1256
1330
  pathVariables: this.args.pathArgs,
1257
1331
  headers: {
1258
1332
  'Content-Type': 'application/json',
1259
- ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
1333
+ ...methodArgs?.headers
1260
1334
  },
1261
- body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
1335
+ body: methodArgs?.body
1262
1336
  }, this.args.executeRequest);
1263
1337
  }
1264
1338
  }
@@ -1454,6 +1528,15 @@ class ByProjectKeyRequestBuilder {
1454
1528
  baseUri: this.args.baseUri
1455
1529
  });
1456
1530
  }
1531
+ discountCodes() {
1532
+ return new ByProjectKeyDiscountCodesRequestBuilder({
1533
+ pathArgs: {
1534
+ ...this.args.pathArgs
1535
+ },
1536
+ executeRequest: this.args.executeRequest,
1537
+ baseUri: this.args.baseUri
1538
+ });
1539
+ }
1457
1540
  }
1458
1541
 
1459
1542
  class ApiRoot {
@@ -1501,4 +1584,4 @@ function createApiBuilderFromCtpClient(ctpClient, baseUri) {
1501
1584
  });
1502
1585
  }
1503
1586
 
1504
- export { ApiRoot, createApiBuilderFromCtpClient, createExecutorFromMiddlewares };
1587
+ export { ApiRoot, ByProjectKeyCategoriesImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyCategoriesImportContainersRequestBuilder, ByProjectKeyCategoriesRequestBuilder, ByProjectKeyCustomersImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyCustomersImportContainersRequestBuilder, ByProjectKeyCustomersRequestBuilder, ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyDiscountCodesImportContainersRequestBuilder, ByProjectKeyDiscountCodesRequestBuilder, ByProjectKeyImportContainersByImportContainerKeyImportOperationsRequestBuilder, ByProjectKeyImportContainersByImportContainerKeyImportSummariesRequestBuilder, ByProjectKeyImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyImportContainersRequestBuilder, ByProjectKeyImportOperationsByIdRequestBuilder, ByProjectKeyImportOperationsRequestBuilder, ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyInventoriesImportContainersRequestBuilder, ByProjectKeyInventoriesRequestBuilder, ByProjectKeyOrderPatchesImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyOrderPatchesImportContainersRequestBuilder, ByProjectKeyOrderPatchesRequestBuilder, ByProjectKeyOrdersImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyOrdersImportContainersRequestBuilder, ByProjectKeyOrdersRequestBuilder, ByProjectKeyPricesImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyPricesImportContainersRequestBuilder, ByProjectKeyPricesRequestBuilder, ByProjectKeyProductDraftsImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyProductDraftsImportContainersRequestBuilder, ByProjectKeyProductDraftsRequestBuilder, ByProjectKeyProductTypesImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyProductTypesImportContainersRequestBuilder, ByProjectKeyProductTypesRequestBuilder, ByProjectKeyProductVariantPatchesImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyProductVariantPatchesImportContainersRequestBuilder, ByProjectKeyProductVariantPatchesRequestBuilder, ByProjectKeyProductVariantsImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyProductVariantsImportContainersRequestBuilder, ByProjectKeyProductVariantsRequestBuilder, ByProjectKeyProductsImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyProductsImportContainersRequestBuilder, ByProjectKeyProductsRequestBuilder, ByProjectKeyRequestBuilder, ByProjectKeyStandalonePricesImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyStandalonePricesImportContainersRequestBuilder, ByProjectKeyStandalonePricesRequestBuilder, ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder, ByProjectKeyTypesImportContainersRequestBuilder, ByProjectKeyTypesRequestBuilder, createApiBuilderFromCtpClient, createExecutorFromMiddlewares };