@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.
Files changed (85) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationConfig.d.ts +11 -3
  4. package/sdk/application/ApplicationConfig.js +21 -3
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
  6. package/sdk/application/Cart/CartApplicationClient.js +232 -116
  7. package/sdk/application/Cart/CartApplicationValidator.d.ts +2 -0
  8. package/sdk/application/Cart/CartApplicationValidator.js +2 -0
  9. package/sdk/application/Catalog/CatalogApplicationClient.js +244 -121
  10. package/sdk/application/Common/CommonApplicationClient.js +20 -9
  11. package/sdk/application/Communication/CommunicationApplicationClient.js +28 -13
  12. package/sdk/application/Configuration/ConfigurationApplicationClient.js +132 -65
  13. package/sdk/application/Content/ContentApplicationClient.js +156 -77
  14. package/sdk/application/FileStorage/FileStorageApplicationClient.js +28 -13
  15. package/sdk/application/Lead/LeadApplicationClient.js +60 -29
  16. package/sdk/application/Logistic/LogisticApplicationClient.js +44 -21
  17. package/sdk/application/Order/OrderApplicationClient.js +100 -49
  18. package/sdk/application/Payment/PaymentApplicationClient.js +340 -169
  19. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +1 -1
  20. package/sdk/application/PosCart/PosCartApplicationClient.js +224 -112
  21. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +2 -0
  22. package/sdk/application/PosCart/PosCartApplicationValidator.js +2 -0
  23. package/sdk/application/Rewards/RewardsApplicationClient.js +60 -29
  24. package/sdk/application/Share/ShareApplicationClient.js +60 -29
  25. package/sdk/application/Theme/ThemeApplicationClient.js +36 -17
  26. package/sdk/application/User/UserApplicationClient.js +324 -161
  27. package/sdk/common/FDKError.d.ts +4 -0
  28. package/sdk/common/FDKError.js +9 -0
  29. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +16 -40
  30. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +160 -38
  31. package/sdk/partner/PartnerConfig.d.ts +10 -0
  32. package/sdk/partner/PartnerConfig.js +10 -1
  33. package/sdk/partner/Theme/ThemePartnerClient.d.ts +96 -199
  34. package/sdk/partner/Theme/ThemePartnerClient.js +935 -170
  35. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +36 -17
  36. package/sdk/platform/Billing/BillingPlatformClient.js +140 -69
  37. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
  38. package/sdk/platform/Cart/CartPlatformApplicationClient.js +460 -229
  39. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +2 -0
  40. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +2 -0
  41. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +512 -256
  42. package/sdk/platform/Catalog/CatalogPlatformClient.js +620 -309
  43. package/sdk/platform/Common/CommonPlatformClient.js +20 -9
  44. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +472 -236
  45. package/sdk/platform/Communication/CommunicationPlatformClient.js +12 -5
  46. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +14 -1
  47. package/sdk/platform/Communication/CommunicationPlatformModel.js +16 -0
  48. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +116 -57
  49. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +256 -128
  50. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +148 -73
  51. package/sdk/platform/Content/ContentPlatformApplicationClient.js +552 -276
  52. package/sdk/platform/Discount/DiscountPlatformClient.js +92 -45
  53. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +88 -44
  54. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +52 -25
  55. package/sdk/platform/Finance/FinancePlatformClient.js +196 -97
  56. package/sdk/platform/Inventory/InventoryPlatformClient.js +100 -49
  57. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +104 -52
  58. package/sdk/platform/Lead/LeadPlatformClient.js +92 -45
  59. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +26 -0
  60. package/sdk/platform/Order/OrderPlatformApplicationClient.js +239 -5
  61. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +57 -1
  62. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +55 -0
  63. package/sdk/platform/Order/OrderPlatformClient.d.ts +0 -10
  64. package/sdk/platform/Order/OrderPlatformClient.js +356 -254
  65. package/sdk/platform/Order/OrderPlatformValidator.d.ts +1 -20
  66. package/sdk/platform/Order/OrderPlatformValidator.js +0 -15
  67. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +16 -8
  68. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +336 -168
  69. package/sdk/platform/Payment/PaymentPlatformClient.js +84 -41
  70. package/sdk/platform/PlatformConfig.d.ts +10 -0
  71. package/sdk/platform/PlatformConfig.js +10 -1
  72. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +96 -48
  73. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +112 -56
  74. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +148 -73
  75. package/sdk/platform/Share/SharePlatformApplicationClient.js +40 -20
  76. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +224 -112
  77. package/sdk/platform/Theme/ThemePlatformClient.js +28 -13
  78. package/sdk/platform/User/UserPlatformApplicationClient.js +144 -72
  79. package/sdk/platform/Webhook/WebhookPlatformClient.js +132 -65
  80. package/sdk/public/Configuration/ConfigurationPublicClient.js +20 -9
  81. package/sdk/public/Inventory/InventoryPublicClient.js +52 -25
  82. package/sdk/public/Partner/PartnerPublicClient.js +12 -5
  83. package/sdk/public/PublicConfig.d.ts +11 -1
  84. package/sdk/public/PublicConfig.js +10 -1
  85. package/sdk/public/Webhook/WebhookPublicClient.js +20 -9
@@ -76,10 +76,14 @@ class Cart {
76
76
  });
77
77
 
78
78
  if (res_error) {
79
- Logger({
80
- level: "WARN",
81
- message: `Response Validation Warnnings for platform > Cart > addAddress \n ${res_error}`,
82
- });
79
+ if (this.config.options.strictResponseCheck === true) {
80
+ return Promise.reject(new FDKResponseValidationError(res_error));
81
+ } else {
82
+ Logger({
83
+ level: "WARN",
84
+ message: `Response Validation Warnings for platform > Cart > addAddress \n ${res_error}`,
85
+ });
86
+ }
83
87
  }
84
88
 
85
89
  return response;
@@ -154,10 +158,14 @@ class Cart {
154
158
  });
155
159
 
