@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.
Files changed (76) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/sdk/application/ApplicationConfig.d.ts +11 -3
  4. package/sdk/application/ApplicationConfig.js +21 -3
  5. package/sdk/application/Cart/CartApplicationClient.js +228 -113
  6. package/sdk/application/Catalog/CatalogApplicationClient.js +244 -121
  7. package/sdk/application/Common/CommonApplicationClient.js +20 -9
  8. package/sdk/application/Communication/CommunicationApplicationClient.js +28 -13
  9. package/sdk/application/Configuration/ConfigurationApplicationClient.js +132 -65
  10. package/sdk/application/Content/ContentApplicationClient.js +156 -77
  11. package/sdk/application/FileStorage/FileStorageApplicationClient.js +28 -13
  12. package/sdk/application/Lead/LeadApplicationClient.js +60 -29
  13. package/sdk/application/Logistic/LogisticApplicationClient.js +44 -21
  14. package/sdk/application/Order/OrderApplicationClient.js +100 -49
  15. package/sdk/application/Payment/PaymentApplicationClient.js +340 -169
  16. package/sdk/application/PosCart/PosCartApplicationClient.js +220 -109
  17. package/sdk/application/Rewards/RewardsApplicationClient.js +60 -29
  18. package/sdk/application/Share/ShareApplicationClient.js +60 -29
  19. package/sdk/application/Theme/ThemeApplicationClient.js +36 -17
  20. package/sdk/application/User/UserApplicationClient.js +324 -161
  21. package/sdk/common/AxiosHelper.js +3 -3
  22. package/sdk/common/FDKError.d.ts +4 -0
  23. package/sdk/common/FDKError.js +9 -0
  24. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +16 -40
  25. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +160 -38
  26. package/sdk/partner/PartnerConfig.d.ts +10 -0
  27. package/sdk/partner/PartnerConfig.js +10 -1
  28. package/sdk/partner/Theme/ThemePartnerClient.d.ts +96 -199
  29. package/sdk/partner/Theme/ThemePartnerClient.js +935 -170
  30. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +36 -17
  31. package/sdk/platform/Billing/BillingPlatformClient.js +140 -69
  32. package/sdk/platform/Cart/CartPlatformApplicationClient.js +456 -228
  33. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +512 -256
  34. package/sdk/platform/Catalog/CatalogPlatformClient.js +620 -309
  35. package/sdk/platform/Common/CommonPlatformClient.js +20 -9
  36. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +472 -236
  37. package/sdk/platform/Communication/CommunicationPlatformClient.js +12 -5
  38. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +14 -1
  39. package/sdk/platform/Communication/CommunicationPlatformModel.js +16 -0
  40. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +116 -57
  41. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +256 -128
  42. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +148 -73
  43. package/sdk/platform/Content/ContentPlatformApplicationClient.js +552 -276
  44. package/sdk/platform/Discount/DiscountPlatformClient.js +92 -45
  45. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +88 -44
  46. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +52 -25
  47. package/sdk/platform/Finance/FinancePlatformClient.js +196 -97
  48. package/sdk/platform/Inventory/InventoryPlatformClient.js +100 -49
  49. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +104 -52
  50. package/sdk/platform/Lead/LeadPlatformClient.js +92 -45
  51. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +26 -0
  52. package/sdk/platform/Order/OrderPlatformApplicationClient.js +239 -5
  53. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +57 -1
  54. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +55 -0
  55. package/sdk/platform/Order/OrderPlatformClient.js +356 -177
  56. package/sdk/platform/Order/OrderPlatformModel.d.ts +44 -5
  57. package/sdk/platform/Order/OrderPlatformModel.js +52 -4
  58. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +16 -8
  59. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +336 -168
  60. package/sdk/platform/Payment/PaymentPlatformClient.js +84 -41
  61. package/sdk/platform/PlatformConfig.d.ts +10 -0
  62. package/sdk/platform/PlatformConfig.js +10 -1
  63. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +96 -48
  64. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +112 -56
  65. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +148 -73
  66. package/sdk/platform/Share/SharePlatformApplicationClient.js +40 -20
  67. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +224 -112
  68. package/sdk/platform/Theme/ThemePlatformClient.js +28 -13
  69. package/sdk/platform/User/UserPlatformApplicationClient.js +144 -72
  70. package/sdk/platform/Webhook/WebhookPlatformClient.js +132 -65
  71. package/sdk/public/Configuration/ConfigurationPublicClient.js +20 -9
  72. package/sdk/public/Inventory/InventoryPublicClient.js +52 -25
  73. package/sdk/public/Partner/PartnerPublicClient.js +12 -5
  74. package/sdk/public/PublicConfig.d.ts +11 -1
  75. package/sdk/public/PublicConfig.js +10 -1
  76. package/sdk/public/Webhook/WebhookPublicClient.js +20 -9
@@ -80,10 +80,14 @@ class Communication {
80
80
  });
81
81
 
82
82
  if (res_error) {
83
- Logger({
84
- level: "WARN",
85
- message: `Response Validation Warnnings for platform > Communication > createAudience \n ${res_error}`,
86
- });
83
+ if (this.config.options.strictResponseCheck === true) {
84
+ return Promise.reject(new FDKResponseValidationError(res_error));
85
+ } else {
86
+ Logger({
87
+ level: "WARN",
88
+ message: `Response Validation Warnings for platform > Communication > createAudience \n ${res_error}`,
89
+ });
90
+ }
87
91
  }
88
92
 
89
93
  return response;
@@ -151,10 +155,14 @@ class Communication {
151
155
  });
152
156
 
153
157
  if (res_error) {
154
- Logger({
155
- level: "WARN",
156
- message: `Response Validation Warnnings for platform > Communication > createBigQueryHeaders \n ${res_error}`,
157
- });
158
+ if (this.config.options.strictResponseCheck === true) {
159
+ return Promise.reject(new FDKResponseValidationError(res_error));
160
+ } else {
161
+ Logger({
162
+ level: "WARN",
163
+ message: `Response Validation Warnings for platform > Communication > createBigQueryHeaders \n ${res_error}`,
164
+ });
165
+ }
158
166
  }
