@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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationConfig.d.ts +11 -3
- package/sdk/application/ApplicationConfig.js +21 -3
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +232 -116
- package/sdk/application/Cart/CartApplicationValidator.d.ts +2 -0
- package/sdk/application/Cart/CartApplicationValidator.js +2 -0
- 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.d.ts +1 -1
- package/sdk/application/PosCart/PosCartApplicationClient.js +224 -112
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +2 -0
- package/sdk/application/PosCart/PosCartApplicationValidator.js +2 -0
- 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/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.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +460 -229
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +2 -0
- 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.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformClient.js +356 -254
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +1 -20
- package/sdk/platform/Order/OrderPlatformValidator.js +0 -15
- 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 ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
FDKClientValidationError,
|
|
4
|
+
FDKResponseValidationError,
|
|
5
|
+
} = require("../../common/FDKError");
|
|
3
6
|
const constructUrl = require("../constructUrl");
|
|
4
7
|
const Paginator = require("../../common/Paginator");
|
|
5
8
|
const OrderApplicationValidator = require("./OrderApplicationValidator");
|
|
@@ -120,10 +123,14 @@ class Order {
|
|
|
120
123
|
});
|
|
121
124
|
|
|
122
125
|
if (res_error) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
127
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
128
|
+
} else {
|
|
129
|
+
Logger({
|
|
130
|
+
level: "WARN",
|
|
131
|
+
message: `Response Validation Warnings for application > Order > getCustomerDetailsByShipmentId \n ${res_error}`,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
127
134
|
}
|
|
128
135
|
|
|
129
136
|
return response;
|
|
@@ -197,10 +204,14 @@ class Order {
|
|
|
197
204
|
);
|
|
198
205
|
|
|
199
206
|
if (res_error) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
207
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
208
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
209
|
+
} else {
|
|
210
|
+
Logger({
|
|
211
|
+
level: "WARN",
|
|
212
|
+
message: `Response Validation Warnings for application > Order > getInvoiceByShipmentId \n ${res_error}`,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
204
215
|
}
|
|
205
216
|
|
|
206
217
|
return response;
|
|
@@ -271,10 +282,14 @@ class Order {
|
|
|
271
282
|
});
|
|
272
283
|
|
|
273
284
|
if (res_error) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
285
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
286
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
287
|
+
} else {
|
|
288
|
+
Logger({
|
|
289
|
+
level: "WARN",
|
|
290
|
+
message: `Response Validation Warnings for application > Order > getOrderById \n ${res_error}`,
|
|
291
|
+
});
|
|
292
|
+
}
|
|
278
293
|
}
|
|
279
294
|
|
|
280
295
|
return response;
|
|
@@ -357,10 +372,14 @@ class Order {
|
|
|
357
372
|
});
|
|
358
373
|
|
|
359
374
|
if (res_error) {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
375
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
376
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
377
|
+
} else {
|
|
378
|
+
Logger({
|
|
379
|
+
level: "WARN",
|
|
380
|
+
message: `Response Validation Warnings for application > Order > getOrders \n ${res_error}`,
|
|
381
|
+
});
|
|
382
|
+
}
|
|
364
383
|
}
|
|
365
384
|
|
|
366
385
|
return response;
|
|
@@ -431,10 +450,14 @@ class Order {
|
|
|
431
450
|
});
|
|
432
451
|
|
|
433
452
|
if (res_error) {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
453
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
454
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
455
|
+
} else {
|
|
456
|
+
Logger({
|
|
457
|
+
level: "WARN",
|
|
458
|
+
message: `Response Validation Warnings for application > Order > getPosOrderById \n ${res_error}`,
|
|
459
|
+
});
|
|
460
|
+
}
|
|
438
461
|
}
|
|
439
462
|
|
|
440
463
|
return response;
|
|
@@ -507,10 +530,14 @@ class Order {
|
|
|
507
530
|
});
|
|
508
531
|
|
|
509
532
|
if (res_error) {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
533
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
534
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
535
|
+
} else {
|
|
536
|
+
Logger({
|
|
537
|
+
level: "WARN",
|
|
538
|
+
message: `Response Validation Warnings for application > Order > getShipmentBagReasons \n ${res_error}`,
|
|
539
|
+
});
|
|
540
|
+
}
|
|
514
541
|
}
|
|
515
542
|
|
|
516
543
|
return response;
|
|
@@ -581,10 +608,14 @@ class Order {
|
|
|
581
608
|
});
|
|
582
609
|
|
|
583
610
|
if (res_error) {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
611
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
612
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
613
|
+
} else {
|
|
614
|
+
Logger({
|
|
615
|
+
level: "WARN",
|
|
616
|
+
message: `Response Validation Warnings for application > Order > getShipmentById \n ${res_error}`,
|
|
617
|
+
});
|
|
618
|
+
}
|
|
588
619
|
}
|
|
589
620
|
|
|
590
621
|
return response;
|
|
@@ -655,10 +686,14 @@ class Order {
|
|
|
655
686
|
});
|
|
656
687
|
|
|
657
688
|
if (res_error) {
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
689
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
690
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
691
|
+
} else {
|
|
692
|
+
Logger({
|
|
693
|
+
level: "WARN",
|
|
694
|
+
message: `Response Validation Warnings for application > Order > getShipmentReasons \n ${res_error}`,
|
|
695
|
+
});
|
|
696
|
+
}
|
|
662
697
|
}
|
|
663
698
|
|
|
664
699
|
return response;
|
|
@@ -732,10 +767,14 @@ class Order {
|
|
|
732
767
|
);
|
|
733
768
|
|
|
734
769
|
if (res_error) {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
770
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
771
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
772
|
+
} else {
|
|
773
|
+
Logger({
|
|
774
|
+
level: "WARN",
|
|
775
|
+
message: `Response Validation Warnings for application > Order > sendOtpToShipmentCustomer \n ${res_error}`,
|
|
776
|
+
});
|
|
777
|
+
}
|
|
739
778
|
}
|
|
740
779
|
|
|
741
780
|
return response;
|
|
@@ -806,10 +845,14 @@ class Order {
|
|
|
806
845
|
});
|
|
807
846
|
|
|
808
847
|
if (res_error) {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
848
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
849
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
850
|
+
} else {
|
|
851
|
+
Logger({
|
|
852
|
+
level: "WARN",
|
|
853
|
+
message: `Response Validation Warnings for application > Order > trackShipment \n ${res_error}`,
|
|
854
|
+
});
|
|
855
|
+
}
|
|
813
856
|
}
|
|
814
857
|
|
|
815
858
|
return response;
|
|
@@ -882,10 +925,14 @@ class Order {
|
|
|
882
925
|
);
|
|
883
926
|
|
|
884
927
|
if (res_error) {
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
928
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
929
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
930
|
+
} else {
|
|
931
|
+
Logger({
|
|
932
|
+
level: "WARN",
|
|
933
|
+
message: `Response Validation Warnings for application > Order > updateShipmentStatus \n ${res_error}`,
|
|
934
|
+
});
|
|
935
|
+
}
|
|
889
936
|
}
|
|
890
937
|
|
|
891
938
|
return response;
|
|
@@ -958,10 +1005,14 @@ class Order {
|
|
|
958
1005
|
});
|
|
959
1006
|
|
|
960
1007
|
if (res_error) {
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
1008
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1009
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1010
|
+
} else {
|
|
1011
|
+
Logger({
|
|
1012
|
+
level: "WARN",
|
|
1013
|
+
message: `Response Validation Warnings for application > Order > verifyOtpShipmentCustomer \n ${res_error}`,
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
965
1016
|
}
|
|
966
1017
|
|
|
967
1018
|
return response;
|