@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.
- package/CHANGELOG.md +44 -0
- package/dist/commercetools-importapi-sdk.browser.cjs.js +181 -49
- package/dist/commercetools-importapi-sdk.browser.esm.js +133 -50
- package/dist/commercetools-importapi-sdk.cjs.dev.js +181 -49
- package/dist/commercetools-importapi-sdk.cjs.prod.js +181 -49
- package/dist/commercetools-importapi-sdk.esm.js +133 -50
- package/dist/declarations/src/generated/client/by-project-key-request-builder.d.ts +2 -0
- package/dist/declarations/src/generated/client/discount-codes/by-project-key-discount-codes-request-builder.d.ts +26 -0
- package/dist/declarations/src/generated/client/import-containers/by-project-key-discount-codes-import-containers-by-import-container-key-request-builder.d.ts +37 -0
- package/dist/declarations/src/generated/client/import-containers/by-project-key-discount-codes-import-containers-request-builder.d.ts +28 -0
- package/dist/declarations/src/generated/index.d.ts +50 -0
- package/dist/declarations/src/generated/models/common.d.ts +3 -2
- package/dist/declarations/src/generated/models/discount-codes.d.ts +91 -0
- package/dist/declarations/src/generated/models/errors.d.ts +1 -1
- package/dist/declarations/src/generated/models/importrequests.d.ts +15 -1
- package/dist/declarations/src/generated/models/importsummaries.d.ts +3 -0
- package/dist/declarations/src/generated/models/orders.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
function
|
|
2
|
-
if (
|
|
3
|
-
var
|
|
4
|
-
if (
|
|
5
|
-
var
|
|
6
|
-
if (
|
|
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 (
|
|
9
|
+
return ("string" === r ? String : Number)(t);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function
|
|
13
|
-
var
|
|
14
|
-
return
|
|
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 =
|
|
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
|
-
...
|
|
131
|
+
...methodArgs?.headers
|
|
132
132
|
},
|
|
133
|
-
body: methodArgs
|
|
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
|
-
...
|
|
205
|
+
...methodArgs?.headers
|
|
206
206
|
},
|
|
207
|
-
body: methodArgs
|
|
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
|
-
...
|
|
353
|
+
...methodArgs?.headers
|
|
280
354
|
},
|
|
281
|
-
queryParams: methodArgs
|
|
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
|
-
...
|
|
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
|
-
...
|
|
429
|
+
...methodArgs?.headers
|
|
356
430
|
},
|
|
357
|
-
body: methodArgs
|
|
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
|
-
...
|
|
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
|
-
...
|
|
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
|
-
...
|
|
497
|
+
...methodArgs?.headers
|
|
424
498
|
},
|
|
425
|
-
body: methodArgs
|
|
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
|
-
...
|
|
512
|
+
...methodArgs?.headers
|
|
439
513
|
},
|
|
440
|
-
queryParams: methodArgs
|
|
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
|
-
...
|
|
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
|
-
...
|
|
592
|
+
...methodArgs?.headers
|
|
519
593
|
},
|
|
520
|
-
body: methodArgs
|
|
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
|
-
...
|
|
666
|
+
...methodArgs?.headers
|
|
593
667
|
},
|
|
594
|
-
body: methodArgs
|
|
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
|
-
...
|
|
740
|
+
...methodArgs?.headers
|
|
667
741
|
},
|
|
668
|
-
body: methodArgs
|
|
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
|
-
...
|
|
814
|
+
...methodArgs?.headers
|
|
741
815
|
},
|
|
742
|
-
body: methodArgs
|
|
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
|
-
...
|
|
889
|
+
...methodArgs?.headers
|
|
816
890
|
},
|
|
817
|
-
body: methodArgs
|
|
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
|
-
...
|
|
963
|
+
...methodArgs?.headers
|
|
890
964
|
},
|
|
891
|
-
body: methodArgs
|
|
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
|
-
...
|
|
1037
|
+
...methodArgs?.headers
|
|
964
1038
|
},
|
|
965
|
-
body: methodArgs
|
|
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
|
-
...
|
|
1111
|
+
...methodArgs?.headers
|
|
1038
1112
|
},
|
|
1039
|
-
body: methodArgs
|
|
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
|
-
...
|
|
1185
|
+
...methodArgs?.headers
|
|
1112
1186
|
},
|
|
1113
|
-
body: methodArgs
|
|
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
|
-
...
|
|
1259
|
+
...methodArgs?.headers
|
|
1186
1260
|
},
|
|
1187
|
-
body: methodArgs
|
|
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
|
-
...
|
|
1333
|
+
...methodArgs?.headers
|
|
1260
1334
|
},
|
|
1261
|
-
body: methodArgs
|
|
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 };
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { executeRequest } from "../shared/utils/common-types.js";
|
|
7
7
|
import { ByProjectKeyCategoriesRequestBuilder } from "./categories/by-project-key-categories-request-builder.js";
|
|
8
8
|
import { ByProjectKeyCustomersRequestBuilder } from "./customers/by-project-key-customers-request-builder.js";
|
|
9
|
+
import { ByProjectKeyDiscountCodesRequestBuilder } from "./discount-codes/by-project-key-discount-codes-request-builder.js";
|
|
9
10
|
import { ByProjectKeyImportContainersRequestBuilder } from "./import-containers/by-project-key-import-containers-request-builder.js";
|
|
10
11
|
import { ByProjectKeyImportOperationsRequestBuilder } from "./import-operations/by-project-key-import-operations-request-builder.js";
|
|
11
12
|
import { ByProjectKeyInventoriesRequestBuilder } from "./inventories/by-project-key-inventories-request-builder.js";
|
|
@@ -51,4 +52,5 @@ export declare class ByProjectKeyRequestBuilder {
|
|
|
51
52
|
customers(): ByProjectKeyCustomersRequestBuilder;
|
|
52
53
|
inventories(): ByProjectKeyInventoriesRequestBuilder;
|
|
53
54
|
types(): ByProjectKeyTypesRequestBuilder;
|
|
55
|
+
discountCodes(): ByProjectKeyDiscountCodesRequestBuilder;
|
|
54
56
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
+
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
+
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
+
*/
|
|
6
|
+
import { executeRequest } from "../../shared/utils/common-types.js";
|
|
7
|
+
import { ByProjectKeyDiscountCodesImportContainersRequestBuilder } from "../import-containers/by-project-key-discount-codes-import-containers-request-builder.js";
|
|
8
|
+
/**
|
|
9
|
+
**/
|
|
10
|
+
export declare class ByProjectKeyDiscountCodesRequestBuilder {
|
|
11
|
+
protected readonly args: {
|
|
12
|
+
pathArgs: {
|
|
13
|
+
projectKey: string;
|
|
14
|
+
};
|
|
15
|
+
executeRequest: executeRequest;
|
|
16
|
+
baseUri?: string;
|
|
17
|
+
};
|
|
18
|
+
constructor(args: {
|
|
19
|
+
pathArgs: {
|
|
20
|
+
projectKey: string;
|
|
21
|
+
};
|
|
22
|
+
executeRequest: executeRequest;
|
|
23
|
+
baseUri?: string;
|
|
24
|
+
});
|
|
25
|
+
importContainers(): ByProjectKeyDiscountCodesImportContainersRequestBuilder;
|
|
26
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
+
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
+
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
+
*/
|
|
6
|
+
import { DiscountCodeImportRequest, ImportResponse } from "../../models/importrequests.js";
|
|
7
|
+
import { executeRequest } from "../../shared/utils/common-types.js";
|
|
8
|
+
import { ApiRequest } from "../../shared/utils/requests-utils.js";
|
|
9
|
+
/**
|
|
10
|
+
**/
|
|
11
|
+
export declare class ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder {
|
|
12
|
+
protected readonly args: {
|
|
13
|
+
pathArgs: {
|
|
14
|
+
projectKey: string;
|
|
15
|
+
importContainerKey: string;
|
|
16
|
+
};
|
|
17
|
+
executeRequest: executeRequest;
|
|
18
|
+
baseUri?: string;
|
|
19
|
+
};
|
|
20
|
+
constructor(args: {
|
|
21
|
+
pathArgs: {
|
|
22
|
+
projectKey: string;
|
|
23
|
+
importContainerKey: string;
|
|
24
|
+
};
|
|
25
|
+
executeRequest: executeRequest;
|
|
26
|
+
baseUri?: string;
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* Creates a request for creating new Discount Codes or updating existing ones.
|
|
30
|
+
*/
|
|
31
|
+
post(methodArgs: {
|
|
32
|
+
body: DiscountCodeImportRequest;
|
|
33
|
+
headers?: {
|
|
34
|
+
[key: string]: string | string[];
|
|
35
|
+
};
|
|
36
|
+
}): ApiRequest<ImportResponse>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
+
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
+
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
+
*/
|
|
6
|
+
import { executeRequest } from "../../shared/utils/common-types.js";
|
|
7
|
+
import { ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder } from "./by-project-key-discount-codes-import-containers-by-import-container-key-request-builder.js";
|
|
8
|
+
/**
|
|
9
|
+
**/
|
|
10
|
+
export declare class ByProjectKeyDiscountCodesImportContainersRequestBuilder {
|
|
11
|
+
protected readonly args: {
|
|
12
|
+
pathArgs: {
|
|
13
|
+
projectKey: string;
|
|
14
|
+
};
|
|
15
|
+
executeRequest: executeRequest;
|
|
16
|
+
baseUri?: string;
|
|
17
|
+
};
|
|
18
|
+
constructor(args: {
|
|
19
|
+
pathArgs: {
|
|
20
|
+
projectKey: string;
|
|
21
|
+
};
|
|
22
|
+
executeRequest: executeRequest;
|
|
23
|
+
baseUri?: string;
|
|
24
|
+
});
|
|
25
|
+
withImportContainerKeyValue(childPathArgs: {
|
|
26
|
+
importContainerKey: string;
|
|
27
|
+
}): ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder;
|
|
28
|
+
}
|
|
@@ -4,10 +4,60 @@
|
|
|
4
4
|
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
5
|
*/
|
|
6
6
|
export * from "./client/api-root.js";
|
|
7
|
+
export * from "./client/by-project-key-request-builder.js";
|
|
8
|
+
export * from "./client/categories/by-project-key-categories-request-builder.js";
|
|
9
|
+
export * from "./client/customers/by-project-key-customers-request-builder.js";
|
|
10
|
+
export * from "./client/discount-codes/by-project-key-discount-codes-request-builder.js";
|
|
11
|
+
export * from "./client/import-containers/by-project-key-categories-import-containers-by-import-container-key-request-builder.js";
|
|
12
|
+
export * from "./client/import-containers/by-project-key-categories-import-containers-request-builder.js";
|
|
13
|
+
export * from "./client/import-containers/by-project-key-customers-import-containers-by-import-container-key-request-builder.js";
|
|
14
|
+
export * from "./client/import-containers/by-project-key-customers-import-containers-request-builder.js";
|
|
15
|
+
export * from "./client/import-containers/by-project-key-discount-codes-import-containers-by-import-container-key-request-builder.js";
|
|
16
|
+
export * from "./client/import-containers/by-project-key-discount-codes-import-containers-request-builder.js";
|
|
17
|
+
export * from "./client/import-containers/by-project-key-import-containers-by-import-container-key-request-builder.js";
|
|
18
|
+
export * from "./client/import-containers/by-project-key-import-containers-request-builder.js";
|
|
19
|
+
export * from "./client/import-containers/by-project-key-inventories-import-containers-by-import-container-key-request-builder.js";
|
|
20
|
+
export * from "./client/import-containers/by-project-key-inventories-import-containers-request-builder.js";
|
|
21
|
+
export * from "./client/import-containers/by-project-key-order-patches-import-containers-by-import-container-key-request-builder.js";
|
|
22
|
+
export * from "./client/import-containers/by-project-key-order-patches-import-containers-request-builder.js";
|
|
23
|
+
export * from "./client/import-containers/by-project-key-orders-import-containers-by-import-container-key-request-builder.js";
|
|
24
|
+
export * from "./client/import-containers/by-project-key-orders-import-containers-request-builder.js";
|
|
25
|
+
export * from "./client/import-containers/by-project-key-prices-import-containers-by-import-container-key-request-builder.js";
|
|
26
|
+
export * from "./client/import-containers/by-project-key-prices-import-containers-request-builder.js";
|
|
27
|
+
export * from "./client/import-containers/by-project-key-product-drafts-import-containers-by-import-container-key-request-builder.js";
|
|
28
|
+
export * from "./client/import-containers/by-project-key-product-drafts-import-containers-request-builder.js";
|
|
29
|
+
export * from "./client/import-containers/by-project-key-product-types-import-containers-by-import-container-key-request-builder.js";
|
|
30
|
+
export * from "./client/import-containers/by-project-key-product-types-import-containers-request-builder.js";
|
|
31
|
+
export * from "./client/import-containers/by-project-key-product-variant-patches-import-containers-by-import-container-key-request-builder.js";
|
|
32
|
+
export * from "./client/import-containers/by-project-key-product-variant-patches-import-containers-request-builder.js";
|
|
33
|
+
export * from "./client/import-containers/by-project-key-product-variants-import-containers-by-import-container-key-request-builder.js";
|
|
34
|
+
export * from "./client/import-containers/by-project-key-product-variants-import-containers-request-builder.js";
|
|
35
|
+
export * from "./client/import-containers/by-project-key-products-import-containers-by-import-container-key-request-builder.js";
|
|
36
|
+
export * from "./client/import-containers/by-project-key-products-import-containers-request-builder.js";
|
|
37
|
+
export * from "./client/import-containers/by-project-key-standalone-prices-import-containers-by-import-container-key-request-builder.js";
|
|
38
|
+
export * from "./client/import-containers/by-project-key-standalone-prices-import-containers-request-builder.js";
|
|
39
|
+
export * from "./client/import-containers/by-project-key-types-import-containers-by-import-container-key-request-builder.js";
|
|
40
|
+
export * from "./client/import-containers/by-project-key-types-import-containers-request-builder.js";
|
|
41
|
+
export * from "./client/import-operations/by-project-key-import-containers-by-import-container-key-import-operations-request-builder.js";
|
|
42
|
+
export * from "./client/import-operations/by-project-key-import-operations-by-id-request-builder.js";
|
|
43
|
+
export * from "./client/import-operations/by-project-key-import-operations-request-builder.js";
|
|
44
|
+
export * from "./client/import-summaries/by-project-key-import-containers-by-import-container-key-import-summaries-request-builder.js";
|
|
45
|
+
export * from "./client/inventories/by-project-key-inventories-request-builder.js";
|
|
46
|
+
export * from "./client/order-patches/by-project-key-order-patches-request-builder.js";
|
|
47
|
+
export * from "./client/orders/by-project-key-orders-request-builder.js";
|
|
48
|
+
export * from "./client/prices/by-project-key-prices-request-builder.js";
|
|
49
|
+
export * from "./client/product-drafts/by-project-key-product-drafts-request-builder.js";
|
|
50
|
+
export * from "./client/product-types/by-project-key-product-types-request-builder.js";
|
|
51
|
+
export * from "./client/product-variant-patches/by-project-key-product-variant-patches-request-builder.js";
|
|
52
|
+
export * from "./client/product-variants/by-project-key-product-variants-request-builder.js";
|
|
53
|
+
export * from "./client/products/by-project-key-products-request-builder.js";
|
|
54
|
+
export * from "./client/standalone-prices/by-project-key-standalone-prices-request-builder.js";
|
|
55
|
+
export * from "./client/types/by-project-key-types-request-builder.js";
|
|
7
56
|
export * from "./models/categories.js";
|
|
8
57
|
export * from "./models/common.js";
|
|
9
58
|
export * from "./models/customers.js";
|
|
10
59
|
export * from "./models/customfields.js";
|
|
60
|
+
export * from "./models/discount-codes.js";
|
|
11
61
|
export * from "./models/errors.js";
|
|
12
62
|
export * from "./models/importcontainers.js";
|
|
13
63
|
export * from "./models/importoperations.js";
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { CategoryImport } from "./categories.js";
|
|
7
7
|
import { CustomerImport } from "./customers.js";
|
|
8
8
|
import { Custom } from "./customfields.js";
|
|
9
|
+
import { DiscountCodeImport } from "./discount-codes.js";
|
|
9
10
|
import { InventoryImport } from "./inventories.js";
|
|
10
11
|
import { PriceImport } from "./prices.js";
|
|
11
12
|
import { ProductDraftImport } from "./productdrafts.js";
|
|
@@ -173,7 +174,7 @@ export interface ImportResource {
|
|
|
173
174
|
*/
|
|
174
175
|
readonly key: string;
|
|
175
176
|
}
|
|
176
|
-
export type _ImportResource = ImportResource | CategoryImport | CustomerImport | InventoryImport | PriceImport | ProductDraftImport | ProductImport | ProductTypeImport | ProductVariantImport | StandalonePriceImport | TypeImport;
|
|
177
|
+
export type _ImportResource = ImportResource | CategoryImport | CustomerImport | DiscountCodeImport | InventoryImport | PriceImport | ProductDraftImport | ProductImport | ProductTypeImport | ProductVariantImport | StandalonePriceImport | TypeImport;
|
|
177
178
|
/**
|
|
178
179
|
* References a resource by key.
|
|
179
180
|
*/
|
|
@@ -466,7 +467,7 @@ export interface PriceTier {
|
|
|
466
467
|
* The resource types that can be imported.
|
|
467
468
|
*
|
|
468
469
|
*/
|
|
469
|
-
export type ImportResourceType = 'category' | 'customer' | 'inventory' | 'order' | 'order-patch' | 'price' | 'product' | 'product-draft' | 'product-type' | 'product-variant' | 'product-variant-patch' | 'standalone-price' | 'type' | string;
|
|
470
|
+
export type ImportResourceType = 'category' | 'customer' | 'discount-code' | 'inventory' | 'order' | 'order-patch' | 'price' | 'product' | 'product-draft' | 'product-type' | 'product-variant' | 'product-variant-patch' | 'standalone-price' | 'type' | string;
|
|
470
471
|
/**
|
|
471
472
|
* The type of the referenced resource.
|
|
472
473
|
*
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
+
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
+
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
+
*/
|
|
6
|
+
import { CartDiscountKeyReference, ImportResource, LocalizedString } from "./common.js";
|
|
7
|
+
import { Custom } from "./customfields.js";
|
|
8
|
+
/**
|
|
9
|
+
* The data representation for a Discount Code to be imported that is persisted as a [Discount Code](/../api/projects/discountCodes#discountcode) in the Project.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
export interface DiscountCodeImport extends ImportResource {
|
|
13
|
+
/**
|
|
14
|
+
* User-defined unique identifier. If a [Discount Code](/../api/projects/discountCodes#discountcode) with this `key` exists, it will be updated with the imported data.
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
readonly key: string;
|
|
19
|
+
/**
|
|
20
|
+
* Maps to `DiscountCode.name`.
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
readonly name?: LocalizedString;
|
|
25
|
+
/**
|
|
26
|
+
* Maps to `DiscountCode.description`.
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
readonly description?: LocalizedString;
|
|
31
|
+
/**
|
|
32
|
+
* User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.
|
|
33
|
+
*
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
readonly code: string;
|
|
37
|
+
/**
|
|
38
|
+
* Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
readonly cartDiscounts: CartDiscountKeyReference[];
|
|
43
|
+
/**
|
|
44
|
+
* DiscountCode can only be applied to Carts that match this predicate.
|
|
45
|
+
*
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
readonly cartPredicate?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Indicates if the DiscountCode is active and can be applied to the Cart.
|
|
51
|
+
*
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
readonly isActive: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Number of times the DiscountCode can be applied. DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.
|
|
57
|
+
*
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
readonly maxApplications?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.
|
|
63
|
+
*
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
readonly maxApplicationsPerCustomer?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Groups to which the DiscountCode belongs.
|
|
69
|
+
*
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
readonly groups?: string[];
|
|
73
|
+
/**
|
|
74
|
+
* Date and time (UTC) from which the DiscountCode is effective.
|
|
75
|
+
*
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
78
|
+
readonly validFrom?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Date and time (UTC) until which the DiscountCode is effective.
|
|
81
|
+
*
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
84
|
+
readonly validUntil?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Custom Fields of the DiscountCode.
|
|
87
|
+
*
|
|
88
|
+
*
|
|
89
|
+
*/
|
|
90
|
+
readonly custom?: Custom;
|
|
91
|
+
}
|