159
167
 
160
168
  return response;
@@ -222,10 +230,14 @@ class Communication {
222
230
  });
223
231
 
224
232
  if (res_error) {
225
- Logger({
226
- level: "WARN",
227
- message: `Response Validation Warnnings for platform > Communication > createBigQueryNCount \n ${res_error}`,
228
- });
233
+ if (this.config.options.strictResponseCheck === true) {
234
+ return Promise.reject(new FDKResponseValidationError(res_error));
235
+ } else {
236
+ Logger({
237
+ level: "WARN",
238
+ message: `Response Validation Warnings for platform > Communication > createBigQueryNCount \n ${res_error}`,
239
+ });
240
+ }
229
241
  }
230
242
 
231
243
  return response;
@@ -293,10 +305,14 @@ class Communication {
293
305
  });
294
306
 
295
307
  if (res_error) {
296
- Logger({
297
- level: "WARN",
298
- message: `Response Validation Warnnings for platform > Communication > createBigQueryRowCount \n ${res_error}`,
299
- });
308
+ if (this.config.options.strictResponseCheck === true) {
309
+ return Promise.reject(new FDKResponseValidationError(res_error));
310
+ } else {
311
+ Logger({
312
+ level: "WARN",
313
+ message: `Response Validation Warnings for platform > Communication > createBigQueryRowCount \n ${res_error}`,
314
+ });
315
+ }
300
316
  }
301
317
 
302
318
  return response;
@@ -370,10 +386,14 @@ class Communication {
370
386
  });
371
387
 
372
388
  if (res_error) {
373
- Logger({
374
- level: "WARN",
375
- message: `Response Validation Warnnings for platform > Communication > createCampaign \n ${res_error}`,
376
- });
389
+ if (this.config.options.strictResponseCheck === true) {
390
+ return Promise.reject(new FDKResponseValidationError(res_error));
391
+ } else {
392
+ Logger({
393
+ level: "WARN",
394
+ message: `Response Validation Warnings for platform > Communication > createCampaign \n ${res_error}`,
395
+ });
396
+ }
377
397
  }
378
398
 
379
399
  return response;
@@ -447,10 +467,14 @@ class Communication {
447
467
  });
448
468
 
449
469
  if (res_error) {
450
- Logger({
451
- level: "WARN",
452
- message: `Response Validation Warnnings for platform > Communication > createEmailProvider \n ${res_error}`,
453
- });
470
+ if (this.config.options.strictResponseCheck === true) {
471
+ return Promise.reject(new FDKResponseValidationError(res_error));
472
+ } else {
473
+ Logger({
474
+ level: "WARN",
475
+ message: `Response Validation Warnings for platform > Communication > createEmailProvider \n ${res_error}`,
476
+ });
477
+ }
454
478
  }
455
479
 
456
480
  return response;
@@ -524,10 +548,14 @@ class Communication {
524
548
  });
525
549
 
526
550
  if (res_error) {
527
- Logger({
528
- level: "WARN",
529
- message: `Response Validation Warnnings for platform > Communication > createEmailTemplate \n ${res_error}`,
530
- });
551
+ if (this.config.options.strictResponseCheck === true) {
552
+ return Promise.reject(new FDKResponseValidationError(res_error));
553
+ } else {
554
+ Logger({
555
+ level: "WARN",
556
+ message: `Response Validation Warnings for platform > Communication > createEmailTemplate \n ${res_error}`,
557
+ });
558
+ }
531
559
  }
532
560
 
533
561
  return response;
@@ -599,10 +627,14 @@ class Communication {
599
627
  });
600
628
 
601
629
  if (res_error) {
602
- Logger({
603
- level: "WARN",
604
- message: `Response Validation Warnnings for platform > Communication > createSmsProvider \n ${res_error}`,
605
- });
630
+ if (this.config.options.strictResponseCheck === true) {
631
+ return Promise.reject(new FDKResponseValidationError(res_error));
632
+ } else {
633
+ Logger({
634
+ level: "WARN",
635
+ message: `Response Validation Warnings for platform > Communication > createSmsProvider \n ${res_error}`,
636
+ });
637
+ }
606
638
  }
607
639
 
608
640
  return response;
@@ -676,10 +708,14 @@ class Communication {
676
708
  });
677
709
 
678
710
  if (res_error) {
679
- Logger({
680
- level: "WARN",
681
- message: `Response Validation Warnnings for platform > Communication > createSmsTemplate \n ${res_error}`,
682
- });
711
+ if (this.config.options.strictResponseCheck === true) {
712
+ return Promise.reject(new FDKResponseValidationError(res_error));
713
+ } else {
714
+ Logger({
715
+ level: "WARN",
716
+ message: `Response Validation Warnings for platform > Communication > createSmsTemplate \n ${res_error}`,
717
+ });
718
+ }
683
719
  }
684
720
 
685
721
  return response;
@@ -753,10 +789,14 @@ class Communication {
753
789
  });
754
790
 
755
791
  if (res_error) {
756
- Logger({
757
- level: "WARN",
758
- message: `Response Validation Warnnings for platform > Communication > deleteAudienceById \n ${res_error}`,
759
- });
792
+ if (this.config.options.strictResponseCheck === true) {
793
+ return Promise.reject(new FDKResponseValidationError(res_error));
794
+ } else {
795
+ Logger({
796
+ level: "WARN",
797
+ message: `Response Validation Warnings for platform > Communication > deleteAudienceById \n ${res_error}`,
798
+ });
799
+ }
760
800
  }
761
801
 
762
802
  return response;
@@ -830,10 +870,14 @@ class Communication {
830
870
  });
831
871
 
832
872
  if (res_error) {
833
- Logger({
834
- level: "WARN",
835
- message: `Response Validation Warnnings for platform > Communication > deleteEmailProviderById \n ${res_error}`,
836
- });
873
+ if (this.config.options.strictResponseCheck === true) {
874
+ return Promise.reject(new FDKResponseValidationError(res_error));
875
+ } else {
876
+ Logger({
877
+ level: "WARN",
878
+ message: `Response Validation Warnings for platform > Communication > deleteEmailProviderById \n ${res_error}`,
879
+ });
880
+ }
837
881
  }
