@devite/shopware-client 1.1.2 → 1.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/dist/index.cjs +644 -684
- package/dist/index.d.cts +387 -385
- package/dist/index.d.mts +387 -385
- package/dist/index.d.ts +387 -385
- package/dist/index.mjs +644 -684
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const ohash = require('ohash');
|
|
4
4
|
const ofetch = require('ofetch');
|
|
5
|
+
const qs = require('qs');
|
|
5
6
|
|
|
6
7
|
class AuthenticationStore {
|
|
7
8
|
entries = /* @__PURE__ */ new Map();
|
|
@@ -100,6 +101,7 @@ class ShopwareClient {
|
|
|
100
101
|
baseUrl;
|
|
101
102
|
authStore = new AuthenticationStore();
|
|
102
103
|
cache = /* @__PURE__ */ new Map();
|
|
104
|
+
languageId;
|
|
103
105
|
constructor(baseUrl) {
|
|
104
106
|
this.baseUrl = baseUrl;
|
|
105
107
|
}
|
|
@@ -123,6 +125,7 @@ class ShopwareClient {
|
|
|
123
125
|
query: options?.query,
|
|
124
126
|
headers: {
|
|
125
127
|
...options?.body ? { "Content-Type": options.body.contentType() } : {},
|
|
128
|
+
...this.languageId ? { "sw-language-id": this.languageId } : {},
|
|
126
129
|
...options?.headers
|
|
127
130
|
},
|
|
128
131
|
body: serializedBody,
|
|
@@ -171,6 +174,9 @@ class ShopwareClient {
|
|
|
171
174
|
if (payload && response._data) await payload.deserialize(response._data);
|
|
172
175
|
return payload;
|
|
173
176
|
}
|
|
177
|
+
setLanguageId(id) {
|
|
178
|
+
this.languageId = id;
|
|
179
|
+
}
|
|
174
180
|
}
|
|
175
181
|
|
|
176
182
|
var AuthenticationType = /* @__PURE__ */ ((AuthenticationType2) => {
|
|
@@ -206,7 +212,7 @@ class OAuthEntry {
|
|
|
206
212
|
return AuthenticationType.OAUTH;
|
|
207
213
|
}
|
|
208
214
|
isSaved() {
|
|
209
|
-
return this.accessToken !== null && this.
|
|
215
|
+
return this.accessToken !== null && this.expiresAt !== null;
|
|
210
216
|
}
|
|
211
217
|
save(response) {
|
|
212
218
|
const jsonBody = response.body.data;
|
|
@@ -261,14 +267,17 @@ class Client {
|
|
|
261
267
|
}
|
|
262
268
|
}
|
|
263
269
|
|
|
270
|
+
function buildQuery(criteria) {
|
|
271
|
+
return criteria ? `?${qs.stringify(criteria, { encode: false })}` : "";
|
|
272
|
+
}
|
|
273
|
+
|
|
264
274
|
class AppClient extends Client {
|
|
265
275
|
/** Apps **/
|
|
266
276
|
/**
|
|
267
277
|
* @throws {Error} if the request failed
|
|
268
278
|
*/
|
|
269
|
-
async getApps(
|
|
270
|
-
const response = await this.get(`/app
|
|
271
|
-
query: { limit, page, query },
|
|
279
|
+
async getApps(query) {
|
|
280
|
+
const response = await this.get(`/app` + buildQuery(query), {
|
|
272
281
|
headers: { Accept: "application/json" }
|
|
273
282
|
});
|
|
274
283
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -302,8 +311,10 @@ class AppClient extends Client {
|
|
|
302
311
|
/**
|
|
303
312
|
* @throws {Error} if the request failed
|
|
304
313
|
*/
|
|
305
|
-
async getApp(id) {
|
|
306
|
-
const response = await this.get(`/app/${id}
|
|
314
|
+
async getApp(id, query) {
|
|
315
|
+
const response = await this.get(`/app/${id}` + buildQuery(query), {
|
|
316
|
+
headers: { Accept: "application/json" }
|
|
317
|
+
});
|
|
307
318
|
if (response.statusCode === 200)
|
|
308
319
|
return response.body.data;
|
|
309
320
|
throw new Error(`Failed to fetch app: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -345,9 +356,8 @@ class AppClient extends Client {
|
|
|
345
356
|
/**
|
|
346
357
|
* @throws {Error} if the request failed
|
|
347
358
|
*/
|
|
348
|
-
async getActionButtons(
|
|
349
|
-
const response = await this.get(`/app-action-button
|
|
350
|
-
query: { limit, page, query },
|
|
359
|
+
async getActionButtons(query) {
|
|
360
|
+
const response = await this.get(`/app-action-button` + buildQuery(query), {
|
|
351
361
|
headers: { Accept: "application/json" }
|
|
352
362
|
});
|
|
353
363
|
if (response.statusCode === 200)
|
|
@@ -386,8 +396,8 @@ class AppClient extends Client {
|
|
|
386
396
|
/**
|
|
387
397
|
* @throws {Error} if the request failed
|
|
388
398
|
*/
|
|
389
|
-
async getActionButton(id) {
|
|
390
|
-
const response = await this.get(`/app-action-button/${id}
|
|
399
|
+
async getActionButton(id, query) {
|
|
400
|
+
const response = await this.get(`/app-action-button/${id}` + buildQuery(query), {
|
|
391
401
|
headers: { Accept: "application/json" }
|
|
392
402
|
});
|
|
393
403
|
if (response.statusCode === 200)
|
|
@@ -439,9 +449,8 @@ class AppClient extends Client {
|
|
|
439
449
|
/**
|
|
440
450
|
* @throws {Error} if the request failed
|
|
441
451
|
*/
|
|
442
|
-
async getAdminSnippets(
|
|
443
|
-
const response = await this.get(`/app-administration-snippet
|
|
444
|
-
query: { limit, page, query },
|
|
452
|
+
async getAdminSnippets(query) {
|
|
453
|
+
const response = await this.get(`/app-administration-snippet` + buildQuery(query), {
|
|
445
454
|
headers: { Accept: "application/json" }
|
|
446
455
|
});
|
|
447
456
|
if (response.statusCode === 200)
|
|
@@ -480,8 +489,8 @@ class AppClient extends Client {
|
|
|
480
489
|
/**
|
|
481
490
|
* @throws {Error} if the request failed
|
|
482
491
|
*/
|
|
483
|
-
async getAdminSnippet(id) {
|
|
484
|
-
const response = await this.get(`/app-administration-snippet/${id}
|
|
492
|
+
async getAdminSnippet(id, query) {
|
|
493
|
+
const response = await this.get(`/app-administration-snippet/${id}` + buildQuery(query), {
|
|
485
494
|
headers: { Accept: "application/json" }
|
|
486
495
|
});
|
|
487
496
|
if (response.statusCode === 200)
|
|
@@ -533,9 +542,8 @@ class AppClient extends Client {
|
|
|
533
542
|
/**
|
|
534
543
|
* @throws {Error} if the request failed
|
|
535
544
|
*/
|
|
536
|
-
async getCmsBlocks(
|
|
537
|
-
const response = await this.get(`/app-cms-block
|
|
538
|
-
query: { limit, page, query },
|
|
545
|
+
async getCmsBlocks(query) {
|
|
546
|
+
const response = await this.get(`/app-cms-block` + buildQuery(query), {
|
|
539
547
|
headers: { Accept: "application/json" }
|
|
540
548
|
});
|
|
541
549
|
if (response.statusCode === 200)
|
|
@@ -574,8 +582,8 @@ class AppClient extends Client {
|
|
|
574
582
|
/**
|
|
575
583
|
* @throws {Error} if the request failed
|
|
576
584
|
*/
|
|
577
|
-
async getCmsBlock(id) {
|
|
578
|
-
const response = await this.get(`/app-cms-block/${id}
|
|
585
|
+
async getCmsBlock(id, query) {
|
|
586
|
+
const response = await this.get(`/app-cms-block/${id}` + buildQuery(query), {
|
|
579
587
|
headers: { Accept: "application/json" }
|
|
580
588
|
});
|
|
581
589
|
if (response.statusCode === 200)
|
|
@@ -621,9 +629,8 @@ class AppClient extends Client {
|
|
|
621
629
|
/**
|
|
622
630
|
* @throws {Error} if the request failed
|
|
623
631
|
*/
|
|
624
|
-
async getFlowActions(
|
|
625
|
-
const response = await this.get(`/app-flow-action
|
|
626
|
-
query: { limit, page, query },
|
|
632
|
+
async getFlowActions(query) {
|
|
633
|
+
const response = await this.get(`/app-flow-action` + buildQuery(query), {
|
|
627
634
|
headers: { Accept: "application/json" }
|
|
628
635
|
});
|
|
629
636
|
if (response.statusCode === 200)
|
|
@@ -662,8 +669,8 @@ class AppClient extends Client {
|
|
|
662
669
|
/**
|
|
663
670
|
* @throws {Error} if the request failed
|
|
664
671
|
*/
|
|
665
|
-
async getFlowAction(id) {
|
|
666
|
-
const response = await this.get(`/app-flow-action/${id}
|
|
672
|
+
async getFlowAction(id, query) {
|
|
673
|
+
const response = await this.get(`/app-flow-action/${id}` + buildQuery(query), {
|
|
667
674
|
headers: { Accept: "application/json" }
|
|
668
675
|
});
|
|
669
676
|
if (response.statusCode === 200)
|
|
@@ -715,9 +722,8 @@ class AppClient extends Client {
|
|
|
715
722
|
/**
|
|
716
723
|
* @throws {Error} if the request failed
|
|
717
724
|
*/
|
|
718
|
-
async getFlowEvents(
|
|
719
|
-
const response = await this.get(`/app-flow-event
|
|
720
|
-
query: { limit, page, query },
|
|
725
|
+
async getFlowEvents(query) {
|
|
726
|
+
const response = await this.get(`/app-flow-event` + buildQuery(query), {
|
|
721
727
|
headers: { Accept: "application/json" }
|
|
722
728
|
});
|
|
723
729
|
if (response.statusCode === 200)
|
|
@@ -756,8 +762,8 @@ class AppClient extends Client {
|
|
|
756
762
|
/**
|
|
757
763
|
* @throws {Error} if the request failed
|
|
758
764
|
*/
|
|
759
|
-
async getFlowEvent(id) {
|
|
760
|
-
const response = await this.get(`/app-flow-event/${id}
|
|
765
|
+
async getFlowEvent(id, query) {
|
|
766
|
+
const response = await this.get(`/app-flow-event/${id}` + buildQuery(query), {
|
|
761
767
|
headers: { Accept: "application/json" }
|
|
762
768
|
});
|
|
763
769
|
if (response.statusCode === 200)
|
|
@@ -807,9 +813,8 @@ class AppClient extends Client {
|
|
|
807
813
|
/**
|
|
808
814
|
* @throws {Error} if the request failed
|
|
809
815
|
*/
|
|
810
|
-
async getPaymentMethods(
|
|
811
|
-
const response = await this.get(`/app-payment-method
|
|
812
|
-
query: { limit, page, query },
|
|
816
|
+
async getPaymentMethods(query) {
|
|
817
|
+
const response = await this.get(`/app-payment-method` + buildQuery(query), {
|
|
813
818
|
headers: { Accept: "application/json" }
|
|
814
819
|
});
|
|
815
820
|
if (response.statusCode === 200)
|
|
@@ -848,8 +853,8 @@ class AppClient extends Client {
|
|
|
848
853
|
/**
|
|
849
854
|
* @throws {Error} if the request failed
|
|
850
855
|
*/
|
|
851
|
-
async getPaymentMethod(id) {
|
|
852
|
-
const response = await this.get(`/app-payment-method/${id}
|
|
856
|
+
async getPaymentMethod(id, query) {
|
|
857
|
+
const response = await this.get(`/app-payment-method/${id}` + buildQuery(query), {
|
|
853
858
|
headers: { Accept: "application/json" }
|
|
854
859
|
});
|
|
855
860
|
if (response.statusCode === 200)
|
|
@@ -901,9 +906,8 @@ class AppClient extends Client {
|
|
|
901
906
|
/**
|
|
902
907
|
* @throws {Error} if the request failed
|
|
903
908
|
*/
|
|
904
|
-
async getScriptConditions(
|
|
905
|
-
const response = await this.get(`/app-script-condition
|
|
906
|
-
query: { limit, page, query },
|
|
909
|
+
async getScriptConditions(query) {
|
|
910
|
+
const response = await this.get(`/app-script-condition` + buildQuery(query), {
|
|
907
911
|
headers: { Accept: "application/json" }
|
|
908
912
|
});
|
|
909
913
|
if (response.statusCode === 200)
|
|
@@ -942,8 +946,8 @@ class AppClient extends Client {
|
|
|
942
946
|
/**
|
|
943
947
|
* @throws {Error} if the request failed
|
|
944
948
|
*/
|
|
945
|
-
async getScriptCondition(id) {
|
|
946
|
-
const response = await this.get(`/app-script-condition/${id}
|
|
949
|
+
async getScriptCondition(id, query) {
|
|
950
|
+
const response = await this.get(`/app-script-condition/${id}` + buildQuery(query), {
|
|
947
951
|
headers: { Accept: "application/json" }
|
|
948
952
|
});
|
|
949
953
|
if (response.statusCode === 200)
|
|
@@ -995,9 +999,8 @@ class AppClient extends Client {
|
|
|
995
999
|
/**
|
|
996
1000
|
* @throws {Error} if the request failed
|
|
997
1001
|
*/
|
|
998
|
-
async getShippingMethods(
|
|
999
|
-
const response = await this.get(`/app-shipping-method
|
|
1000
|
-
query: { limit, page, query },
|
|
1002
|
+
async getShippingMethods(query) {
|
|
1003
|
+
const response = await this.get(`/app-shipping-method` + buildQuery(query), {
|
|
1001
1004
|
headers: { Accept: "application/json" }
|
|
1002
1005
|
});
|
|
1003
1006
|
if (response.statusCode === 200)
|
|
@@ -1036,8 +1039,8 @@ class AppClient extends Client {
|
|
|
1036
1039
|
/**
|
|
1037
1040
|
* @throws {Error} if the request failed
|
|
1038
1041
|
*/
|
|
1039
|
-
async getShippingMethod(id) {
|
|
1040
|
-
const response = await this.get(`/app-shipping-method/${id}
|
|
1042
|
+
async getShippingMethod(id, query) {
|
|
1043
|
+
const response = await this.get(`/app-shipping-method/${id}` + buildQuery(query), {
|
|
1041
1044
|
headers: { Accept: "application/json" }
|
|
1042
1045
|
});
|
|
1043
1046
|
if (response.statusCode === 200)
|
|
@@ -1089,9 +1092,8 @@ class AppClient extends Client {
|
|
|
1089
1092
|
/**
|
|
1090
1093
|
* @throws {Error} if the request failed
|
|
1091
1094
|
*/
|
|
1092
|
-
async getTemplates(
|
|
1093
|
-
const response = await this.get(`/app-template
|
|
1094
|
-
query: { limit, page, query },
|
|
1095
|
+
async getTemplates(query) {
|
|
1096
|
+
const response = await this.get(`/app-template` + buildQuery(query), {
|
|
1095
1097
|
headers: { Accept: "application/json" }
|
|
1096
1098
|
});
|
|
1097
1099
|
if (response.statusCode === 200)
|
|
@@ -1130,8 +1132,8 @@ class AppClient extends Client {
|
|
|
1130
1132
|
/**
|
|
1131
1133
|
* @throws {Error} if the request failed
|
|
1132
1134
|
*/
|
|
1133
|
-
async getTemplate(id) {
|
|
1134
|
-
const response = await this.get(`/app-template/${id}
|
|
1135
|
+
async getTemplate(id, query) {
|
|
1136
|
+
const response = await this.get(`/app-template/${id}` + buildQuery(query), {
|
|
1135
1137
|
headers: { Accept: "application/json" }
|
|
1136
1138
|
});
|
|
1137
1139
|
if (response.statusCode === 200)
|
|
@@ -1180,9 +1182,8 @@ let CategoryClient$1 = class CategoryClient extends Client {
|
|
|
1180
1182
|
/**
|
|
1181
1183
|
* @throws {Error} if the request failed
|
|
1182
1184
|
*/
|
|
1183
|
-
async getCategories(
|
|
1184
|
-
const response = await this.get(`/category
|
|
1185
|
-
query: { limit, page, query },
|
|
1185
|
+
async getCategories(query) {
|
|
1186
|
+
const response = await this.get(`/category` + buildQuery(query), {
|
|
1186
1187
|
headers: { Accept: "application/json" }
|
|
1187
1188
|
});
|
|
1188
1189
|
if (response.statusCode === 200)
|
|
@@ -1221,8 +1222,10 @@ let CategoryClient$1 = class CategoryClient extends Client {
|
|
|
1221
1222
|
/**
|
|
1222
1223
|
* @throws {Error} if the request failed
|
|
1223
1224
|
*/
|
|
1224
|
-
async getCategory(id) {
|
|
1225
|
-
const response = await this.get(`/category/${id}
|
|
1225
|
+
async getCategory(id, query) {
|
|
1226
|
+
const response = await this.get(`/category/${id}` + buildQuery(query), {
|
|
1227
|
+
headers: { Accept: "application/json" }
|
|
1228
|
+
});
|
|
1226
1229
|
if (response.statusCode === 200)
|
|
1227
1230
|
return response.body.data;
|
|
1228
1231
|
throw new Error(`Failed to fetch category: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -1266,9 +1269,8 @@ let CategoryClient$1 = class CategoryClient extends Client {
|
|
|
1266
1269
|
/**
|
|
1267
1270
|
* @throws {Error} if the request failed
|
|
1268
1271
|
*/
|
|
1269
|
-
async getMainCategories(
|
|
1270
|
-
const response = await this.get(`/main-category
|
|
1271
|
-
query: { limit, page, query },
|
|
1272
|
+
async getMainCategories(query) {
|
|
1273
|
+
const response = await this.get(`/main-category` + buildQuery(query), {
|
|
1272
1274
|
headers: { Accept: "application/json" }
|
|
1273
1275
|
});
|
|
1274
1276
|
if (response.statusCode === 200)
|
|
@@ -1309,8 +1311,8 @@ let CategoryClient$1 = class CategoryClient extends Client {
|
|
|
1309
1311
|
/**
|
|
1310
1312
|
* @throws {Error} if the request failed
|
|
1311
1313
|
*/
|
|
1312
|
-
async getMainCategory(id) {
|
|
1313
|
-
const response = await this.get(`/main-category/${id}
|
|
1314
|
+
async getMainCategory(id, query) {
|
|
1315
|
+
const response = await this.get(`/main-category/${id}` + buildQuery(query), {
|
|
1314
1316
|
headers: { Accept: "application/json" }
|
|
1315
1317
|
});
|
|
1316
1318
|
if (response.statusCode === 200)
|
|
@@ -1365,9 +1367,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1365
1367
|
/**
|
|
1366
1368
|
* @throws {Error} if the request failed
|
|
1367
1369
|
*/
|
|
1368
|
-
async getCmsBlocks(
|
|
1369
|
-
const response = await this.get(`/cms-block
|
|
1370
|
-
query: { limit, page, query },
|
|
1370
|
+
async getCmsBlocks(query) {
|
|
1371
|
+
const response = await this.get(`/cms-block` + buildQuery(query), {
|
|
1371
1372
|
headers: { Accept: "application/json" }
|
|
1372
1373
|
});
|
|
1373
1374
|
if (response.statusCode === 200)
|
|
@@ -1406,8 +1407,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1406
1407
|
/**
|
|
1407
1408
|
* @throws {Error} if the request failed
|
|
1408
1409
|
*/
|
|
1409
|
-
async getCmsBlock(id) {
|
|
1410
|
-
const response = await this.get(`/cms-block/${id}
|
|
1410
|
+
async getCmsBlock(id, query) {
|
|
1411
|
+
const response = await this.get(`/cms-block/${id}` + buildQuery(query), {
|
|
1411
1412
|
headers: { Accept: "application/json" }
|
|
1412
1413
|
});
|
|
1413
1414
|
if (response.statusCode === 200)
|
|
@@ -1453,9 +1454,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1453
1454
|
/**
|
|
1454
1455
|
* @throws {Error} if the request failed
|
|
1455
1456
|
*/
|
|
1456
|
-
async getCmsPages(
|
|
1457
|
-
const response = await this.get(`/cms-page
|
|
1458
|
-
query: { limit, page, query },
|
|
1457
|
+
async getCmsPages(query) {
|
|
1458
|
+
const response = await this.get(`/cms-page` + buildQuery(query), {
|
|
1459
1459
|
headers: { Accept: "application/json" }
|
|
1460
1460
|
});
|
|
1461
1461
|
if (response.statusCode === 200)
|
|
@@ -1494,8 +1494,10 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1494
1494
|
/**
|
|
1495
1495
|
* @throws {Error} if the request failed
|
|
1496
1496
|
*/
|
|
1497
|
-
async getCmsPage(id) {
|
|
1498
|
-
const response = await this.get(`/cms-page/${id}
|
|
1497
|
+
async getCmsPage(id, query) {
|
|
1498
|
+
const response = await this.get(`/cms-page/${id}` + buildQuery(query), {
|
|
1499
|
+
headers: { Accept: "application/json" }
|
|
1500
|
+
});
|
|
1499
1501
|
if (response.statusCode === 200)
|
|
1500
1502
|
return response.body.data;
|
|
1501
1503
|
throw new Error(`Failed to fetch cms page: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -1539,9 +1541,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1539
1541
|
/**
|
|
1540
1542
|
* @throws {Error} if the request failed
|
|
1541
1543
|
*/
|
|
1542
|
-
async getCmsSections(
|
|
1543
|
-
const response = await this.get(`/cms-section
|
|
1544
|
-
query: { limit, page, query },
|
|
1544
|
+
async getCmsSections(query) {
|
|
1545
|
+
const response = await this.get(`/cms-section` + buildQuery(query), {
|
|
1545
1546
|
headers: { Accept: "application/json" }
|
|
1546
1547
|
});
|
|
1547
1548
|
if (response.statusCode === 200)
|
|
@@ -1582,8 +1583,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1582
1583
|
/**
|
|
1583
1584
|
* @throws {Error} if the request failed
|
|
1584
1585
|
*/
|
|
1585
|
-
async getCmsSection(id) {
|
|
1586
|
-
const response = await this.get(`/cms-section/${id}
|
|
1586
|
+
async getCmsSection(id, query) {
|
|
1587
|
+
const response = await this.get(`/cms-section/${id}` + buildQuery(query), {
|
|
1587
1588
|
headers: { Accept: "application/json" }
|
|
1588
1589
|
});
|
|
1589
1590
|
if (response.statusCode === 200)
|
|
@@ -1635,9 +1636,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1635
1636
|
/**
|
|
1636
1637
|
* @throws {Error} if the request failed
|
|
1637
1638
|
*/
|
|
1638
|
-
async getCmsSlots(
|
|
1639
|
-
const response = await this.get(`/cms-slot
|
|
1640
|
-
query: { limit, page, query },
|
|
1639
|
+
async getCmsSlots(query) {
|
|
1640
|
+
const response = await this.get(`/cms-slot` + buildQuery(query), {
|
|
1641
1641
|
headers: { Accept: "application/json" }
|
|
1642
1642
|
});
|
|
1643
1643
|
if (response.statusCode === 200)
|
|
@@ -1676,8 +1676,10 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1676
1676
|
/**
|
|
1677
1677
|
* @throws {Error} if the request failed
|
|
1678
1678
|
*/
|
|
1679
|
-
async getCmsSlot(id) {
|
|
1680
|
-
const response = await this.get(`/cms-slot/${id}
|
|
1679
|
+
async getCmsSlot(id, query) {
|
|
1680
|
+
const response = await this.get(`/cms-slot/${id}` + buildQuery(query), {
|
|
1681
|
+
headers: { Accept: "application/json" }
|
|
1682
|
+
});
|
|
1681
1683
|
if (response.statusCode === 200)
|
|
1682
1684
|
return response.body.data;
|
|
1683
1685
|
throw new Error(`Failed to fetch cms slot: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -1721,9 +1723,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1721
1723
|
/**
|
|
1722
1724
|
* @throws {Error} if the request failed
|
|
1723
1725
|
*/
|
|
1724
|
-
async getLandingPages(
|
|
1725
|
-
const response = await this.get(`/landing-page
|
|
1726
|
-
query: { limit, page, query },
|
|
1726
|
+
async getLandingPages(query) {
|
|
1727
|
+
const response = await this.get(`/landing-page` + buildQuery(query), {
|
|
1727
1728
|
headers: { Accept: "application/json" }
|
|
1728
1729
|
});
|
|
1729
1730
|
if (response.statusCode === 200)
|
|
@@ -1764,8 +1765,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1764
1765
|
/**
|
|
1765
1766
|
* @throws {Error} if the request failed
|
|
1766
1767
|
*/
|
|
1767
|
-
async getLandingPage(id) {
|
|
1768
|
-
const response = await this.get(`/landing-page/${id}
|
|
1768
|
+
async getLandingPage(id, query) {
|
|
1769
|
+
const response = await this.get(`/landing-page/${id}` + buildQuery(query), {
|
|
1769
1770
|
headers: { Accept: "application/json" }
|
|
1770
1771
|
});
|
|
1771
1772
|
if (response.statusCode === 200)
|
|
@@ -1817,9 +1818,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1817
1818
|
/**
|
|
1818
1819
|
* @throws {Error} if the request failed
|
|
1819
1820
|
*/
|
|
1820
|
-
async getThemes(
|
|
1821
|
-
const response = await this.get(`/theme
|
|
1822
|
-
query: { limit, page, query },
|
|
1821
|
+
async getThemes(query) {
|
|
1822
|
+
const response = await this.get(`/theme` + buildQuery(query), {
|
|
1823
1823
|
headers: { Accept: "application/json" }
|
|
1824
1824
|
});
|
|
1825
1825
|
if (response.statusCode === 200)
|
|
@@ -1856,8 +1856,10 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1856
1856
|
/**
|
|
1857
1857
|
* @throws {Error} if the request failed
|
|
1858
1858
|
*/
|
|
1859
|
-
async getTheme(id) {
|
|
1860
|
-
const response = await this.get(`/theme/${id}
|
|
1859
|
+
async getTheme(id, query) {
|
|
1860
|
+
const response = await this.get(`/theme/${id}` + buildQuery(query), {
|
|
1861
|
+
headers: { Accept: "application/json" }
|
|
1862
|
+
});
|
|
1861
1863
|
if (response.statusCode === 200)
|
|
1862
1864
|
return response.body.data;
|
|
1863
1865
|
throw new Error(`Failed to fetch theme: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -1902,9 +1904,8 @@ let CountryClient$1 = class CountryClient extends Client {
|
|
|
1902
1904
|
/**
|
|
1903
1905
|
* @throws {Error} if the request failed
|
|
1904
1906
|
*/
|
|
1905
|
-
async getCountries(
|
|
1906
|
-
const response = await this.get(`/country
|
|
1907
|
-
query: { limit, page, query },
|
|
1907
|
+
async getCountries(query) {
|
|
1908
|
+
const response = await this.get(`/country` + buildQuery(query), {
|
|
1908
1909
|
headers: { Accept: "application/json" }
|
|
1909
1910
|
});
|
|
1910
1911
|
if (response.statusCode === 200)
|
|
@@ -1943,8 +1944,10 @@ let CountryClient$1 = class CountryClient extends Client {
|
|
|
1943
1944
|
/**
|
|
1944
1945
|
* @throws {Error} if the request failed
|
|
1945
1946
|
*/
|
|
1946
|
-
async getCountry(id) {
|
|
1947
|
-
const response = await this.get(`/country/${id}
|
|
1947
|
+
async getCountry(id, query) {
|
|
1948
|
+
const response = await this.get(`/country/${id}` + buildQuery(query), {
|
|
1949
|
+
headers: { Accept: "application/json" }
|
|
1950
|
+
});
|
|
1948
1951
|
if (response.statusCode === 200)
|
|
1949
1952
|
return response.body.data;
|
|
1950
1953
|
throw new Error(`Failed to fetch country: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -1988,9 +1991,8 @@ let CountryClient$1 = class CountryClient extends Client {
|
|
|
1988
1991
|
/**
|
|
1989
1992
|
* @throws {Error} if the request failed
|
|
1990
1993
|
*/
|
|
1991
|
-
async getStates(
|
|
1992
|
-
const response = await this.get(`/country-state
|
|
1993
|
-
query: { limit, page, query },
|
|
1994
|
+
async getStates(query) {
|
|
1995
|
+
const response = await this.get(`/country-state` + buildQuery(query), {
|
|
1994
1996
|
headers: { Accept: "application/json" }
|
|
1995
1997
|
});
|
|
1996
1998
|
if (response.statusCode === 200)
|
|
@@ -2027,8 +2029,8 @@ let CountryClient$1 = class CountryClient extends Client {
|
|
|
2027
2029
|
/**
|
|
2028
2030
|
* @throws {Error} if the request failed
|
|
2029
2031
|
*/
|
|
2030
|
-
async getState(id) {
|
|
2031
|
-
const response = await this.get(`/country-state/${id}
|
|
2032
|
+
async getState(id, query) {
|
|
2033
|
+
const response = await this.get(`/country-state/${id}` + buildQuery(query), {
|
|
2032
2034
|
headers: { Accept: "application/json" }
|
|
2033
2035
|
});
|
|
2034
2036
|
if (response.statusCode === 200)
|
|
@@ -2075,9 +2077,8 @@ class CountryClient extends Client {
|
|
|
2075
2077
|
/**
|
|
2076
2078
|
* @throws {Error} if the request failed
|
|
2077
2079
|
*/
|
|
2078
|
-
async getCurrencies(
|
|
2079
|
-
const response = await this.get(`/currency
|
|
2080
|
-
query: { limit, page, query },
|
|
2080
|
+
async getCurrencies(query) {
|
|
2081
|
+
const response = await this.get(`/currency` + buildQuery(query), {
|
|
2081
2082
|
headers: { Accept: "application/json" }
|
|
2082
2083
|
});
|
|
2083
2084
|
if (response.statusCode === 200)
|
|
@@ -2116,8 +2117,10 @@ class CountryClient extends Client {
|
|
|
2116
2117
|
/**
|
|
2117
2118
|
* @throws {Error} if the request failed
|
|
2118
2119
|
*/
|
|
2119
|
-
async getCurrency(id) {
|
|
2120
|
-
const response = await this.get(`/currency/${id}
|
|
2120
|
+
async getCurrency(id, query) {
|
|
2121
|
+
const response = await this.get(`/currency/${id}` + buildQuery(query), {
|
|
2122
|
+
headers: { Accept: "application/json" }
|
|
2123
|
+
});
|
|
2121
2124
|
if (response.statusCode === 200)
|
|
2122
2125
|
return response.body.data;
|
|
2123
2126
|
throw new Error(`Failed to fetch currency: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -2161,9 +2164,8 @@ class CountryClient extends Client {
|
|
|
2161
2164
|
/**
|
|
2162
2165
|
* @throws {Error} if the request failed
|
|
2163
2166
|
*/
|
|
2164
|
-
async getCountryRoundings(
|
|
2165
|
-
const response = await this.get(`/currency-country-rounding
|
|
2166
|
-
query: { limit, page, query },
|
|
2167
|
+
async getCountryRoundings(query) {
|
|
2168
|
+
const response = await this.get(`/currency-country-rounding` + buildQuery(query), {
|
|
2167
2169
|
headers: { Accept: "application/json" }
|
|
2168
2170
|
});
|
|
2169
2171
|
if (response.statusCode === 200)
|
|
@@ -2204,8 +2206,8 @@ class CountryClient extends Client {
|
|
|
2204
2206
|
/**
|
|
2205
2207
|
* @throws {Error} if the request failed
|
|
2206
2208
|
*/
|
|
2207
|
-
async getCountryRounding(id) {
|
|
2208
|
-
const response = await this.get(`/currency-country-rounding/${id}
|
|
2209
|
+
async getCountryRounding(id, query) {
|
|
2210
|
+
const response = await this.get(`/currency-country-rounding/${id}` + buildQuery(query), {
|
|
2209
2211
|
headers: { Accept: "application/json" }
|
|
2210
2212
|
});
|
|
2211
2213
|
if (response.statusCode === 200)
|
|
@@ -2260,9 +2262,8 @@ class CustomDataClient extends Client {
|
|
|
2260
2262
|
/**
|
|
2261
2263
|
* @throws {Error} if the request failed
|
|
2262
2264
|
*/
|
|
2263
|
-
async getCustomEntities(
|
|
2264
|
-
const response = await this.get(`/custom-entity
|
|
2265
|
-
query: { limit, page, query },
|
|
2265
|
+
async getCustomEntities(query) {
|
|
2266
|
+
const response = await this.get(`/custom-entity` + buildQuery(query), {
|
|
2266
2267
|
headers: { Accept: "application/json" }
|
|
2267
2268
|
});
|
|
2268
2269
|
if (response.statusCode === 200)
|
|
@@ -2303,8 +2304,8 @@ class CustomDataClient extends Client {
|
|
|
2303
2304
|
/**
|
|
2304
2305
|
* @throws {Error} if the request failed
|
|
2305
2306
|
*/
|
|
2306
|
-
async getCustomEntity(id) {
|
|
2307
|
-
const response = await this.get(`/custom-entity/${id}
|
|
2307
|
+
async getCustomEntity(id, query) {
|
|
2308
|
+
const response = await this.get(`/custom-entity/${id}` + buildQuery(query), {
|
|
2308
2309
|
headers: { Accept: "application/json" }
|
|
2309
2310
|
});
|
|
2310
2311
|
if (response.statusCode === 200)
|
|
@@ -2356,9 +2357,8 @@ class CustomDataClient extends Client {
|
|
|
2356
2357
|
/**
|
|
2357
2358
|
* @throws {Error} if the request failed
|
|
2358
2359
|
*/
|
|
2359
|
-
async getCustomFields(
|
|
2360
|
-
const response = await this.get(`/custom-field
|
|
2361
|
-
query: { limit, page, query },
|
|
2360
|
+
async getCustomFields(query) {
|
|
2361
|
+
const response = await this.get(`/custom-field` + buildQuery(query), {
|
|
2362
2362
|
headers: { Accept: "application/json" }
|
|
2363
2363
|
});
|
|
2364
2364
|
if (response.statusCode === 200)
|
|
@@ -2399,8 +2399,8 @@ class CustomDataClient extends Client {
|
|
|
2399
2399
|
/**
|
|
2400
2400
|
* @throws {Error} if the request failed
|
|
2401
2401
|
*/
|
|
2402
|
-
async getCustomField(id) {
|
|
2403
|
-
const response = await this.get(`/custom-field/${id}
|
|
2402
|
+
async getCustomField(id, query) {
|
|
2403
|
+
const response = await this.get(`/custom-field/${id}` + buildQuery(query), {
|
|
2404
2404
|
headers: { Accept: "application/json" }
|
|
2405
2405
|
});
|
|
2406
2406
|
if (response.statusCode === 200)
|
|
@@ -2452,9 +2452,8 @@ class CustomDataClient extends Client {
|
|
|
2452
2452
|
/**
|
|
2453
2453
|
* @throws {Error} if the request failed
|
|
2454
2454
|
*/
|
|
2455
|
-
async getCustomFieldSets(
|
|
2456
|
-
const response = await this.get(`/custom-field-set
|
|
2457
|
-
query: { limit, page, query },
|
|
2455
|
+
async getCustomFieldSets(query) {
|
|
2456
|
+
const response = await this.get(`/custom-field-set` + buildQuery(query), {
|
|
2458
2457
|
headers: { Accept: "application/json" }
|
|
2459
2458
|
});
|
|
2460
2459
|
if (response.statusCode === 200)
|
|
@@ -2495,8 +2494,8 @@ class CustomDataClient extends Client {
|
|
|
2495
2494
|
/**
|
|
2496
2495
|
* @throws {Error} if the request failed
|
|
2497
2496
|
*/
|
|
2498
|
-
async getCustomFieldSet(id) {
|
|
2499
|
-
const response = await this.get(`/custom-field-set/${id}
|
|
2497
|
+
async getCustomFieldSet(id, query) {
|
|
2498
|
+
const response = await this.get(`/custom-field-set/${id}` + buildQuery(query), {
|
|
2500
2499
|
headers: { Accept: "application/json" }
|
|
2501
2500
|
});
|
|
2502
2501
|
if (response.statusCode === 200)
|
|
@@ -2548,9 +2547,8 @@ class CustomDataClient extends Client {
|
|
|
2548
2547
|
/**
|
|
2549
2548
|
* @throws {Error} if the request failed
|
|
2550
2549
|
*/
|
|
2551
|
-
async getCustomFieldSetRelations(
|
|
2552
|
-
const response = await this.get(`/custom-field-set-relation
|
|
2553
|
-
query: { limit, page, query },
|
|
2550
|
+
async getCustomFieldSetRelations(query) {
|
|
2551
|
+
const response = await this.get(`/custom-field-set-relation` + buildQuery(query), {
|
|
2554
2552
|
headers: { Accept: "application/json" }
|
|
2555
2553
|
});
|
|
2556
2554
|
if (response.statusCode === 200)
|
|
@@ -2591,8 +2589,8 @@ class CustomDataClient extends Client {
|
|
|
2591
2589
|
/**
|
|
2592
2590
|
* @throws {Error} if the request failed
|
|
2593
2591
|
*/
|
|
2594
|
-
async getCustomFieldSetRelation(id) {
|
|
2595
|
-
const response = await this.get(`/custom-field-set-relation/${id}
|
|
2592
|
+
async getCustomFieldSetRelation(id, query) {
|
|
2593
|
+
const response = await this.get(`/custom-field-set-relation/${id}` + buildQuery(query), {
|
|
2596
2594
|
headers: { Accept: "application/json" }
|
|
2597
2595
|
});
|
|
2598
2596
|
if (response.statusCode === 200)
|
|
@@ -2662,9 +2660,8 @@ class CustomerClient extends Client {
|
|
|
2662
2660
|
/**
|
|
2663
2661
|
* @throws {Error} if the request failed
|
|
2664
2662
|
*/
|
|
2665
|
-
async getCustomers(
|
|
2666
|
-
const response = await this.get(`/customer
|
|
2667
|
-
query: { limit, page, query },
|
|
2663
|
+
async getCustomers(query) {
|
|
2664
|
+
const response = await this.get(`/customer` + buildQuery(query), {
|
|
2668
2665
|
headers: { Accept: "application/json" }
|
|
2669
2666
|
});
|
|
2670
2667
|
if (response.statusCode === 200)
|
|
@@ -2703,8 +2700,10 @@ class CustomerClient extends Client {
|
|
|
2703
2700
|
/**
|
|
2704
2701
|
* @throws {Error} if the request failed
|
|
2705
2702
|
*/
|
|
2706
|
-
async getCustomer(id) {
|
|
2707
|
-
const response = await this.get(`/customer/${id}
|
|
2703
|
+
async getCustomer(id, query) {
|
|
2704
|
+
const response = await this.get(`/customer/${id}` + buildQuery(query), {
|
|
2705
|
+
headers: { Accept: "application/json" }
|
|
2706
|
+
});
|
|
2708
2707
|
if (response.statusCode === 200)
|
|
2709
2708
|
return response.body.data;
|
|
2710
2709
|
throw new Error(`Failed to fetch customer: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -2748,9 +2747,8 @@ class CustomerClient extends Client {
|
|
|
2748
2747
|
/**
|
|
2749
2748
|
* @throws {Error} if the request failed
|
|
2750
2749
|
*/
|
|
2751
|
-
async getAddresses(
|
|
2752
|
-
const response = await this.get(`/address
|
|
2753
|
-
query: { limit, page, query },
|
|
2750
|
+
async getAddresses(query) {
|
|
2751
|
+
const response = await this.get(`/address` + buildQuery(query), {
|
|
2754
2752
|
headers: { Accept: "application/json" }
|
|
2755
2753
|
});
|
|
2756
2754
|
if (response.statusCode === 200)
|
|
@@ -2789,8 +2787,10 @@ class CustomerClient extends Client {
|
|
|
2789
2787
|
/**
|
|
2790
2788
|
* @throws {Error} if the request failed
|
|
2791
2789
|
*/
|
|
2792
|
-
async getAddress(id) {
|
|
2793
|
-
const response = await this.get(`/address/${id}
|
|
2790
|
+
async getAddress(id, query) {
|
|
2791
|
+
const response = await this.get(`/address/${id}` + buildQuery(query), {
|
|
2792
|
+
headers: { Accept: "application/json" }
|
|
2793
|
+
});
|
|
2794
2794
|
if (response.statusCode === 200)
|
|
2795
2795
|
return response.body.data;
|
|
2796
2796
|
throw new Error(`Failed to fetch address: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -2834,9 +2834,8 @@ class CustomerClient extends Client {
|
|
|
2834
2834
|
/**
|
|
2835
2835
|
* @throws {Error} if the request failed
|
|
2836
2836
|
*/
|
|
2837
|
-
async getGroups(
|
|
2838
|
-
const response = await this.get(`/customer-group
|
|
2839
|
-
query: { limit, page, query },
|
|
2837
|
+
async getGroups(query) {
|
|
2838
|
+
const response = await this.get(`/customer-group` + buildQuery(query), {
|
|
2840
2839
|
headers: { Accept: "application/json" }
|
|
2841
2840
|
});
|
|
2842
2841
|
if (response.statusCode === 200)
|
|
@@ -2873,8 +2872,8 @@ class CustomerClient extends Client {
|
|
|
2873
2872
|
/**
|
|
2874
2873
|
* @throws {Error} if the request failed
|
|
2875
2874
|
*/
|
|
2876
|
-
async getGroup(id) {
|
|
2877
|
-
const response = await this.get(`/customer-group/${id}
|
|
2875
|
+
async getGroup(id, query) {
|
|
2876
|
+
const response = await this.get(`/customer-group/${id}` + buildQuery(query), {
|
|
2878
2877
|
headers: { Accept: "application/json" }
|
|
2879
2878
|
});
|
|
2880
2879
|
if (response.statusCode === 200)
|
|
@@ -2918,9 +2917,8 @@ class CustomerClient extends Client {
|
|
|
2918
2917
|
/**
|
|
2919
2918
|
* @throws {Error} if the request failed
|
|
2920
2919
|
*/
|
|
2921
|
-
async getRecoveries(
|
|
2922
|
-
const response = await this.get(`/customer-recovery
|
|
2923
|
-
query: { limit, page, query },
|
|
2920
|
+
async getRecoveries(query) {
|
|
2921
|
+
const response = await this.get(`/customer-recovery` + buildQuery(query), {
|
|
2924
2922
|
headers: { Accept: "application/json" }
|
|
2925
2923
|
});
|
|
2926
2924
|
if (response.statusCode === 200)
|
|
@@ -2959,8 +2957,8 @@ class CustomerClient extends Client {
|
|
|
2959
2957
|
/**
|
|
2960
2958
|
* @throws {Error} if the request failed
|
|
2961
2959
|
*/
|
|
2962
|
-
async getRecovery(id) {
|
|
2963
|
-
const response = await this.get(`/customer-recovery/${id}
|
|
2960
|
+
async getRecovery(id, query) {
|
|
2961
|
+
const response = await this.get(`/customer-recovery/${id}` + buildQuery(query), {
|
|
2964
2962
|
headers: { Accept: "application/json" }
|
|
2965
2963
|
});
|
|
2966
2964
|
if (response.statusCode === 200)
|
|
@@ -3006,9 +3004,8 @@ class CustomerClient extends Client {
|
|
|
3006
3004
|
/**
|
|
3007
3005
|
* @throws {Error} if the request failed
|
|
3008
3006
|
*/
|
|
3009
|
-
async getWishlists(
|
|
3010
|
-
const response = await this.get(`/customer-wishlist
|
|
3011
|
-
query: { limit, page, query },
|
|
3007
|
+
async getWishlists(query) {
|
|
3008
|
+
const response = await this.get(`/customer-wishlist` + buildQuery(query), {
|
|
3012
3009
|
headers: { Accept: "application/json" }
|
|
3013
3010
|
});
|
|
3014
3011
|
if (response.statusCode === 200)
|
|
@@ -3047,8 +3044,8 @@ class CustomerClient extends Client {
|
|
|
3047
3044
|
/**
|
|
3048
3045
|
* @throws {Error} if the request failed
|
|
3049
3046
|
*/
|
|
3050
|
-
async getWishlist(id) {
|
|
3051
|
-
const response = await this.get(`/customer-wishlist/${id}
|
|
3047
|
+
async getWishlist(id, query) {
|
|
3048
|
+
const response = await this.get(`/customer-wishlist/${id}` + buildQuery(query), {
|
|
3052
3049
|
headers: { Accept: "application/json" }
|
|
3053
3050
|
});
|
|
3054
3051
|
if (response.statusCode === 200)
|
|
@@ -3094,9 +3091,8 @@ class CustomerClient extends Client {
|
|
|
3094
3091
|
/**
|
|
3095
3092
|
* @throws {Error} if the request failed
|
|
3096
3093
|
*/
|
|
3097
|
-
async getWishlistProducts(
|
|
3098
|
-
const response = await this.get(`/customer-wishlist-product
|
|
3099
|
-
query: { limit, page, query },
|
|
3094
|
+
async getWishlistProducts(query) {
|
|
3095
|
+
const response = await this.get(`/customer-wishlist-product` + buildQuery(query), {
|
|
3100
3096
|
headers: { Accept: "application/json" }
|
|
3101
3097
|
});
|
|
3102
3098
|
if (response.statusCode === 200)
|
|
@@ -3137,8 +3133,8 @@ class CustomerClient extends Client {
|
|
|
3137
3133
|
/**
|
|
3138
3134
|
* @throws {Error} if the request failed
|
|
3139
3135
|
*/
|
|
3140
|
-
async getWishlistProduct(id) {
|
|
3141
|
-
const response = await this.get(`/customer-wishlist-product/${id}
|
|
3136
|
+
async getWishlistProduct(id, query) {
|
|
3137
|
+
const response = await this.get(`/customer-wishlist-product/${id}` + buildQuery(query), {
|
|
3142
3138
|
headers: { Accept: "application/json" }
|
|
3143
3139
|
});
|
|
3144
3140
|
if (response.statusCode === 200)
|
|
@@ -3192,9 +3188,8 @@ let DeliveryTimeClient$4 = class DeliveryTimeClient extends Client {
|
|
|
3192
3188
|
/**
|
|
3193
3189
|
* @throws {Error} if the request failed
|
|
3194
3190
|
*/
|
|
3195
|
-
async getDeliveryTimes(
|
|
3196
|
-
const response = await this.get(`/delivery-time
|
|
3197
|
-
query: { limit, page, query },
|
|
3191
|
+
async getDeliveryTimes(query) {
|
|
3192
|
+
const response = await this.get(`/delivery-time` + buildQuery(query), {
|
|
3198
3193
|
headers: { Accept: "application/json" }
|
|
3199
3194
|
});
|
|
3200
3195
|
if (response.statusCode === 200)
|
|
@@ -3235,8 +3230,8 @@ let DeliveryTimeClient$4 = class DeliveryTimeClient extends Client {
|
|
|
3235
3230
|
/**
|
|
3236
3231
|
* @throws {Error} if the request failed
|
|
3237
3232
|
*/
|
|
3238
|
-
async getDeliveryTime(id) {
|
|
3239
|
-
const response = await this.get(`/delivery-time/${id}
|
|
3233
|
+
async getDeliveryTime(id, query) {
|
|
3234
|
+
const response = await this.get(`/delivery-time/${id}` + buildQuery(query), {
|
|
3240
3235
|
headers: { Accept: "application/json" }
|
|
3241
3236
|
});
|
|
3242
3237
|
if (response.statusCode === 200)
|
|
@@ -3335,9 +3330,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3335
3330
|
/**
|
|
3336
3331
|
* @throws {Error} if the request failed
|
|
3337
3332
|
*/
|
|
3338
|
-
async getDocuments(
|
|
3339
|
-
const response = await this.get(`/document
|
|
3340
|
-
query: { limit, page, query },
|
|
3333
|
+
async getDocuments(query) {
|
|
3334
|
+
const response = await this.get(`/document` + buildQuery(query), {
|
|
3341
3335
|
headers: { Accept: "application/json" }
|
|
3342
3336
|
});
|
|
3343
3337
|
if (response.statusCode === 200)
|
|
@@ -3376,8 +3370,10 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3376
3370
|
/**
|
|
3377
3371
|
* @throws {Error} if the request failed
|
|
3378
3372
|
*/
|
|
3379
|
-
async getDocument(id) {
|
|
3380
|
-
const response = await this.get(`/document/${id}
|
|
3373
|
+
async getDocument(id, query) {
|
|
3374
|
+
const response = await this.get(`/document/${id}` + buildQuery(query), {
|
|
3375
|
+
headers: { Accept: "application/json" }
|
|
3376
|
+
});
|
|
3381
3377
|
if (response.statusCode === 200)
|
|
3382
3378
|
return response.body.data;
|
|
3383
3379
|
throw new Error(`Failed to fetch document: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -3421,9 +3417,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3421
3417
|
/**
|
|
3422
3418
|
* @throws {Error} if the request failed
|
|
3423
3419
|
*/
|
|
3424
|
-
async getBaseConfigs(
|
|
3425
|
-
const response = await this.get(`/document-base-config
|
|
3426
|
-
query: { limit, page, query },
|
|
3420
|
+
async getBaseConfigs(query) {
|
|
3421
|
+
const response = await this.get(`/document-base-config` + buildQuery(query), {
|
|
3427
3422
|
headers: { Accept: "application/json" }
|
|
3428
3423
|
});
|
|
3429
3424
|
if (response.statusCode === 200)
|
|
@@ -3464,8 +3459,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3464
3459
|
/**
|
|
3465
3460
|
* @throws {Error} if the request failed
|
|
3466
3461
|
*/
|
|
3467
|
-
async getBaseConfig(id) {
|
|
3468
|
-
const response = await this.get(`/document-base-config/${id}
|
|
3462
|
+
async getBaseConfig(id, query) {
|
|
3463
|
+
const response = await this.get(`/document-base-config/${id}` + buildQuery(query), {
|
|
3469
3464
|
headers: { Accept: "application/json" }
|
|
3470
3465
|
});
|
|
3471
3466
|
if (response.statusCode === 200)
|
|
@@ -3517,9 +3512,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3517
3512
|
/**
|
|
3518
3513
|
* @throws {Error} if the request failed
|
|
3519
3514
|
*/
|
|
3520
|
-
async getBaseConfigSalesChannels(
|
|
3521
|
-
const response = await this.get(`/document-base-config-sales-channel
|
|
3522
|
-
query: { limit, page, query },
|
|
3515
|
+
async getBaseConfigSalesChannels(query) {
|
|
3516
|
+
const response = await this.get(`/document-base-config-sales-channel` + buildQuery(query), {
|
|
3523
3517
|
headers: { Accept: "application/json" }
|
|
3524
3518
|
});
|
|
3525
3519
|
if (response.statusCode === 200)
|
|
@@ -3560,10 +3554,13 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3560
3554
|
/**
|
|
3561
3555
|
* @throws {Error} if the request failed
|
|
3562
3556
|
*/
|
|
3563
|
-
async getBaseConfigSalesChannel(id) {
|
|
3564
|
-
const response = await this.get(
|
|
3565
|
-
|
|
3566
|
-
|
|
3557
|
+
async getBaseConfigSalesChannel(id, query) {
|
|
3558
|
+
const response = await this.get(
|
|
3559
|
+
`/document-base-config-sales-channel/${id}` + buildQuery(query),
|
|
3560
|
+
{
|
|
3561
|
+
headers: { Accept: "application/json" }
|
|
3562
|
+
}
|
|
3563
|
+
);
|
|
3567
3564
|
if (response.statusCode === 200)
|
|
3568
3565
|
return response.body.data;
|
|
3569
3566
|
throw new Error(
|
|
@@ -3613,9 +3610,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3613
3610
|
/**
|
|
3614
3611
|
* @throws {Error} if the request failed
|
|
3615
3612
|
*/
|
|
3616
|
-
async getDocumentTypes(
|
|
3617
|
-
const response = await this.get(`/document-type
|
|
3618
|
-
query: { limit, page, query },
|
|
3613
|
+
async getDocumentTypes(query) {
|
|
3614
|
+
const response = await this.get(`/document-type` + buildQuery(query), {
|
|
3619
3615
|
headers: { Accept: "application/json" }
|
|
3620
3616
|
});
|
|
3621
3617
|
if (response.statusCode === 200)
|
|
@@ -3656,8 +3652,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3656
3652
|
/**
|
|
3657
3653
|
* @throws {Error} if the request failed
|
|
3658
3654
|
*/
|
|
3659
|
-
async getDocumentType(id) {
|
|
3660
|
-
const response = await this.get(`/document-type/${id}
|
|
3655
|
+
async getDocumentType(id, query) {
|
|
3656
|
+
const response = await this.get(`/document-type/${id}` + buildQuery(query), {
|
|
3661
3657
|
headers: { Accept: "application/json" }
|
|
3662
3658
|
});
|
|
3663
3659
|
if (response.statusCode === 200)
|
|
@@ -3712,9 +3708,8 @@ class FlowClient extends Client {
|
|
|
3712
3708
|
/**
|
|
3713
3709
|
* @throws {Error} if the request failed
|
|
3714
3710
|
*/
|
|
3715
|
-
async getFlows(
|
|
3716
|
-
const response = await this.get(`/flow
|
|
3717
|
-
query: { limit, page, query },
|
|
3711
|
+
async getFlows(query) {
|
|
3712
|
+
const response = await this.get(`/flow` + buildQuery(query), {
|
|
3718
3713
|
headers: { Accept: "application/json" }
|
|
3719
3714
|
});
|
|
3720
3715
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -3748,8 +3743,10 @@ class FlowClient extends Client {
|
|
|
3748
3743
|
/**
|
|
3749
3744
|
* @throws {Error} if the request failed
|
|
3750
3745
|
*/
|
|
3751
|
-
async getFlow(id) {
|
|
3752
|
-
const response = await this.get(`/flow/${id}
|
|
3746
|
+
async getFlow(id, query) {
|
|
3747
|
+
const response = await this.get(`/flow/${id}` + buildQuery(query), {
|
|
3748
|
+
headers: { Accept: "application/json" }
|
|
3749
|
+
});
|
|
3753
3750
|
if (response.statusCode === 200)
|
|
3754
3751
|
return response.body.data;
|
|
3755
3752
|
throw new Error(`Failed to fetch flow: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -3791,9 +3788,8 @@ class FlowClient extends Client {
|
|
|
3791
3788
|
/**
|
|
3792
3789
|
* @throws {Error} if the request failed
|
|
3793
3790
|
*/
|
|
3794
|
-
async getFlowSequences(
|
|
3795
|
-
const response = await this.get(`/flow-sequence
|
|
3796
|
-
query: { limit, page, query },
|
|
3791
|
+
async getFlowSequences(query) {
|
|
3792
|
+
const response = await this.get(`/flow-sequence` + buildQuery(query), {
|
|
3797
3793
|
headers: { Accept: "application/json" }
|
|
3798
3794
|
});
|
|
3799
3795
|
if (response.statusCode === 200)
|
|
@@ -3834,8 +3830,8 @@ class FlowClient extends Client {
|
|
|
3834
3830
|
/**
|
|
3835
3831
|
* @throws {Error} if the request failed
|
|
3836
3832
|
*/
|
|
3837
|
-
async getFlowSequence(id) {
|
|
3838
|
-
const response = await this.get(`/flow-sequence/${id}
|
|
3833
|
+
async getFlowSequence(id, query) {
|
|
3834
|
+
const response = await this.get(`/flow-sequence/${id}` + buildQuery(query), {
|
|
3839
3835
|
headers: { Accept: "application/json" }
|
|
3840
3836
|
});
|
|
3841
3837
|
if (response.statusCode === 200)
|
|
@@ -3887,9 +3883,8 @@ class FlowClient extends Client {
|
|
|
3887
3883
|
/**
|
|
3888
3884
|
* @throws {Error} if the request failed
|
|
3889
3885
|
*/
|
|
3890
|
-
async getFlowTemplates(
|
|
3891
|
-
const response = await this.get(`/flow-template
|
|
3892
|
-
query: { limit, page, query },
|
|
3886
|
+
async getFlowTemplates(query) {
|
|
3887
|
+
const response = await this.get(`/flow-template` + buildQuery(query), {
|
|
3893
3888
|
headers: { Accept: "application/json" }
|
|
3894
3889
|
});
|
|
3895
3890
|
if (response.statusCode === 200)
|
|
@@ -3930,8 +3925,8 @@ class FlowClient extends Client {
|
|
|
3930
3925
|
/**
|
|
3931
3926
|
* @throws {Error} if the request failed
|
|
3932
3927
|
*/
|
|
3933
|
-
async getFlowTemplate(id) {
|
|
3934
|
-
const response = await this.get(`/flow-template/${id}
|
|
3928
|
+
async getFlowTemplate(id, query) {
|
|
3929
|
+
const response = await this.get(`/flow-template/${id}` + buildQuery(query), {
|
|
3935
3930
|
headers: { Accept: "application/json" }
|
|
3936
3931
|
});
|
|
3937
3932
|
if (response.statusCode === 200)
|
|
@@ -3986,9 +3981,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
3986
3981
|
/**
|
|
3987
3982
|
* @throws {Error} if the request failed
|
|
3988
3983
|
*/
|
|
3989
|
-
async getFiles(
|
|
3990
|
-
const response = await this.get(`/import-export-file
|
|
3991
|
-
query: { limit, page, query },
|
|
3984
|
+
async getFiles(query) {
|
|
3985
|
+
const response = await this.get(`/import-export-file` + buildQuery(query), {
|
|
3992
3986
|
headers: { Accept: "application/json" }
|
|
3993
3987
|
});
|
|
3994
3988
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -4024,8 +4018,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
4024
4018
|
/**
|
|
4025
4019
|
* @throws {Error} if the request failed
|
|
4026
4020
|
*/
|
|
4027
|
-
async getFile(id) {
|
|
4028
|
-
const response = await this.get(`/import-export-file/${id}
|
|
4021
|
+
async getFile(id, query) {
|
|
4022
|
+
const response = await this.get(`/import-export-file/${id}` + buildQuery(query), {
|
|
4029
4023
|
headers: { Accept: "application/json" }
|
|
4030
4024
|
});
|
|
4031
4025
|
if (response.statusCode === 200)
|
|
@@ -4069,9 +4063,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
4069
4063
|
/**
|
|
4070
4064
|
* @throws {Error} if the request failed
|
|
4071
4065
|
*/
|
|
4072
|
-
async getLogs(
|
|
4073
|
-
const response = await this.get(`/import-export-log
|
|
4074
|
-
query: { limit, page, query },
|
|
4066
|
+
async getLogs(query) {
|
|
4067
|
+
const response = await this.get(`/import-export-log` + buildQuery(query), {
|
|
4075
4068
|
headers: { Accept: "application/json" }
|
|
4076
4069
|
});
|
|
4077
4070
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -4105,8 +4098,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
4105
4098
|
/**
|
|
4106
4099
|
* @throws {Error} if the request failed
|
|
4107
4100
|
*/
|
|
4108
|
-
async getLog(id) {
|
|
4109
|
-
const response = await this.get(`/import-export-log/${id}
|
|
4101
|
+
async getLog(id, query) {
|
|
4102
|
+
const response = await this.get(`/import-export-log/${id}` + buildQuery(query), {
|
|
4110
4103
|
headers: { Accept: "application/json" }
|
|
4111
4104
|
});
|
|
4112
4105
|
if (response.statusCode === 200)
|
|
@@ -4150,9 +4143,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
4150
4143
|
/**
|
|
4151
4144
|
* @throws {Error} if the request failed
|
|
4152
4145
|
*/
|
|
4153
|
-
async getProfiles(
|
|
4154
|
-
const response = await this.get(`/import-export-profile
|
|
4155
|
-
query: { limit, page, query },
|
|
4146
|
+
async getProfiles(query) {
|
|
4147
|
+
const response = await this.get(`/import-export-profile` + buildQuery(query), {
|
|
4156
4148
|
headers: { Accept: "application/json" }
|
|
4157
4149
|
});
|
|
4158
4150
|
if (response.statusCode === 200)
|
|
@@ -4191,8 +4183,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
4191
4183
|
/**
|
|
4192
4184
|
* @throws {Error} if the request failed
|
|
4193
4185
|
*/
|
|
4194
|
-
async getProfile(id) {
|
|
4195
|
-
const response = await this.get(`/import-export-profile/${id}
|
|
4186
|
+
async getProfile(id, query) {
|
|
4187
|
+
const response = await this.get(`/import-export-profile/${id}` + buildQuery(query), {
|
|
4196
4188
|
headers: { Accept: "application/json" }
|
|
4197
4189
|
});
|
|
4198
4190
|
if (response.statusCode === 200)
|
|
@@ -4240,9 +4232,8 @@ class IntegrationClient extends Client {
|
|
|
4240
4232
|
/**
|
|
4241
4233
|
* @throws {Error} if the request failed
|
|
4242
4234
|
*/
|
|
4243
|
-
async getIntegrations(
|
|
4244
|
-
const response = await this.get(`/integration
|
|
4245
|
-
query: { limit, page, query },
|
|
4235
|
+
async getIntegrations(query) {
|
|
4236
|
+
const response = await this.get(`/integration` + buildQuery(query), {
|
|
4246
4237
|
headers: { Accept: "application/json" }
|
|
4247
4238
|
});
|
|
4248
4239
|
if (response.statusCode === 200)
|
|
@@ -4283,8 +4274,8 @@ class IntegrationClient extends Client {
|
|
|
4283
4274
|
/**
|
|
4284
4275
|
* @throws {Error} if the request failed
|
|
4285
4276
|
*/
|
|
4286
|
-
async getIntegration(id) {
|
|
4287
|
-
const response = await this.get(`/integration/${id}
|
|
4277
|
+
async getIntegration(id, query) {
|
|
4278
|
+
const response = await this.get(`/integration/${id}` + buildQuery(query), {
|
|
4288
4279
|
headers: { Accept: "application/json" }
|
|
4289
4280
|
});
|
|
4290
4281
|
if (response.statusCode === 200)
|
|
@@ -4339,9 +4330,8 @@ class LocaleClient extends Client {
|
|
|
4339
4330
|
/**
|
|
4340
4331
|
* @throws {Error} if the request failed
|
|
4341
4332
|
*/
|
|
4342
|
-
async getLocales(
|
|
4343
|
-
const response = await this.get(`/locale
|
|
4344
|
-
query: { limit, page, query },
|
|
4333
|
+
async getLocales(query) {
|
|
4334
|
+
const response = await this.get(`/locale` + buildQuery(query), {
|
|
4345
4335
|
headers: { Accept: "application/json" }
|
|
4346
4336
|
});
|
|
4347
4337
|
if (response.statusCode === 200)
|
|
@@ -4380,8 +4370,10 @@ class LocaleClient extends Client {
|
|
|
4380
4370
|
/**
|
|
4381
4371
|
* @throws {Error} if the request failed
|
|
4382
4372
|
*/
|
|
4383
|
-
async getLocale(id) {
|
|
4384
|
-
const response = await this.get(`/locale/${id}
|
|
4373
|
+
async getLocale(id, query) {
|
|
4374
|
+
const response = await this.get(`/locale/${id}` + buildQuery(query), {
|
|
4375
|
+
headers: { Accept: "application/json" }
|
|
4376
|
+
});
|
|
4385
4377
|
if (response.statusCode === 200)
|
|
4386
4378
|
return response.body.data;
|
|
4387
4379
|
throw new Error(`Failed to fetch locale: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -4423,9 +4415,8 @@ class LocaleClient extends Client {
|
|
|
4423
4415
|
/**
|
|
4424
4416
|
* @throws {Error} if the request failed
|
|
4425
4417
|
*/
|
|
4426
|
-
async getLanguages(
|
|
4427
|
-
const response = await this.get(`/language
|
|
4428
|
-
query: { limit, page, query },
|
|
4418
|
+
async getLanguages(query) {
|
|
4419
|
+
const response = await this.get(`/language` + buildQuery(query), {
|
|
4429
4420
|
headers: { Accept: "application/json" }
|
|
4430
4421
|
});
|
|
4431
4422
|
if (response.statusCode === 200)
|
|
@@ -4464,8 +4455,10 @@ class LocaleClient extends Client {
|
|
|
4464
4455
|
/**
|
|
4465
4456
|
* @throws {Error} if the request failed
|
|
4466
4457
|
*/
|
|
4467
|
-
async getLanguage(id) {
|
|
4468
|
-
const response = await this.get(`/language/${id}
|
|
4458
|
+
async getLanguage(id, query) {
|
|
4459
|
+
const response = await this.get(`/language/${id}` + buildQuery(query), {
|
|
4460
|
+
headers: { Accept: "application/json" }
|
|
4461
|
+
});
|
|
4469
4462
|
if (response.statusCode === 200)
|
|
4470
4463
|
return response.body.data;
|
|
4471
4464
|
throw new Error(`Failed to fetch language: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -4546,9 +4539,8 @@ class MailClient extends Client {
|
|
|
4546
4539
|
/**
|
|
4547
4540
|
* @throws {Error} if the request failed
|
|
4548
4541
|
*/
|
|
4549
|
-
async getHeaderFooters(
|
|
4550
|
-
const response = await this.get(`/header-footer
|
|
4551
|
-
query: { limit, page, query },
|
|
4542
|
+
async getHeaderFooters(query) {
|
|
4543
|
+
const response = await this.get(`/header-footer` + buildQuery(query), {
|
|
4552
4544
|
headers: { Accept: "application/json" }
|
|
4553
4545
|
});
|
|
4554
4546
|
if (response.statusCode === 200)
|
|
@@ -4589,8 +4581,8 @@ class MailClient extends Client {
|
|
|
4589
4581
|
/**
|
|
4590
4582
|
* @throws {Error} if the request failed
|
|
4591
4583
|
*/
|
|
4592
|
-
async getHeaderFooter(id) {
|
|
4593
|
-
const response = await this.get(`/header-footer/${id}
|
|
4584
|
+
async getHeaderFooter(id, query) {
|
|
4585
|
+
const response = await this.get(`/header-footer/${id}` + buildQuery(query), {
|
|
4594
4586
|
headers: { Accept: "application/json" }
|
|
4595
4587
|
});
|
|
4596
4588
|
if (response.statusCode === 200)
|
|
@@ -4642,9 +4634,8 @@ class MailClient extends Client {
|
|
|
4642
4634
|
/**
|
|
4643
4635
|
* @throws {Error} if the request failed
|
|
4644
4636
|
*/
|
|
4645
|
-
async getTemplates(
|
|
4646
|
-
const response = await this.get(`/template
|
|
4647
|
-
query: { limit, page, query },
|
|
4637
|
+
async getTemplates(query) {
|
|
4638
|
+
const response = await this.get(`/template` + buildQuery(query), {
|
|
4648
4639
|
headers: { Accept: "application/json" }
|
|
4649
4640
|
});
|
|
4650
4641
|
if (response.statusCode === 200)
|
|
@@ -4683,8 +4674,10 @@ class MailClient extends Client {
|
|
|
4683
4674
|
/**
|
|
4684
4675
|
* @throws {Error} if the request failed
|
|
4685
4676
|
*/
|
|
4686
|
-
async getTemplate(id) {
|
|
4687
|
-
const response = await this.get(`/template/${id}
|
|
4677
|
+
async getTemplate(id, query) {
|
|
4678
|
+
const response = await this.get(`/template/${id}` + buildQuery(query), {
|
|
4679
|
+
headers: { Accept: "application/json" }
|
|
4680
|
+
});
|
|
4688
4681
|
if (response.statusCode === 200)
|
|
4689
4682
|
return response.body.data;
|
|
4690
4683
|
throw new Error(`Failed to fetch template: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -4728,9 +4721,8 @@ class MailClient extends Client {
|
|
|
4728
4721
|
/**
|
|
4729
4722
|
* @throws {Error} if the request failed
|
|
4730
4723
|
*/
|
|
4731
|
-
async getTemplateTypes(
|
|
4732
|
-
const response = await this.get(`/template-type
|
|
4733
|
-
query: { limit, page, query },
|
|
4724
|
+
async getTemplateTypes(query) {
|
|
4725
|
+
const response = await this.get(`/template-type` + buildQuery(query), {
|
|
4734
4726
|
headers: { Accept: "application/json" }
|
|
4735
4727
|
});
|
|
4736
4728
|
if (response.statusCode === 200)
|
|
@@ -4771,8 +4763,8 @@ class MailClient extends Client {
|
|
|
4771
4763
|
/**
|
|
4772
4764
|
* @throws {Error} if the request failed
|
|
4773
4765
|
*/
|
|
4774
|
-
async getTemplateType(id) {
|
|
4775
|
-
const response = await this.get(`/template-type/${id}
|
|
4766
|
+
async getTemplateType(id, query) {
|
|
4767
|
+
const response = await this.get(`/template-type/${id}` + buildQuery(query), {
|
|
4776
4768
|
headers: { Accept: "application/json" }
|
|
4777
4769
|
});
|
|
4778
4770
|
if (response.statusCode === 200)
|
|
@@ -4856,9 +4848,8 @@ class MediaClient extends Client {
|
|
|
4856
4848
|
/**
|
|
4857
4849
|
* @throws {Error} if the request failed
|
|
4858
4850
|
*/
|
|
4859
|
-
async getMediaList(
|
|
4860
|
-
const response = await this.get(`/media
|
|
4861
|
-
query: { limit, page, query },
|
|
4851
|
+
async getMediaList(query) {
|
|
4852
|
+
const response = await this.get(`/media` + buildQuery(query), {
|
|
4862
4853
|
headers: { Accept: "application/json" }
|
|
4863
4854
|
});
|
|
4864
4855
|
if (response.statusCode === 200)
|
|
@@ -4893,8 +4884,10 @@ class MediaClient extends Client {
|
|
|
4893
4884
|
/**
|
|
4894
4885
|
* @throws {Error} if the request failed
|
|
4895
4886
|
*/
|
|
4896
|
-
async getMedia(id) {
|
|
4897
|
-
const response = await this.get(`/media/${id}
|
|
4887
|
+
async getMedia(id, query) {
|
|
4888
|
+
const response = await this.get(`/media/${id}` + buildQuery(query), {
|
|
4889
|
+
headers: { Accept: "application/json" }
|
|
4890
|
+
});
|
|
4898
4891
|
if (response.statusCode === 200)
|
|
4899
4892
|
return response.body.data;
|
|
4900
4893
|
throw new Error(`Failed to fetch media: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -4936,9 +4929,8 @@ class MediaClient extends Client {
|
|
|
4936
4929
|
/**
|
|
4937
4930
|
* @throws {Error} if the request failed
|
|
4938
4931
|
*/
|
|
4939
|
-
async getDefaultFolders(
|
|
4940
|
-
const response = await this.get(`/media-default-folder
|
|
4941
|
-
query: { limit, page, query },
|
|
4932
|
+
async getDefaultFolders(query) {
|
|
4933
|
+
const response = await this.get(`/media-default-folder` + buildQuery(query), {
|
|
4942
4934
|
headers: { Accept: "application/json" }
|
|
4943
4935
|
});
|
|
4944
4936
|
if (response.statusCode === 200)
|
|
@@ -4979,8 +4971,8 @@ class MediaClient extends Client {
|
|
|
4979
4971
|
/**
|
|
4980
4972
|
* @throws {Error} if the request failed
|
|
4981
4973
|
*/
|
|
4982
|
-
async getDefaultFolder(id) {
|
|
4983
|
-
const response = await this.get(`/media-default-folder/${id}
|
|
4974
|
+
async getDefaultFolder(id, query) {
|
|
4975
|
+
const response = await this.get(`/media-default-folder/${id}` + buildQuery(query), {
|
|
4984
4976
|
headers: { Accept: "application/json" }
|
|
4985
4977
|
});
|
|
4986
4978
|
if (response.statusCode === 200)
|
|
@@ -5032,9 +5024,8 @@ class MediaClient extends Client {
|
|
|
5032
5024
|
/**
|
|
5033
5025
|
* @throws {Error} if the request failed
|
|
5034
5026
|
*/
|
|
5035
|
-
async getFolders(
|
|
5036
|
-
const response = await this.get(`/media-folder
|
|
5037
|
-
query: { limit, page, query },
|
|
5027
|
+
async getFolders(query) {
|
|
5028
|
+
const response = await this.get(`/media-folder` + buildQuery(query), {
|
|
5038
5029
|
headers: { Accept: "application/json" }
|
|
5039
5030
|
});
|
|
5040
5031
|
if (response.statusCode === 200)
|
|
@@ -5073,8 +5064,8 @@ class MediaClient extends Client {
|
|
|
5073
5064
|
/**
|
|
5074
5065
|
* @throws {Error} if the request failed
|
|
5075
5066
|
*/
|
|
5076
|
-
async getFolder(id) {
|
|
5077
|
-
const response = await this.get(`/media-folder/${id}
|
|
5067
|
+
async getFolder(id, query) {
|
|
5068
|
+
const response = await this.get(`/media-folder/${id}` + buildQuery(query), {
|
|
5078
5069
|
headers: { Accept: "application/json" }
|
|
5079
5070
|
});
|
|
5080
5071
|
if (response.statusCode === 200)
|
|
@@ -5118,9 +5109,8 @@ class MediaClient extends Client {
|
|
|
5118
5109
|
/**
|
|
5119
5110
|
* @throws {Error} if the request failed
|
|
5120
5111
|
*/
|
|
5121
|
-
async getFolderConfigs(
|
|
5122
|
-
const response = await this.get(`/media-folder-configuration
|
|
5123
|
-
query: { limit, page, query },
|
|
5112
|
+
async getFolderConfigs(query) {
|
|
5113
|
+
const response = await this.get(`/media-folder-configuration` + buildQuery(query), {
|
|
5124
5114
|
headers: { Accept: "application/json" }
|
|
5125
5115
|
});
|
|
5126
5116
|
if (response.statusCode === 200)
|
|
@@ -5161,8 +5151,8 @@ class MediaClient extends Client {
|
|
|
5161
5151
|
/**
|
|
5162
5152
|
* @throws {Error} if the request failed
|
|
5163
5153
|
*/
|
|
5164
|
-
async getFolderConfig(id) {
|
|
5165
|
-
const response = await this.get(`/media-folder-configuration/${id}
|
|
5154
|
+
async getFolderConfig(id, query) {
|
|
5155
|
+
const response = await this.get(`/media-folder-configuration/${id}` + buildQuery(query), {
|
|
5166
5156
|
headers: { Accept: "application/json" }
|
|
5167
5157
|
});
|
|
5168
5158
|
if (response.statusCode === 200)
|
|
@@ -5214,9 +5204,8 @@ class MediaClient extends Client {
|
|
|
5214
5204
|
/**
|
|
5215
5205
|
* @throws {Error} if the request failed
|
|
5216
5206
|
*/
|
|
5217
|
-
async getThumbnails(
|
|
5218
|
-
const response = await this.get(`/media-thumbnail
|
|
5219
|
-
query: { limit, page, query },
|
|
5207
|
+
async getThumbnails(query) {
|
|
5208
|
+
const response = await this.get(`/media-thumbnail` + buildQuery(query), {
|
|
5220
5209
|
headers: { Accept: "application/json" }
|
|
5221
5210
|
});
|
|
5222
5211
|
if (response.statusCode === 200)
|
|
@@ -5255,8 +5244,8 @@ class MediaClient extends Client {
|
|
|
5255
5244
|
/**
|
|
5256
5245
|
* @throws {Error} if the request failed
|
|
5257
5246
|
*/
|
|
5258
|
-
async getThumbnail(id) {
|
|
5259
|
-
const response = await this.get(`/media-thumbnail/${id}
|
|
5247
|
+
async getThumbnail(id, query) {
|
|
5248
|
+
const response = await this.get(`/media-thumbnail/${id}` + buildQuery(query), {
|
|
5260
5249
|
headers: { Accept: "application/json" }
|
|
5261
5250
|
});
|
|
5262
5251
|
if (response.statusCode === 200)
|
|
@@ -5302,9 +5291,8 @@ class MediaClient extends Client {
|
|
|
5302
5291
|
/**
|
|
5303
5292
|
* @throws {Error} if the request failed
|
|
5304
5293
|
*/
|
|
5305
|
-
async getThumbnailSizes(
|
|
5306
|
-
const response = await this.get(`/media-thumbnail-size
|
|
5307
|
-
query: { limit, page, query },
|
|
5294
|
+
async getThumbnailSizes(query) {
|
|
5295
|
+
const response = await this.get(`/media-thumbnail-size` + buildQuery(query), {
|
|
5308
5296
|
headers: { Accept: "application/json" }
|
|
5309
5297
|
});
|
|
5310
5298
|
if (response.statusCode === 200)
|
|
@@ -5345,8 +5333,8 @@ class MediaClient extends Client {
|
|
|
5345
5333
|
/**
|
|
5346
5334
|
* @throws {Error} if the request failed
|
|
5347
5335
|
*/
|
|
5348
|
-
async getThumbnailSize(id) {
|
|
5349
|
-
const response = await this.get(`/media-thumbnail-size/${id}
|
|
5336
|
+
async getThumbnailSize(id, query) {
|
|
5337
|
+
const response = await this.get(`/media-thumbnail-size/${id}` + buildQuery(query), {
|
|
5350
5338
|
headers: { Accept: "application/json" }
|
|
5351
5339
|
});
|
|
5352
5340
|
if (response.statusCode === 200)
|
|
@@ -5400,9 +5388,8 @@ let NewsletterClient$1 = class NewsletterClient extends Client {
|
|
|
5400
5388
|
/**
|
|
5401
5389
|
* @throws {Error} if the request failed
|
|
5402
5390
|
*/
|
|
5403
|
-
async getRecipients(
|
|
5404
|
-
const response = await this.get(`/newsletter-recipient
|
|
5405
|
-
query: { limit, page, query },
|
|
5391
|
+
async getRecipients(query) {
|
|
5392
|
+
const response = await this.get(`/newsletter-recipient` + buildQuery(query), {
|
|
5406
5393
|
headers: { Accept: "application/json" }
|
|
5407
5394
|
});
|
|
5408
5395
|
if (response.statusCode === 200)
|
|
@@ -5441,8 +5428,8 @@ let NewsletterClient$1 = class NewsletterClient extends Client {
|
|
|
5441
5428
|
/**
|
|
5442
5429
|
* @throws {Error} if the request failed
|
|
5443
5430
|
*/
|
|
5444
|
-
async getRecipient(id) {
|
|
5445
|
-
const response = await this.get(`/newsletter-recipient/${id}
|
|
5431
|
+
async getRecipient(id, query) {
|
|
5432
|
+
const response = await this.get(`/newsletter-recipient/${id}` + buildQuery(query), {
|
|
5446
5433
|
headers: { Accept: "application/json" }
|
|
5447
5434
|
});
|
|
5448
5435
|
if (response.statusCode === 200)
|
|
@@ -5491,9 +5478,8 @@ class NumberRangeClient extends Client {
|
|
|
5491
5478
|
/**
|
|
5492
5479
|
* @throws {Error} if the request failed
|
|
5493
5480
|
*/
|
|
5494
|
-
async getRanges(
|
|
5495
|
-
const response = await this.get(`/number-range
|
|
5496
|
-
query: { limit, page, query },
|
|
5481
|
+
async getRanges(query) {
|
|
5482
|
+
const response = await this.get(`/number-range` + buildQuery(query), {
|
|
5497
5483
|
headers: { Accept: "application/json" }
|
|
5498
5484
|
});
|
|
5499
5485
|
if (response.statusCode === 200)
|
|
@@ -5530,8 +5516,8 @@ class NumberRangeClient extends Client {
|
|
|
5530
5516
|
/**
|
|
5531
5517
|
* @throws {Error} if the request failed
|
|
5532
5518
|
*/
|
|
5533
|
-
async getRange(id) {
|
|
5534
|
-
const response = await this.get(`/number-range/${id}
|
|
5519
|
+
async getRange(id, query) {
|
|
5520
|
+
const response = await this.get(`/number-range/${id}` + buildQuery(query), {
|
|
5535
5521
|
headers: { Accept: "application/json" }
|
|
5536
5522
|
});
|
|
5537
5523
|
if (response.statusCode === 200)
|
|
@@ -5575,9 +5561,8 @@ class NumberRangeClient extends Client {
|
|
|
5575
5561
|
/**
|
|
5576
5562
|
* @throws {Error} if the request failed
|
|
5577
5563
|
*/
|
|
5578
|
-
async getSalesChannels(
|
|
5579
|
-
const response = await this.get(`/number-range-sales-channel
|
|
5580
|
-
query: { limit, page, query },
|
|
5564
|
+
async getSalesChannels(query) {
|
|
5565
|
+
const response = await this.get(`/number-range-sales-channel` + buildQuery(query), {
|
|
5581
5566
|
headers: { Accept: "application/json" }
|
|
5582
5567
|
});
|
|
5583
5568
|
if (response.statusCode === 200)
|
|
@@ -5618,8 +5603,8 @@ class NumberRangeClient extends Client {
|
|
|
5618
5603
|
/**
|
|
5619
5604
|
* @throws {Error} if the request failed
|
|
5620
5605
|
*/
|
|
5621
|
-
async getSalesChannel(id) {
|
|
5622
|
-
const response = await this.get(`/number-range-sales-channel/${id}
|
|
5606
|
+
async getSalesChannel(id, query) {
|
|
5607
|
+
const response = await this.get(`/number-range-sales-channel/${id}` + buildQuery(query), {
|
|
5623
5608
|
headers: { Accept: "application/json" }
|
|
5624
5609
|
});
|
|
5625
5610
|
if (response.statusCode === 200)
|
|
@@ -5671,9 +5656,8 @@ class NumberRangeClient extends Client {
|
|
|
5671
5656
|
/**
|
|
5672
5657
|
* @throws {Error} if the request failed
|
|
5673
5658
|
*/
|
|
5674
|
-
async getStates(
|
|
5675
|
-
const response = await this.get(`/number-range-state
|
|
5676
|
-
query: { limit, page, query },
|
|
5659
|
+
async getStates(query) {
|
|
5660
|
+
const response = await this.get(`/number-range-state` + buildQuery(query), {
|
|
5677
5661
|
headers: { Accept: "application/json" }
|
|
5678
5662
|
});
|
|
5679
5663
|
if (response.statusCode === 200)
|
|
@@ -5710,8 +5694,8 @@ class NumberRangeClient extends Client {
|
|
|
5710
5694
|
/**
|
|
5711
5695
|
* @throws {Error} if the request failed
|
|
5712
5696
|
*/
|
|
5713
|
-
async getState(id) {
|
|
5714
|
-
const response = await this.get(`/number-range-state/${id}
|
|
5697
|
+
async getState(id, query) {
|
|
5698
|
+
const response = await this.get(`/number-range-state/${id}` + buildQuery(query), {
|
|
5715
5699
|
headers: { Accept: "application/json" }
|
|
5716
5700
|
});
|
|
5717
5701
|
if (response.statusCode === 200)
|
|
@@ -5755,9 +5739,8 @@ class NumberRangeClient extends Client {
|
|
|
5755
5739
|
/**
|
|
5756
5740
|
* @throws {Error} if the request failed
|
|
5757
5741
|
*/
|
|
5758
|
-
async getTypes(
|
|
5759
|
-
const response = await this.get(`/number-range-type
|
|
5760
|
-
query: { limit, page, query },
|
|
5742
|
+
async getTypes(query) {
|
|
5743
|
+
const response = await this.get(`/number-range-type` + buildQuery(query), {
|
|
5761
5744
|
headers: { Accept: "application/json" }
|
|
5762
5745
|
});
|
|
5763
5746
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -5791,8 +5774,8 @@ class NumberRangeClient extends Client {
|
|
|
5791
5774
|
/**
|
|
5792
5775
|
* @throws {Error} if the request failed
|
|
5793
5776
|
*/
|
|
5794
|
-
async getType(id) {
|
|
5795
|
-
const response = await this.get(`/number-range-type/${id}
|
|
5777
|
+
async getType(id, query) {
|
|
5778
|
+
const response = await this.get(`/number-range-type/${id}` + buildQuery(query), {
|
|
5796
5779
|
headers: { Accept: "application/json" }
|
|
5797
5780
|
});
|
|
5798
5781
|
if (response.statusCode === 200)
|
|
@@ -5943,9 +5926,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
5943
5926
|
/**
|
|
5944
5927
|
* @throws {Error} if the request failed
|
|
5945
5928
|
*/
|
|
5946
|
-
async getOrders(
|
|
5947
|
-
const response = await this.get(`/order
|
|
5948
|
-
query: { limit, page, query },
|
|
5929
|
+
async getOrders(query) {
|
|
5930
|
+
const response = await this.get(`/order` + buildQuery(query), {
|
|
5949
5931
|
headers: { Accept: "application/json" }
|
|
5950
5932
|
});
|
|
5951
5933
|
if (response.statusCode === 200)
|
|
@@ -5982,8 +5964,10 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
5982
5964
|
/**
|
|
5983
5965
|
* @throws {Error} if the request failed
|
|
5984
5966
|
*/
|
|
5985
|
-
async getOrder(id) {
|
|
5986
|
-
const response = await this.get(`/order/${id}
|
|
5967
|
+
async getOrder(id, query) {
|
|
5968
|
+
const response = await this.get(`/order/${id}` + buildQuery(query), {
|
|
5969
|
+
headers: { Accept: "application/json" }
|
|
5970
|
+
});
|
|
5987
5971
|
if (response.statusCode === 200)
|
|
5988
5972
|
return response.body.data;
|
|
5989
5973
|
throw new Error(`Failed to fetch order: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -6025,9 +6009,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6025
6009
|
/**
|
|
6026
6010
|
* @throws {Error} if the request failed
|
|
6027
6011
|
*/
|
|
6028
|
-
async getAddresses(
|
|
6029
|
-
const response = await this.get(`/order-address
|
|
6030
|
-
query: { limit, page, query },
|
|
6012
|
+
async getAddresses(query) {
|
|
6013
|
+
const response = await this.get(`/order-address` + buildQuery(query), {
|
|
6031
6014
|
headers: { Accept: "application/json" }
|
|
6032
6015
|
});
|
|
6033
6016
|
if (response.statusCode === 200)
|
|
@@ -6066,8 +6049,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6066
6049
|
/**
|
|
6067
6050
|
* @throws {Error} if the request failed
|
|
6068
6051
|
*/
|
|
6069
|
-
async getAddress(id) {
|
|
6070
|
-
const response = await this.get(`/order-address/${id}
|
|
6052
|
+
async getAddress(id, query) {
|
|
6053
|
+
const response = await this.get(`/order-address/${id}` + buildQuery(query), {
|
|
6071
6054
|
headers: { Accept: "application/json" }
|
|
6072
6055
|
});
|
|
6073
6056
|
if (response.statusCode === 200)
|
|
@@ -6113,9 +6096,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6113
6096
|
/**
|
|
6114
6097
|
* @throws {Error} if the request failed
|
|
6115
6098
|
*/
|
|
6116
|
-
async getCustomers(
|
|
6117
|
-
const response = await this.get(`/order-customer
|
|
6118
|
-
query: { limit, page, query },
|
|
6099
|
+
async getCustomers(query) {
|
|
6100
|
+
const response = await this.get(`/order-customer` + buildQuery(query), {
|
|
6119
6101
|
headers: { Accept: "application/json" }
|
|
6120
6102
|
});
|
|
6121
6103
|
if (response.statusCode === 200)
|
|
@@ -6154,8 +6136,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6154
6136
|
/**
|
|
6155
6137
|
* @throws {Error} if the request failed
|
|
6156
6138
|
*/
|
|
6157
|
-
async getCustomer(id) {
|
|
6158
|
-
const response = await this.get(`/order-customer/${id}
|
|
6139
|
+
async getCustomer(id, query) {
|
|
6140
|
+
const response = await this.get(`/order-customer/${id}` + buildQuery(query), {
|
|
6159
6141
|
headers: { Accept: "application/json" }
|
|
6160
6142
|
});
|
|
6161
6143
|
if (response.statusCode === 200)
|
|
@@ -6201,9 +6183,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6201
6183
|
/**
|
|
6202
6184
|
* @throws {Error} if the request failed
|
|
6203
6185
|
*/
|
|
6204
|
-
async getDeliveries(
|
|
6205
|
-
const response = await this.get(`/order-delivery
|
|
6206
|
-
query: { limit, page, query },
|
|
6186
|
+
async getDeliveries(query) {
|
|
6187
|
+
const response = await this.get(`/order-delivery` + buildQuery(query), {
|
|
6207
6188
|
headers: { Accept: "application/json" }
|
|
6208
6189
|
});
|
|
6209
6190
|
if (response.statusCode === 200)
|
|
@@ -6242,8 +6223,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6242
6223
|
/**
|
|
6243
6224
|
* @throws {Error} if the request failed
|
|
6244
6225
|
*/
|
|
6245
|
-
async getDelivery(id) {
|
|
6246
|
-
const response = await this.get(`/order-delivery/${id}
|
|
6226
|
+
async getDelivery(id, query) {
|
|
6227
|
+
const response = await this.get(`/order-delivery/${id}` + buildQuery(query), {
|
|
6247
6228
|
headers: { Accept: "application/json" }
|
|
6248
6229
|
});
|
|
6249
6230
|
if (response.statusCode === 200)
|
|
@@ -6289,9 +6270,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6289
6270
|
/**
|
|
6290
6271
|
* @throws {Error} if the request failed
|
|
6291
6272
|
*/
|
|
6292
|
-
async getDeliveryPositions(
|
|
6293
|
-
const response = await this.get(`/order-delivery-position
|
|
6294
|
-
query: { limit, page, query },
|
|
6273
|
+
async getDeliveryPositions(query) {
|
|
6274
|
+
const response = await this.get(`/order-delivery-position` + buildQuery(query), {
|
|
6295
6275
|
headers: { Accept: "application/json" }
|
|
6296
6276
|
});
|
|
6297
6277
|
if (response.statusCode === 200)
|
|
@@ -6332,8 +6312,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6332
6312
|
/**
|
|
6333
6313
|
* @throws {Error} if the request failed
|
|
6334
6314
|
*/
|
|
6335
|
-
async getDeliveryPosition(id) {
|
|
6336
|
-
const response = await this.get(`/order-delivery-position/${id}
|
|
6315
|
+
async getDeliveryPosition(id, query) {
|
|
6316
|
+
const response = await this.get(`/order-delivery-position/${id}` + buildQuery(query), {
|
|
6337
6317
|
headers: { Accept: "application/json" }
|
|
6338
6318
|
});
|
|
6339
6319
|
if (response.statusCode === 200)
|
|
@@ -6385,9 +6365,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6385
6365
|
/**
|
|
6386
6366
|
* @throws {Error} if the request failed
|
|
6387
6367
|
*/
|
|
6388
|
-
async getLineItems(
|
|
6389
|
-
const response = await this.get(`/order-line-item
|
|
6390
|
-
query: { limit, page, query },
|
|
6368
|
+
async getLineItems(query) {
|
|
6369
|
+
const response = await this.get(`/order-line-item` + buildQuery(query), {
|
|
6391
6370
|
headers: { Accept: "application/json" }
|
|
6392
6371
|
});
|
|
6393
6372
|
if (response.statusCode === 200)
|
|
@@ -6426,8 +6405,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6426
6405
|
/**
|
|
6427
6406
|
* @throws {Error} if the request failed
|
|
6428
6407
|
*/
|
|
6429
|
-
async getLineItem(id) {
|
|
6430
|
-
const response = await this.get(`/order-line-item/${id}
|
|
6408
|
+
async getLineItem(id, query) {
|
|
6409
|
+
const response = await this.get(`/order-line-item/${id}` + buildQuery(query), {
|
|
6431
6410
|
headers: { Accept: "application/json" }
|
|
6432
6411
|
});
|
|
6433
6412
|
if (response.statusCode === 200)
|
|
@@ -6473,9 +6452,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6473
6452
|
/**
|
|
6474
6453
|
* @throws {Error} if the request failed
|
|
6475
6454
|
*/
|
|
6476
|
-
async getLineItemDownloads(
|
|
6477
|
-
const response = await this.get(`/order-line-item-download
|
|
6478
|
-
query: { limit, page, query },
|
|
6455
|
+
async getLineItemDownloads(query) {
|
|
6456
|
+
const response = await this.get(`/order-line-item-download` + buildQuery(query), {
|
|
6479
6457
|
headers: { Accept: "application/json" }
|
|
6480
6458
|
});
|
|
6481
6459
|
if (response.statusCode === 200)
|
|
@@ -6516,8 +6494,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6516
6494
|
/**
|
|
6517
6495
|
* @throws {Error} if the request failed
|
|
6518
6496
|
*/
|
|
6519
|
-
async getLineItemDownload(id) {
|
|
6520
|
-
const response = await this.get(`/order-line-item-download/${id}
|
|
6497
|
+
async getLineItemDownload(id, query) {
|
|
6498
|
+
const response = await this.get(`/order-line-item-download/${id}` + buildQuery(query), {
|
|
6521
6499
|
headers: { Accept: "application/json" }
|
|
6522
6500
|
});
|
|
6523
6501
|
if (response.statusCode === 200)
|
|
@@ -6569,9 +6547,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6569
6547
|
/**
|
|
6570
6548
|
* @throws {Error} if the request failed
|
|
6571
6549
|
*/
|
|
6572
|
-
async getTransactions(
|
|
6573
|
-
const response = await this.get(`/order-transaction
|
|
6574
|
-
query: { limit, page, query },
|
|
6550
|
+
async getTransactions(query) {
|
|
6551
|
+
const response = await this.get(`/order-transaction` + buildQuery(query), {
|
|
6575
6552
|
headers: { Accept: "application/json" }
|
|
6576
6553
|
});
|
|
6577
6554
|
if (response.statusCode === 200)
|
|
@@ -6612,8 +6589,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6612
6589
|
/**
|
|
6613
6590
|
* @throws {Error} if the request failed
|
|
6614
6591
|
*/
|
|
6615
|
-
async getTransaction(id) {
|
|
6616
|
-
const response = await this.get(`/order-transaction/${id}
|
|
6592
|
+
async getTransaction(id, query) {
|
|
6593
|
+
const response = await this.get(`/order-transaction/${id}` + buildQuery(query), {
|
|
6617
6594
|
headers: { Accept: "application/json" }
|
|
6618
6595
|
});
|
|
6619
6596
|
if (response.statusCode === 200)
|
|
@@ -6665,9 +6642,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6665
6642
|
/**
|
|
6666
6643
|
* @throws {Error} if the request failed
|
|
6667
6644
|
*/
|
|
6668
|
-
async getTransactionCaptures(
|
|
6669
|
-
const response = await this.get(`/order-transaction-capture
|
|
6670
|
-
query: { limit, page, query },
|
|
6645
|
+
async getTransactionCaptures(query) {
|
|
6646
|
+
const response = await this.get(`/order-transaction-capture` + buildQuery(query), {
|
|
6671
6647
|
headers: { Accept: "application/json" }
|
|
6672
6648
|
});
|
|
6673
6649
|
if (response.statusCode === 200)
|
|
@@ -6708,8 +6684,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6708
6684
|
/**
|
|
6709
6685
|
* @throws {Error} if the request failed
|
|
6710
6686
|
*/
|
|
6711
|
-
async getTransactionCapture(id) {
|
|
6712
|
-
const response = await this.get(`/order-transaction-capture/${id}
|
|
6687
|
+
async getTransactionCapture(id, query) {
|
|
6688
|
+
const response = await this.get(`/order-transaction-capture/${id}` + buildQuery(query), {
|
|
6713
6689
|
headers: { Accept: "application/json" }
|
|
6714
6690
|
});
|
|
6715
6691
|
if (response.statusCode === 200)
|
|
@@ -6761,9 +6737,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6761
6737
|
/**
|
|
6762
6738
|
* @throws {Error} if the request failed
|
|
6763
6739
|
*/
|
|
6764
|
-
async getTransactionCaptureRefunds(
|
|
6765
|
-
const response = await this.get(`/order-transaction-capture-refund
|
|
6766
|
-
query: { limit, page, query },
|
|
6740
|
+
async getTransactionCaptureRefunds(query) {
|
|
6741
|
+
const response = await this.get(`/order-transaction-capture-refund` + buildQuery(query), {
|
|
6767
6742
|
headers: { Accept: "application/json" }
|
|
6768
6743
|
});
|
|
6769
6744
|
if (response.statusCode === 200)
|
|
@@ -6804,8 +6779,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6804
6779
|
/**
|
|
6805
6780
|
* @throws {Error} if the request failed
|
|
6806
6781
|
*/
|
|
6807
|
-
async getTransactionCaptureRefund(id) {
|
|
6808
|
-
const response = await this.get(`/order-transaction-capture-refund/${id}
|
|
6782
|
+
async getTransactionCaptureRefund(id, query) {
|
|
6783
|
+
const response = await this.get(`/order-transaction-capture-refund/${id}` + buildQuery(query), {
|
|
6809
6784
|
headers: { Accept: "application/json" }
|
|
6810
6785
|
});
|
|
6811
6786
|
if (response.statusCode === 200)
|
|
@@ -6857,11 +6832,13 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6857
6832
|
/**
|
|
6858
6833
|
* @throws {Error} if the request failed
|
|
6859
6834
|
*/
|
|
6860
|
-
async getTransactionCaptureRefundPositions(
|
|
6861
|
-
const response = await this.get(
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6835
|
+
async getTransactionCaptureRefundPositions(query) {
|
|
6836
|
+
const response = await this.get(
|
|
6837
|
+
`/order-transaction-capture-refund-position` + buildQuery(query),
|
|
6838
|
+
{
|
|
6839
|
+
headers: { Accept: "application/json" }
|
|
6840
|
+
}
|
|
6841
|
+
);
|
|
6865
6842
|
if (response.statusCode === 200)
|
|
6866
6843
|
return response.body.data;
|
|
6867
6844
|
throw new Error(
|
|
@@ -6900,10 +6877,13 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6900
6877
|
/**
|
|
6901
6878
|
* @throws {Error} if the request failed
|
|
6902
6879
|
*/
|
|
6903
|
-
async getTransactionCaptureRefundPosition(id) {
|
|
6904
|
-
const response = await this.get(
|
|
6905
|
-
|
|
6906
|
-
|
|
6880
|
+
async getTransactionCaptureRefundPosition(id, query) {
|
|
6881
|
+
const response = await this.get(
|
|
6882
|
+
`/order-transaction-capture-refund-position/${id}` + buildQuery(query),
|
|
6883
|
+
{
|
|
6884
|
+
headers: { Accept: "application/json" }
|
|
6885
|
+
}
|
|
6886
|
+
);
|
|
6907
6887
|
if (response.statusCode === 200)
|
|
6908
6888
|
return response.body.data;
|
|
6909
6889
|
throw new Error(
|
|
@@ -6955,9 +6935,8 @@ class PaymentMethodClient extends Client {
|
|
|
6955
6935
|
/**
|
|
6956
6936
|
* @throws {Error} if the request failed
|
|
6957
6937
|
*/
|
|
6958
|
-
async getPaymentMethods(
|
|
6959
|
-
const response = await this.get(`/payment-method
|
|
6960
|
-
query: { limit, page, query },
|
|
6938
|
+
async getPaymentMethods(query) {
|
|
6939
|
+
const response = await this.get(`/payment-method` + buildQuery(query), {
|
|
6961
6940
|
headers: { Accept: "application/json" }
|
|
6962
6941
|
});
|
|
6963
6942
|
if (response.statusCode === 200)
|
|
@@ -6998,8 +6977,8 @@ class PaymentMethodClient extends Client {
|
|
|
6998
6977
|
/**
|
|
6999
6978
|
* @throws {Error} if the request failed
|
|
7000
6979
|
*/
|
|
7001
|
-
async getPaymentMethod(id) {
|
|
7002
|
-
const response = await this.get(`/payment-method/${id}
|
|
6980
|
+
async getPaymentMethod(id, query) {
|
|
6981
|
+
const response = await this.get(`/payment-method/${id}` + buildQuery(query), {
|
|
7003
6982
|
headers: { Accept: "application/json" }
|
|
7004
6983
|
});
|
|
7005
6984
|
if (response.statusCode === 200)
|
|
@@ -7053,9 +7032,8 @@ class PluginClient extends Client {
|
|
|
7053
7032
|
/**
|
|
7054
7033
|
* @throws {Error} if the request failed
|
|
7055
7034
|
*/
|
|
7056
|
-
async getPlugins(
|
|
7057
|
-
const response = await this.get(`/plugin
|
|
7058
|
-
query: { limit, page, query },
|
|
7035
|
+
async getPlugins(query) {
|
|
7036
|
+
const response = await this.get(`/plugin` + buildQuery(query), {
|
|
7059
7037
|
headers: { Accept: "application/json" }
|
|
7060
7038
|
});
|
|
7061
7039
|
if (response.statusCode === 200)
|
|
@@ -7094,8 +7072,10 @@ class PluginClient extends Client {
|
|
|
7094
7072
|
/**
|
|
7095
7073
|
* @throws {Error} if the request failed
|
|
7096
7074
|
*/
|
|
7097
|
-
async getPlugin(id) {
|
|
7098
|
-
const response = await this.get(`/plugin/${id}
|
|
7075
|
+
async getPlugin(id, query) {
|
|
7076
|
+
const response = await this.get(`/plugin/${id}` + buildQuery(query), {
|
|
7077
|
+
headers: { Accept: "application/json" }
|
|
7078
|
+
});
|
|
7099
7079
|
if (response.statusCode === 200)
|
|
7100
7080
|
return response.body.data;
|
|
7101
7081
|
throw new Error(`Failed to fetch plugin: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -7140,9 +7120,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7140
7120
|
/**
|
|
7141
7121
|
* @throws {Error} if the request failed
|
|
7142
7122
|
*/
|
|
7143
|
-
async getProducts(
|
|
7144
|
-
const response = await this.get(`/product
|
|
7145
|
-
query: { limit, page, query },
|
|
7123
|
+
async getProducts(query) {
|
|
7124
|
+
const response = await this.get(`/product` + buildQuery(query), {
|
|
7146
7125
|
headers: { Accept: "application/json" }
|
|
7147
7126
|
});
|
|
7148
7127
|
if (response.statusCode === 200)
|
|
@@ -7181,8 +7160,10 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7181
7160
|
/**
|
|
7182
7161
|
* @throws {Error} if the request failed
|
|
7183
7162
|
*/
|
|
7184
|
-
async getProduct(id) {
|
|
7185
|
-
const response = await this.get(`/product/${id}
|
|
7163
|
+
async getProduct(id, query) {
|
|
7164
|
+
const response = await this.get(`/product/${id}` + buildQuery(query), {
|
|
7165
|
+
headers: { Accept: "application/json" }
|
|
7166
|
+
});
|
|
7186
7167
|
if (response.statusCode === 200)
|
|
7187
7168
|
return response.body.data;
|
|
7188
7169
|
throw new Error(`Failed to fetch product: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -7226,9 +7207,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7226
7207
|
/**
|
|
7227
7208
|
* @throws {Error} if the request failed
|
|
7228
7209
|
*/
|
|
7229
|
-
async getConfiguratorSettings(
|
|
7230
|
-
const response = await this.get(`/product-configurator-setting
|
|
7231
|
-
query: { limit, page, query },
|
|
7210
|
+
async getConfiguratorSettings(query) {
|
|
7211
|
+
const response = await this.get(`/product-configurator-setting` + buildQuery(query), {
|
|
7232
7212
|
headers: { Accept: "application/json" }
|
|
7233
7213
|
});
|
|
7234
7214
|
if (response.statusCode === 200)
|
|
@@ -7269,8 +7249,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7269
7249
|
/**
|
|
7270
7250
|
* @throws {Error} if the request failed
|
|
7271
7251
|
*/
|
|
7272
|
-
async getConfiguratorSetting(id) {
|
|
7273
|
-
const response = await this.get(`/product-configurator-setting/${id}
|
|
7252
|
+
async getConfiguratorSetting(id, query) {
|
|
7253
|
+
const response = await this.get(`/product-configurator-setting/${id}` + buildQuery(query), {
|
|
7274
7254
|
headers: { Accept: "application/json" }
|
|
7275
7255
|
});
|
|
7276
7256
|
if (response.statusCode === 200)
|
|
@@ -7322,9 +7302,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7322
7302
|
/**
|
|
7323
7303
|
* @throws {Error} if the request failed
|
|
7324
7304
|
*/
|
|
7325
|
-
async getCrossSellings(
|
|
7326
|
-
const response = await this.get(`/product-cross-selling
|
|
7327
|
-
query: { limit, page, query },
|
|
7305
|
+
async getCrossSellings(query) {
|
|
7306
|
+
const response = await this.get(`/product-cross-selling` + buildQuery(query), {
|
|
7328
7307
|
headers: { Accept: "application/json" }
|
|
7329
7308
|
});
|
|
7330
7309
|
if (response.statusCode === 200)
|
|
@@ -7365,8 +7344,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7365
7344
|
/**
|
|
7366
7345
|
* @throws {Error} if the request failed
|
|
7367
7346
|
*/
|
|
7368
|
-
async getCrossSelling(id) {
|
|
7369
|
-
const response = await this.get(`/product-cross-selling/${id}
|
|
7347
|
+
async getCrossSelling(id, query) {
|
|
7348
|
+
const response = await this.get(`/product-cross-selling/${id}` + buildQuery(query), {
|
|
7370
7349
|
headers: { Accept: "application/json" }
|
|
7371
7350
|
});
|
|
7372
7351
|
if (response.statusCode === 200)
|
|
@@ -7418,9 +7397,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7418
7397
|
/**
|
|
7419
7398
|
* @throws {Error} if the request failed
|
|
7420
7399
|
*/
|
|
7421
|
-
async getCrossSellingAssignedProducts(
|
|
7422
|
-
const response = await this.get(`/product-cross-selling-assigned-product
|
|
7423
|
-
query: { limit, page, query },
|
|
7400
|
+
async getCrossSellingAssignedProducts(query) {
|
|
7401
|
+
const response = await this.get(`/product-cross-selling-assigned-product` + buildQuery(query), {
|
|
7424
7402
|
headers: { Accept: "application/json" }
|
|
7425
7403
|
});
|
|
7426
7404
|
if (response.statusCode === 200)
|
|
@@ -7461,10 +7439,13 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7461
7439
|
/**
|
|
7462
7440
|
* @throws {Error} if the request failed
|
|
7463
7441
|
*/
|
|
7464
|
-
async getCrossSellingAssignedProduct(id) {
|
|
7465
|
-
const response = await this.get(
|
|
7466
|
-
|
|
7467
|
-
|
|
7442
|
+
async getCrossSellingAssignedProduct(id, query) {
|
|
7443
|
+
const response = await this.get(
|
|
7444
|
+
`/product-cross-selling-assigned-product/${id}` + buildQuery(query),
|
|
7445
|
+
{
|
|
7446
|
+
headers: { Accept: "application/json" }
|
|
7447
|
+
}
|
|
7448
|
+
);
|
|
7468
7449
|
if (response.statusCode === 200)
|
|
7469
7450
|
return response.body.data;
|
|
7470
7451
|
throw new Error(
|
|
@@ -7514,9 +7495,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7514
7495
|
/**
|
|
7515
7496
|
* @throws {Error} if the request failed
|
|
7516
7497
|
*/
|
|
7517
|
-
async getDownloads(
|
|
7518
|
-
const response = await this.get(`/product-download
|
|
7519
|
-
query: { limit, page, query },
|
|
7498
|
+
async getDownloads(query) {
|
|
7499
|
+
const response = await this.get(`/product-download` + buildQuery(query), {
|
|
7520
7500
|
headers: { Accept: "application/json" }
|
|
7521
7501
|
});
|
|
7522
7502
|
if (response.statusCode === 200)
|
|
@@ -7555,8 +7535,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7555
7535
|
/**
|
|
7556
7536
|
* @throws {Error} if the request failed
|
|
7557
7537
|
*/
|
|
7558
|
-
async getDownload(id) {
|
|
7559
|
-
const response = await this.get(`/product-download/${id}
|
|
7538
|
+
async getDownload(id, query) {
|
|
7539
|
+
const response = await this.get(`/product-download/${id}` + buildQuery(query), {
|
|
7560
7540
|
headers: { Accept: "application/json" }
|
|
7561
7541
|
});
|
|
7562
7542
|
if (response.statusCode === 200)
|
|
@@ -7602,9 +7582,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7602
7582
|
/**
|
|
7603
7583
|
* @throws {Error} if the request failed
|
|
7604
7584
|
*/
|
|
7605
|
-
async getExports(
|
|
7606
|
-
const response = await this.get(`/product-export
|
|
7607
|
-
query: { limit, page, query },
|
|
7585
|
+
async getExports(query) {
|
|
7586
|
+
const response = await this.get(`/product-export` + buildQuery(query), {
|
|
7608
7587
|
headers: { Accept: "application/json" }
|
|
7609
7588
|
});
|
|
7610
7589
|
if (response.statusCode === 200)
|
|
@@ -7643,8 +7622,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7643
7622
|
/**
|
|
7644
7623
|
* @throws {Error} if the request failed
|
|
7645
7624
|
*/
|
|
7646
|
-
async getExport(id) {
|
|
7647
|
-
const response = await this.get(`/product-export/${id}
|
|
7625
|
+
async getExport(id, query) {
|
|
7626
|
+
const response = await this.get(`/product-export/${id}` + buildQuery(query), {
|
|
7648
7627
|
headers: { Accept: "application/json" }
|
|
7649
7628
|
});
|
|
7650
7629
|
if (response.statusCode === 200)
|
|
@@ -7688,9 +7667,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7688
7667
|
/**
|
|
7689
7668
|
* @throws {Error} if the request failed
|
|
7690
7669
|
*/
|
|
7691
|
-
async getFeatureSets(
|
|
7692
|
-
const response = await this.get(`/product-feature-set
|
|
7693
|
-
query: { limit, page, query },
|
|
7670
|
+
async getFeatureSets(query) {
|
|
7671
|
+
const response = await this.get(`/product-feature-set` + buildQuery(query), {
|
|
7694
7672
|
headers: { Accept: "application/json" }
|
|
7695
7673
|
});
|
|
7696
7674
|
if (response.statusCode === 200)
|
|
@@ -7731,8 +7709,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7731
7709
|
/**
|
|
7732
7710
|
* @throws {Error} if the request failed
|
|
7733
7711
|
*/
|
|
7734
|
-
async getFeatureSet(id) {
|
|
7735
|
-
const response = await this.get(`/product-feature-set/${id}
|
|
7712
|
+
async getFeatureSet(id, query) {
|
|
7713
|
+
const response = await this.get(`/product-feature-set/${id}` + buildQuery(query), {
|
|
7736
7714
|
headers: { Accept: "application/json" }
|
|
7737
7715
|
});
|
|
7738
7716
|
if (response.statusCode === 200)
|
|
@@ -7784,9 +7762,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7784
7762
|
/**
|
|
7785
7763
|
* @throws {Error} if the request failed
|
|
7786
7764
|
*/
|
|
7787
|
-
async getKeywordDictionaries(
|
|
7788
|
-
const response = await this.get(`/product-keyword-dictionary
|
|
7789
|
-
query: { limit, page, query },
|
|
7765
|
+
async getKeywordDictionaries(query) {
|
|
7766
|
+
const response = await this.get(`/product-keyword-dictionary` + buildQuery(query), {
|
|
7790
7767
|
headers: { Accept: "application/json" }
|
|
7791
7768
|
});
|
|
7792
7769
|
if (response.statusCode === 200)
|
|
@@ -7827,8 +7804,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7827
7804
|
/**
|
|
7828
7805
|
* @throws {Error} if the request failed
|
|
7829
7806
|
*/
|
|
7830
|
-
async getKeywordDictionary(id) {
|
|
7831
|
-
const response = await this.get(`/product-keyword-dictionary/${id}
|
|
7807
|
+
async getKeywordDictionary(id, query) {
|
|
7808
|
+
const response = await this.get(`/product-keyword-dictionary/${id}` + buildQuery(query), {
|
|
7832
7809
|
headers: { Accept: "application/json" }
|
|
7833
7810
|
});
|
|
7834
7811
|
if (response.statusCode === 200)
|
|
@@ -7880,9 +7857,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7880
7857
|
/**
|
|
7881
7858
|
* @throws {Error} if the request failed
|
|
7882
7859
|
*/
|
|
7883
|
-
async getManufacturers(
|
|
7884
|
-
const response = await this.get(`/product-manufacturer
|
|
7885
|
-
query: { limit, page, query },
|
|
7860
|
+
async getManufacturers(query) {
|
|
7861
|
+
const response = await this.get(`/product-manufacturer` + buildQuery(query), {
|
|
7886
7862
|
headers: { Accept: "application/json" }
|
|
7887
7863
|
});
|
|
7888
7864
|
if (response.statusCode === 200)
|
|
@@ -7923,8 +7899,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7923
7899
|
/**
|
|
7924
7900
|
* @throws {Error} if the request failed
|
|
7925
7901
|
*/
|
|
7926
|
-
async getManufacturer(id) {
|
|
7927
|
-
const response = await this.get(`/product-manufacturer/${id}
|
|
7902
|
+
async getManufacturer(id, query) {
|
|
7903
|
+
const response = await this.get(`/product-manufacturer/${id}` + buildQuery(query), {
|
|
7928
7904
|
headers: { Accept: "application/json" }
|
|
7929
7905
|
});
|
|
7930
7906
|
if (response.statusCode === 200)
|
|
@@ -7976,9 +7952,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7976
7952
|
/**
|
|
7977
7953
|
* @throws {Error} if the request failed
|
|
7978
7954
|
*/
|
|
7979
|
-
async getMediaList(
|
|
7980
|
-
const response = await this.get(`/product-media
|
|
7981
|
-
query: { limit, page, query },
|
|
7955
|
+
async getMediaList(query) {
|
|
7956
|
+
const response = await this.get(`/product-media` + buildQuery(query), {
|
|
7982
7957
|
headers: { Accept: "application/json" }
|
|
7983
7958
|
});
|
|
7984
7959
|
if (response.statusCode === 200)
|
|
@@ -8013,8 +7988,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8013
7988
|
/**
|
|
8014
7989
|
* @throws {Error} if the request failed
|
|
8015
7990
|
*/
|
|
8016
|
-
async getMedia(id) {
|
|
8017
|
-
const response = await this.get(`/product-media/${id}
|
|
7991
|
+
async getMedia(id, query) {
|
|
7992
|
+
const response = await this.get(`/product-media/${id}` + buildQuery(query), {
|
|
8018
7993
|
headers: { Accept: "application/json" }
|
|
8019
7994
|
});
|
|
8020
7995
|
if (response.statusCode === 200)
|
|
@@ -8058,9 +8033,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8058
8033
|
/**
|
|
8059
8034
|
* @throws {Error} if the request failed
|
|
8060
8035
|
*/
|
|
8061
|
-
async getPrices(
|
|
8062
|
-
const response = await this.get(`/product-price
|
|
8063
|
-
query: { limit, page, query },
|
|
8036
|
+
async getPrices(query) {
|
|
8037
|
+
const response = await this.get(`/product-price` + buildQuery(query), {
|
|
8064
8038
|
headers: { Accept: "application/json" }
|
|
8065
8039
|
});
|
|
8066
8040
|
if (response.statusCode === 200)
|
|
@@ -8097,8 +8071,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8097
8071
|
/**
|
|
8098
8072
|
* @throws {Error} if the request failed
|
|
8099
8073
|
*/
|
|
8100
|
-
async getPrice(id) {
|
|
8101
|
-
const response = await this.get(`/product-price/${id}
|
|
8074
|
+
async getPrice(id, query) {
|
|
8075
|
+
const response = await this.get(`/product-price/${id}` + buildQuery(query), {
|
|
8102
8076
|
headers: { Accept: "application/json" }
|
|
8103
8077
|
});
|
|
8104
8078
|
if (response.statusCode === 200)
|
|
@@ -8142,9 +8116,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8142
8116
|
/**
|
|
8143
8117
|
* @throws {Error} if the request failed
|
|
8144
8118
|
*/
|
|
8145
|
-
async getReviews(
|
|
8146
|
-
const response = await this.get(`/product-review
|
|
8147
|
-
query: { limit, page, query },
|
|
8119
|
+
async getReviews(query) {
|
|
8120
|
+
const response = await this.get(`/product-review` + buildQuery(query), {
|
|
8148
8121
|
headers: { Accept: "application/json" }
|
|
8149
8122
|
});
|
|
8150
8123
|
if (response.statusCode === 200)
|
|
@@ -8183,8 +8156,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8183
8156
|
/**
|
|
8184
8157
|
* @throws {Error} if the request failed
|
|
8185
8158
|
*/
|
|
8186
|
-
async getReview(id) {
|
|
8187
|
-
const response = await this.get(`/product-review/${id}
|
|
8159
|
+
async getReview(id, query) {
|
|
8160
|
+
const response = await this.get(`/product-review/${id}` + buildQuery(query), {
|
|
8188
8161
|
headers: { Accept: "application/json" }
|
|
8189
8162
|
});
|
|
8190
8163
|
if (response.statusCode === 200)
|
|
@@ -8228,9 +8201,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8228
8201
|
/**
|
|
8229
8202
|
* @throws {Error} if the request failed
|
|
8230
8203
|
*/
|
|
8231
|
-
async getSearchConfigs(
|
|
8232
|
-
const response = await this.get(`/product-search-config
|
|
8233
|
-
query: { limit, page, query },
|
|
8204
|
+
async getSearchConfigs(query) {
|
|
8205
|
+
const response = await this.get(`/product-search-config` + buildQuery(query), {
|
|
8234
8206
|
headers: { Accept: "application/json" }
|
|
8235
8207
|
});
|
|
8236
8208
|
if (response.statusCode === 200)
|
|
@@ -8271,8 +8243,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8271
8243
|
/**
|
|
8272
8244
|
* @throws {Error} if the request failed
|
|
8273
8245
|
*/
|
|
8274
|
-
async getSearchConfig(id) {
|
|
8275
|
-
const response = await this.get(`/product-search-config/${id}
|
|
8246
|
+
async getSearchConfig(id, query) {
|
|
8247
|
+
const response = await this.get(`/product-search-config/${id}` + buildQuery(query), {
|
|
8276
8248
|
headers: { Accept: "application/json" }
|
|
8277
8249
|
});
|
|
8278
8250
|
if (response.statusCode === 200)
|
|
@@ -8324,9 +8296,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8324
8296
|
/**
|
|
8325
8297
|
* @throws {Error} if the request failed
|
|
8326
8298
|
*/
|
|
8327
|
-
async getSearchConfigFields(
|
|
8328
|
-
const response = await this.get(`/product-search-config-field
|
|
8329
|
-
query: { limit, page, query },
|
|
8299
|
+
async getSearchConfigFields(query) {
|
|
8300
|
+
const response = await this.get(`/product-search-config-field` + buildQuery(query), {
|
|
8330
8301
|
headers: { Accept: "application/json" }
|
|
8331
8302
|
});
|
|
8332
8303
|
if (response.statusCode === 200)
|
|
@@ -8367,8 +8338,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8367
8338
|
/**
|
|
8368
8339
|
* @throws {Error} if the request failed
|
|
8369
8340
|
*/
|
|
8370
|
-
async getSearchConfigField(id) {
|
|
8371
|
-
const response = await this.get(`/product-search-config-field/${id}
|
|
8341
|
+
async getSearchConfigField(id, query) {
|
|
8342
|
+
const response = await this.get(`/product-search-config-field/${id}` + buildQuery(query), {
|
|
8372
8343
|
headers: { Accept: "application/json" }
|
|
8373
8344
|
});
|
|
8374
8345
|
if (response.statusCode === 200)
|
|
@@ -8420,9 +8391,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8420
8391
|
/**
|
|
8421
8392
|
* @throws {Error} if the request failed
|
|
8422
8393
|
*/
|
|
8423
|
-
async getSearchKeywords(
|
|
8424
|
-
const response = await this.get(`/product-search-keyword
|
|
8425
|
-
query: { limit, page, query },
|
|
8394
|
+
async getSearchKeywords(query) {
|
|
8395
|
+
const response = await this.get(`/product-search-keyword` + buildQuery(query), {
|
|
8426
8396
|
headers: { Accept: "application/json" }
|
|
8427
8397
|
});
|
|
8428
8398
|
if (response.statusCode === 200)
|
|
@@ -8463,8 +8433,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8463
8433
|
/**
|
|
8464
8434
|
* @throws {Error} if the request failed
|
|
8465
8435
|
*/
|
|
8466
|
-
async getSearchKeyword(id) {
|
|
8467
|
-
const response = await this.get(`/product-search-keyword/${id}
|
|
8436
|
+
async getSearchKeyword(id, query) {
|
|
8437
|
+
const response = await this.get(`/product-search-keyword/${id}` + buildQuery(query), {
|
|
8468
8438
|
headers: { Accept: "application/json" }
|
|
8469
8439
|
});
|
|
8470
8440
|
if (response.statusCode === 200)
|
|
@@ -8516,9 +8486,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8516
8486
|
/**
|
|
8517
8487
|
* @throws {Error} if the request failed
|
|
8518
8488
|
*/
|
|
8519
|
-
async getSortings(
|
|
8520
|
-
const response = await this.get(`/product-sorting
|
|
8521
|
-
query: { limit, page, query },
|
|
8489
|
+
async getSortings(query) {
|
|
8490
|
+
const response = await this.get(`/product-sorting` + buildQuery(query), {
|
|
8522
8491
|
headers: { Accept: "application/json" }
|
|
8523
8492
|
});
|
|
8524
8493
|
if (response.statusCode === 200)
|
|
@@ -8557,8 +8526,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8557
8526
|
/**
|
|
8558
8527
|
* @throws {Error} if the request failed
|
|
8559
8528
|
*/
|
|
8560
|
-
async getSorting(id) {
|
|
8561
|
-
const response = await this.get(`/product-sorting/${id}
|
|
8529
|
+
async getSorting(id, query) {
|
|
8530
|
+
const response = await this.get(`/product-sorting/${id}` + buildQuery(query), {
|
|
8562
8531
|
headers: { Accept: "application/json" }
|
|
8563
8532
|
});
|
|
8564
8533
|
if (response.statusCode === 200)
|
|
@@ -8604,9 +8573,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8604
8573
|
/**
|
|
8605
8574
|
* @throws {Error} if the request failed
|
|
8606
8575
|
*/
|
|
8607
|
-
async getStreams(
|
|
8608
|
-
const response = await this.get(`/product-stream
|
|
8609
|
-
query: { limit, page, query },
|
|
8576
|
+
async getStreams(query) {
|
|
8577
|
+
const response = await this.get(`/product-stream` + buildQuery(query), {
|
|
8610
8578
|
headers: { Accept: "application/json" }
|
|
8611
8579
|
});
|
|
8612
8580
|
if (response.statusCode === 200)
|
|
@@ -8645,8 +8613,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8645
8613
|
/**
|
|
8646
8614
|
* @throws {Error} if the request failed
|
|
8647
8615
|
*/
|
|
8648
|
-
async getStream(id) {
|
|
8649
|
-
const response = await this.get(`/product-stream/${id}
|
|
8616
|
+
async getStream(id, query) {
|
|
8617
|
+
const response = await this.get(`/product-stream/${id}` + buildQuery(query), {
|
|
8650
8618
|
headers: { Accept: "application/json" }
|
|
8651
8619
|
});
|
|
8652
8620
|
if (response.statusCode === 200)
|
|
@@ -8690,9 +8658,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8690
8658
|
/**
|
|
8691
8659
|
* @throws {Error} if the request failed
|
|
8692
8660
|
*/
|
|
8693
|
-
async getStreamFilters(
|
|
8694
|
-
const response = await this.get(`/product-stream-filter
|
|
8695
|
-
query: { limit, page, query },
|
|
8661
|
+
async getStreamFilters(query) {
|
|
8662
|
+
const response = await this.get(`/product-stream-filter` + buildQuery(query), {
|
|
8696
8663
|
headers: { Accept: "application/json" }
|
|
8697
8664
|
});
|
|
8698
8665
|
if (response.statusCode === 200)
|
|
@@ -8733,8 +8700,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8733
8700
|
/**
|
|
8734
8701
|
* @throws {Error} if the request failed
|
|
8735
8702
|
*/
|
|
8736
|
-
async getStreamFilter(id) {
|
|
8737
|
-
const response = await this.get(`/product-stream-filter/${id}
|
|
8703
|
+
async getStreamFilter(id, query) {
|
|
8704
|
+
const response = await this.get(`/product-stream-filter/${id}` + buildQuery(query), {
|
|
8738
8705
|
headers: { Accept: "application/json" }
|
|
8739
8706
|
});
|
|
8740
8707
|
if (response.statusCode === 200)
|
|
@@ -8786,9 +8753,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8786
8753
|
/**
|
|
8787
8754
|
* @throws {Error} if the request failed
|
|
8788
8755
|
*/
|
|
8789
|
-
async getVisibilities(
|
|
8790
|
-
const response = await this.get(`/product-visibility
|
|
8791
|
-
query: { limit, page, query },
|
|
8756
|
+
async getVisibilities(query) {
|
|
8757
|
+
const response = await this.get(`/product-visibility` + buildQuery(query), {
|
|
8792
8758
|
headers: { Accept: "application/json" }
|
|
8793
8759
|
});
|
|
8794
8760
|
if (response.statusCode === 200)
|
|
@@ -8829,8 +8795,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8829
8795
|
/**
|
|
8830
8796
|
* @throws {Error} if the request failed
|
|
8831
8797
|
*/
|
|
8832
|
-
async getVisibility(id) {
|
|
8833
|
-
const response = await this.get(`/product-visibility/${id}
|
|
8798
|
+
async getVisibility(id, query) {
|
|
8799
|
+
const response = await this.get(`/product-visibility/${id}` + buildQuery(query), {
|
|
8834
8800
|
headers: { Accept: "application/json" }
|
|
8835
8801
|
});
|
|
8836
8802
|
if (response.statusCode === 200)
|
|
@@ -8883,9 +8849,8 @@ class PromotionClient extends Client {
|
|
|
8883
8849
|
/**
|
|
8884
8850
|
* @throws {Error} if the request failed
|
|
8885
8851
|
*/
|
|
8886
|
-
async getPromotions(
|
|
8887
|
-
const response = await this.get(`/promotion
|
|
8888
|
-
query: { limit, page, query },
|
|
8852
|
+
async getPromotions(query) {
|
|
8853
|
+
const response = await this.get(`/promotion` + buildQuery(query), {
|
|
8889
8854
|
headers: { Accept: "application/json" }
|
|
8890
8855
|
});
|
|
8891
8856
|
if (response.statusCode === 200)
|
|
@@ -8924,8 +8889,8 @@ class PromotionClient extends Client {
|
|
|
8924
8889
|
/**
|
|
8925
8890
|
* @throws {Error} if the request failed
|
|
8926
8891
|
*/
|
|
8927
|
-
async getPromotion(id) {
|
|
8928
|
-
const response = await this.get(`/promotion/${id}
|
|
8892
|
+
async getPromotion(id, query) {
|
|
8893
|
+
const response = await this.get(`/promotion/${id}` + buildQuery(query), {
|
|
8929
8894
|
headers: { Accept: "application/json" }
|
|
8930
8895
|
});
|
|
8931
8896
|
if (response.statusCode === 200)
|
|
@@ -8971,9 +8936,8 @@ class PromotionClient extends Client {
|
|
|
8971
8936
|
/**
|
|
8972
8937
|
* @throws {Error} if the request failed
|
|
8973
8938
|
*/
|
|
8974
|
-
async getDiscounts(
|
|
8975
|
-
const response = await this.get(`/promotion-discount
|
|
8976
|
-
query: { limit, page, query },
|
|
8939
|
+
async getDiscounts(query) {
|
|
8940
|
+
const response = await this.get(`/promotion-discount` + buildQuery(query), {
|
|
8977
8941
|
headers: { Accept: "application/json" }
|
|
8978
8942
|
});
|
|
8979
8943
|
if (response.statusCode === 200)
|
|
@@ -9012,8 +8976,8 @@ class PromotionClient extends Client {
|
|
|
9012
8976
|
/**
|
|
9013
8977
|
* @throws {Error} if the request failed
|
|
9014
8978
|
*/
|
|
9015
|
-
async getDiscount(id) {
|
|
9016
|
-
const response = await this.get(`/promotion-discount/${id}
|
|
8979
|
+
async getDiscount(id, query) {
|
|
8980
|
+
const response = await this.get(`/promotion-discount/${id}` + buildQuery(query), {
|
|
9017
8981
|
headers: { Accept: "application/json" }
|
|
9018
8982
|
});
|
|
9019
8983
|
if (response.statusCode === 200)
|
|
@@ -9059,9 +9023,8 @@ class PromotionClient extends Client {
|
|
|
9059
9023
|
/**
|
|
9060
9024
|
* @throws {Error} if the request failed
|
|
9061
9025
|
*/
|
|
9062
|
-
async getDiscountPrices(
|
|
9063
|
-
const response = await this.get(`/promotion-discount-price
|
|
9064
|
-
query: { limit, page, query },
|
|
9026
|
+
async getDiscountPrices(query) {
|
|
9027
|
+
const response = await this.get(`/promotion-discount-price` + buildQuery(query), {
|
|
9065
9028
|
headers: { Accept: "application/json" }
|
|
9066
9029
|
});
|
|
9067
9030
|
if (response.statusCode === 200)
|
|
@@ -9102,8 +9065,8 @@ class PromotionClient extends Client {
|
|
|
9102
9065
|
/**
|
|
9103
9066
|
* @throws {Error} if the request failed
|
|
9104
9067
|
*/
|
|
9105
|
-
async getDiscountPrice(id) {
|
|
9106
|
-
const response = await this.get(`/promotion-discount-price/${id}
|
|
9068
|
+
async getDiscountPrice(id, query) {
|
|
9069
|
+
const response = await this.get(`/promotion-discount-price/${id}` + buildQuery(query), {
|
|
9107
9070
|
headers: { Accept: "application/json" }
|
|
9108
9071
|
});
|
|
9109
9072
|
if (response.statusCode === 200)
|
|
@@ -9155,9 +9118,8 @@ class PromotionClient extends Client {
|
|
|
9155
9118
|
/**
|
|
9156
9119
|
* @throws {Error} if the request failed
|
|
9157
9120
|
*/
|
|
9158
|
-
async getIndividualCodes(
|
|
9159
|
-
const response = await this.get(`/promotion-individual-code
|
|
9160
|
-
query: { limit, page, query },
|
|
9121
|
+
async getIndividualCodes(query) {
|
|
9122
|
+
const response = await this.get(`/promotion-individual-code` + buildQuery(query), {
|
|
9161
9123
|
headers: { Accept: "application/json" }
|
|
9162
9124
|
});
|
|
9163
9125
|
if (response.statusCode === 200)
|
|
@@ -9198,8 +9160,8 @@ class PromotionClient extends Client {
|
|
|
9198
9160
|
/**
|
|
9199
9161
|
* @throws {Error} if the request failed
|
|
9200
9162
|
*/
|
|
9201
|
-
async getIndividualCode(id) {
|
|
9202
|
-
const response = await this.get(`/promotion-individual-code/${id}
|
|
9163
|
+
async getIndividualCode(id, query) {
|
|
9164
|
+
const response = await this.get(`/promotion-individual-code/${id}` + buildQuery(query), {
|
|
9203
9165
|
headers: { Accept: "application/json" }
|
|
9204
9166
|
});
|
|
9205
9167
|
if (response.statusCode === 200)
|
|
@@ -9251,9 +9213,8 @@ class PromotionClient extends Client {
|
|
|
9251
9213
|
/**
|
|
9252
9214
|
* @throws {Error} if the request failed
|
|
9253
9215
|
*/
|
|
9254
|
-
async getSalesChannels(
|
|
9255
|
-
const response = await this.get(`/promotion-sales-channel
|
|
9256
|
-
query: { limit, page, query },
|
|
9216
|
+
async getSalesChannels(query) {
|
|
9217
|
+
const response = await this.get(`/promotion-sales-channel` + buildQuery(query), {
|
|
9257
9218
|
headers: { Accept: "application/json" }
|
|
9258
9219
|
});
|
|
9259
9220
|
if (response.statusCode === 200)
|
|
@@ -9294,8 +9255,8 @@ class PromotionClient extends Client {
|
|
|
9294
9255
|
/**
|
|
9295
9256
|
* @throws {Error} if the request failed
|
|
9296
9257
|
*/
|
|
9297
|
-
async getSalesChannel(id) {
|
|
9298
|
-
const response = await this.get(`/promotion-sales-channel/${id}
|
|
9258
|
+
async getSalesChannel(id, query) {
|
|
9259
|
+
const response = await this.get(`/promotion-sales-channel/${id}` + buildQuery(query), {
|
|
9299
9260
|
headers: { Accept: "application/json" }
|
|
9300
9261
|
});
|
|
9301
9262
|
if (response.statusCode === 200)
|
|
@@ -9347,9 +9308,8 @@ class PromotionClient extends Client {
|
|
|
9347
9308
|
/**
|
|
9348
9309
|
* @throws {Error} if the request failed
|
|
9349
9310
|
*/
|
|
9350
|
-
async getSetGroups(
|
|
9351
|
-
const response = await this.get(`/promotion-setgroup
|
|
9352
|
-
query: { limit, page, query },
|
|
9311
|
+
async getSetGroups(query) {
|
|
9312
|
+
const response = await this.get(`/promotion-setgroup` + buildQuery(query), {
|
|
9353
9313
|
headers: { Accept: "application/json" }
|
|
9354
9314
|
});
|
|
9355
9315
|
if (response.statusCode === 200)
|
|
@@ -9388,8 +9348,8 @@ class PromotionClient extends Client {
|
|
|
9388
9348
|
/**
|
|
9389
9349
|
* @throws {Error} if the request failed
|
|
9390
9350
|
*/
|
|
9391
|
-
async getSetGroup(id) {
|
|
9392
|
-
const response = await this.get(`/promotion-setgroup/${id}
|
|
9351
|
+
async getSetGroup(id, query) {
|
|
9352
|
+
const response = await this.get(`/promotion-setgroup/${id}` + buildQuery(query), {
|
|
9393
9353
|
headers: { Accept: "application/json" }
|
|
9394
9354
|
});
|
|
9395
9355
|
if (response.statusCode === 200)
|
|
@@ -9438,9 +9398,8 @@ class PropertyGroupClient extends Client {
|
|
|
9438
9398
|
/**
|
|
9439
9399
|
* @throws {Error} if the request failed
|
|
9440
9400
|
*/
|
|
9441
|
-
async getPropertyGroups(
|
|
9442
|
-
const response = await this.get(`/property-group
|
|
9443
|
-
query: { limit, page, query },
|
|
9401
|
+
async getPropertyGroups(query) {
|
|
9402
|
+
const response = await this.get(`/property-group` + buildQuery(query), {
|
|
9444
9403
|
headers: { Accept: "application/json" }
|
|
9445
9404
|
});
|
|
9446
9405
|
if (response.statusCode === 200)
|
|
@@ -9481,8 +9440,8 @@ class PropertyGroupClient extends Client {
|
|
|
9481
9440
|
/**
|
|
9482
9441
|
* @throws {Error} if the request failed
|
|
9483
9442
|
*/
|
|
9484
|
-
async getPropertyGroup(id) {
|
|
9485
|
-
const response = await this.get(`/property-group/${id}
|
|
9443
|
+
async getPropertyGroup(id, query) {
|
|
9444
|
+
const response = await this.get(`/property-group/${id}` + buildQuery(query), {
|
|
9486
9445
|
headers: { Accept: "application/json" }
|
|
9487
9446
|
});
|
|
9488
9447
|
if (response.statusCode === 200)
|
|
@@ -9534,9 +9493,8 @@ class PropertyGroupClient extends Client {
|
|
|
9534
9493
|
/**
|
|
9535
9494
|
* @throws {Error} if the request failed
|
|
9536
9495
|
*/
|
|
9537
|
-
async getOptions(
|
|
9538
|
-
const response = await this.get(`/property-group-option
|
|
9539
|
-
query: { limit, page, query },
|
|
9496
|
+
async getOptions(query) {
|
|
9497
|
+
const response = await this.get(`/property-group-option` + buildQuery(query), {
|
|
9540
9498
|
headers: { Accept: "application/json" }
|
|
9541
9499
|
});
|
|
9542
9500
|
if (response.statusCode === 200)
|
|
@@ -9575,8 +9533,8 @@ class PropertyGroupClient extends Client {
|
|
|
9575
9533
|
/**
|
|
9576
9534
|
* @throws {Error} if the request failed
|
|
9577
9535
|
*/
|
|
9578
|
-
async getOption(id) {
|
|
9579
|
-
const response = await this.get(`/property-group-option/${id}
|
|
9536
|
+
async getOption(id, query) {
|
|
9537
|
+
const response = await this.get(`/property-group-option/${id}` + buildQuery(query), {
|
|
9580
9538
|
headers: { Accept: "application/json" }
|
|
9581
9539
|
});
|
|
9582
9540
|
if (response.statusCode === 200)
|
|
@@ -9623,9 +9581,8 @@ class RuleClient extends Client {
|
|
|
9623
9581
|
/**
|
|
9624
9582
|
* @throws {Error} if the request failed
|
|
9625
9583
|
*/
|
|
9626
|
-
async getRules(
|
|
9627
|
-
const response = await this.get(`/rule
|
|
9628
|
-
query: { limit, page, query },
|
|
9584
|
+
async getRules(query) {
|
|
9585
|
+
const response = await this.get(`/rule` + buildQuery(query), {
|
|
9629
9586
|
headers: { Accept: "application/json" }
|
|
9630
9587
|
});
|
|
9631
9588
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -9659,8 +9616,10 @@ class RuleClient extends Client {
|
|
|
9659
9616
|
/**
|
|
9660
9617
|
* @throws {Error} if the request failed
|
|
9661
9618
|
*/
|
|
9662
|
-
async getRule(id) {
|
|
9663
|
-
const response = await this.get(`/rule/${id}
|
|
9619
|
+
async getRule(id, query) {
|
|
9620
|
+
const response = await this.get(`/rule/${id}` + buildQuery(query), {
|
|
9621
|
+
headers: { Accept: "application/json" }
|
|
9622
|
+
});
|
|
9664
9623
|
if (response.statusCode === 200)
|
|
9665
9624
|
return response.body.data;
|
|
9666
9625
|
throw new Error(`Failed to fetch rule: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -9702,9 +9661,8 @@ class RuleClient extends Client {
|
|
|
9702
9661
|
/**
|
|
9703
9662
|
* @throws {Error} if the request failed
|
|
9704
9663
|
*/
|
|
9705
|
-
async getConditions(
|
|
9706
|
-
const response = await this.get(`/rule-condition
|
|
9707
|
-
query: { limit, page, query },
|
|
9664
|
+
async getConditions(query) {
|
|
9665
|
+
const response = await this.get(`/rule-condition` + buildQuery(query), {
|
|
9708
9666
|
headers: { Accept: "application/json" }
|
|
9709
9667
|
});
|
|
9710
9668
|
if (response.statusCode === 200)
|
|
@@ -9743,8 +9701,8 @@ class RuleClient extends Client {
|
|
|
9743
9701
|
/**
|
|
9744
9702
|
* @throws {Error} if the request failed
|
|
9745
9703
|
*/
|
|
9746
|
-
async getCondition(id) {
|
|
9747
|
-
const response = await this.get(`/rule-condition/${id}
|
|
9704
|
+
async getCondition(id, query) {
|
|
9705
|
+
const response = await this.get(`/rule-condition/${id}` + buildQuery(query), {
|
|
9748
9706
|
headers: { Accept: "application/json" }
|
|
9749
9707
|
});
|
|
9750
9708
|
if (response.statusCode === 200)
|
|
@@ -9793,9 +9751,8 @@ class SalesChannelClient extends Client {
|
|
|
9793
9751
|
/**
|
|
9794
9752
|
* @throws {Error} if the request failed
|
|
9795
9753
|
*/
|
|
9796
|
-
async getSalesChannels(
|
|
9797
|
-
const response = await this.get(`/sales-channel
|
|
9798
|
-
query: { limit, page, query },
|
|
9754
|
+
async getSalesChannels(query) {
|
|
9755
|
+
const response = await this.get(`/sales-channel` + buildQuery(query), {
|
|
9799
9756
|
headers: { Accept: "application/json" }
|
|
9800
9757
|
});
|
|
9801
9758
|
if (response.statusCode === 200)
|
|
@@ -9836,8 +9793,8 @@ class SalesChannelClient extends Client {
|
|
|
9836
9793
|
/**
|
|
9837
9794
|
* @throws {Error} if the request failed
|
|
9838
9795
|
*/
|
|
9839
|
-
async getSalesChannel(id) {
|
|
9840
|
-
const response = await this.get(`/sales-channel/${id}
|
|
9796
|
+
async getSalesChannel(id, query) {
|
|
9797
|
+
const response = await this.get(`/sales-channel/${id}` + buildQuery(query), {
|
|
9841
9798
|
headers: { Accept: "application/json" }
|
|
9842
9799
|
});
|
|
9843
9800
|
if (response.statusCode === 200)
|
|
@@ -9889,9 +9846,8 @@ class SalesChannelClient extends Client {
|
|
|
9889
9846
|
/**
|
|
9890
9847
|
* @throws {Error} if the request failed
|
|
9891
9848
|
*/
|
|
9892
|
-
async getAnalyticsList(
|
|
9893
|
-
const response = await this.get(`/sales-channel-analytics
|
|
9894
|
-
query: { limit, page, query },
|
|
9849
|
+
async getAnalyticsList(query) {
|
|
9850
|
+
const response = await this.get(`/sales-channel-analytics` + buildQuery(query), {
|
|
9895
9851
|
headers: { Accept: "application/json" }
|
|
9896
9852
|
});
|
|
9897
9853
|
if (response.statusCode === 200)
|
|
@@ -9930,8 +9886,8 @@ class SalesChannelClient extends Client {
|
|
|
9930
9886
|
/**
|
|
9931
9887
|
* @throws {Error} if the request failed
|
|
9932
9888
|
*/
|
|
9933
|
-
async getAnalytics(id) {
|
|
9934
|
-
const response = await this.get(`/sales-channel-analytics/${id}
|
|
9889
|
+
async getAnalytics(id, query) {
|
|
9890
|
+
const response = await this.get(`/sales-channel-analytics/${id}` + buildQuery(query), {
|
|
9935
9891
|
headers: { Accept: "application/json" }
|
|
9936
9892
|
});
|
|
9937
9893
|
if (response.statusCode === 200)
|
|
@@ -9977,9 +9933,8 @@ class SalesChannelClient extends Client {
|
|
|
9977
9933
|
/**
|
|
9978
9934
|
* @throws {Error} if the request failed
|
|
9979
9935
|
*/
|
|
9980
|
-
async getDomains(
|
|
9981
|
-
const response = await this.get(`/sales-channel-domain
|
|
9982
|
-
query: { limit, page, query },
|
|
9936
|
+
async getDomains(query) {
|
|
9937
|
+
const response = await this.get(`/sales-channel-domain` + buildQuery(query), {
|
|
9983
9938
|
headers: { Accept: "application/json" }
|
|
9984
9939
|
});
|
|
9985
9940
|
if (response.statusCode === 200)
|
|
@@ -10018,8 +9973,8 @@ class SalesChannelClient extends Client {
|
|
|
10018
9973
|
/**
|
|
10019
9974
|
* @throws {Error} if the request failed
|
|
10020
9975
|
*/
|
|
10021
|
-
async getDomain(id) {
|
|
10022
|
-
const response = await this.get(`/sales-channel-domain/${id}
|
|
9976
|
+
async getDomain(id, query) {
|
|
9977
|
+
const response = await this.get(`/sales-channel-domain/${id}` + buildQuery(query), {
|
|
10023
9978
|
headers: { Accept: "application/json" }
|
|
10024
9979
|
});
|
|
10025
9980
|
if (response.statusCode === 200)
|
|
@@ -10063,9 +10018,8 @@ class SalesChannelClient extends Client {
|
|
|
10063
10018
|
/**
|
|
10064
10019
|
* @throws {Error} if the request failed
|
|
10065
10020
|
*/
|
|
10066
|
-
async getTypes(
|
|
10067
|
-
const response = await this.get(`/sales-channel-type
|
|
10068
|
-
query: { limit, page, query },
|
|
10021
|
+
async getTypes(query) {
|
|
10022
|
+
const response = await this.get(`/sales-channel-type` + buildQuery(query), {
|
|
10069
10023
|
headers: { Accept: "application/json" }
|
|
10070
10024
|
});
|
|
10071
10025
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -10099,8 +10053,8 @@ class SalesChannelClient extends Client {
|
|
|
10099
10053
|
/**
|
|
10100
10054
|
* @throws {Error} if the request failed
|
|
10101
10055
|
*/
|
|
10102
|
-
async getType(id) {
|
|
10103
|
-
const response = await this.get(`/sales-channel-type/${id}
|
|
10056
|
+
async getType(id, query) {
|
|
10057
|
+
const response = await this.get(`/sales-channel-type/${id}` + buildQuery(query), {
|
|
10104
10058
|
headers: { Accept: "application/json" }
|
|
10105
10059
|
});
|
|
10106
10060
|
if (response.statusCode === 200)
|
|
@@ -10146,9 +10100,8 @@ class SalutationClient extends Client {
|
|
|
10146
10100
|
/**
|
|
10147
10101
|
* @throws {Error} if the request failed
|
|
10148
10102
|
*/
|
|
10149
|
-
async getSalutations(
|
|
10150
|
-
const response = await this.get(`/salutation
|
|
10151
|
-
query: { limit, page, query },
|
|
10103
|
+
async getSalutations(query) {
|
|
10104
|
+
const response = await this.get(`/salutation` + buildQuery(query), {
|
|
10152
10105
|
headers: { Accept: "application/json" }
|
|
10153
10106
|
});
|
|
10154
10107
|
if (response.statusCode === 200)
|
|
@@ -10189,8 +10142,8 @@ class SalutationClient extends Client {
|
|
|
10189
10142
|
/**
|
|
10190
10143
|
* @throws {Error} if the request failed
|
|
10191
10144
|
*/
|
|
10192
|
-
async getSalutation(id) {
|
|
10193
|
-
const response = await this.get(`/salutation/${id}
|
|
10145
|
+
async getSalutation(id, query) {
|
|
10146
|
+
const response = await this.get(`/salutation/${id}` + buildQuery(query), {
|
|
10194
10147
|
headers: { Accept: "application/json" }
|
|
10195
10148
|
});
|
|
10196
10149
|
if (response.statusCode === 200)
|
|
@@ -10242,9 +10195,8 @@ class ScriptClient extends Client {
|
|
|
10242
10195
|
/**
|
|
10243
10196
|
* @throws {Error} if the request failed
|
|
10244
10197
|
*/
|
|
10245
|
-
async getScripts(
|
|
10246
|
-
const response = await this.get(`/script
|
|
10247
|
-
query: { limit, page, query },
|
|
10198
|
+
async getScripts(query) {
|
|
10199
|
+
const response = await this.get(`/script` + buildQuery(query), {
|
|
10248
10200
|
headers: { Accept: "application/json" }
|
|
10249
10201
|
});
|
|
10250
10202
|
if (response.statusCode === 200)
|
|
@@ -10283,8 +10235,10 @@ class ScriptClient extends Client {
|
|
|
10283
10235
|
/**
|
|
10284
10236
|
* @throws {Error} if the request failed
|
|
10285
10237
|
*/
|
|
10286
|
-
async getScript(id) {
|
|
10287
|
-
const response = await this.get(`/script/${id}
|
|
10238
|
+
async getScript(id, query) {
|
|
10239
|
+
const response = await this.get(`/script/${id}` + buildQuery(query), {
|
|
10240
|
+
headers: { Accept: "application/json" }
|
|
10241
|
+
});
|
|
10288
10242
|
if (response.statusCode === 200)
|
|
10289
10243
|
return response.body.data;
|
|
10290
10244
|
throw new Error(`Failed to fetch script: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -10328,9 +10282,8 @@ class SecurityClient extends Client {
|
|
|
10328
10282
|
/**
|
|
10329
10283
|
* @throws {Error} if the request failed
|
|
10330
10284
|
*/
|
|
10331
|
-
async getAclRoles(
|
|
10332
|
-
const response = await this.get(`/acl-role
|
|
10333
|
-
query: { limit, page, query },
|
|
10285
|
+
async getAclRoles(query) {
|
|
10286
|
+
const response = await this.get(`/acl-role` + buildQuery(query), {
|
|
10334
10287
|
headers: { Accept: "application/json" }
|
|
10335
10288
|
});
|
|
10336
10289
|
if (response.statusCode === 200)
|
|
@@ -10369,8 +10322,10 @@ class SecurityClient extends Client {
|
|
|
10369
10322
|
/**
|
|
10370
10323
|
* @throws {Error} if the request failed
|
|
10371
10324
|
*/
|
|
10372
|
-
async getAclRole(id) {
|
|
10373
|
-
const response = await this.get(`/acl-role/${id}
|
|
10325
|
+
async getAclRole(id, query) {
|
|
10326
|
+
const response = await this.get(`/acl-role/${id}` + buildQuery(query), {
|
|
10327
|
+
headers: { Accept: "application/json" }
|
|
10328
|
+
});
|
|
10374
10329
|
if (response.statusCode === 200)
|
|
10375
10330
|
return response.body.data;
|
|
10376
10331
|
throw new Error(`Failed to fetch acl role: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -10417,9 +10372,8 @@ let DeliveryTimeClient$2 = class DeliveryTimeClient extends Client {
|
|
|
10417
10372
|
/**
|
|
10418
10373
|
* @throws {Error} if the request failed
|
|
10419
10374
|
*/
|
|
10420
|
-
async getUrls(
|
|
10421
|
-
const response = await this.get(`/seo-url
|
|
10422
|
-
query: { limit, page, query },
|
|
10375
|
+
async getUrls(query) {
|
|
10376
|
+
const response = await this.get(`/seo-url` + buildQuery(query), {
|
|
10423
10377
|
headers: { Accept: "application/json" }
|
|
10424
10378
|
});
|
|
10425
10379
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -10453,8 +10407,10 @@ let DeliveryTimeClient$2 = class DeliveryTimeClient extends Client {
|
|
|
10453
10407
|
/**
|
|
10454
10408
|
* @throws {Error} if the request failed
|
|
10455
10409
|
*/
|
|
10456
|
-
async getUrl(id) {
|
|
10457
|
-
const response = await this.get(`/seo-url/${id}
|
|
10410
|
+
async getUrl(id, query) {
|
|
10411
|
+
const response = await this.get(`/seo-url/${id}` + buildQuery(query), {
|
|
10412
|
+
headers: { Accept: "application/json" }
|
|
10413
|
+
});
|
|
10458
10414
|
if (response.statusCode === 200)
|
|
10459
10415
|
return response.body.data;
|
|
10460
10416
|
throw new Error(`Failed to fetch url: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -10496,9 +10452,8 @@ let DeliveryTimeClient$2 = class DeliveryTimeClient extends Client {
|
|
|
10496
10452
|
/**
|
|
10497
10453
|
* @throws {Error} if the request failed
|
|
10498
10454
|
*/
|
|
10499
|
-
async getUrlTemplates(
|
|
10500
|
-
const response = await this.get(`/seo-url-template
|
|
10501
|
-
query: { limit, page, query },
|
|
10455
|
+
async getUrlTemplates(query) {
|
|
10456
|
+
const response = await this.get(`/seo-url-template` + buildQuery(query), {
|
|
10502
10457
|
headers: { Accept: "application/json" }
|
|
10503
10458
|
});
|
|
10504
10459
|
if (response.statusCode === 200)
|
|
@@ -10539,8 +10494,8 @@ let DeliveryTimeClient$2 = class DeliveryTimeClient extends Client {
|
|
|
10539
10494
|
/**
|
|
10540
10495
|
* @throws {Error} if the request failed
|
|
10541
10496
|
*/
|
|
10542
|
-
async getUrlTemplate(id) {
|
|
10543
|
-
const response = await this.get(`/seo-url-template/${id}
|
|
10497
|
+
async getUrlTemplate(id, query) {
|
|
10498
|
+
const response = await this.get(`/seo-url-template/${id}` + buildQuery(query), {
|
|
10544
10499
|
headers: { Accept: "application/json" }
|
|
10545
10500
|
});
|
|
10546
10501
|
if (response.statusCode === 200)
|
|
@@ -10595,9 +10550,8 @@ class ShippingMethodClient extends Client {
|
|
|
10595
10550
|
/**
|
|
10596
10551
|
* @throws {Error} if the request failed
|
|
10597
10552
|
*/
|
|
10598
|
-
async getShippingMethods(
|
|
10599
|
-
const response = await this.get(`/shipping-method
|
|
10600
|
-
query: { limit, page, query },
|
|
10553
|
+
async getShippingMethods(query) {
|
|
10554
|
+
const response = await this.get(`/shipping-method` + buildQuery(query), {
|
|
10601
10555
|
headers: { Accept: "application/json" }
|
|
10602
10556
|
});
|
|
10603
10557
|
if (response.statusCode === 200)
|
|
@@ -10638,8 +10592,8 @@ class ShippingMethodClient extends Client {
|
|
|
10638
10592
|
/**
|
|
10639
10593
|
* @throws {Error} if the request failed
|
|
10640
10594
|
*/
|
|
10641
|
-
async getShippingMethod(id) {
|
|
10642
|
-
const response = await this.get(`/shipping-method/${id}
|
|
10595
|
+
async getShippingMethod(id, query) {
|
|
10596
|
+
const response = await this.get(`/shipping-method/${id}` + buildQuery(query), {
|
|
10643
10597
|
headers: { Accept: "application/json" }
|
|
10644
10598
|
});
|
|
10645
10599
|
if (response.statusCode === 200)
|
|
@@ -10691,9 +10645,8 @@ class ShippingMethodClient extends Client {
|
|
|
10691
10645
|
/**
|
|
10692
10646
|
* @throws {Error} if the request failed
|
|
10693
10647
|
*/
|
|
10694
|
-
async getPrices(
|
|
10695
|
-
const response = await this.get(`/shipping-method-price
|
|
10696
|
-
query: { limit, page, query },
|
|
10648
|
+
async getPrices(query) {
|
|
10649
|
+
const response = await this.get(`/shipping-method-price` + buildQuery(query), {
|
|
10697
10650
|
headers: { Accept: "application/json" }
|
|
10698
10651
|
});
|
|
10699
10652
|
if (response.statusCode === 200)
|
|
@@ -10734,8 +10687,8 @@ class ShippingMethodClient extends Client {
|
|
|
10734
10687
|
/**
|
|
10735
10688
|
* @throws {Error} if the request failed
|
|
10736
10689
|
*/
|
|
10737
|
-
async getPrice(id) {
|
|
10738
|
-
const response = await this.get(`/shipping-method-price/${id}
|
|
10690
|
+
async getPrice(id, query) {
|
|
10691
|
+
const response = await this.get(`/shipping-method-price/${id}` + buildQuery(query), {
|
|
10739
10692
|
headers: { Accept: "application/json" }
|
|
10740
10693
|
});
|
|
10741
10694
|
if (response.statusCode === 200)
|
|
@@ -10782,9 +10735,8 @@ let DeliveryTimeClient$1 = class DeliveryTimeClient extends Client {
|
|
|
10782
10735
|
/**
|
|
10783
10736
|
* @throws {Error} if the request failed
|
|
10784
10737
|
*/
|
|
10785
|
-
async getSnippets(
|
|
10786
|
-
const response = await this.get(`/snippet
|
|
10787
|
-
query: { limit, page, query },
|
|
10738
|
+
async getSnippets(query) {
|
|
10739
|
+
const response = await this.get(`/snippet` + buildQuery(query), {
|
|
10788
10740
|
headers: { Accept: "application/json" }
|
|
10789
10741
|
});
|
|
10790
10742
|
if (response.statusCode === 200)
|
|
@@ -10823,8 +10775,10 @@ let DeliveryTimeClient$1 = class DeliveryTimeClient extends Client {
|
|
|
10823
10775
|
/**
|
|
10824
10776
|
* @throws {Error} if the request failed
|
|
10825
10777
|
*/
|
|
10826
|
-
async getSnippet(id) {
|
|
10827
|
-
const response = await this.get(`/snippet/${id}
|
|
10778
|
+
async getSnippet(id, query) {
|
|
10779
|
+
const response = await this.get(`/snippet/${id}` + buildQuery(query), {
|
|
10780
|
+
headers: { Accept: "application/json" }
|
|
10781
|
+
});
|
|
10828
10782
|
if (response.statusCode === 200)
|
|
10829
10783
|
return response.body.data;
|
|
10830
10784
|
throw new Error(`Failed to fetch snippet: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -10868,9 +10822,8 @@ let DeliveryTimeClient$1 = class DeliveryTimeClient extends Client {
|
|
|
10868
10822
|
/**
|
|
10869
10823
|
* @throws {Error} if the request failed
|
|
10870
10824
|
*/
|
|
10871
|
-
async getSets(
|
|
10872
|
-
const response = await this.get(`/snippet-set
|
|
10873
|
-
query: { limit, page, query },
|
|
10825
|
+
async getSets(query) {
|
|
10826
|
+
const response = await this.get(`/snippet-set` + buildQuery(query), {
|
|
10874
10827
|
headers: { Accept: "application/json" }
|
|
10875
10828
|
});
|
|
10876
10829
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -10910,8 +10863,8 @@ let DeliveryTimeClient$1 = class DeliveryTimeClient extends Client {
|
|
|
10910
10863
|
/**
|
|
10911
10864
|
* @throws {Error} if the request failed
|
|
10912
10865
|
*/
|
|
10913
|
-
async getSet(id) {
|
|
10914
|
-
const response = await this.get(`/snippet-set/${id}
|
|
10866
|
+
async getSet(id, query) {
|
|
10867
|
+
const response = await this.get(`/snippet-set/${id}` + buildQuery(query), {
|
|
10915
10868
|
headers: { Accept: "application/json" }
|
|
10916
10869
|
});
|
|
10917
10870
|
if (response.statusCode === 200)
|
|
@@ -10966,9 +10919,8 @@ class DeliveryTimeClient extends Client {
|
|
|
10966
10919
|
/**
|
|
10967
10920
|
* @throws {Error} if the request failed
|
|
10968
10921
|
*/
|
|
10969
|
-
async getStateMachines(
|
|
10970
|
-
const response = await this.get(`/state-machine
|
|
10971
|
-
query: { limit, page, query },
|
|
10922
|
+
async getStateMachines(query) {
|
|
10923
|
+
const response = await this.get(`/state-machine` + buildQuery(query), {
|
|
10972
10924
|
headers: { Accept: "application/json" }
|
|
10973
10925
|
});
|
|
10974
10926
|
if (response.statusCode === 200)
|
|
@@ -11009,8 +10961,8 @@ class DeliveryTimeClient extends Client {
|
|
|
11009
10961
|
/**
|
|
11010
10962
|
* @throws {Error} if the request failed
|
|
11011
10963
|
*/
|
|
11012
|
-
async getStateMachine(id) {
|
|
11013
|
-
const response = await this.get(`/state-machine/${id}
|
|
10964
|
+
async getStateMachine(id, query) {
|
|
10965
|
+
const response = await this.get(`/state-machine/${id}` + buildQuery(query), {
|
|
11014
10966
|
headers: { Accept: "application/json" }
|
|
11015
10967
|
});
|
|
11016
10968
|
if (response.statusCode === 200)
|
|
@@ -11062,9 +11014,8 @@ class DeliveryTimeClient extends Client {
|
|
|
11062
11014
|
/**
|
|
11063
11015
|
* @throws {Error} if the request failed
|
|
11064
11016
|
*/
|
|
11065
|
-
async getStates(
|
|
11066
|
-
const response = await this.get(`/state-machine-state
|
|
11067
|
-
query: { limit, page, query },
|
|
11017
|
+
async getStates(query) {
|
|
11018
|
+
const response = await this.get(`/state-machine-state` + buildQuery(query), {
|
|
11068
11019
|
headers: { Accept: "application/json" }
|
|
11069
11020
|
});
|
|
11070
11021
|
if (response.statusCode === 200)
|
|
@@ -11101,8 +11052,8 @@ class DeliveryTimeClient extends Client {
|
|
|
11101
11052
|
/**
|
|
11102
11053
|
* @throws {Error} if the request failed
|
|
11103
11054
|
*/
|
|
11104
|
-
async getState(id) {
|
|
11105
|
-
const response = await this.get(`/state-machine-state/${id}
|
|
11055
|
+
async getState(id, query) {
|
|
11056
|
+
const response = await this.get(`/state-machine-state/${id}` + buildQuery(query), {
|
|
11106
11057
|
headers: { Accept: "application/json" }
|
|
11107
11058
|
});
|
|
11108
11059
|
if (response.statusCode === 200)
|
|
@@ -11146,9 +11097,8 @@ class DeliveryTimeClient extends Client {
|
|
|
11146
11097
|
/**
|
|
11147
11098
|
* @throws {Error} if the request failed
|
|
11148
11099
|
*/
|
|
11149
|
-
async getTransitions(
|
|
11150
|
-
const response = await this.get(`/state-machine-transition
|
|
11151
|
-
query: { limit, page, query },
|
|
11100
|
+
async getTransitions(query) {
|
|
11101
|
+
const response = await this.get(`/state-machine-transition` + buildQuery(query), {
|
|
11152
11102
|
headers: { Accept: "application/json" }
|
|
11153
11103
|
});
|
|
11154
11104
|
if (response.statusCode === 200)
|
|
@@ -11189,8 +11139,8 @@ class DeliveryTimeClient extends Client {
|
|
|
11189
11139
|
/**
|
|
11190
11140
|
* @throws {Error} if the request failed
|
|
11191
11141
|
*/
|
|
11192
|
-
async getTransition(id) {
|
|
11193
|
-
const response = await this.get(`/state-machine-transition/${id}
|
|
11142
|
+
async getTransition(id, query) {
|
|
11143
|
+
const response = await this.get(`/state-machine-transition/${id}` + buildQuery(query), {
|
|
11194
11144
|
headers: { Accept: "application/json" }
|
|
11195
11145
|
});
|
|
11196
11146
|
if (response.statusCode === 200)
|
|
@@ -11434,9 +11384,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11434
11384
|
/**
|
|
11435
11385
|
* @throws {Error} if the request failed
|
|
11436
11386
|
*/
|
|
11437
|
-
async getLogEntries(
|
|
11438
|
-
const response = await this.get(`/log-entry
|
|
11439
|
-
query: { limit, page, query },
|
|
11387
|
+
async getLogEntries(query) {
|
|
11388
|
+
const response = await this.get(`/log-entry` + buildQuery(query), {
|
|
11440
11389
|
headers: { Accept: "application/json" }
|
|
11441
11390
|
});
|
|
11442
11391
|
if (response.statusCode === 200)
|
|
@@ -11475,8 +11424,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11475
11424
|
/**
|
|
11476
11425
|
* @throws {Error} if the request failed
|
|
11477
11426
|
*/
|
|
11478
|
-
async getLogEntry(id) {
|
|
11479
|
-
const response = await this.get(`/log-entry/${id}
|
|
11427
|
+
async getLogEntry(id, query) {
|
|
11428
|
+
const response = await this.get(`/log-entry/${id}` + buildQuery(query), {
|
|
11480
11429
|
headers: { Accept: "application/json" }
|
|
11481
11430
|
});
|
|
11482
11431
|
if (response.statusCode === 200)
|
|
@@ -11522,9 +11471,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11522
11471
|
/**
|
|
11523
11472
|
* @throws {Error} if the request failed
|
|
11524
11473
|
*/
|
|
11525
|
-
async getNotifications(
|
|
11526
|
-
const response = await this.get(`/notification
|
|
11527
|
-
query: { limit, page, query },
|
|
11474
|
+
async getNotifications(query) {
|
|
11475
|
+
const response = await this.get(`/notification` + buildQuery(query), {
|
|
11528
11476
|
headers: { Accept: "application/json" }
|
|
11529
11477
|
});
|
|
11530
11478
|
if (response.statusCode === 200)
|
|
@@ -11565,8 +11513,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11565
11513
|
/**
|
|
11566
11514
|
* @throws {Error} if the request failed
|
|
11567
11515
|
*/
|
|
11568
|
-
async getNotification(id) {
|
|
11569
|
-
const response = await this.get(`/notification/${id}
|
|
11516
|
+
async getNotification(id, query) {
|
|
11517
|
+
const response = await this.get(`/notification/${id}` + buildQuery(query), {
|
|
11570
11518
|
headers: { Accept: "application/json" }
|
|
11571
11519
|
});
|
|
11572
11520
|
if (response.statusCode === 200)
|
|
@@ -11618,9 +11566,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11618
11566
|
/**
|
|
11619
11567
|
* @throws {Error} if the request failed
|
|
11620
11568
|
*/
|
|
11621
|
-
async getConfigEntries(
|
|
11622
|
-
const response = await this.get(`/system-config
|
|
11623
|
-
query: { limit, page, query },
|
|
11569
|
+
async getConfigEntries(query) {
|
|
11570
|
+
const response = await this.get(`/system-config` + buildQuery(query), {
|
|
11624
11571
|
headers: { Accept: "application/json" }
|
|
11625
11572
|
});
|
|
11626
11573
|
if (response.statusCode === 200)
|
|
@@ -11661,8 +11608,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11661
11608
|
/**
|
|
11662
11609
|
* @throws {Error} if the request failed
|
|
11663
11610
|
*/
|
|
11664
|
-
async getConfigEntry(id) {
|
|
11665
|
-
const response = await this.get(`/system-config/${id}
|
|
11611
|
+
async getConfigEntry(id, query) {
|
|
11612
|
+
const response = await this.get(`/system-config/${id}` + buildQuery(query), {
|
|
11666
11613
|
headers: { Accept: "application/json" }
|
|
11667
11614
|
});
|
|
11668
11615
|
if (response.statusCode === 200)
|
|
@@ -11714,9 +11661,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11714
11661
|
/**
|
|
11715
11662
|
* @throws {Error} if the request failed
|
|
11716
11663
|
*/
|
|
11717
|
-
async getScheduledTasks(
|
|
11718
|
-
const response = await this.get(`/scheduled-task
|
|
11719
|
-
query: { limit, page, query },
|
|
11664
|
+
async getScheduledTasks(query) {
|
|
11665
|
+
const response = await this.get(`/scheduled-task` + buildQuery(query), {
|
|
11720
11666
|
headers: { Accept: "application/json" }
|
|
11721
11667
|
});
|
|
11722
11668
|
if (response.statusCode === 200)
|
|
@@ -11757,8 +11703,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11757
11703
|
/**
|
|
11758
11704
|
* @throws {Error} if the request failed
|
|
11759
11705
|
*/
|
|
11760
|
-
async getScheduledTask(id) {
|
|
11761
|
-
const response = await this.get(`/scheduled-task/${id}
|
|
11706
|
+
async getScheduledTask(id, query) {
|
|
11707
|
+
const response = await this.get(`/scheduled-task/${id}` + buildQuery(query), {
|
|
11762
11708
|
headers: { Accept: "application/json" }
|
|
11763
11709
|
});
|
|
11764
11710
|
if (response.statusCode === 200)
|
|
@@ -11812,9 +11758,8 @@ class TagClient extends Client {
|
|
|
11812
11758
|
/**
|
|
11813
11759
|
* @throws {Error} if the request failed
|
|
11814
11760
|
*/
|
|
11815
|
-
async getTags(
|
|
11816
|
-
const response = await this.get(`/tag
|
|
11817
|
-
query: { limit, page, query },
|
|
11761
|
+
async getTags(query) {
|
|
11762
|
+
const response = await this.get(`/tag` + buildQuery(query), {
|
|
11818
11763
|
headers: { Accept: "application/json" }
|
|
11819
11764
|
});
|
|
11820
11765
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -11848,8 +11793,10 @@ class TagClient extends Client {
|
|
|
11848
11793
|
/**
|
|
11849
11794
|
* @throws {Error} if the request failed
|
|
11850
11795
|
*/
|
|
11851
|
-
async getTag(id) {
|
|
11852
|
-
const response = await this.get(`/tag/${id}
|
|
11796
|
+
async getTag(id, query) {
|
|
11797
|
+
const response = await this.get(`/tag/${id}` + buildQuery(query), {
|
|
11798
|
+
headers: { Accept: "application/json" }
|
|
11799
|
+
});
|
|
11853
11800
|
if (response.statusCode === 200)
|
|
11854
11801
|
return response.body.data;
|
|
11855
11802
|
throw new Error(`Failed to fetch tag: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -11894,9 +11841,8 @@ class TaxClient extends Client {
|
|
|
11894
11841
|
/**
|
|
11895
11842
|
* @throws {Error} if the request failed
|
|
11896
11843
|
*/
|
|
11897
|
-
async getTaxes(
|
|
11898
|
-
const response = await this.get(`/tax
|
|
11899
|
-
query: { limit, page, query },
|
|
11844
|
+
async getTaxes(query) {
|
|
11845
|
+
const response = await this.get(`/tax` + buildQuery(query), {
|
|
11900
11846
|
headers: { Accept: "application/json" }
|
|
11901
11847
|
});
|
|
11902
11848
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -11930,8 +11876,10 @@ class TaxClient extends Client {
|
|
|
11930
11876
|
/**
|
|
11931
11877
|
* @throws {Error} if the request failed
|
|
11932
11878
|
*/
|
|
11933
|
-
async getTax(id) {
|
|
11934
|
-
const response = await this.get(`/tax/${id}
|
|
11879
|
+
async getTax(id, query) {
|
|
11880
|
+
const response = await this.get(`/tax/${id}` + buildQuery(query), {
|
|
11881
|
+
headers: { Accept: "application/json" }
|
|
11882
|
+
});
|
|
11935
11883
|
if (response.statusCode === 200)
|
|
11936
11884
|
return response.body.data;
|
|
11937
11885
|
throw new Error(`Failed to fetch tax: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -11973,9 +11921,8 @@ class TaxClient extends Client {
|
|
|
11973
11921
|
/**
|
|
11974
11922
|
* @throws {Error} if the request failed
|
|
11975
11923
|
*/
|
|
11976
|
-
async getProviders(
|
|
11977
|
-
const response = await this.get(`/tax-provider
|
|
11978
|
-
query: { limit, page, query },
|
|
11924
|
+
async getProviders(query) {
|
|
11925
|
+
const response = await this.get(`/tax-provider` + buildQuery(query), {
|
|
11979
11926
|
headers: { Accept: "application/json" }
|
|
11980
11927
|
});
|
|
11981
11928
|
if (response.statusCode === 200)
|
|
@@ -12014,8 +11961,8 @@ class TaxClient extends Client {
|
|
|
12014
11961
|
/**
|
|
12015
11962
|
* @throws {Error} if the request failed
|
|
12016
11963
|
*/
|
|
12017
|
-
async getProvider(id) {
|
|
12018
|
-
const response = await this.get(`/tax-provider/${id}
|
|
11964
|
+
async getProvider(id, query) {
|
|
11965
|
+
const response = await this.get(`/tax-provider/${id}` + buildQuery(query), {
|
|
12019
11966
|
headers: { Accept: "application/json" }
|
|
12020
11967
|
});
|
|
12021
11968
|
if (response.statusCode === 200)
|
|
@@ -12061,9 +12008,8 @@ class TaxClient extends Client {
|
|
|
12061
12008
|
/**
|
|
12062
12009
|
* @throws {Error} if the request failed
|
|
12063
12010
|
*/
|
|
12064
|
-
async getRules(
|
|
12065
|
-
const response = await this.get(`/tax-rule
|
|
12066
|
-
query: { limit, page, query },
|
|
12011
|
+
async getRules(query) {
|
|
12012
|
+
const response = await this.get(`/tax-rule` + buildQuery(query), {
|
|
12067
12013
|
headers: { Accept: "application/json" }
|
|
12068
12014
|
});
|
|
12069
12015
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -12097,8 +12043,10 @@ class TaxClient extends Client {
|
|
|
12097
12043
|
/**
|
|
12098
12044
|
* @throws {Error} if the request failed
|
|
12099
12045
|
*/
|
|
12100
|
-
async getRule(id) {
|
|
12101
|
-
const response = await this.get(`/tax-rule/${id}
|
|
12046
|
+
async getRule(id, query) {
|
|
12047
|
+
const response = await this.get(`/tax-rule/${id}` + buildQuery(query), {
|
|
12048
|
+
headers: { Accept: "application/json" }
|
|
12049
|
+
});
|
|
12102
12050
|
if (response.statusCode === 200)
|
|
12103
12051
|
return response.body.data;
|
|
12104
12052
|
throw new Error(`Failed to fetch rule: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -12140,9 +12088,8 @@ class TaxClient extends Client {
|
|
|
12140
12088
|
/**
|
|
12141
12089
|
* @throws {Error} if the request failed
|
|
12142
12090
|
*/
|
|
12143
|
-
async getRuleTypes(
|
|
12144
|
-
const response = await this.get(`/tax-rule-type
|
|
12145
|
-
query: { limit, page, query },
|
|
12091
|
+
async getRuleTypes(query) {
|
|
12092
|
+
const response = await this.get(`/tax-rule-type` + buildQuery(query), {
|
|
12146
12093
|
headers: { Accept: "application/json" }
|
|
12147
12094
|
});
|
|
12148
12095
|
if (response.statusCode === 200)
|
|
@@ -12181,8 +12128,8 @@ class TaxClient extends Client {
|
|
|
12181
12128
|
/**
|
|
12182
12129
|
* @throws {Error} if the request failed
|
|
12183
12130
|
*/
|
|
12184
|
-
async getRuleType(id) {
|
|
12185
|
-
const response = await this.get(`/tax-rule-type/${id}
|
|
12131
|
+
async getRuleType(id, query) {
|
|
12132
|
+
const response = await this.get(`/tax-rule-type/${id}` + buildQuery(query), {
|
|
12186
12133
|
headers: { Accept: "application/json" }
|
|
12187
12134
|
});
|
|
12188
12135
|
if (response.statusCode === 200)
|
|
@@ -12230,9 +12177,8 @@ class UnitClient extends Client {
|
|
|
12230
12177
|
/**
|
|
12231
12178
|
* @throws {Error} if the request failed
|
|
12232
12179
|
*/
|
|
12233
|
-
async getUnits(
|
|
12234
|
-
const response = await this.get(`/unit
|
|
12235
|
-
query: { limit, page, query },
|
|
12180
|
+
async getUnits(query) {
|
|
12181
|
+
const response = await this.get(`/unit` + buildQuery(query), {
|
|
12236
12182
|
headers: { Accept: "application/json" }
|
|
12237
12183
|
});
|
|
12238
12184
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -12266,8 +12212,10 @@ class UnitClient extends Client {
|
|
|
12266
12212
|
/**
|
|
12267
12213
|
* @throws {Error} if the request failed
|
|
12268
12214
|
*/
|
|
12269
|
-
async getUnit(id) {
|
|
12270
|
-
const response = await this.get(`/unit/${id}
|
|
12215
|
+
async getUnit(id, query) {
|
|
12216
|
+
const response = await this.get(`/unit/${id}` + buildQuery(query), {
|
|
12217
|
+
headers: { Accept: "application/json" }
|
|
12218
|
+
});
|
|
12271
12219
|
if (response.statusCode === 200)
|
|
12272
12220
|
return response.body.data;
|
|
12273
12221
|
throw new Error(`Failed to fetch unit: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -12312,9 +12260,8 @@ class UserClient extends Client {
|
|
|
12312
12260
|
/**
|
|
12313
12261
|
* @throws {Error} if the request failed
|
|
12314
12262
|
*/
|
|
12315
|
-
async getUsers(
|
|
12316
|
-
const response = await this.get(`/user
|
|
12317
|
-
query: { limit, page, query },
|
|
12263
|
+
async getUsers(query) {
|
|
12264
|
+
const response = await this.get(`/user` + buildQuery(query), {
|
|
12318
12265
|
headers: { Accept: "application/json" }
|
|
12319
12266
|
});
|
|
12320
12267
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -12348,8 +12295,10 @@ class UserClient extends Client {
|
|
|
12348
12295
|
/**
|
|
12349
12296
|
* @throws {Error} if the request failed
|
|
12350
12297
|
*/
|
|
12351
|
-
async getUser(id) {
|
|
12352
|
-
const response = await this.get(`/user/${id}
|
|
12298
|
+
async getUser(id, query) {
|
|
12299
|
+
const response = await this.get(`/user/${id}` + buildQuery(query), {
|
|
12300
|
+
headers: { Accept: "application/json" }
|
|
12301
|
+
});
|
|
12353
12302
|
if (response.statusCode === 200)
|
|
12354
12303
|
return response.body.data;
|
|
12355
12304
|
throw new Error(`Failed to fetch user: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -12391,9 +12340,8 @@ class UserClient extends Client {
|
|
|
12391
12340
|
/**
|
|
12392
12341
|
* @throws {Error} if the request failed
|
|
12393
12342
|
*/
|
|
12394
|
-
async getAccessKeys(
|
|
12395
|
-
const response = await this.get(`/user-access-key
|
|
12396
|
-
query: { limit, page, query },
|
|
12343
|
+
async getAccessKeys(query) {
|
|
12344
|
+
const response = await this.get(`/user-access-key` + buildQuery(query), {
|
|
12397
12345
|
headers: { Accept: "application/json" }
|
|
12398
12346
|
});
|
|
12399
12347
|
if (response.statusCode === 200)
|
|
@@ -12434,8 +12382,8 @@ class UserClient extends Client {
|
|
|
12434
12382
|
/**
|
|
12435
12383
|
* @throws {Error} if the request failed
|
|
12436
12384
|
*/
|
|
12437
|
-
async getAccessKey(id) {
|
|
12438
|
-
const response = await this.get(`/user-access-key/${id}
|
|
12385
|
+
async getAccessKey(id, query) {
|
|
12386
|
+
const response = await this.get(`/user-access-key/${id}` + buildQuery(query), {
|
|
12439
12387
|
headers: { Accept: "application/json" }
|
|
12440
12388
|
});
|
|
12441
12389
|
if (response.statusCode === 200)
|
|
@@ -12485,9 +12433,8 @@ class UserClient extends Client {
|
|
|
12485
12433
|
/**
|
|
12486
12434
|
* @throws {Error} if the request failed
|
|
12487
12435
|
*/
|
|
12488
|
-
async getConfigs(
|
|
12489
|
-
const response = await this.get(`/user-config
|
|
12490
|
-
query: { limit, page, query },
|
|
12436
|
+
async getConfigs(query) {
|
|
12437
|
+
const response = await this.get(`/user-config` + buildQuery(query), {
|
|
12491
12438
|
headers: { Accept: "application/json" }
|
|
12492
12439
|
});
|
|
12493
12440
|
if (response.statusCode === 200)
|
|
@@ -12526,8 +12473,8 @@ class UserClient extends Client {
|
|
|
12526
12473
|
/**
|
|
12527
12474
|
* @throws {Error} if the request failed
|
|
12528
12475
|
*/
|
|
12529
|
-
async getConfig(id) {
|
|
12530
|
-
const response = await this.get(`/user-config/${id}
|
|
12476
|
+
async getConfig(id, query) {
|
|
12477
|
+
const response = await this.get(`/user-config/${id}` + buildQuery(query), {
|
|
12531
12478
|
headers: { Accept: "application/json" }
|
|
12532
12479
|
});
|
|
12533
12480
|
if (response.statusCode === 200)
|
|
@@ -12571,9 +12518,8 @@ class UserClient extends Client {
|
|
|
12571
12518
|
/**
|
|
12572
12519
|
* @throws {Error} if the request failed
|
|
12573
12520
|
*/
|
|
12574
|
-
async getRecoveries(
|
|
12575
|
-
const response = await this.get(`/user-recovery
|
|
12576
|
-
query: { limit, page, query },
|
|
12521
|
+
async getRecoveries(query) {
|
|
12522
|
+
const response = await this.get(`/user-recovery` + buildQuery(query), {
|
|
12577
12523
|
headers: { Accept: "application/json" }
|
|
12578
12524
|
});
|
|
12579
12525
|
if (response.statusCode === 200)
|
|
@@ -12612,8 +12558,8 @@ class UserClient extends Client {
|
|
|
12612
12558
|
/**
|
|
12613
12559
|
* @throws {Error} if the request failed
|
|
12614
12560
|
*/
|
|
12615
|
-
async getRecovery(id) {
|
|
12616
|
-
const response = await this.get(`/user-recovery/${id}
|
|
12561
|
+
async getRecovery(id, query) {
|
|
12562
|
+
const response = await this.get(`/user-recovery/${id}` + buildQuery(query), {
|
|
12617
12563
|
headers: { Accept: "application/json" }
|
|
12618
12564
|
});
|
|
12619
12565
|
if (response.statusCode === 200)
|
|
@@ -12662,9 +12608,8 @@ class WebhookClient extends Client {
|
|
|
12662
12608
|
/**
|
|
12663
12609
|
* @throws {Error} if the request failed
|
|
12664
12610
|
*/
|
|
12665
|
-
async getWebhooks(
|
|
12666
|
-
const response = await this.get(`/webhook
|
|
12667
|
-
query: { limit, page, query },
|
|
12611
|
+
async getWebhooks(query) {
|
|
12612
|
+
const response = await this.get(`/webhook` + buildQuery(query), {
|
|
12668
12613
|
headers: { Accept: "application/json" }
|
|
12669
12614
|
});
|
|
12670
12615
|
if (response.statusCode === 200)
|
|
@@ -12703,8 +12648,10 @@ class WebhookClient extends Client {
|
|
|
12703
12648
|
/**
|
|
12704
12649
|
* @throws {Error} if the request failed
|
|
12705
12650
|
*/
|
|
12706
|
-
async getWebhook(id) {
|
|
12707
|
-
const response = await this.get(`/webhook/${id}
|
|
12651
|
+
async getWebhook(id, query) {
|
|
12652
|
+
const response = await this.get(`/webhook/${id}` + buildQuery(query), {
|
|
12653
|
+
headers: { Accept: "application/json" }
|
|
12654
|
+
});
|
|
12708
12655
|
if (response.statusCode === 200)
|
|
12709
12656
|
return response.body.data;
|
|
12710
12657
|
throw new Error(`Failed to fetch webhook: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -12748,9 +12695,8 @@ class WebhookClient extends Client {
|
|
|
12748
12695
|
/**
|
|
12749
12696
|
* @throws {Error} if the request failed
|
|
12750
12697
|
*/
|
|
12751
|
-
async getEventLogs(
|
|
12752
|
-
const response = await this.get(`/webhook-event-log
|
|
12753
|
-
query: { limit, page, query },
|
|
12698
|
+
async getEventLogs(query) {
|
|
12699
|
+
const response = await this.get(`/webhook-event-log` + buildQuery(query), {
|
|
12754
12700
|
headers: { Accept: "application/json" }
|
|
12755
12701
|
});
|
|
12756
12702
|
if (response.statusCode === 200)
|
|
@@ -12789,8 +12735,8 @@ class WebhookClient extends Client {
|
|
|
12789
12735
|
/**
|
|
12790
12736
|
* @throws {Error} if the request failed
|
|
12791
12737
|
*/
|
|
12792
|
-
async getEventLog(id) {
|
|
12793
|
-
const response = await this.get(`/webhook-event-log/${id}
|
|
12738
|
+
async getEventLog(id, query) {
|
|
12739
|
+
const response = await this.get(`/webhook-event-log/${id}` + buildQuery(query), {
|
|
12794
12740
|
headers: { Accept: "application/json" }
|
|
12795
12741
|
});
|
|
12796
12742
|
if (response.statusCode === 200)
|
|
@@ -12872,8 +12818,9 @@ class AdminShopwareClient extends ShopwareClient {
|
|
|
12872
12818
|
async withOAuth(options = {}) {
|
|
12873
12819
|
const entry = this.authStore.getEntry(AuthenticationType.OAUTH);
|
|
12874
12820
|
if (!entry) throw new Error("Not authenticated");
|
|
12821
|
+
let entryHeaders;
|
|
12875
12822
|
try {
|
|
12876
|
-
|
|
12823
|
+
entryHeaders = entry.load().headers;
|
|
12877
12824
|
} catch (error) {
|
|
12878
12825
|
if (error instanceof ExpiredError && entry.refreshToken) {
|
|
12879
12826
|
const refreshResponse = await super.doRequest("/oauth/token", {
|
|
@@ -12885,10 +12832,16 @@ class AdminShopwareClient extends ShopwareClient {
|
|
|
12885
12832
|
})
|
|
12886
12833
|
});
|
|
12887
12834
|
entry.save(refreshResponse);
|
|
12888
|
-
|
|
12889
|
-
}
|
|
12890
|
-
throw error;
|
|
12835
|
+
entryHeaders = entry.load().headers;
|
|
12836
|
+
} else throw error;
|
|
12891
12837
|
}
|
|
12838
|
+
return {
|
|
12839
|
+
...options,
|
|
12840
|
+
headers: {
|
|
12841
|
+
...options.headers,
|
|
12842
|
+
...entryHeaders
|
|
12843
|
+
}
|
|
12844
|
+
};
|
|
12892
12845
|
}
|
|
12893
12846
|
forApp() {
|
|
12894
12847
|
return new AppClient(this);
|
|
@@ -14009,6 +13962,7 @@ class StoreShopwareClient extends ShopwareClient {
|
|
|
14009
13962
|
return super.doRequest(path, {
|
|
14010
13963
|
...options,
|
|
14011
13964
|
headers: {
|
|
13965
|
+
...options?.headers,
|
|
14012
13966
|
"sw-access-key": this.apiKey
|
|
14013
13967
|
}
|
|
14014
13968
|
});
|
|
@@ -14018,7 +13972,13 @@ class StoreShopwareClient extends ShopwareClient {
|
|
|
14018
13972
|
AuthenticationType.CONTEXT_TOKEN
|
|
14019
13973
|
);
|
|
14020
13974
|
if (!entry) throw new Error("Not authenticated");
|
|
14021
|
-
return {
|
|
13975
|
+
return {
|
|
13976
|
+
...options,
|
|
13977
|
+
headers: {
|
|
13978
|
+
...options.headers,
|
|
13979
|
+
...entry.load().headers
|
|
13980
|
+
}
|
|
13981
|
+
};
|
|
14022
13982
|
}
|
|
14023
13983
|
forAccount() {
|
|
14024
13984
|
return new AccountClient(this);
|