@gofynd/fdk-client-javascript 1.3.6-beta.2 → 1.3.7
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 +1 -1
- package/sdk/application/ApplicationConfig.d.ts +11 -3
- package/sdk/application/ApplicationConfig.js +21 -3
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +232 -116
- package/sdk/application/Cart/CartApplicationValidator.d.ts +2 -0
- package/sdk/application/Cart/CartApplicationValidator.js +2 -0
- 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.d.ts +1 -1
- package/sdk/application/PosCart/PosCartApplicationClient.js +224 -112
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +2 -0
- package/sdk/application/PosCart/PosCartApplicationValidator.js +2 -0
- 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/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.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +460 -229
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +2 -0
- 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.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformClient.js +356 -254
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +1 -20
- package/sdk/platform/Order/OrderPlatformValidator.js +0 -15
- 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
|
@@ -136,7 +136,7 @@ declare class PosCart {
|
|
|
136
136
|
* @summary: Fetch all items added to the cart
|
|
137
137
|
* @description: Use this API to get details of all the items added to a cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/poscart/getCart/).
|
|
138
138
|
*/
|
|
139
|
-
getCart({ id, i, b, assignCardId, areaCode, buyNow, requestHeaders }?: PosCartApplicationValidator.GetCartParam, { responseHeaders }?: object): Promise<PosCartApplicationModel.CartDetailResponse>;
|
|
139
|
+
getCart({ id, i, b, c, assignCardId, areaCode, buyNow, requestHeaders }?: PosCartApplicationValidator.GetCartParam, { responseHeaders }?: object): Promise<PosCartApplicationModel.CartDetailResponse>;
|
|
140
140
|
/**
|
|
141
141
|
* @param {PosCartApplicationValidator.GetCartLastModifiedParam} arg - Arg object.
|
|
142
142
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -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;
|
|
@@ -793,13 +832,13 @@ class PosCart {
|
|
|
793
832
|
* @description: Use this API to get details of all the items added to a cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/poscart/getCart/).
|
|
794
833
|
*/
|
|
795
834
|
async getCart(
|
|
796
|
-
{ id, i, b, assignCardId, areaCode, buyNow, requestHeaders } = {
|
|
835
|
+
{ id, i, b, c, assignCardId, areaCode, buyNow, requestHeaders } = {
|
|
797
836
|
requestHeaders: {},
|
|
798
837
|
},
|
|
799
838
|
{ responseHeaders } = { responseHeaders: false }
|
|
800
839
|
) {
|
|
801
840
|
const { error } = PosCartApplicationValidator.getCart().validate(
|
|
802
|
-
{ id, i, b, assignCardId, areaCode, buyNow },
|
|
841
|
+
{ id, i, b, c, assignCardId, areaCode, buyNow },
|
|
803
842
|
{ abortEarly: false, allowUnknown: true }
|
|
804
843
|
);
|
|
805
844
|
if (error) {
|
|
@@ -808,7 +847,7 @@ class PosCart {
|
|
|
808
847
|
|
|
809
848
|
// Showing warrnings if extra unknown parameters are found
|
|
810
849
|
const { error: warrning } = PosCartApplicationValidator.getCart().validate(
|
|
811
|
-
{ id, i, b, assignCardId, areaCode, buyNow },
|
|
850
|
+
{ id, i, b, c, assignCardId, areaCode, buyNow },
|
|
812
851
|
{ abortEarly: false, allowUnknown: false }
|
|
813
852
|
);
|
|
814
853
|
if (warrning) {
|
|
@@ -822,6 +861,7 @@ class PosCart {
|
|
|
822
861
|
query_params["id"] = id;
|
|
823
862
|
query_params["i"] = i;
|
|
824
863
|
query_params["b"] = b;
|
|
864
|
+
query_params["c"] = c;
|
|
825
865
|
query_params["assign_card_id"] = assignCardId;
|
|
826
866
|
query_params["area_code"] = areaCode;
|
|
827
867
|
query_params["buy_now"] = buyNow;
|
|
@@ -854,10 +894,14 @@ class PosCart {
|
|
|
854
894
|
});
|
|
855
895
|
|
|
856
896
|
if (res_error) {
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
897
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
898
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
899
|
+
} else {
|
|
900
|
+
Logger({
|
|
901
|
+
level: "WARN",
|
|
902
|
+
message: `Response Validation Warnings for application > PosCart > getCart \n ${res_error}`,
|
|
903
|
+
});
|
|
904
|
+
}
|
|
861
905
|
}
|
|
862
906
|
|
|
863
907
|
return response;
|
|
@@ -928,10 +972,14 @@ class PosCart {
|
|
|
928
972
|
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
929
973
|
|
|
930
974
|
if (res_error) {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
975
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
976
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
977
|
+
} else {
|
|
978
|
+
Logger({
|
|
979
|
+
level: "WARN",
|
|
980
|
+
message: `Response Validation Warnings for application > PosCart > getCartLastModified \n ${res_error}`,
|
|
981
|
+
});
|
|
982
|
+
}
|
|
935
983
|
}
|
|
936
984
|
|
|
937
985
|
return response;
|
|
@@ -1003,10 +1051,14 @@ class PosCart {
|
|
|
1003
1051
|
);
|
|
1004
1052
|
|
|
1005
1053
|
if (res_error) {
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1054
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1055
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1056
|
+
} else {
|
|
1057
|
+
Logger({
|
|
1058
|
+
level: "WARN",
|
|
1059
|
+
message: `Response Validation Warnings for application > PosCart > getCartShareLink \n ${res_error}`,
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1010
1062
|
}
|
|
1011
1063
|
|
|
1012
1064
|
return response;
|
|
@@ -1077,10 +1129,14 @@ class PosCart {
|
|
|
1077
1129
|
});
|
|
1078
1130
|
|
|
1079
1131
|
if (res_error) {
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1132
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1133
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1134
|
+
} else {
|
|
1135
|
+
Logger({
|
|
1136
|
+
level: "WARN",
|
|
1137
|
+
message: `Response Validation Warnings for application > PosCart > getCartSharedItems \n ${res_error}`,
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1084
1140
|
}
|
|
1085
1141
|
|
|
1086
1142
|
return response;
|
|
@@ -1153,10 +1209,14 @@ class PosCart {
|
|
|
1153
1209
|
});
|
|
1154
1210
|
|
|
1155
1211
|
if (res_error) {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1212
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1213
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1214
|
+
} else {
|
|
1215
|
+
Logger({
|
|
1216
|
+
level: "WARN",
|
|
1217
|
+
message: `Response Validation Warnings for application > PosCart > getCoupons \n ${res_error}`,
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1160
1220
|
}
|
|
1161
1221
|
|
|
1162
1222
|
return response;
|
|
@@ -1230,10 +1290,14 @@ class PosCart {
|
|
|
1230
1290
|
});
|
|
1231
1291
|
|
|
1232
1292
|
if (res_error) {
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1293
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1294
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1295
|
+
} else {
|
|
1296
|
+
Logger({
|
|
1297
|
+
level: "WARN",
|
|
1298
|
+
message: `Response Validation Warnings for application > PosCart > getItemCount \n ${res_error}`,
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1237
1301
|
}
|
|
1238
1302
|
|
|
1239
1303
|
return response;
|
|
@@ -1337,10 +1401,14 @@ class PosCart {
|
|
|
1337
1401
|
});
|
|
1338
1402
|
|
|
1339
1403
|
if (res_error) {
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1404
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1405
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1406
|
+
} else {
|
|
1407
|
+
Logger({
|
|
1408
|
+
level: "WARN",
|
|
1409
|
+
message: `Response Validation Warnings for application > PosCart > getShipments \n ${res_error}`,
|
|
1410
|
+
});
|
|
1411
|
+
}
|
|
1344
1412
|
}
|
|
1345
1413
|
|
|
1346
1414
|
return response;
|
|
@@ -1414,10 +1482,14 @@ class PosCart {
|
|
|
1414
1482
|
});
|
|
1415
1483
|
|
|
1416
1484
|
if (res_error) {
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1485
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1486
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1487
|
+
} else {
|
|
1488
|
+
Logger({
|
|
1489
|
+
level: "WARN",
|
|
1490
|
+
message: `Response Validation Warnings for application > PosCart > getStoreAddressByUid \n ${res_error}`,
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1421
1493
|
}
|
|
1422
1494
|
|
|
1423
1495
|
return response;
|
|
@@ -1489,10 +1561,14 @@ class PosCart {
|
|
|
1489
1561
|
});
|
|
1490
1562
|
|
|
1491
1563
|
if (res_error) {
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1564
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1565
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1566
|
+
} else {
|
|
1567
|
+
Logger({
|
|
1568
|
+
level: "WARN",
|
|
1569
|
+
message: `Response Validation Warnings for application > PosCart > removeAddress \n ${res_error}`,
|
|
1570
|
+
});
|
|
1571
|
+
}
|
|
1496
1572
|
}
|
|
1497
1573
|
|
|
1498
1574
|
return response;
|
|
@@ -1565,10 +1641,14 @@ class PosCart {
|
|
|
1565
1641
|
});
|
|
1566
1642
|
|
|
1567
1643
|
if (res_error) {
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1644
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1645
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1646
|
+
} else {
|
|
1647
|
+
Logger({
|
|
1648
|
+
level: "WARN",
|
|
1649
|
+
message: `Response Validation Warnings for application > PosCart > removeCoupon \n ${res_error}`,
|
|
1650
|
+
});
|
|
1651
|
+
}
|
|
1572
1652
|
}
|
|
1573
1653
|
|
|
1574
1654
|
return response;
|
|
@@ -1643,10 +1723,14 @@ class PosCart {
|
|
|
1643
1723
|
});
|
|
1644
1724
|
|
|
1645
1725
|
if (res_error) {
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1726
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1727
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1728
|
+
} else {
|
|
1729
|
+
Logger({
|
|
1730
|
+
level: "WARN",
|
|
1731
|
+
message: `Response Validation Warnings for application > PosCart > selectAddress \n ${res_error}`,
|
|
1732
|
+
});
|
|
1733
|
+
}
|
|
1650
1734
|
}
|
|
1651
1735
|
|
|
1652
1736
|
return response;
|
|
@@ -1719,10 +1803,14 @@ class PosCart {
|
|
|
1719
1803
|
});
|
|
1720
1804
|
|
|
1721
1805
|
if (res_error) {
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1806
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1807
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1808
|
+
} else {
|
|
1809
|
+
Logger({
|
|
1810
|
+
level: "WARN",
|
|
1811
|
+
message: `Response Validation Warnings for application > PosCart > selectPaymentMode \n ${res_error}`,
|
|
1812
|
+
});
|
|
1813
|
+
}
|
|
1726
1814
|
}
|
|
1727
1815
|
|
|
1728
1816
|
return response;
|
|
@@ -1794,10 +1882,14 @@ class PosCart {
|
|
|
1794
1882
|
});
|
|
1795
1883
|
|
|
1796
1884
|
if (res_error) {
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1885
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1886
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1887
|
+
} else {
|
|
1888
|
+
Logger({
|
|
1889
|
+
level: "WARN",
|
|
1890
|
+
message: `Response Validation Warnings for application > PosCart > updateAddress \n ${res_error}`,
|
|
1891
|
+
});
|
|
1892
|
+
}
|
|
1801
1893
|
}
|
|
1802
1894
|
|
|
1803
1895
|
return response;
|
|
@@ -1876,10 +1968,14 @@ class PosCart {
|
|
|
1876
1968
|
);
|
|
1877
1969
|
|
|
1878
1970
|
if (res_error) {
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1971
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1972
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1973
|
+
} else {
|
|
1974
|
+
Logger({
|
|
1975
|
+
level: "WARN",
|
|
1976
|
+
message: `Response Validation Warnings for application > PosCart > updateCart \n ${res_error}`,
|
|
1977
|
+
});
|
|
1978
|
+
}
|
|
1883
1979
|
}
|
|
1884
1980
|
|
|
1885
1981
|
return response;
|
|
@@ -1952,10 +2048,14 @@ class PosCart {
|
|
|
1952
2048
|
});
|
|
1953
2049
|
|
|
1954
2050
|
if (res_error) {
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
2051
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2052
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2053
|
+
} else {
|
|
2054
|
+
Logger({
|
|
2055
|
+
level: "WARN",
|
|
2056
|
+
message: `Response Validation Warnings for application > PosCart > updateCartMeta \n ${res_error}`,
|
|
2057
|
+
});
|
|
2058
|
+
}
|
|
1959
2059
|
}
|
|
1960
2060
|
|
|
1961
2061
|
return response;
|
|
@@ -2030,10 +2130,14 @@ class PosCart {
|
|
|
2030
2130
|
});
|
|
2031
2131
|
|
|
2032
2132
|
if (res_error) {
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2133
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2134
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2135
|
+
} else {
|
|
2136
|
+
Logger({
|
|
2137
|
+
level: "WARN",
|
|
2138
|
+
message: `Response Validation Warnings for application > PosCart > updateCartWithSharedItems \n ${res_error}`,
|
|
2139
|
+
});
|
|
2140
|
+
}
|
|
2037
2141
|
}
|
|
2038
2142
|
|
|
2039
2143
|
return response;
|
|
@@ -2113,10 +2217,14 @@ class PosCart {
|
|
|
2113
2217
|
});
|
|
2114
2218
|
|
|
2115
2219
|
if (res_error) {
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2220
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2221
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2222
|
+
} else {
|
|
2223
|
+
Logger({
|
|
2224
|
+
level: "WARN",
|
|
2225
|
+
message: `Response Validation Warnings for application > PosCart > updateShipments \n ${res_error}`,
|
|
2226
|
+
});
|
|
2227
|
+
}
|
|
2120
2228
|
}
|
|
2121
2229
|
|
|
2122
2230
|
return response;
|
|
@@ -2239,10 +2347,14 @@ class PosCart {
|
|
|
2239
2347
|
});
|
|
2240
2348
|
|
|
2241
2349
|
if (res_error) {
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2350
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2351
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2352
|
+
} else {
|
|
2353
|
+
Logger({
|
|
2354
|
+
level: "WARN",
|
|
2355
|
+
message: `Response Validation Warnings for application > PosCart > validateCouponForPayment \n ${res_error}`,
|
|
2356
|
+
});
|
|
2357
|
+
}
|
|
2246
2358
|
}
|
|
2247
2359
|
|
|
2248
2360
|
return response;
|
|
@@ -72,6 +72,7 @@ export = PosCartApplicationValidator;
|
|
|
72
72
|
* @property {string} [id]
|
|
73
73
|
* @property {boolean} [i]
|
|
74
74
|
* @property {boolean} [b]
|
|
75
|
+
* @property {boolean} [c]
|
|
75
76
|
* @property {number} [assignCardId]
|
|
76
77
|
* @property {string} [areaCode]
|
|
77
78
|
* @property {boolean} [buyNow]
|
|
@@ -325,6 +326,7 @@ type GetCartParam = {
|
|
|
325
326
|
id?: string;
|
|
326
327
|
i?: boolean;
|
|
327
328
|
b?: boolean;
|
|
329
|
+
c?: boolean;
|
|
328
330
|
assignCardId?: number;
|
|
329
331
|
areaCode?: string;
|
|
330
332
|
buyNow?: boolean;
|
|
@@ -84,6 +84,7 @@ const PosCartApplicationModel = require("./PosCartApplicationModel");
|
|
|
84
84
|
* @property {string} [id]
|
|
85
85
|
* @property {boolean} [i]
|
|
86
86
|
* @property {boolean} [b]
|
|
87
|
+
* @property {boolean} [c]
|
|
87
88
|
* @property {number} [assignCardId]
|
|
88
89
|
* @property {string} [areaCode]
|
|
89
90
|
* @property {boolean} [buyNow]
|
|
@@ -321,6 +322,7 @@ class PosCartApplicationValidator {
|
|
|
321
322
|
id: Joi.string().allow(""),
|
|
322
323
|
i: Joi.boolean(),
|
|
323
324
|
b: Joi.boolean(),
|
|
325
|
+
c: Joi.boolean(),
|
|
324
326
|
assignCardId: Joi.number(),
|
|
325
327
|
areaCode: Joi.string().allow(""),
|
|
326
328
|
buyNow: Joi.boolean(),
|