@gofynd/fdk-client-javascript 1.0.0 → 1.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/documentation/application/CATALOG.md +371 -371
- package/documentation/application/ORDER.md +272 -272
- package/documentation/application/PAYMENT.md +269 -269
- package/documentation/platform/CATALOG.md +1678 -1664
- package/documentation/platform/COMPANYPROFILE.md +201 -201
- package/documentation/platform/ORDER.md +1442 -1323
- package/documentation/platform/PAYMENT.md +88 -88
- package/index.js +7 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +302 -0
- package/sdk/application/Cart/CartApplicationValidator.js +1 -0
- package/sdk/application/Catalog/CatalogApplicationClient.js +378 -0
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +17 -17
- package/sdk/application/Catalog/CatalogApplicationModel.js +500 -500
- package/sdk/application/Catalog/CatalogApplicationValidator.js +1 -0
- package/sdk/application/Common/CommonApplicationClient.js +22 -0
- package/sdk/application/Common/CommonApplicationValidator.js +1 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +41 -0
- package/sdk/application/Communication/CommunicationApplicationValidator.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +200 -0
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationClient.js +215 -0
- package/sdk/application/Content/ContentApplicationValidator.js +1 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +33 -0
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +1 -0
- package/sdk/application/Lead/LeadApplicationClient.js +81 -0
- package/sdk/application/Lead/LeadApplicationValidator.js +1 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +44 -0
- package/sdk/application/Logistic/LogisticApplicationValidator.js +1 -0
- package/sdk/application/Order/OrderApplicationClient.js +146 -0
- package/sdk/application/Order/OrderApplicationModel.d.ts +20 -20
- package/sdk/application/Order/OrderApplicationModel.js +329 -329
- package/sdk/application/Order/OrderApplicationValidator.js +1 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +528 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationModel.js +391 -391
- package/sdk/application/Payment/PaymentApplicationValidator.js +1 -0
- package/sdk/application/PosCart/PosCartApplicationClient.js +329 -0
- package/sdk/application/PosCart/PosCartApplicationValidator.js +1 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +81 -0
- package/sdk/application/Rewards/RewardsApplicationValidator.js +1 -0
- package/sdk/application/Share/ShareApplicationClient.js +87 -0
- package/sdk/application/Share/ShareApplicationValidator.js +1 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +44 -0
- package/sdk/application/Theme/ThemeApplicationValidator.js +1 -0
- package/sdk/application/User/UserApplicationClient.js +405 -0
- package/sdk/application/User/UserApplicationValidator.js +1 -0
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +114 -0
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +58 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +46 -0
- package/sdk/platform/Billing/BillingPlatformClient.js +160 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +246 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +29 -29
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +839 -48
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +3 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +9 -9
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +54 -54
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1149 -96
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +58 -57
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1626 -1614
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +6 -6
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +20 -20
- package/sdk/platform/Common/CommonPlatformClient.js +26 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +587 -0
- package/sdk/platform/Communication/CommunicationPlatformClient.js +15 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +179 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +11 -11
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +269 -269
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +382 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +282 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +866 -0
- package/sdk/platform/Discount/DiscountPlatformClient.js +152 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +54 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +76 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.js +161 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +162 -0
- package/sdk/platform/Lead/LeadPlatformClient.js +140 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +55 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +15 -6
- package/sdk/platform/Order/OrderPlatformClient.js +674 -15
- package/sdk/platform/Order/OrderPlatformModel.d.ts +67 -60
- package/sdk/platform/Order/OrderPlatformModel.js +1559 -1623
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +10 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +26 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +165 -0
- package/sdk/platform/Payment/PaymentPlatformClient.js +139 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +137 -137
- package/sdk/platform/PlatformApplicationClient.d.ts +2217 -2243
- package/sdk/platform/PlatformApplicationClient.js +2514 -2524
- package/sdk/platform/PlatformClient.d.ts +2217 -2243
- package/sdk/platform/PlatformClient.js +2514 -2524
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +169 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.js +53 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +293 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +145 -0
- package/sdk/platform/Webhook/WebhookPlatformClient.js +90 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +25 -0
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +3 -1
- package/sdk/public/Inventory/InventoryPublicClient.js +75 -0
- package/sdk/public/Inventory/InventoryPublicValidator.js +3 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +29 -0
- package/sdk/public/Webhook/WebhookPublicValidator.js +3 -1
|
@@ -80,6 +80,36 @@ class Order {
|
|
|
80
80
|
return Promise.reject(new FDKClientValidationError(error));
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
// Showing warrnings if extra unknown parameters are found
|
|
84
|
+
const { error: warrning } = OrderValidator.getShipments().validate(
|
|
85
|
+
{
|
|
86
|
+
lane,
|
|
87
|
+
searchType,
|
|
88
|
+
searchValue,
|
|
89
|
+
searchId,
|
|
90
|
+
fromDate,
|
|
91
|
+
toDate,
|
|
92
|
+
dpIds,
|
|
93
|
+
orderingCompanyId,
|
|
94
|
+
stores,
|
|
95
|
+
salesChannel,
|
|
96
|
+
requestByExt,
|
|
97
|
+
pageNo,
|
|
98
|
+
pageSize,
|
|
99
|
+
isPrioritySort,
|
|
100
|
+
excludeLockedShipments,
|
|
101
|
+
paymentMethods,
|
|
102
|
+
channelShipmentId,
|
|
103
|
+
channelOrderId,
|
|
104
|
+
customMeta,
|
|
105
|
+
},
|
|
106
|
+
{ abortEarly: false, allowUnknown: false }
|
|
107
|
+
);
|
|
108
|
+
if (warrning) {
|
|
109
|
+
console.log("Parameter Validation warrnings for getShipments");
|
|
110
|
+
console.log(warrning);
|
|
111
|
+
}
|
|
112
|
+
|
|
83
113
|
const query_params = {};
|
|
84
114
|
query_params["lane"] = lane;
|
|
85
115
|
query_params["search_type"] = searchType;
|
|
@@ -141,6 +171,21 @@ class Order {
|
|
|
141
171
|
return Promise.reject(new FDKClientValidationError(error));
|
|
142
172
|
}
|
|
143
173
|
|
|
174
|
+
// Showing warrnings if extra unknown parameters are found
|
|
175
|
+
const { error: warrning } = OrderValidator.getShipmentById().validate(
|
|
176
|
+
{
|
|
177
|
+
channelShipmentId,
|
|
178
|
+
shipmentId,
|
|
179
|
+
orderingCompanyId,
|
|
180
|
+
requestByExt,
|
|
181
|
+
},
|
|
182
|
+
{ abortEarly: false, allowUnknown: false }
|
|
183
|
+
);
|
|
184
|
+
if (warrning) {
|
|
185
|
+
console.log("Parameter Validation warrnings for getShipmentById");
|
|
186
|
+
console.log(warrning);
|
|
187
|
+
}
|
|
188
|
+
|
|
144
189
|
const query_params = {};
|
|
145
190
|
query_params["channel_shipment_id"] = channelShipmentId;
|
|
146
191
|
query_params["shipment_id"] = shipmentId;
|
|
@@ -176,6 +221,18 @@ class Order {
|
|
|
176
221
|
return Promise.reject(new FDKClientValidationError(error));
|
|
177
222
|
}
|
|
178
223
|
|
|
224
|
+
// Showing warrnings if extra unknown parameters are found
|
|
225
|
+
const { error: warrning } = OrderValidator.getOrderById().validate(
|
|
226
|
+
{
|
|
227
|
+
orderId,
|
|
228
|
+
},
|
|
229
|
+
{ abortEarly: false, allowUnknown: false }
|
|
230
|
+
);
|
|
231
|
+
if (warrning) {
|
|
232
|
+
console.log("Parameter Validation warrnings for getOrderById");
|
|
233
|
+
console.log(warrning);
|
|
234
|
+
}
|
|
235
|
+
|
|
179
236
|
const query_params = {};
|
|
180
237
|
query_params["order_id"] = orderId;
|
|
181
238
|
|
|
@@ -234,6 +291,26 @@ class Order {
|
|
|
234
291
|
return Promise.reject(new FDKClientValidationError(error));
|
|
235
292
|
}
|
|
236
293
|
|
|
294
|
+
// Showing warrnings if extra unknown parameters are found
|
|
295
|
+
const { error: warrning } = OrderValidator.getLaneConfig().validate(
|
|
296
|
+
{
|
|
297
|
+
superLane,
|
|
298
|
+
groupEntity,
|
|
299
|
+
fromDate,
|
|
300
|
+
toDate,
|
|
301
|
+
dpIds,
|
|
302
|
+
stores,
|
|
303
|
+
salesChannel,
|
|
304
|
+
paymentMode,
|
|
305
|
+
bagStatus,
|
|
306
|
+
},
|
|
307
|
+
{ abortEarly: false, allowUnknown: false }
|
|
308
|
+
);
|
|
309
|
+
if (warrning) {
|
|
310
|
+
console.log("Parameter Validation warrnings for getLaneConfig");
|
|
311
|
+
console.log(warrning);
|
|
312
|
+
}
|
|
313
|
+
|
|
237
314
|
const query_params = {};
|
|
238
315
|
query_params["super_lane"] = superLane;
|
|
239
316
|
query_params["group_entity"] = groupEntity;
|
|
@@ -321,6 +398,33 @@ class Order {
|
|
|
321
398
|
return Promise.reject(new FDKClientValidationError(error));
|
|
322
399
|
}
|
|
323
400
|
|
|
401
|
+
// Showing warrnings if extra unknown parameters are found
|
|
402
|
+
const { error: warrning } = OrderValidator.getOrders().validate(
|
|
403
|
+
{
|
|
404
|
+
lane,
|
|
405
|
+
searchType,
|
|
406
|
+
bagStatus,
|
|
407
|
+
timeToDispatch,
|
|
408
|
+
paymentMethods,
|
|
409
|
+
tags,
|
|
410
|
+
searchValue,
|
|
411
|
+
fromDate,
|
|
412
|
+
toDate,
|
|
413
|
+
dpIds,
|
|
414
|
+
stores,
|
|
415
|
+
salesChannel,
|
|
416
|
+
pageNo,
|
|
417
|
+
pageSize,
|
|
418
|
+
isPrioritySort,
|
|
419
|
+
customMeta,
|
|
420
|
+
},
|
|
421
|
+
{ abortEarly: false, allowUnknown: false }
|
|
422
|
+
);
|
|
423
|
+
if (warrning) {
|
|
424
|
+
console.log("Parameter Validation warrnings for getOrders");
|
|
425
|
+
console.log(warrning);
|
|
426
|
+
}
|
|
427
|
+
|
|
324
428
|
const query_params = {};
|
|
325
429
|
query_params["lane"] = lane;
|
|
326
430
|
query_params["search_type"] = searchType;
|
|
@@ -370,6 +474,19 @@ class Order {
|
|
|
370
474
|
return Promise.reject(new FDKClientValidationError(error));
|
|
371
475
|
}
|
|
372
476
|
|
|
477
|
+
// Showing warrnings if extra unknown parameters are found
|
|
478
|
+
const { error: warrning } = OrderValidator.getMetricCount().validate(
|
|
479
|
+
{
|
|
480
|
+
fromDate,
|
|
481
|
+
toDate,
|
|
482
|
+
},
|
|
483
|
+
{ abortEarly: false, allowUnknown: false }
|
|
484
|
+
);
|
|
485
|
+
if (warrning) {
|
|
486
|
+
console.log("Parameter Validation warrnings for getMetricCount");
|
|
487
|
+
console.log(warrning);
|
|
488
|
+
}
|
|
489
|
+
|
|
373
490
|
const query_params = {};
|
|
374
491
|
query_params["from_date"] = fromDate;
|
|
375
492
|
query_params["to_date"] = toDate;
|
|
@@ -405,6 +522,19 @@ class Order {
|
|
|
405
522
|
return Promise.reject(new FDKClientValidationError(error));
|
|
406
523
|
}
|
|
407
524
|
|
|
525
|
+
// Showing warrnings if extra unknown parameters are found
|
|
526
|
+
const { error: warrning } = OrderValidator.getfilters().validate(
|
|
527
|
+
{
|
|
528
|
+
view,
|
|
529
|
+
groupEntity,
|
|
530
|
+
},
|
|
531
|
+
{ abortEarly: false, allowUnknown: false }
|
|
532
|
+
);
|
|
533
|
+
if (warrning) {
|
|
534
|
+
console.log("Parameter Validation warrnings for getfilters");
|
|
535
|
+
console.log(warrning);
|
|
536
|
+
}
|
|
537
|
+
|
|
408
538
|
const query_params = {};
|
|
409
539
|
query_params["view"] = view;
|
|
410
540
|
query_params["group_entity"] = groupEntity;
|
|
@@ -440,6 +570,19 @@ class Order {
|
|
|
440
570
|
return Promise.reject(new FDKClientValidationError(error));
|
|
441
571
|
}
|
|
442
572
|
|
|
573
|
+
// Showing warrnings if extra unknown parameters are found
|
|
574
|
+
const { error: warrning } = OrderValidator.createShipmentReport().validate(
|
|
575
|
+
{
|
|
576
|
+
fromDate,
|
|
577
|
+
toDate,
|
|
578
|
+
},
|
|
579
|
+
{ abortEarly: false, allowUnknown: false }
|
|
580
|
+
);
|
|
581
|
+
if (warrning) {
|
|
582
|
+
console.log("Parameter Validation warrnings for createShipmentReport");
|
|
583
|
+
console.log(warrning);
|
|
584
|
+
}
|
|
585
|
+
|
|
443
586
|
const query_params = {};
|
|
444
587
|
query_params["from_date"] = fromDate;
|
|
445
588
|
query_params["to_date"] = toDate;
|
|
@@ -475,6 +618,23 @@ class Order {
|
|
|
475
618
|
return Promise.reject(new FDKClientValidationError(error));
|
|
476
619
|
}
|
|
477
620
|
|
|
621
|
+
// Showing warrnings if extra unknown parameters are found
|
|
622
|
+
const {
|
|
623
|
+
error: warrning,
|
|
624
|
+
} = OrderValidator.getReportsShipmentListing().validate(
|
|
625
|
+
{
|
|
626
|
+
pageNo,
|
|
627
|
+
pageSize,
|
|
628
|
+
},
|
|
629
|
+
{ abortEarly: false, allowUnknown: false }
|
|
630
|
+
);
|
|
631
|
+
if (warrning) {
|
|
632
|
+
console.log(
|
|
633
|
+
"Parameter Validation warrnings for getReportsShipmentListing"
|
|
634
|
+
);
|
|
635
|
+
console.log(warrning);
|
|
636
|
+
}
|
|
637
|
+
|
|
478
638
|
const query_params = {};
|
|
479
639
|
query_params["page_no"] = pageNo;
|
|
480
640
|
query_params["page_size"] = pageSize;
|
|
@@ -508,6 +668,18 @@ class Order {
|
|
|
508
668
|
return Promise.reject(new FDKClientValidationError(error));
|
|
509
669
|
}
|
|
510
670
|
|
|
671
|
+
// Showing warrnings if extra unknown parameters are found
|
|
672
|
+
const { error: warrning } = OrderValidator.upsertJioCode().validate(
|
|
673
|
+
{
|
|
674
|
+
body,
|
|
675
|
+
},
|
|
676
|
+
{ abortEarly: false, allowUnknown: false }
|
|
677
|
+
);
|
|
678
|
+
if (warrning) {
|
|
679
|
+
console.log("Parameter Validation warrnings for upsertJioCode");
|
|
680
|
+
console.log(warrning);
|
|
681
|
+
}
|
|
682
|
+
|
|
511
683
|
const query_params = {};
|
|
512
684
|
|
|
513
685
|
const xHeaders = {};
|
|
@@ -541,6 +713,19 @@ class Order {
|
|
|
541
713
|
return Promise.reject(new FDKClientValidationError(error));
|
|
542
714
|
}
|
|
543
715
|
|
|
716
|
+
// Showing warrnings if extra unknown parameters are found
|
|
717
|
+
const { error: warrning } = OrderValidator.getBulkInvoice().validate(
|
|
718
|
+
{
|
|
719
|
+
batchId,
|
|
720
|
+
docType,
|
|
721
|
+
},
|
|
722
|
+
{ abortEarly: false, allowUnknown: false }
|
|
723
|
+
);
|
|
724
|
+
if (warrning) {
|
|
725
|
+
console.log("Parameter Validation warrnings for getBulkInvoice");
|
|
726
|
+
console.log(warrning);
|
|
727
|
+
}
|
|
728
|
+
|
|
544
729
|
const query_params = {};
|
|
545
730
|
query_params["batch_id"] = batchId;
|
|
546
731
|
query_params["doc_type"] = docType;
|
|
@@ -574,6 +759,18 @@ class Order {
|
|
|
574
759
|
return Promise.reject(new FDKClientValidationError(error));
|
|
575
760
|
}
|
|
576
761
|
|
|
762
|
+
// Showing warrnings if extra unknown parameters are found
|
|
763
|
+
const { error: warrning } = OrderValidator.getBulkInvoiceLabel().validate(
|
|
764
|
+
{
|
|
765
|
+
batchId,
|
|
766
|
+
},
|
|
767
|
+
{ abortEarly: false, allowUnknown: false }
|
|
768
|
+
);
|
|
769
|
+
if (warrning) {
|
|
770
|
+
console.log("Parameter Validation warrnings for getBulkInvoiceLabel");
|
|
771
|
+
console.log(warrning);
|
|
772
|
+
}
|
|
773
|
+
|
|
577
774
|
const query_params = {};
|
|
578
775
|
query_params["batch_id"] = batchId;
|
|
579
776
|
|
|
@@ -647,6 +844,35 @@ class Order {
|
|
|
647
844
|
return Promise.reject(new FDKClientValidationError(error));
|
|
648
845
|
}
|
|
649
846
|
|
|
847
|
+
// Showing warrnings if extra unknown parameters are found
|
|
848
|
+
const {
|
|
849
|
+
error: warrning,
|
|
850
|
+
} = OrderValidator.getBulkShipmentExcelFile().validate(
|
|
851
|
+
{
|
|
852
|
+
lane,
|
|
853
|
+
searchType,
|
|
854
|
+
searchId,
|
|
855
|
+
fromDate,
|
|
856
|
+
toDate,
|
|
857
|
+
dpIds,
|
|
858
|
+
orderingCompanyId,
|
|
859
|
+
stores,
|
|
860
|
+
salesChannel,
|
|
861
|
+
requestByExt,
|
|
862
|
+
pageNo,
|
|
863
|
+
pageSize,
|
|
864
|
+
customerId,
|
|
865
|
+
isPrioritySort,
|
|
866
|
+
},
|
|
867
|
+
{ abortEarly: false, allowUnknown: false }
|
|
868
|
+
);
|
|
869
|
+
if (warrning) {
|
|
870
|
+
console.log(
|
|
871
|
+
"Parameter Validation warrnings for getBulkShipmentExcelFile"
|
|
872
|
+
);
|
|
873
|
+
console.log(warrning);
|
|
874
|
+
}
|
|
875
|
+
|
|
650
876
|
const query_params = {};
|
|
651
877
|
query_params["lane"] = lane;
|
|
652
878
|
query_params["search_type"] = searchType;
|
|
@@ -733,6 +959,31 @@ class Order {
|
|
|
733
959
|
return Promise.reject(new FDKClientValidationError(error));
|
|
734
960
|
}
|
|
735
961
|
|
|
962
|
+
// Showing warrnings if extra unknown parameters are found
|
|
963
|
+
const { error: warrning } = OrderValidator.getBulkList().validate(
|
|
964
|
+
{
|
|
965
|
+
lane,
|
|
966
|
+
searchType,
|
|
967
|
+
searchId,
|
|
968
|
+
fromDate,
|
|
969
|
+
toDate,
|
|
970
|
+
dpIds,
|
|
971
|
+
orderingCompanyId,
|
|
972
|
+
stores,
|
|
973
|
+
salesChannel,
|
|
974
|
+
requestByExt,
|
|
975
|
+
pageNo,
|
|
976
|
+
pageSize,
|
|
977
|
+
customerId,
|
|
978
|
+
isPrioritySort,
|
|
979
|
+
},
|
|
980
|
+
{ abortEarly: false, allowUnknown: false }
|
|
981
|
+
);
|
|
982
|
+
if (warrning) {
|
|
983
|
+
console.log("Parameter Validation warrnings for getBulkList");
|
|
984
|
+
console.log(warrning);
|
|
985
|
+
}
|
|
986
|
+
|
|
736
987
|
const query_params = {};
|
|
737
988
|
query_params["lane"] = lane;
|
|
738
989
|
query_params["search_type"] = searchType;
|
|
@@ -780,6 +1031,23 @@ class Order {
|
|
|
780
1031
|
return Promise.reject(new FDKClientValidationError(error));
|
|
781
1032
|
}
|
|
782
1033
|
|
|
1034
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1035
|
+
const {
|
|
1036
|
+
error: warrning,
|
|
1037
|
+
} = OrderValidator.getBulkActionFailedReport().validate(
|
|
1038
|
+
{
|
|
1039
|
+
batchId,
|
|
1040
|
+
reportType,
|
|
1041
|
+
},
|
|
1042
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1043
|
+
);
|
|
1044
|
+
if (warrning) {
|
|
1045
|
+
console.log(
|
|
1046
|
+
"Parameter Validation warrnings for getBulkActionFailedReport"
|
|
1047
|
+
);
|
|
1048
|
+
console.log(warrning);
|
|
1049
|
+
}
|
|
1050
|
+
|
|
783
1051
|
const query_params = {};
|
|
784
1052
|
query_params["batch_id"] = batchId;
|
|
785
1053
|
query_params["report_type"] = reportType;
|
|
@@ -820,6 +1088,20 @@ class Order {
|
|
|
820
1088
|
return Promise.reject(new FDKClientValidationError(error));
|
|
821
1089
|
}
|
|
822
1090
|
|
|
1091
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1092
|
+
const { error: warrning } = OrderValidator.getShipmentReasons().validate(
|
|
1093
|
+
{
|
|
1094
|
+
shipmentId,
|
|
1095
|
+
bagId,
|
|
1096
|
+
state,
|
|
1097
|
+
},
|
|
1098
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1099
|
+
);
|
|
1100
|
+
if (warrning) {
|
|
1101
|
+
console.log("Parameter Validation warrnings for getShipmentReasons");
|
|
1102
|
+
console.log(warrning);
|
|
1103
|
+
}
|
|
1104
|
+
|
|
823
1105
|
const query_params = {};
|
|
824
1106
|
|
|
825
1107
|
const xHeaders = {};
|
|
@@ -851,6 +1133,22 @@ class Order {
|
|
|
851
1133
|
return Promise.reject(new FDKClientValidationError(error));
|
|
852
1134
|
}
|
|
853
1135
|
|
|
1136
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1137
|
+
const {
|
|
1138
|
+
error: warrning,
|
|
1139
|
+
} = OrderValidator.bulkActionProcessXlsxFile().validate(
|
|
1140
|
+
{
|
|
1141
|
+
body,
|
|
1142
|
+
},
|
|
1143
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1144
|
+
);
|
|
1145
|
+
if (warrning) {
|
|
1146
|
+
console.log(
|
|
1147
|
+
"Parameter Validation warrnings for bulkActionProcessXlsxFile"
|
|
1148
|
+
);
|
|
1149
|
+
console.log(warrning);
|
|
1150
|
+
}
|
|
1151
|
+
|
|
854
1152
|
const query_params = {};
|
|
855
1153
|
|
|
856
1154
|
const xHeaders = {};
|
|
@@ -882,6 +1180,18 @@ class Order {
|
|
|
882
1180
|
return Promise.reject(new FDKClientValidationError(error));
|
|
883
1181
|
}
|
|
884
1182
|
|
|
1183
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1184
|
+
const { error: warrning } = OrderValidator.bulkActionDetails().validate(
|
|
1185
|
+
{
|
|
1186
|
+
batchId,
|
|
1187
|
+
},
|
|
1188
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1189
|
+
);
|
|
1190
|
+
if (warrning) {
|
|
1191
|
+
console.log("Parameter Validation warrnings for bulkActionDetails");
|
|
1192
|
+
console.log(warrning);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
885
1195
|
const query_params = {};
|
|
886
1196
|
|
|
887
1197
|
const xHeaders = {};
|
|
@@ -917,6 +1227,20 @@ class Order {
|
|
|
917
1227
|
return Promise.reject(new FDKClientValidationError(error));
|
|
918
1228
|
}
|
|
919
1229
|
|
|
1230
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1231
|
+
const { error: warrning } = OrderValidator.getBagById().validate(
|
|
1232
|
+
{
|
|
1233
|
+
bagId,
|
|
1234
|
+
channelBagId,
|
|
1235
|
+
channelId,
|
|
1236
|
+
},
|
|
1237
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1238
|
+
);
|
|
1239
|
+
if (warrning) {
|
|
1240
|
+
console.log("Parameter Validation warrnings for getBagById");
|
|
1241
|
+
console.log(warrning);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
920
1244
|
const query_params = {};
|
|
921
1245
|
query_params["bag_id"] = bagId;
|
|
922
1246
|
query_params["channel_bag_id"] = channelBagId;
|
|
@@ -977,6 +1301,26 @@ class Order {
|
|
|
977
1301
|
return Promise.reject(new FDKClientValidationError(error));
|
|
978
1302
|
}
|
|
979
1303
|
|
|
1304
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1305
|
+
const { error: warrning } = OrderValidator.getBags().validate(
|
|
1306
|
+
{
|
|
1307
|
+
bagIds,
|
|
1308
|
+
shipmentIds,
|
|
1309
|
+
orderIds,
|
|
1310
|
+
channelBagIds,
|
|
1311
|
+
channelShipmentIds,
|
|
1312
|
+
channelOrderIds,
|
|
1313
|
+
channelId,
|
|
1314
|
+
pageNo,
|
|
1315
|
+
pageSize,
|
|
1316
|
+
},
|
|
1317
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1318
|
+
);
|
|
1319
|
+
if (warrning) {
|
|
1320
|
+
console.log("Parameter Validation warrnings for getBags");
|
|
1321
|
+
console.log(warrning);
|
|
1322
|
+
}
|
|
1323
|
+
|
|
980
1324
|
const query_params = {};
|
|
981
1325
|
query_params["bag_ids"] = bagIds;
|
|
982
1326
|
query_params["shipment_ids"] = shipmentIds;
|
|
@@ -1017,6 +1361,20 @@ class Order {
|
|
|
1017
1361
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1018
1362
|
}
|
|
1019
1363
|
|
|
1364
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1365
|
+
const {
|
|
1366
|
+
error: warrning,
|
|
1367
|
+
} = OrderValidator.invalidateShipmentCache().validate(
|
|
1368
|
+
{
|
|
1369
|
+
body,
|
|
1370
|
+
},
|
|
1371
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1372
|
+
);
|
|
1373
|
+
if (warrning) {
|
|
1374
|
+
console.log("Parameter Validation warrnings for invalidateShipmentCache");
|
|
1375
|
+
console.log(warrning);
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1020
1378
|
const query_params = {};
|
|
1021
1379
|
|
|
1022
1380
|
const xHeaders = {};
|
|
@@ -1048,6 +1406,18 @@ class Order {
|
|
|
1048
1406
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1049
1407
|
}
|
|
1050
1408
|
|
|
1409
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1410
|
+
const { error: warrning } = OrderValidator.reassignLocation().validate(
|
|
1411
|
+
{
|
|
1412
|
+
body,
|
|
1413
|
+
},
|
|
1414
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1415
|
+
);
|
|
1416
|
+
if (warrning) {
|
|
1417
|
+
console.log("Parameter Validation warrnings for reassignLocation");
|
|
1418
|
+
console.log(warrning);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1051
1421
|
const query_params = {};
|
|
1052
1422
|
|
|
1053
1423
|
const xHeaders = {};
|
|
@@ -1079,6 +1449,18 @@ class Order {
|
|
|
1079
1449
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1080
1450
|
}
|
|
1081
1451
|
|
|
1452
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1453
|
+
const { error: warrning } = OrderValidator.updateShipmentLock().validate(
|
|
1454
|
+
{
|
|
1455
|
+
body,
|
|
1456
|
+
},
|
|
1457
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1458
|
+
);
|
|
1459
|
+
if (warrning) {
|
|
1460
|
+
console.log("Parameter Validation warrnings for updateShipmentLock");
|
|
1461
|
+
console.log(warrning);
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1082
1464
|
const query_params = {};
|
|
1083
1465
|
|
|
1084
1466
|
const xHeaders = {};
|
|
@@ -1110,6 +1492,18 @@ class Order {
|
|
|
1110
1492
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1111
1493
|
}
|
|
1112
1494
|
|
|
1495
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1496
|
+
const { error: warrning } = OrderValidator.getAnnouncements().validate(
|
|
1497
|
+
{
|
|
1498
|
+
date,
|
|
1499
|
+
},
|
|
1500
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1501
|
+
);
|
|
1502
|
+
if (warrning) {
|
|
1503
|
+
console.log("Parameter Validation warrnings for getAnnouncements");
|
|
1504
|
+
console.log(warrning);
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1113
1507
|
const query_params = {};
|
|
1114
1508
|
query_params["date"] = date;
|
|
1115
1509
|
|
|
@@ -1177,6 +1571,29 @@ class Order {
|
|
|
1177
1571
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1178
1572
|
}
|
|
1179
1573
|
|
|
1574
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1575
|
+
const { error: warrning } = OrderValidator.updateAddress().validate(
|
|
1576
|
+
{
|
|
1577
|
+
shipmentId,
|
|
1578
|
+
addressCategory,
|
|
1579
|
+
name,
|
|
1580
|
+
address,
|
|
1581
|
+
addressType,
|
|
1582
|
+
pincode,
|
|
1583
|
+
phone,
|
|
1584
|
+
email,
|
|
1585
|
+
landmark,
|
|
1586
|
+
city,
|
|
1587
|
+
state,
|
|
1588
|
+
country,
|
|
1589
|
+
},
|
|
1590
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1591
|
+
);
|
|
1592
|
+
if (warrning) {
|
|
1593
|
+
console.log("Parameter Validation warrnings for updateAddress");
|
|
1594
|
+
console.log(warrning);
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1180
1597
|
const query_params = {};
|
|
1181
1598
|
query_params["shipment_id"] = shipmentId;
|
|
1182
1599
|
query_params["name"] = name;
|
|
@@ -1228,6 +1645,22 @@ class Order {
|
|
|
1228
1645
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1229
1646
|
}
|
|
1230
1647
|
|
|
1648
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1649
|
+
const { error: warrning } = OrderValidator.click2Call().validate(
|
|
1650
|
+
{
|
|
1651
|
+
caller,
|
|
1652
|
+
receiver,
|
|
1653
|
+
bagId,
|
|
1654
|
+
callingTo,
|
|
1655
|
+
callerId,
|
|
1656
|
+
},
|
|
1657
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1658
|
+
);
|
|
1659
|
+
if (warrning) {
|
|
1660
|
+
console.log("Parameter Validation warrnings for click2Call");
|
|
1661
|
+
console.log(warrning);
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1231
1664
|
const query_params = {};
|
|
1232
1665
|
query_params["caller"] = caller;
|
|
1233
1666
|
query_params["receiver"] = receiver;
|
|
@@ -1264,6 +1697,18 @@ class Order {
|
|
|
1264
1697
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1265
1698
|
}
|
|
1266
1699
|
|
|
1700
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1701
|
+
const { error: warrning } = OrderValidator.updateShipmentStatus().validate(
|
|
1702
|
+
{
|
|
1703
|
+
body,
|
|
1704
|
+
},
|
|
1705
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1706
|
+
);
|
|
1707
|
+
if (warrning) {
|
|
1708
|
+
console.log("Parameter Validation warrnings for updateShipmentStatus");
|
|
1709
|
+
console.log(warrning);
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1267
1712
|
const query_params = {};
|
|
1268
1713
|
|
|
1269
1714
|
const xHeaders = {};
|
|
@@ -1295,6 +1740,18 @@ class Order {
|
|
|
1295
1740
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1296
1741
|
}
|
|
1297
1742
|
|
|
1743
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1744
|
+
const { error: warrning } = OrderValidator.processManifest().validate(
|
|
1745
|
+
{
|
|
1746
|
+
body,
|
|
1747
|
+
},
|
|
1748
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1749
|
+
);
|
|
1750
|
+
if (warrning) {
|
|
1751
|
+
console.log("Parameter Validation warrnings for processManifest");
|
|
1752
|
+
console.log(warrning);
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1298
1755
|
const query_params = {};
|
|
1299
1756
|
|
|
1300
1757
|
const xHeaders = {};
|
|
@@ -1326,6 +1783,18 @@ class Order {
|
|
|
1326
1783
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1327
1784
|
}
|
|
1328
1785
|
|
|
1786
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1787
|
+
const { error: warrning } = OrderValidator.dispatchManifest().validate(
|
|
1788
|
+
{
|
|
1789
|
+
body,
|
|
1790
|
+
},
|
|
1791
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1792
|
+
);
|
|
1793
|
+
if (warrning) {
|
|
1794
|
+
console.log("Parameter Validation warrnings for dispatchManifest");
|
|
1795
|
+
console.log(warrning);
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1329
1798
|
const query_params = {};
|
|
1330
1799
|
|
|
1331
1800
|
const xHeaders = {};
|
|
@@ -1354,6 +1823,16 @@ class Order {
|
|
|
1354
1823
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1355
1824
|
}
|
|
1356
1825
|
|
|
1826
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1827
|
+
const { error: warrning } = OrderValidator.getRoleBasedActions().validate(
|
|
1828
|
+
{},
|
|
1829
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1830
|
+
);
|
|
1831
|
+
if (warrning) {
|
|
1832
|
+
console.log("Parameter Validation warrnings for getRoleBasedActions");
|
|
1833
|
+
console.log(warrning);
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1357
1836
|
const query_params = {};
|
|
1358
1837
|
|
|
1359
1838
|
const xHeaders = {};
|
|
@@ -1387,6 +1866,19 @@ class Order {
|
|
|
1387
1866
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1388
1867
|
}
|
|
1389
1868
|
|
|
1869
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1870
|
+
const { error: warrning } = OrderValidator.getShipmentHistory().validate(
|
|
1871
|
+
{
|
|
1872
|
+
shipmentId,
|
|
1873
|
+
bagId,
|
|
1874
|
+
},
|
|
1875
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1876
|
+
);
|
|
1877
|
+
if (warrning) {
|
|
1878
|
+
console.log("Parameter Validation warrnings for getShipmentHistory");
|
|
1879
|
+
console.log(warrning);
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1390
1882
|
const query_params = {};
|
|
1391
1883
|
query_params["shipment_id"] = shipmentId;
|
|
1392
1884
|
query_params["bag_id"] = bagId;
|
|
@@ -1403,6 +1895,49 @@ class Order {
|
|
|
1403
1895
|
);
|
|
1404
1896
|
}
|
|
1405
1897
|
|
|
1898
|
+
/**
|
|
1899
|
+
* @param {Object} arg - Arg object.
|
|
1900
|
+
* @param {PostShipmentHistory} arg.body
|
|
1901
|
+
* @summary:
|
|
1902
|
+
* @description:
|
|
1903
|
+
*/
|
|
1904
|
+
postShipmentHistory({ body } = {}) {
|
|
1905
|
+
const { error } = OrderValidator.postShipmentHistory().validate(
|
|
1906
|
+
{
|
|
1907
|
+
body,
|
|
1908
|
+
},
|
|
1909
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1910
|
+
);
|
|
1911
|
+
if (error) {
|
|
1912
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1916
|
+
const { error: warrning } = OrderValidator.postShipmentHistory().validate(
|
|
1917
|
+
{
|
|
1918
|
+
body,
|
|
1919
|
+
},
|
|
1920
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1921
|
+
);
|
|
1922
|
+
if (warrning) {
|
|
1923
|
+
console.log("Parameter Validation warrnings for postShipmentHistory");
|
|
1924
|
+
console.log(warrning);
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
const query_params = {};
|
|
1928
|
+
|
|
1929
|
+
const xHeaders = {};
|
|
1930
|
+
|
|
1931
|
+
return PlatformAPIClient.execute(
|
|
1932
|
+
this.config,
|
|
1933
|
+
"post",
|
|
1934
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/history`,
|
|
1935
|
+
query_params,
|
|
1936
|
+
body,
|
|
1937
|
+
xHeaders
|
|
1938
|
+
);
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1406
1941
|
/**
|
|
1407
1942
|
* @param {Object} arg - Arg object.
|
|
1408
1943
|
* @param {SendSmsPayload} arg.body
|
|
@@ -1420,6 +1955,18 @@ class Order {
|
|
|
1420
1955
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1421
1956
|
}
|
|
1422
1957
|
|
|
1958
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1959
|
+
const { error: warrning } = OrderValidator.sendSmsNinja().validate(
|
|
1960
|
+
{
|
|
1961
|
+
body,
|
|
1962
|
+
},
|
|
1963
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1964
|
+
);
|
|
1965
|
+
if (warrning) {
|
|
1966
|
+
console.log("Parameter Validation warrnings for sendSmsNinja");
|
|
1967
|
+
console.log(warrning);
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1423
1970
|
const query_params = {};
|
|
1424
1971
|
|
|
1425
1972
|
const xHeaders = {};
|
|
@@ -1453,6 +2000,22 @@ class Order {
|
|
|
1453
2000
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1454
2001
|
}
|
|
1455
2002
|
|
|
2003
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2004
|
+
const {
|
|
2005
|
+
error: warrning,
|
|
2006
|
+
} = OrderValidator.platformManualAssignDPToShipment().validate(
|
|
2007
|
+
{
|
|
2008
|
+
body,
|
|
2009
|
+
},
|
|
2010
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2011
|
+
);
|
|
2012
|
+
if (warrning) {
|
|
2013
|
+
console.log(
|
|
2014
|
+
"Parameter Validation warrnings for platformManualAssignDPToShipment"
|
|
2015
|
+
);
|
|
2016
|
+
console.log(warrning);
|
|
2017
|
+
}
|
|
2018
|
+
|
|
1456
2019
|
const query_params = {};
|
|
1457
2020
|
|
|
1458
2021
|
const xHeaders = {};
|
|
@@ -1484,6 +2047,22 @@ class Order {
|
|
|
1484
2047
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1485
2048
|
}
|
|
1486
2049
|
|
|
2050
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2051
|
+
const {
|
|
2052
|
+
error: warrning,
|
|
2053
|
+
} = OrderValidator.updatePackagingDimensions().validate(
|
|
2054
|
+
{
|
|
2055
|
+
body,
|
|
2056
|
+
},
|
|
2057
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2058
|
+
);
|
|
2059
|
+
if (warrning) {
|
|
2060
|
+
console.log(
|
|
2061
|
+
"Parameter Validation warrnings for updatePackagingDimensions"
|
|
2062
|
+
);
|
|
2063
|
+
console.log(warrning);
|
|
2064
|
+
}
|
|
2065
|
+
|
|
1487
2066
|
const query_params = {};
|
|
1488
2067
|
|
|
1489
2068
|
const xHeaders = {};
|
|
@@ -1515,6 +2094,18 @@ class Order {
|
|
|
1515
2094
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1516
2095
|
}
|
|
1517
2096
|
|
|
2097
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2098
|
+
const { error: warrning } = OrderValidator.createOrder().validate(
|
|
2099
|
+
{
|
|
2100
|
+
body,
|
|
2101
|
+
},
|
|
2102
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2103
|
+
);
|
|
2104
|
+
if (warrning) {
|
|
2105
|
+
console.log("Parameter Validation warrnings for createOrder");
|
|
2106
|
+
console.log(warrning);
|
|
2107
|
+
}
|
|
2108
|
+
|
|
1518
2109
|
const query_params = {};
|
|
1519
2110
|
|
|
1520
2111
|
const xHeaders = {};
|
|
@@ -1531,59 +2122,81 @@ class Order {
|
|
|
1531
2122
|
|
|
1532
2123
|
/**
|
|
1533
2124
|
* @param {Object} arg - Arg object.
|
|
1534
|
-
* @param {CreateChannelConfigData} arg.body
|
|
1535
2125
|
* @summary:
|
|
1536
|
-
* @description:
|
|
2126
|
+
* @description: getChannelConfig
|
|
1537
2127
|
*/
|
|
1538
|
-
|
|
1539
|
-
const { error } = OrderValidator.
|
|
1540
|
-
{
|
|
1541
|
-
body,
|
|
1542
|
-
},
|
|
2128
|
+
getChannelConfig({} = {}) {
|
|
2129
|
+
const { error } = OrderValidator.getChannelConfig().validate(
|
|
2130
|
+
{},
|
|
1543
2131
|
{ abortEarly: false, allowUnknown: true }
|
|
1544
2132
|
);
|
|
1545
2133
|
if (error) {
|
|
1546
2134
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1547
2135
|
}
|
|
1548
2136
|
|
|
2137
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2138
|
+
const { error: warrning } = OrderValidator.getChannelConfig().validate(
|
|
2139
|
+
{},
|
|
2140
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2141
|
+
);
|
|
2142
|
+
if (warrning) {
|
|
2143
|
+
console.log("Parameter Validation warrnings for getChannelConfig");
|
|
2144
|
+
console.log(warrning);
|
|
2145
|
+
}
|
|
2146
|
+
|
|
1549
2147
|
const query_params = {};
|
|
1550
2148
|
|
|
1551
2149
|
const xHeaders = {};
|
|
1552
2150
|
|
|
1553
2151
|
return PlatformAPIClient.execute(
|
|
1554
2152
|
this.config,
|
|
1555
|
-
"
|
|
2153
|
+
"get",
|
|
1556
2154
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
1557
2155
|
query_params,
|
|
1558
|
-
|
|
2156
|
+
undefined,
|
|
1559
2157
|
xHeaders
|
|
1560
2158
|
);
|
|
1561
2159
|
}
|
|
1562
2160
|
|
|
1563
2161
|
/**
|
|
1564
2162
|
* @param {Object} arg - Arg object.
|
|
2163
|
+
* @param {CreateChannelConfigData} arg.body
|
|
1565
2164
|
* @summary:
|
|
1566
|
-
* @description:
|
|
2165
|
+
* @description: createChannelConfig
|
|
1567
2166
|
*/
|
|
1568
|
-
|
|
1569
|
-
const { error } = OrderValidator.
|
|
1570
|
-
{
|
|
2167
|
+
createChannelConfig({ body } = {}) {
|
|
2168
|
+
const { error } = OrderValidator.createChannelConfig().validate(
|
|
2169
|
+
{
|
|
2170
|
+
body,
|
|
2171
|
+
},
|
|
1571
2172
|
{ abortEarly: false, allowUnknown: true }
|
|
1572
2173
|
);
|
|
1573
2174
|
if (error) {
|
|
1574
2175
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1575
2176
|
}
|
|
1576
2177
|
|
|
2178
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2179
|
+
const { error: warrning } = OrderValidator.createChannelConfig().validate(
|
|
2180
|
+
{
|
|
2181
|
+
body,
|
|
2182
|
+
},
|
|
2183
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2184
|
+
);
|
|
2185
|
+
if (warrning) {
|
|
2186
|
+
console.log("Parameter Validation warrnings for createChannelConfig");
|
|
2187
|
+
console.log(warrning);
|
|
2188
|
+
}
|
|
2189
|
+
|
|
1577
2190
|
const query_params = {};
|
|
1578
2191
|
|
|
1579
2192
|
const xHeaders = {};
|
|
1580
2193
|
|
|
1581
2194
|
return PlatformAPIClient.execute(
|
|
1582
2195
|
this.config,
|
|
1583
|
-
"
|
|
2196
|
+
"post",
|
|
1584
2197
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
1585
2198
|
query_params,
|
|
1586
|
-
|
|
2199
|
+
body,
|
|
1587
2200
|
xHeaders
|
|
1588
2201
|
);
|
|
1589
2202
|
}
|
|
@@ -1605,6 +2218,18 @@ class Order {
|
|
|
1605
2218
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1606
2219
|
}
|
|
1607
2220
|
|
|
2221
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2222
|
+
const { error: warrning } = OrderValidator.uploadConsent().validate(
|
|
2223
|
+
{
|
|
2224
|
+
body,
|
|
2225
|
+
},
|
|
2226
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2227
|
+
);
|
|
2228
|
+
if (warrning) {
|
|
2229
|
+
console.log("Parameter Validation warrnings for uploadConsent");
|
|
2230
|
+
console.log(warrning);
|
|
2231
|
+
}
|
|
2232
|
+
|
|
1608
2233
|
const query_params = {};
|
|
1609
2234
|
|
|
1610
2235
|
const xHeaders = {};
|
|
@@ -1636,6 +2261,18 @@ class Order {
|
|
|
1636
2261
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1637
2262
|
}
|
|
1638
2263
|
|
|
2264
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2265
|
+
const { error: warrning } = OrderValidator.orderUpdate().validate(
|
|
2266
|
+
{
|
|
2267
|
+
body,
|
|
2268
|
+
},
|
|
2269
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2270
|
+
);
|
|
2271
|
+
if (warrning) {
|
|
2272
|
+
console.log("Parameter Validation warrnings for orderUpdate");
|
|
2273
|
+
console.log(warrning);
|
|
2274
|
+
}
|
|
2275
|
+
|
|
1639
2276
|
const query_params = {};
|
|
1640
2277
|
|
|
1641
2278
|
const xHeaders = {};
|
|
@@ -1667,6 +2304,18 @@ class Order {
|
|
|
1667
2304
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1668
2305
|
}
|
|
1669
2306
|
|
|
2307
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2308
|
+
const { error: warrning } = OrderValidator.checkOrderStatus().validate(
|
|
2309
|
+
{
|
|
2310
|
+
body,
|
|
2311
|
+
},
|
|
2312
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2313
|
+
);
|
|
2314
|
+
if (warrning) {
|
|
2315
|
+
console.log("Parameter Validation warrnings for checkOrderStatus");
|
|
2316
|
+
console.log(warrning);
|
|
2317
|
+
}
|
|
2318
|
+
|
|
1670
2319
|
const query_params = {};
|
|
1671
2320
|
|
|
1672
2321
|
const xHeaders = {};
|
|
@@ -1695,6 +2344,16 @@ class Order {
|
|
|
1695
2344
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1696
2345
|
}
|
|
1697
2346
|
|
|
2347
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2348
|
+
const { error: warrning } = OrderValidator.sendSmsNinjaPlatform().validate(
|
|
2349
|
+
{},
|
|
2350
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2351
|
+
);
|
|
2352
|
+
if (warrning) {
|
|
2353
|
+
console.log("Parameter Validation warrnings for sendSmsNinjaPlatform");
|
|
2354
|
+
console.log(warrning);
|
|
2355
|
+
}
|
|
2356
|
+
|
|
1698
2357
|
const query_params = {};
|
|
1699
2358
|
|
|
1700
2359
|
const xHeaders = {};
|