838
882
 
839
883
  return response;
@@ -907,10 +951,14 @@ class Communication {
907
951
  });
908
952
 
909
953
  if (res_error) {
910
- Logger({
911
- level: "WARN",
912
- message: `Response Validation Warnnings for platform > Communication > deleteEmailTemplateById \n ${res_error}`,
913
- });
954
+ if (this.config.options.strictResponseCheck === true) {
955
+ return Promise.reject(new FDKResponseValidationError(res_error));
956
+ } else {
957
+ Logger({
958
+ level: "WARN",
959
+ message: `Response Validation Warnings for platform > Communication > deleteEmailTemplateById \n ${res_error}`,
960
+ });
961
+ }
914
962
  }
915
963
 
916
964
  return response;
@@ -984,10 +1032,14 @@ class Communication {
984
1032
  });
985
1033
 
986
1034
  if (res_error) {
987
- Logger({
988
- level: "WARN",
989
- message: `Response Validation Warnnings for platform > Communication > deleteSmsProviderById \n ${res_error}`,
990
- });
1035
+ if (this.config.options.strictResponseCheck === true) {
1036
+ return Promise.reject(new FDKResponseValidationError(res_error));
1037
+ } else {
1038
+ Logger({
1039
+ level: "WARN",
1040
+ message: `Response Validation Warnings for platform > Communication > deleteSmsProviderById \n ${res_error}`,
1041
+ });
1042
+ }
991
1043
  }
992
1044
 
993
1045
  return response;
@@ -1061,10 +1113,14 @@ class Communication {
1061
1113
  });
1062
1114
 
1063
1115
  if (res_error) {
1064
- Logger({
1065
- level: "WARN",
1066
- message: `Response Validation Warnnings for platform > Communication > deleteSmsTemplateById \n ${res_error}`,
1067
- });
1116
+ if (this.config.options.strictResponseCheck === true) {
1117
+ return Promise.reject(new FDKResponseValidationError(res_error));
1118
+ } else {
1119
+ Logger({
1120
+ level: "WARN",
1121
+ message: `Response Validation Warnings for platform > Communication > deleteSmsTemplateById \n ${res_error}`,
1122
+ });
1123
+ }
1068
1124
  }
1069
1125
 
1070
1126
  return response;
@@ -1134,10 +1190,14 @@ class Communication {
1134
1190
  });
1135
1191
 
1136
1192
  if (res_error) {
1137
- Logger({
1138
- level: "WARN",
1139
- message: `Response Validation Warnnings for platform > Communication > getAppProviders \n ${res_error}`,
1140
- });
1193
+ if (this.config.options.strictResponseCheck === true) {
1194
+ return Promise.reject(new FDKResponseValidationError(res_error));
1195
+ } else {
1196
+ Logger({
1197
+ level: "WARN",
1198
+ message: `Response Validation Warnings for platform > Communication > getAppProviders \n ${res_error}`,
1199
+ });
1200
+ }
1141
1201
  }
1142
1202
 
1143
1203
  return response;
@@ -1211,10 +1271,14 @@ class Communication {
1211
1271
  });
1212
1272
 
1213
1273
  if (res_error) {
1214
- Logger({
1215
- level: "WARN",
1216
- message: `Response Validation Warnnings for platform > Communication > getAudienceById \n ${res_error}`,
1217
- });
1274
+ if (this.config.options.strictResponseCheck === true) {
1275
+ return Promise.reject(new FDKResponseValidationError(res_error));
1276
+ } else {
1277
+ Logger({
1278
+ level: "WARN",
1279
+ message: `Response Validation Warnings for platform > Communication > getAudienceById \n ${res_error}`,
1280
+ });
1281
+ }
1218
1282
  }
1219
1283
 
1220
1284
  return response;
@@ -1295,10 +1359,14 @@ class Communication {
1295
1359
  });
1296
1360
 
1297
1361
  if (res_error) {
1298
- Logger({
1299
- level: "WARN",
1300
- message: `Response Validation Warnnings for platform > Communication > getAudiences \n ${res_error}`,
1301
- });
1362
+ if (this.config.options.strictResponseCheck === true) {
1363
+ return Promise.reject(new FDKResponseValidationError(res_error));
1364
+ } else {
1365
+ Logger({
1366
+ level: "WARN",
1367
+ message: `Response Validation Warnings for platform > Communication > getAudiences \n ${res_error}`,
1368
+ });
1369
+ }
1302
1370
  }
1303
1371
 
1304
1372
  return response;
@@ -1403,10 +1471,14 @@ class Communication {
1403
1471
  });
1404
1472
 
1405
1473
  if (res_error) {
1406
- Logger({
1407
- level: "WARN",
1408
- message: `Response Validation Warnnings for platform > Communication > getBigQueryHeadersById \n ${res_error}`,
1409
- });
1474
+ if (this.config.options.strictResponseCheck === true) {
1475
+ return Promise.reject(new FDKResponseValidationError(res_error));
1476
+ } else {
1477
+ Logger({
1478
+ level: "WARN",
1479
+ message: `Response Validation Warnings for platform > Communication > getBigQueryHeadersById \n ${res_error}`,
1480
+ });
1481
+ }
1410
1482
  }
1411
1483
 
1412
1484
  return response;
@@ -1478,10 +1550,14 @@ class Communication {
1478
1550
  });
1479
1551
 
1480
1552
  if (res_error) {
1481
- Logger({
1482
- level: "WARN",
1483
- message: `Response Validation Warnnings for platform > Communication > getBigQueryRowCountById \n ${res_error}`,
1484
- });
1553
+ if (this.config.options.strictResponseCheck === true) {
1554
+ return Promise.reject(new FDKResponseValidationError(res_error));
1555
+ } else {
1556
+ Logger({
1557
+ level: "WARN",
1558
+ message: `Response Validation Warnings for platform > Communication > getBigQueryRowCountById \n ${res_error}`,
1559
+ });
1560
+ }
1485
1561
  }
1486
1562
 
