@gofynd/fdk-client-javascript 1.4.15-beta.6 → 1.4.15-beta.8
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 -252
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -16
- package/sdk/application/Catalog/CatalogApplicationClient.js +90 -339
- package/sdk/application/Common/CommonApplicationClient.js +1 -16
- package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +11 -134
- package/sdk/application/Content/ContentApplicationClient.d.ts +8 -8
- package/sdk/application/Content/ContentApplicationClient.js +44 -206
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +5 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -30
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +21 -52
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +5 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +32 -128
- package/sdk/application/Order/OrderApplicationClient.d.ts +10 -10
- package/sdk/application/Order/OrderApplicationClient.js +63 -142
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +6 -418
- 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/FileStoragePartnerModel.d.ts +2 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +2 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +3 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +3 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +3 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +3 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +3 -0
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +16 -1
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +20 -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 +10 -0
- package/sdk/platform/Order/OrderPlatformClient.js +99 -0
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -118
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -53
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -29
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +58 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
- package/sdk/public/Content/ContentPublicClient.d.ts +1 -1
- package/sdk/public/Content/ContentPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
|
@@ -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 Lead {
|
|
11
12
|
constructor(_conf) {
|
|
@@ -45,18 +46,12 @@ class Lead {
|
|
|
45
46
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
46
47
|
{ responseHeaders } = { responseHeaders: false }
|
|
47
48
|
) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
path: ["id"],
|
|
49
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
50
|
+
if (errors.length > 0) {
|
|
51
|
+
const error = new FDKClientValidationError({
|
|
52
|
+
message: "Missing required field",
|
|
53
|
+
details: errors,
|
|
54
54
|
});
|
|
55
|
-
}
|
|
56
|
-
if (invalidInput.length) {
|
|
57
|
-
const error = new Error();
|
|
58
|
-
error.message = "Missing required field";
|
|
59
|
-
error.details = invalidInput;
|
|
60
55
|
return Promise.reject(new FDKClientValidationError(error));
|
|
61
56
|
}
|
|
62
57
|
|
|
@@ -97,14 +92,6 @@ class Lead {
|
|
|
97
92
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
98
93
|
{ responseHeaders } = { responseHeaders: false }
|
|
99
94
|
) {
|
|
100
|
-
let invalidInput = [];
|
|
101
|
-
if (invalidInput.length) {
|
|
102
|
-
const error = new Error();
|
|
103
|
-
error.message = "Missing required field";
|
|
104
|
-
error.details = invalidInput;
|
|
105
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
95
|
const query_params = {};
|
|
109
96
|
|
|
110
97
|
const xHeaders = {};
|
|
@@ -142,18 +129,12 @@ class Lead {
|
|
|
142
129
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
143
130
|
{ responseHeaders } = { responseHeaders: false }
|
|
144
131
|
) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
path: ["slug"],
|
|
132
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
133
|
+
if (errors.length > 0) {
|
|
134
|
+
const error = new FDKClientValidationError({
|
|
135
|
+
message: "Missing required field",
|
|
136
|
+
details: errors,
|
|
151
137
|
});
|
|
152
|
-
}
|
|
153
|
-
if (invalidInput.length) {
|
|
154
|
-
const error = new Error();
|
|
155
|
-
error.message = "Missing required field";
|
|
156
|
-
error.details = invalidInput;
|
|
157
138
|
return Promise.reject(new FDKClientValidationError(error));
|
|
158
139
|
}
|
|
159
140
|
|
|
@@ -194,18 +175,12 @@ class Lead {
|
|
|
194
175
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
195
176
|
{ responseHeaders } = { responseHeaders: false }
|
|
196
177
|
) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
path: ["id"],
|
|
178
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
179
|
+
if (errors.length > 0) {
|
|
180
|
+
const error = new FDKClientValidationError({
|
|
181
|
+
message: "Missing required field",
|
|
182
|
+
details: errors,
|
|
203
183
|
});
|
|
204
|
-
}
|
|
205
|
-
if (invalidInput.length) {
|
|
206
|
-
const error = new Error();
|
|
207
|
-
error.message = "Missing required field";
|
|
208
|
-
error.details = invalidInput;
|
|
209
184
|
return Promise.reject(new FDKClientValidationError(error));
|
|
210
185
|
}
|
|
211
186
|
|
|
@@ -246,18 +221,12 @@ class Lead {
|
|
|
246
221
|
{ slug, body, requestHeaders } = { requestHeaders: {} },
|
|
247
222
|
{ responseHeaders } = { responseHeaders: false }
|
|
248
223
|
) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
path: ["slug"],
|
|
224
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
225
|
+
if (errors.length > 0) {
|
|
226
|
+
const error = new FDKClientValidationError({
|
|
227
|
+
message: "Missing required field",
|
|
228
|
+
details: errors,
|
|
255
229
|
});
|
|
256
|
-
}
|
|
257
|
-
if (invalidInput.length) {
|
|
258
|
-
const error = new Error();
|
|
259
|
-
error.message = "Missing required field";
|
|
260
|
-
error.details = invalidInput;
|
|
261
230
|
return Promise.reject(new FDKClientValidationError(error));
|
|
262
231
|
}
|
|
263
232
|
|
|
@@ -43,7 +43,7 @@ declare class Logistic {
|
|
|
43
43
|
* @summary: Get country details
|
|
44
44
|
* @description: Get details about a particular country and its address format customized for different business scenarios. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountry/).
|
|
45
45
|
*/
|
|
46
|
-
getCountry({ countryIsoCode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetCountry>;
|
|
46
|
+
getCountry({ countryIsoCode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<GetCountry>;
|
|
47
47
|
/**
|
|
48
48
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
49
49
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -52,7 +52,7 @@ declare class Logistic {
|
|
|
52
52
|
* @summary: Get localities
|
|
53
53
|
* @description: Get geographical data for a specific type of locality based on the provided filters. For instance, obtain a list of cities for a given country and state. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalities/).
|
|
54
54
|
*/
|
|
55
|
-
getLocalities({ localityType, country, state, city, pageNo, pageSize, q, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetLocalities>;
|
|
55
|
+
getLocalities({ localityType, country, state, city, pageNo, pageSize, q, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<GetLocalities>;
|
|
56
56
|
/**
|
|
57
57
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
58
58
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -61,7 +61,7 @@ declare class Logistic {
|
|
|
61
61
|
* @summary: Get locality detail
|
|
62
62
|
* @description: Get detailed geographical data for a specific locality, such as a pincode. For example, for a pincode value of 400603, the service returns its parent locations, including city, state, and country details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocality/).
|
|
63
63
|
*/
|
|
64
|
-
getLocality({ localityType, localityValue, country, state, city, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetLocality>;
|
|
64
|
+
getLocality({ localityType, localityValue, country, state, city, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<GetLocality>;
|
|
65
65
|
/**
|
|
66
66
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
67
67
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -88,7 +88,7 @@ declare class Logistic {
|
|
|
88
88
|
* @summary: Get pincode details
|
|
89
89
|
* @description: Get details of a specific pincode, such as obtaining its city and state information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeCity/).
|
|
90
90
|
*/
|
|
91
|
-
getPincodeCity({ pincode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PincodeApiResponse>;
|
|
91
|
+
getPincodeCity({ pincode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<PincodeApiResponse>;
|
|
92
92
|
/**
|
|
93
93
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
94
94
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -115,5 +115,5 @@ declare class Logistic {
|
|
|
115
115
|
* @summary: Validate address
|
|
116
116
|
* @description: Validate addresses using specific templates customized for each country and tailored to various business scenarios. This validation ensures that the data conforms to the information currently stored in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/validateAddress/).
|
|
117
117
|
*/
|
|
118
|
-
validateAddress({ countryIsoCode, templateName, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ValidateAddressRequest>;
|
|
118
|
+
validateAddress({ countryIsoCode, templateName, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ValidateAddressRequest>;
|
|
119
119
|
}
|
|
@@ -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 Logistic {
|
|
11
12
|
constructor(_conf) {
|
|
@@ -56,14 +57,6 @@ class Logistic {
|
|
|
56
57
|
{ requestHeaders } = { requestHeaders: {} },
|
|
57
58
|
{ responseHeaders } = { responseHeaders: false }
|
|
58
59
|
) {
|
|
59
|
-
let invalidInput = [];
|
|
60
|
-
if (invalidInput.length) {
|
|
61
|
-
const error = new Error();
|
|
62
|
-
error.message = "Missing required field";
|
|
63
|
-
error.details = invalidInput;
|
|
64
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
60
|
const query_params = {};
|
|
68
61
|
|
|
69
62
|
const xHeaders = {};
|
|
@@ -103,14 +96,6 @@ class Logistic {
|
|
|
103
96
|
},
|
|
104
97
|
{ responseHeaders } = { responseHeaders: false }
|
|
105
98
|
) {
|
|
106
|
-
let invalidInput = [];
|
|
107
|
-
if (invalidInput.length) {
|
|
108
|
-
const error = new Error();
|
|
109
|
-
error.message = "Missing required field";
|
|
110
|
-
error.details = invalidInput;
|
|
111
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
112
|
-
}
|
|
113
|
-
|
|
114
99
|
const query_params = {};
|
|
115
100
|
query_params["onboarding"] = onboarding;
|
|
116
101
|
query_params["page_no"] = pageNo;
|
|
@@ -152,18 +137,12 @@ class Logistic {
|
|
|
152
137
|
{ countryIsoCode, requestHeaders } = { requestHeaders: {} },
|
|
153
138
|
{ responseHeaders } = { responseHeaders: false }
|
|
154
139
|
) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
path: ["countryIsoCode"],
|
|
140
|
+
const errors = validateRequiredParams(arguments[0], ["countryIsoCode"]);
|
|
141
|
+
if (errors.length > 0) {
|
|
142
|
+
const error = new FDKClientValidationError({
|
|
143
|
+
message: "Missing required field",
|
|
144
|
+
details: errors,
|
|
161
145
|
});
|
|
162
|
-
}
|
|
163
|
-
if (invalidInput.length) {
|
|
164
|
-
const error = new Error();
|
|
165
|
-
error.message = "Missing required field";
|
|
166
|
-
error.details = invalidInput;
|
|
167
146
|
return Promise.reject(new FDKClientValidationError(error));
|
|
168
147
|
}
|
|
169
148
|
|
|
@@ -213,18 +192,12 @@ class Logistic {
|
|
|
213
192
|
} = { requestHeaders: {} },
|
|
214
193
|
{ responseHeaders } = { responseHeaders: false }
|
|
215
194
|
) {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
path: ["localityType"],
|
|
195
|
+
const errors = validateRequiredParams(arguments[0], ["localityType"]);
|
|
196
|
+
if (errors.length > 0) {
|
|
197
|
+
const error = new FDKClientValidationError({
|
|
198
|
+
message: "Missing required field",
|
|
199
|
+
details: errors,
|
|
222
200
|
});
|
|
223
|
-
}
|
|
224
|
-
if (invalidInput.length) {
|
|
225
|
-
const error = new Error();
|
|
226
|
-
error.message = "Missing required field";
|
|
227
|
-
error.details = invalidInput;
|
|
228
201
|
return Promise.reject(new FDKClientValidationError(error));
|
|
229
202
|
}
|
|
230
203
|
|
|
@@ -273,24 +246,15 @@ class Logistic {
|
|
|
273
246
|
},
|
|
274
247
|
{ responseHeaders } = { responseHeaders: false }
|
|
275
248
|
) {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
if (!localityValue) {
|
|
285
|
-
invalidInput.push({
|
|
286
|
-
message: `The 'localityValue' field is required.`,
|
|
287
|
-
path: ["localityValue"],
|
|
249
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
250
|
+
"localityType",
|
|
251
|
+
"localityValue",
|
|
252
|
+
]);
|
|
253
|
+
if (errors.length > 0) {
|
|
254
|
+
const error = new FDKClientValidationError({
|
|
255
|
+
message: "Missing required field",
|
|
256
|
+
details: errors,
|
|
288
257
|
});
|
|
289
|
-
}
|
|
290
|
-
if (invalidInput.length) {
|
|
291
|
-
const error = new Error();
|
|
292
|
-
error.message = "Missing required field";
|
|
293
|
-
error.details = invalidInput;
|
|
294
258
|
return Promise.reject(new FDKClientValidationError(error));
|
|
295
259
|
}
|
|
296
260
|
|
|
@@ -345,27 +309,6 @@ class Logistic {
|
|
|
345
309
|
} = { requestHeaders: {} },
|
|
346
310
|
{ responseHeaders } = { responseHeaders: false }
|
|
347
311
|
) {
|
|
348
|
-
let invalidInput = [];
|
|
349
|
-
|
|
350
|
-
if (!xApplicationId) {
|
|
351
|
-
invalidInput.push({
|
|
352
|
-
message: `The 'xApplicationId' field is required.`,
|
|
353
|
-
path: ["xApplicationId"],
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
if (!xApplicationData) {
|
|
357
|
-
invalidInput.push({
|
|
358
|
-
message: `The 'xApplicationData' field is required.`,
|
|
359
|
-
path: ["xApplicationData"],
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
if (invalidInput.length) {
|
|
363
|
-
const error = new Error();
|
|
364
|
-
error.message = "Missing required field";
|
|
365
|
-
error.details = invalidInput;
|
|
366
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
367
|
-
}
|
|
368
|
-
|
|
369
312
|
const query_params = {};
|
|
370
313
|
query_params["x-application-id"] = xApplicationId;
|
|
371
314
|
query_params["x-application-data"] = xApplicationData;
|
|
@@ -412,14 +355,6 @@ class Logistic {
|
|
|
412
355
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
413
356
|
{ responseHeaders } = { responseHeaders: false }
|
|
414
357
|
) {
|
|
415
|
-
let invalidInput = [];
|
|
416
|
-
if (invalidInput.length) {
|
|
417
|
-
const error = new Error();
|
|
418
|
-
error.message = "Missing required field";
|
|
419
|
-
error.details = invalidInput;
|
|
420
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
421
|
-
}
|
|
422
|
-
|
|
423
358
|
const query_params = {};
|
|
424
359
|
|
|
425
360
|
const xHeaders = {};
|
|
@@ -457,18 +392,12 @@ class Logistic {
|
|
|
457
392
|
{ pincode, requestHeaders } = { requestHeaders: {} },
|
|
458
393
|
{ responseHeaders } = { responseHeaders: false }
|
|
459
394
|
) {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
path: ["pincode"],
|
|
395
|
+
const errors = validateRequiredParams(arguments[0], ["pincode"]);
|
|
396
|
+
if (errors.length > 0) {
|
|
397
|
+
const error = new FDKClientValidationError({
|
|
398
|
+
message: "Missing required field",
|
|
399
|
+
details: errors,
|
|
466
400
|
});
|
|
467
|
-
}
|
|
468
|
-
if (invalidInput.length) {
|
|
469
|
-
const error = new Error();
|
|
470
|
-
error.message = "Missing required field";
|
|
471
|
-
error.details = invalidInput;
|
|
472
401
|
return Promise.reject(new FDKClientValidationError(error));
|
|
473
402
|
}
|
|
474
403
|
|
|
@@ -509,14 +438,6 @@ class Logistic {
|
|
|
509
438
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
510
439
|
{ responseHeaders } = { responseHeaders: false }
|
|
511
440
|
) {
|
|
512
|
-
let invalidInput = [];
|
|
513
|
-
if (invalidInput.length) {
|
|
514
|
-
const error = new Error();
|
|
515
|
-
error.message = "Missing required field";
|
|
516
|
-
error.details = invalidInput;
|
|
517
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
518
|
-
}
|
|
519
|
-
|
|
520
441
|
const query_params = {};
|
|
521
442
|
|
|
522
443
|
const xHeaders = {};
|
|
@@ -554,14 +475,6 @@ class Logistic {
|
|
|
554
475
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
555
476
|
{ responseHeaders } = { responseHeaders: false }
|
|
556
477
|
) {
|
|
557
|
-
let invalidInput = [];
|
|
558
|
-
if (invalidInput.length) {
|
|
559
|
-
const error = new Error();
|
|
560
|
-
error.message = "Missing required field";
|
|
561
|
-
error.details = invalidInput;
|
|
562
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
563
|
-
}
|
|
564
|
-
|
|
565
478
|
const query_params = {};
|
|
566
479
|
|
|
567
480
|
const xHeaders = {};
|
|
@@ -601,24 +514,15 @@ class Logistic {
|
|
|
601
514
|
},
|
|
602
515
|
{ responseHeaders } = { responseHeaders: false }
|
|
603
516
|
) {
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
if (!templateName) {
|
|
613
|
-
invalidInput.push({
|
|
614
|
-
message: `The 'templateName' field is required.`,
|
|
615
|
-
path: ["templateName"],
|
|
517
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
518
|
+
"countryIsoCode",
|
|
519
|
+
"templateName",
|
|
520
|
+
]);
|
|
521
|
+
if (errors.length > 0) {
|
|
522
|
+
const error = new FDKClientValidationError({
|
|
523
|
+
message: "Missing required field",
|
|
524
|
+
details: errors,
|
|
616
525
|
});
|
|
617
|
-
}
|
|
618
|
-
if (invalidInput.length) {
|
|
619
|
-
const error = new Error();
|
|
620
|
-
error.message = "Missing required field";
|
|
621
|
-
error.details = invalidInput;
|
|
622
526
|
return Promise.reject(new FDKClientValidationError(error));
|
|
623
527
|
}
|
|
624
528
|
|
|
@@ -25,7 +25,7 @@ declare class Order {
|
|
|
25
25
|
* @summary: Get shipment's customer
|
|
26
26
|
* @description: Get customer details such as mobile number using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getCustomerDetailsByShipmentId/).
|
|
27
27
|
*/
|
|
28
|
-
getCustomerDetailsByShipmentId({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CustomerDetailsResponse>;
|
|
28
|
+
getCustomerDetailsByShipmentId({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<CustomerDetailsResponse>;
|
|
29
29
|
/**
|
|
30
30
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
31
31
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -34,7 +34,7 @@ declare class Order {
|
|
|
34
34
|
* @summary: Retrieves invoice for shipment
|
|
35
35
|
* @description: Get invoice corresponding to a specific shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getInvoiceByShipmentId/).
|
|
36
36
|
*/
|
|
37
|
-
getInvoiceByShipmentId({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ResponseGetInvoiceShipment>;
|
|
37
|
+
getInvoiceByShipmentId({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ResponseGetInvoiceShipment>;
|
|
38
38
|
/**
|
|
39
39
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
40
40
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -43,7 +43,7 @@ declare class Order {
|
|
|
43
43
|
* @summary: Get an order
|
|
44
44
|
* @description: Get order details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrderById/).
|
|
45
45
|
*/
|
|
46
|
-
getOrderById({ orderId, allowInactive, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<OrderById>;
|
|
46
|
+
getOrderById({ orderId, allowInactive, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<OrderById>;
|
|
47
47
|
/**
|
|
48
48
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
49
49
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -61,7 +61,7 @@ declare class Order {
|
|
|
61
61
|
* @summary: List bag cancellation reasons
|
|
62
62
|
* @description: Get reasons to perform full or partial cancellation of a bag. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentBagReasons/).
|
|
63
63
|
*/
|
|
64
|
-
getShipmentBagReasons({ shipmentId, bagId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ShipmentBagReasons>;
|
|
64
|
+
getShipmentBagReasons({ shipmentId, bagId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentBagReasons>;
|
|
65
65
|
/**
|
|
66
66
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
67
67
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -70,7 +70,7 @@ declare class Order {
|
|
|
70
70
|
* @summary: Get a Shipment
|
|
71
71
|
* @description: Get shipment details such as price breakup, tracking details, store information, etc. using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentById/).
|
|
72
72
|
*/
|
|
73
|
-
getShipmentById({ shipmentId, allowInactive, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ShipmentById>;
|
|
73
|
+
getShipmentById({ shipmentId, allowInactive, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentById>;
|
|
74
74
|
/**
|
|
75
75
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
76
76
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -79,7 +79,7 @@ declare class Order {
|
|
|
79
79
|
* @summary: List shipment cancellation reasons
|
|
80
80
|
* @description: Get reasons to perform full or partial cancellation of a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentReasons/).
|
|
81
81
|
*/
|
|
82
|
-
getShipmentReasons({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ShipmentReasons>;
|
|
82
|
+
getShipmentReasons({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentReasons>;
|
|
83
83
|
/**
|
|
84
84
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
85
85
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -88,7 +88,7 @@ declare class Order {
|
|
|
88
88
|
* @summary: Send OTP to customer
|
|
89
89
|
* @description: Send OTP to the customer for shipment verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/sendOtpToShipmentCustomer/).
|
|
90
90
|
*/
|
|
91
|
-
sendOtpToShipmentCustomer({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<SendOtpToCustomerResponse>;
|
|
91
|
+
sendOtpToShipmentCustomer({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<SendOtpToCustomerResponse>;
|
|
92
92
|
/**
|
|
93
93
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
94
94
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -97,7 +97,7 @@ declare class Order {
|
|
|
97
97
|
* @summary: Track shipment status
|
|
98
98
|
* @description: Track Shipment by shipment id, for application based on application Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/trackShipment/).
|
|
99
99
|
*/
|
|
100
|
-
trackShipment({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ShipmentTrack>;
|
|
100
|
+
trackShipment({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentTrack>;
|
|
101
101
|
/**
|
|
102
102
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
103
103
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -106,7 +106,7 @@ declare class Order {
|
|
|
106
106
|
* @summary: Updates shipment status
|
|
107
107
|
* @description: Update current status of a specific shipment using its shipment ID. Supports both partial and full transition as per the configured settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/).
|
|
108
108
|
*/
|
|
109
|
-
updateShipmentStatus({ shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ShipmentApplicationStatusResponse>;
|
|
109
|
+
updateShipmentStatus({ shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentApplicationStatusResponse>;
|
|
110
110
|
/**
|
|
111
111
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
112
112
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -115,5 +115,5 @@ declare class Order {
|
|
|
115
115
|
* @summary: Verifies OTP
|
|
116
116
|
* @description: Verify OTP sent by customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/).
|
|
117
117
|
*/
|
|
118
|
-
verifyOtpShipmentCustomer({ orderId, shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<VerifyOtpResponse>;
|
|
118
|
+
verifyOtpShipmentCustomer({ orderId, shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<VerifyOtpResponse>;
|
|
119
119
|
}
|