@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
|
@@ -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 Order {
|
|
11
12
|
constructor(_conf) {
|
|
@@ -62,24 +63,15 @@ class Order {
|
|
|
62
63
|
{ orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
63
64
|
{ responseHeaders } = { responseHeaders: false }
|
|
64
65
|
) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (!shipmentId) {
|
|
74
|
-
invalidInput.push({
|
|
75
|
-
message: `The 'shipmentId' field is required.`,
|
|
76
|
-
path: ["shipmentId"],
|
|
66
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
67
|
+
"orderId",
|
|
68
|
+
"shipmentId",
|
|
69
|
+
]);
|
|
70
|
+
if (errors.length > 0) {
|
|
71
|
+
const error = new FDKClientValidationError({
|
|
72
|
+
message: "Missing required field",
|
|
73
|
+
details: errors,
|
|
77
74
|
});
|
|
78
|
-
}
|
|
79
|
-
if (invalidInput.length) {
|
|
80
|
-
const error = new Error();
|
|
81
|
-
error.message = "Missing required field";
|
|
82
|
-
error.details = invalidInput;
|
|
83
75
|
return Promise.reject(new FDKClientValidationError(error));
|
|
84
76
|
}
|
|
85
77
|
|
|
@@ -120,18 +112,12 @@ class Order {
|
|
|
120
112
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
121
113
|
{ responseHeaders } = { responseHeaders: false }
|
|
122
114
|
) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
path: ["shipmentId"],
|
|
115
|
+
const errors = validateRequiredParams(arguments[0], ["shipmentId"]);
|
|
116
|
+
if (errors.length > 0) {
|
|
117
|
+
const error = new FDKClientValidationError({
|
|
118
|
+
message: "Missing required field",
|
|
119
|
+
details: errors,
|
|
129
120
|
});
|
|
130
|
-
}
|
|
131
|
-
if (invalidInput.length) {
|
|
132
|
-
const error = new Error();
|
|
133
|
-
error.message = "Missing required field";
|
|
134
|
-
error.details = invalidInput;
|
|
135
121
|
return Promise.reject(new FDKClientValidationError(error));
|
|
136
122
|
}
|
|
137
123
|
|
|
@@ -172,18 +158,12 @@ class Order {
|
|
|
172
158
|
{ orderId, allowInactive, requestHeaders } = { requestHeaders: {} },
|
|
173
159
|
{ responseHeaders } = { responseHeaders: false }
|
|
174
160
|
) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
path: ["orderId"],
|
|
161
|
+
const errors = validateRequiredParams(arguments[0], ["orderId"]);
|
|
162
|
+
if (errors.length > 0) {
|
|
163
|
+
const error = new FDKClientValidationError({
|
|
164
|
+
message: "Missing required field",
|
|
165
|
+
details: errors,
|
|
181
166
|
});
|
|
182
|
-
}
|
|
183
|
-
if (invalidInput.length) {
|
|
184
|
-
const error = new Error();
|
|
185
|
-
error.message = "Missing required field";
|
|
186
|
-
error.details = invalidInput;
|
|
187
167
|
return Promise.reject(new FDKClientValidationError(error));
|
|
188
168
|
}
|
|
189
169
|
|
|
@@ -236,14 +216,6 @@ class Order {
|
|
|
236
216
|
} = { requestHeaders: {} },
|
|
237
217
|
{ responseHeaders } = { responseHeaders: false }
|
|
238
218
|
) {
|
|
239
|
-
let invalidInput = [];
|
|
240
|
-
if (invalidInput.length) {
|
|
241
|
-
const error = new Error();
|
|
242
|
-
error.message = "Missing required field";
|
|
243
|
-
error.details = invalidInput;
|
|
244
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
245
|
-
}
|
|
246
|
-
|
|
247
219
|
const query_params = {};
|
|
248
220
|
query_params["status"] = status;
|
|
249
221
|
query_params["page_no"] = pageNo;
|
|
@@ -290,18 +262,12 @@ class Order {
|
|
|
290
262
|
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
291
263
|
{ responseHeaders } = { responseHeaders: false }
|
|
292
264
|
) {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
path: ["orderId"],
|
|
265
|
+
const errors = validateRequiredParams(arguments[0], ["orderId"]);
|
|
266
|
+
if (errors.length > 0) {
|
|
267
|
+
const error = new FDKClientValidationError({
|
|
268
|
+
message: "Missing required field",
|
|
269
|
+
details: errors,
|
|
299
270
|
});
|
|
300
|
-
}
|
|
301
|
-
if (invalidInput.length) {
|
|
302
|
-
const error = new Error();
|
|
303
|
-
error.message = "Missing required field";
|
|
304
|
-
error.details = invalidInput;
|
|
305
271
|
return Promise.reject(new FDKClientValidationError(error));
|
|
306
272
|
}
|
|
307
273
|
|
|
@@ -342,24 +308,15 @@ class Order {
|
|
|
342
308
|
{ shipmentId, bagId, requestHeaders } = { requestHeaders: {} },
|
|
343
309
|
{ responseHeaders } = { responseHeaders: false }
|
|
344
310
|
) {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
if (!bagId) {
|
|
354
|
-
invalidInput.push({
|
|
355
|
-
message: `The 'bagId' field is required.`,
|
|
356
|
-
path: ["bagId"],
|
|
311
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
312
|
+
"shipmentId",
|
|
313
|
+
"bagId",
|
|
314
|
+
]);
|
|
315
|
+
if (errors.length > 0) {
|
|
316
|
+
const error = new FDKClientValidationError({
|
|
317
|
+
message: "Missing required field",
|
|
318
|
+
details: errors,
|
|
357
319
|
});
|
|
358
|
-
}
|
|
359
|
-
if (invalidInput.length) {
|
|
360
|
-
const error = new Error();
|
|
361
|
-
error.message = "Missing required field";
|
|
362
|
-
error.details = invalidInput;
|
|
363
320
|
return Promise.reject(new FDKClientValidationError(error));
|
|
364
321
|
}
|
|
365
322
|
|
|
@@ -400,18 +357,12 @@ class Order {
|
|
|
400
357
|
{ shipmentId, allowInactive, requestHeaders } = { requestHeaders: {} },
|
|
401
358
|
{ responseHeaders } = { responseHeaders: false }
|
|
402
359
|
) {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
path: ["shipmentId"],
|
|
360
|
+
const errors = validateRequiredParams(arguments[0], ["shipmentId"]);
|
|
361
|
+
if (errors.length > 0) {
|
|
362
|
+
const error = new FDKClientValidationError({
|
|
363
|
+
message: "Missing required field",
|
|
364
|
+
details: errors,
|
|
409
365
|
});
|
|
410
|
-
}
|
|
411
|
-
if (invalidInput.length) {
|
|
412
|
-
const error = new Error();
|
|
413
|
-
error.message = "Missing required field";
|
|
414
|
-
error.details = invalidInput;
|
|
415
366
|
return Promise.reject(new FDKClientValidationError(error));
|
|
416
367
|
}
|
|
417
368
|
|
|
@@ -453,18 +404,12 @@ class Order {
|
|
|
453
404
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
454
405
|
{ responseHeaders } = { responseHeaders: false }
|
|
455
406
|
) {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
path: ["shipmentId"],
|
|
407
|
+
const errors = validateRequiredParams(arguments[0], ["shipmentId"]);
|
|
408
|
+
if (errors.length > 0) {
|
|
409
|
+
const error = new FDKClientValidationError({
|
|
410
|
+
message: "Missing required field",
|
|
411
|
+
details: errors,
|
|
462
412
|
});
|
|
463
|
-
}
|
|
464
|
-
if (invalidInput.length) {
|
|
465
|
-
const error = new Error();
|
|
466
|
-
error.message = "Missing required field";
|
|
467
|
-
error.details = invalidInput;
|
|
468
413
|
return Promise.reject(new FDKClientValidationError(error));
|
|
469
414
|
}
|
|
470
415
|
|
|
@@ -505,24 +450,15 @@ class Order {
|
|
|
505
450
|
{ orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
506
451
|
{ responseHeaders } = { responseHeaders: false }
|
|
507
452
|
) {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
if (!shipmentId) {
|
|
517
|
-
invalidInput.push({
|
|
518
|
-
message: `The 'shipmentId' field is required.`,
|
|
519
|
-
path: ["shipmentId"],
|
|
453
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
454
|
+
"orderId",
|
|
455
|
+
"shipmentId",
|
|
456
|
+
]);
|
|
457
|
+
if (errors.length > 0) {
|
|
458
|
+
const error = new FDKClientValidationError({
|
|
459
|
+
message: "Missing required field",
|
|
460
|
+
details: errors,
|
|
520
461
|
});
|
|
521
|
-
}
|
|
522
|
-
if (invalidInput.length) {
|
|
523
|
-
const error = new Error();
|
|
524
|
-
error.message = "Missing required field";
|
|
525
|
-
error.details = invalidInput;
|
|
526
462
|
return Promise.reject(new FDKClientValidationError(error));
|
|
527
463
|
}
|
|
528
464
|
|
|
@@ -563,18 +499,12 @@ class Order {
|
|
|
563
499
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
564
500
|
{ responseHeaders } = { responseHeaders: false }
|
|
565
501
|
) {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
path: ["shipmentId"],
|
|
502
|
+
const errors = validateRequiredParams(arguments[0], ["shipmentId"]);
|
|
503
|
+
if (errors.length > 0) {
|
|
504
|
+
const error = new FDKClientValidationError({
|
|
505
|
+
message: "Missing required field",
|
|
506
|
+
details: errors,
|
|
572
507
|
});
|
|
573
|
-
}
|
|
574
|
-
if (invalidInput.length) {
|
|
575
|
-
const error = new Error();
|
|
576
|
-
error.message = "Missing required field";
|
|
577
|
-
error.details = invalidInput;
|
|
578
508
|
return Promise.reject(new FDKClientValidationError(error));
|
|
579
509
|
}
|
|
580
510
|
|
|
@@ -615,18 +545,12 @@ class Order {
|
|
|
615
545
|
{ shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
616
546
|
{ responseHeaders } = { responseHeaders: false }
|
|
617
547
|
) {
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
path: ["shipmentId"],
|
|
548
|
+
const errors = validateRequiredParams(arguments[0], ["shipmentId"]);
|
|
549
|
+
if (errors.length > 0) {
|
|
550
|
+
const error = new FDKClientValidationError({
|
|
551
|
+
message: "Missing required field",
|
|
552
|
+
details: errors,
|
|
624
553
|
});
|
|
625
|
-
}
|
|
626
|
-
if (invalidInput.length) {
|
|
627
|
-
const error = new Error();
|
|
628
|
-
error.message = "Missing required field";
|
|
629
|
-
error.details = invalidInput;
|
|
630
554
|
return Promise.reject(new FDKClientValidationError(error));
|
|
631
555
|
}
|
|
632
556
|
|
|
@@ -667,24 +591,15 @@ class Order {
|
|
|
667
591
|
{ orderId, shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
668
592
|
{ responseHeaders } = { responseHeaders: false }
|
|
669
593
|
) {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
if (!shipmentId) {
|
|
679
|
-
invalidInput.push({
|
|
680
|
-
message: `The 'shipmentId' field is required.`,
|
|
681
|
-
path: ["shipmentId"],
|
|
594
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
595
|
+
"orderId",
|
|
596
|
+
"shipmentId",
|
|
597
|
+
]);
|
|
598
|
+
if (errors.length > 0) {
|
|
599
|
+
const error = new FDKClientValidationError({
|
|
600
|
+
message: "Missing required field",
|
|
601
|
+
details: errors,
|
|
682
602
|
});
|
|
683
|
-
}
|
|
684
|
-
if (invalidInput.length) {
|
|
685
|
-
const error = new Error();
|
|
686
|
-
error.message = "Missing required field";
|
|
687
|
-
error.details = invalidInput;
|
|
688
603
|
return Promise.reject(new FDKClientValidationError(error));
|
|
689
604
|
}
|
|
690
605
|
|
|
@@ -34,7 +34,6 @@ declare class Payment {
|
|
|
34
34
|
initialisePayment: string;
|
|
35
35
|
initialisePaymentPaymentLink: string;
|
|
36
36
|
linkWallet: string;
|
|
37
|
-
outstandingOrderDetails: string;
|
|
38
37
|
paidOrderDetails: string;
|
|
39
38
|
pollingPaymentLink: string;
|
|
40
39
|
redirectToAggregator: string;
|
|
@@ -97,7 +96,7 @@ declare class Payment {
|
|
|
97
96
|
* @summary: Get card details
|
|
98
97
|
* @description: Get details of a specified payment card, including information such as the card type, brand, country, and expiration date. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cardDetails/).
|
|
99
98
|
*/
|
|
100
|
-
cardDetails({ cardInfo, aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CardDetailsFetchedDetails>;
|
|
99
|
+
cardDetails({ cardInfo, aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<CardDetailsFetchedDetails>;
|
|
101
100
|
/**
|
|
102
101
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
103
102
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -232,7 +231,7 @@ declare class Payment {
|
|
|
232
231
|
* @summary: Get payment aggregators
|
|
233
232
|
* @description: Get aggregator secret key of all payment gateways utilized for payments when using the SDK for the payment gateway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getAggregatorsConfig/).
|
|
234
233
|
*/
|
|
235
|
-
getAggregatorsConfig({
|
|
234
|
+
getAggregatorsConfig({ refresh, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<AggregatorsConfigDetail>;
|
|
236
235
|
/**
|
|
237
236
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
238
237
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -332,15 +331,6 @@ declare class Payment {
|
|
|
332
331
|
* @description: Verify the linking of wallet using OTP for further processing of payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/linkWallet/).
|
|
333
332
|
*/
|
|
334
333
|
linkWallet({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<WalletResponseSchema>;
|
|
335
|
-
/**
|
|
336
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
337
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
338
|
-
* @returns {Promise<OutstandingOrderDetails>} - Success response
|
|
339
|
-
* @name outstandingOrderDetails
|
|
340
|
-
* @summary: Outstanding orders
|
|
341
|
-
* @description: Get details of orders with outstanding payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/outstandingOrderDetails/).
|
|
342
|
-
*/
|
|
343
|
-
outstandingOrderDetails({ aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<OutstandingOrderDetails>;
|
|
344
334
|
/**
|
|
345
335
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
346
336
|
* @param {import("../ApplicationAPIClient").Options} - Options
|