156
160
  if (res_error) {
157
- Logger({
158
- level: "WARN",
159
- message: `Response Validation Warnnings for platform > Cart > addItems \n ${res_error}`,
160
- });
161
+ if (this.config.options.strictResponseCheck === true) {
162
+ return Promise.reject(new FDKResponseValidationError(res_error));
163
+ } else {
164
+ Logger({
165
+ level: "WARN",
166
+ message: `Response Validation Warnings for platform > Cart > addItems \n ${res_error}`,
167
+ });
168
+ }
161
169
  }
162
170
 
163
171
  return response;
@@ -229,10 +237,14 @@ class Cart {
229
237
  });
230
238
 
231
239
  if (res_error) {
232
- Logger({
233
- level: "WARN",
234
- message: `Response Validation Warnnings for platform > Cart > addPriceAdjustment \n ${res_error}`,
235
- });
240
+ if (this.config.options.strictResponseCheck === true) {
241
+ return Promise.reject(new FDKResponseValidationError(res_error));
242
+ } else {
243
+ Logger({
244
+ level: "WARN",
245
+ message: `Response Validation Warnings for platform > Cart > addPriceAdjustment \n ${res_error}`,
246
+ });
247
+ }
236
248
  }
237
249
 
238
250
  return response;
@@ -317,10 +329,14 @@ class Cart {
317
329
  });
318
330
 
319
331
  if (res_error) {
320
- Logger({
321
- level: "WARN",
322
- message: `Response Validation Warnnings for platform > Cart > applyCoupon \n ${res_error}`,
323
- });
332
+ if (this.config.options.strictResponseCheck === true) {
333
+ return Promise.reject(new FDKResponseValidationError(res_error));
334
+ } else {
335
+ Logger({
336
+ level: "WARN",
337
+ message: `Response Validation Warnings for platform > Cart > applyCoupon \n ${res_error}`,
338
+ });
339
+ }
324
340
  }
325
341
 
326
342
  return response;
@@ -396,10 +412,14 @@ class Cart {
396
412
  );
397
413
 
398
414
  if (res_error) {
399
- Logger({
400
- level: "WARN",
401
- message: `Response Validation Warnnings for platform > Cart > checkCartServiceability \n ${res_error}`,
402
- });
415
+ if (this.config.options.strictResponseCheck === true) {
416
+ return Promise.reject(new FDKResponseValidationError(res_error));
417
+ } else {
418
+ Logger({
419
+ level: "WARN",
420
+ message: `Response Validation Warnings for platform > Cart > checkCartServiceability \n ${res_error}`,
421
+ });
422
+ }
403
423
  }
404
424
 
405
425
  return response;
@@ -469,10 +489,14 @@ class Cart {
469
489
  });
470
490
 
471
491
  if (res_error) {
472
- Logger({
473
- level: "WARN",
474
- message: `Response Validation Warnnings for platform > Cart > checkoutCart \n ${res_error}`,
475
- });
492
+ if (this.config.options.strictResponseCheck === true) {
493
+ return Promise.reject(new FDKResponseValidationError(res_error));
494
+ } else {
495
+ Logger({
496
+ level: "WARN",
497
+ message: `Response Validation Warnings for platform > Cart > checkoutCart \n ${res_error}`,
498
+ });
499
+ }
476
500
  }
477
501
 
478
502
  return response;
@@ -546,10 +570,14 @@ class Cart {
546
570
  });
547
571
 
548
572
  if (res_error) {
549
- Logger({
550
- level: "WARN",
551
- message: `Response Validation Warnnings for platform > Cart > createCartMetaConfig \n ${res_error}`,
552
- });
573
+ if (this.config.options.strictResponseCheck === true) {
574
+ return Promise.reject(new FDKResponseValidationError(res_error));
575
+ } else {
576
+ Logger({
577
+ level: "WARN",
578
+ message: `Response Validation Warnings for platform > Cart > createCartMetaConfig \n ${res_error}`,
579
+ });
580
+ }
553
581
  }
554
582
 
555
583
  return response;
@@ -619,10 +647,14 @@ class Cart {
619
647
  });
620
648
 
621
649
  if (res_error) {
622
- Logger({
623
- level: "WARN",
624
- message: `Response Validation Warnnings for platform > Cart > createCoupon \n ${res_error}`,
625
- });
650
+ if (this.config.options.strictResponseCheck === true) {
651
+ return Promise.reject(new FDKResponseValidationError(res_error));
652
+ } else {
653
+ Logger({
654
+ level: "WARN",
655
+ message: `Response Validation Warnings for platform > Cart > createCoupon \n ${res_error}`,
656
+ });
657
+ }
626
658
  }
627
659
 
628
660
  return response;
@@ -694,10 +726,14 @@ class Cart {
694
726
  });
695
727
 
696
728
  if (res_error) {
697
- Logger({
698
- level: "WARN",
699
- message: `Response Validation Warnnings for platform > Cart > createPromotion \n ${res_error}`,
700
- });
729
+ if (this.config.options.strictResponseCheck === true) {
730
+ return Promise.reject(new FDKResponseValidationError(res_error));
731
+ } else {
732
+ Logger({
733
+ level: "WARN",
734
+ message: `Response Validation Warnings for platform > Cart > createPromotion \n ${res_error}`,
735
+ });
736
+ }
701
737
  }
702
738
 
703
739
  return response;
@@ -770,10 +806,14 @@ class Cart {
770
806
  });
771
807
 
772
808
  if (res_error) {
773
- Logger({
774
- level: "WARN",
775
- message: `Response Validation Warnnings for platform > Cart > deleteCart \n ${res_error}`,
776
- });
809
+ if (this.config.options.strictResponseCheck === true) {
810
+ return Promise.reject(new FDKResponseValidationError(res_error));
811
+ } else {
812
+ Logger({
813
+ level: "WARN",
814
+ message: `Response Validation Warnings for platform > Cart > deleteCart \n ${res_error}`,
815
+ });
816
+ }
777
817
  }
778
818
 
779
819
  return response;
@@ -847,10 +887,14 @@ class Cart {
847
887
  });
848
888
 
