@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
package/README.md
CHANGED
|
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
214
214
|
The above code will log the curl command in the console
|
|
215
215
|
|
|
216
216
|
```bash
|
|
217
|
-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.3.6
|
|
217
|
+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.3.6' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
218
218
|
Active Theme: Emerge
|
|
219
219
|
```
|
|
220
220
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gofynd/fdk-client-javascript",
|
|
3
|
-
"version": "1.3.6
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"joi": "^17.7.0",
|
|
19
19
|
"loglevel": "^1.8.1",
|
|
20
20
|
"query-string": "^7.1.3",
|
|
21
|
-
"@gofynd/fp-signature": "^0.0
|
|
21
|
+
"@gofynd/fp-signature": "^1.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"axios-cookiejar-support": "^4.0.6",
|
|
@@ -28,7 +28,11 @@ declare class ApplicationConfig {
|
|
|
28
28
|
* options: TRACE, DEBUG, INFO, WARN, ERROR. Default is `'ERROR'`
|
|
29
29
|
* @param {LocationObject} [_conf.locationDetails] - The location details.
|
|
30
30
|
* @param {string} [_conf.currencyCode='INR'] - The currency code. Default is `'INR'`
|
|
31
|
-
* @param {object} [
|
|
31
|
+
* @param {object} [options] - Additional options.
|
|
32
|
+
* @param {boolean} [options.strictResponseCheck=false] - Strict check for
|
|
33
|
+
* response schema validation. Passing this `true` will check response
|
|
34
|
+
* against response schema and throw FDKResponseValidationError if it
|
|
35
|
+
* doesn't match. Default is `false`
|
|
32
36
|
*/
|
|
33
37
|
constructor(_conf: {
|
|
34
38
|
applicationID: string;
|
|
@@ -37,10 +41,14 @@ declare class ApplicationConfig {
|
|
|
37
41
|
logLevel?: "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR";
|
|
38
42
|
locationDetails?: LocationObject;
|
|
39
43
|
currencyCode?: string;
|
|
40
|
-
},
|
|
44
|
+
}, options?: {
|
|
45
|
+
strictResponseCheck?: boolean;
|
|
46
|
+
});
|
|
41
47
|
applicationID: string;
|
|
42
48
|
applicationToken: string;
|
|
43
|
-
|
|
49
|
+
options: {
|
|
50
|
+
strictResponseCheck: boolean;
|
|
51
|
+
};
|
|
44
52
|
domain: string;
|
|
45
53
|
logLevel: "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR";
|
|
46
54
|
extraHeaders: any[];
|
|
@@ -32,12 +32,19 @@ class ApplicationConfig {
|
|
|
32
32
|
* options: TRACE, DEBUG, INFO, WARN, ERROR. Default is `'ERROR'`
|
|
33
33
|
* @param {LocationObject} [_conf.locationDetails] - The location details.
|
|
34
34
|
* @param {string} [_conf.currencyCode='INR'] - The currency code. Default is `'INR'`
|
|
35
|
-
* @param {object} [
|
|
35
|
+
* @param {object} [options] - Additional options.
|
|
36
|
+
* @param {boolean} [options.strictResponseCheck=false] - Strict check for
|
|
37
|
+
* response schema validation. Passing this `true` will check response
|
|
38
|
+
* against response schema and throw FDKResponseValidationError if it
|
|
39
|
+
* doesn't match. Default is `false`
|
|
36
40
|
*/
|
|
37
|
-
constructor(_conf,
|
|
41
|
+
constructor(_conf, options) {
|
|
38
42
|
this.applicationID = _conf.applicationID || "";
|
|
39
43
|
this.applicationToken = _conf.applicationToken || "";
|
|
40
|
-
this.
|
|
44
|
+
this.options = {
|
|
45
|
+
...{ strictResponseCheck: false },
|
|
46
|
+
...options,
|
|
47
|
+
};
|
|
41
48
|
this.domain = _conf.domain || "https://api.fynd.com";
|
|
42
49
|
this.logLevel = _conf.logLevel || "ERROR";
|
|
43
50
|
this.setLogLevel(this.logLevel);
|
|
@@ -85,6 +92,17 @@ class ApplicationConfig {
|
|
|
85
92
|
Logger({ level: "ERROR", message: "Invalid Application Token" });
|
|
86
93
|
throw new FDKInvalidCredentialError("Invalid Application Token");
|
|
87
94
|
}
|
|
95
|
+
if (typeof this.options.strictResponseCheck !== "boolean") {
|
|
96
|
+
Logger({ level: "ERROR", message: "Invalid Application Token" });
|
|
97
|
+
Logger({
|
|
98
|
+
level: "ERROR",
|
|
99
|
+
message:
|
|
100
|
+
"Invalid Value for options.strictResponseCheck, provide boolean value",
|
|
101
|
+
});
|
|
102
|
+
throw new FDKInvalidCredentialError(
|
|
103
|
+
"Invalid Value for options.strictResponseCheck, provide boolean value"
|
|
104
|
+
);
|
|
105
|
+
}
|
|
88
106
|
}
|
|
89
107
|
}
|
|
90
108
|
|
|
@@ -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 CartApplicationValidator = require("./CartApplicationValidator");
|
|
@@ -121,10 +124,14 @@ class Cart {
|
|
|
121
124
|
});
|
|
122
125
|
|
|
123
126
|
if (res_error) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
128
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
129
|
+
} else {
|
|
130
|
+
Logger({
|
|
131
|
+
level: "WARN",
|
|
132
|
+
message: `Response Validation Warnings for application > Cart > addAddress \n ${res_error}`,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
128
135
|
}
|
|
129
136
|
|
|
130
137
|
return response;
|
|
@@ -200,10 +207,14 @@ class Cart {
|
|
|
200
207
|
});
|
|
201
208
|
|
|
202
209
|
if (res_error) {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
210
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
211
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
212
|
+
} else {
|
|
213
|
+
Logger({
|
|
214
|
+
level: "WARN",
|
|
215
|
+
message: `Response Validation Warnings for application > Cart > addItems \n ${res_error}`,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
207
218
|
}
|
|
208
219
|
|
|
209
220
|
return response;
|
|
@@ -277,10 +288,14 @@ class Cart {
|
|
|
277
288
|
});
|
|
278
289
|
|
|
279
290
|
if (res_error) {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
291
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
292
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
293
|
+
} else {
|
|
294
|
+
Logger({
|
|
295
|
+
level: "WARN",
|
|
296
|
+
message: `Response Validation Warnings for application > Cart > applyCoupon \n ${res_error}`,
|
|
297
|
+
});
|
|
298
|
+
}
|
|
284
299
|
}
|
|
285
300
|
|
|
286
301
|
return response;
|
|
@@ -355,10 +370,14 @@ class Cart {
|
|
|
355
370
|
});
|
|
356
371
|
|
|
357
372
|
if (res_error) {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
373
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
374
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
375
|
+
} else {
|
|
376
|
+
Logger({
|
|
377
|
+
level: "WARN",
|
|
378
|
+
message: `Response Validation Warnings for application > Cart > applyRewardPoints \n ${res_error}`,
|
|
379
|
+
});
|
|
380
|
+
}
|
|
362
381
|
}
|
|
363
382
|
|
|
364
383
|
return response;
|
|
@@ -430,10 +449,14 @@ class Cart {
|
|
|
430
449
|
});
|
|
431
450
|
|
|
432
451
|
if (res_error) {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
452
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
453
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
454
|
+
} else {
|
|
455
|
+
Logger({
|
|
456
|
+
level: "WARN",
|
|
457
|
+
message: `Response Validation Warnings for application > Cart > checkoutCart \n ${res_error}`,
|
|
458
|
+
});
|
|
459
|
+
}
|
|
437
460
|
}
|
|
438
461
|
|
|
439
462
|
return response;
|
|
@@ -505,10 +528,14 @@ class Cart {
|
|
|
505
528
|
});
|
|
506
529
|
|
|
507
530
|
if (res_error) {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
531
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
532
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
533
|
+
} else {
|
|
534
|
+
Logger({
|
|
535
|
+
level: "WARN",
|
|
536
|
+
message: `Response Validation Warnings for application > Cart > checkoutCartV2 \n ${res_error}`,
|
|
537
|
+
});
|
|
538
|
+
}
|
|
512
539
|
}
|
|
513
540
|
|
|
514
541
|
return response;
|
|
@@ -579,10 +606,14 @@ class Cart {
|
|
|
579
606
|
});
|
|
580
607
|
|
|
581
608
|
if (res_error) {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
609
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
610
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
611
|
+
} else {
|
|
612
|
+
Logger({
|
|
613
|
+
level: "WARN",
|
|
614
|
+
message: `Response Validation Warnings for application > Cart > deleteCart \n ${res_error}`,
|
|
615
|
+
});
|
|
616
|
+
}
|
|
586
617
|
}
|
|
587
618
|
|
|
588
619
|
return response;
|
|
@@ -668,10 +699,14 @@ class Cart {
|
|
|
668
699
|
});
|
|
669
700
|
|
|
670
701
|
if (res_error) {
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
702
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
703
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
704
|
+
} else {
|
|
705
|
+
Logger({
|
|
706
|
+
level: "WARN",
|
|
707
|
+
message: `Response Validation Warnings for application > Cart > getAddressById \n ${res_error}`,
|
|
708
|
+
});
|
|
709
|
+
}
|
|
675
710
|
}
|
|
676
711
|
|
|
677
712
|
return response;
|
|
@@ -756,10 +791,14 @@ class Cart {
|
|
|
756
791
|
});
|
|
757
792
|
|
|
758
793
|
if (res_error) {
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
794
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
795
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
796
|
+
} else {
|
|
797
|
+
Logger({
|
|
798
|
+
level: "WARN",
|
|
799
|
+
message: `Response Validation Warnings for application > Cart > getAddresses \n ${res_error}`,
|
|
800
|
+
});
|
|
801
|
+
}
|
|
763
802
|
}
|
|
764
803
|
|
|
765
804
|
return response;
|
|
@@ -834,10 +873,14 @@ class Cart {
|
|
|
834
873
|
});
|
|
835
874
|
|
|
836
875
|
if (res_error) {
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
876
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
877
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
878
|
+
} else {
|
|
879
|
+
Logger({
|
|
880
|
+
level: "WARN",
|
|
881
|
+
message: `Response Validation Warnings for application > Cart > getBulkDiscountOffers \n ${res_error}`,
|
|
882
|
+
});
|
|
883
|
+
}
|
|
841
884
|
}
|
|
842
885
|
|
|
843
886
|
return response;
|
|
@@ -914,10 +957,14 @@ class Cart {
|
|
|
914
957
|
});
|
|
915
958
|
|
|
916
959
|
if (res_error) {
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
960
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
961
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
962
|
+
} else {
|
|
963
|
+
Logger({
|
|
964
|
+
level: "WARN",
|
|
965
|
+
message: `Response Validation Warnings for application > Cart > getCart \n ${res_error}`,
|
|
966
|
+
});
|
|
967
|
+
}
|
|
921
968
|
}
|
|
922
969
|
|
|
923
970
|
return response;
|
|
@@ -986,10 +1033,14 @@ class Cart {
|
|
|
986
1033
|
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
987
1034
|
|
|
988
1035
|
if (res_error) {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1036
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1037
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1038
|
+
} else {
|
|
1039
|
+
Logger({
|
|
1040
|
+
level: "WARN",
|
|
1041
|
+
message: `Response Validation Warnings for application > Cart > getCartLastModified \n ${res_error}`,
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
993
1044
|
}
|
|
994
1045
|
|
|
995
1046
|
return response;
|
|
@@ -1061,10 +1112,14 @@ class Cart {
|
|
|
1061
1112
|
});
|
|
1062
1113
|
|
|
1063
1114
|
if (res_error) {
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1115
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1116
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1117
|
+
} else {
|
|
1118
|
+
Logger({
|
|
1119
|
+
level: "WARN",
|
|
1120
|
+
message: `Response Validation Warnings for application > Cart > getCartShareLink \n ${res_error}`,
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1068
1123
|
}
|
|
1069
1124
|
|
|
1070
1125
|
return response;
|
|
@@ -1135,10 +1190,14 @@ class Cart {
|
|
|
1135
1190
|
});
|
|
1136
1191
|
|
|
1137
1192
|
if (res_error) {
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1193
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1194
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1195
|
+
} else {
|
|
1196
|
+
Logger({
|
|
1197
|
+
level: "WARN",
|
|
1198
|
+
message: `Response Validation Warnings for application > Cart > getCartSharedItems \n ${res_error}`,
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1142
1201
|
}
|
|
1143
1202
|
|
|
1144
1203
|
return response;
|
|
@@ -1209,10 +1268,14 @@ class Cart {
|
|
|
1209
1268
|
});
|
|
1210
1269
|
|
|
1211
1270
|
if (res_error) {
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1271
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1272
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1273
|
+
} else {
|
|
1274
|
+
Logger({
|
|
1275
|
+
level: "WARN",
|
|
1276
|
+
message: `Response Validation Warnings for application > Cart > getCoupons \n ${res_error}`,
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1216
1279
|
}
|
|
1217
1280
|
|
|
1218
1281
|
return response;
|
|
@@ -1285,10 +1348,14 @@ class Cart {
|
|
|
1285
1348
|
});
|
|
1286
1349
|
|
|
1287
1350
|
if (res_error) {
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1351
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1352
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1353
|
+
} else {
|
|
1354
|
+
Logger({
|
|
1355
|
+
level: "WARN",
|
|
1356
|
+
message: `Response Validation Warnings for application > Cart > getItemCount \n ${res_error}`,
|
|
1357
|
+
});
|
|
1358
|
+
}
|
|
1292
1359
|
}
|
|
1293
1360
|
|
|
1294
1361
|
return response;
|
|
@@ -1365,10 +1432,14 @@ class Cart {
|
|
|
1365
1432
|
});
|
|
1366
1433
|
|
|
1367
1434
|
if (res_error) {
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1435
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1436
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1437
|
+
} else {
|
|
1438
|
+
Logger({
|
|
1439
|
+
level: "WARN",
|
|
1440
|
+
message: `Response Validation Warnings for application > Cart > getLadderOffers \n ${res_error}`,
|
|
1441
|
+
});
|
|
1442
|
+
}
|
|
1372
1443
|
}
|
|
1373
1444
|
|
|
1374
1445
|
return response;
|
|
@@ -1445,10 +1516,14 @@ class Cart {
|
|
|
1445
1516
|
});
|
|
1446
1517
|
|
|
1447
1518
|
if (res_error) {
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1519
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1520
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1521
|
+
} else {
|
|
1522
|
+
Logger({
|
|
1523
|
+
level: "WARN",
|
|
1524
|
+
message: `Response Validation Warnings for application > Cart > getPromotionOffers \n ${res_error}`,
|
|
1525
|
+
});
|
|
1526
|
+
}
|
|
1452
1527
|
}
|
|
1453
1528
|
|
|
1454
1529
|
return response;
|
|
@@ -1527,10 +1602,14 @@ class Cart {
|
|
|
1527
1602
|
});
|
|
1528
1603
|
|
|
1529
1604
|
if (res_error) {
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1605
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1606
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1607
|
+
} else {
|
|
1608
|
+
Logger({
|
|
1609
|
+
level: "WARN",
|
|
1610
|
+
message: `Response Validation Warnings for application > Cart > getShipments \n ${res_error}`,
|
|
1611
|
+
});
|
|
1612
|
+
}
|
|
1534
1613
|
}
|
|
1535
1614
|
|
|
1536
1615
|
return response;
|
|
@@ -1601,10 +1680,14 @@ class Cart {
|
|
|
1601
1680
|
});
|
|
1602
1681
|
|
|
1603
1682
|
if (res_error) {
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1683
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1684
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1685
|
+
} else {
|
|
1686
|
+
Logger({
|
|
1687
|
+
level: "WARN",
|
|
1688
|
+
message: `Response Validation Warnings for application > Cart > removeAddress \n ${res_error}`,
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1608
1691
|
}
|
|
1609
1692
|
|
|
1610
1693
|
return response;
|
|
@@ -1677,10 +1760,14 @@ class Cart {
|
|
|
1677
1760
|
});
|
|
1678
1761
|
|
|
1679
1762
|
if (res_error) {
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1763
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1764
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1765
|
+
} else {
|
|
1766
|
+
Logger({
|
|
1767
|
+
level: "WARN",
|
|
1768
|
+
message: `Response Validation Warnings for application > Cart > removeCoupon \n ${res_error}`,
|
|
1769
|
+
});
|
|
1770
|
+
}
|
|
1684
1771
|
}
|
|
1685
1772
|
|
|
1686
1773
|
return response;
|
|
@@ -1755,10 +1842,14 @@ class Cart {
|
|
|
1755
1842
|
});
|
|
1756
1843
|
|
|
1757
1844
|
if (res_error) {
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1845
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1846
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1847
|
+
} else {
|
|
1848
|
+
Logger({
|
|
1849
|
+
level: "WARN",
|
|
1850
|
+
message: `Response Validation Warnings for application > Cart > selectAddress \n ${res_error}`,
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1762
1853
|
}
|
|
1763
1854
|
|
|
1764
1855
|
return response;
|
|
@@ -1831,10 +1922,14 @@ class Cart {
|
|
|
1831
1922
|
});
|
|
1832
1923
|
|
|
1833
1924
|
if (res_error) {
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1925
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1926
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1927
|
+
} else {
|
|
1928
|
+
Logger({
|
|
1929
|
+
level: "WARN",
|
|
1930
|
+
message: `Response Validation Warnings for application > Cart > selectPaymentMode \n ${res_error}`,
|
|
1931
|
+
});
|
|
1932
|
+
}
|
|
1838
1933
|
}
|
|
1839
1934
|
|
|
1840
1935
|
return response;
|
|
@@ -1905,10 +2000,14 @@ class Cart {
|
|
|
1905
2000
|
});
|
|
1906
2001
|
|
|
1907
2002
|
if (res_error) {
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
2003
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2004
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2005
|
+
} else {
|
|
2006
|
+
Logger({
|
|
2007
|
+
level: "WARN",
|
|
2008
|
+
message: `Response Validation Warnings for application > Cart > updateAddress \n ${res_error}`,
|
|
2009
|
+
});
|
|
2010
|
+
}
|
|
1912
2011
|
}
|
|
1913
2012
|
|
|
1914
2013
|
return response;
|
|
@@ -1985,10 +2084,14 @@ class Cart {
|
|
|
1985
2084
|
});
|
|
1986
2085
|
|
|
1987
2086
|
if (res_error) {
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
2087
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2088
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2089
|
+
} else {
|
|
2090
|
+
Logger({
|
|
2091
|
+
level: "WARN",
|
|
2092
|
+
message: `Response Validation Warnings for application > Cart > updateCart \n ${res_error}`,
|
|
2093
|
+
});
|
|
2094
|
+
}
|
|
1992
2095
|
}
|
|
1993
2096
|
|
|
1994
2097
|
return response;
|
|
@@ -2061,10 +2164,14 @@ class Cart {
|
|
|
2061
2164
|
});
|
|
2062
2165
|
|
|
2063
2166
|
if (res_error) {
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2167
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2168
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2169
|
+
} else {
|
|
2170
|
+
Logger({
|
|
2171
|
+
level: "WARN",
|
|
2172
|
+
message: `Response Validation Warnings for application > Cart > updateCartMeta \n ${res_error}`,
|
|
2173
|
+
});
|
|
2174
|
+
}
|
|
2068
2175
|
}
|
|
2069
2176
|
|
|
2070
2177
|
return response;
|
|
@@ -2137,10 +2244,14 @@ class Cart {
|
|
|
2137
2244
|
});
|
|
2138
2245
|
|
|
2139
2246
|
if (res_error) {
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2247
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2248
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2249
|
+
} else {
|
|
2250
|
+
Logger({
|
|
2251
|
+
level: "WARN",
|
|
2252
|
+
message: `Response Validation Warnings for application > Cart > updateCartWithSharedItems \n ${res_error}`,
|
|
2253
|
+
});
|
|
2254
|
+
}
|
|
2144
2255
|
}
|
|
2145
2256
|
|
|
2146
2257
|
return response;
|
|
@@ -2261,10 +2372,14 @@ class Cart {
|
|
|
2261
2372
|
});
|
|
2262
2373
|
|
|
2263
2374
|
if (res_error) {
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2375
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2376
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2377
|
+
} else {
|
|
2378
|
+
Logger({
|
|
2379
|
+
level: "WARN",
|
|
2380
|
+
message: `Response Validation Warnings for application > Cart > validateCouponForPayment \n ${res_error}`,
|
|
2381
|
+
});
|
|
2382
|
+
}
|
|
2268
2383
|
}
|
|
2269
2384
|
|
|
2270
2385
|
return response;
|