@gofynd/fdk-client-javascript 1.3.6-beta.1 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationConfig.d.ts +11 -3
- package/sdk/application/ApplicationConfig.js +21 -3
- package/sdk/application/Cart/CartApplicationClient.js +228 -113
- package/sdk/application/Catalog/CatalogApplicationClient.js +244 -121
- package/sdk/application/Common/CommonApplicationClient.js +20 -9
- package/sdk/application/Communication/CommunicationApplicationClient.js +28 -13
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +132 -65
- package/sdk/application/Content/ContentApplicationClient.js +156 -77
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +28 -13
- package/sdk/application/Lead/LeadApplicationClient.js +60 -29
- package/sdk/application/Logistic/LogisticApplicationClient.js +44 -21
- package/sdk/application/Order/OrderApplicationClient.js +100 -49
- package/sdk/application/Payment/PaymentApplicationClient.js +340 -169
- package/sdk/application/PosCart/PosCartApplicationClient.js +220 -109
- package/sdk/application/Rewards/RewardsApplicationClient.js +60 -29
- package/sdk/application/Share/ShareApplicationClient.js +60 -29
- package/sdk/application/Theme/ThemeApplicationClient.js +36 -17
- package/sdk/application/User/UserApplicationClient.js +324 -161
- package/sdk/common/AxiosHelper.js +3 -3
- package/sdk/common/FDKError.d.ts +4 -0
- package/sdk/common/FDKError.js +9 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +16 -40
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +160 -38
- package/sdk/partner/PartnerConfig.d.ts +10 -0
- package/sdk/partner/PartnerConfig.js +10 -1
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +96 -199
- package/sdk/partner/Theme/ThemePartnerClient.js +935 -170
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +36 -17
- package/sdk/platform/Billing/BillingPlatformClient.js +140 -69
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +456 -228
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +512 -256
- package/sdk/platform/Catalog/CatalogPlatformClient.js +620 -309
- package/sdk/platform/Common/CommonPlatformClient.js +20 -9
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +472 -236
- package/sdk/platform/Communication/CommunicationPlatformClient.js +12 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +14 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.js +16 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +116 -57
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +256 -128
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +148 -73
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +552 -276
- package/sdk/platform/Discount/DiscountPlatformClient.js +92 -45
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +88 -44
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +52 -25
- package/sdk/platform/Finance/FinancePlatformClient.js +196 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +100 -49
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +104 -52
- package/sdk/platform/Lead/LeadPlatformClient.js +92 -45
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +26 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +239 -5
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +57 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +55 -0
- package/sdk/platform/Order/OrderPlatformClient.js +356 -177
- package/sdk/platform/Order/OrderPlatformModel.d.ts +44 -5
- package/sdk/platform/Order/OrderPlatformModel.js +52 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +16 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +336 -168
- package/sdk/platform/Payment/PaymentPlatformClient.js +84 -41
- package/sdk/platform/PlatformConfig.d.ts +10 -0
- package/sdk/platform/PlatformConfig.js +10 -1
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +96 -48
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +112 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +148 -73
- package/sdk/platform/Share/SharePlatformApplicationClient.js +40 -20
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +224 -112
- package/sdk/platform/Theme/ThemePlatformClient.js +28 -13
- package/sdk/platform/User/UserPlatformApplicationClient.js +144 -72
- package/sdk/platform/Webhook/WebhookPlatformClient.js +132 -65
- package/sdk/public/Configuration/ConfigurationPublicClient.js +20 -9
- package/sdk/public/Inventory/InventoryPublicClient.js +52 -25
- package/sdk/public/Partner/PartnerPublicClient.js +12 -5
- package/sdk/public/PublicConfig.d.ts +11 -1
- package/sdk/public/PublicConfig.js +10 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +20 -9
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
FDKClientValidationError,
|
|
4
|
+
FDKResponseValidationError,
|
|
5
|
+
} = require("../../common/FDKError");
|
|
3
6
|
const Paginator = require("../../common/Paginator");
|
|
4
7
|
const AuditTrailPlatformValidator = require("./AuditTrailPlatformValidator");
|
|
5
8
|
const AuditTrailPlatformModel = require("./AuditTrailPlatformModel");
|
|
@@ -77,10 +80,14 @@ class AuditTrail {
|
|
|
77
80
|
});
|
|
78
81
|
|
|
79
82
|
if (res_error) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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 > AuditTrail > createAuditLog \n ${res_error}`,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
return response;
|
|
@@ -152,10 +159,14 @@ class AuditTrail {
|
|
|
152
159
|
});
|
|
153
160
|
|
|
154
161
|
if (res_error) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
162
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
163
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
164
|
+
} else {
|
|
165
|
+
Logger({
|
|
166
|
+
level: "WARN",
|
|
167
|
+
message: `Response Validation Warnings for platform > AuditTrail > getAuditLog \n ${res_error}`,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
159
170
|
}
|
|
160
171
|
|
|
161
172
|
return response;
|
|
@@ -234,10 +245,14 @@ class AuditTrail {
|
|
|
234
245
|
});
|
|
235
246
|
|
|
236
247
|
if (res_error) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
248
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
249
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
250
|
+
} else {
|
|
251
|
+
Logger({
|
|
252
|
+
level: "WARN",
|
|
253
|
+
message: `Response Validation Warnings for platform > AuditTrail > getAuditLogs \n ${res_error}`,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
241
256
|
}
|
|
242
257
|
|
|
243
258
|
return response;
|
|
@@ -305,10 +320,14 @@ class AuditTrail {
|
|
|
305
320
|
});
|
|
306
321
|
|
|
307
322
|
if (res_error) {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
323
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
324
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
325
|
+
} else {
|
|
326
|
+
Logger({
|
|
327
|
+
level: "WARN",
|
|
328
|
+
message: `Response Validation Warnings for platform > AuditTrail > getEntityTypes \n ${res_error}`,
|
|
329
|
+
});
|
|
330
|
+
}
|
|
312
331
|
}
|
|
313
332
|
|
|
314
333
|
return response;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
FDKClientValidationError,
|
|
4
|
+
FDKResponseValidationError,
|
|
5
|
+
} = require("../../common/FDKError");
|
|
3
6
|
const Paginator = require("../../common/Paginator");
|
|
4
7
|
const BillingPlatformValidator = require("./BillingPlatformValidator");
|
|
5
8
|
const BillingPlatformModel = require("./BillingPlatformModel");
|
|
@@ -79,10 +82,14 @@ class Billing {
|
|
|
79
82
|
});
|
|
80
83
|
|
|
81
84
|
if (res_error) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
86
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
87
|
+
} else {
|
|
88
|
+
Logger({
|
|
89
|
+
level: "WARN",
|
|
90
|
+
message: `Response Validation Warnings for platform > Billing > activateSubscriptionPlan \n ${res_error}`,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
86
93
|
}
|
|
87
94
|
|
|
88
95
|
return response;
|
|
@@ -158,10 +165,14 @@ class Billing {
|
|
|
158
165
|
});
|
|
159
166
|
|
|
160
167
|
if (res_error) {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
168
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
169
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
170
|
+
} else {
|
|
171
|
+
Logger({
|
|
172
|
+
level: "WARN",
|
|
173
|
+
message: `Response Validation Warnings for platform > Billing > cancelSubscriptionCharge \n ${res_error}`,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
165
176
|
}
|
|
166
177
|
|
|
167
178
|
return response;
|
|
@@ -235,10 +246,14 @@ class Billing {
|
|
|
235
246
|
});
|
|
236
247
|
|
|
237
248
|
if (res_error) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
249
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
250
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
251
|
+
} else {
|
|
252
|
+
Logger({
|
|
253
|
+
level: "WARN",
|
|
254
|
+
message: `Response Validation Warnings for platform > Billing > cancelSubscriptionPlan \n ${res_error}`,
|
|
255
|
+
});
|
|
256
|
+
}
|
|
242
257
|
}
|
|
243
258
|
|
|
244
259
|
return response;
|
|
@@ -314,10 +329,14 @@ class Billing {
|
|
|
314
329
|
});
|
|
315
330
|
|
|
316
331
|
if (res_error) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
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 > Billing > checkCouponValidity \n ${res_error}`,
|
|
338
|
+
});
|
|
339
|
+
}
|
|
321
340
|
}
|
|
322
341
|
|
|
323
342
|
return response;
|
|
@@ -392,10 +411,14 @@ class Billing {
|
|
|
392
411
|
);
|
|
393
412
|
|
|
394
413
|
if (res_error) {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
414
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
415
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
416
|
+
} else {
|
|
417
|
+
Logger({
|
|
418
|
+
level: "WARN",
|
|
419
|
+
message: `Response Validation Warnings for platform > Billing > createOneTimeCharge \n ${res_error}`,
|
|
420
|
+
});
|
|
421
|
+
}
|
|
399
422
|
}
|
|
400
423
|
|
|
401
424
|
return response;
|
|
@@ -472,10 +495,14 @@ class Billing {
|
|
|
472
495
|
);
|
|
473
496
|
|
|
474
497
|
if (res_error) {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
498
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
499
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
500
|
+
} else {
|
|
501
|
+
Logger({
|
|
502
|
+
level: "WARN",
|
|
503
|
+
message: `Response Validation Warnings for platform > Billing > createSubscriptionCharge \n ${res_error}`,
|
|
504
|
+
});
|
|
505
|
+
}
|
|
479
506
|
}
|
|
480
507
|
|
|
481
508
|
return response;
|
|
@@ -549,10 +576,14 @@ class Billing {
|
|
|
549
576
|
});
|
|
550
577
|
|
|
551
578
|
if (res_error) {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
579
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
580
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
581
|
+
} else {
|
|
582
|
+
Logger({
|
|
583
|
+
level: "WARN",
|
|
584
|
+
message: `Response Validation Warnings for platform > Billing > getChargeDetails \n ${res_error}`,
|
|
585
|
+
});
|
|
586
|
+
}
|
|
556
587
|
}
|
|
557
588
|
|
|
558
589
|
return response;
|
|
@@ -620,10 +651,14 @@ class Billing {
|
|
|
620
651
|
});
|
|
621
652
|
|
|
622
653
|
if (res_error) {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
654
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
655
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
656
|
+
} else {
|
|
657
|
+
Logger({
|
|
658
|
+
level: "WARN",
|
|
659
|
+
message: `Response Validation Warnings for platform > Billing > getCustomerDetail \n ${res_error}`,
|
|
660
|
+
});
|
|
661
|
+
}
|
|
627
662
|
}
|
|
628
663
|
|
|
629
664
|
return response;
|
|
@@ -689,10 +724,14 @@ class Billing {
|
|
|
689
724
|
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
690
725
|
|
|
691
726
|
if (res_error) {
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
727
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
728
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
729
|
+
} else {
|
|
730
|
+
Logger({
|
|
731
|
+
level: "WARN",
|
|
732
|
+
message: `Response Validation Warnings for platform > Billing > getEnterprisePlans \n ${res_error}`,
|
|
733
|
+
});
|
|
734
|
+
}
|
|
696
735
|
}
|
|
697
736
|
|
|
698
737
|
return response;
|
|
@@ -760,10 +799,14 @@ class Billing {
|
|
|
760
799
|
});
|
|
761
800
|
|
|
762
801
|
if (res_error) {
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
802
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
803
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
804
|
+
} else {
|
|
805
|
+
Logger({
|
|
806
|
+
level: "WARN",
|
|
807
|
+
message: `Response Validation Warnings for platform > Billing > getFeatureLimitConfig \n ${res_error}`,
|
|
808
|
+
});
|
|
809
|
+
}
|
|
767
810
|
}
|
|
768
811
|
|
|
769
812
|
return response;
|
|
@@ -835,10 +878,14 @@ class Billing {
|
|
|
835
878
|
});
|
|
836
879
|
|
|
837
880
|
if (res_error) {
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
881
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
882
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
883
|
+
} else {
|
|
884
|
+
Logger({
|
|
885
|
+
level: "WARN",
|
|
886
|
+
message: `Response Validation Warnings for platform > Billing > getInvoiceById \n ${res_error}`,
|
|
887
|
+
});
|
|
888
|
+
}
|
|
842
889
|
}
|
|
843
890
|
|
|
844
891
|
return response;
|
|
@@ -904,10 +951,14 @@ class Billing {
|
|
|
904
951
|
});
|
|
905
952
|
|
|
906
953
|
if (res_error) {
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
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 > Billing > getInvoices \n ${res_error}`,
|
|
960
|
+
});
|
|
961
|
+
}
|
|
911
962
|
}
|
|
912
963
|
|
|
913
964
|
return response;
|
|
@@ -976,10 +1027,14 @@ class Billing {
|
|
|
976
1027
|
});
|
|
977
1028
|
|
|
978
1029
|
if (res_error) {
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1030
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1031
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1032
|
+
} else {
|
|
1033
|
+
Logger({
|
|
1034
|
+
level: "WARN",
|
|
1035
|
+
message: `Response Validation Warnings for platform > Billing > getSubscription \n ${res_error}`,
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
983
1038
|
}
|
|
984
1039
|
|
|
985
1040
|
return response;
|
|
@@ -1053,10 +1108,14 @@ class Billing {
|
|
|
1053
1108
|
});
|
|
1054
1109
|
|
|
1055
1110
|
if (res_error) {
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1111
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1112
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1113
|
+
} else {
|
|
1114
|
+
Logger({
|
|
1115
|
+
level: "WARN",
|
|
1116
|
+
message: `Response Validation Warnings for platform > Billing > getSubscriptionCharge \n ${res_error}`,
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1060
1119
|
}
|
|
1061
1120
|
|
|
1062
1121
|
return response;
|
|
@@ -1128,10 +1187,14 @@ class Billing {
|
|
|
1128
1187
|
});
|
|
1129
1188
|
|
|
1130
1189
|
if (res_error) {
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1190
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1191
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1192
|
+
} else {
|
|
1193
|
+
Logger({
|
|
1194
|
+
level: "WARN",
|
|
1195
|
+
message: `Response Validation Warnings for platform > Billing > planStatusUpdate \n ${res_error}`,
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1135
1198
|
}
|
|
1136
1199
|
|
|
1137
1200
|
return response;
|
|
@@ -1203,10 +1266,14 @@ class Billing {
|
|
|
1203
1266
|
});
|
|
1204
1267
|
|
|
1205
1268
|
if (res_error) {
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1269
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1270
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1271
|
+
} else {
|
|
1272
|
+
Logger({
|
|
1273
|
+
level: "WARN",
|
|
1274
|
+
message: `Response Validation Warnings for platform > Billing > subscripePlan \n ${res_error}`,
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1210
1277
|
}
|
|
1211
1278
|
|
|
1212
1279
|
return response;
|
|
@@ -1278,10 +1345,14 @@ class Billing {
|
|
|
1278
1345
|
});
|
|
1279
1346
|
|
|
1280
1347
|
if (res_error) {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1348
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1349
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1350
|
+
} else {
|
|
1351
|
+
Logger({
|
|
1352
|
+
level: "WARN",
|
|
1353
|
+
message: `Response Validation Warnings for platform > Billing > upsertCustomerDetail \n ${res_error}`,
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1285
1356
|
}
|
|
1286
1357
|
|
|
1287
1358
|
return response;
|