849
889
  if (res_error) {
850
- Logger({
851
- level: "WARN",
852
- message: `Response Validation Warnnings for platform > Cart > fetchAndvalidateCartItems \n ${res_error}`,
853
- });
890
+ if (this.config.options.strictResponseCheck === true) {
891
+ return Promise.reject(new FDKResponseValidationError(res_error));
892
+ } else {
893
+ Logger({
894
+ level: "WARN",
895
+ message: `Response Validation Warnings for platform > Cart > fetchAndvalidateCartItems \n ${res_error}`,
896
+ });
897
+ }
854
898
  }
855
899
 
856
900
  return response;
@@ -918,10 +962,14 @@ class Cart {
918
962
  });
919
963
 
920
964
  if (res_error) {
921
- Logger({
922
- level: "WARN",
923
- message: `Response Validation Warnnings for platform > Cart > fetchCartMetaConfig \n ${res_error}`,
924
- });
965
+ if (this.config.options.strictResponseCheck === true) {
966
+ return Promise.reject(new FDKResponseValidationError(res_error));
967
+ } else {
968
+ Logger({
969
+ level: "WARN",
970
+ message: `Response Validation Warnings for platform > Cart > fetchCartMetaConfig \n ${res_error}`,
971
+ });
972
+ }
925
973
  }
926
974
 
927
975
  return response;
@@ -1021,10 +1069,14 @@ class Cart {
1021
1069
  });
1022
1070
 
1023
1071
  if (res_error) {
1024
- Logger({
1025
- level: "WARN",
1026
- message: `Response Validation Warnnings for platform > Cart > getAbandonedCart \n ${res_error}`,
1027
- });
1072
+ if (this.config.options.strictResponseCheck === true) {
1073
+ return Promise.reject(new FDKResponseValidationError(res_error));
1074
+ } else {
1075
+ Logger({
1076
+ level: "WARN",
1077
+ message: `Response Validation Warnings for platform > Cart > getAbandonedCart \n ${res_error}`,
1078
+ });
1079
+ }
1028
1080
  }
1029
1081
 
1030
1082
  return response;
@@ -1092,7 +1144,7 @@ class Cart {
1092
1144
  * @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/platform/cart/getAbandonedCartDetails/).
1093
1145
  */
1094
1146
  async getAbandonedCartDetails(
1095
- { id, i, b, requestHeaders } = { requestHeaders: {} },
1147
+ { id, i, b, c, requestHeaders } = { requestHeaders: {} },
1096
1148
  { responseHeaders } = { responseHeaders: false }
1097
1149
  ) {
1098
1150
  const {
@@ -1102,6 +1154,7 @@ class Cart {
1102
1154
  id,
1103
1155
  i,
1104
1156
  b,
1157
+ c,
1105
1158
  },
1106
1159
  { abortEarly: false, allowUnknown: true }
1107
1160
  );
@@ -1117,6 +1170,7 @@ class Cart {
1117
1170
  id,
1118
1171
  i,
1119
1172
  b,
1173
+ c,
1120
1174
  },
1121
1175
  { abortEarly: false, allowUnknown: false }
1122
1176
  );
@@ -1131,6 +1185,7 @@ class Cart {
1131
1185
  query_params["id"] = id;
1132
1186
  query_params["i"] = i;
1133
1187
  query_params["b"] = b;
1188
+ query_params["c"] = c;
1134
1189
 
1135
1190
  const response = await PlatformAPIClient.execute(
1136
1191
  this.config,
@@ -1155,10 +1210,14 @@ class Cart {
1155
1210
  });
1156
1211
 
1157
1212
  if (res_error) {
1158
- Logger({
1159
- level: "WARN",
1160
- message: `Response Validation Warnnings for platform > Cart > getAbandonedCartDetails \n ${res_error}`,
1161
- });
1213
+ if (this.config.options.strictResponseCheck === true) {
1214
+ return Promise.reject(new FDKResponseValidationError(res_error));
1215
+ } else {
1216
+ Logger({
1217
+ level: "WARN",
1218
+ message: `Response Validation Warnings for platform > Cart > getAbandonedCartDetails \n ${res_error}`,
1219
+ });
1220
+ }
1162
1221
  }
1163
1222
 
1164
1223
  return response;
@@ -1261,10 +1320,14 @@ class Cart {
1261
1320
  });
1262
1321
 
1263
1322
  if (res_error) {
1264
- Logger({
1265
- level: "WARN",
1266
- message: `Response Validation Warnnings for platform > Cart > getAddressById \n ${res_error}`,
1267
- });
1323
+ if (this.config.options.strictResponseCheck === true) {
1324
+ return Promise.reject(new FDKResponseValidationError(res_error));
1325
+ } else {
1326
+ Logger({
1327
+ level: "WARN",
1328
+ message: `Response Validation Warnings for platform > Cart > getAddressById \n ${res_error}`,
1329
+ });
1330
+ }
1268
1331
  }
1269
1332
 
1270
1333
  return response;
@@ -1363,10 +1426,14 @@ class Cart {
1363
1426
  );
1364
1427
 
1365
1428
  if (res_error) {
1366
- Logger({
1367
- level: "WARN",
1368
- message: `Response Validation Warnnings for platform > Cart > getAddresses \n ${res_error}`,
1369
- });
1429
+ if (this.config.options.strictResponseCheck === true) {
1430
+ return Promise.reject(new FDKResponseValidationError(res_error));
1431
+ } else {
1432
+ Logger({
1433
+ level: "WARN",
1434
+ message: `Response Validation Warnings for platform > Cart > getAddresses \n ${res_error}`,
1435
+ });
1436
+ }
1370
1437
  }
1371
1438
 
1372
1439
  return response;
@@ -1440,10 +1507,14 @@ class Cart {
1440
1507
  });
1441
1508
 
1442
1509
  if (res_error) {
1443
- Logger({
1444
- level: "WARN",
1445
- message: `Response Validation Warnnings for platform > Cart > getAppCoupons \n ${res_error}`,
1446
- });
1510
+ if (this.config.options.strictResponseCheck === true) {
1511
+ return Promise.reject(new FDKResponseValidationError(res_error));
1512
+ } else {
1513
+ Logger({
1514
+ level: "WARN",
1515
+ message: `Response Validation Warnings for platform > Cart > getAppCoupons \n ${res_error}`,
1516
+ });
1517
+ }
1447
1518
  }