1487
1563
  return response;
@@ -1555,10 +1631,14 @@ class Communication {
1555
1631
  });
1556
1632
 
1557
1633
  if (res_error) {
1558
- Logger({
1559
- level: "WARN",
1560
- message: `Response Validation Warnnings for platform > Communication > getCampaignById \n ${res_error}`,
1561
- });
1634
+ if (this.config.options.strictResponseCheck === true) {
1635
+ return Promise.reject(new FDKResponseValidationError(res_error));
1636
+ } else {
1637
+ Logger({
1638
+ level: "WARN",
1639
+ message: `Response Validation Warnings for platform > Communication > getCampaignById \n ${res_error}`,
1640
+ });
1641
+ }
1562
1642
  }
1563
1643
 
1564
1644
  return response;
@@ -1639,10 +1719,14 @@ class Communication {
1639
1719
  });
1640
1720
 
1641
1721
  if (res_error) {
1642
- Logger({
1643
- level: "WARN",
1644
- message: `Response Validation Warnnings for platform > Communication > getCampaigns \n ${res_error}`,
1645
- });
1722
+ if (this.config.options.strictResponseCheck === true) {
1723
+ return Promise.reject(new FDKResponseValidationError(res_error));
1724
+ } else {
1725
+ Logger({
1726
+ level: "WARN",
1727
+ message: `Response Validation Warnings for platform > Communication > getCampaigns \n ${res_error}`,
1728
+ });
1729
+ }
1646
1730
  }
1647
1731
 
1648
1732
  return response;
@@ -1759,10 +1843,14 @@ class Communication {
1759
1843
  });
1760
1844
 
1761
1845
  if (res_error) {
1762
- Logger({
1763
- level: "WARN",
1764
- message: `Response Validation Warnnings for platform > Communication > getCommunicationLogs \n ${res_error}`,
1765
- });
1846
+ if (this.config.options.strictResponseCheck === true) {
1847
+ return Promise.reject(new FDKResponseValidationError(res_error));
1848
+ } else {
1849
+ Logger({
1850
+ level: "WARN",
1851
+ message: `Response Validation Warnings for platform > Communication > getCommunicationLogs \n ${res_error}`,
1852
+ });
1853
+ }
1766
1854
  }
1767
1855
 
1768
1856
  return response;
@@ -1871,10 +1959,14 @@ class Communication {
1871
1959
  .validate(responseData, { abortEarly: false, allowUnknown: false });
1872
1960
 
1873
1961
  if (res_error) {
1874
- Logger({
1875
- level: "WARN",
1876
- message: `Response Validation Warnnings for platform > Communication > getDefaultSmsProviders \n ${res_error}`,
1877
- });
1962
+ if (this.config.options.strictResponseCheck === true) {
1963
+ return Promise.reject(new FDKResponseValidationError(res_error));
1964
+ } else {
1965
+ Logger({
1966
+ level: "WARN",
1967
+ message: `Response Validation Warnings for platform > Communication > getDefaultSmsProviders \n ${res_error}`,
1968
+ });
1969
+ }
1878
1970
  }
1879
1971
 
1880
1972
  return response;
@@ -1942,10 +2034,14 @@ class Communication {
1942
2034
  .validate(responseData, { abortEarly: false, allowUnknown: false });
1943
2035
 
1944
2036
  if (res_error) {
1945
- Logger({
1946
- level: "WARN",
1947
- message: `Response Validation Warnnings for platform > Communication > getDummyDatasources \n ${res_error}`,
1948
- });
2037
+ if (this.config.options.strictResponseCheck === true) {
2038
+ return Promise.reject(new FDKResponseValidationError(res_error));
2039
+ } else {
2040
+ Logger({
2041
+ level: "WARN",
2042
+ message: `Response Validation Warnings for platform > Communication > getDummyDatasources \n ${res_error}`,
2043
+ });
2044
+ }
1949
2045
  }
1950
2046
 
1951
2047
  return response;
@@ -2020,10 +2116,14 @@ class Communication {
2020
2116
  );
2021
2117
 
2022
2118
  if (res_error) {
2023
- Logger({
2024
- level: "WARN",
2025
- message: `Response Validation Warnnings for platform > Communication > getDummyDatasourcesMeta \n ${res_error}`,
2026
- });
2119
+ if (this.config.options.strictResponseCheck === true) {
2120
+ return Promise.reject(new FDKResponseValidationError(res_error));
2121
+ } else {
2122
+ Logger({
2123
+ level: "WARN",
2124
+ message: `Response Validation Warnings for platform > Communication > getDummyDatasourcesMeta \n ${res_error}`,
2125
+ });
2126
+ }
2027
2127
  }
2028
2128
 
2029
2129
  return response;
@@ -2097,10 +2197,14 @@ class Communication {
2097
2197
  });
2098
2198
 
2099
2199
  if (res_error) {
2100
- Logger({
2101
- level: "WARN",
2102
- message: `Response Validation Warnnings for platform > Communication > getEmailProviderById \n ${res_error}`,
2103
- });
2200
+ if (this.config.options.strictResponseCheck === true) {
2201
+ return Promise.reject(new FDKResponseValidationError(res_error));
2202
+ } else {
2203
+ Logger({
2204
+ level: "WARN",
2205
+ message: `Response Validation Warnings for platform > Communication > getEmailProviderById \n ${res_error}`,
2206
+ });
2207
+ }
2104
2208
  }
2105
2209
 
2106
2210
  return response;
@@ -2181,10 +2285,14 @@ class Communication {
2181
2285
  });
2182
2286
 
2183
2287
  if (res_error) {
2184
- Logger({
2185
- level: "WARN",
2186
- message: `Response Validation Warnnings for platform > Communication > getEmailProviders \n ${res_error}`,
2187
- });
2288
+ if (this.config.options.strictResponseCheck === true) {
2289
+ return Promise.reject(new FDKResponseValidationError(res_error));
2290
+ } else {
2291
+ Logger({
2292
+ level: "WARN",
2293
+ message: `Response Validation Warnings for platform > Communication > getEmailProviders \n ${res_error}`,
2294
+ });
2295
+ }
2188
2296
  }
