@gofynd/fdk-client-javascript 1.3.6-beta.1 → 1.3.6
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 +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationConfig.d.ts +11 -3
- package/sdk/application/ApplicationConfig.js +21 -3
- package/sdk/application/Cart/CartApplicationClient.js +228 -113
- package/sdk/application/Catalog/CatalogApplicationClient.js +244 -121
- package/sdk/application/Common/CommonApplicationClient.js +20 -9
- package/sdk/application/Communication/CommunicationApplicationClient.js +28 -13
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +132 -65
- package/sdk/application/Content/ContentApplicationClient.js +156 -77
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +28 -13
- package/sdk/application/Lead/LeadApplicationClient.js +60 -29
- package/sdk/application/Logistic/LogisticApplicationClient.js +44 -21
- package/sdk/application/Order/OrderApplicationClient.js +100 -49
- package/sdk/application/Payment/PaymentApplicationClient.js +340 -169
- package/sdk/application/PosCart/PosCartApplicationClient.js +220 -109
- package/sdk/application/Rewards/RewardsApplicationClient.js +60 -29
- package/sdk/application/Share/ShareApplicationClient.js +60 -29
- package/sdk/application/Theme/ThemeApplicationClient.js +36 -17
- package/sdk/application/User/UserApplicationClient.js +324 -161
- package/sdk/common/AxiosHelper.js +3 -3
- package/sdk/common/FDKError.d.ts +4 -0
- package/sdk/common/FDKError.js +9 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +16 -40
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +160 -38
- package/sdk/partner/PartnerConfig.d.ts +10 -0
- package/sdk/partner/PartnerConfig.js +10 -1
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +96 -199
- package/sdk/partner/Theme/ThemePartnerClient.js +935 -170
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +36 -17
- package/sdk/platform/Billing/BillingPlatformClient.js +140 -69
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +456 -228
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +512 -256
- package/sdk/platform/Catalog/CatalogPlatformClient.js +620 -309
- package/sdk/platform/Common/CommonPlatformClient.js +20 -9
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +472 -236
- package/sdk/platform/Communication/CommunicationPlatformClient.js +12 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +14 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.js +16 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +116 -57
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +256 -128
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +148 -73
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +552 -276
- package/sdk/platform/Discount/DiscountPlatformClient.js +92 -45
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +88 -44
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +52 -25
- package/sdk/platform/Finance/FinancePlatformClient.js +196 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +100 -49
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +104 -52
- package/sdk/platform/Lead/LeadPlatformClient.js +92 -45
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +26 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +239 -5
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +57 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +55 -0
- package/sdk/platform/Order/OrderPlatformClient.js +356 -177
- package/sdk/platform/Order/OrderPlatformModel.d.ts +44 -5
- package/sdk/platform/Order/OrderPlatformModel.js +52 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +16 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +336 -168
- package/sdk/platform/Payment/PaymentPlatformClient.js +84 -41
- package/sdk/platform/PlatformConfig.d.ts +10 -0
- package/sdk/platform/PlatformConfig.js +10 -1
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +96 -48
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +112 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +148 -73
- package/sdk/platform/Share/SharePlatformApplicationClient.js +40 -20
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +224 -112
- package/sdk/platform/Theme/ThemePlatformClient.js +28 -13
- package/sdk/platform/User/UserPlatformApplicationClient.js +144 -72
- package/sdk/platform/Webhook/WebhookPlatformClient.js +132 -65
- package/sdk/public/Configuration/ConfigurationPublicClient.js +20 -9
- package/sdk/public/Inventory/InventoryPublicClient.js +52 -25
- package/sdk/public/Partner/PartnerPublicClient.js +12 -5
- package/sdk/public/PublicConfig.d.ts +11 -1
- package/sdk/public/PublicConfig.js +10 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +20 -9
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
FDKClientValidationError,
|
|
4
|
+
FDKResponseValidationError,
|
|
5
|
+
} = require("../../common/FDKError");
|
|
3
6
|
const constructUrl = require("../constructUrl");
|
|
4
7
|
const Paginator = require("../../common/Paginator");
|
|
5
8
|
const PosCartApplicationValidator = require("./PosCartApplicationValidator");
|
|
@@ -124,10 +127,14 @@ class PosCart {
|
|
|
124
127
|
});
|
|
125
128
|
|
|
126
129
|
if (res_error) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
131
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
132
|
+
} else {
|
|
133
|
+
Logger({
|
|
134
|
+
level: "WARN",
|
|
135
|
+
message: `Response Validation Warnings for application > PosCart > addAddress \n ${res_error}`,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
131
138
|
}
|
|
132
139
|
|
|
133
140
|
return response;
|
|
@@ -204,10 +211,14 @@ class PosCart {
|
|
|
204
211
|
});
|
|
205
212
|
|
|
206
213
|
if (res_error) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
214
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
215
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
216
|
+
} else {
|
|
217
|
+
Logger({
|
|
218
|
+
level: "WARN",
|
|
219
|
+
message: `Response Validation Warnings for application > PosCart > addItems \n ${res_error}`,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
211
222
|
}
|
|
212
223
|
|
|
213
224
|
return response;
|
|
@@ -283,10 +294,14 @@ class PosCart {
|
|
|
283
294
|
});
|
|
284
295
|
|
|
285
296
|
if (res_error) {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
297
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
298
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
299
|
+
} else {
|
|
300
|
+
Logger({
|
|
301
|
+
level: "WARN",
|
|
302
|
+
message: `Response Validation Warnings for application > PosCart > applyCoupon \n ${res_error}`,
|
|
303
|
+
});
|
|
304
|
+
}
|
|
290
305
|
}
|
|
291
306
|
|
|
292
307
|
return response;
|
|
@@ -361,10 +376,14 @@ class PosCart {
|
|
|
361
376
|
});
|
|
362
377
|
|
|
363
378
|
if (res_error) {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
379
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
380
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
381
|
+
} else {
|
|
382
|
+
Logger({
|
|
383
|
+
level: "WARN",
|
|
384
|
+
message: `Response Validation Warnings for application > PosCart > applyRewardPoints \n ${res_error}`,
|
|
385
|
+
});
|
|
386
|
+
}
|
|
368
387
|
}
|
|
369
388
|
|
|
370
389
|
return response;
|
|
@@ -436,10 +455,14 @@ class PosCart {
|
|
|
436
455
|
});
|
|
437
456
|
|
|
438
457
|
if (res_error) {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
458
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
459
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
460
|
+
} else {
|
|
461
|
+
Logger({
|
|
462
|
+
level: "WARN",
|
|
463
|
+
message: `Response Validation Warnings for application > PosCart > checkoutCart \n ${res_error}`,
|
|
464
|
+
});
|
|
465
|
+
}
|
|
443
466
|
}
|
|
444
467
|
|
|
445
468
|
return response;
|
|
@@ -525,10 +548,14 @@ class PosCart {
|
|
|
525
548
|
});
|
|
526
549
|
|
|
527
550
|
if (res_error) {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
551
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
552
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
553
|
+
} else {
|
|
554
|
+
Logger({
|
|
555
|
+
level: "WARN",
|
|
556
|
+
message: `Response Validation Warnings for application > PosCart > getAddressById \n ${res_error}`,
|
|
557
|
+
});
|
|
558
|
+
}
|
|
532
559
|
}
|
|
533
560
|
|
|
534
561
|
return response;
|
|
@@ -613,10 +640,14 @@ class PosCart {
|
|
|
613
640
|
});
|
|
614
641
|
|
|
615
642
|
if (res_error) {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
643
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
644
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
645
|
+
} else {
|
|
646
|
+
Logger({
|
|
647
|
+
level: "WARN",
|
|
648
|
+
message: `Response Validation Warnings for application > PosCart > getAddresses \n ${res_error}`,
|
|
649
|
+
});
|
|
650
|
+
}
|
|
620
651
|
}
|
|
621
652
|
|
|
622
653
|
return response;
|
|
@@ -694,10 +725,14 @@ class PosCart {
|
|
|
694
725
|
);
|
|
695
726
|
|
|
696
727
|
if (res_error) {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
728
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
729
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
730
|
+
} else {
|
|
731
|
+
Logger({
|
|
732
|
+
level: "WARN",
|
|
733
|
+
message: `Response Validation Warnings for application > PosCart > getAvailableDeliveryModes \n ${res_error}`,
|
|
734
|
+
});
|
|
735
|
+
}
|
|
701
736
|
}
|
|
702
737
|
|
|
703
738
|
return response;
|
|
@@ -774,10 +809,14 @@ class PosCart {
|
|
|
774
809
|
});
|
|
775
810
|
|
|
776
811
|
if (res_error) {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
812
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
813
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
814
|
+
} else {
|
|
815
|
+
Logger({
|
|
816
|
+
level: "WARN",
|
|
817
|
+
message: `Response Validation Warnings for application > PosCart > getBulkDiscountOffers \n ${res_error}`,
|
|
818
|
+
});
|
|
819
|
+
}
|
|
781
820
|
}
|
|
782
821
|
|
|
783
822
|
return response;
|
|
@@ -854,10 +893,14 @@ class PosCart {
|
|
|
854
893
|
});
|
|
855
894
|
|
|
856
895
|
if (res_error) {
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
896
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
897
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
898
|
+
} else {
|
|
899
|
+
Logger({
|
|
900
|
+
level: "WARN",
|
|
901
|
+
message: `Response Validation Warnings for application > PosCart > getCart \n ${res_error}`,
|
|
902
|
+
});
|
|
903
|
+
}
|
|
861
904
|
}
|
|
862
905
|
|
|
863
906
|
return response;
|
|
@@ -928,10 +971,14 @@ class PosCart {
|
|
|
928
971
|
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
929
972
|
|
|
930
973
|
if (res_error) {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
974
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
975
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
976
|
+
} else {
|
|
977
|
+
Logger({
|
|
978
|
+
level: "WARN",
|
|
979
|
+
message: `Response Validation Warnings for application > PosCart > getCartLastModified \n ${res_error}`,
|
|
980
|
+
});
|
|
981
|
+
}
|
|
935
982
|
}
|
|
936
983
|
|
|
937
984
|
return response;
|
|
@@ -1003,10 +1050,14 @@ class PosCart {
|
|
|
1003
1050
|
);
|
|
1004
1051
|
|
|
1005
1052
|
if (res_error) {
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1053
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1054
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1055
|
+
} else {
|
|
1056
|
+
Logger({
|
|
1057
|
+
level: "WARN",
|
|
1058
|
+
message: `Response Validation Warnings for application > PosCart > getCartShareLink \n ${res_error}`,
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1010
1061
|
}
|
|
1011
1062
|
|
|
1012
1063
|
return response;
|
|
@@ -1077,10 +1128,14 @@ class PosCart {
|
|
|
1077
1128
|
});
|
|
1078
1129
|
|
|
1079
1130
|
if (res_error) {
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1131
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1132
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1133
|
+
} else {
|
|
1134
|
+
Logger({
|
|
1135
|
+
level: "WARN",
|
|
1136
|
+
message: `Response Validation Warnings for application > PosCart > getCartSharedItems \n ${res_error}`,
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1084
1139
|
}
|
|
1085
1140
|
|
|
1086
1141
|
return response;
|
|
@@ -1153,10 +1208,14 @@ class PosCart {
|
|
|
1153
1208
|
});
|
|
1154
1209
|
|
|
1155
1210
|
if (res_error) {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1211
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1212
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1213
|
+
} else {
|
|
1214
|
+
Logger({
|
|
1215
|
+
level: "WARN",
|
|
1216
|
+
message: `Response Validation Warnings for application > PosCart > getCoupons \n ${res_error}`,
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
1160
1219
|
}
|
|
1161
1220
|
|
|
1162
1221
|
return response;
|
|
@@ -1230,10 +1289,14 @@ class PosCart {
|
|
|
1230
1289
|
});
|
|
1231
1290
|
|
|
1232
1291
|
if (res_error) {
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1292
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1293
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1294
|
+
} else {
|
|
1295
|
+
Logger({
|
|
1296
|
+
level: "WARN",
|
|
1297
|
+
message: `Response Validation Warnings for application > PosCart > getItemCount \n ${res_error}`,
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1237
1300
|
}
|
|
1238
1301
|
|
|
1239
1302
|
return response;
|
|
@@ -1337,10 +1400,14 @@ class PosCart {
|
|
|
1337
1400
|
});
|
|
1338
1401
|
|
|
1339
1402
|
if (res_error) {
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1403
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1404
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1405
|
+
} else {
|
|
1406
|
+
Logger({
|
|
1407
|
+
level: "WARN",
|
|
1408
|
+
message: `Response Validation Warnings for application > PosCart > getShipments \n ${res_error}`,
|
|
1409
|
+
});
|
|
1410
|
+
}
|
|
1344
1411
|
}
|
|
1345
1412
|
|
|
1346
1413
|
return response;
|
|
@@ -1414,10 +1481,14 @@ class PosCart {
|
|
|
1414
1481
|
});
|
|
1415
1482
|
|
|
1416
1483
|
if (res_error) {
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1484
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1485
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1486
|
+
} else {
|
|
1487
|
+
Logger({
|
|
1488
|
+
level: "WARN",
|
|
1489
|
+
message: `Response Validation Warnings for application > PosCart > getStoreAddressByUid \n ${res_error}`,
|
|
1490
|
+
});
|
|
1491
|
+
}
|
|
1421
1492
|
}
|
|
1422
1493
|
|
|
1423
1494
|
return response;
|
|
@@ -1489,10 +1560,14 @@ class PosCart {
|
|
|
1489
1560
|
});
|
|
1490
1561
|
|
|
1491
1562
|
if (res_error) {
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1563
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1564
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1565
|
+
} else {
|
|
1566
|
+
Logger({
|
|
1567
|
+
level: "WARN",
|
|
1568
|
+
message: `Response Validation Warnings for application > PosCart > removeAddress \n ${res_error}`,
|
|
1569
|
+
});
|
|
1570
|
+
}
|
|
1496
1571
|
}
|
|
1497
1572
|
|
|
1498
1573
|
return response;
|
|
@@ -1565,10 +1640,14 @@ class PosCart {
|
|
|
1565
1640
|
});
|
|
1566
1641
|
|
|
1567
1642
|
if (res_error) {
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1643
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1644
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1645
|
+
} else {
|
|
1646
|
+
Logger({
|
|
1647
|
+
level: "WARN",
|
|
1648
|
+
message: `Response Validation Warnings for application > PosCart > removeCoupon \n ${res_error}`,
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1572
1651
|
}
|
|
1573
1652
|
|
|
1574
1653
|
return response;
|
|
@@ -1643,10 +1722,14 @@ class PosCart {
|
|
|
1643
1722
|
});
|
|
1644
1723
|
|
|
1645
1724
|
if (res_error) {
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1725
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1726
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1727
|
+
} else {
|
|
1728
|
+
Logger({
|
|
1729
|
+
level: "WARN",
|
|
1730
|
+
message: `Response Validation Warnings for application > PosCart > selectAddress \n ${res_error}`,
|
|
1731
|
+
});
|
|
1732
|
+
}
|
|
1650
1733
|
}
|
|
1651
1734
|
|
|
1652
1735
|
return response;
|
|
@@ -1719,10 +1802,14 @@ class PosCart {
|
|
|
1719
1802
|
});
|
|
1720
1803
|
|
|
1721
1804
|
if (res_error) {
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1805
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1806
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1807
|
+
} else {
|
|
1808
|
+
Logger({
|
|
1809
|
+
level: "WARN",
|
|
1810
|
+
message: `Response Validation Warnings for application > PosCart > selectPaymentMode \n ${res_error}`,
|
|
1811
|
+
});
|
|
1812
|
+
}
|
|
1726
1813
|
}
|
|
1727
1814
|
|
|
1728
1815
|
return response;
|
|
@@ -1794,10 +1881,14 @@ class PosCart {
|
|
|
1794
1881
|
});
|
|
1795
1882
|
|
|
1796
1883
|
if (res_error) {
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1884
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1885
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1886
|
+
} else {
|
|
1887
|
+
Logger({
|
|
1888
|
+
level: "WARN",
|
|
1889
|
+
message: `Response Validation Warnings for application > PosCart > updateAddress \n ${res_error}`,
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1801
1892
|
}
|
|
1802
1893
|
|
|
1803
1894
|
return response;
|
|
@@ -1876,10 +1967,14 @@ class PosCart {
|
|
|
1876
1967
|
);
|
|
1877
1968
|
|
|
1878
1969
|
if (res_error) {
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1970
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1971
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1972
|
+
} else {
|
|
1973
|
+
Logger({
|
|
1974
|
+
level: "WARN",
|
|
1975
|
+
message: `Response Validation Warnings for application > PosCart > updateCart \n ${res_error}`,
|
|
1976
|
+
});
|
|
1977
|
+
}
|
|
1883
1978
|
}
|
|
1884
1979
|
|
|
1885
1980
|
return response;
|
|
@@ -1952,10 +2047,14 @@ class PosCart {
|
|
|
1952
2047
|
});
|
|
1953
2048
|
|
|
1954
2049
|
if (res_error) {
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
2050
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2051
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2052
|
+
} else {
|
|
2053
|
+
Logger({
|
|
2054
|
+
level: "WARN",
|
|
2055
|
+
message: `Response Validation Warnings for application > PosCart > updateCartMeta \n ${res_error}`,
|
|
2056
|
+
});
|
|
2057
|
+
}
|
|
1959
2058
|
}
|
|
1960
2059
|
|
|
1961
2060
|
return response;
|
|
@@ -2030,10 +2129,14 @@ class PosCart {
|
|
|
2030
2129
|
});
|
|
2031
2130
|
|
|
2032
2131
|
if (res_error) {
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2132
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2133
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2134
|
+
} else {
|
|
2135
|
+
Logger({
|
|
2136
|
+
level: "WARN",
|
|
2137
|
+
message: `Response Validation Warnings for application > PosCart > updateCartWithSharedItems \n ${res_error}`,
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2037
2140
|
}
|
|
2038
2141
|
|
|
2039
2142
|
return response;
|
|
@@ -2113,10 +2216,14 @@ class PosCart {
|
|
|
2113
2216
|
});
|
|
2114
2217
|
|
|
2115
2218
|
if (res_error) {
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2219
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2220
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2221
|
+
} else {
|
|
2222
|
+
Logger({
|
|
2223
|
+
level: "WARN",
|
|
2224
|
+
message: `Response Validation Warnings for application > PosCart > updateShipments \n ${res_error}`,
|
|
2225
|
+
});
|
|
2226
|
+
}
|
|
2120
2227
|
}
|
|
2121
2228
|
|
|
2122
2229
|
return response;
|
|
@@ -2239,10 +2346,14 @@ class PosCart {
|
|
|
2239
2346
|
});
|
|
2240
2347
|
|
|
2241
2348
|
if (res_error) {
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2349
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2350
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2351
|
+
} else {
|
|
2352
|
+
Logger({
|
|
2353
|
+
level: "WARN",
|
|
2354
|
+
message: `Response Validation Warnings for application > PosCart > validateCouponForPayment \n ${res_error}`,
|
|
2355
|
+
});
|
|
2356
|
+
}
|
|
2246
2357
|
}
|
|
2247
2358
|
|
|
2248
2359
|
return response;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
FDKClientValidationError,
|
|
4
|
+
FDKResponseValidationError,
|
|
5
|
+
} = require("../../common/FDKError");
|
|
3
6
|
const constructUrl = require("../constructUrl");
|
|
4
7
|
const Paginator = require("../../common/Paginator");
|
|
5
8
|
const RewardsApplicationValidator = require("./RewardsApplicationValidator");
|
|
@@ -106,10 +109,14 @@ class Rewards {
|
|
|
106
109
|
);
|
|
107
110
|
|
|
108
111
|
if (res_error) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
113
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
114
|
+
} else {
|
|
115
|
+
Logger({
|
|
116
|
+
level: "WARN",
|
|
117
|
+
message: `Response Validation Warnings for application > Rewards > catalogueOrder \n ${res_error}`,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
113
120
|
}
|
|
114
121
|
|
|
115
122
|
return response;
|
|
@@ -180,10 +187,14 @@ class Rewards {
|
|
|
180
187
|
});
|
|
181
188
|
|
|
182
189
|
if (res_error) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
190
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
191
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
192
|
+
} else {
|
|
193
|
+
Logger({
|
|
194
|
+
level: "WARN",
|
|
195
|
+
message: `Response Validation Warnings for application > Rewards > getOfferByName \n ${res_error}`,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
187
198
|
}
|
|
188
199
|
|
|
189
200
|
return response;
|
|
@@ -255,10 +266,14 @@ class Rewards {
|
|
|
255
266
|
});
|
|
256
267
|
|
|
257
268
|
if (res_error) {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
269
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
270
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
271
|
+
} else {
|
|
272
|
+
Logger({
|
|
273
|
+
level: "WARN",
|
|
274
|
+
message: `Response Validation Warnings for application > Rewards > getOrderDiscount \n ${res_error}`,
|
|
275
|
+
});
|
|
276
|
+
}
|
|
262
277
|
}
|
|
263
278
|
|
|
264
279
|
return response;
|
|
@@ -329,10 +344,14 @@ class Rewards {
|
|
|
329
344
|
});
|
|
330
345
|
|
|
331
346
|
if (res_error) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
347
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
348
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
349
|
+
} else {
|
|
350
|
+
Logger({
|
|
351
|
+
level: "WARN",
|
|
352
|
+
message: `Response Validation Warnings for application > Rewards > getUserPoints \n ${res_error}`,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
336
355
|
}
|
|
337
356
|
|
|
338
357
|
return response;
|
|
@@ -408,10 +427,14 @@ class Rewards {
|
|
|
408
427
|
});
|
|
409
428
|
|
|
410
429
|
if (res_error) {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
430
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
431
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
432
|
+
} else {
|
|
433
|
+
Logger({
|
|
434
|
+
level: "WARN",
|
|
435
|
+
message: `Response Validation Warnings for application > Rewards > getUserPointsHistory \n ${res_error}`,
|
|
436
|
+
});
|
|
437
|
+
}
|
|
415
438
|
}
|
|
416
439
|
|
|
417
440
|
return response;
|
|
@@ -512,10 +535,14 @@ class Rewards {
|
|
|
512
535
|
);
|
|
513
536
|
|
|
514
537
|
if (res_error) {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
538
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
539
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
540
|
+
} else {
|
|
541
|
+
Logger({
|
|
542
|
+
level: "WARN",
|
|
543
|
+
message: `Response Validation Warnings for application > Rewards > getUserReferralDetails \n ${res_error}`,
|
|
544
|
+
});
|
|
545
|
+
}
|
|
519
546
|
}
|
|
520
547
|
|
|
521
548
|
return response;
|
|
@@ -587,10 +614,14 @@ class Rewards {
|
|
|
587
614
|
);
|
|
588
615
|
|
|
589
616
|
if (res_error) {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
617
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
618
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
619
|
+
} else {
|
|
620
|
+
Logger({
|
|
621
|
+
level: "WARN",
|
|
622
|
+
message: `Response Validation Warnings for application > Rewards > redeemReferralCode \n ${res_error}`,
|
|
623
|
+
});
|
|
624
|
+
}
|
|
594
625
|
}
|
|
595
626
|
|
|
596
627
|
return response;
|