@gofynd/fdk-client-javascript 1.5.1 → 1.6.0
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/Cart/CartApplicationClient.js +293 -0
- package/sdk/application/Catalog/CatalogApplicationClient.js +408 -0
- package/sdk/application/Common/CommonApplicationClient.js +21 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +147 -0
- package/sdk/application/Content/ContentApplicationClient.js +226 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +43 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +21 -0
- package/sdk/application/Lead/LeadApplicationClient.js +73 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.js +192 -3
- package/sdk/application/Order/OrderApplicationClient.js +202 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +454 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +68 -0
- package/sdk/application/Share/ShareApplicationClient.js +96 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +64 -0
- package/sdk/application/User/UserApplicationClient.js +412 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +13 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +75 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +6 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +16 -3
- package/sdk/partner/Webhook/WebhookPartnerModel.js +5 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +46 -23
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -23
- package/sdk/platform/Cart/CartPlatformModel.d.ts +59 -1
- package/sdk/platform/Cart/CartPlatformModel.js +31 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -12
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -81
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -10
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -12
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +82 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +10 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +12 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +129 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +94 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
- package/sdk/platform/User/UserPlatformModel.js +2 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +58 -14
- package/sdk/platform/Webhook/WebhookPlatformModel.js +15 -14
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +138 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +155 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +16 -0
- package/sdk/public/Content/ContentPublicClient.js +116 -0
- package/sdk/public/Partner/PartnerPublicClient.js +15 -0
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +40 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +194 -46
- package/sdk/public/Webhook/WebhookPublicModel.js +51 -46
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
package/README.md
CHANGED
|
@@ -237,7 +237,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
237
237
|
The above code will log the curl command in the console
|
|
238
238
|
|
|
239
239
|
```bash
|
|
240
|
-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.
|
|
240
|
+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.6.0' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
241
241
|
Active Theme: Emerge
|
|
242
242
|
```
|
|
243
243
|
|
package/package.json
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
const {
|
|
2
|
+
FDKClientValidationError,
|
|
3
|
+
FDKResponseValidationError,
|
|
4
|
+
} = require("../../common/FDKError");
|
|
5
|
+
|
|
1
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
7
|
const constructUrl = require("../constructUrl");
|
|
3
8
|
const Paginator = require("../../common/Paginator");
|
|
@@ -68,6 +73,14 @@ class Cart {
|
|
|
68
73
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
69
74
|
{ responseHeaders } = { responseHeaders: false }
|
|
70
75
|
) {
|
|
76
|
+
let invalidInput = [];
|
|
77
|
+
if (invalidInput.length) {
|
|
78
|
+
const error = new Error();
|
|
79
|
+
error.message = "Missing required field";
|
|
80
|
+
error.details = invalidInput;
|
|
81
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
82
|
+
}
|
|
83
|
+
|
|
71
84
|
const query_params = {};
|
|
72
85
|
|
|
73
86
|
const xHeaders = {};
|
|
@@ -107,6 +120,14 @@ class Cart {
|
|
|
107
120
|
},
|
|
108
121
|
{ responseHeaders } = { responseHeaders: false }
|
|
109
122
|
) {
|
|
123
|
+
let invalidInput = [];
|
|
124
|
+
if (invalidInput.length) {
|
|
125
|
+
const error = new Error();
|
|
126
|
+
error.message = "Missing required field";
|
|
127
|
+
error.details = invalidInput;
|
|
128
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
129
|
+
}
|
|
130
|
+
|
|
110
131
|
const query_params = {};
|
|
111
132
|
query_params["i"] = i;
|
|
112
133
|
query_params["b"] = b;
|
|
@@ -152,6 +173,14 @@ class Cart {
|
|
|
152
173
|
},
|
|
153
174
|
{ responseHeaders } = { responseHeaders: false }
|
|
154
175
|
) {
|
|
176
|
+
let invalidInput = [];
|
|
177
|
+
if (invalidInput.length) {
|
|
178
|
+
const error = new Error();
|
|
179
|
+
error.message = "Missing required field";
|
|
180
|
+
error.details = invalidInput;
|
|
181
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
182
|
+
}
|
|
183
|
+
|
|
155
184
|
const query_params = {};
|
|
156
185
|
query_params["i"] = i;
|
|
157
186
|
query_params["b"] = b;
|
|
@@ -195,6 +224,14 @@ class Cart {
|
|
|
195
224
|
{ body, id, i, b, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
196
225
|
{ responseHeaders } = { responseHeaders: false }
|
|
197
226
|
) {
|
|
227
|
+
let invalidInput = [];
|
|
228
|
+
if (invalidInput.length) {
|
|
229
|
+
const error = new Error();
|
|
230
|
+
error.message = "Missing required field";
|
|
231
|
+
error.details = invalidInput;
|
|
232
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
233
|
+
}
|
|
234
|
+
|
|
198
235
|
const query_params = {};
|
|
199
236
|
query_params["id"] = id;
|
|
200
237
|
query_params["i"] = i;
|
|
@@ -236,6 +273,14 @@ class Cart {
|
|
|
236
273
|
{ body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
|
|
237
274
|
{ responseHeaders } = { responseHeaders: false }
|
|
238
275
|
) {
|
|
276
|
+
let invalidInput = [];
|
|
277
|
+
if (invalidInput.length) {
|
|
278
|
+
const error = new Error();
|
|
279
|
+
error.message = "Missing required field";
|
|
280
|
+
error.details = invalidInput;
|
|
281
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
282
|
+
}
|
|
283
|
+
|
|
239
284
|
const query_params = {};
|
|
240
285
|
query_params["buy_now"] = buyNow;
|
|
241
286
|
query_params["cart_type"] = cartType;
|
|
@@ -275,6 +320,14 @@ class Cart {
|
|
|
275
320
|
{ body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
|
|
276
321
|
{ responseHeaders } = { responseHeaders: false }
|
|
277
322
|
) {
|
|
323
|
+
let invalidInput = [];
|
|
324
|
+
if (invalidInput.length) {
|
|
325
|
+
const error = new Error();
|
|
326
|
+
error.message = "Missing required field";
|
|
327
|
+
error.details = invalidInput;
|
|
328
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
329
|
+
}
|
|
330
|
+
|
|
278
331
|
const query_params = {};
|
|
279
332
|
query_params["buy_now"] = buyNow;
|
|
280
333
|
query_params["cart_type"] = cartType;
|
|
@@ -314,6 +367,14 @@ class Cart {
|
|
|
314
367
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
315
368
|
{ responseHeaders } = { responseHeaders: false }
|
|
316
369
|
) {
|
|
370
|
+
let invalidInput = [];
|
|
371
|
+
if (invalidInput.length) {
|
|
372
|
+
const error = new Error();
|
|
373
|
+
error.message = "Missing required field";
|
|
374
|
+
error.details = invalidInput;
|
|
375
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
376
|
+
}
|
|
377
|
+
|
|
317
378
|
const query_params = {};
|
|
318
379
|
query_params["id"] = id;
|
|
319
380
|
|
|
@@ -361,6 +422,21 @@ class Cart {
|
|
|
361
422
|
} = { requestHeaders: {} },
|
|
362
423
|
{ responseHeaders } = { responseHeaders: false }
|
|
363
424
|
) {
|
|
425
|
+
let invalidInput = [];
|
|
426
|
+
|
|
427
|
+
if (!id) {
|
|
428
|
+
invalidInput.push({
|
|
429
|
+
message: `The 'id' field is required.`,
|
|
430
|
+
path: ["id"],
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
if (invalidInput.length) {
|
|
434
|
+
const error = new Error();
|
|
435
|
+
error.message = "Missing required field";
|
|
436
|
+
error.details = invalidInput;
|
|
437
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
438
|
+
}
|
|
439
|
+
|
|
364
440
|
const query_params = {};
|
|
365
441
|
query_params["cart_id"] = cartId;
|
|
366
442
|
query_params["buy_now"] = buyNow;
|
|
@@ -412,6 +488,14 @@ class Cart {
|
|
|
412
488
|
} = { requestHeaders: {} },
|
|
413
489
|
{ responseHeaders } = { responseHeaders: false }
|
|
414
490
|
) {
|
|
491
|
+
let invalidInput = [];
|
|
492
|
+
if (invalidInput.length) {
|
|
493
|
+
const error = new Error();
|
|
494
|
+
error.message = "Missing required field";
|
|
495
|
+
error.details = invalidInput;
|
|
496
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
497
|
+
}
|
|
498
|
+
|
|
415
499
|
const query_params = {};
|
|
416
500
|
query_params["cart_id"] = cartId;
|
|
417
501
|
query_params["buy_now"] = buyNow;
|
|
@@ -455,6 +539,14 @@ class Cart {
|
|
|
455
539
|
{ itemId, articleId, uid, slug, requestHeaders } = { requestHeaders: {} },
|
|
456
540
|
{ responseHeaders } = { responseHeaders: false }
|
|
457
541
|
) {
|
|
542
|
+
let invalidInput = [];
|
|
543
|
+
if (invalidInput.length) {
|
|
544
|
+
const error = new Error();
|
|
545
|
+
error.message = "Missing required field";
|
|
546
|
+
error.details = invalidInput;
|
|
547
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
548
|
+
}
|
|
549
|
+
|
|
458
550
|
const query_params = {};
|
|
459
551
|
query_params["item_id"] = itemId;
|
|
460
552
|
query_params["article_id"] = articleId;
|
|
@@ -506,6 +598,14 @@ class Cart {
|
|
|
506
598
|
} = { requestHeaders: {} },
|
|
507
599
|
{ responseHeaders } = { responseHeaders: false }
|
|
508
600
|
) {
|
|
601
|
+
let invalidInput = [];
|
|
602
|
+
if (invalidInput.length) {
|
|
603
|
+
const error = new Error();
|
|
604
|
+
error.message = "Missing required field";
|
|
605
|
+
error.details = invalidInput;
|
|
606
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
607
|
+
}
|
|
608
|
+
|
|
509
609
|
const query_params = {};
|
|
510
610
|
query_params["id"] = id;
|
|
511
611
|
query_params["i"] = i;
|
|
@@ -551,6 +651,14 @@ class Cart {
|
|
|
551
651
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
552
652
|
{ responseHeaders } = { responseHeaders: false }
|
|
553
653
|
) {
|
|
654
|
+
let invalidInput = [];
|
|
655
|
+
if (invalidInput.length) {
|
|
656
|
+
const error = new Error();
|
|
657
|
+
error.message = "Missing required field";
|
|
658
|
+
error.details = invalidInput;
|
|
659
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
660
|
+
}
|
|
661
|
+
|
|
554
662
|
const query_params = {};
|
|
555
663
|
query_params["id"] = id;
|
|
556
664
|
|
|
@@ -589,6 +697,14 @@ class Cart {
|
|
|
589
697
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
590
698
|
{ responseHeaders } = { responseHeaders: false }
|
|
591
699
|
) {
|
|
700
|
+
let invalidInput = [];
|
|
701
|
+
if (invalidInput.length) {
|
|
702
|
+
const error = new Error();
|
|
703
|
+
error.message = "Missing required field";
|
|
704
|
+
error.details = invalidInput;
|
|
705
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
706
|
+
}
|
|
707
|
+
|
|
592
708
|
const query_params = {};
|
|
593
709
|
|
|
594
710
|
const xHeaders = {};
|
|
@@ -626,6 +742,21 @@ class Cart {
|
|
|
626
742
|
{ token, requestHeaders } = { requestHeaders: {} },
|
|
627
743
|
{ responseHeaders } = { responseHeaders: false }
|
|
628
744
|
) {
|
|
745
|
+
let invalidInput = [];
|
|
746
|
+
|
|
747
|
+
if (!token) {
|
|
748
|
+
invalidInput.push({
|
|
749
|
+
message: `The 'token' field is required.`,
|
|
750
|
+
path: ["token"],
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
if (invalidInput.length) {
|
|
754
|
+
const error = new Error();
|
|
755
|
+
error.message = "Missing required field";
|
|
756
|
+
error.details = invalidInput;
|
|
757
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
758
|
+
}
|
|
759
|
+
|
|
629
760
|
const query_params = {};
|
|
630
761
|
|
|
631
762
|
const xHeaders = {};
|
|
@@ -663,6 +794,14 @@ class Cart {
|
|
|
663
794
|
{ id, buyNow, slug, storeId, requestHeaders } = { requestHeaders: {} },
|
|
664
795
|
{ responseHeaders } = { responseHeaders: false }
|
|
665
796
|
) {
|
|
797
|
+
let invalidInput = [];
|
|
798
|
+
if (invalidInput.length) {
|
|
799
|
+
const error = new Error();
|
|
800
|
+
error.message = "Missing required field";
|
|
801
|
+
error.details = invalidInput;
|
|
802
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
803
|
+
}
|
|
804
|
+
|
|
666
805
|
const query_params = {};
|
|
667
806
|
query_params["id"] = id;
|
|
668
807
|
query_params["buy_now"] = buyNow;
|
|
@@ -704,6 +843,14 @@ class Cart {
|
|
|
704
843
|
{ id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
705
844
|
{ responseHeaders } = { responseHeaders: false }
|
|
706
845
|
) {
|
|
846
|
+
let invalidInput = [];
|
|
847
|
+
if (invalidInput.length) {
|
|
848
|
+
const error = new Error();
|
|
849
|
+
error.message = "Missing required field";
|
|
850
|
+
error.details = invalidInput;
|
|
851
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
852
|
+
}
|
|
853
|
+
|
|
707
854
|
const query_params = {};
|
|
708
855
|
query_params["id"] = id;
|
|
709
856
|
query_params["buy_now"] = buyNow;
|
|
@@ -745,6 +892,21 @@ class Cart {
|
|
|
745
892
|
},
|
|
746
893
|
{ responseHeaders } = { responseHeaders: false }
|
|
747
894
|
) {
|
|
895
|
+
let invalidInput = [];
|
|
896
|
+
|
|
897
|
+
if (!slug) {
|
|
898
|
+
invalidInput.push({
|
|
899
|
+
message: `The 'slug' field is required.`,
|
|
900
|
+
path: ["slug"],
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
if (invalidInput.length) {
|
|
904
|
+
const error = new Error();
|
|
905
|
+
error.message = "Missing required field";
|
|
906
|
+
error.details = invalidInput;
|
|
907
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
908
|
+
}
|
|
909
|
+
|
|
748
910
|
const query_params = {};
|
|
749
911
|
query_params["slug"] = slug;
|
|
750
912
|
query_params["store_id"] = storeId;
|
|
@@ -788,6 +950,14 @@ class Cart {
|
|
|
788
950
|
},
|
|
789
951
|
{ responseHeaders } = { responseHeaders: false }
|
|
790
952
|
) {
|
|
953
|
+
let invalidInput = [];
|
|
954
|
+
if (invalidInput.length) {
|
|
955
|
+
const error = new Error();
|
|
956
|
+
error.message = "Missing required field";
|
|
957
|
+
error.details = invalidInput;
|
|
958
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
959
|
+
}
|
|
960
|
+
|
|
791
961
|
const query_params = {};
|
|
792
962
|
query_params["slug"] = slug;
|
|
793
963
|
query_params["page_size"] = pageSize;
|
|
@@ -830,6 +1000,14 @@ class Cart {
|
|
|
830
1000
|
{ id, uid, requestHeaders } = { requestHeaders: {} },
|
|
831
1001
|
{ responseHeaders } = { responseHeaders: false }
|
|
832
1002
|
) {
|
|
1003
|
+
let invalidInput = [];
|
|
1004
|
+
if (invalidInput.length) {
|
|
1005
|
+
const error = new Error();
|
|
1006
|
+
error.message = "Missing required field";
|
|
1007
|
+
error.details = invalidInput;
|
|
1008
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1009
|
+
}
|
|
1010
|
+
|
|
833
1011
|
const query_params = {};
|
|
834
1012
|
query_params["id"] = id;
|
|
835
1013
|
query_params["uid"] = uid;
|
|
@@ -871,6 +1049,14 @@ class Cart {
|
|
|
871
1049
|
},
|
|
872
1050
|
{ responseHeaders } = { responseHeaders: false }
|
|
873
1051
|
) {
|
|
1052
|
+
let invalidInput = [];
|
|
1053
|
+
if (invalidInput.length) {
|
|
1054
|
+
const error = new Error();
|
|
1055
|
+
error.message = "Missing required field";
|
|
1056
|
+
error.details = invalidInput;
|
|
1057
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1058
|
+
}
|
|
1059
|
+
|
|
874
1060
|
const query_params = {};
|
|
875
1061
|
query_params["p"] = p;
|
|
876
1062
|
query_params["id"] = id;
|
|
@@ -914,6 +1100,21 @@ class Cart {
|
|
|
914
1100
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
915
1101
|
{ responseHeaders } = { responseHeaders: false }
|
|
916
1102
|
) {
|
|
1103
|
+
let invalidInput = [];
|
|
1104
|
+
|
|
1105
|
+
if (!id) {
|
|
1106
|
+
invalidInput.push({
|
|
1107
|
+
message: `The 'id' field is required.`,
|
|
1108
|
+
path: ["id"],
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
if (invalidInput.length) {
|
|
1112
|
+
const error = new Error();
|
|
1113
|
+
error.message = "Missing required field";
|
|
1114
|
+
error.details = invalidInput;
|
|
1115
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1116
|
+
}
|
|
1117
|
+
|
|
917
1118
|
const query_params = {};
|
|
918
1119
|
|
|
919
1120
|
const xHeaders = {};
|
|
@@ -951,6 +1152,14 @@ class Cart {
|
|
|
951
1152
|
{ id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
952
1153
|
{ responseHeaders } = { responseHeaders: false }
|
|
953
1154
|
) {
|
|
1155
|
+
let invalidInput = [];
|
|
1156
|
+
if (invalidInput.length) {
|
|
1157
|
+
const error = new Error();
|
|
1158
|
+
error.message = "Missing required field";
|
|
1159
|
+
error.details = invalidInput;
|
|
1160
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1161
|
+
}
|
|
1162
|
+
|
|
954
1163
|
const query_params = {};
|
|
955
1164
|
query_params["id"] = id;
|
|
956
1165
|
query_params["buy_now"] = buyNow;
|
|
@@ -990,6 +1199,14 @@ class Cart {
|
|
|
990
1199
|
{ body, cartId, buyNow, i, b, requestHeaders } = { requestHeaders: {} },
|
|
991
1200
|
{ responseHeaders } = { responseHeaders: false }
|
|
992
1201
|
) {
|
|
1202
|
+
let invalidInput = [];
|
|
1203
|
+
if (invalidInput.length) {
|
|
1204
|
+
const error = new Error();
|
|
1205
|
+
error.message = "Missing required field";
|
|
1206
|
+
error.details = invalidInput;
|
|
1207
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1208
|
+
}
|
|
1209
|
+
|
|
993
1210
|
const query_params = {};
|
|
994
1211
|
query_params["cart_id"] = cartId;
|
|
995
1212
|
query_params["buy_now"] = buyNow;
|
|
@@ -1031,6 +1248,14 @@ class Cart {
|
|
|
1031
1248
|
{ body, id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1032
1249
|
{ responseHeaders } = { responseHeaders: false }
|
|
1033
1250
|
) {
|
|
1251
|
+
let invalidInput = [];
|
|
1252
|
+
if (invalidInput.length) {
|
|
1253
|
+
const error = new Error();
|
|
1254
|
+
error.message = "Missing required field";
|
|
1255
|
+
error.details = invalidInput;
|
|
1256
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1034
1259
|
const query_params = {};
|
|
1035
1260
|
query_params["id"] = id;
|
|
1036
1261
|
query_params["buy_now"] = buyNow;
|
|
@@ -1070,6 +1295,21 @@ class Cart {
|
|
|
1070
1295
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
1071
1296
|
{ responseHeaders } = { responseHeaders: false }
|
|
1072
1297
|
) {
|
|
1298
|
+
let invalidInput = [];
|
|
1299
|
+
|
|
1300
|
+
if (!id) {
|
|
1301
|
+
invalidInput.push({
|
|
1302
|
+
message: `The 'id' field is required.`,
|
|
1303
|
+
path: ["id"],
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
if (invalidInput.length) {
|
|
1307
|
+
const error = new Error();
|
|
1308
|
+
error.message = "Missing required field";
|
|
1309
|
+
error.details = invalidInput;
|
|
1310
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1073
1313
|
const query_params = {};
|
|
1074
1314
|
|
|
1075
1315
|
const xHeaders = {};
|
|
@@ -1117,6 +1357,14 @@ class Cart {
|
|
|
1117
1357
|
} = { requestHeaders: {} },
|
|
1118
1358
|
{ responseHeaders } = { responseHeaders: false }
|
|
1119
1359
|
) {
|
|
1360
|
+
let invalidInput = [];
|
|
1361
|
+
if (invalidInput.length) {
|
|
1362
|
+
const error = new Error();
|
|
1363
|
+
error.message = "Missing required field";
|
|
1364
|
+
error.details = invalidInput;
|
|
1365
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1120
1368
|
const query_params = {};
|
|
1121
1369
|
query_params["id"] = id;
|
|
1122
1370
|
query_params["i"] = i;
|
|
@@ -1163,6 +1411,14 @@ class Cart {
|
|
|
1163
1411
|
},
|
|
1164
1412
|
{ responseHeaders } = { responseHeaders: false }
|
|
1165
1413
|
) {
|
|
1414
|
+
let invalidInput = [];
|
|
1415
|
+
if (invalidInput.length) {
|
|
1416
|
+
const error = new Error();
|
|
1417
|
+
error.message = "Missing required field";
|
|
1418
|
+
error.details = invalidInput;
|
|
1419
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1166
1422
|
const query_params = {};
|
|
1167
1423
|
query_params["id"] = id;
|
|
1168
1424
|
query_params["i"] = i;
|
|
@@ -1205,6 +1461,14 @@ class Cart {
|
|
|
1205
1461
|
{ body, id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1206
1462
|
{ responseHeaders } = { responseHeaders: false }
|
|
1207
1463
|
) {
|
|
1464
|
+
let invalidInput = [];
|
|
1465
|
+
if (invalidInput.length) {
|
|
1466
|
+
const error = new Error();
|
|
1467
|
+
error.message = "Missing required field";
|
|
1468
|
+
error.details = invalidInput;
|
|
1469
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1208
1472
|
const query_params = {};
|
|
1209
1473
|
query_params["id"] = id;
|
|
1210
1474
|
query_params["buy_now"] = buyNow;
|
|
@@ -1244,6 +1508,27 @@ class Cart {
|
|
|
1244
1508
|
{ token, action, requestHeaders } = { requestHeaders: {} },
|
|
1245
1509
|
{ responseHeaders } = { responseHeaders: false }
|
|
1246
1510
|
) {
|
|
1511
|
+
let invalidInput = [];
|
|
1512
|
+
|
|
1513
|
+
if (!token) {
|
|
1514
|
+
invalidInput.push({
|
|
1515
|
+
message: `The 'token' field is required.`,
|
|
1516
|
+
path: ["token"],
|
|
1517
|
+
});
|
|
1518
|
+
}
|
|
1519
|
+
if (!action) {
|
|
1520
|
+
invalidInput.push({
|
|
1521
|
+
message: `The 'action' field is required.`,
|
|
1522
|
+
path: ["action"],
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
if (invalidInput.length) {
|
|
1526
|
+
const error = new Error();
|
|
1527
|
+
error.message = "Missing required field";
|
|
1528
|
+
error.details = invalidInput;
|
|
1529
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1247
1532
|
const query_params = {};
|
|
1248
1533
|
|
|
1249
1534
|
const xHeaders = {};
|
|
@@ -1295,6 +1580,14 @@ class Cart {
|
|
|
1295
1580
|
} = { requestHeaders: {} },
|
|
1296
1581
|
{ responseHeaders } = { responseHeaders: false }
|
|
1297
1582
|
) {
|
|
1583
|
+
let invalidInput = [];
|
|
1584
|
+
if (invalidInput.length) {
|
|
1585
|
+
const error = new Error();
|
|
1586
|
+
error.message = "Missing required field";
|
|
1587
|
+
error.details = invalidInput;
|
|
1588
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1298
1591
|
const query_params = {};
|
|
1299
1592
|
query_params["id"] = id;
|
|
1300
1593
|
query_params["buy_now"] = buyNow;
|