2189
2297
 
2190
2298
  return response;
@@ -2296,10 +2404,14 @@ class Communication {
2296
2404
  });
2297
2405
 
2298
2406
  if (res_error) {
2299
- Logger({
2300
- level: "WARN",
2301
- message: `Response Validation Warnnings for platform > Communication > getEmailTemplateById \n ${res_error}`,
2302
- });
2407
+ if (this.config.options.strictResponseCheck === true) {
2408
+ return Promise.reject(new FDKResponseValidationError(res_error));
2409
+ } else {
2410
+ Logger({
2411
+ level: "WARN",
2412
+ message: `Response Validation Warnings for platform > Communication > getEmailTemplateById \n ${res_error}`,
2413
+ });
2414
+ }
2303
2415
  }
2304
2416
 
2305
2417
  return response;
@@ -2380,10 +2492,14 @@ class Communication {
2380
2492
  });
2381
2493
 
2382
2494
  if (res_error) {
2383
- Logger({
2384
- level: "WARN",
2385
- message: `Response Validation Warnnings for platform > Communication > getEmailTemplates \n ${res_error}`,
2386
- });
2495
+ if (this.config.options.strictResponseCheck === true) {
2496
+ return Promise.reject(new FDKResponseValidationError(res_error));
2497
+ } else {
2498
+ Logger({
2499
+ level: "WARN",
2500
+ message: `Response Validation Warnings for platform > Communication > getEmailTemplates \n ${res_error}`,
2501
+ });
2502
+ }
2387
2503
  }
2388
2504
 
2389
2505
  return response;
@@ -2503,10 +2619,14 @@ class Communication {
2503
2619
  });
2504
2620
 
2505
2621
  if (res_error) {
2506
- Logger({
2507
- level: "WARN",
2508
- message: `Response Validation Warnnings for platform > Communication > getEventSubscriptions \n ${res_error}`,
2509
- });
2622
+ if (this.config.options.strictResponseCheck === true) {
2623
+ return Promise.reject(new FDKResponseValidationError(res_error));
2624
+ } else {
2625
+ Logger({
2626
+ level: "WARN",
2627
+ message: `Response Validation Warnings for platform > Communication > getEventSubscriptions \n ${res_error}`,
2628
+ });
2629
+ }
2510
2630
  }
2511
2631
 
2512
2632
  return response;
@@ -2614,10 +2734,14 @@ class Communication {
2614
2734
  });
2615
2735
 
2616
2736
  if (res_error) {
2617
- Logger({
2618
- level: "WARN",
2619
- message: `Response Validation Warnnings for platform > Communication > getGlobalProviders \n ${res_error}`,
2620
- });
2737
+ if (this.config.options.strictResponseCheck === true) {
2738
+ return Promise.reject(new FDKResponseValidationError(res_error));
2739
+ } else {
2740
+ Logger({
2741
+ level: "WARN",
2742
+ message: `Response Validation Warnings for platform > Communication > getGlobalProviders \n ${res_error}`,
2743
+ });
2744
+ }
2621
2745
  }
2622
2746
 
2623
2747
  return response;
@@ -2689,10 +2813,14 @@ class Communication {
2689
2813
  );
2690
2814
 
2691
2815
  if (res_error) {
2692
- Logger({
2693
- level: "WARN",
2694
- message: `Response Validation Warnnings for platform > Communication > getGlobalVariables \n ${res_error}`,
2695
- });
2816
+ if (this.config.options.strictResponseCheck === true) {
2817
+ return Promise.reject(new FDKResponseValidationError(res_error));
2818
+ } else {
2819
+ Logger({
2820
+ level: "WARN",
2821
+ message: `Response Validation Warnings for platform > Communication > getGlobalVariables \n ${res_error}`,
2822
+ });
2823
+ }
2696
2824
  }
2697
2825
 
2698
2826
  return response;
@@ -2771,10 +2899,14 @@ class Communication {
2771
2899
  });
2772
2900
 
2773
2901
  if (res_error) {
2774
- Logger({
2775
- level: "WARN",
2776
- message: `Response Validation Warnnings for platform > Communication > getJobLogs \n ${res_error}`,
2777
- });
2902
+ if (this.config.options.strictResponseCheck === true) {
2903
+ return Promise.reject(new FDKResponseValidationError(res_error));
2904
+ } else {
2905
+ Logger({
2906
+ level: "WARN",
2907
+ message: `Response Validation Warnings for platform > Communication > getJobLogs \n ${res_error}`,
2908
+ });
2909
+ }
2778
2910
  }
2779
2911
 
2780
2912
  return response;
@@ -2886,10 +3018,14 @@ class Communication {
2886
3018
  });
2887
3019
 
2888
3020
  if (res_error) {
2889
- Logger({
2890
- level: "WARN",
2891
- message: `Response Validation Warnnings for platform > Communication > getJobs \n ${res_error}`,
2892
- });
3021
+ if (this.config.options.strictResponseCheck === true) {
3022
+ return Promise.reject(new FDKResponseValidationError(res_error));
3023
+ } else {
3024
+ Logger({
3025
+ level: "WARN",
3026
+ message: `Response Validation Warnings for platform > Communication > getJobs \n ${res_error}`,
3027
+ });
3028
+ }
2893
3029
  }
2894
3030
 
2895
3031
  return response;
@@ -2996,10 +3132,14 @@ class Communication {
2996
3132
  });
2997
3133
 
2998
3134
  if (res_error) {
2999
- Logger({
3000
- level: "WARN",
3001
- message: `Response Validation Warnnings for platform > Communication > getNSampleRecordsFromCsv \n ${res_error}`,
3002
- });
3135
+ if (this.config.options.strictResponseCheck === true) {
3136
+ return Promise.reject(new FDKResponseValidationError(res_error));
3137
+ } else {
3138
+ Logger({
3139
+ level: "WARN",
3140
+ message: `Response Validation Warnings for platform > Communication > getNSampleRecordsFromCsv \n ${res_error}`,
3141
+ });
3142
+ }
3003
3143
  }
3004
3144
 
3005
3145
  return response;
