@devite/shopware-client 1.1.3 → 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 +624 -678
- 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 +624 -678
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { hash } from 'ohash';
|
|
2
2
|
import { ofetch } from 'ofetch';
|
|
3
|
+
import { stringify } from 'qs';
|
|
3
4
|
|
|
4
5
|
class AuthenticationStore {
|
|
5
6
|
entries = /* @__PURE__ */ new Map();
|
|
@@ -98,6 +99,7 @@ class ShopwareClient {
|
|
|
98
99
|
baseUrl;
|
|
99
100
|
authStore = new AuthenticationStore();
|
|
100
101
|
cache = /* @__PURE__ */ new Map();
|
|
102
|
+
languageId;
|
|
101
103
|
constructor(baseUrl) {
|
|
102
104
|
this.baseUrl = baseUrl;
|
|
103
105
|
}
|
|
@@ -121,6 +123,7 @@ class ShopwareClient {
|
|
|
121
123
|
query: options?.query,
|
|
122
124
|
headers: {
|
|
123
125
|
...options?.body ? { "Content-Type": options.body.contentType() } : {},
|
|
126
|
+
...this.languageId ? { "sw-language-id": this.languageId } : {},
|
|
124
127
|
...options?.headers
|
|
125
128
|
},
|
|
126
129
|
body: serializedBody,
|
|
@@ -169,6 +172,9 @@ class ShopwareClient {
|
|
|
169
172
|
if (payload && response._data) await payload.deserialize(response._data);
|
|
170
173
|
return payload;
|
|
171
174
|
}
|
|
175
|
+
setLanguageId(id) {
|
|
176
|
+
this.languageId = id;
|
|
177
|
+
}
|
|
172
178
|
}
|
|
173
179
|
|
|
174
180
|
var AuthenticationType = /* @__PURE__ */ ((AuthenticationType2) => {
|
|
@@ -259,14 +265,17 @@ class Client {
|
|
|
259
265
|
}
|
|
260
266
|
}
|
|
261
267
|
|
|
268
|
+
function buildQuery(criteria) {
|
|
269
|
+
return criteria ? `?${stringify(criteria, { encode: false })}` : "";
|
|
270
|
+
}
|
|
271
|
+
|
|
262
272
|
class AppClient extends Client {
|
|
263
273
|
/** Apps **/
|
|
264
274
|
/**
|
|
265
275
|
* @throws {Error} if the request failed
|
|
266
276
|
*/
|
|
267
|
-
async getApps(
|
|
268
|
-
const response = await this.get(`/app
|
|
269
|
-
query: { limit, page, query },
|
|
277
|
+
async getApps(query) {
|
|
278
|
+
const response = await this.get(`/app` + buildQuery(query), {
|
|
270
279
|
headers: { Accept: "application/json" }
|
|
271
280
|
});
|
|
272
281
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -300,8 +309,10 @@ class AppClient extends Client {
|
|
|
300
309
|
/**
|
|
301
310
|
* @throws {Error} if the request failed
|
|
302
311
|
*/
|
|
303
|
-
async getApp(id) {
|
|
304
|
-
const response = await this.get(`/app/${id}
|
|
312
|
+
async getApp(id, query) {
|
|
313
|
+
const response = await this.get(`/app/${id}` + buildQuery(query), {
|
|
314
|
+
headers: { Accept: "application/json" }
|
|
315
|
+
});
|
|
305
316
|
if (response.statusCode === 200)
|
|
306
317
|
return response.body.data;
|
|
307
318
|
throw new Error(`Failed to fetch app: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -343,9 +354,8 @@ class AppClient extends Client {
|
|
|
343
354
|
/**
|
|
344
355
|
* @throws {Error} if the request failed
|
|
345
356
|
*/
|
|
346
|
-
async getActionButtons(
|
|
347
|
-
const response = await this.get(`/app-action-button
|
|
348
|
-
query: { limit, page, query },
|
|
357
|
+
async getActionButtons(query) {
|
|
358
|
+
const response = await this.get(`/app-action-button` + buildQuery(query), {
|
|
349
359
|
headers: { Accept: "application/json" }
|
|
350
360
|
});
|
|
351
361
|
if (response.statusCode === 200)
|
|
@@ -384,8 +394,8 @@ class AppClient extends Client {
|
|
|
384
394
|
/**
|
|
385
395
|
* @throws {Error} if the request failed
|
|
386
396
|
*/
|
|
387
|
-
async getActionButton(id) {
|
|
388
|
-
const response = await this.get(`/app-action-button/${id}
|
|
397
|
+
async getActionButton(id, query) {
|
|
398
|
+
const response = await this.get(`/app-action-button/${id}` + buildQuery(query), {
|
|
389
399
|
headers: { Accept: "application/json" }
|
|
390
400
|
});
|
|
391
401
|
if (response.statusCode === 200)
|
|
@@ -437,9 +447,8 @@ class AppClient extends Client {
|
|
|
437
447
|
/**
|
|
438
448
|
* @throws {Error} if the request failed
|
|
439
449
|
*/
|
|
440
|
-
async getAdminSnippets(
|
|
441
|
-
const response = await this.get(`/app-administration-snippet
|
|
442
|
-
query: { limit, page, query },
|
|
450
|
+
async getAdminSnippets(query) {
|
|
451
|
+
const response = await this.get(`/app-administration-snippet` + buildQuery(query), {
|
|
443
452
|
headers: { Accept: "application/json" }
|
|
444
453
|
});
|
|
445
454
|
if (response.statusCode === 200)
|
|
@@ -478,8 +487,8 @@ class AppClient extends Client {
|
|
|
478
487
|
/**
|
|
479
488
|
* @throws {Error} if the request failed
|
|
480
489
|
*/
|
|
481
|
-
async getAdminSnippet(id) {
|
|
482
|
-
const response = await this.get(`/app-administration-snippet/${id}
|
|
490
|
+
async getAdminSnippet(id, query) {
|
|
491
|
+
const response = await this.get(`/app-administration-snippet/${id}` + buildQuery(query), {
|
|
483
492
|
headers: { Accept: "application/json" }
|
|
484
493
|
});
|
|
485
494
|
if (response.statusCode === 200)
|
|
@@ -531,9 +540,8 @@ class AppClient extends Client {
|
|
|
531
540
|
/**
|
|
532
541
|
* @throws {Error} if the request failed
|
|
533
542
|
*/
|
|
534
|
-
async getCmsBlocks(
|
|
535
|
-
const response = await this.get(`/app-cms-block
|
|
536
|
-
query: { limit, page, query },
|
|
543
|
+
async getCmsBlocks(query) {
|
|
544
|
+
const response = await this.get(`/app-cms-block` + buildQuery(query), {
|
|
537
545
|
headers: { Accept: "application/json" }
|
|
538
546
|
});
|
|
539
547
|
if (response.statusCode === 200)
|
|
@@ -572,8 +580,8 @@ class AppClient extends Client {
|
|
|
572
580
|
/**
|
|
573
581
|
* @throws {Error} if the request failed
|
|
574
582
|
*/
|
|
575
|
-
async getCmsBlock(id) {
|
|
576
|
-
const response = await this.get(`/app-cms-block/${id}
|
|
583
|
+
async getCmsBlock(id, query) {
|
|
584
|
+
const response = await this.get(`/app-cms-block/${id}` + buildQuery(query), {
|
|
577
585
|
headers: { Accept: "application/json" }
|
|
578
586
|
});
|
|
579
587
|
if (response.statusCode === 200)
|
|
@@ -619,9 +627,8 @@ class AppClient extends Client {
|
|
|
619
627
|
/**
|
|
620
628
|
* @throws {Error} if the request failed
|
|
621
629
|
*/
|
|
622
|
-
async getFlowActions(
|
|
623
|
-
const response = await this.get(`/app-flow-action
|
|
624
|
-
query: { limit, page, query },
|
|
630
|
+
async getFlowActions(query) {
|
|
631
|
+
const response = await this.get(`/app-flow-action` + buildQuery(query), {
|
|
625
632
|
headers: { Accept: "application/json" }
|
|
626
633
|
});
|
|
627
634
|
if (response.statusCode === 200)
|
|
@@ -660,8 +667,8 @@ class AppClient extends Client {
|
|
|
660
667
|
/**
|
|
661
668
|
* @throws {Error} if the request failed
|
|
662
669
|
*/
|
|
663
|
-
async getFlowAction(id) {
|
|
664
|
-
const response = await this.get(`/app-flow-action/${id}
|
|
670
|
+
async getFlowAction(id, query) {
|
|
671
|
+
const response = await this.get(`/app-flow-action/${id}` + buildQuery(query), {
|
|
665
672
|
headers: { Accept: "application/json" }
|
|
666
673
|
});
|
|
667
674
|
if (response.statusCode === 200)
|
|
@@ -713,9 +720,8 @@ class AppClient extends Client {
|
|
|
713
720
|
/**
|
|
714
721
|
* @throws {Error} if the request failed
|
|
715
722
|
*/
|
|
716
|
-
async getFlowEvents(
|
|
717
|
-
const response = await this.get(`/app-flow-event
|
|
718
|
-
query: { limit, page, query },
|
|
723
|
+
async getFlowEvents(query) {
|
|
724
|
+
const response = await this.get(`/app-flow-event` + buildQuery(query), {
|
|
719
725
|
headers: { Accept: "application/json" }
|
|
720
726
|
});
|
|
721
727
|
if (response.statusCode === 200)
|
|
@@ -754,8 +760,8 @@ class AppClient extends Client {
|
|
|
754
760
|
/**
|
|
755
761
|
* @throws {Error} if the request failed
|
|
756
762
|
*/
|
|
757
|
-
async getFlowEvent(id) {
|
|
758
|
-
const response = await this.get(`/app-flow-event/${id}
|
|
763
|
+
async getFlowEvent(id, query) {
|
|
764
|
+
const response = await this.get(`/app-flow-event/${id}` + buildQuery(query), {
|
|
759
765
|
headers: { Accept: "application/json" }
|
|
760
766
|
});
|
|
761
767
|
if (response.statusCode === 200)
|
|
@@ -805,9 +811,8 @@ class AppClient extends Client {
|
|
|
805
811
|
/**
|
|
806
812
|
* @throws {Error} if the request failed
|
|
807
813
|
*/
|
|
808
|
-
async getPaymentMethods(
|
|
809
|
-
const response = await this.get(`/app-payment-method
|
|
810
|
-
query: { limit, page, query },
|
|
814
|
+
async getPaymentMethods(query) {
|
|
815
|
+
const response = await this.get(`/app-payment-method` + buildQuery(query), {
|
|
811
816
|
headers: { Accept: "application/json" }
|
|
812
817
|
});
|
|
813
818
|
if (response.statusCode === 200)
|
|
@@ -846,8 +851,8 @@ class AppClient extends Client {
|
|
|
846
851
|
/**
|
|
847
852
|
* @throws {Error} if the request failed
|
|
848
853
|
*/
|
|
849
|
-
async getPaymentMethod(id) {
|
|
850
|
-
const response = await this.get(`/app-payment-method/${id}
|
|
854
|
+
async getPaymentMethod(id, query) {
|
|
855
|
+
const response = await this.get(`/app-payment-method/${id}` + buildQuery(query), {
|
|
851
856
|
headers: { Accept: "application/json" }
|
|
852
857
|
});
|
|
853
858
|
if (response.statusCode === 200)
|
|
@@ -899,9 +904,8 @@ class AppClient extends Client {
|
|
|
899
904
|
/**
|
|
900
905
|
* @throws {Error} if the request failed
|
|
901
906
|
*/
|
|
902
|
-
async getScriptConditions(
|
|
903
|
-
const response = await this.get(`/app-script-condition
|
|
904
|
-
query: { limit, page, query },
|
|
907
|
+
async getScriptConditions(query) {
|
|
908
|
+
const response = await this.get(`/app-script-condition` + buildQuery(query), {
|
|
905
909
|
headers: { Accept: "application/json" }
|
|
906
910
|
});
|
|
907
911
|
if (response.statusCode === 200)
|
|
@@ -940,8 +944,8 @@ class AppClient extends Client {
|
|
|
940
944
|
/**
|
|
941
945
|
* @throws {Error} if the request failed
|
|
942
946
|
*/
|
|
943
|
-
async getScriptCondition(id) {
|
|
944
|
-
const response = await this.get(`/app-script-condition/${id}
|
|
947
|
+
async getScriptCondition(id, query) {
|
|
948
|
+
const response = await this.get(`/app-script-condition/${id}` + buildQuery(query), {
|
|
945
949
|
headers: { Accept: "application/json" }
|
|
946
950
|
});
|
|
947
951
|
if (response.statusCode === 200)
|
|
@@ -993,9 +997,8 @@ class AppClient extends Client {
|
|
|
993
997
|
/**
|
|
994
998
|
* @throws {Error} if the request failed
|
|
995
999
|
*/
|
|
996
|
-
async getShippingMethods(
|
|
997
|
-
const response = await this.get(`/app-shipping-method
|
|
998
|
-
query: { limit, page, query },
|
|
1000
|
+
async getShippingMethods(query) {
|
|
1001
|
+
const response = await this.get(`/app-shipping-method` + buildQuery(query), {
|
|
999
1002
|
headers: { Accept: "application/json" }
|
|
1000
1003
|
});
|
|
1001
1004
|
if (response.statusCode === 200)
|
|
@@ -1034,8 +1037,8 @@ class AppClient extends Client {
|
|
|
1034
1037
|
/**
|
|
1035
1038
|
* @throws {Error} if the request failed
|
|
1036
1039
|
*/
|
|
1037
|
-
async getShippingMethod(id) {
|
|
1038
|
-
const response = await this.get(`/app-shipping-method/${id}
|
|
1040
|
+
async getShippingMethod(id, query) {
|
|
1041
|
+
const response = await this.get(`/app-shipping-method/${id}` + buildQuery(query), {
|
|
1039
1042
|
headers: { Accept: "application/json" }
|
|
1040
1043
|
});
|
|
1041
1044
|
if (response.statusCode === 200)
|
|
@@ -1087,9 +1090,8 @@ class AppClient extends Client {
|
|
|
1087
1090
|
/**
|
|
1088
1091
|
* @throws {Error} if the request failed
|
|
1089
1092
|
*/
|
|
1090
|
-
async getTemplates(
|
|
1091
|
-
const response = await this.get(`/app-template
|
|
1092
|
-
query: { limit, page, query },
|
|
1093
|
+
async getTemplates(query) {
|
|
1094
|
+
const response = await this.get(`/app-template` + buildQuery(query), {
|
|
1093
1095
|
headers: { Accept: "application/json" }
|
|
1094
1096
|
});
|
|
1095
1097
|
if (response.statusCode === 200)
|
|
@@ -1128,8 +1130,8 @@ class AppClient extends Client {
|
|
|
1128
1130
|
/**
|
|
1129
1131
|
* @throws {Error} if the request failed
|
|
1130
1132
|
*/
|
|
1131
|
-
async getTemplate(id) {
|
|
1132
|
-
const response = await this.get(`/app-template/${id}
|
|
1133
|
+
async getTemplate(id, query) {
|
|
1134
|
+
const response = await this.get(`/app-template/${id}` + buildQuery(query), {
|
|
1133
1135
|
headers: { Accept: "application/json" }
|
|
1134
1136
|
});
|
|
1135
1137
|
if (response.statusCode === 200)
|
|
@@ -1178,9 +1180,8 @@ let CategoryClient$1 = class CategoryClient extends Client {
|
|
|
1178
1180
|
/**
|
|
1179
1181
|
* @throws {Error} if the request failed
|
|
1180
1182
|
*/
|
|
1181
|
-
async getCategories(
|
|
1182
|
-
const response = await this.get(`/category
|
|
1183
|
-
query: { limit, page, query },
|
|
1183
|
+
async getCategories(query) {
|
|
1184
|
+
const response = await this.get(`/category` + buildQuery(query), {
|
|
1184
1185
|
headers: { Accept: "application/json" }
|
|
1185
1186
|
});
|
|
1186
1187
|
if (response.statusCode === 200)
|
|
@@ -1219,8 +1220,10 @@ let CategoryClient$1 = class CategoryClient extends Client {
|
|
|
1219
1220
|
/**
|
|
1220
1221
|
* @throws {Error} if the request failed
|
|
1221
1222
|
*/
|
|
1222
|
-
async getCategory(id) {
|
|
1223
|
-
const response = await this.get(`/category/${id}
|
|
1223
|
+
async getCategory(id, query) {
|
|
1224
|
+
const response = await this.get(`/category/${id}` + buildQuery(query), {
|
|
1225
|
+
headers: { Accept: "application/json" }
|
|
1226
|
+
});
|
|
1224
1227
|
if (response.statusCode === 200)
|
|
1225
1228
|
return response.body.data;
|
|
1226
1229
|
throw new Error(`Failed to fetch category: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -1264,9 +1267,8 @@ let CategoryClient$1 = class CategoryClient extends Client {
|
|
|
1264
1267
|
/**
|
|
1265
1268
|
* @throws {Error} if the request failed
|
|
1266
1269
|
*/
|
|
1267
|
-
async getMainCategories(
|
|
1268
|
-
const response = await this.get(`/main-category
|
|
1269
|
-
query: { limit, page, query },
|
|
1270
|
+
async getMainCategories(query) {
|
|
1271
|
+
const response = await this.get(`/main-category` + buildQuery(query), {
|
|
1270
1272
|
headers: { Accept: "application/json" }
|
|
1271
1273
|
});
|
|
1272
1274
|
if (response.statusCode === 200)
|
|
@@ -1307,8 +1309,8 @@ let CategoryClient$1 = class CategoryClient extends Client {
|
|
|
1307
1309
|
/**
|
|
1308
1310
|
* @throws {Error} if the request failed
|
|
1309
1311
|
*/
|
|
1310
|
-
async getMainCategory(id) {
|
|
1311
|
-
const response = await this.get(`/main-category/${id}
|
|
1312
|
+
async getMainCategory(id, query) {
|
|
1313
|
+
const response = await this.get(`/main-category/${id}` + buildQuery(query), {
|
|
1312
1314
|
headers: { Accept: "application/json" }
|
|
1313
1315
|
});
|
|
1314
1316
|
if (response.statusCode === 200)
|
|
@@ -1363,9 +1365,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1363
1365
|
/**
|
|
1364
1366
|
* @throws {Error} if the request failed
|
|
1365
1367
|
*/
|
|
1366
|
-
async getCmsBlocks(
|
|
1367
|
-
const response = await this.get(`/cms-block
|
|
1368
|
-
query: { limit, page, query },
|
|
1368
|
+
async getCmsBlocks(query) {
|
|
1369
|
+
const response = await this.get(`/cms-block` + buildQuery(query), {
|
|
1369
1370
|
headers: { Accept: "application/json" }
|
|
1370
1371
|
});
|
|
1371
1372
|
if (response.statusCode === 200)
|
|
@@ -1404,8 +1405,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1404
1405
|
/**
|
|
1405
1406
|
* @throws {Error} if the request failed
|
|
1406
1407
|
*/
|
|
1407
|
-
async getCmsBlock(id) {
|
|
1408
|
-
const response = await this.get(`/cms-block/${id}
|
|
1408
|
+
async getCmsBlock(id, query) {
|
|
1409
|
+
const response = await this.get(`/cms-block/${id}` + buildQuery(query), {
|
|
1409
1410
|
headers: { Accept: "application/json" }
|
|
1410
1411
|
});
|
|
1411
1412
|
if (response.statusCode === 200)
|
|
@@ -1451,9 +1452,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1451
1452
|
/**
|
|
1452
1453
|
* @throws {Error} if the request failed
|
|
1453
1454
|
*/
|
|
1454
|
-
async getCmsPages(
|
|
1455
|
-
const response = await this.get(`/cms-page
|
|
1456
|
-
query: { limit, page, query },
|
|
1455
|
+
async getCmsPages(query) {
|
|
1456
|
+
const response = await this.get(`/cms-page` + buildQuery(query), {
|
|
1457
1457
|
headers: { Accept: "application/json" }
|
|
1458
1458
|
});
|
|
1459
1459
|
if (response.statusCode === 200)
|
|
@@ -1492,8 +1492,10 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1492
1492
|
/**
|
|
1493
1493
|
* @throws {Error} if the request failed
|
|
1494
1494
|
*/
|
|
1495
|
-
async getCmsPage(id) {
|
|
1496
|
-
const response = await this.get(`/cms-page/${id}
|
|
1495
|
+
async getCmsPage(id, query) {
|
|
1496
|
+
const response = await this.get(`/cms-page/${id}` + buildQuery(query), {
|
|
1497
|
+
headers: { Accept: "application/json" }
|
|
1498
|
+
});
|
|
1497
1499
|
if (response.statusCode === 200)
|
|
1498
1500
|
return response.body.data;
|
|
1499
1501
|
throw new Error(`Failed to fetch cms page: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -1537,9 +1539,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1537
1539
|
/**
|
|
1538
1540
|
* @throws {Error} if the request failed
|
|
1539
1541
|
*/
|
|
1540
|
-
async getCmsSections(
|
|
1541
|
-
const response = await this.get(`/cms-section
|
|
1542
|
-
query: { limit, page, query },
|
|
1542
|
+
async getCmsSections(query) {
|
|
1543
|
+
const response = await this.get(`/cms-section` + buildQuery(query), {
|
|
1543
1544
|
headers: { Accept: "application/json" }
|
|
1544
1545
|
});
|
|
1545
1546
|
if (response.statusCode === 200)
|
|
@@ -1580,8 +1581,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1580
1581
|
/**
|
|
1581
1582
|
* @throws {Error} if the request failed
|
|
1582
1583
|
*/
|
|
1583
|
-
async getCmsSection(id) {
|
|
1584
|
-
const response = await this.get(`/cms-section/${id}
|
|
1584
|
+
async getCmsSection(id, query) {
|
|
1585
|
+
const response = await this.get(`/cms-section/${id}` + buildQuery(query), {
|
|
1585
1586
|
headers: { Accept: "application/json" }
|
|
1586
1587
|
});
|
|
1587
1588
|
if (response.statusCode === 200)
|
|
@@ -1633,9 +1634,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1633
1634
|
/**
|
|
1634
1635
|
* @throws {Error} if the request failed
|
|
1635
1636
|
*/
|
|
1636
|
-
async getCmsSlots(
|
|
1637
|
-
const response = await this.get(`/cms-slot
|
|
1638
|
-
query: { limit, page, query },
|
|
1637
|
+
async getCmsSlots(query) {
|
|
1638
|
+
const response = await this.get(`/cms-slot` + buildQuery(query), {
|
|
1639
1639
|
headers: { Accept: "application/json" }
|
|
1640
1640
|
});
|
|
1641
1641
|
if (response.statusCode === 200)
|
|
@@ -1674,8 +1674,10 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1674
1674
|
/**
|
|
1675
1675
|
* @throws {Error} if the request failed
|
|
1676
1676
|
*/
|
|
1677
|
-
async getCmsSlot(id) {
|
|
1678
|
-
const response = await this.get(`/cms-slot/${id}
|
|
1677
|
+
async getCmsSlot(id, query) {
|
|
1678
|
+
const response = await this.get(`/cms-slot/${id}` + buildQuery(query), {
|
|
1679
|
+
headers: { Accept: "application/json" }
|
|
1680
|
+
});
|
|
1679
1681
|
if (response.statusCode === 200)
|
|
1680
1682
|
return response.body.data;
|
|
1681
1683
|
throw new Error(`Failed to fetch cms slot: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -1719,9 +1721,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1719
1721
|
/**
|
|
1720
1722
|
* @throws {Error} if the request failed
|
|
1721
1723
|
*/
|
|
1722
|
-
async getLandingPages(
|
|
1723
|
-
const response = await this.get(`/landing-page
|
|
1724
|
-
query: { limit, page, query },
|
|
1724
|
+
async getLandingPages(query) {
|
|
1725
|
+
const response = await this.get(`/landing-page` + buildQuery(query), {
|
|
1725
1726
|
headers: { Accept: "application/json" }
|
|
1726
1727
|
});
|
|
1727
1728
|
if (response.statusCode === 200)
|
|
@@ -1762,8 +1763,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1762
1763
|
/**
|
|
1763
1764
|
* @throws {Error} if the request failed
|
|
1764
1765
|
*/
|
|
1765
|
-
async getLandingPage(id) {
|
|
1766
|
-
const response = await this.get(`/landing-page/${id}
|
|
1766
|
+
async getLandingPage(id, query) {
|
|
1767
|
+
const response = await this.get(`/landing-page/${id}` + buildQuery(query), {
|
|
1767
1768
|
headers: { Accept: "application/json" }
|
|
1768
1769
|
});
|
|
1769
1770
|
if (response.statusCode === 200)
|
|
@@ -1815,9 +1816,8 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1815
1816
|
/**
|
|
1816
1817
|
* @throws {Error} if the request failed
|
|
1817
1818
|
*/
|
|
1818
|
-
async getThemes(
|
|
1819
|
-
const response = await this.get(`/theme
|
|
1820
|
-
query: { limit, page, query },
|
|
1819
|
+
async getThemes(query) {
|
|
1820
|
+
const response = await this.get(`/theme` + buildQuery(query), {
|
|
1821
1821
|
headers: { Accept: "application/json" }
|
|
1822
1822
|
});
|
|
1823
1823
|
if (response.statusCode === 200)
|
|
@@ -1854,8 +1854,10 @@ let ContentClient$1 = class ContentClient extends Client {
|
|
|
1854
1854
|
/**
|
|
1855
1855
|
* @throws {Error} if the request failed
|
|
1856
1856
|
*/
|
|
1857
|
-
async getTheme(id) {
|
|
1858
|
-
const response = await this.get(`/theme/${id}
|
|
1857
|
+
async getTheme(id, query) {
|
|
1858
|
+
const response = await this.get(`/theme/${id}` + buildQuery(query), {
|
|
1859
|
+
headers: { Accept: "application/json" }
|
|
1860
|
+
});
|
|
1859
1861
|
if (response.statusCode === 200)
|
|
1860
1862
|
return response.body.data;
|
|
1861
1863
|
throw new Error(`Failed to fetch theme: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -1900,9 +1902,8 @@ let CountryClient$1 = class CountryClient extends Client {
|
|
|
1900
1902
|
/**
|
|
1901
1903
|
* @throws {Error} if the request failed
|
|
1902
1904
|
*/
|
|
1903
|
-
async getCountries(
|
|
1904
|
-
const response = await this.get(`/country
|
|
1905
|
-
query: { limit, page, query },
|
|
1905
|
+
async getCountries(query) {
|
|
1906
|
+
const response = await this.get(`/country` + buildQuery(query), {
|
|
1906
1907
|
headers: { Accept: "application/json" }
|
|
1907
1908
|
});
|
|
1908
1909
|
if (response.statusCode === 200)
|
|
@@ -1941,8 +1942,10 @@ let CountryClient$1 = class CountryClient extends Client {
|
|
|
1941
1942
|
/**
|
|
1942
1943
|
* @throws {Error} if the request failed
|
|
1943
1944
|
*/
|
|
1944
|
-
async getCountry(id) {
|
|
1945
|
-
const response = await this.get(`/country/${id}
|
|
1945
|
+
async getCountry(id, query) {
|
|
1946
|
+
const response = await this.get(`/country/${id}` + buildQuery(query), {
|
|
1947
|
+
headers: { Accept: "application/json" }
|
|
1948
|
+
});
|
|
1946
1949
|
if (response.statusCode === 200)
|
|
1947
1950
|
return response.body.data;
|
|
1948
1951
|
throw new Error(`Failed to fetch country: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -1986,9 +1989,8 @@ let CountryClient$1 = class CountryClient extends Client {
|
|
|
1986
1989
|
/**
|
|
1987
1990
|
* @throws {Error} if the request failed
|
|
1988
1991
|
*/
|
|
1989
|
-
async getStates(
|
|
1990
|
-
const response = await this.get(`/country-state
|
|
1991
|
-
query: { limit, page, query },
|
|
1992
|
+
async getStates(query) {
|
|
1993
|
+
const response = await this.get(`/country-state` + buildQuery(query), {
|
|
1992
1994
|
headers: { Accept: "application/json" }
|
|
1993
1995
|
});
|
|
1994
1996
|
if (response.statusCode === 200)
|
|
@@ -2025,8 +2027,8 @@ let CountryClient$1 = class CountryClient extends Client {
|
|
|
2025
2027
|
/**
|
|
2026
2028
|
* @throws {Error} if the request failed
|
|
2027
2029
|
*/
|
|
2028
|
-
async getState(id) {
|
|
2029
|
-
const response = await this.get(`/country-state/${id}
|
|
2030
|
+
async getState(id, query) {
|
|
2031
|
+
const response = await this.get(`/country-state/${id}` + buildQuery(query), {
|
|
2030
2032
|
headers: { Accept: "application/json" }
|
|
2031
2033
|
});
|
|
2032
2034
|
if (response.statusCode === 200)
|
|
@@ -2073,9 +2075,8 @@ class CountryClient extends Client {
|
|
|
2073
2075
|
/**
|
|
2074
2076
|
* @throws {Error} if the request failed
|
|
2075
2077
|
*/
|
|
2076
|
-
async getCurrencies(
|
|
2077
|
-
const response = await this.get(`/currency
|
|
2078
|
-
query: { limit, page, query },
|
|
2078
|
+
async getCurrencies(query) {
|
|
2079
|
+
const response = await this.get(`/currency` + buildQuery(query), {
|
|
2079
2080
|
headers: { Accept: "application/json" }
|
|
2080
2081
|
});
|
|
2081
2082
|
if (response.statusCode === 200)
|
|
@@ -2114,8 +2115,10 @@ class CountryClient extends Client {
|
|
|
2114
2115
|
/**
|
|
2115
2116
|
* @throws {Error} if the request failed
|
|
2116
2117
|
*/
|
|
2117
|
-
async getCurrency(id) {
|
|
2118
|
-
const response = await this.get(`/currency/${id}
|
|
2118
|
+
async getCurrency(id, query) {
|
|
2119
|
+
const response = await this.get(`/currency/${id}` + buildQuery(query), {
|
|
2120
|
+
headers: { Accept: "application/json" }
|
|
2121
|
+
});
|
|
2119
2122
|
if (response.statusCode === 200)
|
|
2120
2123
|
return response.body.data;
|
|
2121
2124
|
throw new Error(`Failed to fetch currency: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -2159,9 +2162,8 @@ class CountryClient extends Client {
|
|
|
2159
2162
|
/**
|
|
2160
2163
|
* @throws {Error} if the request failed
|
|
2161
2164
|
*/
|
|
2162
|
-
async getCountryRoundings(
|
|
2163
|
-
const response = await this.get(`/currency-country-rounding
|
|
2164
|
-
query: { limit, page, query },
|
|
2165
|
+
async getCountryRoundings(query) {
|
|
2166
|
+
const response = await this.get(`/currency-country-rounding` + buildQuery(query), {
|
|
2165
2167
|
headers: { Accept: "application/json" }
|
|
2166
2168
|
});
|
|
2167
2169
|
if (response.statusCode === 200)
|
|
@@ -2202,8 +2204,8 @@ class CountryClient extends Client {
|
|
|
2202
2204
|
/**
|
|
2203
2205
|
* @throws {Error} if the request failed
|
|
2204
2206
|
*/
|
|
2205
|
-
async getCountryRounding(id) {
|
|
2206
|
-
const response = await this.get(`/currency-country-rounding/${id}
|
|
2207
|
+
async getCountryRounding(id, query) {
|
|
2208
|
+
const response = await this.get(`/currency-country-rounding/${id}` + buildQuery(query), {
|
|
2207
2209
|
headers: { Accept: "application/json" }
|
|
2208
2210
|
});
|
|
2209
2211
|
if (response.statusCode === 200)
|
|
@@ -2258,9 +2260,8 @@ class CustomDataClient extends Client {
|
|
|
2258
2260
|
/**
|
|
2259
2261
|
* @throws {Error} if the request failed
|
|
2260
2262
|
*/
|
|
2261
|
-
async getCustomEntities(
|
|
2262
|
-
const response = await this.get(`/custom-entity
|
|
2263
|
-
query: { limit, page, query },
|
|
2263
|
+
async getCustomEntities(query) {
|
|
2264
|
+
const response = await this.get(`/custom-entity` + buildQuery(query), {
|
|
2264
2265
|
headers: { Accept: "application/json" }
|
|
2265
2266
|
});
|
|
2266
2267
|
if (response.statusCode === 200)
|
|
@@ -2301,8 +2302,8 @@ class CustomDataClient extends Client {
|
|
|
2301
2302
|
/**
|
|
2302
2303
|
* @throws {Error} if the request failed
|
|
2303
2304
|
*/
|
|
2304
|
-
async getCustomEntity(id) {
|
|
2305
|
-
const response = await this.get(`/custom-entity/${id}
|
|
2305
|
+
async getCustomEntity(id, query) {
|
|
2306
|
+
const response = await this.get(`/custom-entity/${id}` + buildQuery(query), {
|
|
2306
2307
|
headers: { Accept: "application/json" }
|
|
2307
2308
|
});
|
|
2308
2309
|
if (response.statusCode === 200)
|
|
@@ -2354,9 +2355,8 @@ class CustomDataClient extends Client {
|
|
|
2354
2355
|
/**
|
|
2355
2356
|
* @throws {Error} if the request failed
|
|
2356
2357
|
*/
|
|
2357
|
-
async getCustomFields(
|
|
2358
|
-
const response = await this.get(`/custom-field
|
|
2359
|
-
query: { limit, page, query },
|
|
2358
|
+
async getCustomFields(query) {
|
|
2359
|
+
const response = await this.get(`/custom-field` + buildQuery(query), {
|
|
2360
2360
|
headers: { Accept: "application/json" }
|
|
2361
2361
|
});
|
|
2362
2362
|
if (response.statusCode === 200)
|
|
@@ -2397,8 +2397,8 @@ class CustomDataClient extends Client {
|
|
|
2397
2397
|
/**
|
|
2398
2398
|
* @throws {Error} if the request failed
|
|
2399
2399
|
*/
|
|
2400
|
-
async getCustomField(id) {
|
|
2401
|
-
const response = await this.get(`/custom-field/${id}
|
|
2400
|
+
async getCustomField(id, query) {
|
|
2401
|
+
const response = await this.get(`/custom-field/${id}` + buildQuery(query), {
|
|
2402
2402
|
headers: { Accept: "application/json" }
|
|
2403
2403
|
});
|
|
2404
2404
|
if (response.statusCode === 200)
|
|
@@ -2450,9 +2450,8 @@ class CustomDataClient extends Client {
|
|
|
2450
2450
|
/**
|
|
2451
2451
|
* @throws {Error} if the request failed
|
|
2452
2452
|
*/
|
|
2453
|
-
async getCustomFieldSets(
|
|
2454
|
-
const response = await this.get(`/custom-field-set
|
|
2455
|
-
query: { limit, page, query },
|
|
2453
|
+
async getCustomFieldSets(query) {
|
|
2454
|
+
const response = await this.get(`/custom-field-set` + buildQuery(query), {
|
|
2456
2455
|
headers: { Accept: "application/json" }
|
|
2457
2456
|
});
|
|
2458
2457
|
if (response.statusCode === 200)
|
|
@@ -2493,8 +2492,8 @@ class CustomDataClient extends Client {
|
|
|
2493
2492
|
/**
|
|
2494
2493
|
* @throws {Error} if the request failed
|
|
2495
2494
|
*/
|
|
2496
|
-
async getCustomFieldSet(id) {
|
|
2497
|
-
const response = await this.get(`/custom-field-set/${id}
|
|
2495
|
+
async getCustomFieldSet(id, query) {
|
|
2496
|
+
const response = await this.get(`/custom-field-set/${id}` + buildQuery(query), {
|
|
2498
2497
|
headers: { Accept: "application/json" }
|
|
2499
2498
|
});
|
|
2500
2499
|
if (response.statusCode === 200)
|
|
@@ -2546,9 +2545,8 @@ class CustomDataClient extends Client {
|
|
|
2546
2545
|
/**
|
|
2547
2546
|
* @throws {Error} if the request failed
|
|
2548
2547
|
*/
|
|
2549
|
-
async getCustomFieldSetRelations(
|
|
2550
|
-
const response = await this.get(`/custom-field-set-relation
|
|
2551
|
-
query: { limit, page, query },
|
|
2548
|
+
async getCustomFieldSetRelations(query) {
|
|
2549
|
+
const response = await this.get(`/custom-field-set-relation` + buildQuery(query), {
|
|
2552
2550
|
headers: { Accept: "application/json" }
|
|
2553
2551
|
});
|
|
2554
2552
|
if (response.statusCode === 200)
|
|
@@ -2589,8 +2587,8 @@ class CustomDataClient extends Client {
|
|
|
2589
2587
|
/**
|
|
2590
2588
|
* @throws {Error} if the request failed
|
|
2591
2589
|
*/
|
|
2592
|
-
async getCustomFieldSetRelation(id) {
|
|
2593
|
-
const response = await this.get(`/custom-field-set-relation/${id}
|
|
2590
|
+
async getCustomFieldSetRelation(id, query) {
|
|
2591
|
+
const response = await this.get(`/custom-field-set-relation/${id}` + buildQuery(query), {
|
|
2594
2592
|
headers: { Accept: "application/json" }
|
|
2595
2593
|
});
|
|
2596
2594
|
if (response.statusCode === 200)
|
|
@@ -2660,9 +2658,8 @@ class CustomerClient extends Client {
|
|
|
2660
2658
|
/**
|
|
2661
2659
|
* @throws {Error} if the request failed
|
|
2662
2660
|
*/
|
|
2663
|
-
async getCustomers(
|
|
2664
|
-
const response = await this.get(`/customer
|
|
2665
|
-
query: { limit, page, query },
|
|
2661
|
+
async getCustomers(query) {
|
|
2662
|
+
const response = await this.get(`/customer` + buildQuery(query), {
|
|
2666
2663
|
headers: { Accept: "application/json" }
|
|
2667
2664
|
});
|
|
2668
2665
|
if (response.statusCode === 200)
|
|
@@ -2701,8 +2698,10 @@ class CustomerClient extends Client {
|
|
|
2701
2698
|
/**
|
|
2702
2699
|
* @throws {Error} if the request failed
|
|
2703
2700
|
*/
|
|
2704
|
-
async getCustomer(id) {
|
|
2705
|
-
const response = await this.get(`/customer/${id}
|
|
2701
|
+
async getCustomer(id, query) {
|
|
2702
|
+
const response = await this.get(`/customer/${id}` + buildQuery(query), {
|
|
2703
|
+
headers: { Accept: "application/json" }
|
|
2704
|
+
});
|
|
2706
2705
|
if (response.statusCode === 200)
|
|
2707
2706
|
return response.body.data;
|
|
2708
2707
|
throw new Error(`Failed to fetch customer: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -2746,9 +2745,8 @@ class CustomerClient extends Client {
|
|
|
2746
2745
|
/**
|
|
2747
2746
|
* @throws {Error} if the request failed
|
|
2748
2747
|
*/
|
|
2749
|
-
async getAddresses(
|
|
2750
|
-
const response = await this.get(`/address
|
|
2751
|
-
query: { limit, page, query },
|
|
2748
|
+
async getAddresses(query) {
|
|
2749
|
+
const response = await this.get(`/address` + buildQuery(query), {
|
|
2752
2750
|
headers: { Accept: "application/json" }
|
|
2753
2751
|
});
|
|
2754
2752
|
if (response.statusCode === 200)
|
|
@@ -2787,8 +2785,10 @@ class CustomerClient extends Client {
|
|
|
2787
2785
|
/**
|
|
2788
2786
|
* @throws {Error} if the request failed
|
|
2789
2787
|
*/
|
|
2790
|
-
async getAddress(id) {
|
|
2791
|
-
const response = await this.get(`/address/${id}
|
|
2788
|
+
async getAddress(id, query) {
|
|
2789
|
+
const response = await this.get(`/address/${id}` + buildQuery(query), {
|
|
2790
|
+
headers: { Accept: "application/json" }
|
|
2791
|
+
});
|
|
2792
2792
|
if (response.statusCode === 200)
|
|
2793
2793
|
return response.body.data;
|
|
2794
2794
|
throw new Error(`Failed to fetch address: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -2832,9 +2832,8 @@ class CustomerClient extends Client {
|
|
|
2832
2832
|
/**
|
|
2833
2833
|
* @throws {Error} if the request failed
|
|
2834
2834
|
*/
|
|
2835
|
-
async getGroups(
|
|
2836
|
-
const response = await this.get(`/customer-group
|
|
2837
|
-
query: { limit, page, query },
|
|
2835
|
+
async getGroups(query) {
|
|
2836
|
+
const response = await this.get(`/customer-group` + buildQuery(query), {
|
|
2838
2837
|
headers: { Accept: "application/json" }
|
|
2839
2838
|
});
|
|
2840
2839
|
if (response.statusCode === 200)
|
|
@@ -2871,8 +2870,8 @@ class CustomerClient extends Client {
|
|
|
2871
2870
|
/**
|
|
2872
2871
|
* @throws {Error} if the request failed
|
|
2873
2872
|
*/
|
|
2874
|
-
async getGroup(id) {
|
|
2875
|
-
const response = await this.get(`/customer-group/${id}
|
|
2873
|
+
async getGroup(id, query) {
|
|
2874
|
+
const response = await this.get(`/customer-group/${id}` + buildQuery(query), {
|
|
2876
2875
|
headers: { Accept: "application/json" }
|
|
2877
2876
|
});
|
|
2878
2877
|
if (response.statusCode === 200)
|
|
@@ -2916,9 +2915,8 @@ class CustomerClient extends Client {
|
|
|
2916
2915
|
/**
|
|
2917
2916
|
* @throws {Error} if the request failed
|
|
2918
2917
|
*/
|
|
2919
|
-
async getRecoveries(
|
|
2920
|
-
const response = await this.get(`/customer-recovery
|
|
2921
|
-
query: { limit, page, query },
|
|
2918
|
+
async getRecoveries(query) {
|
|
2919
|
+
const response = await this.get(`/customer-recovery` + buildQuery(query), {
|
|
2922
2920
|
headers: { Accept: "application/json" }
|
|
2923
2921
|
});
|
|
2924
2922
|
if (response.statusCode === 200)
|
|
@@ -2957,8 +2955,8 @@ class CustomerClient extends Client {
|
|
|
2957
2955
|
/**
|
|
2958
2956
|
* @throws {Error} if the request failed
|
|
2959
2957
|
*/
|
|
2960
|
-
async getRecovery(id) {
|
|
2961
|
-
const response = await this.get(`/customer-recovery/${id}
|
|
2958
|
+
async getRecovery(id, query) {
|
|
2959
|
+
const response = await this.get(`/customer-recovery/${id}` + buildQuery(query), {
|
|
2962
2960
|
headers: { Accept: "application/json" }
|
|
2963
2961
|
});
|
|
2964
2962
|
if (response.statusCode === 200)
|
|
@@ -3004,9 +3002,8 @@ class CustomerClient extends Client {
|
|
|
3004
3002
|
/**
|
|
3005
3003
|
* @throws {Error} if the request failed
|
|
3006
3004
|
*/
|
|
3007
|
-
async getWishlists(
|
|
3008
|
-
const response = await this.get(`/customer-wishlist
|
|
3009
|
-
query: { limit, page, query },
|
|
3005
|
+
async getWishlists(query) {
|
|
3006
|
+
const response = await this.get(`/customer-wishlist` + buildQuery(query), {
|
|
3010
3007
|
headers: { Accept: "application/json" }
|
|
3011
3008
|
});
|
|
3012
3009
|
if (response.statusCode === 200)
|
|
@@ -3045,8 +3042,8 @@ class CustomerClient extends Client {
|
|
|
3045
3042
|
/**
|
|
3046
3043
|
* @throws {Error} if the request failed
|
|
3047
3044
|
*/
|
|
3048
|
-
async getWishlist(id) {
|
|
3049
|
-
const response = await this.get(`/customer-wishlist/${id}
|
|
3045
|
+
async getWishlist(id, query) {
|
|
3046
|
+
const response = await this.get(`/customer-wishlist/${id}` + buildQuery(query), {
|
|
3050
3047
|
headers: { Accept: "application/json" }
|
|
3051
3048
|
});
|
|
3052
3049
|
if (response.statusCode === 200)
|
|
@@ -3092,9 +3089,8 @@ class CustomerClient extends Client {
|
|
|
3092
3089
|
/**
|
|
3093
3090
|
* @throws {Error} if the request failed
|
|
3094
3091
|
*/
|
|
3095
|
-
async getWishlistProducts(
|
|
3096
|
-
const response = await this.get(`/customer-wishlist-product
|
|
3097
|
-
query: { limit, page, query },
|
|
3092
|
+
async getWishlistProducts(query) {
|
|
3093
|
+
const response = await this.get(`/customer-wishlist-product` + buildQuery(query), {
|
|
3098
3094
|
headers: { Accept: "application/json" }
|
|
3099
3095
|
});
|
|
3100
3096
|
if (response.statusCode === 200)
|
|
@@ -3135,8 +3131,8 @@ class CustomerClient extends Client {
|
|
|
3135
3131
|
/**
|
|
3136
3132
|
* @throws {Error} if the request failed
|
|
3137
3133
|
*/
|
|
3138
|
-
async getWishlistProduct(id) {
|
|
3139
|
-
const response = await this.get(`/customer-wishlist-product/${id}
|
|
3134
|
+
async getWishlistProduct(id, query) {
|
|
3135
|
+
const response = await this.get(`/customer-wishlist-product/${id}` + buildQuery(query), {
|
|
3140
3136
|
headers: { Accept: "application/json" }
|
|
3141
3137
|
});
|
|
3142
3138
|
if (response.statusCode === 200)
|
|
@@ -3190,9 +3186,8 @@ let DeliveryTimeClient$4 = class DeliveryTimeClient extends Client {
|
|
|
3190
3186
|
/**
|
|
3191
3187
|
* @throws {Error} if the request failed
|
|
3192
3188
|
*/
|
|
3193
|
-
async getDeliveryTimes(
|
|
3194
|
-
const response = await this.get(`/delivery-time
|
|
3195
|
-
query: { limit, page, query },
|
|
3189
|
+
async getDeliveryTimes(query) {
|
|
3190
|
+
const response = await this.get(`/delivery-time` + buildQuery(query), {
|
|
3196
3191
|
headers: { Accept: "application/json" }
|
|
3197
3192
|
});
|
|
3198
3193
|
if (response.statusCode === 200)
|
|
@@ -3233,8 +3228,8 @@ let DeliveryTimeClient$4 = class DeliveryTimeClient extends Client {
|
|
|
3233
3228
|
/**
|
|
3234
3229
|
* @throws {Error} if the request failed
|
|
3235
3230
|
*/
|
|
3236
|
-
async getDeliveryTime(id) {
|
|
3237
|
-
const response = await this.get(`/delivery-time/${id}
|
|
3231
|
+
async getDeliveryTime(id, query) {
|
|
3232
|
+
const response = await this.get(`/delivery-time/${id}` + buildQuery(query), {
|
|
3238
3233
|
headers: { Accept: "application/json" }
|
|
3239
3234
|
});
|
|
3240
3235
|
if (response.statusCode === 200)
|
|
@@ -3333,9 +3328,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3333
3328
|
/**
|
|
3334
3329
|
* @throws {Error} if the request failed
|
|
3335
3330
|
*/
|
|
3336
|
-
async getDocuments(
|
|
3337
|
-
const response = await this.get(`/document
|
|
3338
|
-
query: { limit, page, query },
|
|
3331
|
+
async getDocuments(query) {
|
|
3332
|
+
const response = await this.get(`/document` + buildQuery(query), {
|
|
3339
3333
|
headers: { Accept: "application/json" }
|
|
3340
3334
|
});
|
|
3341
3335
|
if (response.statusCode === 200)
|
|
@@ -3374,8 +3368,10 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3374
3368
|
/**
|
|
3375
3369
|
* @throws {Error} if the request failed
|
|
3376
3370
|
*/
|
|
3377
|
-
async getDocument(id) {
|
|
3378
|
-
const response = await this.get(`/document/${id}
|
|
3371
|
+
async getDocument(id, query) {
|
|
3372
|
+
const response = await this.get(`/document/${id}` + buildQuery(query), {
|
|
3373
|
+
headers: { Accept: "application/json" }
|
|
3374
|
+
});
|
|
3379
3375
|
if (response.statusCode === 200)
|
|
3380
3376
|
return response.body.data;
|
|
3381
3377
|
throw new Error(`Failed to fetch document: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -3419,9 +3415,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3419
3415
|
/**
|
|
3420
3416
|
* @throws {Error} if the request failed
|
|
3421
3417
|
*/
|
|
3422
|
-
async getBaseConfigs(
|
|
3423
|
-
const response = await this.get(`/document-base-config
|
|
3424
|
-
query: { limit, page, query },
|
|
3418
|
+
async getBaseConfigs(query) {
|
|
3419
|
+
const response = await this.get(`/document-base-config` + buildQuery(query), {
|
|
3425
3420
|
headers: { Accept: "application/json" }
|
|
3426
3421
|
});
|
|
3427
3422
|
if (response.statusCode === 200)
|
|
@@ -3462,8 +3457,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3462
3457
|
/**
|
|
3463
3458
|
* @throws {Error} if the request failed
|
|
3464
3459
|
*/
|
|
3465
|
-
async getBaseConfig(id) {
|
|
3466
|
-
const response = await this.get(`/document-base-config/${id}
|
|
3460
|
+
async getBaseConfig(id, query) {
|
|
3461
|
+
const response = await this.get(`/document-base-config/${id}` + buildQuery(query), {
|
|
3467
3462
|
headers: { Accept: "application/json" }
|
|
3468
3463
|
});
|
|
3469
3464
|
if (response.statusCode === 200)
|
|
@@ -3515,9 +3510,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3515
3510
|
/**
|
|
3516
3511
|
* @throws {Error} if the request failed
|
|
3517
3512
|
*/
|
|
3518
|
-
async getBaseConfigSalesChannels(
|
|
3519
|
-
const response = await this.get(`/document-base-config-sales-channel
|
|
3520
|
-
query: { limit, page, query },
|
|
3513
|
+
async getBaseConfigSalesChannels(query) {
|
|
3514
|
+
const response = await this.get(`/document-base-config-sales-channel` + buildQuery(query), {
|
|
3521
3515
|
headers: { Accept: "application/json" }
|
|
3522
3516
|
});
|
|
3523
3517
|
if (response.statusCode === 200)
|
|
@@ -3558,10 +3552,13 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3558
3552
|
/**
|
|
3559
3553
|
* @throws {Error} if the request failed
|
|
3560
3554
|
*/
|
|
3561
|
-
async getBaseConfigSalesChannel(id) {
|
|
3562
|
-
const response = await this.get(
|
|
3563
|
-
|
|
3564
|
-
|
|
3555
|
+
async getBaseConfigSalesChannel(id, query) {
|
|
3556
|
+
const response = await this.get(
|
|
3557
|
+
`/document-base-config-sales-channel/${id}` + buildQuery(query),
|
|
3558
|
+
{
|
|
3559
|
+
headers: { Accept: "application/json" }
|
|
3560
|
+
}
|
|
3561
|
+
);
|
|
3565
3562
|
if (response.statusCode === 200)
|
|
3566
3563
|
return response.body.data;
|
|
3567
3564
|
throw new Error(
|
|
@@ -3611,9 +3608,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3611
3608
|
/**
|
|
3612
3609
|
* @throws {Error} if the request failed
|
|
3613
3610
|
*/
|
|
3614
|
-
async getDocumentTypes(
|
|
3615
|
-
const response = await this.get(`/document-type
|
|
3616
|
-
query: { limit, page, query },
|
|
3611
|
+
async getDocumentTypes(query) {
|
|
3612
|
+
const response = await this.get(`/document-type` + buildQuery(query), {
|
|
3617
3613
|
headers: { Accept: "application/json" }
|
|
3618
3614
|
});
|
|
3619
3615
|
if (response.statusCode === 200)
|
|
@@ -3654,8 +3650,8 @@ let DocumentClient$1 = class DocumentClient extends Client {
|
|
|
3654
3650
|
/**
|
|
3655
3651
|
* @throws {Error} if the request failed
|
|
3656
3652
|
*/
|
|
3657
|
-
async getDocumentType(id) {
|
|
3658
|
-
const response = await this.get(`/document-type/${id}
|
|
3653
|
+
async getDocumentType(id, query) {
|
|
3654
|
+
const response = await this.get(`/document-type/${id}` + buildQuery(query), {
|
|
3659
3655
|
headers: { Accept: "application/json" }
|
|
3660
3656
|
});
|
|
3661
3657
|
if (response.statusCode === 200)
|
|
@@ -3710,9 +3706,8 @@ class FlowClient extends Client {
|
|
|
3710
3706
|
/**
|
|
3711
3707
|
* @throws {Error} if the request failed
|
|
3712
3708
|
*/
|
|
3713
|
-
async getFlows(
|
|
3714
|
-
const response = await this.get(`/flow
|
|
3715
|
-
query: { limit, page, query },
|
|
3709
|
+
async getFlows(query) {
|
|
3710
|
+
const response = await this.get(`/flow` + buildQuery(query), {
|
|
3716
3711
|
headers: { Accept: "application/json" }
|
|
3717
3712
|
});
|
|
3718
3713
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -3746,8 +3741,10 @@ class FlowClient extends Client {
|
|
|
3746
3741
|
/**
|
|
3747
3742
|
* @throws {Error} if the request failed
|
|
3748
3743
|
*/
|
|
3749
|
-
async getFlow(id) {
|
|
3750
|
-
const response = await this.get(`/flow/${id}
|
|
3744
|
+
async getFlow(id, query) {
|
|
3745
|
+
const response = await this.get(`/flow/${id}` + buildQuery(query), {
|
|
3746
|
+
headers: { Accept: "application/json" }
|
|
3747
|
+
});
|
|
3751
3748
|
if (response.statusCode === 200)
|
|
3752
3749
|
return response.body.data;
|
|
3753
3750
|
throw new Error(`Failed to fetch flow: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -3789,9 +3786,8 @@ class FlowClient extends Client {
|
|
|
3789
3786
|
/**
|
|
3790
3787
|
* @throws {Error} if the request failed
|
|
3791
3788
|
*/
|
|
3792
|
-
async getFlowSequences(
|
|
3793
|
-
const response = await this.get(`/flow-sequence
|
|
3794
|
-
query: { limit, page, query },
|
|
3789
|
+
async getFlowSequences(query) {
|
|
3790
|
+
const response = await this.get(`/flow-sequence` + buildQuery(query), {
|
|
3795
3791
|
headers: { Accept: "application/json" }
|
|
3796
3792
|
});
|
|
3797
3793
|
if (response.statusCode === 200)
|
|
@@ -3832,8 +3828,8 @@ class FlowClient extends Client {
|
|
|
3832
3828
|
/**
|
|
3833
3829
|
* @throws {Error} if the request failed
|
|
3834
3830
|
*/
|
|
3835
|
-
async getFlowSequence(id) {
|
|
3836
|
-
const response = await this.get(`/flow-sequence/${id}
|
|
3831
|
+
async getFlowSequence(id, query) {
|
|
3832
|
+
const response = await this.get(`/flow-sequence/${id}` + buildQuery(query), {
|
|
3837
3833
|
headers: { Accept: "application/json" }
|
|
3838
3834
|
});
|
|
3839
3835
|
if (response.statusCode === 200)
|
|
@@ -3885,9 +3881,8 @@ class FlowClient extends Client {
|
|
|
3885
3881
|
/**
|
|
3886
3882
|
* @throws {Error} if the request failed
|
|
3887
3883
|
*/
|
|
3888
|
-
async getFlowTemplates(
|
|
3889
|
-
const response = await this.get(`/flow-template
|
|
3890
|
-
query: { limit, page, query },
|
|
3884
|
+
async getFlowTemplates(query) {
|
|
3885
|
+
const response = await this.get(`/flow-template` + buildQuery(query), {
|
|
3891
3886
|
headers: { Accept: "application/json" }
|
|
3892
3887
|
});
|
|
3893
3888
|
if (response.statusCode === 200)
|
|
@@ -3928,8 +3923,8 @@ class FlowClient extends Client {
|
|
|
3928
3923
|
/**
|
|
3929
3924
|
* @throws {Error} if the request failed
|
|
3930
3925
|
*/
|
|
3931
|
-
async getFlowTemplate(id) {
|
|
3932
|
-
const response = await this.get(`/flow-template/${id}
|
|
3926
|
+
async getFlowTemplate(id, query) {
|
|
3927
|
+
const response = await this.get(`/flow-template/${id}` + buildQuery(query), {
|
|
3933
3928
|
headers: { Accept: "application/json" }
|
|
3934
3929
|
});
|
|
3935
3930
|
if (response.statusCode === 200)
|
|
@@ -3984,9 +3979,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
3984
3979
|
/**
|
|
3985
3980
|
* @throws {Error} if the request failed
|
|
3986
3981
|
*/
|
|
3987
|
-
async getFiles(
|
|
3988
|
-
const response = await this.get(`/import-export-file
|
|
3989
|
-
query: { limit, page, query },
|
|
3982
|
+
async getFiles(query) {
|
|
3983
|
+
const response = await this.get(`/import-export-file` + buildQuery(query), {
|
|
3990
3984
|
headers: { Accept: "application/json" }
|
|
3991
3985
|
});
|
|
3992
3986
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -4022,8 +4016,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
4022
4016
|
/**
|
|
4023
4017
|
* @throws {Error} if the request failed
|
|
4024
4018
|
*/
|
|
4025
|
-
async getFile(id) {
|
|
4026
|
-
const response = await this.get(`/import-export-file/${id}
|
|
4019
|
+
async getFile(id, query) {
|
|
4020
|
+
const response = await this.get(`/import-export-file/${id}` + buildQuery(query), {
|
|
4027
4021
|
headers: { Accept: "application/json" }
|
|
4028
4022
|
});
|
|
4029
4023
|
if (response.statusCode === 200)
|
|
@@ -4067,9 +4061,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
4067
4061
|
/**
|
|
4068
4062
|
* @throws {Error} if the request failed
|
|
4069
4063
|
*/
|
|
4070
|
-
async getLogs(
|
|
4071
|
-
const response = await this.get(`/import-export-log
|
|
4072
|
-
query: { limit, page, query },
|
|
4064
|
+
async getLogs(query) {
|
|
4065
|
+
const response = await this.get(`/import-export-log` + buildQuery(query), {
|
|
4073
4066
|
headers: { Accept: "application/json" }
|
|
4074
4067
|
});
|
|
4075
4068
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -4103,8 +4096,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
4103
4096
|
/**
|
|
4104
4097
|
* @throws {Error} if the request failed
|
|
4105
4098
|
*/
|
|
4106
|
-
async getLog(id) {
|
|
4107
|
-
const response = await this.get(`/import-export-log/${id}
|
|
4099
|
+
async getLog(id, query) {
|
|
4100
|
+
const response = await this.get(`/import-export-log/${id}` + buildQuery(query), {
|
|
4108
4101
|
headers: { Accept: "application/json" }
|
|
4109
4102
|
});
|
|
4110
4103
|
if (response.statusCode === 200)
|
|
@@ -4148,9 +4141,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
4148
4141
|
/**
|
|
4149
4142
|
* @throws {Error} if the request failed
|
|
4150
4143
|
*/
|
|
4151
|
-
async getProfiles(
|
|
4152
|
-
const response = await this.get(`/import-export-profile
|
|
4153
|
-
query: { limit, page, query },
|
|
4144
|
+
async getProfiles(query) {
|
|
4145
|
+
const response = await this.get(`/import-export-profile` + buildQuery(query), {
|
|
4154
4146
|
headers: { Accept: "application/json" }
|
|
4155
4147
|
});
|
|
4156
4148
|
if (response.statusCode === 200)
|
|
@@ -4189,8 +4181,8 @@ let DeliveryTimeClient$3 = class DeliveryTimeClient extends Client {
|
|
|
4189
4181
|
/**
|
|
4190
4182
|
* @throws {Error} if the request failed
|
|
4191
4183
|
*/
|
|
4192
|
-
async getProfile(id) {
|
|
4193
|
-
const response = await this.get(`/import-export-profile/${id}
|
|
4184
|
+
async getProfile(id, query) {
|
|
4185
|
+
const response = await this.get(`/import-export-profile/${id}` + buildQuery(query), {
|
|
4194
4186
|
headers: { Accept: "application/json" }
|
|
4195
4187
|
});
|
|
4196
4188
|
if (response.statusCode === 200)
|
|
@@ -4238,9 +4230,8 @@ class IntegrationClient extends Client {
|
|
|
4238
4230
|
/**
|
|
4239
4231
|
* @throws {Error} if the request failed
|
|
4240
4232
|
*/
|
|
4241
|
-
async getIntegrations(
|
|
4242
|
-
const response = await this.get(`/integration
|
|
4243
|
-
query: { limit, page, query },
|
|
4233
|
+
async getIntegrations(query) {
|
|
4234
|
+
const response = await this.get(`/integration` + buildQuery(query), {
|
|
4244
4235
|
headers: { Accept: "application/json" }
|
|
4245
4236
|
});
|
|
4246
4237
|
if (response.statusCode === 200)
|
|
@@ -4281,8 +4272,8 @@ class IntegrationClient extends Client {
|
|
|
4281
4272
|
/**
|
|
4282
4273
|
* @throws {Error} if the request failed
|
|
4283
4274
|
*/
|
|
4284
|
-
async getIntegration(id) {
|
|
4285
|
-
const response = await this.get(`/integration/${id}
|
|
4275
|
+
async getIntegration(id, query) {
|
|
4276
|
+
const response = await this.get(`/integration/${id}` + buildQuery(query), {
|
|
4286
4277
|
headers: { Accept: "application/json" }
|
|
4287
4278
|
});
|
|
4288
4279
|
if (response.statusCode === 200)
|
|
@@ -4337,9 +4328,8 @@ class LocaleClient extends Client {
|
|
|
4337
4328
|
/**
|
|
4338
4329
|
* @throws {Error} if the request failed
|
|
4339
4330
|
*/
|
|
4340
|
-
async getLocales(
|
|
4341
|
-
const response = await this.get(`/locale
|
|
4342
|
-
query: { limit, page, query },
|
|
4331
|
+
async getLocales(query) {
|
|
4332
|
+
const response = await this.get(`/locale` + buildQuery(query), {
|
|
4343
4333
|
headers: { Accept: "application/json" }
|
|
4344
4334
|
});
|
|
4345
4335
|
if (response.statusCode === 200)
|
|
@@ -4378,8 +4368,10 @@ class LocaleClient extends Client {
|
|
|
4378
4368
|
/**
|
|
4379
4369
|
* @throws {Error} if the request failed
|
|
4380
4370
|
*/
|
|
4381
|
-
async getLocale(id) {
|
|
4382
|
-
const response = await this.get(`/locale/${id}
|
|
4371
|
+
async getLocale(id, query) {
|
|
4372
|
+
const response = await this.get(`/locale/${id}` + buildQuery(query), {
|
|
4373
|
+
headers: { Accept: "application/json" }
|
|
4374
|
+
});
|
|
4383
4375
|
if (response.statusCode === 200)
|
|
4384
4376
|
return response.body.data;
|
|
4385
4377
|
throw new Error(`Failed to fetch locale: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -4421,9 +4413,8 @@ class LocaleClient extends Client {
|
|
|
4421
4413
|
/**
|
|
4422
4414
|
* @throws {Error} if the request failed
|
|
4423
4415
|
*/
|
|
4424
|
-
async getLanguages(
|
|
4425
|
-
const response = await this.get(`/language
|
|
4426
|
-
query: { limit, page, query },
|
|
4416
|
+
async getLanguages(query) {
|
|
4417
|
+
const response = await this.get(`/language` + buildQuery(query), {
|
|
4427
4418
|
headers: { Accept: "application/json" }
|
|
4428
4419
|
});
|
|
4429
4420
|
if (response.statusCode === 200)
|
|
@@ -4462,8 +4453,10 @@ class LocaleClient extends Client {
|
|
|
4462
4453
|
/**
|
|
4463
4454
|
* @throws {Error} if the request failed
|
|
4464
4455
|
*/
|
|
4465
|
-
async getLanguage(id) {
|
|
4466
|
-
const response = await this.get(`/language/${id}
|
|
4456
|
+
async getLanguage(id, query) {
|
|
4457
|
+
const response = await this.get(`/language/${id}` + buildQuery(query), {
|
|
4458
|
+
headers: { Accept: "application/json" }
|
|
4459
|
+
});
|
|
4467
4460
|
if (response.statusCode === 200)
|
|
4468
4461
|
return response.body.data;
|
|
4469
4462
|
throw new Error(`Failed to fetch language: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -4544,9 +4537,8 @@ class MailClient extends Client {
|
|
|
4544
4537
|
/**
|
|
4545
4538
|
* @throws {Error} if the request failed
|
|
4546
4539
|
*/
|
|
4547
|
-
async getHeaderFooters(
|
|
4548
|
-
const response = await this.get(`/header-footer
|
|
4549
|
-
query: { limit, page, query },
|
|
4540
|
+
async getHeaderFooters(query) {
|
|
4541
|
+
const response = await this.get(`/header-footer` + buildQuery(query), {
|
|
4550
4542
|
headers: { Accept: "application/json" }
|
|
4551
4543
|
});
|
|
4552
4544
|
if (response.statusCode === 200)
|
|
@@ -4587,8 +4579,8 @@ class MailClient extends Client {
|
|
|
4587
4579
|
/**
|
|
4588
4580
|
* @throws {Error} if the request failed
|
|
4589
4581
|
*/
|
|
4590
|
-
async getHeaderFooter(id) {
|
|
4591
|
-
const response = await this.get(`/header-footer/${id}
|
|
4582
|
+
async getHeaderFooter(id, query) {
|
|
4583
|
+
const response = await this.get(`/header-footer/${id}` + buildQuery(query), {
|
|
4592
4584
|
headers: { Accept: "application/json" }
|
|
4593
4585
|
});
|
|
4594
4586
|
if (response.statusCode === 200)
|
|
@@ -4640,9 +4632,8 @@ class MailClient extends Client {
|
|
|
4640
4632
|
/**
|
|
4641
4633
|
* @throws {Error} if the request failed
|
|
4642
4634
|
*/
|
|
4643
|
-
async getTemplates(
|
|
4644
|
-
const response = await this.get(`/template
|
|
4645
|
-
query: { limit, page, query },
|
|
4635
|
+
async getTemplates(query) {
|
|
4636
|
+
const response = await this.get(`/template` + buildQuery(query), {
|
|
4646
4637
|
headers: { Accept: "application/json" }
|
|
4647
4638
|
});
|
|
4648
4639
|
if (response.statusCode === 200)
|
|
@@ -4681,8 +4672,10 @@ class MailClient extends Client {
|
|
|
4681
4672
|
/**
|
|
4682
4673
|
* @throws {Error} if the request failed
|
|
4683
4674
|
*/
|
|
4684
|
-
async getTemplate(id) {
|
|
4685
|
-
const response = await this.get(`/template/${id}
|
|
4675
|
+
async getTemplate(id, query) {
|
|
4676
|
+
const response = await this.get(`/template/${id}` + buildQuery(query), {
|
|
4677
|
+
headers: { Accept: "application/json" }
|
|
4678
|
+
});
|
|
4686
4679
|
if (response.statusCode === 200)
|
|
4687
4680
|
return response.body.data;
|
|
4688
4681
|
throw new Error(`Failed to fetch template: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -4726,9 +4719,8 @@ class MailClient extends Client {
|
|
|
4726
4719
|
/**
|
|
4727
4720
|
* @throws {Error} if the request failed
|
|
4728
4721
|
*/
|
|
4729
|
-
async getTemplateTypes(
|
|
4730
|
-
const response = await this.get(`/template-type
|
|
4731
|
-
query: { limit, page, query },
|
|
4722
|
+
async getTemplateTypes(query) {
|
|
4723
|
+
const response = await this.get(`/template-type` + buildQuery(query), {
|
|
4732
4724
|
headers: { Accept: "application/json" }
|
|
4733
4725
|
});
|
|
4734
4726
|
if (response.statusCode === 200)
|
|
@@ -4769,8 +4761,8 @@ class MailClient extends Client {
|
|
|
4769
4761
|
/**
|
|
4770
4762
|
* @throws {Error} if the request failed
|
|
4771
4763
|
*/
|
|
4772
|
-
async getTemplateType(id) {
|
|
4773
|
-
const response = await this.get(`/template-type/${id}
|
|
4764
|
+
async getTemplateType(id, query) {
|
|
4765
|
+
const response = await this.get(`/template-type/${id}` + buildQuery(query), {
|
|
4774
4766
|
headers: { Accept: "application/json" }
|
|
4775
4767
|
});
|
|
4776
4768
|
if (response.statusCode === 200)
|
|
@@ -4854,9 +4846,8 @@ class MediaClient extends Client {
|
|
|
4854
4846
|
/**
|
|
4855
4847
|
* @throws {Error} if the request failed
|
|
4856
4848
|
*/
|
|
4857
|
-
async getMediaList(
|
|
4858
|
-
const response = await this.get(`/media
|
|
4859
|
-
query: { limit, page, query },
|
|
4849
|
+
async getMediaList(query) {
|
|
4850
|
+
const response = await this.get(`/media` + buildQuery(query), {
|
|
4860
4851
|
headers: { Accept: "application/json" }
|
|
4861
4852
|
});
|
|
4862
4853
|
if (response.statusCode === 200)
|
|
@@ -4891,8 +4882,10 @@ class MediaClient extends Client {
|
|
|
4891
4882
|
/**
|
|
4892
4883
|
* @throws {Error} if the request failed
|
|
4893
4884
|
*/
|
|
4894
|
-
async getMedia(id) {
|
|
4895
|
-
const response = await this.get(`/media/${id}
|
|
4885
|
+
async getMedia(id, query) {
|
|
4886
|
+
const response = await this.get(`/media/${id}` + buildQuery(query), {
|
|
4887
|
+
headers: { Accept: "application/json" }
|
|
4888
|
+
});
|
|
4896
4889
|
if (response.statusCode === 200)
|
|
4897
4890
|
return response.body.data;
|
|
4898
4891
|
throw new Error(`Failed to fetch media: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -4934,9 +4927,8 @@ class MediaClient extends Client {
|
|
|
4934
4927
|
/**
|
|
4935
4928
|
* @throws {Error} if the request failed
|
|
4936
4929
|
*/
|
|
4937
|
-
async getDefaultFolders(
|
|
4938
|
-
const response = await this.get(`/media-default-folder
|
|
4939
|
-
query: { limit, page, query },
|
|
4930
|
+
async getDefaultFolders(query) {
|
|
4931
|
+
const response = await this.get(`/media-default-folder` + buildQuery(query), {
|
|
4940
4932
|
headers: { Accept: "application/json" }
|
|
4941
4933
|
});
|
|
4942
4934
|
if (response.statusCode === 200)
|
|
@@ -4977,8 +4969,8 @@ class MediaClient extends Client {
|
|
|
4977
4969
|
/**
|
|
4978
4970
|
* @throws {Error} if the request failed
|
|
4979
4971
|
*/
|
|
4980
|
-
async getDefaultFolder(id) {
|
|
4981
|
-
const response = await this.get(`/media-default-folder/${id}
|
|
4972
|
+
async getDefaultFolder(id, query) {
|
|
4973
|
+
const response = await this.get(`/media-default-folder/${id}` + buildQuery(query), {
|
|
4982
4974
|
headers: { Accept: "application/json" }
|
|
4983
4975
|
});
|
|
4984
4976
|
if (response.statusCode === 200)
|
|
@@ -5030,9 +5022,8 @@ class MediaClient extends Client {
|
|
|
5030
5022
|
/**
|
|
5031
5023
|
* @throws {Error} if the request failed
|
|
5032
5024
|
*/
|
|
5033
|
-
async getFolders(
|
|
5034
|
-
const response = await this.get(`/media-folder
|
|
5035
|
-
query: { limit, page, query },
|
|
5025
|
+
async getFolders(query) {
|
|
5026
|
+
const response = await this.get(`/media-folder` + buildQuery(query), {
|
|
5036
5027
|
headers: { Accept: "application/json" }
|
|
5037
5028
|
});
|
|
5038
5029
|
if (response.statusCode === 200)
|
|
@@ -5071,8 +5062,8 @@ class MediaClient extends Client {
|
|
|
5071
5062
|
/**
|
|
5072
5063
|
* @throws {Error} if the request failed
|
|
5073
5064
|
*/
|
|
5074
|
-
async getFolder(id) {
|
|
5075
|
-
const response = await this.get(`/media-folder/${id}
|
|
5065
|
+
async getFolder(id, query) {
|
|
5066
|
+
const response = await this.get(`/media-folder/${id}` + buildQuery(query), {
|
|
5076
5067
|
headers: { Accept: "application/json" }
|
|
5077
5068
|
});
|
|
5078
5069
|
if (response.statusCode === 200)
|
|
@@ -5116,9 +5107,8 @@ class MediaClient extends Client {
|
|
|
5116
5107
|
/**
|
|
5117
5108
|
* @throws {Error} if the request failed
|
|
5118
5109
|
*/
|
|
5119
|
-
async getFolderConfigs(
|
|
5120
|
-
const response = await this.get(`/media-folder-configuration
|
|
5121
|
-
query: { limit, page, query },
|
|
5110
|
+
async getFolderConfigs(query) {
|
|
5111
|
+
const response = await this.get(`/media-folder-configuration` + buildQuery(query), {
|
|
5122
5112
|
headers: { Accept: "application/json" }
|
|
5123
5113
|
});
|
|
5124
5114
|
if (response.statusCode === 200)
|
|
@@ -5159,8 +5149,8 @@ class MediaClient extends Client {
|
|
|
5159
5149
|
/**
|
|
5160
5150
|
* @throws {Error} if the request failed
|
|
5161
5151
|
*/
|
|
5162
|
-
async getFolderConfig(id) {
|
|
5163
|
-
const response = await this.get(`/media-folder-configuration/${id}
|
|
5152
|
+
async getFolderConfig(id, query) {
|
|
5153
|
+
const response = await this.get(`/media-folder-configuration/${id}` + buildQuery(query), {
|
|
5164
5154
|
headers: { Accept: "application/json" }
|
|
5165
5155
|
});
|
|
5166
5156
|
if (response.statusCode === 200)
|
|
@@ -5212,9 +5202,8 @@ class MediaClient extends Client {
|
|
|
5212
5202
|
/**
|
|
5213
5203
|
* @throws {Error} if the request failed
|
|
5214
5204
|
*/
|
|
5215
|
-
async getThumbnails(
|
|
5216
|
-
const response = await this.get(`/media-thumbnail
|
|
5217
|
-
query: { limit, page, query },
|
|
5205
|
+
async getThumbnails(query) {
|
|
5206
|
+
const response = await this.get(`/media-thumbnail` + buildQuery(query), {
|
|
5218
5207
|
headers: { Accept: "application/json" }
|
|
5219
5208
|
});
|
|
5220
5209
|
if (response.statusCode === 200)
|
|
@@ -5253,8 +5242,8 @@ class MediaClient extends Client {
|
|
|
5253
5242
|
/**
|
|
5254
5243
|
* @throws {Error} if the request failed
|
|
5255
5244
|
*/
|
|
5256
|
-
async getThumbnail(id) {
|
|
5257
|
-
const response = await this.get(`/media-thumbnail/${id}
|
|
5245
|
+
async getThumbnail(id, query) {
|
|
5246
|
+
const response = await this.get(`/media-thumbnail/${id}` + buildQuery(query), {
|
|
5258
5247
|
headers: { Accept: "application/json" }
|
|
5259
5248
|
});
|
|
5260
5249
|
if (response.statusCode === 200)
|
|
@@ -5300,9 +5289,8 @@ class MediaClient extends Client {
|
|
|
5300
5289
|
/**
|
|
5301
5290
|
* @throws {Error} if the request failed
|
|
5302
5291
|
*/
|
|
5303
|
-
async getThumbnailSizes(
|
|
5304
|
-
const response = await this.get(`/media-thumbnail-size
|
|
5305
|
-
query: { limit, page, query },
|
|
5292
|
+
async getThumbnailSizes(query) {
|
|
5293
|
+
const response = await this.get(`/media-thumbnail-size` + buildQuery(query), {
|
|
5306
5294
|
headers: { Accept: "application/json" }
|
|
5307
5295
|
});
|
|
5308
5296
|
if (response.statusCode === 200)
|
|
@@ -5343,8 +5331,8 @@ class MediaClient extends Client {
|
|
|
5343
5331
|
/**
|
|
5344
5332
|
* @throws {Error} if the request failed
|
|
5345
5333
|
*/
|
|
5346
|
-
async getThumbnailSize(id) {
|
|
5347
|
-
const response = await this.get(`/media-thumbnail-size/${id}
|
|
5334
|
+
async getThumbnailSize(id, query) {
|
|
5335
|
+
const response = await this.get(`/media-thumbnail-size/${id}` + buildQuery(query), {
|
|
5348
5336
|
headers: { Accept: "application/json" }
|
|
5349
5337
|
});
|
|
5350
5338
|
if (response.statusCode === 200)
|
|
@@ -5398,9 +5386,8 @@ let NewsletterClient$1 = class NewsletterClient extends Client {
|
|
|
5398
5386
|
/**
|
|
5399
5387
|
* @throws {Error} if the request failed
|
|
5400
5388
|
*/
|
|
5401
|
-
async getRecipients(
|
|
5402
|
-
const response = await this.get(`/newsletter-recipient
|
|
5403
|
-
query: { limit, page, query },
|
|
5389
|
+
async getRecipients(query) {
|
|
5390
|
+
const response = await this.get(`/newsletter-recipient` + buildQuery(query), {
|
|
5404
5391
|
headers: { Accept: "application/json" }
|
|
5405
5392
|
});
|
|
5406
5393
|
if (response.statusCode === 200)
|
|
@@ -5439,8 +5426,8 @@ let NewsletterClient$1 = class NewsletterClient extends Client {
|
|
|
5439
5426
|
/**
|
|
5440
5427
|
* @throws {Error} if the request failed
|
|
5441
5428
|
*/
|
|
5442
|
-
async getRecipient(id) {
|
|
5443
|
-
const response = await this.get(`/newsletter-recipient/${id}
|
|
5429
|
+
async getRecipient(id, query) {
|
|
5430
|
+
const response = await this.get(`/newsletter-recipient/${id}` + buildQuery(query), {
|
|
5444
5431
|
headers: { Accept: "application/json" }
|
|
5445
5432
|
});
|
|
5446
5433
|
if (response.statusCode === 200)
|
|
@@ -5489,9 +5476,8 @@ class NumberRangeClient extends Client {
|
|
|
5489
5476
|
/**
|
|
5490
5477
|
* @throws {Error} if the request failed
|
|
5491
5478
|
*/
|
|
5492
|
-
async getRanges(
|
|
5493
|
-
const response = await this.get(`/number-range
|
|
5494
|
-
query: { limit, page, query },
|
|
5479
|
+
async getRanges(query) {
|
|
5480
|
+
const response = await this.get(`/number-range` + buildQuery(query), {
|
|
5495
5481
|
headers: { Accept: "application/json" }
|
|
5496
5482
|
});
|
|
5497
5483
|
if (response.statusCode === 200)
|
|
@@ -5528,8 +5514,8 @@ class NumberRangeClient extends Client {
|
|
|
5528
5514
|
/**
|
|
5529
5515
|
* @throws {Error} if the request failed
|
|
5530
5516
|
*/
|
|
5531
|
-
async getRange(id) {
|
|
5532
|
-
const response = await this.get(`/number-range/${id}
|
|
5517
|
+
async getRange(id, query) {
|
|
5518
|
+
const response = await this.get(`/number-range/${id}` + buildQuery(query), {
|
|
5533
5519
|
headers: { Accept: "application/json" }
|
|
5534
5520
|
});
|
|
5535
5521
|
if (response.statusCode === 200)
|
|
@@ -5573,9 +5559,8 @@ class NumberRangeClient extends Client {
|
|
|
5573
5559
|
/**
|
|
5574
5560
|
* @throws {Error} if the request failed
|
|
5575
5561
|
*/
|
|
5576
|
-
async getSalesChannels(
|
|
5577
|
-
const response = await this.get(`/number-range-sales-channel
|
|
5578
|
-
query: { limit, page, query },
|
|
5562
|
+
async getSalesChannels(query) {
|
|
5563
|
+
const response = await this.get(`/number-range-sales-channel` + buildQuery(query), {
|
|
5579
5564
|
headers: { Accept: "application/json" }
|
|
5580
5565
|
});
|
|
5581
5566
|
if (response.statusCode === 200)
|
|
@@ -5616,8 +5601,8 @@ class NumberRangeClient extends Client {
|
|
|
5616
5601
|
/**
|
|
5617
5602
|
* @throws {Error} if the request failed
|
|
5618
5603
|
*/
|
|
5619
|
-
async getSalesChannel(id) {
|
|
5620
|
-
const response = await this.get(`/number-range-sales-channel/${id}
|
|
5604
|
+
async getSalesChannel(id, query) {
|
|
5605
|
+
const response = await this.get(`/number-range-sales-channel/${id}` + buildQuery(query), {
|
|
5621
5606
|
headers: { Accept: "application/json" }
|
|
5622
5607
|
});
|
|
5623
5608
|
if (response.statusCode === 200)
|
|
@@ -5669,9 +5654,8 @@ class NumberRangeClient extends Client {
|
|
|
5669
5654
|
/**
|
|
5670
5655
|
* @throws {Error} if the request failed
|
|
5671
5656
|
*/
|
|
5672
|
-
async getStates(
|
|
5673
|
-
const response = await this.get(`/number-range-state
|
|
5674
|
-
query: { limit, page, query },
|
|
5657
|
+
async getStates(query) {
|
|
5658
|
+
const response = await this.get(`/number-range-state` + buildQuery(query), {
|
|
5675
5659
|
headers: { Accept: "application/json" }
|
|
5676
5660
|
});
|
|
5677
5661
|
if (response.statusCode === 200)
|
|
@@ -5708,8 +5692,8 @@ class NumberRangeClient extends Client {
|
|
|
5708
5692
|
/**
|
|
5709
5693
|
* @throws {Error} if the request failed
|
|
5710
5694
|
*/
|
|
5711
|
-
async getState(id) {
|
|
5712
|
-
const response = await this.get(`/number-range-state/${id}
|
|
5695
|
+
async getState(id, query) {
|
|
5696
|
+
const response = await this.get(`/number-range-state/${id}` + buildQuery(query), {
|
|
5713
5697
|
headers: { Accept: "application/json" }
|
|
5714
5698
|
});
|
|
5715
5699
|
if (response.statusCode === 200)
|
|
@@ -5753,9 +5737,8 @@ class NumberRangeClient extends Client {
|
|
|
5753
5737
|
/**
|
|
5754
5738
|
* @throws {Error} if the request failed
|
|
5755
5739
|
*/
|
|
5756
|
-
async getTypes(
|
|
5757
|
-
const response = await this.get(`/number-range-type
|
|
5758
|
-
query: { limit, page, query },
|
|
5740
|
+
async getTypes(query) {
|
|
5741
|
+
const response = await this.get(`/number-range-type` + buildQuery(query), {
|
|
5759
5742
|
headers: { Accept: "application/json" }
|
|
5760
5743
|
});
|
|
5761
5744
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -5789,8 +5772,8 @@ class NumberRangeClient extends Client {
|
|
|
5789
5772
|
/**
|
|
5790
5773
|
* @throws {Error} if the request failed
|
|
5791
5774
|
*/
|
|
5792
|
-
async getType(id) {
|
|
5793
|
-
const response = await this.get(`/number-range-type/${id}
|
|
5775
|
+
async getType(id, query) {
|
|
5776
|
+
const response = await this.get(`/number-range-type/${id}` + buildQuery(query), {
|
|
5794
5777
|
headers: { Accept: "application/json" }
|
|
5795
5778
|
});
|
|
5796
5779
|
if (response.statusCode === 200)
|
|
@@ -5941,9 +5924,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
5941
5924
|
/**
|
|
5942
5925
|
* @throws {Error} if the request failed
|
|
5943
5926
|
*/
|
|
5944
|
-
async getOrders(
|
|
5945
|
-
const response = await this.get(`/order
|
|
5946
|
-
query: { limit, page, query },
|
|
5927
|
+
async getOrders(query) {
|
|
5928
|
+
const response = await this.get(`/order` + buildQuery(query), {
|
|
5947
5929
|
headers: { Accept: "application/json" }
|
|
5948
5930
|
});
|
|
5949
5931
|
if (response.statusCode === 200)
|
|
@@ -5980,8 +5962,10 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
5980
5962
|
/**
|
|
5981
5963
|
* @throws {Error} if the request failed
|
|
5982
5964
|
*/
|
|
5983
|
-
async getOrder(id) {
|
|
5984
|
-
const response = await this.get(`/order/${id}
|
|
5965
|
+
async getOrder(id, query) {
|
|
5966
|
+
const response = await this.get(`/order/${id}` + buildQuery(query), {
|
|
5967
|
+
headers: { Accept: "application/json" }
|
|
5968
|
+
});
|
|
5985
5969
|
if (response.statusCode === 200)
|
|
5986
5970
|
return response.body.data;
|
|
5987
5971
|
throw new Error(`Failed to fetch order: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -6023,9 +6007,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6023
6007
|
/**
|
|
6024
6008
|
* @throws {Error} if the request failed
|
|
6025
6009
|
*/
|
|
6026
|
-
async getAddresses(
|
|
6027
|
-
const response = await this.get(`/order-address
|
|
6028
|
-
query: { limit, page, query },
|
|
6010
|
+
async getAddresses(query) {
|
|
6011
|
+
const response = await this.get(`/order-address` + buildQuery(query), {
|
|
6029
6012
|
headers: { Accept: "application/json" }
|
|
6030
6013
|
});
|
|
6031
6014
|
if (response.statusCode === 200)
|
|
@@ -6064,8 +6047,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6064
6047
|
/**
|
|
6065
6048
|
* @throws {Error} if the request failed
|
|
6066
6049
|
*/
|
|
6067
|
-
async getAddress(id) {
|
|
6068
|
-
const response = await this.get(`/order-address/${id}
|
|
6050
|
+
async getAddress(id, query) {
|
|
6051
|
+
const response = await this.get(`/order-address/${id}` + buildQuery(query), {
|
|
6069
6052
|
headers: { Accept: "application/json" }
|
|
6070
6053
|
});
|
|
6071
6054
|
if (response.statusCode === 200)
|
|
@@ -6111,9 +6094,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6111
6094
|
/**
|
|
6112
6095
|
* @throws {Error} if the request failed
|
|
6113
6096
|
*/
|
|
6114
|
-
async getCustomers(
|
|
6115
|
-
const response = await this.get(`/order-customer
|
|
6116
|
-
query: { limit, page, query },
|
|
6097
|
+
async getCustomers(query) {
|
|
6098
|
+
const response = await this.get(`/order-customer` + buildQuery(query), {
|
|
6117
6099
|
headers: { Accept: "application/json" }
|
|
6118
6100
|
});
|
|
6119
6101
|
if (response.statusCode === 200)
|
|
@@ -6152,8 +6134,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6152
6134
|
/**
|
|
6153
6135
|
* @throws {Error} if the request failed
|
|
6154
6136
|
*/
|
|
6155
|
-
async getCustomer(id) {
|
|
6156
|
-
const response = await this.get(`/order-customer/${id}
|
|
6137
|
+
async getCustomer(id, query) {
|
|
6138
|
+
const response = await this.get(`/order-customer/${id}` + buildQuery(query), {
|
|
6157
6139
|
headers: { Accept: "application/json" }
|
|
6158
6140
|
});
|
|
6159
6141
|
if (response.statusCode === 200)
|
|
@@ -6199,9 +6181,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6199
6181
|
/**
|
|
6200
6182
|
* @throws {Error} if the request failed
|
|
6201
6183
|
*/
|
|
6202
|
-
async getDeliveries(
|
|
6203
|
-
const response = await this.get(`/order-delivery
|
|
6204
|
-
query: { limit, page, query },
|
|
6184
|
+
async getDeliveries(query) {
|
|
6185
|
+
const response = await this.get(`/order-delivery` + buildQuery(query), {
|
|
6205
6186
|
headers: { Accept: "application/json" }
|
|
6206
6187
|
});
|
|
6207
6188
|
if (response.statusCode === 200)
|
|
@@ -6240,8 +6221,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6240
6221
|
/**
|
|
6241
6222
|
* @throws {Error} if the request failed
|
|
6242
6223
|
*/
|
|
6243
|
-
async getDelivery(id) {
|
|
6244
|
-
const response = await this.get(`/order-delivery/${id}
|
|
6224
|
+
async getDelivery(id, query) {
|
|
6225
|
+
const response = await this.get(`/order-delivery/${id}` + buildQuery(query), {
|
|
6245
6226
|
headers: { Accept: "application/json" }
|
|
6246
6227
|
});
|
|
6247
6228
|
if (response.statusCode === 200)
|
|
@@ -6287,9 +6268,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6287
6268
|
/**
|
|
6288
6269
|
* @throws {Error} if the request failed
|
|
6289
6270
|
*/
|
|
6290
|
-
async getDeliveryPositions(
|
|
6291
|
-
const response = await this.get(`/order-delivery-position
|
|
6292
|
-
query: { limit, page, query },
|
|
6271
|
+
async getDeliveryPositions(query) {
|
|
6272
|
+
const response = await this.get(`/order-delivery-position` + buildQuery(query), {
|
|
6293
6273
|
headers: { Accept: "application/json" }
|
|
6294
6274
|
});
|
|
6295
6275
|
if (response.statusCode === 200)
|
|
@@ -6330,8 +6310,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6330
6310
|
/**
|
|
6331
6311
|
* @throws {Error} if the request failed
|
|
6332
6312
|
*/
|
|
6333
|
-
async getDeliveryPosition(id) {
|
|
6334
|
-
const response = await this.get(`/order-delivery-position/${id}
|
|
6313
|
+
async getDeliveryPosition(id, query) {
|
|
6314
|
+
const response = await this.get(`/order-delivery-position/${id}` + buildQuery(query), {
|
|
6335
6315
|
headers: { Accept: "application/json" }
|
|
6336
6316
|
});
|
|
6337
6317
|
if (response.statusCode === 200)
|
|
@@ -6383,9 +6363,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6383
6363
|
/**
|
|
6384
6364
|
* @throws {Error} if the request failed
|
|
6385
6365
|
*/
|
|
6386
|
-
async getLineItems(
|
|
6387
|
-
const response = await this.get(`/order-line-item
|
|
6388
|
-
query: { limit, page, query },
|
|
6366
|
+
async getLineItems(query) {
|
|
6367
|
+
const response = await this.get(`/order-line-item` + buildQuery(query), {
|
|
6389
6368
|
headers: { Accept: "application/json" }
|
|
6390
6369
|
});
|
|
6391
6370
|
if (response.statusCode === 200)
|
|
@@ -6424,8 +6403,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6424
6403
|
/**
|
|
6425
6404
|
* @throws {Error} if the request failed
|
|
6426
6405
|
*/
|
|
6427
|
-
async getLineItem(id) {
|
|
6428
|
-
const response = await this.get(`/order-line-item/${id}
|
|
6406
|
+
async getLineItem(id, query) {
|
|
6407
|
+
const response = await this.get(`/order-line-item/${id}` + buildQuery(query), {
|
|
6429
6408
|
headers: { Accept: "application/json" }
|
|
6430
6409
|
});
|
|
6431
6410
|
if (response.statusCode === 200)
|
|
@@ -6471,9 +6450,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6471
6450
|
/**
|
|
6472
6451
|
* @throws {Error} if the request failed
|
|
6473
6452
|
*/
|
|
6474
|
-
async getLineItemDownloads(
|
|
6475
|
-
const response = await this.get(`/order-line-item-download
|
|
6476
|
-
query: { limit, page, query },
|
|
6453
|
+
async getLineItemDownloads(query) {
|
|
6454
|
+
const response = await this.get(`/order-line-item-download` + buildQuery(query), {
|
|
6477
6455
|
headers: { Accept: "application/json" }
|
|
6478
6456
|
});
|
|
6479
6457
|
if (response.statusCode === 200)
|
|
@@ -6514,8 +6492,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6514
6492
|
/**
|
|
6515
6493
|
* @throws {Error} if the request failed
|
|
6516
6494
|
*/
|
|
6517
|
-
async getLineItemDownload(id) {
|
|
6518
|
-
const response = await this.get(`/order-line-item-download/${id}
|
|
6495
|
+
async getLineItemDownload(id, query) {
|
|
6496
|
+
const response = await this.get(`/order-line-item-download/${id}` + buildQuery(query), {
|
|
6519
6497
|
headers: { Accept: "application/json" }
|
|
6520
6498
|
});
|
|
6521
6499
|
if (response.statusCode === 200)
|
|
@@ -6567,9 +6545,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6567
6545
|
/**
|
|
6568
6546
|
* @throws {Error} if the request failed
|
|
6569
6547
|
*/
|
|
6570
|
-
async getTransactions(
|
|
6571
|
-
const response = await this.get(`/order-transaction
|
|
6572
|
-
query: { limit, page, query },
|
|
6548
|
+
async getTransactions(query) {
|
|
6549
|
+
const response = await this.get(`/order-transaction` + buildQuery(query), {
|
|
6573
6550
|
headers: { Accept: "application/json" }
|
|
6574
6551
|
});
|
|
6575
6552
|
if (response.statusCode === 200)
|
|
@@ -6610,8 +6587,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6610
6587
|
/**
|
|
6611
6588
|
* @throws {Error} if the request failed
|
|
6612
6589
|
*/
|
|
6613
|
-
async getTransaction(id) {
|
|
6614
|
-
const response = await this.get(`/order-transaction/${id}
|
|
6590
|
+
async getTransaction(id, query) {
|
|
6591
|
+
const response = await this.get(`/order-transaction/${id}` + buildQuery(query), {
|
|
6615
6592
|
headers: { Accept: "application/json" }
|
|
6616
6593
|
});
|
|
6617
6594
|
if (response.statusCode === 200)
|
|
@@ -6663,9 +6640,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6663
6640
|
/**
|
|
6664
6641
|
* @throws {Error} if the request failed
|
|
6665
6642
|
*/
|
|
6666
|
-
async getTransactionCaptures(
|
|
6667
|
-
const response = await this.get(`/order-transaction-capture
|
|
6668
|
-
query: { limit, page, query },
|
|
6643
|
+
async getTransactionCaptures(query) {
|
|
6644
|
+
const response = await this.get(`/order-transaction-capture` + buildQuery(query), {
|
|
6669
6645
|
headers: { Accept: "application/json" }
|
|
6670
6646
|
});
|
|
6671
6647
|
if (response.statusCode === 200)
|
|
@@ -6706,8 +6682,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6706
6682
|
/**
|
|
6707
6683
|
* @throws {Error} if the request failed
|
|
6708
6684
|
*/
|
|
6709
|
-
async getTransactionCapture(id) {
|
|
6710
|
-
const response = await this.get(`/order-transaction-capture/${id}
|
|
6685
|
+
async getTransactionCapture(id, query) {
|
|
6686
|
+
const response = await this.get(`/order-transaction-capture/${id}` + buildQuery(query), {
|
|
6711
6687
|
headers: { Accept: "application/json" }
|
|
6712
6688
|
});
|
|
6713
6689
|
if (response.statusCode === 200)
|
|
@@ -6759,9 +6735,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6759
6735
|
/**
|
|
6760
6736
|
* @throws {Error} if the request failed
|
|
6761
6737
|
*/
|
|
6762
|
-
async getTransactionCaptureRefunds(
|
|
6763
|
-
const response = await this.get(`/order-transaction-capture-refund
|
|
6764
|
-
query: { limit, page, query },
|
|
6738
|
+
async getTransactionCaptureRefunds(query) {
|
|
6739
|
+
const response = await this.get(`/order-transaction-capture-refund` + buildQuery(query), {
|
|
6765
6740
|
headers: { Accept: "application/json" }
|
|
6766
6741
|
});
|
|
6767
6742
|
if (response.statusCode === 200)
|
|
@@ -6802,8 +6777,8 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6802
6777
|
/**
|
|
6803
6778
|
* @throws {Error} if the request failed
|
|
6804
6779
|
*/
|
|
6805
|
-
async getTransactionCaptureRefund(id) {
|
|
6806
|
-
const response = await this.get(`/order-transaction-capture-refund/${id}
|
|
6780
|
+
async getTransactionCaptureRefund(id, query) {
|
|
6781
|
+
const response = await this.get(`/order-transaction-capture-refund/${id}` + buildQuery(query), {
|
|
6807
6782
|
headers: { Accept: "application/json" }
|
|
6808
6783
|
});
|
|
6809
6784
|
if (response.statusCode === 200)
|
|
@@ -6855,11 +6830,13 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6855
6830
|
/**
|
|
6856
6831
|
* @throws {Error} if the request failed
|
|
6857
6832
|
*/
|
|
6858
|
-
async getTransactionCaptureRefundPositions(
|
|
6859
|
-
const response = await this.get(
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6833
|
+
async getTransactionCaptureRefundPositions(query) {
|
|
6834
|
+
const response = await this.get(
|
|
6835
|
+
`/order-transaction-capture-refund-position` + buildQuery(query),
|
|
6836
|
+
{
|
|
6837
|
+
headers: { Accept: "application/json" }
|
|
6838
|
+
}
|
|
6839
|
+
);
|
|
6863
6840
|
if (response.statusCode === 200)
|
|
6864
6841
|
return response.body.data;
|
|
6865
6842
|
throw new Error(
|
|
@@ -6898,10 +6875,13 @@ let OrderClient$1 = class OrderClient extends Client {
|
|
|
6898
6875
|
/**
|
|
6899
6876
|
* @throws {Error} if the request failed
|
|
6900
6877
|
*/
|
|
6901
|
-
async getTransactionCaptureRefundPosition(id) {
|
|
6902
|
-
const response = await this.get(
|
|
6903
|
-
|
|
6904
|
-
|
|
6878
|
+
async getTransactionCaptureRefundPosition(id, query) {
|
|
6879
|
+
const response = await this.get(
|
|
6880
|
+
`/order-transaction-capture-refund-position/${id}` + buildQuery(query),
|
|
6881
|
+
{
|
|
6882
|
+
headers: { Accept: "application/json" }
|
|
6883
|
+
}
|
|
6884
|
+
);
|
|
6905
6885
|
if (response.statusCode === 200)
|
|
6906
6886
|
return response.body.data;
|
|
6907
6887
|
throw new Error(
|
|
@@ -6953,9 +6933,8 @@ class PaymentMethodClient extends Client {
|
|
|
6953
6933
|
/**
|
|
6954
6934
|
* @throws {Error} if the request failed
|
|
6955
6935
|
*/
|
|
6956
|
-
async getPaymentMethods(
|
|
6957
|
-
const response = await this.get(`/payment-method
|
|
6958
|
-
query: { limit, page, query },
|
|
6936
|
+
async getPaymentMethods(query) {
|
|
6937
|
+
const response = await this.get(`/payment-method` + buildQuery(query), {
|
|
6959
6938
|
headers: { Accept: "application/json" }
|
|
6960
6939
|
});
|
|
6961
6940
|
if (response.statusCode === 200)
|
|
@@ -6996,8 +6975,8 @@ class PaymentMethodClient extends Client {
|
|
|
6996
6975
|
/**
|
|
6997
6976
|
* @throws {Error} if the request failed
|
|
6998
6977
|
*/
|
|
6999
|
-
async getPaymentMethod(id) {
|
|
7000
|
-
const response = await this.get(`/payment-method/${id}
|
|
6978
|
+
async getPaymentMethod(id, query) {
|
|
6979
|
+
const response = await this.get(`/payment-method/${id}` + buildQuery(query), {
|
|
7001
6980
|
headers: { Accept: "application/json" }
|
|
7002
6981
|
});
|
|
7003
6982
|
if (response.statusCode === 200)
|
|
@@ -7051,9 +7030,8 @@ class PluginClient extends Client {
|
|
|
7051
7030
|
/**
|
|
7052
7031
|
* @throws {Error} if the request failed
|
|
7053
7032
|
*/
|
|
7054
|
-
async getPlugins(
|
|
7055
|
-
const response = await this.get(`/plugin
|
|
7056
|
-
query: { limit, page, query },
|
|
7033
|
+
async getPlugins(query) {
|
|
7034
|
+
const response = await this.get(`/plugin` + buildQuery(query), {
|
|
7057
7035
|
headers: { Accept: "application/json" }
|
|
7058
7036
|
});
|
|
7059
7037
|
if (response.statusCode === 200)
|
|
@@ -7092,8 +7070,10 @@ class PluginClient extends Client {
|
|
|
7092
7070
|
/**
|
|
7093
7071
|
* @throws {Error} if the request failed
|
|
7094
7072
|
*/
|
|
7095
|
-
async getPlugin(id) {
|
|
7096
|
-
const response = await this.get(`/plugin/${id}
|
|
7073
|
+
async getPlugin(id, query) {
|
|
7074
|
+
const response = await this.get(`/plugin/${id}` + buildQuery(query), {
|
|
7075
|
+
headers: { Accept: "application/json" }
|
|
7076
|
+
});
|
|
7097
7077
|
if (response.statusCode === 200)
|
|
7098
7078
|
return response.body.data;
|
|
7099
7079
|
throw new Error(`Failed to fetch plugin: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -7138,9 +7118,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7138
7118
|
/**
|
|
7139
7119
|
* @throws {Error} if the request failed
|
|
7140
7120
|
*/
|
|
7141
|
-
async getProducts(
|
|
7142
|
-
const response = await this.get(`/product
|
|
7143
|
-
query: { limit, page, query },
|
|
7121
|
+
async getProducts(query) {
|
|
7122
|
+
const response = await this.get(`/product` + buildQuery(query), {
|
|
7144
7123
|
headers: { Accept: "application/json" }
|
|
7145
7124
|
});
|
|
7146
7125
|
if (response.statusCode === 200)
|
|
@@ -7179,8 +7158,10 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7179
7158
|
/**
|
|
7180
7159
|
* @throws {Error} if the request failed
|
|
7181
7160
|
*/
|
|
7182
|
-
async getProduct(id) {
|
|
7183
|
-
const response = await this.get(`/product/${id}
|
|
7161
|
+
async getProduct(id, query) {
|
|
7162
|
+
const response = await this.get(`/product/${id}` + buildQuery(query), {
|
|
7163
|
+
headers: { Accept: "application/json" }
|
|
7164
|
+
});
|
|
7184
7165
|
if (response.statusCode === 200)
|
|
7185
7166
|
return response.body.data;
|
|
7186
7167
|
throw new Error(`Failed to fetch product: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -7224,9 +7205,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7224
7205
|
/**
|
|
7225
7206
|
* @throws {Error} if the request failed
|
|
7226
7207
|
*/
|
|
7227
|
-
async getConfiguratorSettings(
|
|
7228
|
-
const response = await this.get(`/product-configurator-setting
|
|
7229
|
-
query: { limit, page, query },
|
|
7208
|
+
async getConfiguratorSettings(query) {
|
|
7209
|
+
const response = await this.get(`/product-configurator-setting` + buildQuery(query), {
|
|
7230
7210
|
headers: { Accept: "application/json" }
|
|
7231
7211
|
});
|
|
7232
7212
|
if (response.statusCode === 200)
|
|
@@ -7267,8 +7247,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7267
7247
|
/**
|
|
7268
7248
|
* @throws {Error} if the request failed
|
|
7269
7249
|
*/
|
|
7270
|
-
async getConfiguratorSetting(id) {
|
|
7271
|
-
const response = await this.get(`/product-configurator-setting/${id}
|
|
7250
|
+
async getConfiguratorSetting(id, query) {
|
|
7251
|
+
const response = await this.get(`/product-configurator-setting/${id}` + buildQuery(query), {
|
|
7272
7252
|
headers: { Accept: "application/json" }
|
|
7273
7253
|
});
|
|
7274
7254
|
if (response.statusCode === 200)
|
|
@@ -7320,9 +7300,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7320
7300
|
/**
|
|
7321
7301
|
* @throws {Error} if the request failed
|
|
7322
7302
|
*/
|
|
7323
|
-
async getCrossSellings(
|
|
7324
|
-
const response = await this.get(`/product-cross-selling
|
|
7325
|
-
query: { limit, page, query },
|
|
7303
|
+
async getCrossSellings(query) {
|
|
7304
|
+
const response = await this.get(`/product-cross-selling` + buildQuery(query), {
|
|
7326
7305
|
headers: { Accept: "application/json" }
|
|
7327
7306
|
});
|
|
7328
7307
|
if (response.statusCode === 200)
|
|
@@ -7363,8 +7342,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7363
7342
|
/**
|
|
7364
7343
|
* @throws {Error} if the request failed
|
|
7365
7344
|
*/
|
|
7366
|
-
async getCrossSelling(id) {
|
|
7367
|
-
const response = await this.get(`/product-cross-selling/${id}
|
|
7345
|
+
async getCrossSelling(id, query) {
|
|
7346
|
+
const response = await this.get(`/product-cross-selling/${id}` + buildQuery(query), {
|
|
7368
7347
|
headers: { Accept: "application/json" }
|
|
7369
7348
|
});
|
|
7370
7349
|
if (response.statusCode === 200)
|
|
@@ -7416,9 +7395,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7416
7395
|
/**
|
|
7417
7396
|
* @throws {Error} if the request failed
|
|
7418
7397
|
*/
|
|
7419
|
-
async getCrossSellingAssignedProducts(
|
|
7420
|
-
const response = await this.get(`/product-cross-selling-assigned-product
|
|
7421
|
-
query: { limit, page, query },
|
|
7398
|
+
async getCrossSellingAssignedProducts(query) {
|
|
7399
|
+
const response = await this.get(`/product-cross-selling-assigned-product` + buildQuery(query), {
|
|
7422
7400
|
headers: { Accept: "application/json" }
|
|
7423
7401
|
});
|
|
7424
7402
|
if (response.statusCode === 200)
|
|
@@ -7459,10 +7437,13 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7459
7437
|
/**
|
|
7460
7438
|
* @throws {Error} if the request failed
|
|
7461
7439
|
*/
|
|
7462
|
-
async getCrossSellingAssignedProduct(id) {
|
|
7463
|
-
const response = await this.get(
|
|
7464
|
-
|
|
7465
|
-
|
|
7440
|
+
async getCrossSellingAssignedProduct(id, query) {
|
|
7441
|
+
const response = await this.get(
|
|
7442
|
+
`/product-cross-selling-assigned-product/${id}` + buildQuery(query),
|
|
7443
|
+
{
|
|
7444
|
+
headers: { Accept: "application/json" }
|
|
7445
|
+
}
|
|
7446
|
+
);
|
|
7466
7447
|
if (response.statusCode === 200)
|
|
7467
7448
|
return response.body.data;
|
|
7468
7449
|
throw new Error(
|
|
@@ -7512,9 +7493,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7512
7493
|
/**
|
|
7513
7494
|
* @throws {Error} if the request failed
|
|
7514
7495
|
*/
|
|
7515
|
-
async getDownloads(
|
|
7516
|
-
const response = await this.get(`/product-download
|
|
7517
|
-
query: { limit, page, query },
|
|
7496
|
+
async getDownloads(query) {
|
|
7497
|
+
const response = await this.get(`/product-download` + buildQuery(query), {
|
|
7518
7498
|
headers: { Accept: "application/json" }
|
|
7519
7499
|
});
|
|
7520
7500
|
if (response.statusCode === 200)
|
|
@@ -7553,8 +7533,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7553
7533
|
/**
|
|
7554
7534
|
* @throws {Error} if the request failed
|
|
7555
7535
|
*/
|
|
7556
|
-
async getDownload(id) {
|
|
7557
|
-
const response = await this.get(`/product-download/${id}
|
|
7536
|
+
async getDownload(id, query) {
|
|
7537
|
+
const response = await this.get(`/product-download/${id}` + buildQuery(query), {
|
|
7558
7538
|
headers: { Accept: "application/json" }
|
|
7559
7539
|
});
|
|
7560
7540
|
if (response.statusCode === 200)
|
|
@@ -7600,9 +7580,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7600
7580
|
/**
|
|
7601
7581
|
* @throws {Error} if the request failed
|
|
7602
7582
|
*/
|
|
7603
|
-
async getExports(
|
|
7604
|
-
const response = await this.get(`/product-export
|
|
7605
|
-
query: { limit, page, query },
|
|
7583
|
+
async getExports(query) {
|
|
7584
|
+
const response = await this.get(`/product-export` + buildQuery(query), {
|
|
7606
7585
|
headers: { Accept: "application/json" }
|
|
7607
7586
|
});
|
|
7608
7587
|
if (response.statusCode === 200)
|
|
@@ -7641,8 +7620,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7641
7620
|
/**
|
|
7642
7621
|
* @throws {Error} if the request failed
|
|
7643
7622
|
*/
|
|
7644
|
-
async getExport(id) {
|
|
7645
|
-
const response = await this.get(`/product-export/${id}
|
|
7623
|
+
async getExport(id, query) {
|
|
7624
|
+
const response = await this.get(`/product-export/${id}` + buildQuery(query), {
|
|
7646
7625
|
headers: { Accept: "application/json" }
|
|
7647
7626
|
});
|
|
7648
7627
|
if (response.statusCode === 200)
|
|
@@ -7686,9 +7665,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7686
7665
|
/**
|
|
7687
7666
|
* @throws {Error} if the request failed
|
|
7688
7667
|
*/
|
|
7689
|
-
async getFeatureSets(
|
|
7690
|
-
const response = await this.get(`/product-feature-set
|
|
7691
|
-
query: { limit, page, query },
|
|
7668
|
+
async getFeatureSets(query) {
|
|
7669
|
+
const response = await this.get(`/product-feature-set` + buildQuery(query), {
|
|
7692
7670
|
headers: { Accept: "application/json" }
|
|
7693
7671
|
});
|
|
7694
7672
|
if (response.statusCode === 200)
|
|
@@ -7729,8 +7707,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7729
7707
|
/**
|
|
7730
7708
|
* @throws {Error} if the request failed
|
|
7731
7709
|
*/
|
|
7732
|
-
async getFeatureSet(id) {
|
|
7733
|
-
const response = await this.get(`/product-feature-set/${id}
|
|
7710
|
+
async getFeatureSet(id, query) {
|
|
7711
|
+
const response = await this.get(`/product-feature-set/${id}` + buildQuery(query), {
|
|
7734
7712
|
headers: { Accept: "application/json" }
|
|
7735
7713
|
});
|
|
7736
7714
|
if (response.statusCode === 200)
|
|
@@ -7782,9 +7760,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7782
7760
|
/**
|
|
7783
7761
|
* @throws {Error} if the request failed
|
|
7784
7762
|
*/
|
|
7785
|
-
async getKeywordDictionaries(
|
|
7786
|
-
const response = await this.get(`/product-keyword-dictionary
|
|
7787
|
-
query: { limit, page, query },
|
|
7763
|
+
async getKeywordDictionaries(query) {
|
|
7764
|
+
const response = await this.get(`/product-keyword-dictionary` + buildQuery(query), {
|
|
7788
7765
|
headers: { Accept: "application/json" }
|
|
7789
7766
|
});
|
|
7790
7767
|
if (response.statusCode === 200)
|
|
@@ -7825,8 +7802,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7825
7802
|
/**
|
|
7826
7803
|
* @throws {Error} if the request failed
|
|
7827
7804
|
*/
|
|
7828
|
-
async getKeywordDictionary(id) {
|
|
7829
|
-
const response = await this.get(`/product-keyword-dictionary/${id}
|
|
7805
|
+
async getKeywordDictionary(id, query) {
|
|
7806
|
+
const response = await this.get(`/product-keyword-dictionary/${id}` + buildQuery(query), {
|
|
7830
7807
|
headers: { Accept: "application/json" }
|
|
7831
7808
|
});
|
|
7832
7809
|
if (response.statusCode === 200)
|
|
@@ -7878,9 +7855,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7878
7855
|
/**
|
|
7879
7856
|
* @throws {Error} if the request failed
|
|
7880
7857
|
*/
|
|
7881
|
-
async getManufacturers(
|
|
7882
|
-
const response = await this.get(`/product-manufacturer
|
|
7883
|
-
query: { limit, page, query },
|
|
7858
|
+
async getManufacturers(query) {
|
|
7859
|
+
const response = await this.get(`/product-manufacturer` + buildQuery(query), {
|
|
7884
7860
|
headers: { Accept: "application/json" }
|
|
7885
7861
|
});
|
|
7886
7862
|
if (response.statusCode === 200)
|
|
@@ -7921,8 +7897,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7921
7897
|
/**
|
|
7922
7898
|
* @throws {Error} if the request failed
|
|
7923
7899
|
*/
|
|
7924
|
-
async getManufacturer(id) {
|
|
7925
|
-
const response = await this.get(`/product-manufacturer/${id}
|
|
7900
|
+
async getManufacturer(id, query) {
|
|
7901
|
+
const response = await this.get(`/product-manufacturer/${id}` + buildQuery(query), {
|
|
7926
7902
|
headers: { Accept: "application/json" }
|
|
7927
7903
|
});
|
|
7928
7904
|
if (response.statusCode === 200)
|
|
@@ -7974,9 +7950,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
7974
7950
|
/**
|
|
7975
7951
|
* @throws {Error} if the request failed
|
|
7976
7952
|
*/
|
|
7977
|
-
async getMediaList(
|
|
7978
|
-
const response = await this.get(`/product-media
|
|
7979
|
-
query: { limit, page, query },
|
|
7953
|
+
async getMediaList(query) {
|
|
7954
|
+
const response = await this.get(`/product-media` + buildQuery(query), {
|
|
7980
7955
|
headers: { Accept: "application/json" }
|
|
7981
7956
|
});
|
|
7982
7957
|
if (response.statusCode === 200)
|
|
@@ -8011,8 +7986,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8011
7986
|
/**
|
|
8012
7987
|
* @throws {Error} if the request failed
|
|
8013
7988
|
*/
|
|
8014
|
-
async getMedia(id) {
|
|
8015
|
-
const response = await this.get(`/product-media/${id}
|
|
7989
|
+
async getMedia(id, query) {
|
|
7990
|
+
const response = await this.get(`/product-media/${id}` + buildQuery(query), {
|
|
8016
7991
|
headers: { Accept: "application/json" }
|
|
8017
7992
|
});
|
|
8018
7993
|
if (response.statusCode === 200)
|
|
@@ -8056,9 +8031,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8056
8031
|
/**
|
|
8057
8032
|
* @throws {Error} if the request failed
|
|
8058
8033
|
*/
|
|
8059
|
-
async getPrices(
|
|
8060
|
-
const response = await this.get(`/product-price
|
|
8061
|
-
query: { limit, page, query },
|
|
8034
|
+
async getPrices(query) {
|
|
8035
|
+
const response = await this.get(`/product-price` + buildQuery(query), {
|
|
8062
8036
|
headers: { Accept: "application/json" }
|
|
8063
8037
|
});
|
|
8064
8038
|
if (response.statusCode === 200)
|
|
@@ -8095,8 +8069,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8095
8069
|
/**
|
|
8096
8070
|
* @throws {Error} if the request failed
|
|
8097
8071
|
*/
|
|
8098
|
-
async getPrice(id) {
|
|
8099
|
-
const response = await this.get(`/product-price/${id}
|
|
8072
|
+
async getPrice(id, query) {
|
|
8073
|
+
const response = await this.get(`/product-price/${id}` + buildQuery(query), {
|
|
8100
8074
|
headers: { Accept: "application/json" }
|
|
8101
8075
|
});
|
|
8102
8076
|
if (response.statusCode === 200)
|
|
@@ -8140,9 +8114,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8140
8114
|
/**
|
|
8141
8115
|
* @throws {Error} if the request failed
|
|
8142
8116
|
*/
|
|
8143
|
-
async getReviews(
|
|
8144
|
-
const response = await this.get(`/product-review
|
|
8145
|
-
query: { limit, page, query },
|
|
8117
|
+
async getReviews(query) {
|
|
8118
|
+
const response = await this.get(`/product-review` + buildQuery(query), {
|
|
8146
8119
|
headers: { Accept: "application/json" }
|
|
8147
8120
|
});
|
|
8148
8121
|
if (response.statusCode === 200)
|
|
@@ -8181,8 +8154,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8181
8154
|
/**
|
|
8182
8155
|
* @throws {Error} if the request failed
|
|
8183
8156
|
*/
|
|
8184
|
-
async getReview(id) {
|
|
8185
|
-
const response = await this.get(`/product-review/${id}
|
|
8157
|
+
async getReview(id, query) {
|
|
8158
|
+
const response = await this.get(`/product-review/${id}` + buildQuery(query), {
|
|
8186
8159
|
headers: { Accept: "application/json" }
|
|
8187
8160
|
});
|
|
8188
8161
|
if (response.statusCode === 200)
|
|
@@ -8226,9 +8199,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8226
8199
|
/**
|
|
8227
8200
|
* @throws {Error} if the request failed
|
|
8228
8201
|
*/
|
|
8229
|
-
async getSearchConfigs(
|
|
8230
|
-
const response = await this.get(`/product-search-config
|
|
8231
|
-
query: { limit, page, query },
|
|
8202
|
+
async getSearchConfigs(query) {
|
|
8203
|
+
const response = await this.get(`/product-search-config` + buildQuery(query), {
|
|
8232
8204
|
headers: { Accept: "application/json" }
|
|
8233
8205
|
});
|
|
8234
8206
|
if (response.statusCode === 200)
|
|
@@ -8269,8 +8241,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8269
8241
|
/**
|
|
8270
8242
|
* @throws {Error} if the request failed
|
|
8271
8243
|
*/
|
|
8272
|
-
async getSearchConfig(id) {
|
|
8273
|
-
const response = await this.get(`/product-search-config/${id}
|
|
8244
|
+
async getSearchConfig(id, query) {
|
|
8245
|
+
const response = await this.get(`/product-search-config/${id}` + buildQuery(query), {
|
|
8274
8246
|
headers: { Accept: "application/json" }
|
|
8275
8247
|
});
|
|
8276
8248
|
if (response.statusCode === 200)
|
|
@@ -8322,9 +8294,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8322
8294
|
/**
|
|
8323
8295
|
* @throws {Error} if the request failed
|
|
8324
8296
|
*/
|
|
8325
|
-
async getSearchConfigFields(
|
|
8326
|
-
const response = await this.get(`/product-search-config-field
|
|
8327
|
-
query: { limit, page, query },
|
|
8297
|
+
async getSearchConfigFields(query) {
|
|
8298
|
+
const response = await this.get(`/product-search-config-field` + buildQuery(query), {
|
|
8328
8299
|
headers: { Accept: "application/json" }
|
|
8329
8300
|
});
|
|
8330
8301
|
if (response.statusCode === 200)
|
|
@@ -8365,8 +8336,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8365
8336
|
/**
|
|
8366
8337
|
* @throws {Error} if the request failed
|
|
8367
8338
|
*/
|
|
8368
|
-
async getSearchConfigField(id) {
|
|
8369
|
-
const response = await this.get(`/product-search-config-field/${id}
|
|
8339
|
+
async getSearchConfigField(id, query) {
|
|
8340
|
+
const response = await this.get(`/product-search-config-field/${id}` + buildQuery(query), {
|
|
8370
8341
|
headers: { Accept: "application/json" }
|
|
8371
8342
|
});
|
|
8372
8343
|
if (response.statusCode === 200)
|
|
@@ -8418,9 +8389,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8418
8389
|
/**
|
|
8419
8390
|
* @throws {Error} if the request failed
|
|
8420
8391
|
*/
|
|
8421
|
-
async getSearchKeywords(
|
|
8422
|
-
const response = await this.get(`/product-search-keyword
|
|
8423
|
-
query: { limit, page, query },
|
|
8392
|
+
async getSearchKeywords(query) {
|
|
8393
|
+
const response = await this.get(`/product-search-keyword` + buildQuery(query), {
|
|
8424
8394
|
headers: { Accept: "application/json" }
|
|
8425
8395
|
});
|
|
8426
8396
|
if (response.statusCode === 200)
|
|
@@ -8461,8 +8431,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8461
8431
|
/**
|
|
8462
8432
|
* @throws {Error} if the request failed
|
|
8463
8433
|
*/
|
|
8464
|
-
async getSearchKeyword(id) {
|
|
8465
|
-
const response = await this.get(`/product-search-keyword/${id}
|
|
8434
|
+
async getSearchKeyword(id, query) {
|
|
8435
|
+
const response = await this.get(`/product-search-keyword/${id}` + buildQuery(query), {
|
|
8466
8436
|
headers: { Accept: "application/json" }
|
|
8467
8437
|
});
|
|
8468
8438
|
if (response.statusCode === 200)
|
|
@@ -8514,9 +8484,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8514
8484
|
/**
|
|
8515
8485
|
* @throws {Error} if the request failed
|
|
8516
8486
|
*/
|
|
8517
|
-
async getSortings(
|
|
8518
|
-
const response = await this.get(`/product-sorting
|
|
8519
|
-
query: { limit, page, query },
|
|
8487
|
+
async getSortings(query) {
|
|
8488
|
+
const response = await this.get(`/product-sorting` + buildQuery(query), {
|
|
8520
8489
|
headers: { Accept: "application/json" }
|
|
8521
8490
|
});
|
|
8522
8491
|
if (response.statusCode === 200)
|
|
@@ -8555,8 +8524,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8555
8524
|
/**
|
|
8556
8525
|
* @throws {Error} if the request failed
|
|
8557
8526
|
*/
|
|
8558
|
-
async getSorting(id) {
|
|
8559
|
-
const response = await this.get(`/product-sorting/${id}
|
|
8527
|
+
async getSorting(id, query) {
|
|
8528
|
+
const response = await this.get(`/product-sorting/${id}` + buildQuery(query), {
|
|
8560
8529
|
headers: { Accept: "application/json" }
|
|
8561
8530
|
});
|
|
8562
8531
|
if (response.statusCode === 200)
|
|
@@ -8602,9 +8571,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8602
8571
|
/**
|
|
8603
8572
|
* @throws {Error} if the request failed
|
|
8604
8573
|
*/
|
|
8605
|
-
async getStreams(
|
|
8606
|
-
const response = await this.get(`/product-stream
|
|
8607
|
-
query: { limit, page, query },
|
|
8574
|
+
async getStreams(query) {
|
|
8575
|
+
const response = await this.get(`/product-stream` + buildQuery(query), {
|
|
8608
8576
|
headers: { Accept: "application/json" }
|
|
8609
8577
|
});
|
|
8610
8578
|
if (response.statusCode === 200)
|
|
@@ -8643,8 +8611,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8643
8611
|
/**
|
|
8644
8612
|
* @throws {Error} if the request failed
|
|
8645
8613
|
*/
|
|
8646
|
-
async getStream(id) {
|
|
8647
|
-
const response = await this.get(`/product-stream/${id}
|
|
8614
|
+
async getStream(id, query) {
|
|
8615
|
+
const response = await this.get(`/product-stream/${id}` + buildQuery(query), {
|
|
8648
8616
|
headers: { Accept: "application/json" }
|
|
8649
8617
|
});
|
|
8650
8618
|
if (response.statusCode === 200)
|
|
@@ -8688,9 +8656,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8688
8656
|
/**
|
|
8689
8657
|
* @throws {Error} if the request failed
|
|
8690
8658
|
*/
|
|
8691
|
-
async getStreamFilters(
|
|
8692
|
-
const response = await this.get(`/product-stream-filter
|
|
8693
|
-
query: { limit, page, query },
|
|
8659
|
+
async getStreamFilters(query) {
|
|
8660
|
+
const response = await this.get(`/product-stream-filter` + buildQuery(query), {
|
|
8694
8661
|
headers: { Accept: "application/json" }
|
|
8695
8662
|
});
|
|
8696
8663
|
if (response.statusCode === 200)
|
|
@@ -8731,8 +8698,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8731
8698
|
/**
|
|
8732
8699
|
* @throws {Error} if the request failed
|
|
8733
8700
|
*/
|
|
8734
|
-
async getStreamFilter(id) {
|
|
8735
|
-
const response = await this.get(`/product-stream-filter/${id}
|
|
8701
|
+
async getStreamFilter(id, query) {
|
|
8702
|
+
const response = await this.get(`/product-stream-filter/${id}` + buildQuery(query), {
|
|
8736
8703
|
headers: { Accept: "application/json" }
|
|
8737
8704
|
});
|
|
8738
8705
|
if (response.statusCode === 200)
|
|
@@ -8784,9 +8751,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8784
8751
|
/**
|
|
8785
8752
|
* @throws {Error} if the request failed
|
|
8786
8753
|
*/
|
|
8787
|
-
async getVisibilities(
|
|
8788
|
-
const response = await this.get(`/product-visibility
|
|
8789
|
-
query: { limit, page, query },
|
|
8754
|
+
async getVisibilities(query) {
|
|
8755
|
+
const response = await this.get(`/product-visibility` + buildQuery(query), {
|
|
8790
8756
|
headers: { Accept: "application/json" }
|
|
8791
8757
|
});
|
|
8792
8758
|
if (response.statusCode === 200)
|
|
@@ -8827,8 +8793,8 @@ let ProductClient$1 = class ProductClient extends Client {
|
|
|
8827
8793
|
/**
|
|
8828
8794
|
* @throws {Error} if the request failed
|
|
8829
8795
|
*/
|
|
8830
|
-
async getVisibility(id) {
|
|
8831
|
-
const response = await this.get(`/product-visibility/${id}
|
|
8796
|
+
async getVisibility(id, query) {
|
|
8797
|
+
const response = await this.get(`/product-visibility/${id}` + buildQuery(query), {
|
|
8832
8798
|
headers: { Accept: "application/json" }
|
|
8833
8799
|
});
|
|
8834
8800
|
if (response.statusCode === 200)
|
|
@@ -8881,9 +8847,8 @@ class PromotionClient extends Client {
|
|
|
8881
8847
|
/**
|
|
8882
8848
|
* @throws {Error} if the request failed
|
|
8883
8849
|
*/
|
|
8884
|
-
async getPromotions(
|
|
8885
|
-
const response = await this.get(`/promotion
|
|
8886
|
-
query: { limit, page, query },
|
|
8850
|
+
async getPromotions(query) {
|
|
8851
|
+
const response = await this.get(`/promotion` + buildQuery(query), {
|
|
8887
8852
|
headers: { Accept: "application/json" }
|
|
8888
8853
|
});
|
|
8889
8854
|
if (response.statusCode === 200)
|
|
@@ -8922,8 +8887,8 @@ class PromotionClient extends Client {
|
|
|
8922
8887
|
/**
|
|
8923
8888
|
* @throws {Error} if the request failed
|
|
8924
8889
|
*/
|
|
8925
|
-
async getPromotion(id) {
|
|
8926
|
-
const response = await this.get(`/promotion/${id}
|
|
8890
|
+
async getPromotion(id, query) {
|
|
8891
|
+
const response = await this.get(`/promotion/${id}` + buildQuery(query), {
|
|
8927
8892
|
headers: { Accept: "application/json" }
|
|
8928
8893
|
});
|
|
8929
8894
|
if (response.statusCode === 200)
|
|
@@ -8969,9 +8934,8 @@ class PromotionClient extends Client {
|
|
|
8969
8934
|
/**
|
|
8970
8935
|
* @throws {Error} if the request failed
|
|
8971
8936
|
*/
|
|
8972
|
-
async getDiscounts(
|
|
8973
|
-
const response = await this.get(`/promotion-discount
|
|
8974
|
-
query: { limit, page, query },
|
|
8937
|
+
async getDiscounts(query) {
|
|
8938
|
+
const response = await this.get(`/promotion-discount` + buildQuery(query), {
|
|
8975
8939
|
headers: { Accept: "application/json" }
|
|
8976
8940
|
});
|
|
8977
8941
|
if (response.statusCode === 200)
|
|
@@ -9010,8 +8974,8 @@ class PromotionClient extends Client {
|
|
|
9010
8974
|
/**
|
|
9011
8975
|
* @throws {Error} if the request failed
|
|
9012
8976
|
*/
|
|
9013
|
-
async getDiscount(id) {
|
|
9014
|
-
const response = await this.get(`/promotion-discount/${id}
|
|
8977
|
+
async getDiscount(id, query) {
|
|
8978
|
+
const response = await this.get(`/promotion-discount/${id}` + buildQuery(query), {
|
|
9015
8979
|
headers: { Accept: "application/json" }
|
|
9016
8980
|
});
|
|
9017
8981
|
if (response.statusCode === 200)
|
|
@@ -9057,9 +9021,8 @@ class PromotionClient extends Client {
|
|
|
9057
9021
|
/**
|
|
9058
9022
|
* @throws {Error} if the request failed
|
|
9059
9023
|
*/
|
|
9060
|
-
async getDiscountPrices(
|
|
9061
|
-
const response = await this.get(`/promotion-discount-price
|
|
9062
|
-
query: { limit, page, query },
|
|
9024
|
+
async getDiscountPrices(query) {
|
|
9025
|
+
const response = await this.get(`/promotion-discount-price` + buildQuery(query), {
|
|
9063
9026
|
headers: { Accept: "application/json" }
|
|
9064
9027
|
});
|
|
9065
9028
|
if (response.statusCode === 200)
|
|
@@ -9100,8 +9063,8 @@ class PromotionClient extends Client {
|
|
|
9100
9063
|
/**
|
|
9101
9064
|
* @throws {Error} if the request failed
|
|
9102
9065
|
*/
|
|
9103
|
-
async getDiscountPrice(id) {
|
|
9104
|
-
const response = await this.get(`/promotion-discount-price/${id}
|
|
9066
|
+
async getDiscountPrice(id, query) {
|
|
9067
|
+
const response = await this.get(`/promotion-discount-price/${id}` + buildQuery(query), {
|
|
9105
9068
|
headers: { Accept: "application/json" }
|
|
9106
9069
|
});
|
|
9107
9070
|
if (response.statusCode === 200)
|
|
@@ -9153,9 +9116,8 @@ class PromotionClient extends Client {
|
|
|
9153
9116
|
/**
|
|
9154
9117
|
* @throws {Error} if the request failed
|
|
9155
9118
|
*/
|
|
9156
|
-
async getIndividualCodes(
|
|
9157
|
-
const response = await this.get(`/promotion-individual-code
|
|
9158
|
-
query: { limit, page, query },
|
|
9119
|
+
async getIndividualCodes(query) {
|
|
9120
|
+
const response = await this.get(`/promotion-individual-code` + buildQuery(query), {
|
|
9159
9121
|
headers: { Accept: "application/json" }
|
|
9160
9122
|
});
|
|
9161
9123
|
if (response.statusCode === 200)
|
|
@@ -9196,8 +9158,8 @@ class PromotionClient extends Client {
|
|
|
9196
9158
|
/**
|
|
9197
9159
|
* @throws {Error} if the request failed
|
|
9198
9160
|
*/
|
|
9199
|
-
async getIndividualCode(id) {
|
|
9200
|
-
const response = await this.get(`/promotion-individual-code/${id}
|
|
9161
|
+
async getIndividualCode(id, query) {
|
|
9162
|
+
const response = await this.get(`/promotion-individual-code/${id}` + buildQuery(query), {
|
|
9201
9163
|
headers: { Accept: "application/json" }
|
|
9202
9164
|
});
|
|
9203
9165
|
if (response.statusCode === 200)
|
|
@@ -9249,9 +9211,8 @@ class PromotionClient extends Client {
|
|
|
9249
9211
|
/**
|
|
9250
9212
|
* @throws {Error} if the request failed
|
|
9251
9213
|
*/
|
|
9252
|
-
async getSalesChannels(
|
|
9253
|
-
const response = await this.get(`/promotion-sales-channel
|
|
9254
|
-
query: { limit, page, query },
|
|
9214
|
+
async getSalesChannels(query) {
|
|
9215
|
+
const response = await this.get(`/promotion-sales-channel` + buildQuery(query), {
|
|
9255
9216
|
headers: { Accept: "application/json" }
|
|
9256
9217
|
});
|
|
9257
9218
|
if (response.statusCode === 200)
|
|
@@ -9292,8 +9253,8 @@ class PromotionClient extends Client {
|
|
|
9292
9253
|
/**
|
|
9293
9254
|
* @throws {Error} if the request failed
|
|
9294
9255
|
*/
|
|
9295
|
-
async getSalesChannel(id) {
|
|
9296
|
-
const response = await this.get(`/promotion-sales-channel/${id}
|
|
9256
|
+
async getSalesChannel(id, query) {
|
|
9257
|
+
const response = await this.get(`/promotion-sales-channel/${id}` + buildQuery(query), {
|
|
9297
9258
|
headers: { Accept: "application/json" }
|
|
9298
9259
|
});
|
|
9299
9260
|
if (response.statusCode === 200)
|
|
@@ -9345,9 +9306,8 @@ class PromotionClient extends Client {
|
|
|
9345
9306
|
/**
|
|
9346
9307
|
* @throws {Error} if the request failed
|
|
9347
9308
|
*/
|
|
9348
|
-
async getSetGroups(
|
|
9349
|
-
const response = await this.get(`/promotion-setgroup
|
|
9350
|
-
query: { limit, page, query },
|
|
9309
|
+
async getSetGroups(query) {
|
|
9310
|
+
const response = await this.get(`/promotion-setgroup` + buildQuery(query), {
|
|
9351
9311
|
headers: { Accept: "application/json" }
|
|
9352
9312
|
});
|
|
9353
9313
|
if (response.statusCode === 200)
|
|
@@ -9386,8 +9346,8 @@ class PromotionClient extends Client {
|
|
|
9386
9346
|
/**
|
|
9387
9347
|
* @throws {Error} if the request failed
|
|
9388
9348
|
*/
|
|
9389
|
-
async getSetGroup(id) {
|
|
9390
|
-
const response = await this.get(`/promotion-setgroup/${id}
|
|
9349
|
+
async getSetGroup(id, query) {
|
|
9350
|
+
const response = await this.get(`/promotion-setgroup/${id}` + buildQuery(query), {
|
|
9391
9351
|
headers: { Accept: "application/json" }
|
|
9392
9352
|
});
|
|
9393
9353
|
if (response.statusCode === 200)
|
|
@@ -9436,9 +9396,8 @@ class PropertyGroupClient extends Client {
|
|
|
9436
9396
|
/**
|
|
9437
9397
|
* @throws {Error} if the request failed
|
|
9438
9398
|
*/
|
|
9439
|
-
async getPropertyGroups(
|
|
9440
|
-
const response = await this.get(`/property-group
|
|
9441
|
-
query: { limit, page, query },
|
|
9399
|
+
async getPropertyGroups(query) {
|
|
9400
|
+
const response = await this.get(`/property-group` + buildQuery(query), {
|
|
9442
9401
|
headers: { Accept: "application/json" }
|
|
9443
9402
|
});
|
|
9444
9403
|
if (response.statusCode === 200)
|
|
@@ -9479,8 +9438,8 @@ class PropertyGroupClient extends Client {
|
|
|
9479
9438
|
/**
|
|
9480
9439
|
* @throws {Error} if the request failed
|
|
9481
9440
|
*/
|
|
9482
|
-
async getPropertyGroup(id) {
|
|
9483
|
-
const response = await this.get(`/property-group/${id}
|
|
9441
|
+
async getPropertyGroup(id, query) {
|
|
9442
|
+
const response = await this.get(`/property-group/${id}` + buildQuery(query), {
|
|
9484
9443
|
headers: { Accept: "application/json" }
|
|
9485
9444
|
});
|
|
9486
9445
|
if (response.statusCode === 200)
|
|
@@ -9532,9 +9491,8 @@ class PropertyGroupClient extends Client {
|
|
|
9532
9491
|
/**
|
|
9533
9492
|
* @throws {Error} if the request failed
|
|
9534
9493
|
*/
|
|
9535
|
-
async getOptions(
|
|
9536
|
-
const response = await this.get(`/property-group-option
|
|
9537
|
-
query: { limit, page, query },
|
|
9494
|
+
async getOptions(query) {
|
|
9495
|
+
const response = await this.get(`/property-group-option` + buildQuery(query), {
|
|
9538
9496
|
headers: { Accept: "application/json" }
|
|
9539
9497
|
});
|
|
9540
9498
|
if (response.statusCode === 200)
|
|
@@ -9573,8 +9531,8 @@ class PropertyGroupClient extends Client {
|
|
|
9573
9531
|
/**
|
|
9574
9532
|
* @throws {Error} if the request failed
|
|
9575
9533
|
*/
|
|
9576
|
-
async getOption(id) {
|
|
9577
|
-
const response = await this.get(`/property-group-option/${id}
|
|
9534
|
+
async getOption(id, query) {
|
|
9535
|
+
const response = await this.get(`/property-group-option/${id}` + buildQuery(query), {
|
|
9578
9536
|
headers: { Accept: "application/json" }
|
|
9579
9537
|
});
|
|
9580
9538
|
if (response.statusCode === 200)
|
|
@@ -9621,9 +9579,8 @@ class RuleClient extends Client {
|
|
|
9621
9579
|
/**
|
|
9622
9580
|
* @throws {Error} if the request failed
|
|
9623
9581
|
*/
|
|
9624
|
-
async getRules(
|
|
9625
|
-
const response = await this.get(`/rule
|
|
9626
|
-
query: { limit, page, query },
|
|
9582
|
+
async getRules(query) {
|
|
9583
|
+
const response = await this.get(`/rule` + buildQuery(query), {
|
|
9627
9584
|
headers: { Accept: "application/json" }
|
|
9628
9585
|
});
|
|
9629
9586
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -9657,8 +9614,10 @@ class RuleClient extends Client {
|
|
|
9657
9614
|
/**
|
|
9658
9615
|
* @throws {Error} if the request failed
|
|
9659
9616
|
*/
|
|
9660
|
-
async getRule(id) {
|
|
9661
|
-
const response = await this.get(`/rule/${id}
|
|
9617
|
+
async getRule(id, query) {
|
|
9618
|
+
const response = await this.get(`/rule/${id}` + buildQuery(query), {
|
|
9619
|
+
headers: { Accept: "application/json" }
|
|
9620
|
+
});
|
|
9662
9621
|
if (response.statusCode === 200)
|
|
9663
9622
|
return response.body.data;
|
|
9664
9623
|
throw new Error(`Failed to fetch rule: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -9700,9 +9659,8 @@ class RuleClient extends Client {
|
|
|
9700
9659
|
/**
|
|
9701
9660
|
* @throws {Error} if the request failed
|
|
9702
9661
|
*/
|
|
9703
|
-
async getConditions(
|
|
9704
|
-
const response = await this.get(`/rule-condition
|
|
9705
|
-
query: { limit, page, query },
|
|
9662
|
+
async getConditions(query) {
|
|
9663
|
+
const response = await this.get(`/rule-condition` + buildQuery(query), {
|
|
9706
9664
|
headers: { Accept: "application/json" }
|
|
9707
9665
|
});
|
|
9708
9666
|
if (response.statusCode === 200)
|
|
@@ -9741,8 +9699,8 @@ class RuleClient extends Client {
|
|
|
9741
9699
|
/**
|
|
9742
9700
|
* @throws {Error} if the request failed
|
|
9743
9701
|
*/
|
|
9744
|
-
async getCondition(id) {
|
|
9745
|
-
const response = await this.get(`/rule-condition/${id}
|
|
9702
|
+
async getCondition(id, query) {
|
|
9703
|
+
const response = await this.get(`/rule-condition/${id}` + buildQuery(query), {
|
|
9746
9704
|
headers: { Accept: "application/json" }
|
|
9747
9705
|
});
|
|
9748
9706
|
if (response.statusCode === 200)
|
|
@@ -9791,9 +9749,8 @@ class SalesChannelClient extends Client {
|
|
|
9791
9749
|
/**
|
|
9792
9750
|
* @throws {Error} if the request failed
|
|
9793
9751
|
*/
|
|
9794
|
-
async getSalesChannels(
|
|
9795
|
-
const response = await this.get(`/sales-channel
|
|
9796
|
-
query: { limit, page, query },
|
|
9752
|
+
async getSalesChannels(query) {
|
|
9753
|
+
const response = await this.get(`/sales-channel` + buildQuery(query), {
|
|
9797
9754
|
headers: { Accept: "application/json" }
|
|
9798
9755
|
});
|
|
9799
9756
|
if (response.statusCode === 200)
|
|
@@ -9834,8 +9791,8 @@ class SalesChannelClient extends Client {
|
|
|
9834
9791
|
/**
|
|
9835
9792
|
* @throws {Error} if the request failed
|
|
9836
9793
|
*/
|
|
9837
|
-
async getSalesChannel(id) {
|
|
9838
|
-
const response = await this.get(`/sales-channel/${id}
|
|
9794
|
+
async getSalesChannel(id, query) {
|
|
9795
|
+
const response = await this.get(`/sales-channel/${id}` + buildQuery(query), {
|
|
9839
9796
|
headers: { Accept: "application/json" }
|
|
9840
9797
|
});
|
|
9841
9798
|
if (response.statusCode === 200)
|
|
@@ -9887,9 +9844,8 @@ class SalesChannelClient extends Client {
|
|
|
9887
9844
|
/**
|
|
9888
9845
|
* @throws {Error} if the request failed
|
|
9889
9846
|
*/
|
|
9890
|
-
async getAnalyticsList(
|
|
9891
|
-
const response = await this.get(`/sales-channel-analytics
|
|
9892
|
-
query: { limit, page, query },
|
|
9847
|
+
async getAnalyticsList(query) {
|
|
9848
|
+
const response = await this.get(`/sales-channel-analytics` + buildQuery(query), {
|
|
9893
9849
|
headers: { Accept: "application/json" }
|
|
9894
9850
|
});
|
|
9895
9851
|
if (response.statusCode === 200)
|
|
@@ -9928,8 +9884,8 @@ class SalesChannelClient extends Client {
|
|
|
9928
9884
|
/**
|
|
9929
9885
|
* @throws {Error} if the request failed
|
|
9930
9886
|
*/
|
|
9931
|
-
async getAnalytics(id) {
|
|
9932
|
-
const response = await this.get(`/sales-channel-analytics/${id}
|
|
9887
|
+
async getAnalytics(id, query) {
|
|
9888
|
+
const response = await this.get(`/sales-channel-analytics/${id}` + buildQuery(query), {
|
|
9933
9889
|
headers: { Accept: "application/json" }
|
|
9934
9890
|
});
|
|
9935
9891
|
if (response.statusCode === 200)
|
|
@@ -9975,9 +9931,8 @@ class SalesChannelClient extends Client {
|
|
|
9975
9931
|
/**
|
|
9976
9932
|
* @throws {Error} if the request failed
|
|
9977
9933
|
*/
|
|
9978
|
-
async getDomains(
|
|
9979
|
-
const response = await this.get(`/sales-channel-domain
|
|
9980
|
-
query: { limit, page, query },
|
|
9934
|
+
async getDomains(query) {
|
|
9935
|
+
const response = await this.get(`/sales-channel-domain` + buildQuery(query), {
|
|
9981
9936
|
headers: { Accept: "application/json" }
|
|
9982
9937
|
});
|
|
9983
9938
|
if (response.statusCode === 200)
|
|
@@ -10016,8 +9971,8 @@ class SalesChannelClient extends Client {
|
|
|
10016
9971
|
/**
|
|
10017
9972
|
* @throws {Error} if the request failed
|
|
10018
9973
|
*/
|
|
10019
|
-
async getDomain(id) {
|
|
10020
|
-
const response = await this.get(`/sales-channel-domain/${id}
|
|
9974
|
+
async getDomain(id, query) {
|
|
9975
|
+
const response = await this.get(`/sales-channel-domain/${id}` + buildQuery(query), {
|
|
10021
9976
|
headers: { Accept: "application/json" }
|
|
10022
9977
|
});
|
|
10023
9978
|
if (response.statusCode === 200)
|
|
@@ -10061,9 +10016,8 @@ class SalesChannelClient extends Client {
|
|
|
10061
10016
|
/**
|
|
10062
10017
|
* @throws {Error} if the request failed
|
|
10063
10018
|
*/
|
|
10064
|
-
async getTypes(
|
|
10065
|
-
const response = await this.get(`/sales-channel-type
|
|
10066
|
-
query: { limit, page, query },
|
|
10019
|
+
async getTypes(query) {
|
|
10020
|
+
const response = await this.get(`/sales-channel-type` + buildQuery(query), {
|
|
10067
10021
|
headers: { Accept: "application/json" }
|
|
10068
10022
|
});
|
|
10069
10023
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -10097,8 +10051,8 @@ class SalesChannelClient extends Client {
|
|
|
10097
10051
|
/**
|
|
10098
10052
|
* @throws {Error} if the request failed
|
|
10099
10053
|
*/
|
|
10100
|
-
async getType(id) {
|
|
10101
|
-
const response = await this.get(`/sales-channel-type/${id}
|
|
10054
|
+
async getType(id, query) {
|
|
10055
|
+
const response = await this.get(`/sales-channel-type/${id}` + buildQuery(query), {
|
|
10102
10056
|
headers: { Accept: "application/json" }
|
|
10103
10057
|
});
|
|
10104
10058
|
if (response.statusCode === 200)
|
|
@@ -10144,9 +10098,8 @@ class SalutationClient extends Client {
|
|
|
10144
10098
|
/**
|
|
10145
10099
|
* @throws {Error} if the request failed
|
|
10146
10100
|
*/
|
|
10147
|
-
async getSalutations(
|
|
10148
|
-
const response = await this.get(`/salutation
|
|
10149
|
-
query: { limit, page, query },
|
|
10101
|
+
async getSalutations(query) {
|
|
10102
|
+
const response = await this.get(`/salutation` + buildQuery(query), {
|
|
10150
10103
|
headers: { Accept: "application/json" }
|
|
10151
10104
|
});
|
|
10152
10105
|
if (response.statusCode === 200)
|
|
@@ -10187,8 +10140,8 @@ class SalutationClient extends Client {
|
|
|
10187
10140
|
/**
|
|
10188
10141
|
* @throws {Error} if the request failed
|
|
10189
10142
|
*/
|
|
10190
|
-
async getSalutation(id) {
|
|
10191
|
-
const response = await this.get(`/salutation/${id}
|
|
10143
|
+
async getSalutation(id, query) {
|
|
10144
|
+
const response = await this.get(`/salutation/${id}` + buildQuery(query), {
|
|
10192
10145
|
headers: { Accept: "application/json" }
|
|
10193
10146
|
});
|
|
10194
10147
|
if (response.statusCode === 200)
|
|
@@ -10240,9 +10193,8 @@ class ScriptClient extends Client {
|
|
|
10240
10193
|
/**
|
|
10241
10194
|
* @throws {Error} if the request failed
|
|
10242
10195
|
*/
|
|
10243
|
-
async getScripts(
|
|
10244
|
-
const response = await this.get(`/script
|
|
10245
|
-
query: { limit, page, query },
|
|
10196
|
+
async getScripts(query) {
|
|
10197
|
+
const response = await this.get(`/script` + buildQuery(query), {
|
|
10246
10198
|
headers: { Accept: "application/json" }
|
|
10247
10199
|
});
|
|
10248
10200
|
if (response.statusCode === 200)
|
|
@@ -10281,8 +10233,10 @@ class ScriptClient extends Client {
|
|
|
10281
10233
|
/**
|
|
10282
10234
|
* @throws {Error} if the request failed
|
|
10283
10235
|
*/
|
|
10284
|
-
async getScript(id) {
|
|
10285
|
-
const response = await this.get(`/script/${id}
|
|
10236
|
+
async getScript(id, query) {
|
|
10237
|
+
const response = await this.get(`/script/${id}` + buildQuery(query), {
|
|
10238
|
+
headers: { Accept: "application/json" }
|
|
10239
|
+
});
|
|
10286
10240
|
if (response.statusCode === 200)
|
|
10287
10241
|
return response.body.data;
|
|
10288
10242
|
throw new Error(`Failed to fetch script: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -10326,9 +10280,8 @@ class SecurityClient extends Client {
|
|
|
10326
10280
|
/**
|
|
10327
10281
|
* @throws {Error} if the request failed
|
|
10328
10282
|
*/
|
|
10329
|
-
async getAclRoles(
|
|
10330
|
-
const response = await this.get(`/acl-role
|
|
10331
|
-
query: { limit, page, query },
|
|
10283
|
+
async getAclRoles(query) {
|
|
10284
|
+
const response = await this.get(`/acl-role` + buildQuery(query), {
|
|
10332
10285
|
headers: { Accept: "application/json" }
|
|
10333
10286
|
});
|
|
10334
10287
|
if (response.statusCode === 200)
|
|
@@ -10367,8 +10320,10 @@ class SecurityClient extends Client {
|
|
|
10367
10320
|
/**
|
|
10368
10321
|
* @throws {Error} if the request failed
|
|
10369
10322
|
*/
|
|
10370
|
-
async getAclRole(id) {
|
|
10371
|
-
const response = await this.get(`/acl-role/${id}
|
|
10323
|
+
async getAclRole(id, query) {
|
|
10324
|
+
const response = await this.get(`/acl-role/${id}` + buildQuery(query), {
|
|
10325
|
+
headers: { Accept: "application/json" }
|
|
10326
|
+
});
|
|
10372
10327
|
if (response.statusCode === 200)
|
|
10373
10328
|
return response.body.data;
|
|
10374
10329
|
throw new Error(`Failed to fetch acl role: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -10415,9 +10370,8 @@ let DeliveryTimeClient$2 = class DeliveryTimeClient extends Client {
|
|
|
10415
10370
|
/**
|
|
10416
10371
|
* @throws {Error} if the request failed
|
|
10417
10372
|
*/
|
|
10418
|
-
async getUrls(
|
|
10419
|
-
const response = await this.get(`/seo-url
|
|
10420
|
-
query: { limit, page, query },
|
|
10373
|
+
async getUrls(query) {
|
|
10374
|
+
const response = await this.get(`/seo-url` + buildQuery(query), {
|
|
10421
10375
|
headers: { Accept: "application/json" }
|
|
10422
10376
|
});
|
|
10423
10377
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -10451,8 +10405,10 @@ let DeliveryTimeClient$2 = class DeliveryTimeClient extends Client {
|
|
|
10451
10405
|
/**
|
|
10452
10406
|
* @throws {Error} if the request failed
|
|
10453
10407
|
*/
|
|
10454
|
-
async getUrl(id) {
|
|
10455
|
-
const response = await this.get(`/seo-url/${id}
|
|
10408
|
+
async getUrl(id, query) {
|
|
10409
|
+
const response = await this.get(`/seo-url/${id}` + buildQuery(query), {
|
|
10410
|
+
headers: { Accept: "application/json" }
|
|
10411
|
+
});
|
|
10456
10412
|
if (response.statusCode === 200)
|
|
10457
10413
|
return response.body.data;
|
|
10458
10414
|
throw new Error(`Failed to fetch url: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -10494,9 +10450,8 @@ let DeliveryTimeClient$2 = class DeliveryTimeClient extends Client {
|
|
|
10494
10450
|
/**
|
|
10495
10451
|
* @throws {Error} if the request failed
|
|
10496
10452
|
*/
|
|
10497
|
-
async getUrlTemplates(
|
|
10498
|
-
const response = await this.get(`/seo-url-template
|
|
10499
|
-
query: { limit, page, query },
|
|
10453
|
+
async getUrlTemplates(query) {
|
|
10454
|
+
const response = await this.get(`/seo-url-template` + buildQuery(query), {
|
|
10500
10455
|
headers: { Accept: "application/json" }
|
|
10501
10456
|
});
|
|
10502
10457
|
if (response.statusCode === 200)
|
|
@@ -10537,8 +10492,8 @@ let DeliveryTimeClient$2 = class DeliveryTimeClient extends Client {
|
|
|
10537
10492
|
/**
|
|
10538
10493
|
* @throws {Error} if the request failed
|
|
10539
10494
|
*/
|
|
10540
|
-
async getUrlTemplate(id) {
|
|
10541
|
-
const response = await this.get(`/seo-url-template/${id}
|
|
10495
|
+
async getUrlTemplate(id, query) {
|
|
10496
|
+
const response = await this.get(`/seo-url-template/${id}` + buildQuery(query), {
|
|
10542
10497
|
headers: { Accept: "application/json" }
|
|
10543
10498
|
});
|
|
10544
10499
|
if (response.statusCode === 200)
|
|
@@ -10593,9 +10548,8 @@ class ShippingMethodClient extends Client {
|
|
|
10593
10548
|
/**
|
|
10594
10549
|
* @throws {Error} if the request failed
|
|
10595
10550
|
*/
|
|
10596
|
-
async getShippingMethods(
|
|
10597
|
-
const response = await this.get(`/shipping-method
|
|
10598
|
-
query: { limit, page, query },
|
|
10551
|
+
async getShippingMethods(query) {
|
|
10552
|
+
const response = await this.get(`/shipping-method` + buildQuery(query), {
|
|
10599
10553
|
headers: { Accept: "application/json" }
|
|
10600
10554
|
});
|
|
10601
10555
|
if (response.statusCode === 200)
|
|
@@ -10636,8 +10590,8 @@ class ShippingMethodClient extends Client {
|
|
|
10636
10590
|
/**
|
|
10637
10591
|
* @throws {Error} if the request failed
|
|
10638
10592
|
*/
|
|
10639
|
-
async getShippingMethod(id) {
|
|
10640
|
-
const response = await this.get(`/shipping-method/${id}
|
|
10593
|
+
async getShippingMethod(id, query) {
|
|
10594
|
+
const response = await this.get(`/shipping-method/${id}` + buildQuery(query), {
|
|
10641
10595
|
headers: { Accept: "application/json" }
|
|
10642
10596
|
});
|
|
10643
10597
|
if (response.statusCode === 200)
|
|
@@ -10689,9 +10643,8 @@ class ShippingMethodClient extends Client {
|
|
|
10689
10643
|
/**
|
|
10690
10644
|
* @throws {Error} if the request failed
|
|
10691
10645
|
*/
|
|
10692
|
-
async getPrices(
|
|
10693
|
-
const response = await this.get(`/shipping-method-price
|
|
10694
|
-
query: { limit, page, query },
|
|
10646
|
+
async getPrices(query) {
|
|
10647
|
+
const response = await this.get(`/shipping-method-price` + buildQuery(query), {
|
|
10695
10648
|
headers: { Accept: "application/json" }
|
|
10696
10649
|
});
|
|
10697
10650
|
if (response.statusCode === 200)
|
|
@@ -10732,8 +10685,8 @@ class ShippingMethodClient extends Client {
|
|
|
10732
10685
|
/**
|
|
10733
10686
|
* @throws {Error} if the request failed
|
|
10734
10687
|
*/
|
|
10735
|
-
async getPrice(id) {
|
|
10736
|
-
const response = await this.get(`/shipping-method-price/${id}
|
|
10688
|
+
async getPrice(id, query) {
|
|
10689
|
+
const response = await this.get(`/shipping-method-price/${id}` + buildQuery(query), {
|
|
10737
10690
|
headers: { Accept: "application/json" }
|
|
10738
10691
|
});
|
|
10739
10692
|
if (response.statusCode === 200)
|
|
@@ -10780,9 +10733,8 @@ let DeliveryTimeClient$1 = class DeliveryTimeClient extends Client {
|
|
|
10780
10733
|
/**
|
|
10781
10734
|
* @throws {Error} if the request failed
|
|
10782
10735
|
*/
|
|
10783
|
-
async getSnippets(
|
|
10784
|
-
const response = await this.get(`/snippet
|
|
10785
|
-
query: { limit, page, query },
|
|
10736
|
+
async getSnippets(query) {
|
|
10737
|
+
const response = await this.get(`/snippet` + buildQuery(query), {
|
|
10786
10738
|
headers: { Accept: "application/json" }
|
|
10787
10739
|
});
|
|
10788
10740
|
if (response.statusCode === 200)
|
|
@@ -10821,8 +10773,10 @@ let DeliveryTimeClient$1 = class DeliveryTimeClient extends Client {
|
|
|
10821
10773
|
/**
|
|
10822
10774
|
* @throws {Error} if the request failed
|
|
10823
10775
|
*/
|
|
10824
|
-
async getSnippet(id) {
|
|
10825
|
-
const response = await this.get(`/snippet/${id}
|
|
10776
|
+
async getSnippet(id, query) {
|
|
10777
|
+
const response = await this.get(`/snippet/${id}` + buildQuery(query), {
|
|
10778
|
+
headers: { Accept: "application/json" }
|
|
10779
|
+
});
|
|
10826
10780
|
if (response.statusCode === 200)
|
|
10827
10781
|
return response.body.data;
|
|
10828
10782
|
throw new Error(`Failed to fetch snippet: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -10866,9 +10820,8 @@ let DeliveryTimeClient$1 = class DeliveryTimeClient extends Client {
|
|
|
10866
10820
|
/**
|
|
10867
10821
|
* @throws {Error} if the request failed
|
|
10868
10822
|
*/
|
|
10869
|
-
async getSets(
|
|
10870
|
-
const response = await this.get(`/snippet-set
|
|
10871
|
-
query: { limit, page, query },
|
|
10823
|
+
async getSets(query) {
|
|
10824
|
+
const response = await this.get(`/snippet-set` + buildQuery(query), {
|
|
10872
10825
|
headers: { Accept: "application/json" }
|
|
10873
10826
|
});
|
|
10874
10827
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -10908,8 +10861,8 @@ let DeliveryTimeClient$1 = class DeliveryTimeClient extends Client {
|
|
|
10908
10861
|
/**
|
|
10909
10862
|
* @throws {Error} if the request failed
|
|
10910
10863
|
*/
|
|
10911
|
-
async getSet(id) {
|
|
10912
|
-
const response = await this.get(`/snippet-set/${id}
|
|
10864
|
+
async getSet(id, query) {
|
|
10865
|
+
const response = await this.get(`/snippet-set/${id}` + buildQuery(query), {
|
|
10913
10866
|
headers: { Accept: "application/json" }
|
|
10914
10867
|
});
|
|
10915
10868
|
if (response.statusCode === 200)
|
|
@@ -10964,9 +10917,8 @@ class DeliveryTimeClient extends Client {
|
|
|
10964
10917
|
/**
|
|
10965
10918
|
* @throws {Error} if the request failed
|
|
10966
10919
|
*/
|
|
10967
|
-
async getStateMachines(
|
|
10968
|
-
const response = await this.get(`/state-machine
|
|
10969
|
-
query: { limit, page, query },
|
|
10920
|
+
async getStateMachines(query) {
|
|
10921
|
+
const response = await this.get(`/state-machine` + buildQuery(query), {
|
|
10970
10922
|
headers: { Accept: "application/json" }
|
|
10971
10923
|
});
|
|
10972
10924
|
if (response.statusCode === 200)
|
|
@@ -11007,8 +10959,8 @@ class DeliveryTimeClient extends Client {
|
|
|
11007
10959
|
/**
|
|
11008
10960
|
* @throws {Error} if the request failed
|
|
11009
10961
|
*/
|
|
11010
|
-
async getStateMachine(id) {
|
|
11011
|
-
const response = await this.get(`/state-machine/${id}
|
|
10962
|
+
async getStateMachine(id, query) {
|
|
10963
|
+
const response = await this.get(`/state-machine/${id}` + buildQuery(query), {
|
|
11012
10964
|
headers: { Accept: "application/json" }
|
|
11013
10965
|
});
|
|
11014
10966
|
if (response.statusCode === 200)
|
|
@@ -11060,9 +11012,8 @@ class DeliveryTimeClient extends Client {
|
|
|
11060
11012
|
/**
|
|
11061
11013
|
* @throws {Error} if the request failed
|
|
11062
11014
|
*/
|
|
11063
|
-
async getStates(
|
|
11064
|
-
const response = await this.get(`/state-machine-state
|
|
11065
|
-
query: { limit, page, query },
|
|
11015
|
+
async getStates(query) {
|
|
11016
|
+
const response = await this.get(`/state-machine-state` + buildQuery(query), {
|
|
11066
11017
|
headers: { Accept: "application/json" }
|
|
11067
11018
|
});
|
|
11068
11019
|
if (response.statusCode === 200)
|
|
@@ -11099,8 +11050,8 @@ class DeliveryTimeClient extends Client {
|
|
|
11099
11050
|
/**
|
|
11100
11051
|
* @throws {Error} if the request failed
|
|
11101
11052
|
*/
|
|
11102
|
-
async getState(id) {
|
|
11103
|
-
const response = await this.get(`/state-machine-state/${id}
|
|
11053
|
+
async getState(id, query) {
|
|
11054
|
+
const response = await this.get(`/state-machine-state/${id}` + buildQuery(query), {
|
|
11104
11055
|
headers: { Accept: "application/json" }
|
|
11105
11056
|
});
|
|
11106
11057
|
if (response.statusCode === 200)
|
|
@@ -11144,9 +11095,8 @@ class DeliveryTimeClient extends Client {
|
|
|
11144
11095
|
/**
|
|
11145
11096
|
* @throws {Error} if the request failed
|
|
11146
11097
|
*/
|
|
11147
|
-
async getTransitions(
|
|
11148
|
-
const response = await this.get(`/state-machine-transition
|
|
11149
|
-
query: { limit, page, query },
|
|
11098
|
+
async getTransitions(query) {
|
|
11099
|
+
const response = await this.get(`/state-machine-transition` + buildQuery(query), {
|
|
11150
11100
|
headers: { Accept: "application/json" }
|
|
11151
11101
|
});
|
|
11152
11102
|
if (response.statusCode === 200)
|
|
@@ -11187,8 +11137,8 @@ class DeliveryTimeClient extends Client {
|
|
|
11187
11137
|
/**
|
|
11188
11138
|
* @throws {Error} if the request failed
|
|
11189
11139
|
*/
|
|
11190
|
-
async getTransition(id) {
|
|
11191
|
-
const response = await this.get(`/state-machine-transition/${id}
|
|
11140
|
+
async getTransition(id, query) {
|
|
11141
|
+
const response = await this.get(`/state-machine-transition/${id}` + buildQuery(query), {
|
|
11192
11142
|
headers: { Accept: "application/json" }
|
|
11193
11143
|
});
|
|
11194
11144
|
if (response.statusCode === 200)
|
|
@@ -11432,9 +11382,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11432
11382
|
/**
|
|
11433
11383
|
* @throws {Error} if the request failed
|
|
11434
11384
|
*/
|
|
11435
|
-
async getLogEntries(
|
|
11436
|
-
const response = await this.get(`/log-entry
|
|
11437
|
-
query: { limit, page, query },
|
|
11385
|
+
async getLogEntries(query) {
|
|
11386
|
+
const response = await this.get(`/log-entry` + buildQuery(query), {
|
|
11438
11387
|
headers: { Accept: "application/json" }
|
|
11439
11388
|
});
|
|
11440
11389
|
if (response.statusCode === 200)
|
|
@@ -11473,8 +11422,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11473
11422
|
/**
|
|
11474
11423
|
* @throws {Error} if the request failed
|
|
11475
11424
|
*/
|
|
11476
|
-
async getLogEntry(id) {
|
|
11477
|
-
const response = await this.get(`/log-entry/${id}
|
|
11425
|
+
async getLogEntry(id, query) {
|
|
11426
|
+
const response = await this.get(`/log-entry/${id}` + buildQuery(query), {
|
|
11478
11427
|
headers: { Accept: "application/json" }
|
|
11479
11428
|
});
|
|
11480
11429
|
if (response.statusCode === 200)
|
|
@@ -11520,9 +11469,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11520
11469
|
/**
|
|
11521
11470
|
* @throws {Error} if the request failed
|
|
11522
11471
|
*/
|
|
11523
|
-
async getNotifications(
|
|
11524
|
-
const response = await this.get(`/notification
|
|
11525
|
-
query: { limit, page, query },
|
|
11472
|
+
async getNotifications(query) {
|
|
11473
|
+
const response = await this.get(`/notification` + buildQuery(query), {
|
|
11526
11474
|
headers: { Accept: "application/json" }
|
|
11527
11475
|
});
|
|
11528
11476
|
if (response.statusCode === 200)
|
|
@@ -11563,8 +11511,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11563
11511
|
/**
|
|
11564
11512
|
* @throws {Error} if the request failed
|
|
11565
11513
|
*/
|
|
11566
|
-
async getNotification(id) {
|
|
11567
|
-
const response = await this.get(`/notification/${id}
|
|
11514
|
+
async getNotification(id, query) {
|
|
11515
|
+
const response = await this.get(`/notification/${id}` + buildQuery(query), {
|
|
11568
11516
|
headers: { Accept: "application/json" }
|
|
11569
11517
|
});
|
|
11570
11518
|
if (response.statusCode === 200)
|
|
@@ -11616,9 +11564,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11616
11564
|
/**
|
|
11617
11565
|
* @throws {Error} if the request failed
|
|
11618
11566
|
*/
|
|
11619
|
-
async getConfigEntries(
|
|
11620
|
-
const response = await this.get(`/system-config
|
|
11621
|
-
query: { limit, page, query },
|
|
11567
|
+
async getConfigEntries(query) {
|
|
11568
|
+
const response = await this.get(`/system-config` + buildQuery(query), {
|
|
11622
11569
|
headers: { Accept: "application/json" }
|
|
11623
11570
|
});
|
|
11624
11571
|
if (response.statusCode === 200)
|
|
@@ -11659,8 +11606,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11659
11606
|
/**
|
|
11660
11607
|
* @throws {Error} if the request failed
|
|
11661
11608
|
*/
|
|
11662
|
-
async getConfigEntry(id) {
|
|
11663
|
-
const response = await this.get(`/system-config/${id}
|
|
11609
|
+
async getConfigEntry(id, query) {
|
|
11610
|
+
const response = await this.get(`/system-config/${id}` + buildQuery(query), {
|
|
11664
11611
|
headers: { Accept: "application/json" }
|
|
11665
11612
|
});
|
|
11666
11613
|
if (response.statusCode === 200)
|
|
@@ -11712,9 +11659,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11712
11659
|
/**
|
|
11713
11660
|
* @throws {Error} if the request failed
|
|
11714
11661
|
*/
|
|
11715
|
-
async getScheduledTasks(
|
|
11716
|
-
const response = await this.get(`/scheduled-task
|
|
11717
|
-
query: { limit, page, query },
|
|
11662
|
+
async getScheduledTasks(query) {
|
|
11663
|
+
const response = await this.get(`/scheduled-task` + buildQuery(query), {
|
|
11718
11664
|
headers: { Accept: "application/json" }
|
|
11719
11665
|
});
|
|
11720
11666
|
if (response.statusCode === 200)
|
|
@@ -11755,8 +11701,8 @@ let SystemClient$1 = class SystemClient extends Client {
|
|
|
11755
11701
|
/**
|
|
11756
11702
|
* @throws {Error} if the request failed
|
|
11757
11703
|
*/
|
|
11758
|
-
async getScheduledTask(id) {
|
|
11759
|
-
const response = await this.get(`/scheduled-task/${id}
|
|
11704
|
+
async getScheduledTask(id, query) {
|
|
11705
|
+
const response = await this.get(`/scheduled-task/${id}` + buildQuery(query), {
|
|
11760
11706
|
headers: { Accept: "application/json" }
|
|
11761
11707
|
});
|
|
11762
11708
|
if (response.statusCode === 200)
|
|
@@ -11810,9 +11756,8 @@ class TagClient extends Client {
|
|
|
11810
11756
|
/**
|
|
11811
11757
|
* @throws {Error} if the request failed
|
|
11812
11758
|
*/
|
|
11813
|
-
async getTags(
|
|
11814
|
-
const response = await this.get(`/tag
|
|
11815
|
-
query: { limit, page, query },
|
|
11759
|
+
async getTags(query) {
|
|
11760
|
+
const response = await this.get(`/tag` + buildQuery(query), {
|
|
11816
11761
|
headers: { Accept: "application/json" }
|
|
11817
11762
|
});
|
|
11818
11763
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -11846,8 +11791,10 @@ class TagClient extends Client {
|
|
|
11846
11791
|
/**
|
|
11847
11792
|
* @throws {Error} if the request failed
|
|
11848
11793
|
*/
|
|
11849
|
-
async getTag(id) {
|
|
11850
|
-
const response = await this.get(`/tag/${id}
|
|
11794
|
+
async getTag(id, query) {
|
|
11795
|
+
const response = await this.get(`/tag/${id}` + buildQuery(query), {
|
|
11796
|
+
headers: { Accept: "application/json" }
|
|
11797
|
+
});
|
|
11851
11798
|
if (response.statusCode === 200)
|
|
11852
11799
|
return response.body.data;
|
|
11853
11800
|
throw new Error(`Failed to fetch tag: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -11892,9 +11839,8 @@ class TaxClient extends Client {
|
|
|
11892
11839
|
/**
|
|
11893
11840
|
* @throws {Error} if the request failed
|
|
11894
11841
|
*/
|
|
11895
|
-
async getTaxes(
|
|
11896
|
-
const response = await this.get(`/tax
|
|
11897
|
-
query: { limit, page, query },
|
|
11842
|
+
async getTaxes(query) {
|
|
11843
|
+
const response = await this.get(`/tax` + buildQuery(query), {
|
|
11898
11844
|
headers: { Accept: "application/json" }
|
|
11899
11845
|
});
|
|
11900
11846
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -11928,8 +11874,10 @@ class TaxClient extends Client {
|
|
|
11928
11874
|
/**
|
|
11929
11875
|
* @throws {Error} if the request failed
|
|
11930
11876
|
*/
|
|
11931
|
-
async getTax(id) {
|
|
11932
|
-
const response = await this.get(`/tax/${id}
|
|
11877
|
+
async getTax(id, query) {
|
|
11878
|
+
const response = await this.get(`/tax/${id}` + buildQuery(query), {
|
|
11879
|
+
headers: { Accept: "application/json" }
|
|
11880
|
+
});
|
|
11933
11881
|
if (response.statusCode === 200)
|
|
11934
11882
|
return response.body.data;
|
|
11935
11883
|
throw new Error(`Failed to fetch tax: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -11971,9 +11919,8 @@ class TaxClient extends Client {
|
|
|
11971
11919
|
/**
|
|
11972
11920
|
* @throws {Error} if the request failed
|
|
11973
11921
|
*/
|
|
11974
|
-
async getProviders(
|
|
11975
|
-
const response = await this.get(`/tax-provider
|
|
11976
|
-
query: { limit, page, query },
|
|
11922
|
+
async getProviders(query) {
|
|
11923
|
+
const response = await this.get(`/tax-provider` + buildQuery(query), {
|
|
11977
11924
|
headers: { Accept: "application/json" }
|
|
11978
11925
|
});
|
|
11979
11926
|
if (response.statusCode === 200)
|
|
@@ -12012,8 +11959,8 @@ class TaxClient extends Client {
|
|
|
12012
11959
|
/**
|
|
12013
11960
|
* @throws {Error} if the request failed
|
|
12014
11961
|
*/
|
|
12015
|
-
async getProvider(id) {
|
|
12016
|
-
const response = await this.get(`/tax-provider/${id}
|
|
11962
|
+
async getProvider(id, query) {
|
|
11963
|
+
const response = await this.get(`/tax-provider/${id}` + buildQuery(query), {
|
|
12017
11964
|
headers: { Accept: "application/json" }
|
|
12018
11965
|
});
|
|
12019
11966
|
if (response.statusCode === 200)
|
|
@@ -12059,9 +12006,8 @@ class TaxClient extends Client {
|
|
|
12059
12006
|
/**
|
|
12060
12007
|
* @throws {Error} if the request failed
|
|
12061
12008
|
*/
|
|
12062
|
-
async getRules(
|
|
12063
|
-
const response = await this.get(`/tax-rule
|
|
12064
|
-
query: { limit, page, query },
|
|
12009
|
+
async getRules(query) {
|
|
12010
|
+
const response = await this.get(`/tax-rule` + buildQuery(query), {
|
|
12065
12011
|
headers: { Accept: "application/json" }
|
|
12066
12012
|
});
|
|
12067
12013
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -12095,8 +12041,10 @@ class TaxClient extends Client {
|
|
|
12095
12041
|
/**
|
|
12096
12042
|
* @throws {Error} if the request failed
|
|
12097
12043
|
*/
|
|
12098
|
-
async getRule(id) {
|
|
12099
|
-
const response = await this.get(`/tax-rule/${id}
|
|
12044
|
+
async getRule(id, query) {
|
|
12045
|
+
const response = await this.get(`/tax-rule/${id}` + buildQuery(query), {
|
|
12046
|
+
headers: { Accept: "application/json" }
|
|
12047
|
+
});
|
|
12100
12048
|
if (response.statusCode === 200)
|
|
12101
12049
|
return response.body.data;
|
|
12102
12050
|
throw new Error(`Failed to fetch rule: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -12138,9 +12086,8 @@ class TaxClient extends Client {
|
|
|
12138
12086
|
/**
|
|
12139
12087
|
* @throws {Error} if the request failed
|
|
12140
12088
|
*/
|
|
12141
|
-
async getRuleTypes(
|
|
12142
|
-
const response = await this.get(`/tax-rule-type
|
|
12143
|
-
query: { limit, page, query },
|
|
12089
|
+
async getRuleTypes(query) {
|
|
12090
|
+
const response = await this.get(`/tax-rule-type` + buildQuery(query), {
|
|
12144
12091
|
headers: { Accept: "application/json" }
|
|
12145
12092
|
});
|
|
12146
12093
|
if (response.statusCode === 200)
|
|
@@ -12179,8 +12126,8 @@ class TaxClient extends Client {
|
|
|
12179
12126
|
/**
|
|
12180
12127
|
* @throws {Error} if the request failed
|
|
12181
12128
|
*/
|
|
12182
|
-
async getRuleType(id) {
|
|
12183
|
-
const response = await this.get(`/tax-rule-type/${id}
|
|
12129
|
+
async getRuleType(id, query) {
|
|
12130
|
+
const response = await this.get(`/tax-rule-type/${id}` + buildQuery(query), {
|
|
12184
12131
|
headers: { Accept: "application/json" }
|
|
12185
12132
|
});
|
|
12186
12133
|
if (response.statusCode === 200)
|
|
@@ -12228,9 +12175,8 @@ class UnitClient extends Client {
|
|
|
12228
12175
|
/**
|
|
12229
12176
|
* @throws {Error} if the request failed
|
|
12230
12177
|
*/
|
|
12231
|
-
async getUnits(
|
|
12232
|
-
const response = await this.get(`/unit
|
|
12233
|
-
query: { limit, page, query },
|
|
12178
|
+
async getUnits(query) {
|
|
12179
|
+
const response = await this.get(`/unit` + buildQuery(query), {
|
|
12234
12180
|
headers: { Accept: "application/json" }
|
|
12235
12181
|
});
|
|
12236
12182
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -12264,8 +12210,10 @@ class UnitClient extends Client {
|
|
|
12264
12210
|
/**
|
|
12265
12211
|
* @throws {Error} if the request failed
|
|
12266
12212
|
*/
|
|
12267
|
-
async getUnit(id) {
|
|
12268
|
-
const response = await this.get(`/unit/${id}
|
|
12213
|
+
async getUnit(id, query) {
|
|
12214
|
+
const response = await this.get(`/unit/${id}` + buildQuery(query), {
|
|
12215
|
+
headers: { Accept: "application/json" }
|
|
12216
|
+
});
|
|
12269
12217
|
if (response.statusCode === 200)
|
|
12270
12218
|
return response.body.data;
|
|
12271
12219
|
throw new Error(`Failed to fetch unit: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -12310,9 +12258,8 @@ class UserClient extends Client {
|
|
|
12310
12258
|
/**
|
|
12311
12259
|
* @throws {Error} if the request failed
|
|
12312
12260
|
*/
|
|
12313
|
-
async getUsers(
|
|
12314
|
-
const response = await this.get(`/user
|
|
12315
|
-
query: { limit, page, query },
|
|
12261
|
+
async getUsers(query) {
|
|
12262
|
+
const response = await this.get(`/user` + buildQuery(query), {
|
|
12316
12263
|
headers: { Accept: "application/json" }
|
|
12317
12264
|
});
|
|
12318
12265
|
if (response.statusCode === 200) return response.body.data;
|
|
@@ -12346,8 +12293,10 @@ class UserClient extends Client {
|
|
|
12346
12293
|
/**
|
|
12347
12294
|
* @throws {Error} if the request failed
|
|
12348
12295
|
*/
|
|
12349
|
-
async getUser(id) {
|
|
12350
|
-
const response = await this.get(`/user/${id}
|
|
12296
|
+
async getUser(id, query) {
|
|
12297
|
+
const response = await this.get(`/user/${id}` + buildQuery(query), {
|
|
12298
|
+
headers: { Accept: "application/json" }
|
|
12299
|
+
});
|
|
12351
12300
|
if (response.statusCode === 200)
|
|
12352
12301
|
return response.body.data;
|
|
12353
12302
|
throw new Error(`Failed to fetch user: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -12389,9 +12338,8 @@ class UserClient extends Client {
|
|
|
12389
12338
|
/**
|
|
12390
12339
|
* @throws {Error} if the request failed
|
|
12391
12340
|
*/
|
|
12392
|
-
async getAccessKeys(
|
|
12393
|
-
const response = await this.get(`/user-access-key
|
|
12394
|
-
query: { limit, page, query },
|
|
12341
|
+
async getAccessKeys(query) {
|
|
12342
|
+
const response = await this.get(`/user-access-key` + buildQuery(query), {
|
|
12395
12343
|
headers: { Accept: "application/json" }
|
|
12396
12344
|
});
|
|
12397
12345
|
if (response.statusCode === 200)
|
|
@@ -12432,8 +12380,8 @@ class UserClient extends Client {
|
|
|
12432
12380
|
/**
|
|
12433
12381
|
* @throws {Error} if the request failed
|
|
12434
12382
|
*/
|
|
12435
|
-
async getAccessKey(id) {
|
|
12436
|
-
const response = await this.get(`/user-access-key/${id}
|
|
12383
|
+
async getAccessKey(id, query) {
|
|
12384
|
+
const response = await this.get(`/user-access-key/${id}` + buildQuery(query), {
|
|
12437
12385
|
headers: { Accept: "application/json" }
|
|
12438
12386
|
});
|
|
12439
12387
|
if (response.statusCode === 200)
|
|
@@ -12483,9 +12431,8 @@ class UserClient extends Client {
|
|
|
12483
12431
|
/**
|
|
12484
12432
|
* @throws {Error} if the request failed
|
|
12485
12433
|
*/
|
|
12486
|
-
async getConfigs(
|
|
12487
|
-
const response = await this.get(`/user-config
|
|
12488
|
-
query: { limit, page, query },
|
|
12434
|
+
async getConfigs(query) {
|
|
12435
|
+
const response = await this.get(`/user-config` + buildQuery(query), {
|
|
12489
12436
|
headers: { Accept: "application/json" }
|
|
12490
12437
|
});
|
|
12491
12438
|
if (response.statusCode === 200)
|
|
@@ -12524,8 +12471,8 @@ class UserClient extends Client {
|
|
|
12524
12471
|
/**
|
|
12525
12472
|
* @throws {Error} if the request failed
|
|
12526
12473
|
*/
|
|
12527
|
-
async getConfig(id) {
|
|
12528
|
-
const response = await this.get(`/user-config/${id}
|
|
12474
|
+
async getConfig(id, query) {
|
|
12475
|
+
const response = await this.get(`/user-config/${id}` + buildQuery(query), {
|
|
12529
12476
|
headers: { Accept: "application/json" }
|
|
12530
12477
|
});
|
|
12531
12478
|
if (response.statusCode === 200)
|
|
@@ -12569,9 +12516,8 @@ class UserClient extends Client {
|
|
|
12569
12516
|
/**
|
|
12570
12517
|
* @throws {Error} if the request failed
|
|
12571
12518
|
*/
|
|
12572
|
-
async getRecoveries(
|
|
12573
|
-
const response = await this.get(`/user-recovery
|
|
12574
|
-
query: { limit, page, query },
|
|
12519
|
+
async getRecoveries(query) {
|
|
12520
|
+
const response = await this.get(`/user-recovery` + buildQuery(query), {
|
|
12575
12521
|
headers: { Accept: "application/json" }
|
|
12576
12522
|
});
|
|
12577
12523
|
if (response.statusCode === 200)
|
|
@@ -12610,8 +12556,8 @@ class UserClient extends Client {
|
|
|
12610
12556
|
/**
|
|
12611
12557
|
* @throws {Error} if the request failed
|
|
12612
12558
|
*/
|
|
12613
|
-
async getRecovery(id) {
|
|
12614
|
-
const response = await this.get(`/user-recovery/${id}
|
|
12559
|
+
async getRecovery(id, query) {
|
|
12560
|
+
const response = await this.get(`/user-recovery/${id}` + buildQuery(query), {
|
|
12615
12561
|
headers: { Accept: "application/json" }
|
|
12616
12562
|
});
|
|
12617
12563
|
if (response.statusCode === 200)
|
|
@@ -12660,9 +12606,8 @@ class WebhookClient extends Client {
|
|
|
12660
12606
|
/**
|
|
12661
12607
|
* @throws {Error} if the request failed
|
|
12662
12608
|
*/
|
|
12663
|
-
async getWebhooks(
|
|
12664
|
-
const response = await this.get(`/webhook
|
|
12665
|
-
query: { limit, page, query },
|
|
12609
|
+
async getWebhooks(query) {
|
|
12610
|
+
const response = await this.get(`/webhook` + buildQuery(query), {
|
|
12666
12611
|
headers: { Accept: "application/json" }
|
|
12667
12612
|
});
|
|
12668
12613
|
if (response.statusCode === 200)
|
|
@@ -12701,8 +12646,10 @@ class WebhookClient extends Client {
|
|
|
12701
12646
|
/**
|
|
12702
12647
|
* @throws {Error} if the request failed
|
|
12703
12648
|
*/
|
|
12704
|
-
async getWebhook(id) {
|
|
12705
|
-
const response = await this.get(`/webhook/${id}
|
|
12649
|
+
async getWebhook(id, query) {
|
|
12650
|
+
const response = await this.get(`/webhook/${id}` + buildQuery(query), {
|
|
12651
|
+
headers: { Accept: "application/json" }
|
|
12652
|
+
});
|
|
12706
12653
|
if (response.statusCode === 200)
|
|
12707
12654
|
return response.body.data;
|
|
12708
12655
|
throw new Error(`Failed to fetch webhook: ${response.statusCode} ${response.statusMessage}`);
|
|
@@ -12746,9 +12693,8 @@ class WebhookClient extends Client {
|
|
|
12746
12693
|
/**
|
|
12747
12694
|
* @throws {Error} if the request failed
|
|
12748
12695
|
*/
|
|
12749
|
-
async getEventLogs(
|
|
12750
|
-
const response = await this.get(`/webhook-event-log
|
|
12751
|
-
query: { limit, page, query },
|
|
12696
|
+
async getEventLogs(query) {
|
|
12697
|
+
const response = await this.get(`/webhook-event-log` + buildQuery(query), {
|
|
12752
12698
|
headers: { Accept: "application/json" }
|
|
12753
12699
|
});
|
|
12754
12700
|
if (response.statusCode === 200)
|
|
@@ -12787,8 +12733,8 @@ class WebhookClient extends Client {
|
|
|
12787
12733
|
/**
|
|
12788
12734
|
* @throws {Error} if the request failed
|
|
12789
12735
|
*/
|
|
12790
|
-
async getEventLog(id) {
|
|
12791
|
-
const response = await this.get(`/webhook-event-log/${id}
|
|
12736
|
+
async getEventLog(id, query) {
|
|
12737
|
+
const response = await this.get(`/webhook-event-log/${id}` + buildQuery(query), {
|
|
12792
12738
|
headers: { Accept: "application/json" }
|
|
12793
12739
|
});
|
|
12794
12740
|
if (response.statusCode === 200)
|