1448
1519
 
1449
1520
  return response;
@@ -1521,10 +1592,14 @@ class Cart {
1521
1592
  });
1522
1593
 
1523
1594
  if (res_error) {
1524
- Logger({
1525
- level: "WARN",
1526
- message: `Response Validation Warnnings for platform > Cart > getAvailableDeliveryModes \n ${res_error}`,
1527
- });
1595
+ if (this.config.options.strictResponseCheck === true) {
1596
+ return Promise.reject(new FDKResponseValidationError(res_error));
1597
+ } else {
1598
+ Logger({
1599
+ level: "WARN",
1600
+ message: `Response Validation Warnings for platform > Cart > getAvailableDeliveryModes \n ${res_error}`,
1601
+ });
1602
+ }
1528
1603
  }
1529
1604
 
1530
1605
  return response;
@@ -1612,10 +1687,14 @@ class Cart {
1612
1687
  });
1613
1688
 
1614
1689
  if (res_error) {
1615
- Logger({
1616
- level: "WARN",
1617
- message: `Response Validation Warnnings for platform > Cart > getCart \n ${res_error}`,
1618
- });
1690
+ if (this.config.options.strictResponseCheck === true) {
1691
+ return Promise.reject(new FDKResponseValidationError(res_error));
1692
+ } else {
1693
+ Logger({
1694
+ level: "WARN",
1695
+ message: `Response Validation Warnings for platform > Cart > getCart \n ${res_error}`,
1696
+ });
1697
+ }
1619
1698
  }
1620
1699
 
1621
1700
  return response;
@@ -1692,10 +1771,14 @@ class Cart {
1692
1771
  });
1693
1772
 
1694
1773
  if (res_error) {
1695
- Logger({
1696
- level: "WARN",
1697
- message: `Response Validation Warnnings for platform > Cart > getCartList \n ${res_error}`,
1698
- });
1774
+ if (this.config.options.strictResponseCheck === true) {
1775
+ return Promise.reject(new FDKResponseValidationError(res_error));
1776
+ } else {
1777
+ Logger({
1778
+ level: "WARN",
1779
+ message: `Response Validation Warnings for platform > Cart > getCartList \n ${res_error}`,
1780
+ });
1781
+ }
1699
1782
  }
1700
1783
 
1701
1784
  return response;
@@ -1767,10 +1850,14 @@ class Cart {
1767
1850
  });
1768
1851
 
1769
1852
  if (res_error) {
1770
- Logger({
1771
- level: "WARN",
1772
- message: `Response Validation Warnnings for platform > Cart > getCartShareLink \n ${res_error}`,
1773
- });
1853
+ if (this.config.options.strictResponseCheck === true) {
1854
+ return Promise.reject(new FDKResponseValidationError(res_error));
1855
+ } else {
1856
+ Logger({
1857
+ level: "WARN",
1858
+ message: `Response Validation Warnings for platform > Cart > getCartShareLink \n ${res_error}`,
1859
+ });
1860
+ }
1774
1861
  }
1775
1862
 
1776
1863
  return response;
@@ -1842,10 +1929,14 @@ class Cart {
1842
1929
  });
1843
1930
 
1844
1931
  if (res_error) {
1845
- Logger({
1846
- level: "WARN",
1847
- message: `Response Validation Warnnings for platform > Cart > getCartSharedItems \n ${res_error}`,
1848
- });
1932
+ if (this.config.options.strictResponseCheck === true) {
1933
+ return Promise.reject(new FDKResponseValidationError(res_error));
1934
+ } else {
1935
+ Logger({
1936
+ level: "WARN",
1937
+ message: `Response Validation Warnings for platform > Cart > getCartSharedItems \n ${res_error}`,
1938
+ });
1939
+ }
1849
1940
  }
1850
1941
 
1851
1942
  return response;
@@ -1915,10 +2006,14 @@ class Cart {
1915
2006
  });
1916
2007
 
1917
2008
  if (res_error) {
1918
- Logger({
1919
- level: "WARN",
1920
- message: `Response Validation Warnnings for platform > Cart > getCouponById \n ${res_error}`,
1921
- });
2009
+ if (this.config.options.strictResponseCheck === true) {
2010
+ return Promise.reject(new FDKResponseValidationError(res_error));
2011
+ } else {
2012
+ Logger({
2013
+ level: "WARN",
2014
+ message: `Response Validation Warnings for platform > Cart > getCouponById \n ${res_error}`,
2015
+ });
2016
+ }
1922
2017
  }
1923
2018
 
1924
2019
  return response;
@@ -1989,10 +2084,14 @@ class Cart {
1989
2084
  });
1990
2085
 
1991
2086
  if (res_error) {
1992
- Logger({
1993
- level: "WARN",
1994
- message: `Response Validation Warnnings for platform > Cart > getCouponCodeExists \n ${res_error}`,
1995
- });
2087
+ if (this.config.options.strictResponseCheck === true) {
2088
+ return Promise.reject(new FDKResponseValidationError(res_error));
2089
+ } else {
2090
+ Logger({
2091
+ level: "WARN",
2092
+ message: `Response Validation Warnings for platform > Cart > getCouponCodeExists \n ${res_error}`,
2093
+ });
2094
+ }
1996
2095
  }
1997
2096
 
1998
2097
  return response;
@@ -2060,10 +2159,14 @@ class Cart {
2060
2159
  });
2061
2160
 
2062
2161
  if (res_error) {
2063
- Logger({
2064
- level: "WARN",
2065
- message: `Response Validation Warnnings for platform > Cart > getCouponOptionValues \n ${res_error}`,
2066
- });
2162
+ if (this.config.options.strictResponseCheck === true) {
2163
+ return Promise.reject(new FDKResponseValidationError(res_error));
2164
+ } else {
2165
+ Logger({
2166
+ level: "WARN",
2167
+ message: `Response Validation Warnings for platform > Cart > getCouponOptionValues \n ${res_error}`,
2168
+ });
2169
+ }
2067
2170
  }
