@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 DiscountPlatformValidator = require("./DiscountPlatformValidator");
|
|
5
8
|
const DiscountPlatformModel = require("./DiscountPlatformModel");
|
|
@@ -77,10 +80,14 @@ class Discount {
|
|
|
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 > Discount > cancelDownloadJob \n ${res_error}`,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
return response;
|
|
@@ -152,10 +159,14 @@ class Discount {
|
|
|
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 > Discount > cancelValidationJob \n ${res_error}`,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
159
170
|
}
|
|
160
171
|
|
|
161
172
|
return response;
|
|
@@ -227,10 +238,14 @@ class Discount {
|
|
|
227
238
|
});
|
|
228
239
|
|
|
229
240
|
if (res_error) {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
241
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
242
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
243
|
+
} else {
|
|
244
|
+
Logger({
|
|
245
|
+
level: "WARN",
|
|
246
|
+
message: `Response Validation Warnings for platform > Discount > createDiscount \n ${res_error}`,
|
|
247
|
+
});
|
|
248
|
+
}
|
|
234
249
|
}
|
|
235
250
|
|
|
236
251
|
return response;
|
|
@@ -304,10 +319,14 @@ class Discount {
|
|
|
304
319
|
});
|
|
305
320
|
|
|
306
321
|
if (res_error) {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
322
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
323
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
324
|
+
} else {
|
|
325
|
+
Logger({
|
|
326
|
+
level: "WARN",
|
|
327
|
+
message: `Response Validation Warnings for platform > Discount > downloadDiscountFile \n ${res_error}`,
|
|
328
|
+
});
|
|
329
|
+
}
|
|
311
330
|
}
|
|
312
331
|
|
|
313
332
|
return response;
|
|
@@ -379,10 +398,14 @@ class Discount {
|
|
|
379
398
|
});
|
|
380
399
|
|
|
381
400
|
if (res_error) {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
401
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
402
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
403
|
+
} else {
|
|
404
|
+
Logger({
|
|
405
|
+
level: "WARN",
|
|
406
|
+
message: `Response Validation Warnings for platform > Discount > getDiscount \n ${res_error}`,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
386
409
|
}
|
|
387
410
|
|
|
388
411
|
return response;
|
|
@@ -490,10 +513,14 @@ class Discount {
|
|
|
490
513
|
});
|
|
491
514
|
|
|
492
515
|
if (res_error) {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
516
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
517
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
518
|
+
} else {
|
|
519
|
+
Logger({
|
|
520
|
+
level: "WARN",
|
|
521
|
+
message: `Response Validation Warnings for platform > Discount > getDiscounts \n ${res_error}`,
|
|
522
|
+
});
|
|
523
|
+
}
|
|
497
524
|
}
|
|
498
525
|
|
|
499
526
|
return response;
|
|
@@ -616,10 +643,14 @@ class Discount {
|
|
|
616
643
|
});
|
|
617
644
|
|
|
618
645
|
if (res_error) {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
646
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
647
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
648
|
+
} else {
|
|
649
|
+
Logger({
|
|
650
|
+
level: "WARN",
|
|
651
|
+
message: `Response Validation Warnings for platform > Discount > getDownloadJob \n ${res_error}`,
|
|
652
|
+
});
|
|
653
|
+
}
|
|
623
654
|
}
|
|
624
655
|
|
|
625
656
|
return response;
|
|
@@ -691,10 +722,14 @@ class Discount {
|
|
|
691
722
|
});
|
|
692
723
|
|
|
693
724
|
if (res_error) {
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
725
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
726
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
727
|
+
} else {
|
|
728
|
+
Logger({
|
|
729
|
+
level: "WARN",
|
|
730
|
+
message: `Response Validation Warnings for platform > Discount > getValidationJob \n ${res_error}`,
|
|
731
|
+
});
|
|
732
|
+
}
|
|
698
733
|
}
|
|
699
734
|
|
|
700
735
|
return response;
|
|
@@ -768,10 +803,14 @@ class Discount {
|
|
|
768
803
|
});
|
|
769
804
|
|
|
770
805
|
if (res_error) {
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
806
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
807
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
808
|
+
} else {
|
|
809
|
+
Logger({
|
|
810
|
+
level: "WARN",
|
|
811
|
+
message: `Response Validation Warnings for platform > Discount > updateDiscount \n ${res_error}`,
|
|
812
|
+
});
|
|
813
|
+
}
|
|
775
814
|
}
|
|
776
815
|
|
|
777
816
|
return response;
|
|
@@ -843,10 +882,14 @@ class Discount {
|
|
|
843
882
|
});
|
|
844
883
|
|
|
845
884
|
if (res_error) {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
885
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
886
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
887
|
+
} else {
|
|
888
|
+
Logger({
|
|
889
|
+
level: "WARN",
|
|
890
|
+
message: `Response Validation Warnings for platform > Discount > upsertDiscountItems \n ${res_error}`,
|
|
891
|
+
});
|
|
892
|
+
}
|
|
850
893
|
}
|
|
851
894
|
|
|
852
895
|
return response;
|
|
@@ -921,10 +964,14 @@ class Discount {
|
|
|
921
964
|
});
|
|
922
965
|
|
|
923
966
|
if (res_error) {
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
967
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
968
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
969
|
+
} else {
|
|
970
|
+
Logger({
|
|
971
|
+
level: "WARN",
|
|
972
|
+
message: `Response Validation Warnings for platform > Discount > validateDiscountFile \n ${res_error}`,
|
|
973
|
+
});
|
|
974
|
+
}
|
|
928
975
|
}
|
|
929
976
|
|
|
930
977
|
return response;
|
|
@@ -104,10 +104,14 @@ class FileStorage {
|
|
|
104
104
|
});
|
|
105
105
|
|
|
106
106
|
if (res_error) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
108
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
109
|
+
} else {
|
|
110
|
+
Logger({
|
|
111
|
+
level: "WARN",
|
|
112
|
+
message: `Response Validation Warnings for platform > FileStorage > appCompleteUpload \n ${res_error}`,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
111
115
|
}
|
|
112
116
|
|
|
113
117
|
return response;
|
|
@@ -180,10 +184,14 @@ class FileStorage {
|
|
|
180
184
|
});
|
|
181
185
|
|
|
182
186
|
if (res_error) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
188
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
189
|
+
} else {
|
|
190
|
+
Logger({
|
|
191
|
+
level: "WARN",
|
|
192
|
+
message: `Response Validation Warnings for platform > FileStorage > appCopyFiles \n ${res_error}`,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
187
195
|
}
|
|
188
196
|
|
|
189
197
|
return response;
|
|
@@ -279,10 +287,14 @@ class FileStorage {
|
|
|
279
287
|
});
|
|
280
288
|
|
|
281
289
|
if (res_error) {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
290
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
291
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
292
|
+
} else {
|
|
293
|
+
Logger({
|
|
294
|
+
level: "WARN",
|
|
295
|
+
message: `Response Validation Warnings for platform > FileStorage > appStartUpload \n ${res_error}`,
|
|
296
|
+
});
|
|
297
|
+
}
|
|
286
298
|
}
|
|
287
299
|
|
|
288
300
|
return response;
|
|
@@ -360,10 +372,14 @@ class FileStorage {
|
|
|
360
372
|
});
|
|
361
373
|
|
|
362
374
|
if (res_error) {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
375
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
376
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
377
|
+
} else {
|
|
378
|
+
Logger({
|
|
379
|
+
level: "WARN",
|
|
380
|
+
message: `Response Validation Warnings for platform > FileStorage > appbrowse \n ${res_error}`,
|
|
381
|
+
});
|
|
382
|
+
}
|
|
367
383
|
}
|
|
368
384
|
|
|
369
385
|
return response;
|
|
@@ -435,10 +451,14 @@ class FileStorage {
|
|
|
435
451
|
});
|
|
436
452
|
|
|
437
453
|
if (res_error) {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
454
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
455
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
456
|
+
} else {
|
|
457
|
+
Logger({
|
|
458
|
+
level: "WARN",
|
|
459
|
+
message: `Response Validation Warnings for platform > FileStorage > generatePaymentReceipt \n ${res_error}`,
|
|
460
|
+
});
|
|
461
|
+
}
|
|
442
462
|
}
|
|
443
463
|
|
|
444
464
|
return response;
|
|
@@ -516,10 +536,14 @@ class FileStorage {
|
|
|
516
536
|
});
|
|
517
537
|
|
|
518
538
|
if (res_error) {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
539
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
540
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
541
|
+
} else {
|
|
542
|
+
Logger({
|
|
543
|
+
level: "WARN",
|
|
544
|
+
message: `Response Validation Warnings for platform > FileStorage > getDefaultHtmlTemplate \n ${res_error}`,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
523
547
|
}
|
|
524
548
|
|
|
525
549
|
return response;
|
|
@@ -595,10 +619,14 @@ class FileStorage {
|
|
|
595
619
|
);
|
|
596
620
|
|
|
597
621
|
if (res_error) {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
622
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
623
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
624
|
+
} else {
|
|
625
|
+
Logger({
|
|
626
|
+
level: "WARN",
|
|
627
|
+
message: `Response Validation Warnings for platform > FileStorage > getDefaultPdfData \n ${res_error}`,
|
|
628
|
+
});
|
|
629
|
+
}
|
|
602
630
|
}
|
|
603
631
|
|
|
604
632
|
return response;
|
|
@@ -677,10 +705,14 @@ class FileStorage {
|
|
|
677
705
|
);
|
|
678
706
|
|
|
679
707
|
if (res_error) {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
708
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
709
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
710
|
+
} else {
|
|
711
|
+
Logger({
|
|
712
|
+
level: "WARN",
|
|
713
|
+
message: `Response Validation Warnings for platform > FileStorage > getDefaultPdfTemplate \n ${res_error}`,
|
|
714
|
+
});
|
|
715
|
+
}
|
|
684
716
|
}
|
|
685
717
|
|
|
686
718
|
return response;
|
|
@@ -749,10 +781,14 @@ class FileStorage {
|
|
|
749
781
|
});
|
|
750
782
|
|
|
751
783
|
if (res_error) {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
784
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
785
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
786
|
+
} else {
|
|
787
|
+
Logger({
|
|
788
|
+
level: "WARN",
|
|
789
|
+
message: `Response Validation Warnings for platform > FileStorage > getPdfTypes \n ${res_error}`,
|
|
790
|
+
});
|
|
791
|
+
}
|
|
756
792
|
}
|
|
757
793
|
|
|
758
794
|
return response;
|
|
@@ -827,10 +863,14 @@ class FileStorage {
|
|
|
827
863
|
});
|
|
828
864
|
|
|
829
865
|
if (res_error) {
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
866
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
867
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
868
|
+
} else {
|
|
869
|
+
Logger({
|
|
870
|
+
level: "WARN",
|
|
871
|
+
message: `Response Validation Warnings for platform > FileStorage > saveHtmlTemplate \n ${res_error}`,
|
|
872
|
+
});
|
|
873
|
+
}
|
|
834
874
|
}
|
|
835
875
|
|
|
836
876
|
return response;
|
|
@@ -907,10 +947,14 @@ class FileStorage {
|
|
|
907
947
|
});
|
|
908
948
|
|
|
909
949
|
if (res_error) {
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
950
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
951
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
952
|
+
} else {
|
|
953
|
+
Logger({
|
|
954
|
+
level: "WARN",
|
|
955
|
+
message: `Response Validation Warnings for platform > FileStorage > updateHtmlTemplate \n ${res_error}`,
|
|
956
|
+
});
|
|
957
|
+
}
|
|
914
958
|
}
|
|
915
959
|
|
|
916
960
|
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 FileStoragePlatformValidator = require("./FileStoragePlatformValidator");
|
|
5
8
|
const FileStoragePlatformModel = require("./FileStoragePlatformModel");
|
|
@@ -83,10 +86,14 @@ class FileStorage {
|
|
|
83
86
|
});
|
|
84
87
|
|
|
85
88
|
if (res_error) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
90
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
91
|
+
} else {
|
|
92
|
+
Logger({
|
|
93
|
+
level: "WARN",
|
|
94
|
+
message: `Response Validation Warnings for platform > FileStorage > browse \n ${res_error}`,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
90
97
|
}
|
|
91
98
|
|
|
92
99
|
return response;
|
|
@@ -180,10 +187,14 @@ class FileStorage {
|
|
|
180
187
|
});
|
|
181
188
|
|
|
182
189
|
if (res_error) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
190
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
191
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
192
|
+
} else {
|
|
193
|
+
Logger({
|
|
194
|
+
level: "WARN",
|
|
195
|
+
message: `Response Validation Warnings for platform > FileStorage > completeUpload \n ${res_error}`,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
187
198
|
}
|
|
188
199
|
|
|
189
200
|
return response;
|
|
@@ -256,10 +267,14 @@ class FileStorage {
|
|
|
256
267
|
});
|
|
257
268
|
|
|
258
269
|
if (res_error) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
270
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
271
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
272
|
+
} else {
|
|
273
|
+
Logger({
|
|
274
|
+
level: "WARN",
|
|
275
|
+
message: `Response Validation Warnings for platform > FileStorage > copyFiles \n ${res_error}`,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
263
278
|
}
|
|
264
279
|
|
|
265
280
|
return response;
|
|
@@ -331,10 +346,14 @@ class FileStorage {
|
|
|
331
346
|
});
|
|
332
347
|
|
|
333
348
|
if (res_error) {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
349
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
350
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
351
|
+
} else {
|
|
352
|
+
Logger({
|
|
353
|
+
level: "WARN",
|
|
354
|
+
message: `Response Validation Warnings for platform > FileStorage > getSignUrls \n ${res_error}`,
|
|
355
|
+
});
|
|
356
|
+
}
|
|
338
357
|
}
|
|
339
358
|
|
|
340
359
|
return response;
|
|
@@ -402,10 +421,14 @@ class FileStorage {
|
|
|
402
421
|
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
403
422
|
|
|
404
423
|
if (res_error) {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
424
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
425
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
426
|
+
} else {
|
|
427
|
+
Logger({
|
|
428
|
+
level: "WARN",
|
|
429
|
+
message: `Response Validation Warnings for platform > FileStorage > proxy \n ${res_error}`,
|
|
430
|
+
});
|
|
431
|
+
}
|
|
409
432
|
}
|
|
410
433
|
|
|
411
434
|
return response;
|
|
@@ -499,10 +522,14 @@ class FileStorage {
|
|
|
499
522
|
});
|
|
500
523
|
|
|
501
524
|
if (res_error) {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
525
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
526
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
527
|
+
} else {
|
|
528
|
+
Logger({
|
|
529
|
+
level: "WARN",
|
|
530
|
+
message: `Response Validation Warnings for platform > FileStorage > startUpload \n ${res_error}`,
|
|
531
|
+
});
|
|
532
|
+
}
|
|
506
533
|
}
|
|
507
534
|
|
|
508
535
|
return response;
|