@gofynd/fdk-client-javascript 1.5.2 → 1.6.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.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 +90 -1
- package/sdk/platform/Cart/CartPlatformModel.js +51 -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 +108 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +77 -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.js +15 -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/Webhook/WebhookPublicClient.js +40 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +194 -46
- package/sdk/public/Webhook/WebhookPublicModel.js +51 -46
|
@@ -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");
|
|
@@ -39,6 +44,14 @@ class Finance {
|
|
|
39
44
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
40
45
|
{ responseHeaders } = { responseHeaders: false }
|
|
41
46
|
) {
|
|
47
|
+
let invalidInput = [];
|
|
48
|
+
if (invalidInput.length) {
|
|
49
|
+
const error = new Error();
|
|
50
|
+
error.message = "Missing required field";
|
|
51
|
+
error.details = invalidInput;
|
|
52
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
53
|
+
}
|
|
54
|
+
|
|
42
55
|
const query_params = {};
|
|
43
56
|
|
|
44
57
|
const xHeaders = {};
|
|
@@ -76,6 +89,14 @@ class Finance {
|
|
|
76
89
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
77
90
|
{ responseHeaders } = { responseHeaders: false }
|
|
78
91
|
) {
|
|
92
|
+
let invalidInput = [];
|
|
93
|
+
if (invalidInput.length) {
|
|
94
|
+
const error = new Error();
|
|
95
|
+
error.message = "Missing required field";
|
|
96
|
+
error.details = invalidInput;
|
|
97
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
98
|
+
}
|
|
99
|
+
|
|
79
100
|
const query_params = {};
|
|
80
101
|
|
|
81
102
|
const xHeaders = {};
|
|
@@ -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");
|
|
@@ -40,6 +45,21 @@ class Lead {
|
|
|
40
45
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
41
46
|
{ responseHeaders } = { responseHeaders: false }
|
|
42
47
|
) {
|
|
48
|
+
let invalidInput = [];
|
|
49
|
+
|
|
50
|
+
if (!id) {
|
|
51
|
+
invalidInput.push({
|
|
52
|
+
message: `The 'id' field is required.`,
|
|
53
|
+
path: ["id"],
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (invalidInput.length) {
|
|
57
|
+
const error = new Error();
|
|
58
|
+
error.message = "Missing required field";
|
|
59
|
+
error.details = invalidInput;
|
|
60
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
61
|
+
}
|
|
62
|
+
|
|
43
63
|
const query_params = {};
|
|
44
64
|
|
|
45
65
|
const xHeaders = {};
|
|
@@ -77,6 +97,14 @@ class Lead {
|
|
|
77
97
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
78
98
|
{ responseHeaders } = { responseHeaders: false }
|
|
79
99
|
) {
|
|
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
|
+
|
|
80
108
|
const query_params = {};
|
|
81
109
|
|
|
82
110
|
const xHeaders = {};
|
|
@@ -114,6 +142,21 @@ class Lead {
|
|
|
114
142
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
115
143
|
{ responseHeaders } = { responseHeaders: false }
|
|
116
144
|
) {
|
|
145
|
+
let invalidInput = [];
|
|
146
|
+
|
|
147
|
+
if (!slug) {
|
|
148
|
+
invalidInput.push({
|
|
149
|
+
message: `The 'slug' field is required.`,
|
|
150
|
+
path: ["slug"],
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
if (invalidInput.length) {
|
|
154
|
+
const error = new Error();
|
|
155
|
+
error.message = "Missing required field";
|
|
156
|
+
error.details = invalidInput;
|
|
157
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
158
|
+
}
|
|
159
|
+
|
|
117
160
|
const query_params = {};
|
|
118
161
|
|
|
119
162
|
const xHeaders = {};
|
|
@@ -151,6 +194,21 @@ class Lead {
|
|
|
151
194
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
152
195
|
{ responseHeaders } = { responseHeaders: false }
|
|
153
196
|
) {
|
|
197
|
+
let invalidInput = [];
|
|
198
|
+
|
|
199
|
+
if (!id) {
|
|
200
|
+
invalidInput.push({
|
|
201
|
+
message: `The 'id' field is required.`,
|
|
202
|
+
path: ["id"],
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
if (invalidInput.length) {
|
|
206
|
+
const error = new Error();
|
|
207
|
+
error.message = "Missing required field";
|
|
208
|
+
error.details = invalidInput;
|
|
209
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
210
|
+
}
|
|
211
|
+
|
|
154
212
|
const query_params = {};
|
|
155
213
|
|
|
156
214
|
const xHeaders = {};
|
|
@@ -188,6 +246,21 @@ class Lead {
|
|
|
188
246
|
{ slug, body, requestHeaders } = { requestHeaders: {} },
|
|
189
247
|
{ responseHeaders } = { responseHeaders: false }
|
|
190
248
|
) {
|
|
249
|
+
let invalidInput = [];
|
|
250
|
+
|
|
251
|
+
if (!slug) {
|
|
252
|
+
invalidInput.push({
|
|
253
|
+
message: `The 'slug' field is required.`,
|
|
254
|
+
path: ["slug"],
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
if (invalidInput.length) {
|
|
258
|
+
const error = new Error();
|
|
259
|
+
error.message = "Missing required field";
|
|
260
|
+
error.details = invalidInput;
|
|
261
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
262
|
+
}
|
|
263
|
+
|
|
191
264
|
const query_params = {};
|
|
192
265
|
|
|
193
266
|
const xHeaders = {};
|
|
@@ -36,7 +36,7 @@ declare class Logistic {
|
|
|
36
36
|
* @summary: Get countries
|
|
37
37
|
* @description: List of supported countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/).
|
|
38
38
|
*/
|
|
39
|
-
getCountries({ onboarding, pageNo, pageSize, q, hierarchy, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetCountries>;
|
|
39
|
+
getCountries({ onboarding, pageNo, pageSize, q, hierarchy, phoneCode, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetCountries>;
|
|
40
40
|
/**
|
|
41
41
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
42
42
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -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");
|
|
@@ -55,6 +60,14 @@ class Logistic {
|
|
|
55
60
|
{ requestHeaders } = { requestHeaders: {} },
|
|
56
61
|
{ responseHeaders } = { responseHeaders: false }
|
|
57
62
|
) {
|
|
63
|
+
let invalidInput = [];
|
|
64
|
+
if (invalidInput.length) {
|
|
65
|
+
const error = new Error();
|
|
66
|
+
error.message = "Missing required field";
|
|
67
|
+
error.details = invalidInput;
|
|
68
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
69
|
+
}
|
|
70
|
+
|
|
58
71
|
const query_params = {};
|
|
59
72
|
|
|
60
73
|
const xHeaders = {};
|
|
@@ -89,17 +102,32 @@ class Logistic {
|
|
|
89
102
|
* @description: List of supported countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/).
|
|
90
103
|
*/
|
|
91
104
|
async getCountries(
|
|
92
|
-
{
|
|
93
|
-
|
|
94
|
-
|
|
105
|
+
{
|
|
106
|
+
onboarding,
|
|
107
|
+
pageNo,
|
|
108
|
+
pageSize,
|
|
109
|
+
q,
|
|
110
|
+
hierarchy,
|
|
111
|
+
phoneCode,
|
|
112
|
+
requestHeaders,
|
|
113
|
+
} = { requestHeaders: {} },
|
|
95
114
|
{ responseHeaders } = { responseHeaders: false }
|
|
96
115
|
) {
|
|
116
|
+
let invalidInput = [];
|
|
117
|
+
if (invalidInput.length) {
|
|
118
|
+
const error = new Error();
|
|
119
|
+
error.message = "Missing required field";
|
|
120
|
+
error.details = invalidInput;
|
|
121
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
122
|
+
}
|
|
123
|
+
|
|
97
124
|
const query_params = {};
|
|
98
125
|
query_params["onboarding"] = onboarding;
|
|
99
126
|
query_params["page_no"] = pageNo;
|
|
100
127
|
query_params["page_size"] = pageSize;
|
|
101
128
|
query_params["q"] = q;
|
|
102
129
|
query_params["hierarchy"] = hierarchy;
|
|
130
|
+
query_params["phone_code"] = phoneCode;
|
|
103
131
|
|
|
104
132
|
const xHeaders = {};
|
|
105
133
|
|
|
@@ -136,6 +164,21 @@ class Logistic {
|
|
|
136
164
|
{ countryIsoCode, requestHeaders } = { requestHeaders: {} },
|
|
137
165
|
{ responseHeaders } = { responseHeaders: false }
|
|
138
166
|
) {
|
|
167
|
+
let invalidInput = [];
|
|
168
|
+
|
|
169
|
+
if (!countryIsoCode) {
|
|
170
|
+
invalidInput.push({
|
|
171
|
+
message: `The 'countryIsoCode' field is required.`,
|
|
172
|
+
path: ["countryIsoCode"],
|
|
173
|
+
});
|
|
174
|
+
}
|
|
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
|
+
|
|
139
182
|
const query_params = {};
|
|
140
183
|
|
|
141
184
|
const xHeaders = {};
|
|
@@ -173,6 +216,27 @@ class Logistic {
|
|
|
173
216
|
{ companyId, applicationId, body, requestHeaders } = { requestHeaders: {} },
|
|
174
217
|
{ responseHeaders } = { responseHeaders: false }
|
|
175
218
|
) {
|
|
219
|
+
let invalidInput = [];
|
|
220
|
+
|
|
221
|
+
if (!companyId) {
|
|
222
|
+
invalidInput.push({
|
|
223
|
+
message: `The 'companyId' field is required.`,
|
|
224
|
+
path: ["companyId"],
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
if (!applicationId) {
|
|
228
|
+
invalidInput.push({
|
|
229
|
+
message: `The 'applicationId' field is required.`,
|
|
230
|
+
path: ["applicationId"],
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
if (invalidInput.length) {
|
|
234
|
+
const error = new Error();
|
|
235
|
+
error.message = "Missing required field";
|
|
236
|
+
error.details = invalidInput;
|
|
237
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
238
|
+
}
|
|
239
|
+
|
|
176
240
|
const query_params = {};
|
|
177
241
|
|
|
178
242
|
const xHeaders = {};
|
|
@@ -210,6 +274,14 @@ class Logistic {
|
|
|
210
274
|
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
211
275
|
{ responseHeaders } = { responseHeaders: false }
|
|
212
276
|
) {
|
|
277
|
+
let invalidInput = [];
|
|
278
|
+
if (invalidInput.length) {
|
|
279
|
+
const error = new Error();
|
|
280
|
+
error.message = "Missing required field";
|
|
281
|
+
error.details = invalidInput;
|
|
282
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
283
|
+
}
|
|
284
|
+
|
|
213
285
|
const query_params = {};
|
|
214
286
|
query_params["page_no"] = pageNo;
|
|
215
287
|
query_params["page_size"] = pageSize;
|
|
@@ -259,6 +331,21 @@ class Logistic {
|
|
|
259
331
|
} = { requestHeaders: {} },
|
|
260
332
|
{ responseHeaders } = { responseHeaders: false }
|
|
261
333
|
) {
|
|
334
|
+
let invalidInput = [];
|
|
335
|
+
|
|
336
|
+
if (!localityType) {
|
|
337
|
+
invalidInput.push({
|
|
338
|
+
message: `The 'localityType' field is required.`,
|
|
339
|
+
path: ["localityType"],
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
if (invalidInput.length) {
|
|
343
|
+
const error = new Error();
|
|
344
|
+
error.message = "Missing required field";
|
|
345
|
+
error.details = invalidInput;
|
|
346
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
347
|
+
}
|
|
348
|
+
|
|
262
349
|
const query_params = {};
|
|
263
350
|
query_params["country"] = country;
|
|
264
351
|
query_params["state"] = state;
|
|
@@ -305,6 +392,27 @@ class Logistic {
|
|
|
305
392
|
},
|
|
306
393
|
{ responseHeaders } = { responseHeaders: false }
|
|
307
394
|
) {
|
|
395
|
+
let invalidInput = [];
|
|
396
|
+
|
|
397
|
+
if (!localityType) {
|
|
398
|
+
invalidInput.push({
|
|
399
|
+
message: `The 'localityType' field is required.`,
|
|
400
|
+
path: ["localityType"],
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
if (!localityValue) {
|
|
404
|
+
invalidInput.push({
|
|
405
|
+
message: `The 'localityValue' field is required.`,
|
|
406
|
+
path: ["localityValue"],
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
if (invalidInput.length) {
|
|
410
|
+
const error = new Error();
|
|
411
|
+
error.message = "Missing required field";
|
|
412
|
+
error.details = invalidInput;
|
|
413
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
414
|
+
}
|
|
415
|
+
|
|
308
416
|
const query_params = {};
|
|
309
417
|
query_params["country"] = country;
|
|
310
418
|
query_params["state"] = state;
|
|
@@ -356,6 +464,27 @@ class Logistic {
|
|
|
356
464
|
} = { requestHeaders: {} },
|
|
357
465
|
{ responseHeaders } = { responseHeaders: false }
|
|
358
466
|
) {
|
|
467
|
+
let invalidInput = [];
|
|
468
|
+
|
|
469
|
+
if (!xApplicationId) {
|
|
470
|
+
invalidInput.push({
|
|
471
|
+
message: `The 'xApplicationId' field is required.`,
|
|
472
|
+
path: ["xApplicationId"],
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
if (!xApplicationData) {
|
|
476
|
+
invalidInput.push({
|
|
477
|
+
message: `The 'xApplicationData' field is required.`,
|
|
478
|
+
path: ["xApplicationData"],
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
if (invalidInput.length) {
|
|
482
|
+
const error = new Error();
|
|
483
|
+
error.message = "Missing required field";
|
|
484
|
+
error.details = invalidInput;
|
|
485
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
486
|
+
}
|
|
487
|
+
|
|
359
488
|
const query_params = {};
|
|
360
489
|
query_params["x-application-id"] = xApplicationId;
|
|
361
490
|
query_params["x-application-data"] = xApplicationData;
|
|
@@ -402,6 +531,14 @@ class Logistic {
|
|
|
402
531
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
403
532
|
{ responseHeaders } = { responseHeaders: false }
|
|
404
533
|
) {
|
|
534
|
+
let invalidInput = [];
|
|
535
|
+
if (invalidInput.length) {
|
|
536
|
+
const error = new Error();
|
|
537
|
+
error.message = "Missing required field";
|
|
538
|
+
error.details = invalidInput;
|
|
539
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
540
|
+
}
|
|
541
|
+
|
|
405
542
|
const query_params = {};
|
|
406
543
|
|
|
407
544
|
const xHeaders = {};
|
|
@@ -439,6 +576,21 @@ class Logistic {
|
|
|
439
576
|
{ pincode, requestHeaders } = { requestHeaders: {} },
|
|
440
577
|
{ responseHeaders } = { responseHeaders: false }
|
|
441
578
|
) {
|
|
579
|
+
let invalidInput = [];
|
|
580
|
+
|
|
581
|
+
if (!pincode) {
|
|
582
|
+
invalidInput.push({
|
|
583
|
+
message: `The 'pincode' field is required.`,
|
|
584
|
+
path: ["pincode"],
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
if (invalidInput.length) {
|
|
588
|
+
const error = new Error();
|
|
589
|
+
error.message = "Missing required field";
|
|
590
|
+
error.details = invalidInput;
|
|
591
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
592
|
+
}
|
|
593
|
+
|
|
442
594
|
const query_params = {};
|
|
443
595
|
|
|
444
596
|
const xHeaders = {};
|
|
@@ -476,6 +628,14 @@ class Logistic {
|
|
|
476
628
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
477
629
|
{ responseHeaders } = { responseHeaders: false }
|
|
478
630
|
) {
|
|
631
|
+
let invalidInput = [];
|
|
632
|
+
if (invalidInput.length) {
|
|
633
|
+
const error = new Error();
|
|
634
|
+
error.message = "Missing required field";
|
|
635
|
+
error.details = invalidInput;
|
|
636
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
637
|
+
}
|
|
638
|
+
|
|
479
639
|
const query_params = {};
|
|
480
640
|
|
|
481
641
|
const xHeaders = {};
|
|
@@ -513,6 +673,14 @@ class Logistic {
|
|
|
513
673
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
514
674
|
{ responseHeaders } = { responseHeaders: false }
|
|
515
675
|
) {
|
|
676
|
+
let invalidInput = [];
|
|
677
|
+
if (invalidInput.length) {
|
|
678
|
+
const error = new Error();
|
|
679
|
+
error.message = "Missing required field";
|
|
680
|
+
error.details = invalidInput;
|
|
681
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
682
|
+
}
|
|
683
|
+
|
|
516
684
|
const query_params = {};
|
|
517
685
|
|
|
518
686
|
const xHeaders = {};
|
|
@@ -552,6 +720,27 @@ class Logistic {
|
|
|
552
720
|
},
|
|
553
721
|
{ responseHeaders } = { responseHeaders: false }
|
|
554
722
|
) {
|
|
723
|
+
let invalidInput = [];
|
|
724
|
+
|
|
725
|
+
if (!countryIsoCode) {
|
|
726
|
+
invalidInput.push({
|
|
727
|
+
message: `The 'countryIsoCode' field is required.`,
|
|
728
|
+
path: ["countryIsoCode"],
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
if (!templateName) {
|
|
732
|
+
invalidInput.push({
|
|
733
|
+
message: `The 'templateName' field is required.`,
|
|
734
|
+
path: ["templateName"],
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
if (invalidInput.length) {
|
|
738
|
+
const error = new Error();
|
|
739
|
+
error.message = "Missing required field";
|
|
740
|
+
error.details = invalidInput;
|
|
741
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
742
|
+
}
|
|
743
|
+
|
|
555
744
|
const query_params = {};
|
|
556
745
|
|
|
557
746
|
const xHeaders = {};
|