2068
2171
 
2069
2172
  return response;
@@ -2165,10 +2268,14 @@ class Cart {
2165
2268
  });
2166
2269
 
2167
2270
  if (res_error) {
2168
- Logger({
2169
- level: "WARN",
2170
- message: `Response Validation Warnnings for platform > Cart > getCoupons \n ${res_error}`,
2171
- });
2271
+ if (this.config.options.strictResponseCheck === true) {
2272
+ return Promise.reject(new FDKResponseValidationError(res_error));
2273
+ } else {
2274
+ Logger({
2275
+ level: "WARN",
2276
+ message: `Response Validation Warnings for platform > Cart > getCoupons \n ${res_error}`,
2277
+ });
2278
+ }
2172
2279
  }
2173
2280
 
2174
2281
  return response;
@@ -2295,10 +2402,14 @@ class Cart {
2295
2402
  });
2296
2403
 
2297
2404
  if (res_error) {
2298
- Logger({
2299
- level: "WARN",
2300
- message: `Response Validation Warnnings for platform > Cart > getItemCount \n ${res_error}`,
2301
- });
2405
+ if (this.config.options.strictResponseCheck === true) {
2406
+ return Promise.reject(new FDKResponseValidationError(res_error));
2407
+ } else {
2408
+ Logger({
2409
+ level: "WARN",
2410
+ message: `Response Validation Warnings for platform > Cart > getItemCount \n ${res_error}`,
2411
+ });
2412
+ }
2302
2413
  }
2303
2414
 
2304
2415
  return response;
@@ -2376,10 +2487,14 @@ class Cart {
2376
2487
  });
2377
2488
 
2378
2489
  if (res_error) {
2379
- Logger({
2380
- level: "WARN",
2381
- message: `Response Validation Warnnings for platform > Cart > getPromosCouponConfig \n ${res_error}`,
2382
- });
2490
+ if (this.config.options.strictResponseCheck === true) {
2491
+ return Promise.reject(new FDKResponseValidationError(res_error));
2492
+ } else {
2493
+ Logger({
2494
+ level: "WARN",
2495
+ message: `Response Validation Warnings for platform > Cart > getPromosCouponConfig \n ${res_error}`,
2496
+ });
2497
+ }
2383
2498
  }
2384
2499
 
2385
2500
  return response;
@@ -2451,10 +2566,14 @@ class Cart {
2451
2566
  });
2452
2567
 
2453
2568
  if (res_error) {
2454
- Logger({
2455
- level: "WARN",
2456
- message: `Response Validation Warnnings for platform > Cart > getPromotionById \n ${res_error}`,
2457
- });
2569
+ if (this.config.options.strictResponseCheck === true) {
2570
+ return Promise.reject(new FDKResponseValidationError(res_error));
2571
+ } else {
2572
+ Logger({
2573
+ level: "WARN",
2574
+ message: `Response Validation Warnings for platform > Cart > getPromotionById \n ${res_error}`,
2575
+ });
2576
+ }
2458
2577
  }
2459
2578
 
2460
2579
  return response;
@@ -2527,10 +2646,14 @@ class Cart {
2527
2646
  });
2528
2647
 
2529
2648
  if (res_error) {
2530
- Logger({
2531
- level: "WARN",
2532
- message: `Response Validation Warnnings for platform > Cart > getPromotionCodeExists \n ${res_error}`,
2533
- });
2649
+ if (this.config.options.strictResponseCheck === true) {
2650
+ return Promise.reject(new FDKResponseValidationError(res_error));
2651
+ } else {
2652
+ Logger({
2653
+ level: "WARN",
2654
+ message: `Response Validation Warnings for platform > Cart > getPromotionCodeExists \n ${res_error}`,
2655
+ });
2656
+ }
2534
2657
  }
2535
2658
 
2536
2659
  return response;
@@ -2632,10 +2755,14 @@ class Cart {
2632
2755
  });
2633
2756
 
2634
2757
  if (res_error) {
2635
- Logger({
2636
- level: "WARN",
2637
- message: `Response Validation Warnnings for platform > Cart > getPromotions \n ${res_error}`,
2638
- });
2758
+ if (this.config.options.strictResponseCheck === true) {
2759
+ return Promise.reject(new FDKResponseValidationError(res_error));
2760
+ } else {
2761
+ Logger({
2762
+ level: "WARN",
2763
+ message: `Response Validation Warnings for platform > Cart > getPromotions \n ${res_error}`,
2764
+ });
2765
+ }
2639
2766
  }
2640
2767
 
2641
2768
  return response;
@@ -2791,10 +2918,14 @@ class Cart {
2791
2918
  );
2792
2919
 
2793
2920
  if (res_error) {
2794
- Logger({
2795
- level: "WARN",
2796
- message: `Response Validation Warnnings for platform > Cart > getShipments \n ${res_error}`,
2797
- });
2921
+ if (this.config.options.strictResponseCheck === true) {
2922
+ return Promise.reject(new FDKResponseValidationError(res_error));
2923
+ } else {
2924
+ Logger({
2925
+ level: "WARN",
2926
+ message: `Response Validation Warnings for platform > Cart > getShipments \n ${res_error}`,
2927
+ });
2928
+ }
2798
2929
  }
2799
2930
 
2800
2931
  return response;
@@ -2869,10 +3000,14 @@ class Cart {
2869
3000
  });
2870
3001
 
2871
3002
  if (res_error) {
2872
- Logger({
2873
- level: "WARN",
2874
- message: `Response Validation Warnnings for platform > Cart > getStoreAddressByUid \n ${res_error}`,
2875
- });
3003
+ if (this.config.options.strictResponseCheck === true) {
3004
+ return Promise.reject(new FDKResponseValidationError(res_error));
3005
+ } else {
3006
+ Logger({
3007
+ level: "WARN",
3008
+ message: `Response Validation Warnings for platform > Cart > getStoreAddressByUid \n ${res_error}`,
3009
+ });
3010
+ }
2876
3011
  }
