@gofynd/fdk-client-javascript 1.6.4 → 2.0.1
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.d.ts +5 -5
- package/sdk/application/Cart/CartApplicationClient.js +26 -268
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +20 -20
- package/sdk/application/Catalog/CatalogApplicationClient.js +98 -347
- package/sdk/application/Common/CommonApplicationClient.js +1 -16
- package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +24 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +58 -137
- package/sdk/application/Content/ContentApplicationClient.d.ts +47 -7
- package/sdk/application/Content/ContentApplicationClient.js +222 -191
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +21 -52
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +16 -56
- package/sdk/application/Logistic/LogisticApplicationClient.js +57 -332
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
- package/sdk/application/Order/OrderApplicationClient.js +68 -153
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -12
- package/sdk/application/Payment/PaymentApplicationClient.js +7 -487
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
- package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationClient.js +21 -75
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
- package/sdk/application/User/UserApplicationClient.js +1 -407
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +1 -55
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +1 -408
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -37
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -0
- package/sdk/partner/Lead/LeadPartnerModel.js +2 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +29 -25
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +65 -42
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1008 -794
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +573 -460
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +10 -5
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.js +2 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +2 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +67 -9
- package/sdk/platform/Cart/CartPlatformModel.js +38 -5
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.js +4 -4
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +47 -13
- package/sdk/platform/Catalog/CatalogPlatformModel.js +29 -7
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +7 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +71 -7
- package/sdk/platform/Communication/CommunicationPlatformModel.js +70 -6
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +0 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +8 -60
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +31 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -3
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +13 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +68 -11
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +49 -7
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +169 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1279 -132
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +156 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +180 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +162 -0
- package/sdk/platform/Content/ContentPlatformClient.js +1697 -497
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1053 -35
- package/sdk/platform/Content/ContentPlatformModel.js +717 -34
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +127 -1
- package/sdk/platform/Content/ContentPlatformValidator.js +171 -0
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +34 -0
- package/sdk/platform/Discount/DiscountPlatformClient.js +59 -0
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +365 -93
- package/sdk/platform/Discount/DiscountPlatformModel.js +98 -93
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +54 -34
- package/sdk/platform/Discount/DiscountPlatformValidator.js +27 -17
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +0 -156
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +0 -1072
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -137
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +0 -173
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +1 -1105
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +0 -1125
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -0
- package/sdk/platform/Lead/LeadPlatformModel.js +2 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +212 -0
- package/sdk/platform/Order/OrderPlatformClient.js +397 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +41 -9
- package/sdk/platform/Order/OrderPlatformModel.js +20 -7
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +58 -10
- package/sdk/platform/Partner/PartnerPlatformModel.js +19 -10
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -2
- package/sdk/platform/Payment/PaymentPlatformModel.js +8 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +5 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.js +2 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +240 -24
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +1753 -277
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +320 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +269 -19
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +53 -104
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +201 -629
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +5720 -2891
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3414 -2181
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +138 -216
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +81 -148
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
- package/sdk/platform/Share/SharePlatformModel.js +2 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +10 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +79 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +13 -1
- package/sdk/platform/User/UserPlatformApplicationValidator.js +12 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +52 -1
- package/sdk/platform/User/UserPlatformModel.js +36 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +5 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +2 -0
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +1 -1
- package/sdk/public/Catalog/CatalogPublicClient.js +6 -11
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -3
- package/sdk/public/Content/ContentPublicClient.js +261 -104
- package/sdk/public/Content/ContentPublicModel.d.ts +155 -1
- package/sdk/public/Content/ContentPublicModel.js +102 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -1
- package/sdk/public/Content/ContentPublicValidator.js +26 -0
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
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:
|
|
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: 2.0.1' --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
|
@@ -107,7 +107,7 @@ declare class Cart {
|
|
|
107
107
|
* @summary: Get details for a single customer address
|
|
108
108
|
* @description: Get a specific customer address stored in the system by providing its unique identifier. This API provides detailed information about the address, including the recipient's name, address, city, postal code, and other relevant details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddressById/).
|
|
109
109
|
*/
|
|
110
|
-
getAddressById({ id, cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<Address>;
|
|
110
|
+
getAddressById({ id, cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<Address>;
|
|
111
111
|
/**
|
|
112
112
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
113
113
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -161,7 +161,7 @@ declare class Cart {
|
|
|
161
161
|
* @summary: List shared cart items
|
|
162
162
|
* @description: Get cart items from the shared cart link based on unique token. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartSharedItems/).
|
|
163
163
|
*/
|
|
164
|
-
getCartSharedItems({ token, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<SharedCartResult>;
|
|
164
|
+
getCartSharedItems({ token, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<SharedCartResult>;
|
|
165
165
|
/**
|
|
166
166
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
167
167
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -224,7 +224,7 @@ declare class Cart {
|
|
|
224
224
|
* @summary: Removes an address from a customer's address list
|
|
225
225
|
* @description: Delete an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/).
|
|
226
226
|
*/
|
|
227
|
-
removeAddress({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<DeleteAddressResult>;
|
|
227
|
+
removeAddress({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<DeleteAddressResult>;
|
|
228
228
|
/**
|
|
229
229
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
230
230
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -260,7 +260,7 @@ declare class Cart {
|
|
|
260
260
|
* @summary: Updates an existing customer address
|
|
261
261
|
* @description: Customer can modify the details of a previously saved addresses. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateAddress/).
|
|
262
262
|
*/
|
|
263
|
-
updateAddress({ id, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<UpdateAddressResult>;
|
|
263
|
+
updateAddress({ id, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<UpdateAddressResult>;
|
|
264
264
|
/**
|
|
265
265
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
266
266
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -296,7 +296,7 @@ declare class Cart {
|
|
|
296
296
|
* @summary: Update with shared items
|
|
297
297
|
* @description: Merge or replace shared cart items with existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartWithSharedItems/).
|
|
298
298
|
*/
|
|
299
|
-
updateCartWithSharedItems({ token, action, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<SharedCartResult>;
|
|
299
|
+
updateCartWithSharedItems({ token, action, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<SharedCartResult>;
|
|
300
300
|
/**
|
|
301
301
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
302
302
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
class Cart {
|
|
11
12
|
constructor(_conf) {
|
|
@@ -73,14 +74,6 @@ class Cart {
|
|
|
73
74
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
74
75
|
{ responseHeaders } = { responseHeaders: false }
|
|
75
76
|
) {
|
|
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
|
-
|
|
84
77
|
const query_params = {};
|
|
85
78
|
|
|
86
79
|
const xHeaders = {};
|
|
@@ -120,14 +113,6 @@ class Cart {
|
|
|
120
113
|
},
|
|
121
114
|
{ responseHeaders } = { responseHeaders: false }
|
|
122
115
|
) {
|
|
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
|
-
|
|
131
116
|
const query_params = {};
|
|
132
117
|
query_params["i"] = i;
|
|
133
118
|
query_params["b"] = b;
|
|
@@ -173,14 +158,6 @@ class Cart {
|
|
|
173
158
|
},
|
|
174
159
|
{ responseHeaders } = { responseHeaders: false }
|
|
175
160
|
) {
|
|
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
|
-
|
|
184
161
|
const query_params = {};
|
|
185
162
|
query_params["i"] = i;
|
|
186
163
|
query_params["b"] = b;
|
|
@@ -224,14 +201,6 @@ class Cart {
|
|
|
224
201
|
{ body, id, i, b, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
225
202
|
{ responseHeaders } = { responseHeaders: false }
|
|
226
203
|
) {
|
|
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
|
-
|
|
235
204
|
const query_params = {};
|
|
236
205
|
query_params["id"] = id;
|
|
237
206
|
query_params["i"] = i;
|
|
@@ -273,14 +242,6 @@ class Cart {
|
|
|
273
242
|
{ body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
|
|
274
243
|
{ responseHeaders } = { responseHeaders: false }
|
|
275
244
|
) {
|
|
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
|
-
|
|
284
245
|
const query_params = {};
|
|
285
246
|
query_params["buy_now"] = buyNow;
|
|
286
247
|
query_params["cart_type"] = cartType;
|
|
@@ -320,14 +281,6 @@ class Cart {
|
|
|
320
281
|
{ body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
|
|
321
282
|
{ responseHeaders } = { responseHeaders: false }
|
|
322
283
|
) {
|
|
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
|
-
|
|
331
284
|
const query_params = {};
|
|
332
285
|
query_params["buy_now"] = buyNow;
|
|
333
286
|
query_params["cart_type"] = cartType;
|
|
@@ -367,14 +320,6 @@ class Cart {
|
|
|
367
320
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
368
321
|
{ responseHeaders } = { responseHeaders: false }
|
|
369
322
|
) {
|
|
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
|
-
|
|
378
323
|
const query_params = {};
|
|
379
324
|
query_params["id"] = id;
|
|
380
325
|
|
|
@@ -422,18 +367,12 @@ class Cart {
|
|
|
422
367
|
} = { requestHeaders: {} },
|
|
423
368
|
{ responseHeaders } = { responseHeaders: false }
|
|
424
369
|
) {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
path: ["id"],
|
|
370
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
371
|
+
if (errors.length > 0) {
|
|
372
|
+
const error = new FDKClientValidationError({
|
|
373
|
+
message: "Missing required field",
|
|
374
|
+
details: errors,
|
|
431
375
|
});
|
|
432
|
-
}
|
|
433
|
-
if (invalidInput.length) {
|
|
434
|
-
const error = new Error();
|
|
435
|
-
error.message = "Missing required field";
|
|
436
|
-
error.details = invalidInput;
|
|
437
376
|
return Promise.reject(new FDKClientValidationError(error));
|
|
438
377
|
}
|
|
439
378
|
|
|
@@ -488,14 +427,6 @@ class Cart {
|
|
|
488
427
|
} = { requestHeaders: {} },
|
|
489
428
|
{ responseHeaders } = { responseHeaders: false }
|
|
490
429
|
) {
|
|
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
|
-
|
|
499
430
|
const query_params = {};
|
|
500
431
|
query_params["cart_id"] = cartId;
|
|
501
432
|
query_params["buy_now"] = buyNow;
|
|
@@ -539,14 +470,6 @@ class Cart {
|
|
|
539
470
|
{ itemId, articleId, uid, slug, requestHeaders } = { requestHeaders: {} },
|
|
540
471
|
{ responseHeaders } = { responseHeaders: false }
|
|
541
472
|
) {
|
|
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
|
-
|
|
550
473
|
const query_params = {};
|
|
551
474
|
query_params["item_id"] = itemId;
|
|
552
475
|
query_params["article_id"] = articleId;
|
|
@@ -598,14 +521,6 @@ class Cart {
|
|
|
598
521
|
} = { requestHeaders: {} },
|
|
599
522
|
{ responseHeaders } = { responseHeaders: false }
|
|
600
523
|
) {
|
|
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
|
-
|
|
609
524
|
const query_params = {};
|
|
610
525
|
query_params["id"] = id;
|
|
611
526
|
query_params["i"] = i;
|
|
@@ -651,14 +566,6 @@ class Cart {
|
|
|
651
566
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
652
567
|
{ responseHeaders } = { responseHeaders: false }
|
|
653
568
|
) {
|
|
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
|
-
|
|
662
569
|
const query_params = {};
|
|
663
570
|
query_params["id"] = id;
|
|
664
571
|
|
|
@@ -697,14 +604,6 @@ class Cart {
|
|
|
697
604
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
698
605
|
{ responseHeaders } = { responseHeaders: false }
|
|
699
606
|
) {
|
|
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
|
-
|
|
708
607
|
const query_params = {};
|
|
709
608
|
|
|
710
609
|
const xHeaders = {};
|
|
@@ -742,18 +641,12 @@ class Cart {
|
|
|
742
641
|
{ token, requestHeaders } = { requestHeaders: {} },
|
|
743
642
|
{ responseHeaders } = { responseHeaders: false }
|
|
744
643
|
) {
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
path: ["token"],
|
|
644
|
+
const errors = validateRequiredParams(arguments[0], ["token"]);
|
|
645
|
+
if (errors.length > 0) {
|
|
646
|
+
const error = new FDKClientValidationError({
|
|
647
|
+
message: "Missing required field",
|
|
648
|
+
details: errors,
|
|
751
649
|
});
|
|
752
|
-
}
|
|
753
|
-
if (invalidInput.length) {
|
|
754
|
-
const error = new Error();
|
|
755
|
-
error.message = "Missing required field";
|
|
756
|
-
error.details = invalidInput;
|
|
757
650
|
return Promise.reject(new FDKClientValidationError(error));
|
|
758
651
|
}
|
|
759
652
|
|
|
@@ -794,14 +687,6 @@ class Cart {
|
|
|
794
687
|
{ id, buyNow, slug, storeId, requestHeaders } = { requestHeaders: {} },
|
|
795
688
|
{ responseHeaders } = { responseHeaders: false }
|
|
796
689
|
) {
|
|
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
|
-
|
|
805
690
|
const query_params = {};
|
|
806
691
|
query_params["id"] = id;
|
|
807
692
|
query_params["buy_now"] = buyNow;
|
|
@@ -843,14 +728,6 @@ class Cart {
|
|
|
843
728
|
{ id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
844
729
|
{ responseHeaders } = { responseHeaders: false }
|
|
845
730
|
) {
|
|
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
|
-
|
|
854
731
|
const query_params = {};
|
|
855
732
|
query_params["id"] = id;
|
|
856
733
|
query_params["buy_now"] = buyNow;
|
|
@@ -892,21 +769,6 @@ class Cart {
|
|
|
892
769
|
},
|
|
893
770
|
{ responseHeaders } = { responseHeaders: false }
|
|
894
771
|
) {
|
|
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
|
-
|
|
910
772
|
const query_params = {};
|
|
911
773
|
query_params["slug"] = slug;
|
|
912
774
|
query_params["store_id"] = storeId;
|
|
@@ -950,14 +812,6 @@ class Cart {
|
|
|
950
812
|
},
|
|
951
813
|
{ responseHeaders } = { responseHeaders: false }
|
|
952
814
|
) {
|
|
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
|
-
|
|
961
815
|
const query_params = {};
|
|
962
816
|
query_params["slug"] = slug;
|
|
963
817
|
query_params["page_size"] = pageSize;
|
|
@@ -1000,14 +854,6 @@ class Cart {
|
|
|
1000
854
|
{ id, uid, requestHeaders } = { requestHeaders: {} },
|
|
1001
855
|
{ responseHeaders } = { responseHeaders: false }
|
|
1002
856
|
) {
|
|
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
|
-
|
|
1011
857
|
const query_params = {};
|
|
1012
858
|
query_params["id"] = id;
|
|
1013
859
|
query_params["uid"] = uid;
|
|
@@ -1049,14 +895,6 @@ class Cart {
|
|
|
1049
895
|
},
|
|
1050
896
|
{ responseHeaders } = { responseHeaders: false }
|
|
1051
897
|
) {
|
|
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
|
-
|
|
1060
898
|
const query_params = {};
|
|
1061
899
|
query_params["p"] = p;
|
|
1062
900
|
query_params["id"] = id;
|
|
@@ -1100,18 +938,12 @@ class Cart {
|
|
|
1100
938
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
1101
939
|
{ responseHeaders } = { responseHeaders: false }
|
|
1102
940
|
) {
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
path: ["id"],
|
|
941
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
942
|
+
if (errors.length > 0) {
|
|
943
|
+
const error = new FDKClientValidationError({
|
|
944
|
+
message: "Missing required field",
|
|
945
|
+
details: errors,
|
|
1109
946
|
});
|
|
1110
|
-
}
|
|
1111
|
-
if (invalidInput.length) {
|
|
1112
|
-
const error = new Error();
|
|
1113
|
-
error.message = "Missing required field";
|
|
1114
|
-
error.details = invalidInput;
|
|
1115
947
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1116
948
|
}
|
|
1117
949
|
|
|
@@ -1152,14 +984,6 @@ class Cart {
|
|
|
1152
984
|
{ id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1153
985
|
{ responseHeaders } = { responseHeaders: false }
|
|
1154
986
|
) {
|
|
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
|
-
|
|
1163
987
|
const query_params = {};
|
|
1164
988
|
query_params["id"] = id;
|
|
1165
989
|
query_params["buy_now"] = buyNow;
|
|
@@ -1199,14 +1023,6 @@ class Cart {
|
|
|
1199
1023
|
{ body, cartId, buyNow, i, b, requestHeaders } = { requestHeaders: {} },
|
|
1200
1024
|
{ responseHeaders } = { responseHeaders: false }
|
|
1201
1025
|
) {
|
|
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
|
-
|
|
1210
1026
|
const query_params = {};
|
|
1211
1027
|
query_params["cart_id"] = cartId;
|
|
1212
1028
|
query_params["buy_now"] = buyNow;
|
|
@@ -1248,14 +1064,6 @@ class Cart {
|
|
|
1248
1064
|
{ body, id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1249
1065
|
{ responseHeaders } = { responseHeaders: false }
|
|
1250
1066
|
) {
|
|
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
|
-
|
|
1259
1067
|
const query_params = {};
|
|
1260
1068
|
query_params["id"] = id;
|
|
1261
1069
|
query_params["buy_now"] = buyNow;
|
|
@@ -1295,18 +1103,12 @@ class Cart {
|
|
|
1295
1103
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
1296
1104
|
{ responseHeaders } = { responseHeaders: false }
|
|
1297
1105
|
) {
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
path: ["id"],
|
|
1106
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
1107
|
+
if (errors.length > 0) {
|
|
1108
|
+
const error = new FDKClientValidationError({
|
|
1109
|
+
message: "Missing required field",
|
|
1110
|
+
details: errors,
|
|
1304
1111
|
});
|
|
1305
|
-
}
|
|
1306
|
-
if (invalidInput.length) {
|
|
1307
|
-
const error = new Error();
|
|
1308
|
-
error.message = "Missing required field";
|
|
1309
|
-
error.details = invalidInput;
|
|
1310
1112
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1311
1113
|
}
|
|
1312
1114
|
|
|
@@ -1357,14 +1159,6 @@ class Cart {
|
|
|
1357
1159
|
} = { requestHeaders: {} },
|
|
1358
1160
|
{ responseHeaders } = { responseHeaders: false }
|
|
1359
1161
|
) {
|
|
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
|
-
|
|
1368
1162
|
const query_params = {};
|
|
1369
1163
|
query_params["id"] = id;
|
|
1370
1164
|
query_params["i"] = i;
|
|
@@ -1411,14 +1205,6 @@ class Cart {
|
|
|
1411
1205
|
},
|
|
1412
1206
|
{ responseHeaders } = { responseHeaders: false }
|
|
1413
1207
|
) {
|
|
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
|
-
|
|
1422
1208
|
const query_params = {};
|
|
1423
1209
|
query_params["id"] = id;
|
|
1424
1210
|
query_params["i"] = i;
|
|
@@ -1461,14 +1247,6 @@ class Cart {
|
|
|
1461
1247
|
{ body, id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1462
1248
|
{ responseHeaders } = { responseHeaders: false }
|
|
1463
1249
|
) {
|
|
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
|
-
|
|
1472
1250
|
const query_params = {};
|
|
1473
1251
|
query_params["id"] = id;
|
|
1474
1252
|
query_params["buy_now"] = buyNow;
|
|
@@ -1508,24 +1286,12 @@ class Cart {
|
|
|
1508
1286
|
{ token, action, requestHeaders } = { requestHeaders: {} },
|
|
1509
1287
|
{ responseHeaders } = { responseHeaders: false }
|
|
1510
1288
|
) {
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
path: ["token"],
|
|
1289
|
+
const errors = validateRequiredParams(arguments[0], ["token", "action"]);
|
|
1290
|
+
if (errors.length > 0) {
|
|
1291
|
+
const error = new FDKClientValidationError({
|
|
1292
|
+
message: "Missing required field",
|
|
1293
|
+
details: errors,
|
|
1517
1294
|
});
|
|
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
1295
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1530
1296
|
}
|
|
1531
1297
|
|
|
@@ -1580,14 +1346,6 @@ class Cart {
|
|
|
1580
1346
|
} = { requestHeaders: {} },
|
|
1581
1347
|
{ responseHeaders } = { responseHeaders: false }
|
|
1582
1348
|
) {
|
|
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
|
-
|
|
1591
1349
|
const query_params = {};
|
|
1592
1350
|
query_params["id"] = id;
|
|
1593
1351
|
query_params["buy_now"] = buyNow;
|