@@ -3069,10 +3209,14 @@ class Communication {
3069
3209
  });
3070
3210
 
3071
3211
  if (res_error) {
3072
- Logger({
3073
- level: "WARN",
3074
- message: `Response Validation Warnnings for platform > Communication > getNSampleRecordsFromCsvByGet \n ${res_error}`,
3075
- });
3212
+ if (this.config.options.strictResponseCheck === true) {
3213
+ return Promise.reject(new FDKResponseValidationError(res_error));
3214
+ } else {
3215
+ Logger({
3216
+ level: "WARN",
3217
+ message: `Response Validation Warnings for platform > Communication > getNSampleRecordsFromCsvByGet \n ${res_error}`,
3218
+ });
3219
+ }
3076
3220
  }
3077
3221
 
3078
3222
  return response;
@@ -3144,10 +3288,14 @@ class Communication {
3144
3288
  });
3145
3289
 
3146
3290
  if (res_error) {
3147
- Logger({
3148
- level: "WARN",
3149
- message: `Response Validation Warnnings for platform > Communication > getSmsProviderById \n ${res_error}`,
3150
- });
3291
+ if (this.config.options.strictResponseCheck === true) {
3292
+ return Promise.reject(new FDKResponseValidationError(res_error));
3293
+ } else {
3294
+ Logger({
3295
+ level: "WARN",
3296
+ message: `Response Validation Warnings for platform > Communication > getSmsProviderById \n ${res_error}`,
3297
+ });
3298
+ }
3151
3299
  }
3152
3300
 
3153
3301
  return response;
@@ -3226,10 +3374,14 @@ class Communication {
3226
3374
  });
3227
3375
 
3228
3376
  if (res_error) {
3229
- Logger({
3230
- level: "WARN",
3231
- message: `Response Validation Warnnings for platform > Communication > getSmsProviders \n ${res_error}`,
3232
- });
3377
+ if (this.config.options.strictResponseCheck === true) {
3378
+ return Promise.reject(new FDKResponseValidationError(res_error));
3379
+ } else {
3380
+ Logger({
3381
+ level: "WARN",
3382
+ message: `Response Validation Warnings for platform > Communication > getSmsProviders \n ${res_error}`,
3383
+ });
3384
+ }
3233
3385
  }
3234
3386
 
3235
3387
  return response;
@@ -3303,10 +3455,14 @@ class Communication {
3303
3455
  });
3304
3456
 
3305
3457
  if (res_error) {
3306
- Logger({
3307
- level: "WARN",
3308
- message: `Response Validation Warnnings for platform > Communication > getSmsTemplateById \n ${res_error}`,
3309
- });
3458
+ if (this.config.options.strictResponseCheck === true) {
3459
+ return Promise.reject(new FDKResponseValidationError(res_error));
3460
+ } else {
3461
+ Logger({
3462
+ level: "WARN",
3463
+ message: `Response Validation Warnings for platform > Communication > getSmsTemplateById \n ${res_error}`,
3464
+ });
3465
+ }
3310
3466
  }
3311
3467
 
3312
3468
  return response;
@@ -3387,10 +3543,14 @@ class Communication {
3387
3543
  });
3388
3544
 
3389
3545
  if (res_error) {
3390
- Logger({
3391
- level: "WARN",
3392
- message: `Response Validation Warnnings for platform > Communication > getSmsTemplates \n ${res_error}`,
3393
- });
3546
+ if (this.config.options.strictResponseCheck === true) {
3547
+ return Promise.reject(new FDKResponseValidationError(res_error));
3548
+ } else {
3549
+ Logger({
3550
+ level: "WARN",
3551
+ message: `Response Validation Warnings for platform > Communication > getSmsTemplates \n ${res_error}`,
3552
+ });
3553
+ }
3394
3554
  }
3395
3555
 
3396
3556
  return response;
@@ -3497,10 +3657,14 @@ class Communication {
3497
3657
  });
3498
3658
 
3499
3659
  if (res_error) {
3500
- Logger({
3501
- level: "WARN",
3502
- message: `Response Validation Warnnings for platform > Communication > getStatsOfCampaignById \n ${res_error}`,
3503
- });
3660
+ if (this.config.options.strictResponseCheck === true) {
3661
+ return Promise.reject(new FDKResponseValidationError(res_error));
3662
+ } else {
3663
+ Logger({
3664
+ level: "WARN",
3665
+ message: `Response Validation Warnings for platform > Communication > getStatsOfCampaignById \n ${res_error}`,
3666
+ });
3667
+ }
3504
3668
  }
3505
3669
 
3506
3670
  return response;
@@ -3578,10 +3742,14 @@ class Communication {
3578
3742
  });
3579
3743
 
3580
3744
  if (res_error) {
3581
- Logger({
3582
- level: "WARN",
3583
- message: `Response Validation Warnnings for platform > Communication > getSubscribedEmailTemplates \n ${res_error}`,
3584
- });
3745
+ if (this.config.options.strictResponseCheck === true) {
3746
+ return Promise.reject(new FDKResponseValidationError(res_error));
3747
+ } else {
3748
+ Logger({
3749
+ level: "WARN",
3750
+ message: `Response Validation Warnings for platform > Communication > getSubscribedEmailTemplates \n ${res_error}`,
3751
+ });
3752
+ }
3585
3753
  }
3586
3754
 
3587
3755
  return response;
@@ -3694,10 +3862,14 @@ class Communication {
3694
3862
  });
3695
3863
 
3696
3864
  if (res_error) {
3697
- Logger({
3698
- level: "WARN",
3699
- message: `Response Validation Warnnings for platform > Communication > getSubscribedSmsTemplates \n ${res_error}`,
3700
- });
3865
+ if (this.config.options.strictResponseCheck === true) {
3866
+ return Promise.reject(new FDKResponseValidationError(res_error));
3867
+ } else {
3868
+ Logger({
3869
+ level: "WARN",
3870
+ message: `Response Validation Warnings for platform > Communication > getSubscribedSmsTemplates \n ${res_error}`,
3871
+ });
3872
+ }
3701
3873
  }
3702
3874
 
