@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
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const CommunicationPlatformValidator = require("./CommunicationPlatformValidator");
5
8
  const CommunicationPlatformModel = require("./CommunicationPlatformModel");
@@ -86,10 +89,14 @@ class Communication {
86
89
  );
87
90
 
88
91
  if (res_error) {
89
- Logger({
90
- level: "WARN",
91
- message: `Response Validation Warnnings for platform > Communication > getSystemNotifications \n ${res_error}`,
92
- });
92
+ if (this.config.options.strictResponseCheck === true) {
93
+ return Promise.reject(new FDKResponseValidationError(res_error));
94
+ } else {
95
+ Logger({
96
+ level: "WARN",
97
+ message: `Response Validation Warnings for platform > Communication > getSystemNotifications \n ${res_error}`,
98
+ });
99
+ }
93
100
  }
94
101
 
95
102
  return response;
@@ -516,6 +516,7 @@ export = CommunicationPlatformModel;
516
516
  * @typedef SendOtpCommsReqEmail
517
517
  * @property {number} [expiry]
518
518
  * @property {number} [otp_length]
519
+ * @property {SendOtpEmailCommsProvider} [provider]
519
520
  * @property {SendOtpEmailCommsTemplate} [template]
520
521
  */
521
522
  /**
@@ -547,6 +548,11 @@ export = CommunicationPlatformModel;
547
548
  * @property {number} [resend_timer]
548
549
  * @property {boolean} [success]
549
550
  */