2877
3012
 
2878
3013
  return response;
@@ -2942,10 +3077,14 @@ class Cart {
2942
3077
  });
2943
3078
 
2944
3079
  if (res_error) {
2945
- Logger({
2946
- level: "WARN",
2947
- message: `Response Validation Warnnings for platform > Cart > overrideCart \n ${res_error}`,
2948
- });
3080
+ if (this.config.options.strictResponseCheck === true) {
3081
+ return Promise.reject(new FDKResponseValidationError(res_error));
3082
+ } else {
3083
+ Logger({
3084
+ level: "WARN",
3085
+ message: `Response Validation Warnings for platform > Cart > overrideCart \n ${res_error}`,
3086
+ });
3087
+ }
2949
3088
  }
2950
3089
 
2951
3090
  return response;
@@ -3029,10 +3168,14 @@ class Cart {
3029
3168
  });
3030
3169
 
3031
3170
  if (res_error) {
3032
- Logger({
3033
- level: "WARN",
3034
- message: `Response Validation Warnnings for platform > Cart > platformAddItems \n ${res_error}`,
3035
- });
3171
+ if (this.config.options.strictResponseCheck === true) {
3172
+ return Promise.reject(new FDKResponseValidationError(res_error));
3173
+ } else {
3174
+ Logger({
3175
+ level: "WARN",
3176
+ message: `Response Validation Warnings for platform > Cart > platformAddItems \n ${res_error}`,
3177
+ });
3178
+ }
3036
3179
  }
3037
3180
 
3038
3181
  return response;
@@ -3109,10 +3252,14 @@ class Cart {
3109
3252
  });
3110
3253
 
3111
3254
  if (res_error) {
3112
- Logger({
3113
- level: "WARN",
3114
- message: `Response Validation Warnnings for platform > Cart > platformCheckoutCart \n ${res_error}`,
3115
- });
3255
+ if (this.config.options.strictResponseCheck === true) {
3256
+ return Promise.reject(new FDKResponseValidationError(res_error));
3257
+ } else {
3258
+ Logger({
3259
+ level: "WARN",
3260
+ message: `Response Validation Warnings for platform > Cart > platformCheckoutCart \n ${res_error}`,
3261
+ });
3262
+ }
3116
3263
  }
3117
3264
 
3118
3265
  return response;
@@ -3189,10 +3336,14 @@ class Cart {
3189
3336
  });
3190
3337
 
3191
3338
  if (res_error) {
3192
- Logger({
3193
- level: "WARN",
3194
- message: `Response Validation Warnnings for platform > Cart > platformCheckoutCartV2 \n ${res_error}`,
3195
- });
3339
+ if (this.config.options.strictResponseCheck === true) {
3340
+ return Promise.reject(new FDKResponseValidationError(res_error));
3341
+ } else {
3342
+ Logger({
3343
+ level: "WARN",
3344
+ message: `Response Validation Warnings for platform > Cart > platformCheckoutCartV2 \n ${res_error}`,
3345
+ });
3346
+ }
3196
3347
  }
3197
3348
 
3198
3349
  return response;
@@ -3276,10 +3427,14 @@ class Cart {
3276
3427
  });
3277
3428
 
3278
3429
  if (res_error) {
3279
- Logger({
3280
- level: "WARN",
3281
- message: `Response Validation Warnnings for platform > Cart > platformUpdateCart \n ${res_error}`,
3282
- });
3430
+ if (this.config.options.strictResponseCheck === true) {
3431
+ return Promise.reject(new FDKResponseValidationError(res_error));
3432
+ } else {
3433
+ Logger({
3434
+ level: "WARN",
3435
+ message: `Response Validation Warnings for platform > Cart > platformUpdateCart \n ${res_error}`,
3436
+ });
3437
+ }
3283
3438
  }
3284
3439
 
3285
3440
  return response;
@@ -3352,10 +3507,14 @@ class Cart {
3352
3507
  });
3353
3508
 
3354
3509
  if (res_error) {
3355
- Logger({
3356
- level: "WARN",
3357
- message: `Response Validation Warnnings for platform > Cart > removeAddress \n ${res_error}`,
3358
- });
3510
+ if (this.config.options.strictResponseCheck === true) {
3511
+ return Promise.reject(new FDKResponseValidationError(res_error));
3512
+ } else {
3513
+ Logger({
3514
+ level: "WARN",
3515
+ message: `Response Validation Warnings for platform > Cart > removeAddress \n ${res_error}`,
3516
+ });
3517
+ }
3359
3518
  }
3360
3519
 
3361
3520
  return response;
@@ -3429,10 +3588,14 @@ class Cart {
3429
3588
  });
3430
3589
 
3431
3590
  if (res_error) {
3432
- Logger({
3433
- level: "WARN",
3434
- message: `Response Validation Warnnings for platform > Cart > removeCoupon \n ${res_error}`,
3435
- });
3591
+ if (this.config.options.strictResponseCheck === true) {
3592
+ return Promise.reject(new FDKResponseValidationError(res_error));
3593
+ } else {
3594
+ Logger({
3595
+ level: "WARN",
3596
+ message: `Response Validation Warnings for platform > Cart > removeCoupon \n ${res_error}`,
3597
+ });
3598
+ }
3436
3599
  }
3437
3600
 
3438
3601
  return response;
@@ -3506,10 +3669,14 @@ class Cart {
3506
3669
  });
3507
3670
 
3508
3671
  if (res_error) {
3509
- Logger({
3510
- level: "WARN",
3511
- message: `Response Validation Warnnings for platform > Cart > removePriceAdjustment \n ${res_error}`,
3512
- });
3672
+ if (this.config.options.strictResponseCheck === true) {
3673
+ return Promise.reject(new FDKResponseValidationError(res_error));
3674
+ } else {
3675
+ Logger({
3676
+ level: "WARN",
3677
+ message: `Response Validation Warnings for platform > Cart > removePriceAdjustment \n ${res_error}`,
3678
+ });
3679
+ }
3513
3680
  }
