@gofynd/fdk-client-javascript 1.4.15-beta.4 → 1.4.15-beta.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 +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +277 -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 +243 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +43 -0
- package/sdk/application/Lead/LeadApplicationClient.js +73 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +153 -0
- package/sdk/application/Order/OrderApplicationClient.js +187 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +427 -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/Theme/ThemePartnerModel.d.ts +3 -40
- package/sdk/partner/Theme/ThemePartnerModel.js +2 -24
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +118 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +53 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +29 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +0 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +0 -119
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +1 -58
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +0 -30
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -40
- package/sdk/platform/Theme/ThemePlatformModel.js +2 -24
- package/sdk/public/Configuration/ConfigurationPublicClient.js +16 -0
- package/sdk/public/Content/ContentPublicClient.js +15 -0
- package/sdk/public/Partner/PartnerPublicClient.js +15 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +40 -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.4.15-beta.
|
|
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.4.15-beta.6' --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");
|
|
@@ -66,6 +71,14 @@ class Cart {
|
|
|
66
71
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
67
72
|
{ responseHeaders } = { responseHeaders: false }
|
|
68
73
|
) {
|
|
74
|
+
let invalidInput = [];
|
|
75
|
+
if (invalidInput.length) {
|
|
76
|
+
const error = new Error();
|
|
77
|
+
error.message = "Missing required field";
|
|
78
|
+
error.details = invalidInput;
|
|
79
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
80
|
+
}
|
|
81
|
+
|
|
69
82
|
const query_params = {};
|
|
70
83
|
|
|
71
84
|
const xHeaders = {};
|
|
@@ -105,6 +118,14 @@ class Cart {
|
|
|
105
118
|
},
|
|
106
119
|
{ responseHeaders } = { responseHeaders: false }
|
|
107
120
|
) {
|
|
121
|
+
let invalidInput = [];
|
|
122
|
+
if (invalidInput.length) {
|
|
123
|
+
const error = new Error();
|
|
124
|
+
error.message = "Missing required field";
|
|
125
|
+
error.details = invalidInput;
|
|
126
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
127
|
+
}
|
|
128
|
+
|
|
108
129
|
const query_params = {};
|
|
109
130
|
query_params["i"] = i;
|
|
110
131
|
query_params["b"] = b;
|
|
@@ -150,6 +171,14 @@ class Cart {
|
|
|
150
171
|
},
|
|
151
172
|
{ responseHeaders } = { responseHeaders: false }
|
|
152
173
|
) {
|
|
174
|
+
let invalidInput = [];
|
|
175
|
+
if (invalidInput.length) {
|
|
176
|
+
const error = new Error();
|
|
177
|
+
error.message = "Missing required field";
|
|
178
|
+
error.details = invalidInput;
|
|
179
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
180
|
+
}
|
|
181
|
+
|
|
153
182
|
const query_params = {};
|
|
154
183
|
query_params["i"] = i;
|
|
155
184
|
query_params["b"] = b;
|
|
@@ -193,6 +222,14 @@ class Cart {
|
|
|
193
222
|
{ body, id, i, b, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
194
223
|
{ responseHeaders } = { responseHeaders: false }
|
|
195
224
|
) {
|
|
225
|
+
let invalidInput = [];
|
|
226
|
+
if (invalidInput.length) {
|
|
227
|
+
const error = new Error();
|
|
228
|
+
error.message = "Missing required field";
|
|
229
|
+
error.details = invalidInput;
|
|
230
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
231
|
+
}
|
|
232
|
+
|
|
196
233
|
const query_params = {};
|
|
197
234
|
query_params["id"] = id;
|
|
198
235
|
query_params["i"] = i;
|
|
@@ -234,6 +271,14 @@ class Cart {
|
|
|
234
271
|
{ body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
|
|
235
272
|
{ responseHeaders } = { responseHeaders: false }
|
|
236
273
|
) {
|
|
274
|
+
let invalidInput = [];
|
|
275
|
+
if (invalidInput.length) {
|
|
276
|
+
const error = new Error();
|
|
277
|
+
error.message = "Missing required field";
|
|
278
|
+
error.details = invalidInput;
|
|
279
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
280
|
+
}
|
|
281
|
+
|
|
237
282
|
const query_params = {};
|
|
238
283
|
query_params["buy_now"] = buyNow;
|
|
239
284
|
query_params["cart_type"] = cartType;
|
|
@@ -273,6 +318,14 @@ class Cart {
|
|
|
273
318
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
274
319
|
{ responseHeaders } = { responseHeaders: false }
|
|
275
320
|
) {
|
|
321
|
+
let invalidInput = [];
|
|
322
|
+
if (invalidInput.length) {
|
|
323
|
+
const error = new Error();
|
|
324
|
+
error.message = "Missing required field";
|
|
325
|
+
error.details = invalidInput;
|
|
326
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
327
|
+
}
|
|
328
|
+
|
|
276
329
|
const query_params = {};
|
|
277
330
|
query_params["id"] = id;
|
|
278
331
|
|
|
@@ -320,6 +373,21 @@ class Cart {
|
|
|
320
373
|
} = { requestHeaders: {} },
|
|
321
374
|
{ responseHeaders } = { responseHeaders: false }
|
|
322
375
|
) {
|
|
376
|
+
let invalidInput = [];
|
|
377
|
+
|
|
378
|
+
if (!id) {
|
|
379
|
+
invalidInput.push({
|
|
380
|
+
message: `The 'id' field is required.`,
|
|
381
|
+
path: ["id"],
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
if (invalidInput.length) {
|
|
385
|
+
const error = new Error();
|
|
386
|
+
error.message = "Missing required field";
|
|
387
|
+
error.details = invalidInput;
|
|
388
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
389
|
+
}
|
|
390
|
+
|
|
323
391
|
const query_params = {};
|
|
324
392
|
query_params["cart_id"] = cartId;
|
|
325
393
|
query_params["buy_now"] = buyNow;
|
|
@@ -371,6 +439,14 @@ class Cart {
|
|
|
371
439
|
} = { requestHeaders: {} },
|
|
372
440
|
{ responseHeaders } = { responseHeaders: false }
|
|
373
441
|
) {
|
|
442
|
+
let invalidInput = [];
|
|
443
|
+
if (invalidInput.length) {
|
|
444
|
+
const error = new Error();
|
|
445
|
+
error.message = "Missing required field";
|
|
446
|
+
error.details = invalidInput;
|
|
447
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
448
|
+
}
|
|
449
|
+
|
|
374
450
|
const query_params = {};
|
|
375
451
|
query_params["cart_id"] = cartId;
|
|
376
452
|
query_params["buy_now"] = buyNow;
|
|
@@ -414,6 +490,14 @@ class Cart {
|
|
|
414
490
|
{ itemId, articleId, uid, slug, requestHeaders } = { requestHeaders: {} },
|
|
415
491
|
{ responseHeaders } = { responseHeaders: false }
|
|
416
492
|
) {
|
|
493
|
+
let invalidInput = [];
|
|
494
|
+
if (invalidInput.length) {
|
|
495
|
+
const error = new Error();
|
|
496
|
+
error.message = "Missing required field";
|
|
497
|
+
error.details = invalidInput;
|
|
498
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
499
|
+
}
|
|
500
|
+
|
|
417
501
|
const query_params = {};
|
|
418
502
|
query_params["item_id"] = itemId;
|
|
419
503
|
query_params["article_id"] = articleId;
|
|
@@ -465,6 +549,14 @@ class Cart {
|
|
|
465
549
|
} = { requestHeaders: {} },
|
|
466
550
|
{ responseHeaders } = { responseHeaders: false }
|
|
467
551
|
) {
|
|
552
|
+
let invalidInput = [];
|
|
553
|
+
if (invalidInput.length) {
|
|
554
|
+
const error = new Error();
|
|
555
|
+
error.message = "Missing required field";
|
|
556
|
+
error.details = invalidInput;
|
|
557
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
558
|
+
}
|
|
559
|
+
|
|
468
560
|
const query_params = {};
|
|
469
561
|
query_params["id"] = id;
|
|
470
562
|
query_params["i"] = i;
|
|
@@ -510,6 +602,14 @@ class Cart {
|
|
|
510
602
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
511
603
|
{ responseHeaders } = { responseHeaders: false }
|
|
512
604
|
) {
|
|
605
|
+
let invalidInput = [];
|
|
606
|
+
if (invalidInput.length) {
|
|
607
|
+
const error = new Error();
|
|
608
|
+
error.message = "Missing required field";
|
|
609
|
+
error.details = invalidInput;
|
|
610
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
611
|
+
}
|
|
612
|
+
|
|
513
613
|
const query_params = {};
|
|
514
614
|
query_params["id"] = id;
|
|
515
615
|
|
|
@@ -548,6 +648,14 @@ class Cart {
|
|
|
548
648
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
549
649
|
{ responseHeaders } = { responseHeaders: false }
|
|
550
650
|
) {
|
|
651
|
+
let invalidInput = [];
|
|
652
|
+
if (invalidInput.length) {
|
|
653
|
+
const error = new Error();
|
|
654
|
+
error.message = "Missing required field";
|
|
655
|
+
error.details = invalidInput;
|
|
656
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
657
|
+
}
|
|
658
|
+
|
|
551
659
|
const query_params = {};
|
|
552
660
|
|
|
553
661
|
const xHeaders = {};
|
|
@@ -585,6 +693,21 @@ class Cart {
|
|
|
585
693
|
{ token, requestHeaders } = { requestHeaders: {} },
|
|
586
694
|
{ responseHeaders } = { responseHeaders: false }
|
|
587
695
|
) {
|
|
696
|
+
let invalidInput = [];
|
|
697
|
+
|
|
698
|
+
if (!token) {
|
|
699
|
+
invalidInput.push({
|
|
700
|
+
message: `The 'token' field is required.`,
|
|
701
|
+
path: ["token"],
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
if (invalidInput.length) {
|
|
705
|
+
const error = new Error();
|
|
706
|
+
error.message = "Missing required field";
|
|
707
|
+
error.details = invalidInput;
|
|
708
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
709
|
+
}
|
|
710
|
+
|
|
588
711
|
const query_params = {};
|
|
589
712
|
|
|
590
713
|
const xHeaders = {};
|
|
@@ -622,6 +745,14 @@ class Cart {
|
|
|
622
745
|
{ id, buyNow, slug, storeId, requestHeaders } = { requestHeaders: {} },
|
|
623
746
|
{ responseHeaders } = { responseHeaders: false }
|
|
624
747
|
) {
|
|
748
|
+
let invalidInput = [];
|
|
749
|
+
if (invalidInput.length) {
|
|
750
|
+
const error = new Error();
|
|
751
|
+
error.message = "Missing required field";
|
|
752
|
+
error.details = invalidInput;
|
|
753
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
754
|
+
}
|
|
755
|
+
|
|
625
756
|
const query_params = {};
|
|
626
757
|
query_params["id"] = id;
|
|
627
758
|
query_params["buy_now"] = buyNow;
|
|
@@ -663,6 +794,14 @@ class Cart {
|
|
|
663
794
|
{ id, buyNow, 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,21 @@ class Cart {
|
|
|
704
843
|
},
|
|
705
844
|
{ responseHeaders } = { responseHeaders: false }
|
|
706
845
|
) {
|
|
846
|
+
let invalidInput = [];
|
|
847
|
+
|
|
848
|
+
if (!slug) {
|
|
849
|
+
invalidInput.push({
|
|
850
|
+
message: `The 'slug' field is required.`,
|
|
851
|
+
path: ["slug"],
|
|
852
|
+
});
|
|
853
|
+
}
|
|
854
|
+
if (invalidInput.length) {
|
|
855
|
+
const error = new Error();
|
|
856
|
+
error.message = "Missing required field";
|
|
857
|
+
error.details = invalidInput;
|
|
858
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
859
|
+
}
|
|
860
|
+
|
|
707
861
|
const query_params = {};
|
|
708
862
|
query_params["slug"] = slug;
|
|
709
863
|
query_params["store_id"] = storeId;
|
|
@@ -747,6 +901,14 @@ class Cart {
|
|
|
747
901
|
},
|
|
748
902
|
{ responseHeaders } = { responseHeaders: false }
|
|
749
903
|
) {
|
|
904
|
+
let invalidInput = [];
|
|
905
|
+
if (invalidInput.length) {
|
|
906
|
+
const error = new Error();
|
|
907
|
+
error.message = "Missing required field";
|
|
908
|
+
error.details = invalidInput;
|
|
909
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
910
|
+
}
|
|
911
|
+
|
|
750
912
|
const query_params = {};
|
|
751
913
|
query_params["slug"] = slug;
|
|
752
914
|
query_params["page_size"] = pageSize;
|
|
@@ -789,6 +951,14 @@ class Cart {
|
|
|
789
951
|
{ id, uid, requestHeaders } = { requestHeaders: {} },
|
|
790
952
|
{ responseHeaders } = { responseHeaders: false }
|
|
791
953
|
) {
|
|
954
|
+
let invalidInput = [];
|
|
955
|
+
if (invalidInput.length) {
|
|
956
|
+
const error = new Error();
|
|
957
|
+
error.message = "Missing required field";
|
|
958
|
+
error.details = invalidInput;
|
|
959
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
960
|
+
}
|
|
961
|
+
|
|
792
962
|
const query_params = {};
|
|
793
963
|
query_params["id"] = id;
|
|
794
964
|
query_params["uid"] = uid;
|
|
@@ -830,6 +1000,14 @@ class Cart {
|
|
|
830
1000
|
},
|
|
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["p"] = p;
|
|
835
1013
|
query_params["id"] = id;
|
|
@@ -873,6 +1051,21 @@ class Cart {
|
|
|
873
1051
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
874
1052
|
{ responseHeaders } = { responseHeaders: false }
|
|
875
1053
|
) {
|
|
1054
|
+
let invalidInput = [];
|
|
1055
|
+
|
|
1056
|
+
if (!id) {
|
|
1057
|
+
invalidInput.push({
|
|
1058
|
+
message: `The 'id' field is required.`,
|
|
1059
|
+
path: ["id"],
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
if (invalidInput.length) {
|
|
1063
|
+
const error = new Error();
|
|
1064
|
+
error.message = "Missing required field";
|
|
1065
|
+
error.details = invalidInput;
|
|
1066
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1067
|
+
}
|
|
1068
|
+
|
|
876
1069
|
const query_params = {};
|
|
877
1070
|
|
|
878
1071
|
const xHeaders = {};
|
|
@@ -910,6 +1103,14 @@ class Cart {
|
|
|
910
1103
|
{ id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
911
1104
|
{ responseHeaders } = { responseHeaders: false }
|
|
912
1105
|
) {
|
|
1106
|
+
let invalidInput = [];
|
|
1107
|
+
if (invalidInput.length) {
|
|
1108
|
+
const error = new Error();
|
|
1109
|
+
error.message = "Missing required field";
|
|
1110
|
+
error.details = invalidInput;
|
|
1111
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1112
|
+
}
|
|
1113
|
+
|
|
913
1114
|
const query_params = {};
|
|
914
1115
|
query_params["id"] = id;
|
|
915
1116
|
query_params["buy_now"] = buyNow;
|
|
@@ -949,6 +1150,14 @@ class Cart {
|
|
|
949
1150
|
{ body, cartId, buyNow, i, b, requestHeaders } = { requestHeaders: {} },
|
|
950
1151
|
{ responseHeaders } = { responseHeaders: false }
|
|
951
1152
|
) {
|
|
1153
|
+
let invalidInput = [];
|
|
1154
|
+
if (invalidInput.length) {
|
|
1155
|
+
const error = new Error();
|
|
1156
|
+
error.message = "Missing required field";
|
|
1157
|
+
error.details = invalidInput;
|
|
1158
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1159
|
+
}
|
|
1160
|
+
|
|
952
1161
|
const query_params = {};
|
|
953
1162
|
query_params["cart_id"] = cartId;
|
|
954
1163
|
query_params["buy_now"] = buyNow;
|
|
@@ -990,6 +1199,14 @@ class Cart {
|
|
|
990
1199
|
{ body, id, buyNow, 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["id"] = id;
|
|
995
1212
|
query_params["buy_now"] = buyNow;
|
|
@@ -1029,6 +1246,21 @@ class Cart {
|
|
|
1029
1246
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
1030
1247
|
{ responseHeaders } = { responseHeaders: false }
|
|
1031
1248
|
) {
|
|
1249
|
+
let invalidInput = [];
|
|
1250
|
+
|
|
1251
|
+
if (!id) {
|
|
1252
|
+
invalidInput.push({
|
|
1253
|
+
message: `The 'id' field is required.`,
|
|
1254
|
+
path: ["id"],
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
if (invalidInput.length) {
|
|
1258
|
+
const error = new Error();
|
|
1259
|
+
error.message = "Missing required field";
|
|
1260
|
+
error.details = invalidInput;
|
|
1261
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1032
1264
|
const query_params = {};
|
|
1033
1265
|
|
|
1034
1266
|
const xHeaders = {};
|
|
@@ -1076,6 +1308,14 @@ class Cart {
|
|
|
1076
1308
|
} = { requestHeaders: {} },
|
|
1077
1309
|
{ responseHeaders } = { responseHeaders: false }
|
|
1078
1310
|
) {
|
|
1311
|
+
let invalidInput = [];
|
|
1312
|
+
if (invalidInput.length) {
|
|
1313
|
+
const error = new Error();
|
|
1314
|
+
error.message = "Missing required field";
|
|
1315
|
+
error.details = invalidInput;
|
|
1316
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1079
1319
|
const query_params = {};
|
|
1080
1320
|
query_params["id"] = id;
|
|
1081
1321
|
query_params["i"] = i;
|
|
@@ -1120,6 +1360,14 @@ class Cart {
|
|
|
1120
1360
|
{ body, id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1121
1361
|
{ responseHeaders } = { responseHeaders: false }
|
|
1122
1362
|
) {
|
|
1363
|
+
let invalidInput = [];
|
|
1364
|
+
if (invalidInput.length) {
|
|
1365
|
+
const error = new Error();
|
|
1366
|
+
error.message = "Missing required field";
|
|
1367
|
+
error.details = invalidInput;
|
|
1368
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1123
1371
|
const query_params = {};
|
|
1124
1372
|
query_params["id"] = id;
|
|
1125
1373
|
query_params["buy_now"] = buyNow;
|
|
@@ -1159,6 +1407,27 @@ class Cart {
|
|
|
1159
1407
|
{ token, action, requestHeaders } = { requestHeaders: {} },
|
|
1160
1408
|
{ responseHeaders } = { responseHeaders: false }
|
|
1161
1409
|
) {
|
|
1410
|
+
let invalidInput = [];
|
|
1411
|
+
|
|
1412
|
+
if (!token) {
|
|
1413
|
+
invalidInput.push({
|
|
1414
|
+
message: `The 'token' field is required.`,
|
|
1415
|
+
path: ["token"],
|
|
1416
|
+
});
|
|
1417
|
+
}
|
|
1418
|
+
if (!action) {
|
|
1419
|
+
invalidInput.push({
|
|
1420
|
+
message: `The 'action' field is required.`,
|
|
1421
|
+
path: ["action"],
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
if (invalidInput.length) {
|
|
1425
|
+
const error = new Error();
|
|
1426
|
+
error.message = "Missing required field";
|
|
1427
|
+
error.details = invalidInput;
|
|
1428
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1162
1431
|
const query_params = {};
|
|
1163
1432
|
|
|
1164
1433
|
const xHeaders = {};
|
|
@@ -1210,6 +1479,14 @@ class Cart {
|
|
|
1210
1479
|
} = { requestHeaders: {} },
|
|
1211
1480
|
{ responseHeaders } = { responseHeaders: false }
|
|
1212
1481
|
) {
|
|
1482
|
+
let invalidInput = [];
|
|
1483
|
+
if (invalidInput.length) {
|
|
1484
|
+
const error = new Error();
|
|
1485
|
+
error.message = "Missing required field";
|
|
1486
|
+
error.details = invalidInput;
|
|
1487
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1213
1490
|
const query_params = {};
|
|
1214
1491
|
query_params["id"] = id;
|
|
1215
1492
|
query_params["buy_now"] = buyNow;
|