3703
3875
  return response;
@@ -3800,10 +3972,14 @@ class Communication {
3800
3972
  });
3801
3973
 
3802
3974
  if (res_error) {
3803
- Logger({
3804
- level: "WARN",
3805
- message: `Response Validation Warnnings for platform > Communication > getSystemAudiences \n ${res_error}`,
3806
- });
3975
+ if (this.config.options.strictResponseCheck === true) {
3976
+ return Promise.reject(new FDKResponseValidationError(res_error));
3977
+ } else {
3978
+ Logger({
3979
+ level: "WARN",
3980
+ message: `Response Validation Warnings for platform > Communication > getSystemAudiences \n ${res_error}`,
3981
+ });
3982
+ }
3807
3983
  }
3808
3984
 
3809
3985
  return response;
@@ -3874,10 +4050,14 @@ class Communication {
3874
4050
  );
3875
4051
 
3876
4052
  if (res_error) {
3877
- Logger({
3878
- level: "WARN",
3879
- message: `Response Validation Warnnings for platform > Communication > getSystemEmailTemplates \n ${res_error}`,
3880
- });
4053
+ if (this.config.options.strictResponseCheck === true) {
4054
+ return Promise.reject(new FDKResponseValidationError(res_error));
4055
+ } else {
4056
+ Logger({
4057
+ level: "WARN",
4058
+ message: `Response Validation Warnings for platform > Communication > getSystemEmailTemplates \n ${res_error}`,
4059
+ });
4060
+ }
3881
4061
  }
3882
4062
 
3883
4063
  return response;
@@ -3945,10 +4125,14 @@ class Communication {
3945
4125
  .validate(responseData, { abortEarly: false, allowUnknown: false });
3946
4126
 
3947
4127
  if (res_error) {
3948
- Logger({
3949
- level: "WARN",
3950
- message: `Response Validation Warnnings for platform > Communication > getSystemSmsTemplates \n ${res_error}`,
3951
- });
4128
+ if (this.config.options.strictResponseCheck === true) {
4129
+ return Promise.reject(new FDKResponseValidationError(res_error));
4130
+ } else {
4131
+ Logger({
4132
+ level: "WARN",
4133
+ message: `Response Validation Warnings for platform > Communication > getSystemSmsTemplates \n ${res_error}`,
4134
+ });
4135
+ }
3952
4136
  }
3953
4137
 
3954
4138
  return response;
@@ -4024,10 +4208,14 @@ class Communication {
4024
4208
  );
4025
4209
 
4026
4210
  if (res_error) {
4027
- Logger({
4028
- level: "WARN",
4029
- message: `Response Validation Warnnings for platform > Communication > postGlobalVariables \n ${res_error}`,
4030
- });
4211
+ if (this.config.options.strictResponseCheck === true) {
4212
+ return Promise.reject(new FDKResponseValidationError(res_error));
4213
+ } else {
4214
+ Logger({
4215
+ level: "WARN",
4216
+ message: `Response Validation Warnings for platform > Communication > postGlobalVariables \n ${res_error}`,
4217
+ });
4218
+ }
4031
4219
  }
4032
4220
 
4033
4221
  return response;
@@ -4101,10 +4289,14 @@ class Communication {
4101
4289
  });
4102
4290
 
4103
4291
  if (res_error) {
4104
- Logger({
4105
- level: "WARN",
4106
- message: `Response Validation Warnnings for platform > Communication > sendCommunicationAsynchronously \n ${res_error}`,
4107
- });
4292
+ if (this.config.options.strictResponseCheck === true) {
4293
+ return Promise.reject(new FDKResponseValidationError(res_error));
4294
+ } else {
4295
+ Logger({
4296
+ level: "WARN",
4297
+ message: `Response Validation Warnings for platform > Communication > sendCommunicationAsynchronously \n ${res_error}`,
4298
+ });
4299
+ }
4108
4300
  }
4109
4301
 
4110
4302
  return response;
@@ -4178,10 +4370,14 @@ class Communication {
4178
4370
  });
4179
4371
 
4180
4372
  if (res_error) {
4181
- Logger({
4182
- level: "WARN",
4183
- message: `Response Validation Warnnings for platform > Communication > sendCommunicationSynchronously \n ${res_error}`,
4184
- });
4373
+ if (this.config.options.strictResponseCheck === true) {
4374
+ return Promise.reject(new FDKResponseValidationError(res_error));
4375
+ } else {
4376
+ Logger({
4377
+ level: "WARN",
4378
+ message: `Response Validation Warnings for platform > Communication > sendCommunicationSynchronously \n ${res_error}`,
4379
+ });
4380
+ }
4185
4381
  }
4186
4382
 
4187
4383
  return response;
@@ -4253,10 +4449,14 @@ class Communication {
4253
4449
  });
4254
4450
 
4255
4451
  if (res_error) {
4256
- Logger({
4257
- level: "WARN",
4258
- message: `Response Validation Warnnings for platform > Communication > sendOtp \n ${res_error}`,
4259
- });
4452
+ if (this.config.options.strictResponseCheck === true) {
4453
+ return Promise.reject(new FDKResponseValidationError(res_error));
4454
+ } else {
4455
+ Logger({
4456
+ level: "WARN",
4457
+ message: `Response Validation Warnings for platform > Communication > sendOtp \n ${res_error}`,
4458
+ });
4459
+ }
4260
4460
  }
4261
4461
 
4262
4462
  return response;
@@ -4331,10 +4531,14 @@ class Communication {
4331
4531
  });
4332
4532
 
4333
4533
  if (res_error) {
4334
- Logger({
4335
- level: "WARN",
4336
- message: `Response Validation Warnnings for platform > Communication > triggerCampaignJob \n ${res_error}`,
4337
- });
4534
+ if (this.config.options.strictResponseCheck === true) {
4535
+ return Promise.reject(new FDKResponseValidationError(res_error));
4536
+ } else {
4537
+ Logger({
4538
+ level: "WARN",
4539
+ message: `Response Validation Warnings for platform > Communication > triggerCampaignJob \n ${res_error}`,
4540
+ });
4541
+ }
4338
4542
  }
