@gofynd/fdk-client-javascript 1.0.3 → 1.0.4
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/README.md +31 -2
- package/index.d.ts +4 -4
- package/index.js +9 -10
- package/package.json +14 -14
- package/sdk/APIClient.d.ts +11 -0
- package/sdk/APIClient.js +35 -0
- package/sdk/Client.d.ts +6 -0
- package/sdk/Client.js +17 -0
- package/sdk/Config.d.ts +9 -0
- package/sdk/Config.js +17 -0
- package/sdk/application/Cart/CartApplicationClient.js +29 -28
- package/sdk/application/Cart/CartApplicationModel.js +3 -1
- package/sdk/application/Catalog/CatalogApplicationClient.js +43 -42
- package/sdk/application/Catalog/CatalogApplicationModel.js +1 -1
- package/sdk/application/Common/CommonApplicationClient.js +5 -4
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +21 -20
- package/sdk/application/Content/ContentApplicationClient.js +26 -25
- package/sdk/application/Content/ContentApplicationModel.js +1 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +6 -5
- package/sdk/application/Lead/LeadApplicationClient.js +10 -9
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -3
- package/sdk/application/Logistic/LogisticApplicationClient.js +11 -12
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -1
- package/sdk/application/Order/OrderApplicationClient.js +15 -14
- package/sdk/application/Order/OrderApplicationModel.js +9 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +42 -41
- package/sdk/application/PosCart/PosCartApplicationClient.js +30 -29
- package/sdk/application/PosCart/PosCartApplicationModel.js +3 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +11 -10
- package/sdk/application/Share/ShareApplicationClient.js +10 -9
- package/sdk/application/Theme/ThemeApplicationClient.js +7 -6
- package/sdk/application/User/UserApplicationClient.js +38 -37
- package/sdk/common/AxiosHelper.js +17 -6
- package/sdk/constructUrl.d.ts +5 -0
- package/sdk/constructUrl.js +13 -0
- package/sdk/index.d.ts +3 -0
- package/sdk/index.js +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +3 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +1 -0
- package/sdk/platform/Billing/BillingPlatformClient.js +3 -2
- package/sdk/platform/Billing/BillingPlatformValidator.js +1 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +27 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +177 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +17 -1
- package/sdk/platform/Cart/CartPlatformModel.js +7 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +3 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +6 -9
- package/sdk/platform/Catalog/CatalogPlatformModel.js +7 -7
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +2 -1
- package/sdk/platform/Common/CommonPlatformClient.js +7 -18
- package/sdk/platform/Common/CommonPlatformValidator.js +1 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3 -1
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +5 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +1 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +9 -8
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +1 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +3 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +0 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +1 -7
- package/sdk/platform/Content/ContentPlatformModel.js +1 -0
- package/sdk/platform/Discount/DiscountPlatformClient.js +3 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +27 -5
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +28 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +1 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.js +3 -2
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +1 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +3 -1
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Lead/LeadPlatformClient.js +4 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +3 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Order/OrderPlatformClient.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformClient.js +16 -3
- package/sdk/platform/Order/OrderPlatformModel.js +1 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +1 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +14 -14
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +3 -2
- package/sdk/platform/Payment/PaymentPlatformValidator.js +1 -0
- package/sdk/platform/PlatformClient.d.ts +13 -9
- package/sdk/platform/PlatformClient.js +13 -9
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +36 -17
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Share/SharePlatformApplicationClient.js +3 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +1 -1
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +3 -1
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +1 -1
- package/sdk/platform/User/UserPlatformApplicationClient.js +3 -1
- package/sdk/platform/User/UserPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Webhook/WebhookPlatformClient.js +3 -2
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +1 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +2 -0
- package/sdk/public/Inventory/InventoryPublicClient.js +2 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
- package/.github/workflows/on_create_release.yml +0 -23
- package/.github/workflows/on_merge_main.yml +0 -38
- package/.github/workflows/on_pull_request.yml +0 -35
- package/.prettierrc +0 -5
- package/documentation/application/CART.md +0 -8771
- package/documentation/application/CATALOG.md +0 -8690
- package/documentation/application/COMMON.md +0 -325
- package/documentation/application/COMMUNICATION.md +0 -387
- package/documentation/application/CONFIGURATION.md +0 -2212
- package/documentation/application/CONTENT.md +0 -2629
- package/documentation/application/FILESTORAGE.md +0 -442
- package/documentation/application/LEAD.md +0 -1549
- package/documentation/application/LOGISTIC.md +0 -689
- package/documentation/application/ORDER.md +0 -2937
- package/documentation/application/PAYMENT.md +0 -4475
- package/documentation/application/POSCART.md +0 -9375
- package/documentation/application/README.md +0 -21
- package/documentation/application/REWARDS.md +0 -554
- package/documentation/application/SHARE.md +0 -635
- package/documentation/application/THEME.md +0 -5517
- package/documentation/application/USER.md +0 -3798
- package/documentation/platform/ANALYTICS.md +0 -1012
- package/documentation/platform/AUDITTRAIL.md +0 -493
- package/documentation/platform/BILLING.md +0 -1889
- package/documentation/platform/CART.md +0 -4711
- package/documentation/platform/CATALOG.md +0 -20522
- package/documentation/platform/COMMON.md +0 -325
- package/documentation/platform/COMMUNICATION.md +0 -4970
- package/documentation/platform/COMPANYPROFILE.md +0 -1646
- package/documentation/platform/CONFIGURATION.md +0 -6316
- package/documentation/platform/CONTENT.md +0 -8364
- package/documentation/platform/DISCOUNT.md +0 -767
- package/documentation/platform/FILESTORAGE.md +0 -945
- package/documentation/platform/INVENTORY.md +0 -1136
- package/documentation/platform/LEAD.md +0 -4394
- package/documentation/platform/ORDER.md +0 -6525
- package/documentation/platform/PARTNER.md +0 -193
- package/documentation/platform/PAYMENT.md +0 -3138
- package/documentation/platform/README.md +0 -27
- package/documentation/platform/REWARDS.md +0 -919
- package/documentation/platform/SHARE.md +0 -513
- package/documentation/platform/THEME.md +0 -35446
- package/documentation/platform/USER.md +0 -2174
- package/documentation/platform/WEBHOOK.md +0 -485
- package/documentation/public/CONFIGURATION.md +0 -325
- package/documentation/public/INVENTORY.md +0 -508
- package/documentation/public/WEBHOOK.md +0 -246
- package/jest.config.d.ts +0 -4
- package/jest.config.js +0 -6
- package/tests/application/catalog.spec.js +0 -54
- package/tests/common/action-url.spec.js +0 -35
- package/tests/common/schema/action-url.json +0 -178
- package/tests/common/schema/url-action.json +0 -683
- package/tests/common/url-action.spec.js +0 -48
- package/tests/helpers/cookie.helper.js +0 -31
- package/tests/helpers/oauth.helper.js +0 -43
- package/tests/platform/catalog.spec.js +0 -49
- package/tests/public/location.spec.js +0 -39
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
2
3
|
const constructUrl = require("../constructUrl");
|
|
3
4
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
5
5
|
const PaymentValidator = require("./PaymentApplicationValidator");
|
|
6
6
|
const PaymentModel = require("./PaymentApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
|
+
const Joi = require("joi");
|
|
8
9
|
|
|
9
10
|
class Payment {
|
|
10
11
|
constructor(_conf) {
|
|
@@ -127,7 +128,7 @@ class Payment {
|
|
|
127
128
|
|
|
128
129
|
const xHeaders = {};
|
|
129
130
|
|
|
130
|
-
const response = await
|
|
131
|
+
const response = await ApplicationAPIClient.execute(
|
|
131
132
|
this._conf,
|
|
132
133
|
"post",
|
|
133
134
|
constructUrl({
|
|
@@ -193,7 +194,7 @@ class Payment {
|
|
|
193
194
|
|
|
194
195
|
const xHeaders = {};
|
|
195
196
|
|
|
196
|
-
const response = await
|
|
197
|
+
const response = await ApplicationAPIClient.execute(
|
|
197
198
|
this._conf,
|
|
198
199
|
"post",
|
|
199
200
|
constructUrl({
|
|
@@ -259,7 +260,7 @@ class Payment {
|
|
|
259
260
|
|
|
260
261
|
const xHeaders = {};
|
|
261
262
|
|
|
262
|
-
const response = await
|
|
263
|
+
const response = await ApplicationAPIClient.execute(
|
|
263
264
|
this._conf,
|
|
264
265
|
"post",
|
|
265
266
|
constructUrl({
|
|
@@ -322,7 +323,7 @@ class Payment {
|
|
|
322
323
|
|
|
323
324
|
const xHeaders = {};
|
|
324
325
|
|
|
325
|
-
const response = await
|
|
326
|
+
const response = await ApplicationAPIClient.execute(
|
|
326
327
|
this._conf,
|
|
327
328
|
"post",
|
|
328
329
|
constructUrl({
|
|
@@ -388,7 +389,7 @@ class Payment {
|
|
|
388
389
|
|
|
389
390
|
const xHeaders = {};
|
|
390
391
|
|
|
391
|
-
const response = await
|
|
392
|
+
const response = await ApplicationAPIClient.execute(
|
|
392
393
|
this._conf,
|
|
393
394
|
"post",
|
|
394
395
|
constructUrl({
|
|
@@ -457,7 +458,7 @@ class Payment {
|
|
|
457
458
|
|
|
458
459
|
const xHeaders = {};
|
|
459
460
|
|
|
460
|
-
const response = await
|
|
461
|
+
const response = await ApplicationAPIClient.execute(
|
|
461
462
|
this._conf,
|
|
462
463
|
"post",
|
|
463
464
|
constructUrl({
|
|
@@ -522,7 +523,7 @@ class Payment {
|
|
|
522
523
|
|
|
523
524
|
const xHeaders = {};
|
|
524
525
|
|
|
525
|
-
const response = await
|
|
526
|
+
const response = await ApplicationAPIClient.execute(
|
|
526
527
|
this._conf,
|
|
527
528
|
"get",
|
|
528
529
|
constructUrl({
|
|
@@ -588,7 +589,7 @@ class Payment {
|
|
|
588
589
|
|
|
589
590
|
const xHeaders = {};
|
|
590
591
|
|
|
591
|
-
const response = await
|
|
592
|
+
const response = await ApplicationAPIClient.execute(
|
|
592
593
|
this._conf,
|
|
593
594
|
"post",
|
|
594
595
|
constructUrl({
|
|
@@ -652,7 +653,7 @@ class Payment {
|
|
|
652
653
|
|
|
653
654
|
const xHeaders = {};
|
|
654
655
|
|
|
655
|
-
const response = await
|
|
656
|
+
const response = await ApplicationAPIClient.execute(
|
|
656
657
|
this._conf,
|
|
657
658
|
"post",
|
|
658
659
|
constructUrl({
|
|
@@ -718,7 +719,7 @@ class Payment {
|
|
|
718
719
|
|
|
719
720
|
const xHeaders = {};
|
|
720
721
|
|
|
721
|
-
const response = await
|
|
722
|
+
const response = await ApplicationAPIClient.execute(
|
|
722
723
|
this._conf,
|
|
723
724
|
"get",
|
|
724
725
|
constructUrl({
|
|
@@ -781,7 +782,7 @@ class Payment {
|
|
|
781
782
|
|
|
782
783
|
const xHeaders = {};
|
|
783
784
|
|
|
784
|
-
const response = await
|
|
785
|
+
const response = await ApplicationAPIClient.execute(
|
|
785
786
|
this._conf,
|
|
786
787
|
"post",
|
|
787
788
|
constructUrl({
|
|
@@ -844,7 +845,7 @@ class Payment {
|
|
|
844
845
|
|
|
845
846
|
const xHeaders = {};
|
|
846
847
|
|
|
847
|
-
const response = await
|
|
848
|
+
const response = await ApplicationAPIClient.execute(
|
|
848
849
|
this._conf,
|
|
849
850
|
"post",
|
|
850
851
|
constructUrl({
|
|
@@ -912,7 +913,7 @@ class Payment {
|
|
|
912
913
|
|
|
913
914
|
const xHeaders = {};
|
|
914
915
|
|
|
915
|
-
const response = await
|
|
916
|
+
const response = await ApplicationAPIClient.execute(
|
|
916
917
|
this._conf,
|
|
917
918
|
"put",
|
|
918
919
|
constructUrl({
|
|
@@ -979,7 +980,7 @@ class Payment {
|
|
|
979
980
|
|
|
980
981
|
const xHeaders = {};
|
|
981
982
|
|
|
982
|
-
const response = await
|
|
983
|
+
const response = await ApplicationAPIClient.execute(
|
|
983
984
|
this._conf,
|
|
984
985
|
"get",
|
|
985
986
|
constructUrl({
|
|
@@ -1044,7 +1045,7 @@ class Payment {
|
|
|
1044
1045
|
|
|
1045
1046
|
const xHeaders = {};
|
|
1046
1047
|
|
|
1047
|
-
const response = await
|
|
1048
|
+
const response = await ApplicationAPIClient.execute(
|
|
1048
1049
|
this._conf,
|
|
1049
1050
|
"get",
|
|
1050
1051
|
constructUrl({
|
|
@@ -1109,7 +1110,7 @@ class Payment {
|
|
|
1109
1110
|
|
|
1110
1111
|
const xHeaders = {};
|
|
1111
1112
|
|
|
1112
|
-
const response = await
|
|
1113
|
+
const response = await ApplicationAPIClient.execute(
|
|
1113
1114
|
this._conf,
|
|
1114
1115
|
"get",
|
|
1115
1116
|
constructUrl({
|
|
@@ -1179,7 +1180,7 @@ class Payment {
|
|
|
1179
1180
|
const xHeaders = {};
|
|
1180
1181
|
xHeaders["x-api-token"] = xApiToken;
|
|
1181
1182
|
|
|
1182
|
-
const response = await
|
|
1183
|
+
const response = await ApplicationAPIClient.execute(
|
|
1183
1184
|
this._conf,
|
|
1184
1185
|
"get",
|
|
1185
1186
|
constructUrl({
|
|
@@ -1243,7 +1244,7 @@ class Payment {
|
|
|
1243
1244
|
|
|
1244
1245
|
const xHeaders = {};
|
|
1245
1246
|
|
|
1246
|
-
const response = await
|
|
1247
|
+
const response = await ApplicationAPIClient.execute(
|
|
1247
1248
|
this._conf,
|
|
1248
1249
|
"get",
|
|
1249
1250
|
constructUrl({
|
|
@@ -1311,7 +1312,7 @@ class Payment {
|
|
|
1311
1312
|
|
|
1312
1313
|
const xHeaders = {};
|
|
1313
1314
|
|
|
1314
|
-
const response = await
|
|
1315
|
+
const response = await ApplicationAPIClient.execute(
|
|
1315
1316
|
this._conf,
|
|
1316
1317
|
"get",
|
|
1317
1318
|
constructUrl({
|
|
@@ -1376,7 +1377,7 @@ class Payment {
|
|
|
1376
1377
|
|
|
1377
1378
|
const xHeaders = {};
|
|
1378
1379
|
|
|
1379
|
-
const response = await
|
|
1380
|
+
const response = await ApplicationAPIClient.execute(
|
|
1380
1381
|
this._conf,
|
|
1381
1382
|
"get",
|
|
1382
1383
|
constructUrl({
|
|
@@ -1482,7 +1483,7 @@ class Payment {
|
|
|
1482
1483
|
|
|
1483
1484
|
const xHeaders = {};
|
|
1484
1485
|
|
|
1485
|
-
const response = await
|
|
1486
|
+
const response = await ApplicationAPIClient.execute(
|
|
1486
1487
|
this._conf,
|
|
1487
1488
|
"get",
|
|
1488
1489
|
constructUrl({
|
|
@@ -1551,7 +1552,7 @@ class Payment {
|
|
|
1551
1552
|
|
|
1552
1553
|
const xHeaders = {};
|
|
1553
1554
|
|
|
1554
|
-
const response = await
|
|
1555
|
+
const response = await ApplicationAPIClient.execute(
|
|
1555
1556
|
this._conf,
|
|
1556
1557
|
"get",
|
|
1557
1558
|
constructUrl({
|
|
@@ -1665,7 +1666,7 @@ class Payment {
|
|
|
1665
1666
|
|
|
1666
1667
|
const xHeaders = {};
|
|
1667
1668
|
|
|
1668
|
-
const response = await
|
|
1669
|
+
const response = await ApplicationAPIClient.execute(
|
|
1669
1670
|
this._conf,
|
|
1670
1671
|
"get",
|
|
1671
1672
|
constructUrl({
|
|
@@ -1729,7 +1730,7 @@ class Payment {
|
|
|
1729
1730
|
|
|
1730
1731
|
const xHeaders = {};
|
|
1731
1732
|
|
|
1732
|
-
const response = await
|
|
1733
|
+
const response = await ApplicationAPIClient.execute(
|
|
1733
1734
|
this._conf,
|
|
1734
1735
|
"get",
|
|
1735
1736
|
constructUrl({
|
|
@@ -1797,7 +1798,7 @@ class Payment {
|
|
|
1797
1798
|
|
|
1798
1799
|
const xHeaders = {};
|
|
1799
1800
|
|
|
1800
|
-
const response = await
|
|
1801
|
+
const response = await ApplicationAPIClient.execute(
|
|
1801
1802
|
this._conf,
|
|
1802
1803
|
"get",
|
|
1803
1804
|
constructUrl({
|
|
@@ -1860,7 +1861,7 @@ class Payment {
|
|
|
1860
1861
|
|
|
1861
1862
|
const xHeaders = {};
|
|
1862
1863
|
|
|
1863
|
-
const response = await
|
|
1864
|
+
const response = await ApplicationAPIClient.execute(
|
|
1864
1865
|
this._conf,
|
|
1865
1866
|
"post",
|
|
1866
1867
|
constructUrl({
|
|
@@ -1926,7 +1927,7 @@ class Payment {
|
|
|
1926
1927
|
|
|
1927
1928
|
const xHeaders = {};
|
|
1928
1929
|
|
|
1929
|
-
const response = await
|
|
1930
|
+
const response = await ApplicationAPIClient.execute(
|
|
1930
1931
|
this._conf,
|
|
1931
1932
|
"post",
|
|
1932
1933
|
constructUrl({
|
|
@@ -1991,7 +1992,7 @@ class Payment {
|
|
|
1991
1992
|
|
|
1992
1993
|
const xHeaders = {};
|
|
1993
1994
|
|
|
1994
|
-
const response = await
|
|
1995
|
+
const response = await ApplicationAPIClient.execute(
|
|
1995
1996
|
this._conf,
|
|
1996
1997
|
"get",
|
|
1997
1998
|
constructUrl({
|
|
@@ -2061,7 +2062,7 @@ class Payment {
|
|
|
2061
2062
|
|
|
2062
2063
|
const xHeaders = {};
|
|
2063
2064
|
|
|
2064
|
-
const response = await
|
|
2065
|
+
const response = await ApplicationAPIClient.execute(
|
|
2065
2066
|
this._conf,
|
|
2066
2067
|
"get",
|
|
2067
2068
|
constructUrl({
|
|
@@ -2124,7 +2125,7 @@ class Payment {
|
|
|
2124
2125
|
|
|
2125
2126
|
const xHeaders = {};
|
|
2126
2127
|
|
|
2127
|
-
const response = await
|
|
2128
|
+
const response = await ApplicationAPIClient.execute(
|
|
2128
2129
|
this._conf,
|
|
2129
2130
|
"post",
|
|
2130
2131
|
constructUrl({
|
|
@@ -2189,7 +2190,7 @@ class Payment {
|
|
|
2189
2190
|
|
|
2190
2191
|
const xHeaders = {};
|
|
2191
2192
|
|
|
2192
|
-
const response = await
|
|
2193
|
+
const response = await ApplicationAPIClient.execute(
|
|
2193
2194
|
this._conf,
|
|
2194
2195
|
"post",
|
|
2195
2196
|
constructUrl({
|
|
@@ -2252,7 +2253,7 @@ class Payment {
|
|
|
2252
2253
|
|
|
2253
2254
|
const xHeaders = {};
|
|
2254
2255
|
|
|
2255
|
-
const response = await
|
|
2256
|
+
const response = await ApplicationAPIClient.execute(
|
|
2256
2257
|
this._conf,
|
|
2257
2258
|
"post",
|
|
2258
2259
|
constructUrl({
|
|
@@ -2317,7 +2318,7 @@ class Payment {
|
|
|
2317
2318
|
|
|
2318
2319
|
const xHeaders = {};
|
|
2319
2320
|
|
|
2320
|
-
const response = await
|
|
2321
|
+
const response = await ApplicationAPIClient.execute(
|
|
2321
2322
|
this._conf,
|
|
2322
2323
|
"post",
|
|
2323
2324
|
constructUrl({
|
|
@@ -2380,7 +2381,7 @@ class Payment {
|
|
|
2380
2381
|
|
|
2381
2382
|
const xHeaders = {};
|
|
2382
2383
|
|
|
2383
|
-
const response = await
|
|
2384
|
+
const response = await ApplicationAPIClient.execute(
|
|
2384
2385
|
this._conf,
|
|
2385
2386
|
"post",
|
|
2386
2387
|
constructUrl({
|
|
@@ -2445,7 +2446,7 @@ class Payment {
|
|
|
2445
2446
|
|
|
2446
2447
|
const xHeaders = {};
|
|
2447
2448
|
|
|
2448
|
-
const response = await
|
|
2449
|
+
const response = await ApplicationAPIClient.execute(
|
|
2449
2450
|
this._conf,
|
|
2450
2451
|
"post",
|
|
2451
2452
|
constructUrl({
|
|
@@ -2510,7 +2511,7 @@ class Payment {
|
|
|
2510
2511
|
|
|
2511
2512
|
const xHeaders = {};
|
|
2512
2513
|
|
|
2513
|
-
const response = await
|
|
2514
|
+
const response = await ApplicationAPIClient.execute(
|
|
2514
2515
|
this._conf,
|
|
2515
2516
|
"post",
|
|
2516
2517
|
constructUrl({
|
|
@@ -2575,7 +2576,7 @@ class Payment {
|
|
|
2575
2576
|
|
|
2576
2577
|
const xHeaders = {};
|
|
2577
2578
|
|
|
2578
|
-
const response = await
|
|
2579
|
+
const response = await ApplicationAPIClient.execute(
|
|
2579
2580
|
this._conf,
|
|
2580
2581
|
"get",
|
|
2581
2582
|
constructUrl({
|
|
@@ -2643,7 +2644,7 @@ class Payment {
|
|
|
2643
2644
|
|
|
2644
2645
|
const xHeaders = {};
|
|
2645
2646
|
|
|
2646
|
-
const response = await
|
|
2647
|
+
const response = await ApplicationAPIClient.execute(
|
|
2647
2648
|
this._conf,
|
|
2648
2649
|
"post",
|
|
2649
2650
|
constructUrl({
|
|
@@ -2712,7 +2713,7 @@ class Payment {
|
|
|
2712
2713
|
|
|
2713
2714
|
const xHeaders = {};
|
|
2714
2715
|
|
|
2715
|
-
const response = await
|
|
2716
|
+
const response = await ApplicationAPIClient.execute(
|
|
2716
2717
|
this._conf,
|
|
2717
2718
|
"post",
|
|
2718
2719
|
constructUrl({
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
2
3
|
const constructUrl = require("../constructUrl");
|
|
3
4
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
5
5
|
const PosCartValidator = require("./PosCartApplicationValidator");
|
|
6
6
|
const PosCartModel = require("./PosCartApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
|
+
const Joi = require("joi");
|
|
8
9
|
|
|
9
10
|
class PosCart {
|
|
10
11
|
constructor(_conf) {
|
|
@@ -91,7 +92,7 @@ class PosCart {
|
|
|
91
92
|
|
|
92
93
|
const xHeaders = {};
|
|
93
94
|
|
|
94
|
-
const response = await
|
|
95
|
+
const response = await ApplicationAPIClient.execute(
|
|
95
96
|
this._conf,
|
|
96
97
|
"post",
|
|
97
98
|
constructUrl({
|
|
@@ -162,7 +163,7 @@ class PosCart {
|
|
|
162
163
|
|
|
163
164
|
const xHeaders = {};
|
|
164
165
|
|
|
165
|
-
const response = await
|
|
166
|
+
const response = await ApplicationAPIClient.execute(
|
|
166
167
|
this._conf,
|
|
167
168
|
"post",
|
|
168
169
|
constructUrl({
|
|
@@ -235,7 +236,7 @@ class PosCart {
|
|
|
235
236
|
|
|
236
237
|
const xHeaders = {};
|
|
237
238
|
|
|
238
|
-
const response = await
|
|
239
|
+
const response = await ApplicationAPIClient.execute(
|
|
239
240
|
this._conf,
|
|
240
241
|
"post",
|
|
241
242
|
constructUrl({
|
|
@@ -306,7 +307,7 @@ class PosCart {
|
|
|
306
307
|
|
|
307
308
|
const xHeaders = {};
|
|
308
309
|
|
|
309
|
-
const response = await
|
|
310
|
+
const response = await ApplicationAPIClient.execute(
|
|
310
311
|
this._conf,
|
|
311
312
|
"post",
|
|
312
313
|
constructUrl({
|
|
@@ -371,7 +372,7 @@ class PosCart {
|
|
|
371
372
|
|
|
372
373
|
const xHeaders = {};
|
|
373
374
|
|
|
374
|
-
const response = await
|
|
375
|
+
const response = await ApplicationAPIClient.execute(
|
|
375
376
|
this._conf,
|
|
376
377
|
"post",
|
|
377
378
|
constructUrl({
|
|
@@ -454,7 +455,7 @@ class PosCart {
|
|
|
454
455
|
|
|
455
456
|
const xHeaders = {};
|
|
456
457
|
|
|
457
|
-
const response = await
|
|
458
|
+
const response = await ApplicationAPIClient.execute(
|
|
458
459
|
this._conf,
|
|
459
460
|
"get",
|
|
460
461
|
constructUrl({
|
|
@@ -533,7 +534,7 @@ class PosCart {
|
|
|
533
534
|
|
|
534
535
|
const xHeaders = {};
|
|
535
536
|
|
|
536
|
-
const response = await
|
|
537
|
+
const response = await ApplicationAPIClient.execute(
|
|
537
538
|
this._conf,
|
|
538
539
|
"get",
|
|
539
540
|
constructUrl({
|
|
@@ -601,7 +602,7 @@ class PosCart {
|
|
|
601
602
|
|
|
602
603
|
const xHeaders = {};
|
|
603
604
|
|
|
604
|
-
const response = await
|
|
605
|
+
const response = await ApplicationAPIClient.execute(
|
|
605
606
|
this._conf,
|
|
606
607
|
"get",
|
|
607
608
|
constructUrl({
|
|
@@ -675,7 +676,7 @@ class PosCart {
|
|
|
675
676
|
|
|
676
677
|
const xHeaders = {};
|
|
677
678
|
|
|
678
|
-
const response = await
|
|
679
|
+
const response = await ApplicationAPIClient.execute(
|
|
679
680
|
this._conf,
|
|
680
681
|
"get",
|
|
681
682
|
constructUrl({
|
|
@@ -749,7 +750,7 @@ class PosCart {
|
|
|
749
750
|
|
|
750
751
|
const xHeaders = {};
|
|
751
752
|
|
|
752
|
-
const response = await
|
|
753
|
+
const response = await ApplicationAPIClient.execute(
|
|
753
754
|
this._conf,
|
|
754
755
|
"get",
|
|
755
756
|
constructUrl({
|
|
@@ -813,7 +814,7 @@ class PosCart {
|
|
|
813
814
|
|
|
814
815
|
const xHeaders = {};
|
|
815
816
|
|
|
816
|
-
const response = await
|
|
817
|
+
const response = await ApplicationAPIClient.execute(
|
|
817
818
|
this._conf,
|
|
818
819
|
"head",
|
|
819
820
|
constructUrl({
|
|
@@ -873,7 +874,7 @@ class PosCart {
|
|
|
873
874
|
|
|
874
875
|
const xHeaders = {};
|
|
875
876
|
|
|
876
|
-
const response = await
|
|
877
|
+
const response = await ApplicationAPIClient.execute(
|
|
877
878
|
this._conf,
|
|
878
879
|
"post",
|
|
879
880
|
constructUrl({
|
|
@@ -936,7 +937,7 @@ class PosCart {
|
|
|
936
937
|
|
|
937
938
|
const xHeaders = {};
|
|
938
939
|
|
|
939
|
-
const response = await
|
|
940
|
+
const response = await ApplicationAPIClient.execute(
|
|
940
941
|
this._conf,
|
|
941
942
|
"get",
|
|
942
943
|
constructUrl({
|
|
@@ -1002,7 +1003,7 @@ class PosCart {
|
|
|
1002
1003
|
|
|
1003
1004
|
const xHeaders = {};
|
|
1004
1005
|
|
|
1005
|
-
const response = await
|
|
1006
|
+
const response = await ApplicationAPIClient.execute(
|
|
1006
1007
|
this._conf,
|
|
1007
1008
|
"get",
|
|
1008
1009
|
constructUrl({
|
|
@@ -1068,7 +1069,7 @@ class PosCart {
|
|
|
1068
1069
|
|
|
1069
1070
|
const xHeaders = {};
|
|
1070
1071
|
|
|
1071
|
-
const response = await
|
|
1072
|
+
const response = await ApplicationAPIClient.execute(
|
|
1072
1073
|
this._conf,
|
|
1073
1074
|
"get",
|
|
1074
1075
|
constructUrl({
|
|
@@ -1172,7 +1173,7 @@ class PosCart {
|
|
|
1172
1173
|
|
|
1173
1174
|
const xHeaders = {};
|
|
1174
1175
|
|
|
1175
|
-
const response = await
|
|
1176
|
+
const response = await ApplicationAPIClient.execute(
|
|
1176
1177
|
this._conf,
|
|
1177
1178
|
"get",
|
|
1178
1179
|
constructUrl({
|
|
@@ -1238,7 +1239,7 @@ class PosCart {
|
|
|
1238
1239
|
|
|
1239
1240
|
const xHeaders = {};
|
|
1240
1241
|
|
|
1241
|
-
const response = await
|
|
1242
|
+
const response = await ApplicationAPIClient.execute(
|
|
1242
1243
|
this._conf,
|
|
1243
1244
|
"get",
|
|
1244
1245
|
constructUrl({
|
|
@@ -1301,7 +1302,7 @@ class PosCart {
|
|
|
1301
1302
|
|
|
1302
1303
|
const xHeaders = {};
|
|
1303
1304
|
|
|
1304
|
-
const response = await
|
|
1305
|
+
const response = await ApplicationAPIClient.execute(
|
|
1305
1306
|
this._conf,
|
|
1306
1307
|
"delete",
|
|
1307
1308
|
constructUrl({
|
|
@@ -1367,7 +1368,7 @@ class PosCart {
|
|
|
1367
1368
|
|
|
1368
1369
|
const xHeaders = {};
|
|
1369
1370
|
|
|
1370
|
-
const response = await
|
|
1371
|
+
const response = await ApplicationAPIClient.execute(
|
|
1371
1372
|
this._conf,
|
|
1372
1373
|
"delete",
|
|
1373
1374
|
constructUrl({
|
|
@@ -1438,7 +1439,7 @@ class PosCart {
|
|
|
1438
1439
|
|
|
1439
1440
|
const xHeaders = {};
|
|
1440
1441
|
|
|
1441
|
-
const response = await
|
|
1442
|
+
const response = await ApplicationAPIClient.execute(
|
|
1442
1443
|
this._conf,
|
|
1443
1444
|
"post",
|
|
1444
1445
|
constructUrl({
|
|
@@ -1505,7 +1506,7 @@ class PosCart {
|
|
|
1505
1506
|
|
|
1506
1507
|
const xHeaders = {};
|
|
1507
1508
|
|
|
1508
|
-
const response = await
|
|
1509
|
+
const response = await ApplicationAPIClient.execute(
|
|
1509
1510
|
this._conf,
|
|
1510
1511
|
"put",
|
|
1511
1512
|
constructUrl({
|
|
@@ -1569,7 +1570,7 @@ class PosCart {
|
|
|
1569
1570
|
|
|
1570
1571
|
const xHeaders = {};
|
|
1571
1572
|
|
|
1572
|
-
const response = await
|
|
1573
|
+
const response = await ApplicationAPIClient.execute(
|
|
1573
1574
|
this._conf,
|
|
1574
1575
|
"put",
|
|
1575
1576
|
constructUrl({
|
|
@@ -1642,7 +1643,7 @@ class PosCart {
|
|
|
1642
1643
|
|
|
1643
1644
|
const xHeaders = {};
|
|
1644
1645
|
|
|
1645
|
-
const response = await
|
|
1646
|
+
const response = await ApplicationAPIClient.execute(
|
|
1646
1647
|
this._conf,
|
|
1647
1648
|
"put",
|
|
1648
1649
|
constructUrl({
|
|
@@ -1709,7 +1710,7 @@ class PosCart {
|
|
|
1709
1710
|
|
|
1710
1711
|
const xHeaders = {};
|
|
1711
1712
|
|
|
1712
|
-
const response = await
|
|
1713
|
+
const response = await ApplicationAPIClient.execute(
|
|
1713
1714
|
this._conf,
|
|
1714
1715
|
"put",
|
|
1715
1716
|
constructUrl({
|
|
@@ -1776,7 +1777,7 @@ class PosCart {
|
|
|
1776
1777
|
|
|
1777
1778
|
const xHeaders = {};
|
|
1778
1779
|
|
|
1779
|
-
const response = await
|
|
1780
|
+
const response = await ApplicationAPIClient.execute(
|
|
1780
1781
|
this._conf,
|
|
1781
1782
|
"post",
|
|
1782
1783
|
constructUrl({
|
|
@@ -1853,7 +1854,7 @@ class PosCart {
|
|
|
1853
1854
|
|
|
1854
1855
|
const xHeaders = {};
|
|
1855
1856
|
|
|
1856
|
-
const response = await
|
|
1857
|
+
const response = await ApplicationAPIClient.execute(
|
|
1857
1858
|
this._conf,
|
|
1858
1859
|
"put",
|
|
1859
1860
|
constructUrl({
|
|
@@ -1955,7 +1956,7 @@ class PosCart {
|
|
|
1955
1956
|
|
|
1956
1957
|
const xHeaders = {};
|
|
1957
1958
|
|
|
1958
|
-
const response = await
|
|
1959
|
+
const response = await ApplicationAPIClient.execute(
|
|
1959
1960
|
this._conf,
|
|
1960
1961
|
"get",
|
|
1961
1962
|
constructUrl({
|
|
@@ -28,7 +28,9 @@ class PosCartModel {
|
|
|
28
28
|
extra_meta: Joi.any(),
|
|
29
29
|
item_id: Joi.number(),
|
|
30
30
|
item_size: Joi.string().allow(""),
|
|
31
|
-
parent_item_identifiers: Joi.
|
|
31
|
+
parent_item_identifiers: Joi.array().items(
|
|
32
|
+
Joi.object().pattern(/\S/, Joi.string().allow(""))
|
|
33
|
+
),
|
|
32
34
|
pos: Joi.boolean(),
|
|
33
35
|
product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
|
|
34
36
|
quantity: Joi.number(),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
2
3
|
const constructUrl = require("../constructUrl");
|
|
3
4
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
5
5
|
const RewardsValidator = require("./RewardsApplicationValidator");
|
|
6
6
|
const RewardsModel = require("./RewardsApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
|
+
const Joi = require("joi");
|
|
8
9
|
|
|
9
10
|
class Rewards {
|
|
10
11
|
constructor(_conf) {
|
|
@@ -72,7 +73,7 @@ class Rewards {
|
|
|
72
73
|
|
|
73
74
|
const xHeaders = {};
|
|
74
75
|
|
|
75
|
-
const response = await
|
|
76
|
+
const response = await ApplicationAPIClient.execute(
|
|
76
77
|
this._conf,
|
|
77
78
|
"post",
|
|
78
79
|
constructUrl({
|
|
@@ -135,7 +136,7 @@ class Rewards {
|
|
|
135
136
|
|
|
136
137
|
const xHeaders = {};
|
|
137
138
|
|
|
138
|
-
const response = await
|
|
139
|
+
const response = await ApplicationAPIClient.execute(
|
|
139
140
|
this._conf,
|
|
140
141
|
"get",
|
|
141
142
|
constructUrl({
|
|
@@ -196,7 +197,7 @@ class Rewards {
|
|
|
196
197
|
|
|
197
198
|
const xHeaders = {};
|
|
198
199
|
|
|
199
|
-
const response = await
|
|
200
|
+
const response = await ApplicationAPIClient.execute(
|
|
200
201
|
this._conf,
|
|
201
202
|
"post",
|
|
202
203
|
constructUrl({
|
|
@@ -258,7 +259,7 @@ class Rewards {
|
|
|
258
259
|
|
|
259
260
|
const xHeaders = {};
|
|
260
261
|
|
|
261
|
-
const response = await
|
|
262
|
+
const response = await ApplicationAPIClient.execute(
|
|
262
263
|
this._conf,
|
|
263
264
|
"get",
|
|
264
265
|
constructUrl({
|
|
@@ -327,7 +328,7 @@ class Rewards {
|
|
|
327
328
|
|
|
328
329
|
const xHeaders = {};
|
|
329
330
|
|
|
330
|
-
const response = await
|
|
331
|
+
const response = await ApplicationAPIClient.execute(
|
|
331
332
|
this._conf,
|
|
332
333
|
"get",
|
|
333
334
|
constructUrl({
|
|
@@ -379,7 +380,7 @@ class Rewards {
|
|
|
379
380
|
});
|
|
380
381
|
return data;
|
|
381
382
|
};
|
|
382
|
-
paginator.setCallback(callback);
|
|
383
|
+
paginator.setCallback(callback.bind(this));
|
|
383
384
|
return paginator;
|
|
384
385
|
}
|
|
385
386
|
|
|
@@ -417,7 +418,7 @@ class Rewards {
|
|
|
417
418
|
|
|
418
419
|
const xHeaders = {};
|
|
419
420
|
|
|
420
|
-
const response = await
|
|
421
|
+
const response = await ApplicationAPIClient.execute(
|
|
421
422
|
this._conf,
|
|
422
423
|
"get",
|
|
423
424
|
constructUrl({
|
|
@@ -480,7 +481,7 @@ class Rewards {
|
|
|
480
481
|
|
|
481
482
|
const xHeaders = {};
|
|
482
483
|
|
|
483
|
-
const response = await
|
|
484
|
+
const response = await ApplicationAPIClient.execute(
|
|
484
485
|
this._conf,
|
|
485
486
|
"post",
|
|
486
487
|
constructUrl({
|