@commercetools/importapi-sdk 4.0.0 → 4.2.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 +225 -0
- package/dist/commercetools-importapi-sdk.browser.cjs.js +199 -230
- package/dist/commercetools-importapi-sdk.browser.esm.js +199 -230
- package/dist/commercetools-importapi-sdk.cjs.dev.js +199 -230
- package/dist/commercetools-importapi-sdk.cjs.prod.js +199 -230
- package/dist/commercetools-importapi-sdk.esm.js +199 -230
- package/dist/declarations/src/generated/client/by-project-key-request-builder.d.ts +2 -0
- package/dist/declarations/src/generated/client/import-containers/by-project-key-standalone-prices-import-containers-by-import-container-key-request-builder.d.ts +37 -0
- package/dist/declarations/src/generated/client/import-containers/by-project-key-standalone-prices-import-containers-request-builder.d.ts +28 -0
- package/dist/declarations/src/generated/client/standalone-prices/by-project-key-standalone-prices-request-builder.d.ts +26 -0
- package/dist/declarations/src/generated/index.d.ts +1 -0
- package/dist/declarations/src/generated/models/common.d.ts +19 -7
- package/dist/declarations/src/generated/models/customfields.d.ts +1 -1
- package/dist/declarations/src/generated/models/errors.d.ts +1 -1
- package/dist/declarations/src/generated/models/importoperations.d.ts +1 -1
- package/dist/declarations/src/generated/models/importrequests.d.ts +16 -2
- package/dist/declarations/src/generated/models/order-patches.d.ts +1 -1
- package/dist/declarations/src/generated/models/orders.d.ts +21 -20
- package/dist/declarations/src/generated/models/prices.d.ts +14 -8
- package/dist/declarations/src/generated/models/productdrafts.d.ts +2 -0
- package/dist/declarations/src/generated/models/products.d.ts +1 -1
- package/dist/declarations/src/generated/models/producttypes.d.ts +3 -3
- package/dist/declarations/src/generated/models/productvariants.d.ts +5 -2
- package/dist/declarations/src/generated/models/standalone-prices.d.ts +76 -0
- package/dist/declarations/src/generated/shared/utils/common-types.d.ts +5 -5
- package/dist/declarations/src/generated/shared/utils/middleware.d.ts +1 -1
- package/package.json +6 -6
|
@@ -4,7 +4,24 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var querystring = require('querystring');
|
|
6
6
|
|
|
7
|
+
function _toPrimitive(input, hint) {
|
|
8
|
+
if (typeof input !== "object" || input === null) return input;
|
|
9
|
+
var prim = input[Symbol.toPrimitive];
|
|
10
|
+
if (prim !== undefined) {
|
|
11
|
+
var res = prim.call(input, hint || "default");
|
|
12
|
+
if (typeof res !== "object") return res;
|
|
13
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
14
|
+
}
|
|
15
|
+
return (hint === "string" ? String : Number)(input);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _toPropertyKey(arg) {
|
|
19
|
+
var key = _toPrimitive(arg, "string");
|
|
20
|
+
return typeof key === "symbol" ? key : String(key);
|
|
21
|
+
}
|
|
22
|
+
|
|
7
23
|
function _defineProperty(obj, key, value) {
|
|
24
|
+
key = _toPropertyKey(key);
|
|
8
25
|
if (key in obj) {
|
|
9
26
|
Object.defineProperty(obj, key, {
|
|
10
27
|
value: value,
|
|
@@ -15,7 +32,6 @@ function _defineProperty(obj, key, value) {
|
|
|
15
32
|
} else {
|
|
16
33
|
obj[key] = value;
|
|
17
34
|
}
|
|
18
|
-
|
|
19
35
|
return obj;
|
|
20
36
|
}
|
|
21
37
|
|
|
@@ -24,56 +40,45 @@ function _defineProperty(obj, key, value) {
|
|
|
24
40
|
* Please don't change this file manually but run `rmf-codegen generate <raml_file_path> -o <output_path> -t typescript_client` to update it.
|
|
25
41
|
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
26
42
|
*/
|
|
27
|
-
|
|
28
43
|
function isDefined(value) {
|
|
29
44
|
return typeof value !== 'undefined' && value !== null;
|
|
30
45
|
}
|
|
31
|
-
|
|
32
46
|
function cleanObject(obj) {
|
|
33
47
|
return Object.keys(obj).reduce((result, key) => {
|
|
34
48
|
const value = obj[key];
|
|
35
|
-
|
|
36
49
|
if (Array.isArray(value)) {
|
|
37
50
|
const values = value.filter(isDefined);
|
|
38
|
-
|
|
39
51
|
if (!values.length) {
|
|
40
52
|
return result;
|
|
41
53
|
}
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
return {
|
|
55
|
+
...result,
|
|
44
56
|
[key]: values
|
|
45
57
|
};
|
|
46
58
|
}
|
|
47
|
-
|
|
48
59
|
if (isDefined(value)) {
|
|
49
|
-
return {
|
|
60
|
+
return {
|
|
61
|
+
...result,
|
|
50
62
|
[key]: value
|
|
51
63
|
};
|
|
52
64
|
}
|
|
53
|
-
|
|
54
65
|
return result;
|
|
55
66
|
}, {});
|
|
56
67
|
}
|
|
57
|
-
|
|
58
68
|
function formatQueryString(variableMap) {
|
|
59
69
|
const map = cleanObject(variableMap);
|
|
60
70
|
const result = querystring.stringify(map);
|
|
61
|
-
|
|
62
71
|
if (result === '') {
|
|
63
72
|
return '';
|
|
64
73
|
}
|
|
65
|
-
|
|
66
74
|
return `?${result}`;
|
|
67
75
|
}
|
|
68
|
-
|
|
69
76
|
function buildRelativeUri(commonRequest) {
|
|
70
77
|
const pathMap = commonRequest.pathVariables;
|
|
71
78
|
var uri = commonRequest.uriTemplate;
|
|
72
|
-
|
|
73
79
|
for (const param in pathMap) {
|
|
74
80
|
uri = uri.replace(`{${param}}`, `${pathMap[param]}`);
|
|
75
81
|
}
|
|
76
|
-
|
|
77
82
|
const resQuery = formatQueryString(commonRequest.queryParams || {});
|
|
78
83
|
return `${uri}${resQuery}`;
|
|
79
84
|
}
|
|
@@ -81,22 +86,18 @@ function buildRelativeUri(commonRequest) {
|
|
|
81
86
|
class ApiRequest {
|
|
82
87
|
constructor(request, requestExecutor) {
|
|
83
88
|
this.requestExecutor = requestExecutor;
|
|
84
|
-
|
|
85
89
|
_defineProperty(this, "request", void 0);
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
this.request = {
|
|
91
|
+
...request,
|
|
88
92
|
uri: buildRelativeUri(request)
|
|
89
93
|
};
|
|
90
94
|
}
|
|
91
|
-
|
|
92
95
|
clientRequest() {
|
|
93
96
|
return this.request;
|
|
94
97
|
}
|
|
95
|
-
|
|
96
98
|
execute() {
|
|
97
99
|
return this.requestExecutor(this.request);
|
|
98
100
|
}
|
|
99
|
-
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
/**
|
|
@@ -106,7 +107,6 @@ class ApiRequest {
|
|
|
106
107
|
*/
|
|
107
108
|
/**
|
|
108
109
|
**/
|
|
109
|
-
|
|
110
110
|
class ByProjectKeyCategoriesImportContainersByImportContainerKeyRequestBuilder {
|
|
111
111
|
constructor(args) {
|
|
112
112
|
this.args = args;
|
|
@@ -114,8 +114,6 @@ class ByProjectKeyCategoriesImportContainersByImportContainerKeyRequestBuilder {
|
|
|
114
114
|
/**
|
|
115
115
|
* Creates a request for creating new Categories or updating existing ones.
|
|
116
116
|
*/
|
|
117
|
-
|
|
118
|
-
|
|
119
117
|
post(methodArgs) {
|
|
120
118
|
return new ApiRequest({
|
|
121
119
|
baseUri: this.args.baseUri,
|
|
@@ -129,7 +127,6 @@ class ByProjectKeyCategoriesImportContainersByImportContainerKeyRequestBuilder {
|
|
|
129
127
|
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
130
128
|
}, this.args.executeRequest);
|
|
131
129
|
}
|
|
132
|
-
|
|
133
130
|
}
|
|
134
131
|
|
|
135
132
|
/**
|
|
@@ -139,22 +136,20 @@ class ByProjectKeyCategoriesImportContainersByImportContainerKeyRequestBuilder {
|
|
|
139
136
|
*/
|
|
140
137
|
/**
|
|
141
138
|
**/
|
|
142
|
-
|
|
143
139
|
class ByProjectKeyCategoriesImportContainersRequestBuilder {
|
|
144
140
|
constructor(args) {
|
|
145
141
|
this.args = args;
|
|
146
142
|
}
|
|
147
|
-
|
|
148
143
|
withImportContainerKeyValue(childPathArgs) {
|
|
149
144
|
return new ByProjectKeyCategoriesImportContainersByImportContainerKeyRequestBuilder({
|
|
150
|
-
pathArgs: {
|
|
145
|
+
pathArgs: {
|
|
146
|
+
...this.args.pathArgs,
|
|
151
147
|
...childPathArgs
|
|
152
148
|
},
|
|
153
149
|
executeRequest: this.args.executeRequest,
|
|
154
150
|
baseUri: this.args.baseUri
|
|
155
151
|
});
|
|
156
152
|
}
|
|
157
|
-
|
|
158
153
|
}
|
|
159
154
|
|
|
160
155
|
/**
|
|
@@ -164,21 +159,19 @@ class ByProjectKeyCategoriesImportContainersRequestBuilder {
|
|
|
164
159
|
*/
|
|
165
160
|
/**
|
|
166
161
|
**/
|
|
167
|
-
|
|
168
162
|
class ByProjectKeyCategoriesRequestBuilder {
|
|
169
163
|
constructor(args) {
|
|
170
164
|
this.args = args;
|
|
171
165
|
}
|
|
172
|
-
|
|
173
166
|
importContainers() {
|
|
174
167
|
return new ByProjectKeyCategoriesImportContainersRequestBuilder({
|
|
175
|
-
pathArgs: {
|
|
168
|
+
pathArgs: {
|
|
169
|
+
...this.args.pathArgs
|
|
176
170
|
},
|
|
177
171
|
executeRequest: this.args.executeRequest,
|
|
178
172
|
baseUri: this.args.baseUri
|
|
179
173
|
});
|
|
180
174
|
}
|
|
181
|
-
|
|
182
175
|
}
|
|
183
176
|
|
|
184
177
|
/**
|
|
@@ -188,7 +181,6 @@ class ByProjectKeyCategoriesRequestBuilder {
|
|
|
188
181
|
*/
|
|
189
182
|
/**
|
|
190
183
|
**/
|
|
191
|
-
|
|
192
184
|
class ByProjectKeyCustomersImportContainersByImportContainerKeyRequestBuilder {
|
|
193
185
|
constructor(args) {
|
|
194
186
|
this.args = args;
|
|
@@ -196,8 +188,6 @@ class ByProjectKeyCustomersImportContainersByImportContainerKeyRequestBuilder {
|
|
|
196
188
|
/**
|
|
197
189
|
* Creates a request for creating new Customers or updating existing ones.
|
|
198
190
|
*/
|
|
199
|
-
|
|
200
|
-
|
|
201
191
|
post(methodArgs) {
|
|
202
192
|
return new ApiRequest({
|
|
203
193
|
baseUri: this.args.baseUri,
|
|
@@ -211,7 +201,6 @@ class ByProjectKeyCustomersImportContainersByImportContainerKeyRequestBuilder {
|
|
|
211
201
|
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
212
202
|
}, this.args.executeRequest);
|
|
213
203
|
}
|
|
214
|
-
|
|
215
204
|
}
|
|
216
205
|
|
|
217
206
|
/**
|
|
@@ -221,22 +210,20 @@ class ByProjectKeyCustomersImportContainersByImportContainerKeyRequestBuilder {
|
|
|
221
210
|
*/
|
|
222
211
|
/**
|
|
223
212
|
**/
|
|
224
|
-
|
|
225
213
|
class ByProjectKeyCustomersImportContainersRequestBuilder {
|
|
226
214
|
constructor(args) {
|
|
227
215
|
this.args = args;
|
|
228
216
|
}
|
|
229
|
-
|
|
230
217
|
withImportContainerKeyValue(childPathArgs) {
|
|
231
218
|
return new ByProjectKeyCustomersImportContainersByImportContainerKeyRequestBuilder({
|
|
232
|
-
pathArgs: {
|
|
219
|
+
pathArgs: {
|
|
220
|
+
...this.args.pathArgs,
|
|
233
221
|
...childPathArgs
|
|
234
222
|
},
|
|
235
223
|
executeRequest: this.args.executeRequest,
|
|
236
224
|
baseUri: this.args.baseUri
|
|
237
225
|
});
|
|
238
226
|
}
|
|
239
|
-
|
|
240
227
|
}
|
|
241
228
|
|
|
242
229
|
/**
|
|
@@ -246,21 +233,19 @@ class ByProjectKeyCustomersImportContainersRequestBuilder {
|
|
|
246
233
|
*/
|
|
247
234
|
/**
|
|
248
235
|
**/
|
|
249
|
-
|
|
250
236
|
class ByProjectKeyCustomersRequestBuilder {
|
|
251
237
|
constructor(args) {
|
|
252
238
|
this.args = args;
|
|
253
239
|
}
|
|
254
|
-
|
|
255
240
|
importContainers() {
|
|
256
241
|
return new ByProjectKeyCustomersImportContainersRequestBuilder({
|
|
257
|
-
pathArgs: {
|
|
242
|
+
pathArgs: {
|
|
243
|
+
...this.args.pathArgs
|
|
258
244
|
},
|
|
259
245
|
executeRequest: this.args.executeRequest,
|
|
260
246
|
baseUri: this.args.baseUri
|
|
261
247
|
});
|
|
262
248
|
}
|
|
263
|
-
|
|
264
249
|
}
|
|
265
250
|
|
|
266
251
|
/**
|
|
@@ -270,7 +255,6 @@ class ByProjectKeyCustomersRequestBuilder {
|
|
|
270
255
|
*/
|
|
271
256
|
/**
|
|
272
257
|
**/
|
|
273
|
-
|
|
274
258
|
class ByProjectKeyImportContainersByImportContainerKeyImportOperationsRequestBuilder {
|
|
275
259
|
constructor(args) {
|
|
276
260
|
this.args = args;
|
|
@@ -279,20 +263,18 @@ class ByProjectKeyImportContainersByImportContainerKeyImportOperationsRequestBui
|
|
|
279
263
|
* Retrieves all [ImportOperations](ctp:import:type:ImportOperation) of a given ImportContainer key.
|
|
280
264
|
*
|
|
281
265
|
*/
|
|
282
|
-
|
|
283
|
-
|
|
284
266
|
get(methodArgs) {
|
|
285
267
|
return new ApiRequest({
|
|
286
268
|
baseUri: this.args.baseUri,
|
|
287
269
|
method: 'GET',
|
|
288
270
|
uriTemplate: '/{projectKey}/import-containers/{importContainerKey}/import-operations',
|
|
289
271
|
pathVariables: this.args.pathArgs,
|
|
290
|
-
headers: {
|
|
272
|
+
headers: {
|
|
273
|
+
...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
291
274
|
},
|
|
292
275
|
queryParams: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.queryArgs
|
|
293
276
|
}, this.args.executeRequest);
|
|
294
277
|
}
|
|
295
|
-
|
|
296
278
|
}
|
|
297
279
|
|
|
298
280
|
/**
|
|
@@ -302,7 +284,6 @@ class ByProjectKeyImportContainersByImportContainerKeyImportOperationsRequestBui
|
|
|
302
284
|
*/
|
|
303
285
|
/**
|
|
304
286
|
**/
|
|
305
|
-
|
|
306
287
|
class ByProjectKeyImportContainersByImportContainerKeyImportSummariesRequestBuilder {
|
|
307
288
|
constructor(args) {
|
|
308
289
|
this.args = args;
|
|
@@ -311,19 +292,17 @@ class ByProjectKeyImportContainersByImportContainerKeyImportSummariesRequestBuil
|
|
|
311
292
|
* Retrieves an [ImportSummary](ctp:import:type:ImportSummary) for the given import container. An [ImportSummary](ctp:import:type:ImportSummary) is calculated on demand.
|
|
312
293
|
*
|
|
313
294
|
*/
|
|
314
|
-
|
|
315
|
-
|
|
316
295
|
get(methodArgs) {
|
|
317
296
|
return new ApiRequest({
|
|
318
297
|
baseUri: this.args.baseUri,
|
|
319
298
|
method: 'GET',
|
|
320
299
|
uriTemplate: '/{projectKey}/import-containers/{importContainerKey}/import-summaries',
|
|
321
300
|
pathVariables: this.args.pathArgs,
|
|
322
|
-
headers: {
|
|
301
|
+
headers: {
|
|
302
|
+
...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
323
303
|
}
|
|
324
304
|
}, this.args.executeRequest);
|
|
325
305
|
}
|
|
326
|
-
|
|
327
306
|
}
|
|
328
307
|
|
|
329
308
|
/**
|
|
@@ -333,34 +312,32 @@ class ByProjectKeyImportContainersByImportContainerKeyImportSummariesRequestBuil
|
|
|
333
312
|
*/
|
|
334
313
|
/**
|
|
335
314
|
**/
|
|
336
|
-
|
|
337
315
|
class ByProjectKeyImportContainersByImportContainerKeyRequestBuilder {
|
|
338
316
|
constructor(args) {
|
|
339
317
|
this.args = args;
|
|
340
318
|
}
|
|
341
|
-
|
|
342
319
|
importSummaries() {
|
|
343
320
|
return new ByProjectKeyImportContainersByImportContainerKeyImportSummariesRequestBuilder({
|
|
344
|
-
pathArgs: {
|
|
321
|
+
pathArgs: {
|
|
322
|
+
...this.args.pathArgs
|
|
345
323
|
},
|
|
346
324
|
executeRequest: this.args.executeRequest,
|
|
347
325
|
baseUri: this.args.baseUri
|
|
348
326
|
});
|
|
349
327
|
}
|
|
350
|
-
|
|
351
328
|
importOperations() {
|
|
352
329
|
return new ByProjectKeyImportContainersByImportContainerKeyImportOperationsRequestBuilder({
|
|
353
|
-
pathArgs: {
|
|
330
|
+
pathArgs: {
|
|
331
|
+
...this.args.pathArgs
|
|
354
332
|
},
|
|
355
333
|
executeRequest: this.args.executeRequest,
|
|
356
334
|
baseUri: this.args.baseUri
|
|
357
335
|
});
|
|
358
336
|
}
|
|
337
|
+
|
|
359
338
|
/**
|
|
360
339
|
* Updates the import container given by the key.
|
|
361
340
|
*/
|
|
362
|
-
|
|
363
|
-
|
|
364
341
|
put(methodArgs) {
|
|
365
342
|
return new ApiRequest({
|
|
366
343
|
baseUri: this.args.baseUri,
|
|
@@ -377,34 +354,31 @@ class ByProjectKeyImportContainersByImportContainerKeyRequestBuilder {
|
|
|
377
354
|
/**
|
|
378
355
|
* Retrieves the import container given by the key.
|
|
379
356
|
*/
|
|
380
|
-
|
|
381
|
-
|
|
382
357
|
get(methodArgs) {
|
|
383
358
|
return new ApiRequest({
|
|
384
359
|
baseUri: this.args.baseUri,
|
|
385
360
|
method: 'GET',
|
|
386
361
|
uriTemplate: '/{projectKey}/import-containers/{importContainerKey}',
|
|
387
362
|
pathVariables: this.args.pathArgs,
|
|
388
|
-
headers: {
|
|
363
|
+
headers: {
|
|
364
|
+
...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
389
365
|
}
|
|
390
366
|
}, this.args.executeRequest);
|
|
391
367
|
}
|
|
392
368
|
/**
|
|
393
369
|
* Deletes the import container given by the key.
|
|
394
370
|
*/
|
|
395
|
-
|
|
396
|
-
|
|
397
371
|
delete(methodArgs) {
|
|
398
372
|
return new ApiRequest({
|
|
399
373
|
baseUri: this.args.baseUri,
|
|
400
374
|
method: 'DELETE',
|
|
401
375
|
uriTemplate: '/{projectKey}/import-containers/{importContainerKey}',
|
|
402
376
|
pathVariables: this.args.pathArgs,
|
|
403
|
-
headers: {
|
|
377
|
+
headers: {
|
|
378
|
+
...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
404
379
|
}
|
|
405
380
|
}, this.args.executeRequest);
|
|
406
381
|
}
|
|
407
|
-
|
|
408
382
|
}
|
|
409
383
|
|
|
410
384
|
/**
|
|
@@ -414,26 +388,24 @@ class ByProjectKeyImportContainersByImportContainerKeyRequestBuilder {
|
|
|
414
388
|
*/
|
|
415
389
|
/**
|
|
416
390
|
**/
|
|
417
|
-
|
|
418
391
|
class ByProjectKeyImportContainersRequestBuilder {
|
|
419
392
|
constructor(args) {
|
|
420
393
|
this.args = args;
|
|
421
394
|
}
|
|
422
|
-
|
|
423
395
|
withImportContainerKeyValue(childPathArgs) {
|
|
424
396
|
return new ByProjectKeyImportContainersByImportContainerKeyRequestBuilder({
|
|
425
|
-
pathArgs: {
|
|
397
|
+
pathArgs: {
|
|
398
|
+
...this.args.pathArgs,
|
|
426
399
|
...childPathArgs
|
|
427
400
|
},
|
|
428
401
|
executeRequest: this.args.executeRequest,
|
|
429
402
|
baseUri: this.args.baseUri
|
|
430
403
|
});
|
|
431
404
|
}
|
|
405
|
+
|
|
432
406
|
/**
|
|
433
407
|
* Creates a new import container.
|
|
434
408
|
*/
|
|
435
|
-
|
|
436
|
-
|
|
437
409
|
post(methodArgs) {
|
|
438
410
|
return new ApiRequest({
|
|
439
411
|
baseUri: this.args.baseUri,
|
|
@@ -450,20 +422,18 @@ class ByProjectKeyImportContainersRequestBuilder {
|
|
|
450
422
|
/**
|
|
451
423
|
* Retrieves all import containers of a given project key.
|
|
452
424
|
*/
|
|
453
|
-
|
|
454
|
-
|
|
455
425
|
get(methodArgs) {
|
|
456
426
|
return new ApiRequest({
|
|
457
427
|
baseUri: this.args.baseUri,
|
|
458
428
|
method: 'GET',
|
|
459
429
|
uriTemplate: '/{projectKey}/import-containers',
|
|
460
430
|
pathVariables: this.args.pathArgs,
|
|
461
|
-
headers: {
|
|
431
|
+
headers: {
|
|
432
|
+
...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
462
433
|
},
|
|
463
434
|
queryParams: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.queryArgs
|
|
464
435
|
}, this.args.executeRequest);
|
|
465
436
|
}
|
|
466
|
-
|
|
467
437
|
}
|
|
468
438
|
|
|
469
439
|
/**
|
|
@@ -473,7 +443,6 @@ class ByProjectKeyImportContainersRequestBuilder {
|
|
|
473
443
|
*/
|
|
474
444
|
/**
|
|
475
445
|
**/
|
|
476
|
-
|
|
477
446
|
class ByProjectKeyImportOperationsByIdRequestBuilder {
|
|
478
447
|
constructor(args) {
|
|
479
448
|
this.args = args;
|
|
@@ -482,19 +451,17 @@ class ByProjectKeyImportOperationsByIdRequestBuilder {
|
|
|
482
451
|
* Retrieves the [ImportOperation](ctp:import:type:ImportOperation) of a given ID.
|
|
483
452
|
*
|
|
484
453
|
*/
|
|
485
|
-
|
|
486
|
-
|
|
487
454
|
get(methodArgs) {
|
|
488
455
|
return new ApiRequest({
|
|
489
456
|
baseUri: this.args.baseUri,
|
|
490
457
|
method: 'GET',
|
|
491
458
|
uriTemplate: '/{projectKey}/import-operations/{id}',
|
|
492
459
|
pathVariables: this.args.pathArgs,
|
|
493
|
-
headers: {
|
|
460
|
+
headers: {
|
|
461
|
+
...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
494
462
|
}
|
|
495
463
|
}, this.args.executeRequest);
|
|
496
464
|
}
|
|
497
|
-
|
|
498
465
|
}
|
|
499
466
|
|
|
500
467
|
/**
|
|
@@ -504,22 +471,20 @@ class ByProjectKeyImportOperationsByIdRequestBuilder {
|
|
|
504
471
|
*/
|
|
505
472
|
/**
|
|
506
473
|
**/
|
|
507
|
-
|
|
508
474
|
class ByProjectKeyImportOperationsRequestBuilder {
|
|
509
475
|
constructor(args) {
|
|
510
476
|
this.args = args;
|
|
511
477
|
}
|
|
512
|
-
|
|
513
478
|
withIdValue(childPathArgs) {
|
|
514
479
|
return new ByProjectKeyImportOperationsByIdRequestBuilder({
|
|
515
|
-
pathArgs: {
|
|
480
|
+
pathArgs: {
|
|
481
|
+
...this.args.pathArgs,
|
|
516
482
|
...childPathArgs
|
|
517
483
|
},
|
|
518
484
|
executeRequest: this.args.executeRequest,
|
|
519
485
|
baseUri: this.args.baseUri
|
|
520
486
|
});
|
|
521
487
|
}
|
|
522
|
-
|
|
523
488
|
}
|
|
524
489
|
|
|
525
490
|
/**
|
|
@@ -529,7 +494,6 @@ class ByProjectKeyImportOperationsRequestBuilder {
|
|
|
529
494
|
*/
|
|
530
495
|
/**
|
|
531
496
|
**/
|
|
532
|
-
|
|
533
497
|
class ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder {
|
|
534
498
|
constructor(args) {
|
|
535
499
|
this.args = args;
|
|
@@ -537,8 +501,6 @@ class ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder
|
|
|
537
501
|
/**
|
|
538
502
|
* Creates a request for creating new Inventories or updating existing ones.
|
|
539
503
|
*/
|
|
540
|
-
|
|
541
|
-
|
|
542
504
|
post(methodArgs) {
|
|
543
505
|
return new ApiRequest({
|
|
544
506
|
baseUri: this.args.baseUri,
|
|
@@ -552,7 +514,6 @@ class ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder
|
|
|
552
514
|
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
553
515
|
}, this.args.executeRequest);
|
|
554
516
|
}
|
|
555
|
-
|
|
556
517
|
}
|
|
557
518
|
|
|
558
519
|
/**
|
|
@@ -562,22 +523,20 @@ class ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder
|
|
|
562
523
|
*/
|
|
563
524
|
/**
|
|
564
525
|
**/
|
|
565
|
-
|
|
566
526
|
class ByProjectKeyInventoriesImportContainersRequestBuilder {
|
|
567
527
|
constructor(args) {
|
|
568
528
|
this.args = args;
|
|
569
529
|
}
|
|
570
|
-
|
|
571
530
|
withImportContainerKeyValue(childPathArgs) {
|
|
572
531
|
return new ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder({
|
|
573
|
-
pathArgs: {
|
|
532
|
+
pathArgs: {
|
|
533
|
+
...this.args.pathArgs,
|
|
574
534
|
...childPathArgs
|
|
575
535
|
},
|
|
576
536
|
executeRequest: this.args.executeRequest,
|
|
577
537
|
baseUri: this.args.baseUri
|
|
578
538
|
});
|
|
579
539
|
}
|
|
580
|
-
|
|
581
540
|
}
|
|
582
541
|
|
|
583
542
|
/**
|
|
@@ -587,21 +546,19 @@ class ByProjectKeyInventoriesImportContainersRequestBuilder {
|
|
|
587
546
|
*/
|
|
588
547
|
/**
|
|
589
548
|
**/
|
|
590
|
-
|
|
591
549
|
class ByProjectKeyInventoriesRequestBuilder {
|
|
592
550
|
constructor(args) {
|
|
593
551
|
this.args = args;
|
|
594
552
|
}
|
|
595
|
-
|
|
596
553
|
importContainers() {
|
|
597
554
|
return new ByProjectKeyInventoriesImportContainersRequestBuilder({
|
|
598
|
-
pathArgs: {
|
|
555
|
+
pathArgs: {
|
|
556
|
+
...this.args.pathArgs
|
|
599
557
|
},
|
|
600
558
|
executeRequest: this.args.executeRequest,
|
|
601
559
|
baseUri: this.args.baseUri
|
|
602
560
|
});
|
|
603
561
|
}
|
|
604
|
-
|
|
605
562
|
}
|
|
606
563
|
|
|
607
564
|
/**
|
|
@@ -611,7 +568,6 @@ class ByProjectKeyInventoriesRequestBuilder {
|
|
|
611
568
|
*/
|
|
612
569
|
/**
|
|
613
570
|
**/
|
|
614
|
-
|
|
615
571
|
class ByProjectKeyOrderPatchesImportContainersByImportContainerKeyRequestBuilder {
|
|
616
572
|
constructor(args) {
|
|
617
573
|
this.args = args;
|
|
@@ -619,8 +575,6 @@ class ByProjectKeyOrderPatchesImportContainersByImportContainerKeyRequestBuilder
|
|
|
619
575
|
/**
|
|
620
576
|
* Creates a new import request for order patches
|
|
621
577
|
*/
|
|
622
|
-
|
|
623
|
-
|
|
624
578
|
post(methodArgs) {
|
|
625
579
|
return new ApiRequest({
|
|
626
580
|
baseUri: this.args.baseUri,
|
|
@@ -634,7 +588,6 @@ class ByProjectKeyOrderPatchesImportContainersByImportContainerKeyRequestBuilder
|
|
|
634
588
|
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
635
589
|
}, this.args.executeRequest);
|
|
636
590
|
}
|
|
637
|
-
|
|
638
591
|
}
|
|
639
592
|
|
|
640
593
|
/**
|
|
@@ -644,22 +597,20 @@ class ByProjectKeyOrderPatchesImportContainersByImportContainerKeyRequestBuilder
|
|
|
644
597
|
*/
|
|
645
598
|
/**
|
|
646
599
|
**/
|
|
647
|
-
|
|
648
600
|
class ByProjectKeyOrderPatchesImportContainersRequestBuilder {
|
|
649
601
|
constructor(args) {
|
|
650
602
|
this.args = args;
|
|
651
603
|
}
|
|
652
|
-
|
|
653
604
|
withImportContainerKeyValue(childPathArgs) {
|
|
654
605
|
return new ByProjectKeyOrderPatchesImportContainersByImportContainerKeyRequestBuilder({
|
|
655
|
-
pathArgs: {
|
|
606
|
+
pathArgs: {
|
|
607
|
+
...this.args.pathArgs,
|
|
656
608
|
...childPathArgs
|
|
657
609
|
},
|
|
658
610
|
executeRequest: this.args.executeRequest,
|
|
659
611
|
baseUri: this.args.baseUri
|
|
660
612
|
});
|
|
661
613
|
}
|
|
662
|
-
|
|
663
614
|
}
|
|
664
615
|
|
|
665
616
|
/**
|
|
@@ -669,21 +620,19 @@ class ByProjectKeyOrderPatchesImportContainersRequestBuilder {
|
|
|
669
620
|
*/
|
|
670
621
|
/**
|
|
671
622
|
**/
|
|
672
|
-
|
|
673
623
|
class ByProjectKeyOrderPatchesRequestBuilder {
|
|
674
624
|
constructor(args) {
|
|
675
625
|
this.args = args;
|
|
676
626
|
}
|
|
677
|
-
|
|
678
627
|
importContainers() {
|
|
679
628
|
return new ByProjectKeyOrderPatchesImportContainersRequestBuilder({
|
|
680
|
-
pathArgs: {
|
|
629
|
+
pathArgs: {
|
|
630
|
+
...this.args.pathArgs
|
|
681
631
|
},
|
|
682
632
|
executeRequest: this.args.executeRequest,
|
|
683
633
|
baseUri: this.args.baseUri
|
|
684
634
|
});
|
|
685
635
|
}
|
|
686
|
-
|
|
687
636
|
}
|
|
688
637
|
|
|
689
638
|
/**
|
|
@@ -693,7 +642,6 @@ class ByProjectKeyOrderPatchesRequestBuilder {
|
|
|
693
642
|
*/
|
|
694
643
|
/**
|
|
695
644
|
**/
|
|
696
|
-
|
|
697
645
|
class ByProjectKeyOrdersImportContainersByImportContainerKeyRequestBuilder {
|
|
698
646
|
constructor(args) {
|
|
699
647
|
this.args = args;
|
|
@@ -701,8 +649,6 @@ class ByProjectKeyOrdersImportContainersByImportContainerKeyRequestBuilder {
|
|
|
701
649
|
/**
|
|
702
650
|
* Creates a request for creating new Orders or updating existing ones.
|
|
703
651
|
*/
|
|
704
|
-
|
|
705
|
-
|
|
706
652
|
post(methodArgs) {
|
|
707
653
|
return new ApiRequest({
|
|
708
654
|
baseUri: this.args.baseUri,
|
|
@@ -716,7 +662,6 @@ class ByProjectKeyOrdersImportContainersByImportContainerKeyRequestBuilder {
|
|
|
716
662
|
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
717
663
|
}, this.args.executeRequest);
|
|
718
664
|
}
|
|
719
|
-
|
|
720
665
|
}
|
|
721
666
|
|
|
722
667
|
/**
|
|
@@ -726,22 +671,20 @@ class ByProjectKeyOrdersImportContainersByImportContainerKeyRequestBuilder {
|
|
|
726
671
|
*/
|
|
727
672
|
/**
|
|
728
673
|
**/
|
|
729
|
-
|
|
730
674
|
class ByProjectKeyOrdersImportContainersRequestBuilder {
|
|
731
675
|
constructor(args) {
|
|
732
676
|
this.args = args;
|
|
733
677
|
}
|
|
734
|
-
|
|
735
678
|
withImportContainerKeyValue(childPathArgs) {
|
|
736
679
|
return new ByProjectKeyOrdersImportContainersByImportContainerKeyRequestBuilder({
|
|
737
|
-
pathArgs: {
|
|
680
|
+
pathArgs: {
|
|
681
|
+
...this.args.pathArgs,
|
|
738
682
|
...childPathArgs
|
|
739
683
|
},
|
|
740
684
|
executeRequest: this.args.executeRequest,
|
|
741
685
|
baseUri: this.args.baseUri
|
|
742
686
|
});
|
|
743
687
|
}
|
|
744
|
-
|
|
745
688
|
}
|
|
746
689
|
|
|
747
690
|
/**
|
|
@@ -751,21 +694,19 @@ class ByProjectKeyOrdersImportContainersRequestBuilder {
|
|
|
751
694
|
*/
|
|
752
695
|
/**
|
|
753
696
|
**/
|
|
754
|
-
|
|
755
697
|
class ByProjectKeyOrdersRequestBuilder {
|
|
756
698
|
constructor(args) {
|
|
757
699
|
this.args = args;
|
|
758
700
|
}
|
|
759
|
-
|
|
760
701
|
importContainers() {
|
|
761
702
|
return new ByProjectKeyOrdersImportContainersRequestBuilder({
|
|
762
|
-
pathArgs: {
|
|
703
|
+
pathArgs: {
|
|
704
|
+
...this.args.pathArgs
|
|
763
705
|
},
|
|
764
706
|
executeRequest: this.args.executeRequest,
|
|
765
707
|
baseUri: this.args.baseUri
|
|
766
708
|
});
|
|
767
709
|
}
|
|
768
|
-
|
|
769
710
|
}
|
|
770
711
|
|
|
771
712
|
/**
|
|
@@ -775,7 +716,6 @@ class ByProjectKeyOrdersRequestBuilder {
|
|
|
775
716
|
*/
|
|
776
717
|
/**
|
|
777
718
|
**/
|
|
778
|
-
|
|
779
719
|
class ByProjectKeyPricesImportContainersByImportContainerKeyRequestBuilder {
|
|
780
720
|
constructor(args) {
|
|
781
721
|
this.args = args;
|
|
@@ -783,8 +723,6 @@ class ByProjectKeyPricesImportContainersByImportContainerKeyRequestBuilder {
|
|
|
783
723
|
/**
|
|
784
724
|
* Creates a request for creating new Prices or updating existing ones.
|
|
785
725
|
*/
|
|
786
|
-
|
|
787
|
-
|
|
788
726
|
post(methodArgs) {
|
|
789
727
|
return new ApiRequest({
|
|
790
728
|
baseUri: this.args.baseUri,
|
|
@@ -798,7 +736,6 @@ class ByProjectKeyPricesImportContainersByImportContainerKeyRequestBuilder {
|
|
|
798
736
|
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
799
737
|
}, this.args.executeRequest);
|
|
800
738
|
}
|
|
801
|
-
|
|
802
739
|
}
|
|
803
740
|
|
|
804
741
|
/**
|
|
@@ -808,22 +745,20 @@ class ByProjectKeyPricesImportContainersByImportContainerKeyRequestBuilder {
|
|
|
808
745
|
*/
|
|
809
746
|
/**
|
|
810
747
|
**/
|
|
811
|
-
|
|
812
748
|
class ByProjectKeyPricesImportContainersRequestBuilder {
|
|
813
749
|
constructor(args) {
|
|
814
750
|
this.args = args;
|
|
815
751
|
}
|
|
816
|
-
|
|
817
752
|
withImportContainerKeyValue(childPathArgs) {
|
|
818
753
|
return new ByProjectKeyPricesImportContainersByImportContainerKeyRequestBuilder({
|
|
819
|
-
pathArgs: {
|
|
754
|
+
pathArgs: {
|
|
755
|
+
...this.args.pathArgs,
|
|
820
756
|
...childPathArgs
|
|
821
757
|
},
|
|
822
758
|
executeRequest: this.args.executeRequest,
|
|
823
759
|
baseUri: this.args.baseUri
|
|
824
760
|
});
|
|
825
761
|
}
|
|
826
|
-
|
|
827
762
|
}
|
|
828
763
|
|
|
829
764
|
/**
|
|
@@ -833,21 +768,19 @@ class ByProjectKeyPricesImportContainersRequestBuilder {
|
|
|
833
768
|
*/
|
|
834
769
|
/**
|
|
835
770
|
**/
|
|
836
|
-
|
|
837
771
|
class ByProjectKeyPricesRequestBuilder {
|
|
838
772
|
constructor(args) {
|
|
839
773
|
this.args = args;
|
|
840
774
|
}
|
|
841
|
-
|
|
842
775
|
importContainers() {
|
|
843
776
|
return new ByProjectKeyPricesImportContainersRequestBuilder({
|
|
844
|
-
pathArgs: {
|
|
777
|
+
pathArgs: {
|
|
778
|
+
...this.args.pathArgs
|
|
845
779
|
},
|
|
846
780
|
executeRequest: this.args.executeRequest,
|
|
847
781
|
baseUri: this.args.baseUri
|
|
848
782
|
});
|
|
849
783
|
}
|
|
850
|
-
|
|
851
784
|
}
|
|
852
785
|
|
|
853
786
|
/**
|
|
@@ -857,7 +790,6 @@ class ByProjectKeyPricesRequestBuilder {
|
|
|
857
790
|
*/
|
|
858
791
|
/**
|
|
859
792
|
**/
|
|
860
|
-
|
|
861
793
|
class ByProjectKeyProductDraftsImportContainersByImportContainerKeyRequestBuilder {
|
|
862
794
|
constructor(args) {
|
|
863
795
|
this.args = args;
|
|
@@ -866,8 +798,6 @@ class ByProjectKeyProductDraftsImportContainersByImportContainerKeyRequestBuilde
|
|
|
866
798
|
* Creates a request for creating new ProductDrafts or updating existing ones.
|
|
867
799
|
*
|
|
868
800
|
*/
|
|
869
|
-
|
|
870
|
-
|
|
871
801
|
post(methodArgs) {
|
|
872
802
|
return new ApiRequest({
|
|
873
803
|
baseUri: this.args.baseUri,
|
|
@@ -881,7 +811,6 @@ class ByProjectKeyProductDraftsImportContainersByImportContainerKeyRequestBuilde
|
|
|
881
811
|
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
882
812
|
}, this.args.executeRequest);
|
|
883
813
|
}
|
|
884
|
-
|
|
885
814
|
}
|
|
886
815
|
|
|
887
816
|
/**
|
|
@@ -891,22 +820,20 @@ class ByProjectKeyProductDraftsImportContainersByImportContainerKeyRequestBuilde
|
|
|
891
820
|
*/
|
|
892
821
|
/**
|
|
893
822
|
**/
|
|
894
|
-
|
|
895
823
|
class ByProjectKeyProductDraftsImportContainersRequestBuilder {
|
|
896
824
|
constructor(args) {
|
|
897
825
|
this.args = args;
|
|
898
826
|
}
|
|
899
|
-
|
|
900
827
|
withImportContainerKeyValue(childPathArgs) {
|
|
901
828
|
return new ByProjectKeyProductDraftsImportContainersByImportContainerKeyRequestBuilder({
|
|
902
|
-
pathArgs: {
|
|
829
|
+
pathArgs: {
|
|
830
|
+
...this.args.pathArgs,
|
|
903
831
|
...childPathArgs
|
|
904
832
|
},
|
|
905
833
|
executeRequest: this.args.executeRequest,
|
|
906
834
|
baseUri: this.args.baseUri
|
|
907
835
|
});
|
|
908
836
|
}
|
|
909
|
-
|
|
910
837
|
}
|
|
911
838
|
|
|
912
839
|
/**
|
|
@@ -916,21 +843,19 @@ class ByProjectKeyProductDraftsImportContainersRequestBuilder {
|
|
|
916
843
|
*/
|
|
917
844
|
/**
|
|
918
845
|
**/
|
|
919
|
-
|
|
920
846
|
class ByProjectKeyProductDraftsRequestBuilder {
|
|
921
847
|
constructor(args) {
|
|
922
848
|
this.args = args;
|
|
923
849
|
}
|
|
924
|
-
|
|
925
850
|
importContainers() {
|
|
926
851
|
return new ByProjectKeyProductDraftsImportContainersRequestBuilder({
|
|
927
|
-
pathArgs: {
|
|
852
|
+
pathArgs: {
|
|
853
|
+
...this.args.pathArgs
|
|
928
854
|
},
|
|
929
855
|
executeRequest: this.args.executeRequest,
|
|
930
856
|
baseUri: this.args.baseUri
|
|
931
857
|
});
|
|
932
858
|
}
|
|
933
|
-
|
|
934
859
|
}
|
|
935
860
|
|
|
936
861
|
/**
|
|
@@ -940,7 +865,6 @@ class ByProjectKeyProductDraftsRequestBuilder {
|
|
|
940
865
|
*/
|
|
941
866
|
/**
|
|
942
867
|
**/
|
|
943
|
-
|
|
944
868
|
class ByProjectKeyProductTypesImportContainersByImportContainerKeyRequestBuilder {
|
|
945
869
|
constructor(args) {
|
|
946
870
|
this.args = args;
|
|
@@ -948,8 +872,6 @@ class ByProjectKeyProductTypesImportContainersByImportContainerKeyRequestBuilder
|
|
|
948
872
|
/**
|
|
949
873
|
* Creates a request for creating new ProductTypes or updating existing ones.
|
|
950
874
|
*/
|
|
951
|
-
|
|
952
|
-
|
|
953
875
|
post(methodArgs) {
|
|
954
876
|
return new ApiRequest({
|
|
955
877
|
baseUri: this.args.baseUri,
|
|
@@ -963,7 +885,6 @@ class ByProjectKeyProductTypesImportContainersByImportContainerKeyRequestBuilder
|
|
|
963
885
|
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
964
886
|
}, this.args.executeRequest);
|
|
965
887
|
}
|
|
966
|
-
|
|
967
888
|
}
|
|
968
889
|
|
|
969
890
|
/**
|
|
@@ -973,22 +894,20 @@ class ByProjectKeyProductTypesImportContainersByImportContainerKeyRequestBuilder
|
|
|
973
894
|
*/
|
|
974
895
|
/**
|
|
975
896
|
**/
|
|
976
|
-
|
|
977
897
|
class ByProjectKeyProductTypesImportContainersRequestBuilder {
|
|
978
898
|
constructor(args) {
|
|
979
899
|
this.args = args;
|
|
980
900
|
}
|
|
981
|
-
|
|
982
901
|
withImportContainerKeyValue(childPathArgs) {
|
|
983
902
|
return new ByProjectKeyProductTypesImportContainersByImportContainerKeyRequestBuilder({
|
|
984
|
-
pathArgs: {
|
|
903
|
+
pathArgs: {
|
|
904
|
+
...this.args.pathArgs,
|
|
985
905
|
...childPathArgs
|
|
986
906
|
},
|
|
987
907
|
executeRequest: this.args.executeRequest,
|
|
988
908
|
baseUri: this.args.baseUri
|
|
989
909
|
});
|
|
990
910
|
}
|
|
991
|
-
|
|
992
911
|
}
|
|
993
912
|
|
|
994
913
|
/**
|
|
@@ -998,21 +917,19 @@ class ByProjectKeyProductTypesImportContainersRequestBuilder {
|
|
|
998
917
|
*/
|
|
999
918
|
/**
|
|
1000
919
|
**/
|
|
1001
|
-
|
|
1002
920
|
class ByProjectKeyProductTypesRequestBuilder {
|
|
1003
921
|
constructor(args) {
|
|
1004
922
|
this.args = args;
|
|
1005
923
|
}
|
|
1006
|
-
|
|
1007
924
|
importContainers() {
|
|
1008
925
|
return new ByProjectKeyProductTypesImportContainersRequestBuilder({
|
|
1009
|
-
pathArgs: {
|
|
926
|
+
pathArgs: {
|
|
927
|
+
...this.args.pathArgs
|
|
1010
928
|
},
|
|
1011
929
|
executeRequest: this.args.executeRequest,
|
|
1012
930
|
baseUri: this.args.baseUri
|
|
1013
931
|
});
|
|
1014
932
|
}
|
|
1015
|
-
|
|
1016
933
|
}
|
|
1017
934
|
|
|
1018
935
|
/**
|
|
@@ -1022,7 +939,6 @@ class ByProjectKeyProductTypesRequestBuilder {
|
|
|
1022
939
|
*/
|
|
1023
940
|
/**
|
|
1024
941
|
**/
|
|
1025
|
-
|
|
1026
942
|
class ByProjectKeyProductVariantPatchesImportContainersByImportContainerKeyRequestBuilder {
|
|
1027
943
|
constructor(args) {
|
|
1028
944
|
this.args = args;
|
|
@@ -1030,8 +946,6 @@ class ByProjectKeyProductVariantPatchesImportContainersByImportContainerKeyReque
|
|
|
1030
946
|
/**
|
|
1031
947
|
* Creates a new import request for product variant patches
|
|
1032
948
|
*/
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
949
|
post(methodArgs) {
|
|
1036
950
|
return new ApiRequest({
|
|
1037
951
|
baseUri: this.args.baseUri,
|
|
@@ -1045,7 +959,6 @@ class ByProjectKeyProductVariantPatchesImportContainersByImportContainerKeyReque
|
|
|
1045
959
|
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
1046
960
|
}, this.args.executeRequest);
|
|
1047
961
|
}
|
|
1048
|
-
|
|
1049
962
|
}
|
|
1050
963
|
|
|
1051
964
|
/**
|
|
@@ -1055,22 +968,20 @@ class ByProjectKeyProductVariantPatchesImportContainersByImportContainerKeyReque
|
|
|
1055
968
|
*/
|
|
1056
969
|
/**
|
|
1057
970
|
**/
|
|
1058
|
-
|
|
1059
971
|
class ByProjectKeyProductVariantPatchesImportContainersRequestBuilder {
|
|
1060
972
|
constructor(args) {
|
|
1061
973
|
this.args = args;
|
|
1062
974
|
}
|
|
1063
|
-
|
|
1064
975
|
withImportContainerKeyValue(childPathArgs) {
|
|
1065
976
|
return new ByProjectKeyProductVariantPatchesImportContainersByImportContainerKeyRequestBuilder({
|
|
1066
|
-
pathArgs: {
|
|
977
|
+
pathArgs: {
|
|
978
|
+
...this.args.pathArgs,
|
|
1067
979
|
...childPathArgs
|
|
1068
980
|
},
|
|
1069
981
|
executeRequest: this.args.executeRequest,
|
|
1070
982
|
baseUri: this.args.baseUri
|
|
1071
983
|
});
|
|
1072
984
|
}
|
|
1073
|
-
|
|
1074
985
|
}
|
|
1075
986
|
|
|
1076
987
|
/**
|
|
@@ -1080,21 +991,19 @@ class ByProjectKeyProductVariantPatchesImportContainersRequestBuilder {
|
|
|
1080
991
|
*/
|
|
1081
992
|
/**
|
|
1082
993
|
**/
|
|
1083
|
-
|
|
1084
994
|
class ByProjectKeyProductVariantPatchesRequestBuilder {
|
|
1085
995
|
constructor(args) {
|
|
1086
996
|
this.args = args;
|
|
1087
997
|
}
|
|
1088
|
-
|
|
1089
998
|
importContainers() {
|
|
1090
999
|
return new ByProjectKeyProductVariantPatchesImportContainersRequestBuilder({
|
|
1091
|
-
pathArgs: {
|
|
1000
|
+
pathArgs: {
|
|
1001
|
+
...this.args.pathArgs
|
|
1092
1002
|
},
|
|
1093
1003
|
executeRequest: this.args.executeRequest,
|
|
1094
1004
|
baseUri: this.args.baseUri
|
|
1095
1005
|
});
|
|
1096
1006
|
}
|
|
1097
|
-
|
|
1098
1007
|
}
|
|
1099
1008
|
|
|
1100
1009
|
/**
|
|
@@ -1104,7 +1013,6 @@ class ByProjectKeyProductVariantPatchesRequestBuilder {
|
|
|
1104
1013
|
*/
|
|
1105
1014
|
/**
|
|
1106
1015
|
**/
|
|
1107
|
-
|
|
1108
1016
|
class ByProjectKeyProductVariantsImportContainersByImportContainerKeyRequestBuilder {
|
|
1109
1017
|
constructor(args) {
|
|
1110
1018
|
this.args = args;
|
|
@@ -1112,8 +1020,6 @@ class ByProjectKeyProductVariantsImportContainersByImportContainerKeyRequestBuil
|
|
|
1112
1020
|
/**
|
|
1113
1021
|
* Creates a request for creating new ProductVariants or updating existing ones.
|
|
1114
1022
|
*/
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
1023
|
post(methodArgs) {
|
|
1118
1024
|
return new ApiRequest({
|
|
1119
1025
|
baseUri: this.args.baseUri,
|
|
@@ -1127,7 +1033,6 @@ class ByProjectKeyProductVariantsImportContainersByImportContainerKeyRequestBuil
|
|
|
1127
1033
|
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
1128
1034
|
}, this.args.executeRequest);
|
|
1129
1035
|
}
|
|
1130
|
-
|
|
1131
1036
|
}
|
|
1132
1037
|
|
|
1133
1038
|
/**
|
|
@@ -1137,22 +1042,20 @@ class ByProjectKeyProductVariantsImportContainersByImportContainerKeyRequestBuil
|
|
|
1137
1042
|
*/
|
|
1138
1043
|
/**
|
|
1139
1044
|
**/
|
|
1140
|
-
|
|
1141
1045
|
class ByProjectKeyProductVariantsImportContainersRequestBuilder {
|
|
1142
1046
|
constructor(args) {
|
|
1143
1047
|
this.args = args;
|
|
1144
1048
|
}
|
|
1145
|
-
|
|
1146
1049
|
withImportContainerKeyValue(childPathArgs) {
|
|
1147
1050
|
return new ByProjectKeyProductVariantsImportContainersByImportContainerKeyRequestBuilder({
|
|
1148
|
-
pathArgs: {
|
|
1051
|
+
pathArgs: {
|
|
1052
|
+
...this.args.pathArgs,
|
|
1149
1053
|
...childPathArgs
|
|
1150
1054
|
},
|
|
1151
1055
|
executeRequest: this.args.executeRequest,
|
|
1152
1056
|
baseUri: this.args.baseUri
|
|
1153
1057
|
});
|
|
1154
1058
|
}
|
|
1155
|
-
|
|
1156
1059
|
}
|
|
1157
1060
|
|
|
1158
1061
|
/**
|
|
@@ -1162,21 +1065,19 @@ class ByProjectKeyProductVariantsImportContainersRequestBuilder {
|
|
|
1162
1065
|
*/
|
|
1163
1066
|
/**
|
|
1164
1067
|
**/
|
|
1165
|
-
|
|
1166
1068
|
class ByProjectKeyProductVariantsRequestBuilder {
|
|
1167
1069
|
constructor(args) {
|
|
1168
1070
|
this.args = args;
|
|
1169
1071
|
}
|
|
1170
|
-
|
|
1171
1072
|
importContainers() {
|
|
1172
1073
|
return new ByProjectKeyProductVariantsImportContainersRequestBuilder({
|
|
1173
|
-
pathArgs: {
|
|
1074
|
+
pathArgs: {
|
|
1075
|
+
...this.args.pathArgs
|
|
1174
1076
|
},
|
|
1175
1077
|
executeRequest: this.args.executeRequest,
|
|
1176
1078
|
baseUri: this.args.baseUri
|
|
1177
1079
|
});
|
|
1178
1080
|
}
|
|
1179
|
-
|
|
1180
1081
|
}
|
|
1181
1082
|
|
|
1182
1083
|
/**
|
|
@@ -1186,7 +1087,6 @@ class ByProjectKeyProductVariantsRequestBuilder {
|
|
|
1186
1087
|
*/
|
|
1187
1088
|
/**
|
|
1188
1089
|
**/
|
|
1189
|
-
|
|
1190
1090
|
class ByProjectKeyProductsImportContainersByImportContainerKeyRequestBuilder {
|
|
1191
1091
|
constructor(args) {
|
|
1192
1092
|
this.args = args;
|
|
@@ -1194,8 +1094,6 @@ class ByProjectKeyProductsImportContainersByImportContainerKeyRequestBuilder {
|
|
|
1194
1094
|
/**
|
|
1195
1095
|
* Creates a request for creating new Products or updating existing ones.
|
|
1196
1096
|
*/
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
1097
|
post(methodArgs) {
|
|
1200
1098
|
return new ApiRequest({
|
|
1201
1099
|
baseUri: this.args.baseUri,
|
|
@@ -1209,7 +1107,6 @@ class ByProjectKeyProductsImportContainersByImportContainerKeyRequestBuilder {
|
|
|
1209
1107
|
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
1210
1108
|
}, this.args.executeRequest);
|
|
1211
1109
|
}
|
|
1212
|
-
|
|
1213
1110
|
}
|
|
1214
1111
|
|
|
1215
1112
|
/**
|
|
@@ -1219,22 +1116,20 @@ class ByProjectKeyProductsImportContainersByImportContainerKeyRequestBuilder {
|
|
|
1219
1116
|
*/
|
|
1220
1117
|
/**
|
|
1221
1118
|
**/
|
|
1222
|
-
|
|
1223
1119
|
class ByProjectKeyProductsImportContainersRequestBuilder {
|
|
1224
1120
|
constructor(args) {
|
|
1225
1121
|
this.args = args;
|
|
1226
1122
|
}
|
|
1227
|
-
|
|
1228
1123
|
withImportContainerKeyValue(childPathArgs) {
|
|
1229
1124
|
return new ByProjectKeyProductsImportContainersByImportContainerKeyRequestBuilder({
|
|
1230
|
-
pathArgs: {
|
|
1125
|
+
pathArgs: {
|
|
1126
|
+
...this.args.pathArgs,
|
|
1231
1127
|
...childPathArgs
|
|
1232
1128
|
},
|
|
1233
1129
|
executeRequest: this.args.executeRequest,
|
|
1234
1130
|
baseUri: this.args.baseUri
|
|
1235
1131
|
});
|
|
1236
1132
|
}
|
|
1237
|
-
|
|
1238
1133
|
}
|
|
1239
1134
|
|
|
1240
1135
|
/**
|
|
@@ -1244,21 +1139,48 @@ class ByProjectKeyProductsImportContainersRequestBuilder {
|
|
|
1244
1139
|
*/
|
|
1245
1140
|
/**
|
|
1246
1141
|
**/
|
|
1247
|
-
|
|
1248
1142
|
class ByProjectKeyProductsRequestBuilder {
|
|
1249
1143
|
constructor(args) {
|
|
1250
1144
|
this.args = args;
|
|
1251
1145
|
}
|
|
1252
|
-
|
|
1253
1146
|
importContainers() {
|
|
1254
1147
|
return new ByProjectKeyProductsImportContainersRequestBuilder({
|
|
1255
|
-
pathArgs: {
|
|
1148
|
+
pathArgs: {
|
|
1149
|
+
...this.args.pathArgs
|
|
1256
1150
|
},
|
|
1257
1151
|
executeRequest: this.args.executeRequest,
|
|
1258
1152
|
baseUri: this.args.baseUri
|
|
1259
1153
|
});
|
|
1260
1154
|
}
|
|
1155
|
+
}
|
|
1261
1156
|
|
|
1157
|
+
/**
|
|
1158
|
+
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
1159
|
+
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
1160
|
+
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
1161
|
+
*/
|
|
1162
|
+
/**
|
|
1163
|
+
**/
|
|
1164
|
+
class ByProjectKeyStandalonePricesImportContainersByImportContainerKeyRequestBuilder {
|
|
1165
|
+
constructor(args) {
|
|
1166
|
+
this.args = args;
|
|
1167
|
+
}
|
|
1168
|
+
/**
|
|
1169
|
+
* Creates a request for creating new Standalone Prices or updating existing ones.
|
|
1170
|
+
*/
|
|
1171
|
+
post(methodArgs) {
|
|
1172
|
+
return new ApiRequest({
|
|
1173
|
+
baseUri: this.args.baseUri,
|
|
1174
|
+
method: 'POST',
|
|
1175
|
+
uriTemplate: '/{projectKey}/standalone-prices/import-containers/{importContainerKey}',
|
|
1176
|
+
pathVariables: this.args.pathArgs,
|
|
1177
|
+
headers: {
|
|
1178
|
+
'Content-Type': 'application/json',
|
|
1179
|
+
...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
1180
|
+
},
|
|
1181
|
+
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
1182
|
+
}, this.args.executeRequest);
|
|
1183
|
+
}
|
|
1262
1184
|
}
|
|
1263
1185
|
|
|
1264
1186
|
/**
|
|
@@ -1268,150 +1190,199 @@ class ByProjectKeyProductsRequestBuilder {
|
|
|
1268
1190
|
*/
|
|
1269
1191
|
/**
|
|
1270
1192
|
**/
|
|
1193
|
+
class ByProjectKeyStandalonePricesImportContainersRequestBuilder {
|
|
1194
|
+
constructor(args) {
|
|
1195
|
+
this.args = args;
|
|
1196
|
+
}
|
|
1197
|
+
withImportContainerKeyValue(childPathArgs) {
|
|
1198
|
+
return new ByProjectKeyStandalonePricesImportContainersByImportContainerKeyRequestBuilder({
|
|
1199
|
+
pathArgs: {
|
|
1200
|
+
...this.args.pathArgs,
|
|
1201
|
+
...childPathArgs
|
|
1202
|
+
},
|
|
1203
|
+
executeRequest: this.args.executeRequest,
|
|
1204
|
+
baseUri: this.args.baseUri
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1271
1208
|
|
|
1272
|
-
|
|
1209
|
+
/**
|
|
1210
|
+
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
1211
|
+
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
1212
|
+
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
1213
|
+
*/
|
|
1214
|
+
/**
|
|
1215
|
+
**/
|
|
1216
|
+
class ByProjectKeyStandalonePricesRequestBuilder {
|
|
1273
1217
|
constructor(args) {
|
|
1274
1218
|
this.args = args;
|
|
1275
1219
|
}
|
|
1220
|
+
importContainers() {
|
|
1221
|
+
return new ByProjectKeyStandalonePricesImportContainersRequestBuilder({
|
|
1222
|
+
pathArgs: {
|
|
1223
|
+
...this.args.pathArgs
|
|
1224
|
+
},
|
|
1225
|
+
executeRequest: this.args.executeRequest,
|
|
1226
|
+
baseUri: this.args.baseUri
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1276
1230
|
|
|
1231
|
+
/**
|
|
1232
|
+
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
1233
|
+
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
1234
|
+
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
1235
|
+
*/
|
|
1236
|
+
/**
|
|
1237
|
+
**/
|
|
1238
|
+
class ByProjectKeyRequestBuilder {
|
|
1239
|
+
constructor(args) {
|
|
1240
|
+
this.args = args;
|
|
1241
|
+
}
|
|
1277
1242
|
importContainers() {
|
|
1278
1243
|
return new ByProjectKeyImportContainersRequestBuilder({
|
|
1279
|
-
pathArgs: {
|
|
1244
|
+
pathArgs: {
|
|
1245
|
+
...this.args.pathArgs
|
|
1280
1246
|
},
|
|
1281
1247
|
executeRequest: this.args.executeRequest,
|
|
1282
1248
|
baseUri: this.args.baseUri
|
|
1283
1249
|
});
|
|
1284
1250
|
}
|
|
1285
|
-
|
|
1286
1251
|
importOperations() {
|
|
1287
1252
|
return new ByProjectKeyImportOperationsRequestBuilder({
|
|
1288
|
-
pathArgs: {
|
|
1253
|
+
pathArgs: {
|
|
1254
|
+
...this.args.pathArgs
|
|
1289
1255
|
},
|
|
1290
1256
|
executeRequest: this.args.executeRequest,
|
|
1291
1257
|
baseUri: this.args.baseUri
|
|
1292
1258
|
});
|
|
1293
1259
|
}
|
|
1294
|
-
|
|
1295
1260
|
categories() {
|
|
1296
1261
|
return new ByProjectKeyCategoriesRequestBuilder({
|
|
1297
|
-
pathArgs: {
|
|
1262
|
+
pathArgs: {
|
|
1263
|
+
...this.args.pathArgs
|
|
1298
1264
|
},
|
|
1299
1265
|
executeRequest: this.args.executeRequest,
|
|
1300
1266
|
baseUri: this.args.baseUri
|
|
1301
1267
|
});
|
|
1302
1268
|
}
|
|
1303
|
-
|
|
1304
1269
|
prices() {
|
|
1305
1270
|
return new ByProjectKeyPricesRequestBuilder({
|
|
1306
|
-
pathArgs: {
|
|
1271
|
+
pathArgs: {
|
|
1272
|
+
...this.args.pathArgs
|
|
1273
|
+
},
|
|
1274
|
+
executeRequest: this.args.executeRequest,
|
|
1275
|
+
baseUri: this.args.baseUri
|
|
1276
|
+
});
|
|
1277
|
+
}
|
|
1278
|
+
standalonePrices() {
|
|
1279
|
+
return new ByProjectKeyStandalonePricesRequestBuilder({
|
|
1280
|
+
pathArgs: {
|
|
1281
|
+
...this.args.pathArgs
|
|
1307
1282
|
},
|
|
1308
1283
|
executeRequest: this.args.executeRequest,
|
|
1309
1284
|
baseUri: this.args.baseUri
|
|
1310
1285
|
});
|
|
1311
1286
|
}
|
|
1312
|
-
|
|
1313
1287
|
products() {
|
|
1314
1288
|
return new ByProjectKeyProductsRequestBuilder({
|
|
1315
|
-
pathArgs: {
|
|
1289
|
+
pathArgs: {
|
|
1290
|
+
...this.args.pathArgs
|
|
1316
1291
|
},
|
|
1317
1292
|
executeRequest: this.args.executeRequest,
|
|
1318
1293
|
baseUri: this.args.baseUri
|
|
1319
1294
|
});
|
|
1320
1295
|
}
|
|
1321
|
-
|
|
1322
1296
|
productDrafts() {
|
|
1323
1297
|
return new ByProjectKeyProductDraftsRequestBuilder({
|
|
1324
|
-
pathArgs: {
|
|
1298
|
+
pathArgs: {
|
|
1299
|
+
...this.args.pathArgs
|
|
1325
1300
|
},
|
|
1326
1301
|
executeRequest: this.args.executeRequest,
|
|
1327
1302
|
baseUri: this.args.baseUri
|
|
1328
1303
|
});
|
|
1329
1304
|
}
|
|
1330
|
-
|
|
1331
1305
|
productTypes() {
|
|
1332
1306
|
return new ByProjectKeyProductTypesRequestBuilder({
|
|
1333
|
-
pathArgs: {
|
|
1307
|
+
pathArgs: {
|
|
1308
|
+
...this.args.pathArgs
|
|
1334
1309
|
},
|
|
1335
1310
|
executeRequest: this.args.executeRequest,
|
|
1336
1311
|
baseUri: this.args.baseUri
|
|
1337
1312
|
});
|
|
1338
1313
|
}
|
|
1339
|
-
|
|
1340
1314
|
productVariants() {
|
|
1341
1315
|
return new ByProjectKeyProductVariantsRequestBuilder({
|
|
1342
|
-
pathArgs: {
|
|
1316
|
+
pathArgs: {
|
|
1317
|
+
...this.args.pathArgs
|
|
1343
1318
|
},
|
|
1344
1319
|
executeRequest: this.args.executeRequest,
|
|
1345
1320
|
baseUri: this.args.baseUri
|
|
1346
1321
|
});
|
|
1347
1322
|
}
|
|
1348
|
-
|
|
1349
1323
|
productVariantPatches() {
|
|
1350
1324
|
return new ByProjectKeyProductVariantPatchesRequestBuilder({
|
|
1351
|
-
pathArgs: {
|
|
1325
|
+
pathArgs: {
|
|
1326
|
+
...this.args.pathArgs
|
|
1352
1327
|
},
|
|
1353
1328
|
executeRequest: this.args.executeRequest,
|
|
1354
1329
|
baseUri: this.args.baseUri
|
|
1355
1330
|
});
|
|
1356
1331
|
}
|
|
1357
|
-
|
|
1358
1332
|
orders() {
|
|
1359
1333
|
return new ByProjectKeyOrdersRequestBuilder({
|
|
1360
|
-
pathArgs: {
|
|
1334
|
+
pathArgs: {
|
|
1335
|
+
...this.args.pathArgs
|
|
1361
1336
|
},
|
|
1362
1337
|
executeRequest: this.args.executeRequest,
|
|
1363
1338
|
baseUri: this.args.baseUri
|
|
1364
1339
|
});
|
|
1365
1340
|
}
|
|
1366
|
-
|
|
1367
1341
|
orderPatches() {
|
|
1368
1342
|
return new ByProjectKeyOrderPatchesRequestBuilder({
|
|
1369
|
-
pathArgs: {
|
|
1343
|
+
pathArgs: {
|
|
1344
|
+
...this.args.pathArgs
|
|
1370
1345
|
},
|
|
1371
1346
|
executeRequest: this.args.executeRequest,
|
|
1372
1347
|
baseUri: this.args.baseUri
|
|
1373
1348
|
});
|
|
1374
1349
|
}
|
|
1375
|
-
|
|
1376
1350
|
customers() {
|
|
1377
1351
|
return new ByProjectKeyCustomersRequestBuilder({
|
|
1378
|
-
pathArgs: {
|
|
1352
|
+
pathArgs: {
|
|
1353
|
+
...this.args.pathArgs
|
|
1379
1354
|
},
|
|
1380
1355
|
executeRequest: this.args.executeRequest,
|
|
1381
1356
|
baseUri: this.args.baseUri
|
|
1382
1357
|
});
|
|
1383
1358
|
}
|
|
1384
|
-
|
|
1385
1359
|
inventories() {
|
|
1386
1360
|
return new ByProjectKeyInventoriesRequestBuilder({
|
|
1387
|
-
pathArgs: {
|
|
1361
|
+
pathArgs: {
|
|
1362
|
+
...this.args.pathArgs
|
|
1388
1363
|
},
|
|
1389
1364
|
executeRequest: this.args.executeRequest,
|
|
1390
1365
|
baseUri: this.args.baseUri
|
|
1391
1366
|
});
|
|
1392
1367
|
}
|
|
1393
|
-
|
|
1394
1368
|
}
|
|
1395
1369
|
|
|
1396
1370
|
class ApiRoot {
|
|
1397
1371
|
constructor(args) {
|
|
1398
1372
|
_defineProperty(this, "executeRequest", void 0);
|
|
1399
|
-
|
|
1400
1373
|
_defineProperty(this, "baseUri", void 0);
|
|
1401
|
-
|
|
1402
1374
|
this.executeRequest = args.executeRequest;
|
|
1403
1375
|
this.baseUri = args.baseUri || 'https://import.europe-west1.gcp.commercetools.com';
|
|
1404
1376
|
}
|
|
1405
|
-
|
|
1406
1377
|
withProjectKeyValue(childPathArgs) {
|
|
1407
1378
|
return new ByProjectKeyRequestBuilder({
|
|
1408
|
-
pathArgs: {
|
|
1379
|
+
pathArgs: {
|
|
1380
|
+
...childPathArgs
|
|
1409
1381
|
},
|
|
1410
1382
|
executeRequest: this.executeRequest,
|
|
1411
1383
|
baseUri: this.baseUri
|
|
1412
1384
|
});
|
|
1413
1385
|
}
|
|
1414
|
-
|
|
1415
1386
|
}
|
|
1416
1387
|
|
|
1417
1388
|
/**
|
|
@@ -1419,19 +1390,17 @@ class ApiRoot {
|
|
|
1419
1390
|
* Please don't change this file manually but run `rmf-codegen generate <raml_file_path> -o <output_path> -t typescript_client` to update it.
|
|
1420
1391
|
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
1421
1392
|
*/
|
|
1393
|
+
|
|
1422
1394
|
const createExecutorFromMiddlewares = (executor, midds) => {
|
|
1423
1395
|
if (!midds || midds.length == 0) {
|
|
1424
1396
|
return executor;
|
|
1425
1397
|
}
|
|
1426
|
-
|
|
1427
1398
|
const reduced = midds.reduce(reduceMiddleware);
|
|
1428
1399
|
return middlewareToExecutor(reduced, executor);
|
|
1429
1400
|
};
|
|
1430
|
-
|
|
1431
1401
|
function reduceMiddleware(middleware1, middleware2) {
|
|
1432
1402
|
return (request, executor) => middleware1(request, middlewareToExecutor(middleware2, executor));
|
|
1433
1403
|
}
|
|
1434
|
-
|
|
1435
1404
|
function middlewareToExecutor(middleware, executor) {
|
|
1436
1405
|
return request => middleware(request, executor);
|
|
1437
1406
|
}
|