3514
3681
 
3515
3682
  return response;
@@ -3591,10 +3758,14 @@ class Cart {
3591
3758
  });
3592
3759
 
3593
3760
  if (res_error) {
3594
- Logger({
3595
- level: "WARN",
3596
- message: `Response Validation Warnnings for platform > Cart > selectAddress \n ${res_error}`,
3597
- });
3761
+ if (this.config.options.strictResponseCheck === true) {
3762
+ return Promise.reject(new FDKResponseValidationError(res_error));
3763
+ } else {
3764
+ Logger({
3765
+ level: "WARN",
3766
+ message: `Response Validation Warnings for platform > Cart > selectAddress \n ${res_error}`,
3767
+ });
3768
+ }
3598
3769
  }
3599
3770
 
3600
3771
  return response;
@@ -3675,10 +3846,14 @@ class Cart {
3675
3846
  });
3676
3847
 
3677
3848
  if (res_error) {
3678
- Logger({
3679
- level: "WARN",
3680
- message: `Response Validation Warnnings for platform > Cart > selectPaymentMode \n ${res_error}`,
3681
- });
3849
+ if (this.config.options.strictResponseCheck === true) {
3850
+ return Promise.reject(new FDKResponseValidationError(res_error));
3851
+ } else {
3852
+ Logger({
3853
+ level: "WARN",
3854
+ message: `Response Validation Warnings for platform > Cart > selectPaymentMode \n ${res_error}`,
3855
+ });
3856
+ }
3682
3857
  }
3683
3858
 
3684
3859
  return response;
@@ -3759,10 +3934,14 @@ class Cart {
3759
3934
  });
3760
3935
 
3761
3936
  if (res_error) {
3762
- Logger({
3763
- level: "WARN",
3764
- message: `Response Validation Warnnings for platform > Cart > selectPaymentModeV2 \n ${res_error}`,
3765
- });
3937
+ if (this.config.options.strictResponseCheck === true) {
3938
+ return Promise.reject(new FDKResponseValidationError(res_error));
3939
+ } else {
3940
+ Logger({
3941
+ level: "WARN",
3942
+ message: `Response Validation Warnings for platform > Cart > selectPaymentModeV2 \n ${res_error}`,
3943
+ });
3944
+ }
3766
3945
  }
3767
3946
 
3768
3947
  return response;
@@ -3834,10 +4013,14 @@ class Cart {
3834
4013
  });
3835
4014
 
3836
4015
  if (res_error) {
3837
- Logger({
3838
- level: "WARN",
3839
- message: `Response Validation Warnnings for platform > Cart > updateAddress \n ${res_error}`,
3840
- });
4016
+ if (this.config.options.strictResponseCheck === true) {
4017
+ return Promise.reject(new FDKResponseValidationError(res_error));
4018
+ } else {
4019
+ Logger({
4020
+ level: "WARN",
4021
+ message: `Response Validation Warnings for platform > Cart > updateAddress \n ${res_error}`,
4022
+ });
4023
+ }
3841
4024
  }
3842
4025
 
3843
4026
  return response;
@@ -3912,10 +4095,14 @@ class Cart {
3912
4095
  });
3913
4096
 
3914
4097
  if (res_error) {
3915
- Logger({
3916
- level: "WARN",
3917
- message: `Response Validation Warnnings for platform > Cart > updateCart \n ${res_error}`,
3918
- });
4098
+ if (this.config.options.strictResponseCheck === true) {
4099
+ return Promise.reject(new FDKResponseValidationError(res_error));
4100
+ } else {
4101
+ Logger({
4102
+ level: "WARN",
4103
+ message: `Response Validation Warnings for platform > Cart > updateCart \n ${res_error}`,
4104
+ });
4105
+ }
3919
4106
  }
3920
4107
 
3921
4108
  return response;
@@ -3993,10 +4180,14 @@ class Cart {
3993
4180
  });
3994
4181
 
3995
4182
  if (res_error) {
3996
- Logger({
3997
- level: "WARN",
3998
- message: `Response Validation Warnnings for platform > Cart > updateCartMeta \n ${res_error}`,
3999
- });
4183
+ if (this.config.options.strictResponseCheck === true) {
4184
+ return Promise.reject(new FDKResponseValidationError(res_error));
4185
+ } else {
4186
+ Logger({
4187
+ level: "WARN",
4188
+ message: `Response Validation Warnings for platform > Cart > updateCartMeta \n ${res_error}`,
4189
+ });
4190
+ }
4000
4191
  }
4001
4192
 
4002
4193
  return response;
@@ -4072,10 +4263,14 @@ class Cart {
4072
4263
  });
4073
4264
 
4074
4265
  if (res_error) {
4075
- Logger({
4076
- level: "WARN",
4077
- message: `Response Validation Warnnings for platform > Cart > updateCartMetaConfig \n ${res_error}`,
4078
- });
4266
+ if (this.config.options.strictResponseCheck === true) {
4267
+ return Promise.reject(new FDKResponseValidationError(res_error));
4268
+ } else {
4269
+ Logger({
4270
+ level: "WARN",
4271
+ message: `Response Validation Warnings for platform > Cart > updateCartMetaConfig \n ${res_error}`,
4272
+ });
4273
+ }
4079
4274
  }
4080
4275
 
4081
4276
  return response;
@@ -4150,10 +4345,14 @@ class Cart {
4150
4345
  });
4151
4346
 
4152
4347
  if (res_error) {
4153
- Logger({
4154
- level: "WARN",
4155
- message: `Response Validation Warnnings for platform > Cart > updateCartUser \n ${res_error}`,
4156
- });
4348
+ if (this.config.options.strictResponseCheck === true) {
4349
+ return Promise.reject(new FDKResponseValidationError(res_error));
4350
+ } else {
4351
+ Logger({
4352
+ level: "WARN",
4353
+ message: `Response Validation Warnings for platform > Cart > updateCartUser \n ${res_error}`,
4354
+ });
4355
+ }
4157
4356
  }