551
+ /**
552
+ * @typedef SendOtpEmailCommsProvider
553
+ * @property {string} [_id]
554
+ * @property {string} [slug]
555
+ */
550
556
  /**
551
557
  * @typedef SendOtpEmailCommsTemplate
552
558
  * @property {string} [key]
@@ -779,7 +785,7 @@ export = CommunicationPlatformModel;
779
785
  declare class CommunicationPlatformModel {
780
786
  }
781
787
  declare namespace CommunicationPlatformModel {
782
- export { AppProvider, AppProviderReq, AppProviderRes, AppProviderResObj, AppProviderResVoice, Audience, AudienceReq, Audiences, BadRequestSchema, Campaign, CampaignEmail, CampaignEmailTemplate, CampaignReq, Campaigns, CampignEmailProvider, DefaultSmsProviders, DummyDatasources, DummyDatasourcesMeta, DummyDatasourcesMetaObj, EmailProvider, EmailProviderReq, EmailProviderReqFrom, EmailProviders, EmailTemplate, EmailTemplateHeaders, EmailTemplateKeys, EmailTemplateReq, EmailTemplates, EnabledObj, EngineRequest, EngineResponse, EventSubscription, EventSubscriptions, EventSubscriptionTemplate, EventSubscriptionTemplateEmail, EventSubscriptionTemplateSms, GenericDelete, GenericError, GetNRecordsCsvReq, GetNRecordsCsvRes, GetNRecordsCsvResItems, GetStats, GlobalProviders, GlobalProvidersResObj, GlobalVariablesGetResponse, GlobalVariablesPostResponse, GlobalVariablesReq, Job, JobLog, JobLogs, Jobs, Log, LogEmail, LogMeta, LogPushnotification, Logs, Message, metaObj, MetaStructure, NotFound, Notification, Page, PayloadEmailProviderStructure, PayloadEmailStructure, PayloadEmailTemplateStructure, PayloadSmsProviderStructure, PayloadSmsStructure, PayloadSmsTemplateStructure, PayloadStructure, RecipientHeaders, SendOtpCommsReq, SendOtpCommsReqData, SendOtpCommsReqEmail, SendOtpCommsReqSms, SendOtpCommsRes, SendOtpCommsResEmail, SendOtpCommsResSms, SendOtpEmailCommsTemplate, SendOtpSmsCommsProvider, SendOtpSmsCommsTemplate, SmsProvider, SmsProviderReq, SmsProviders, SmsTemplate, SmsTemplateMessage, SmsTemplateReq, SmsTemplates, Stats, StatsImported, StatsProcessed, StatsProcessedEmail, StatsProcessedSms, SystemEmailTemplate, SystemEmailTemplates, SystemNotification, SystemNotifications, SystemNotificationUser, SystemSmsTemplates, TemplateAndType, TriggerJobRequest, TriggerJobResponse, VerifyOtpCommsErrorRes, VerifyOtpCommsReq, VerifyOtpCommsSuccessRes };
788
+ export { AppProvider, AppProviderReq, AppProviderRes, AppProviderResObj, AppProviderResVoice, Audience, AudienceReq, Audiences, BadRequestSchema, Campaign, CampaignEmail, CampaignEmailTemplate, CampaignReq, Campaigns, CampignEmailProvider, DefaultSmsProviders, DummyDatasources, DummyDatasourcesMeta, DummyDatasourcesMetaObj, EmailProvider, EmailProviderReq, EmailProviderReqFrom, EmailProviders, EmailTemplate, EmailTemplateHeaders, EmailTemplateKeys, EmailTemplateReq, EmailTemplates, EnabledObj, EngineRequest, EngineResponse, EventSubscription, EventSubscriptions, EventSubscriptionTemplate, EventSubscriptionTemplateEmail, EventSubscriptionTemplateSms, GenericDelete, GenericError, GetNRecordsCsvReq, GetNRecordsCsvRes, GetNRecordsCsvResItems, GetStats, GlobalProviders, GlobalProvidersResObj, GlobalVariablesGetResponse, GlobalVariablesPostResponse, GlobalVariablesReq, Job, JobLog, JobLogs, Jobs, Log, LogEmail, LogMeta, LogPushnotification, Logs, Message, metaObj, MetaStructure, NotFound, Notification, Page, PayloadEmailProviderStructure, PayloadEmailStructure, PayloadEmailTemplateStructure, PayloadSmsProviderStructure, PayloadSmsStructure, PayloadSmsTemplateStructure, PayloadStructure, RecipientHeaders, SendOtpCommsReq, SendOtpCommsReqData, SendOtpCommsReqEmail, SendOtpCommsReqSms, SendOtpCommsRes, SendOtpCommsResEmail, SendOtpCommsResSms, SendOtpEmailCommsProvider, SendOtpEmailCommsTemplate, SendOtpSmsCommsProvider, SendOtpSmsCommsTemplate, SmsProvider, SmsProviderReq, SmsProviders, SmsTemplate, SmsTemplateMessage, SmsTemplateReq, SmsTemplates, Stats, StatsImported, StatsProcessed, StatsProcessedEmail, StatsProcessedSms, SystemEmailTemplate, SystemEmailTemplates, SystemNotification, SystemNotifications, SystemNotificationUser, SystemSmsTemplates, TemplateAndType, TriggerJobRequest, TriggerJobResponse, VerifyOtpCommsErrorRes, VerifyOtpCommsReq, VerifyOtpCommsSuccessRes };
783
789
  }
784
790
  /** @returns {AppProvider} */
785
791
  declare function AppProvider(): AppProvider;
@@ -1380,6 +1386,7 @@ declare function SendOtpCommsReqEmail(): SendOtpCommsReqEmail;
1380
1386
  type SendOtpCommsReqEmail = {
1381
1387
  expiry?: number;
1382
1388
  otp_length?: number;
1389
+ provider?: SendOtpEmailCommsProvider;
1383
1390
  template?: SendOtpEmailCommsTemplate;
1384
1391
  };
1385
1392
  /** @returns {SendOtpCommsReqSms} */
@@ -1415,6 +1422,12 @@ type SendOtpCommsResSms = {
1415
1422
  resend_timer?: number;
1416
1423
  success?: boolean;
1417
1424
  };
1425
+ /** @returns {SendOtpEmailCommsProvider} */
1426
+ declare function SendOtpEmailCommsProvider(): SendOtpEmailCommsProvider;
1427
+ type SendOtpEmailCommsProvider = {
1428
+ _id?: string;
1429
+ slug?: string;
1430
+ };
1418
1431
  /** @returns {SendOtpEmailCommsTemplate} */