4339
4543
 
4340
4544
  return response;
@@ -4408,10 +4612,14 @@ class Communication {
4408
4612
  });
4409
4613
 
4410
4614
  if (res_error) {
4411
- Logger({
4412
- level: "WARN",
4413
- message: `Response Validation Warnnings for platform > Communication > updateAppProviders \n ${res_error}`,
4414
- });
4615
+ if (this.config.options.strictResponseCheck === true) {
4616
+ return Promise.reject(new FDKResponseValidationError(res_error));
4617
+ } else {
4618
+ Logger({
4619
+ level: "WARN",
4620
+ message: `Response Validation Warnings for platform > Communication > updateAppProviders \n ${res_error}`,
4621
+ });
4622
+ }
4415
4623
  }
4416
4624
 
4417
4625
  return response;
@@ -4487,10 +4695,14 @@ class Communication {
4487
4695
  });
4488
4696
 
4489
4697
  if (res_error) {
4490
- Logger({
4491
- level: "WARN",
4492
- message: `Response Validation Warnnings for platform > Communication > updateAudienceById \n ${res_error}`,
4493
- });
4698
+ if (this.config.options.strictResponseCheck === true) {
4699
+ return Promise.reject(new FDKResponseValidationError(res_error));
4700
+ } else {
4701
+ Logger({
4702
+ level: "WARN",
4703
+ message: `Response Validation Warnings for platform > Communication > updateAudienceById \n ${res_error}`,
4704
+ });
4705
+ }
4494
4706
  }
4495
4707
 
4496
4708
  return response;
@@ -4566,10 +4778,14 @@ class Communication {
4566
4778
  });
4567
4779
 
4568
4780
  if (res_error) {
4569
- Logger({
4570
- level: "WARN",
4571
- message: `Response Validation Warnnings for platform > Communication > updateCampaignById \n ${res_error}`,
4572
- });
4781
+ if (this.config.options.strictResponseCheck === true) {
4782
+ return Promise.reject(new FDKResponseValidationError(res_error));
4783
+ } else {
4784
+ Logger({
4785
+ level: "WARN",
4786
+ message: `Response Validation Warnings for platform > Communication > updateCampaignById \n ${res_error}`,
4787
+ });
4788
+ }
4573
4789
  }
4574
4790
 
4575
4791
  return response;
@@ -4645,10 +4861,14 @@ class Communication {
4645
4861
  });
4646
4862
 
4647
4863
  if (res_error) {
4648
- Logger({
4649
- level: "WARN",
4650
- message: `Response Validation Warnnings for platform > Communication > updateEmailProviderById \n ${res_error}`,
4651
- });
4864
+ if (this.config.options.strictResponseCheck === true) {
4865
+ return Promise.reject(new FDKResponseValidationError(res_error));
4866
+ } else {
4867
+ Logger({
4868
+ level: "WARN",
4869
+ message: `Response Validation Warnings for platform > Communication > updateEmailProviderById \n ${res_error}`,
4870
+ });
4871
+ }
4652
4872
  }
4653
4873
 
4654
4874
  return response;
@@ -4724,10 +4944,14 @@ class Communication {
4724
4944
  });
4725
4945
 
4726
4946
  if (res_error) {
4727
- Logger({
4728
- level: "WARN",
4729
- message: `Response Validation Warnnings for platform > Communication > updateEmailTemplateById \n ${res_error}`,
4730
- });
4947
+ if (this.config.options.strictResponseCheck === true) {
4948
+ return Promise.reject(new FDKResponseValidationError(res_error));
4949
+ } else {
4950
+ Logger({
4951
+ level: "WARN",
4952
+ message: `Response Validation Warnings for platform > Communication > updateEmailTemplateById \n ${res_error}`,
4953
+ });
4954
+ }
4731
4955
  }
4732
4956
 
4733
4957
  return response;
@@ -4801,10 +5025,14 @@ class Communication {
4801
5025
  });
4802
5026
 
4803
5027
  if (res_error) {
4804
- Logger({
4805
- level: "WARN",
4806
- message: `Response Validation Warnnings for platform > Communication > updateSmsProviderById \n ${res_error}`,
4807
- });
5028
+ if (this.config.options.strictResponseCheck === true) {
5029
+ return Promise.reject(new FDKResponseValidationError(res_error));
5030
+ } else {
5031
+ Logger({
5032
+ level: "WARN",
5033
+ message: `Response Validation Warnings for platform > Communication > updateSmsProviderById \n ${res_error}`,
5034
+ });
5035
+ }
4808
5036
  }
4809
5037
 
4810
5038
  return response;
@@ -4880,10 +5108,14 @@ class Communication {
4880
5108
  });
4881
5109
 
4882
5110
  if (res_error) {
4883
- Logger({
4884
- level: "WARN",
4885
- message: `Response Validation Warnnings for platform > Communication > updateSmsTemplateById \n ${res_error}`,
4886
- });
5111
+ if (this.config.options.strictResponseCheck === true) {
5112
+ return Promise.reject(new FDKResponseValidationError(res_error));
5113
+ } else {
5114
+ Logger({
5115
+ level: "WARN",
5116
+ message: `Response Validation Warnings for platform > Communication > updateSmsTemplateById \n ${res_error}`,
5117
+ });
5118
+ }
4887
5119
  }
4888
5120
 
4889
5121
  return response;
@@ -4957,10 +5189,14 @@ class Communication {
4957
5189
  );
4958
5190
 
4959
5191
  if (res_error) {
4960
- Logger({
4961
- level: "WARN",
4962
- message: `Response Validation Warnnings for platform > Communication > verfiyOtp \n ${res_error}`,
4963
- });
5192
+ if (this.config.options.strictResponseCheck === true) {
5193
+ return Promise.reject(new FDKResponseValidationError(res_error));
5194
+ } else {
5195
+ Logger({
5196
+ level: "WARN",
5197
+ message: `Response Validation Warnings for platform > Communication > verfiyOtp \n ${res_error}`,
5198
+ });
5199
+ }
4964
5200
  }
4965
5201
 
4966
5202
  return response;