4158
4357
 
4159
4358
  return response;
@@ -4232,10 +4431,14 @@ class Cart {
4232
4431
  });
4233
4432
 
4234
4433
  if (res_error) {
4235
- Logger({
4236
- level: "WARN",
4237
- message: `Response Validation Warnnings for platform > Cart > updateCartWithSharedItems \n ${res_error}`,
4238
- });
4434
+ if (this.config.options.strictResponseCheck === true) {
4435
+ return Promise.reject(new FDKResponseValidationError(res_error));
4436
+ } else {
4437
+ Logger({
4438
+ level: "WARN",
4439
+ message: `Response Validation Warnings for platform > Cart > updateCartWithSharedItems \n ${res_error}`,
4440
+ });
4441
+ }
4239
4442
  }
4240
4443
 
4241
4444
  return response;
@@ -4307,10 +4510,14 @@ class Cart {
4307
4510
  });
4308
4511
 
4309
4512
  if (res_error) {
4310
- Logger({
4311
- level: "WARN",
4312
- message: `Response Validation Warnnings for platform > Cart > updateCoupon \n ${res_error}`,
4313
- });
4513
+ if (this.config.options.strictResponseCheck === true) {
4514
+ return Promise.reject(new FDKResponseValidationError(res_error));
4515
+ } else {
4516
+ Logger({
4517
+ level: "WARN",
4518
+ message: `Response Validation Warnings for platform > Cart > updateCoupon \n ${res_error}`,
4519
+ });
4520
+ }
4314
4521
  }
4315
4522
 
4316
4523
  return response;
@@ -4386,10 +4593,14 @@ class Cart {
4386
4593
  });
4387
4594
 
4388
4595
  if (res_error) {
4389
- Logger({
4390
- level: "WARN",
4391
- message: `Response Validation Warnnings for platform > Cart > updateCouponPartially \n ${res_error}`,
4392
- });
4596
+ if (this.config.options.strictResponseCheck === true) {
4597
+ return Promise.reject(new FDKResponseValidationError(res_error));
4598
+ } else {
4599
+ Logger({
4600
+ level: "WARN",
4601
+ message: `Response Validation Warnings for platform > Cart > updateCouponPartially \n ${res_error}`,
4602
+ });
4603
+ }
4393
4604
  }
4394
4605
 
4395
4606
  return response;
@@ -4465,10 +4676,14 @@ class Cart {
4465
4676
  });
4466
4677
 
4467
4678
  if (res_error) {
4468
- Logger({
4469
- level: "WARN",
4470
- message: `Response Validation Warnnings for platform > Cart > updatePriceAdjustment \n ${res_error}`,
4471
- });
4679
+ if (this.config.options.strictResponseCheck === true) {
4680
+ return Promise.reject(new FDKResponseValidationError(res_error));
4681
+ } else {
4682
+ Logger({
4683
+ level: "WARN",
4684
+ message: `Response Validation Warnings for platform > Cart > updatePriceAdjustment \n ${res_error}`,
4685
+ });
4686
+ }
4472
4687
  }
4473
4688
 
4474
4689
  return response;
@@ -4542,10 +4757,14 @@ class Cart {
4542
4757
  });
4543
4758
 
4544
4759
  if (res_error) {
4545
- Logger({
4546
- level: "WARN",
4547
- message: `Response Validation Warnnings for platform > Cart > updatePromotion \n ${res_error}`,
4548
- });
4760
+ if (this.config.options.strictResponseCheck === true) {
4761
+ return Promise.reject(new FDKResponseValidationError(res_error));
4762
+ } else {
4763
+ Logger({
4764
+ level: "WARN",
4765
+ message: `Response Validation Warnings for platform > Cart > updatePromotion \n ${res_error}`,
4766
+ });
4767
+ }
4549
4768
  }
4550
4769
 
4551
4770
  return response;
@@ -4621,10 +4840,14 @@ class Cart {
4621
4840
  });
4622
4841
 
4623
4842
  if (res_error) {
4624
- Logger({
4625
- level: "WARN",
4626
- message: `Response Validation Warnnings for platform > Cart > updatePromotionPartially \n ${res_error}`,
4627
- });
4843
+ if (this.config.options.strictResponseCheck === true) {
4844
+ return Promise.reject(new FDKResponseValidationError(res_error));
4845
+ } else {
4846
+ Logger({
4847
+ level: "WARN",
4848
+ message: `Response Validation Warnings for platform > Cart > updatePromotionPartially \n ${res_error}`,
4849
+ });
4850
+ }
4628
4851
  }
4629
4852
 
4630
4853
  return response;
@@ -4717,10 +4940,14 @@ class Cart {
4717
4940
  );
4718
4941
 
4719
4942
  if (res_error) {
4720
- Logger({
4721
- level: "WARN",
4722
- message: `Response Validation Warnnings for platform > Cart > updateShipments \n ${res_error}`,
4723
- });
4943
+ if (this.config.options.strictResponseCheck === true) {
4944
+ return Promise.reject(new FDKResponseValidationError(res_error));
4945
+ } else {
4946
+ Logger({
4947
+ level: "WARN",
4948
+ message: `Response Validation Warnings for platform > Cart > updateShipments \n ${res_error}`,
4949
+ });
4950
+ }
4724
4951
  }
4725
4952
 
4726
4953
  return response;
@@ -4822,10 +5049,14 @@ class Cart {
4822
5049
  });
4823
5050
 
4824
5051
  if (res_error) {
4825
- Logger({
4826
- level: "WARN",
4827
- message: `Response Validation Warnnings for platform > Cart > validateCouponForPayment \n ${res_error}`,
4828
- });
5052
+ if (this.config.options.strictResponseCheck === true) {
5053
+ return Promise.reject(new FDKResponseValidationError(res_error));
5054
+ } else {
5055
+ Logger({
5056
+ level: "WARN",
5057
+ message: `Response Validation Warnings for platform > Cart > validateCouponForPayment \n ${res_error}`,
5058
+ });
5059
+ }
4829
5060
  }
4830
5061
 
4831
5062
  return response;