1419
1432
  declare function SendOtpEmailCommsTemplate(): SendOtpEmailCommsTemplate;
1420
1433
  type SendOtpEmailCommsTemplate = {
@@ -589,6 +589,7 @@ const Joi = require("joi");
589
589
  * @typedef SendOtpCommsReqEmail
590
590
  * @property {number} [expiry]
591
591
  * @property {number} [otp_length]
592
+ * @property {SendOtpEmailCommsProvider} [provider]
592
593
  * @property {SendOtpEmailCommsTemplate} [template]
593
594
  */
594
595
 
@@ -625,6 +626,12 @@ const Joi = require("joi");
625
626
  * @property {boolean} [success]
626
627
  */
627
628
 
629
+ /**
630
+ * @typedef SendOtpEmailCommsProvider
631
+ * @property {string} [_id]
632
+ * @property {string} [slug]
633
+ */
634
+
628
635
  /**
629
636
  * @typedef SendOtpEmailCommsTemplate
630
637
  * @property {string} [key]
@@ -1632,6 +1639,7 @@ class CommunicationPlatformModel {
1632
1639
  return Joi.object({
1633
1640
  expiry: Joi.number(),
1634
1641
  otp_length: Joi.number(),
1642
+ provider: CommunicationPlatformModel.SendOtpEmailCommsProvider(),
1635
1643
  template: CommunicationPlatformModel.SendOtpEmailCommsTemplate(),
1636
1644
  });
1637
1645
  }
@@ -1677,6 +1685,14 @@ class CommunicationPlatformModel {
1677
1685
  });
1678
1686
  }
1679
1687
 
1688
+ /** @returns {SendOtpEmailCommsProvider} */
1689
+ static SendOtpEmailCommsProvider() {
1690
+ return Joi.object({
1691
+ _id: Joi.string().allow(""),
1692
+ slug: Joi.string().allow(""),
1693
+ });
1694
+ }
1695
+
1680
1696
  /** @returns {SendOtpEmailCommsTemplate} */
1681
1697
  static SendOtpEmailCommsTemplate() {
1682
1698
  return Joi.object({
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const CompanyProfilePlatformValidator = require("./CompanyProfilePlatformValidator");
5
8
  const CompanyProfilePlatformModel = require("./CompanyProfilePlatformModel");
@@ -75,10 +78,14 @@ class CompanyProfile {
75
78
  );
76
79
 
77
80
  if (res_error) {
78
- Logger({
79
- level: "WARN",
80
- message: `Response Validation Warnnings for platform > CompanyProfile > cbsOnboardGet \n ${res_error}`,
81
- });
81
+ if (this.config.options.strictResponseCheck === true) {
82
+ return Promise.reject(new FDKResponseValidationError(res_error));
83
+ } else {
84
+ Logger({
85
+ level: "WARN",
86
+ message: `Response Validation Warnings for platform > CompanyProfile > cbsOnboardGet \n ${res_error}`,
87
+ });
88
+ }
82
89
  }
83
90
 
84
91
  return response;
@@ -151,10 +158,14 @@ class CompanyProfile {
151
158
  );
152
159
 
153
160
  if (res_error) {
154
- Logger({
155
- level: "WARN",
156
- message: `Response Validation Warnnings for platform > CompanyProfile > createBrand \n ${res_error}`,
157
- });
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 > CompanyProfile > createBrand \n ${res_error}`,
167
+ });
168
+ }
158
169
  }
159
170
 
160
171
  return response;
@@ -231,10 +242,14 @@ class CompanyProfile {
231
242
  );
232
243
 
233
244
  if (res_error) {
234
- Logger({
235
- level: "WARN",
236
- message: `Response Validation Warnnings for platform > CompanyProfile > createCompanyBrandMapping \n ${res_error}`,
237
- });
245
+ if (this.config.options.strictResponseCheck === true) {
246
+ return Promise.reject(new FDKResponseValidationError(res_error));
247
+ } else {
248
+ Logger({
249
+ level: "WARN",
250
+ message: `Response Validation Warnings for platform > CompanyProfile > createCompanyBrandMapping \n ${res_error}`,
251
+ });
252
+ }
238
253
  }
239
254
 
240
255
  return response;
@@ -307,10 +322,14 @@ class CompanyProfile {
307
322
  );
308
323
 
309
324
  if (res_error) {
310
- Logger({
311
- level: "WARN",
312
- message: `Response Validation Warnnings for platform > CompanyProfile > createLocation \n ${res_error}`,
313
- });
325
+ if (this.config.options.strictResponseCheck === true) {
326
+ return Promise.reject(new FDKResponseValidationError(res_error));
327
+ } else {
328
+ Logger({
329
+ level: "WARN",
330
+ message: `Response Validation Warnings for platform > CompanyProfile > createLocation \n ${res_error}`,
331
+ });
332
+ }
314
333
  }
315
334
 
316
335
  return response;
@@ -385,10 +404,14 @@ class CompanyProfile {
385
404
  );
386
405
 
387
406
  if (res_error) {
388
- Logger({
389
- level: "WARN",
390
- message: `Response Validation Warnnings for platform > CompanyProfile > createLocationBulk \n ${res_error}`,
391
- });
407
+ if (this.config.options.strictResponseCheck === true) {
408
+ return Promise.reject(new FDKResponseValidationError(res_error));
409
+ } else {
410
+ Logger({
411
+ level: "WARN",
412
+ message: `Response Validation Warnings for platform > CompanyProfile > createLocationBulk \n ${res_error}`,
413
+ });
414
+ }
392
415
  }
393
416
 
394
417
  return response;
@@ -463,10 +486,14 @@ class CompanyProfile {
463
486
  );
464
487
 
465
488
  if (res_error) {
466
- Logger({
467
- level: "WARN",
468
- message: `Response Validation Warnnings for platform > CompanyProfile > editBrand \n ${res_error}`,
469
- });
489
+ if (this.config.options.strictResponseCheck === true) {
490
+ return Promise.reject(new FDKResponseValidationError(res_error));
491
+ } else {
492
+ Logger({
493
+ level: "WARN",
494
+ message: `Response Validation Warnings for platform > CompanyProfile > editBrand \n ${res_error}`,
495
+ });
496
+ }
470
497
  }
471
498
 
472
499
  return response;
@@ -540,10 +567,14 @@ class CompanyProfile {
540
567
  );
541
568
 
542
569
  if (res_error) {
543
- Logger({
544
- level: "WARN",
545
- message: `Response Validation Warnnings for platform > CompanyProfile > getBrand \n ${res_error}`,
546
- });
570
+ if (this.config.options.strictResponseCheck === true) {
571
+ return Promise.reject(new FDKResponseValidationError(res_error));
572
+ } else {
573
+ Logger({
574
+ level: "WARN",
575
+ message: `Response Validation Warnings for platform > CompanyProfile > getBrand \n ${res_error}`,
576
+ });
577
+ }
547
578
  }
548
579
 
549
580
  return response;
@@ -624,10 +655,14 @@ class CompanyProfile {
624
655
  );
625
656
 
626
657
  if (res_error) {
627
- Logger({
628
- level: "WARN",
629
- message: `Response Validation Warnnings for platform > CompanyProfile > getBrands \n ${res_error}`,
630
- });
658
+ if (this.config.options.strictResponseCheck === true) {
659
+ return Promise.reject(new FDKResponseValidationError(res_error));
660
+ } else {
661
+ Logger({
662
+ level: "WARN",
663
+ message: `Response Validation Warnings for platform > CompanyProfile > getBrands \n ${res_error}`,
664
+ });
665
+ }
631
666
  }
632
667
 
633
668
  return response;
@@ -728,10 +763,14 @@ class CompanyProfile {
728
763
  });
729
764
 
730
765
  if (res_error) {
731
- Logger({
732
- level: "WARN",
733
- message: `Response Validation Warnnings for platform > CompanyProfile > getCompanyMetrics \n ${res_error}`,
734
- });
766
+ if (this.config.options.strictResponseCheck === true) {
767
+ return Promise.reject(new FDKResponseValidationError(res_error));
768
+ } else {
769
+ Logger({
770
+ level: "WARN",
771
+ message: `Response Validation Warnings for platform > CompanyProfile > getCompanyMetrics \n ${res_error}`,
772
+ });
773
+ }
735
774
  }
736
775
 
737
776
  return response;
@@ -806,10 +845,14 @@ class CompanyProfile {
806
845
  );
807
846
 
808
847
  if (res_error) {
809
- Logger({
810
- level: "WARN",
811
- message: `Response Validation Warnnings for platform > CompanyProfile > getLocationDetail \n ${res_error}`,
812
- });
848
+ if (this.config.options.strictResponseCheck === true) {
849
+ return Promise.reject(new FDKResponseValidationError(res_error));
850
+ } else {
851
+ Logger({
852
+ level: "WARN",
853
+ message: `Response Validation Warnings for platform > CompanyProfile > getLocationDetail \n ${res_error}`,
854
+ });
855
+ }
813
856
  }
814
857
 
815
858
  return response;
@@ -881,10 +924,14 @@ class CompanyProfile {
881
924
  );
882
925
 
883
926
  if (res_error) {
884
- Logger({
885
- level: "WARN",
886
- message: `Response Validation Warnnings for platform > CompanyProfile > getLocationTags \n ${res_error}`,
887
- });
927
+ if (this.config.options.strictResponseCheck === true) {
928
+ return Promise.reject(new FDKResponseValidationError(res_error));
929
+ } else {
930
+ Logger({
931
+ level: "WARN",
932
+ message: `Response Validation Warnings for platform > CompanyProfile > getLocationTags \n ${res_error}`,
933
+ });
934
+ }
888
935
  }
889
936
 
890
937
  return response;
@@ -975,10 +1022,14 @@ class CompanyProfile {
975
1022
  );
976
1023
 
977
1024
  if (res_error) {
978
- Logger({
979
- level: "WARN",
980
- message: `Response Validation Warnnings for platform > CompanyProfile > getLocations \n ${res_error}`,
981
- });
1025
+ if (this.config.options.strictResponseCheck === true) {
1026
+ return Promise.reject(new FDKResponseValidationError(res_error));
1027
+ } else {
1028
+ Logger({
1029
+ level: "WARN",
1030
+ message: `Response Validation Warnings for platform > CompanyProfile > getLocations \n ${res_error}`,
1031
+ });
1032
+ }
982
1033
  }
983
1034
 
984
1035
  return response;
@@ -1089,10 +1140,14 @@ class CompanyProfile {
1089
1140
  );
1090
1141
 
1091
1142
  if (res_error) {
1092
- Logger({
1093
- level: "WARN",
1094
- message: `Response Validation Warnnings for platform > CompanyProfile > updateCompany \n ${res_error}`,
1095
- });
1143
+ if (this.config.options.strictResponseCheck === true) {
1144
+ return Promise.reject(new FDKResponseValidationError(res_error));
1145
+ } else {
1146
+ Logger({
1147
+ level: "WARN",
1148
+ message: `Response Validation Warnings for platform > CompanyProfile > updateCompany \n ${res_error}`,
1149
+ });
1150
+ }
1096
1151
  }
1097
1152
 
1098
1153
  return response;
@@ -1167,10 +1222,14 @@ class CompanyProfile {
1167
1222
  );
1168
1223
 
1169
1224
  if (res_error) {
1170
- Logger({
1171
- level: "WARN",
1172
- message: `Response Validation Warnnings for platform > CompanyProfile > updateLocation \n ${res_error}`,
1173
- });
1225
+ if (this.config.options.strictResponseCheck === true) {
1226
+ return Promise.reject(new FDKResponseValidationError(res_error));
1227
+ } else {
1228
+ Logger({
1229
+ level: "WARN",
1230
+ message: `Response Validation Warnings for platform > CompanyProfile > updateLocation \n ${res_error}`,
1231
+ });
1232
+ }
1174
1233
  }
1175
1234
 
1176
1235
  return response;