@gofynd/fdk-client-javascript 1.1.0 → 1.1.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 +0 -1
- package/package.json +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -1
- package/sdk/application/Catalog/CatalogApplicationClient.js +11 -2
- package/sdk/application/Catalog/CatalogApplicationValidator.js +2 -0
- package/sdk/application/Content/ContentApplicationModel.js +0 -4
- package/sdk/application/Lead/LeadApplicationModel.js +1 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +0 -15
- package/sdk/application/Order/OrderApplicationClient.js +0 -68
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -17
- package/sdk/application/Order/OrderApplicationModel.js +0 -111
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -1
- package/sdk/application/Order/OrderApplicationValidator.js +0 -7
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/common/Constant.d.ts +0 -18
- package/sdk/common/Constant.js +0 -22
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +29 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +181 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +17 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4 -0
- package/sdk/platform/Cart/CartPlatformModel.js +37 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +3 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +5 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3 -7
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +0 -183
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +0 -417
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +0 -10
- package/sdk/platform/Communication/CommunicationPlatformClient.js +0 -26
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +4 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -22
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +0 -56
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +12 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +62 -2
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Content/ContentPlatformModel.js +0 -4
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +1 -1
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +1 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +15 -0
- package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +1 -1
- package/sdk/platform/Lead/LeadPlatformModel.js +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -47
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -201
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -3
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -26
- package/sdk/platform/Order/OrderPlatformClient.d.ts +51 -183
- package/sdk/platform/Order/OrderPlatformClient.js +243 -931
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4 -20
- package/sdk/platform/Order/OrderPlatformModel.js +38 -182
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +3 -12
- package/sdk/platform/Order/OrderPlatformValidator.js +19 -95
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +24 -10
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +111 -44
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +2 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +13 -5
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +12 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +12 -41
- package/sdk/platform/PlatformApplicationClient.js +13 -45
- package/sdk/platform/PlatformClient.d.ts +90 -264
- package/sdk/platform/PlatformClient.js +110 -316
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +11 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.js +61 -0
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -0
- package/sdk/platform/Share/SharePlatformModel.d.ts +2 -0
- package/sdk/platform/Share/SharePlatformModel.js +11 -0
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +0 -109
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +0 -558
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +0 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +0 -56
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +0 -88
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +0 -361
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +0 -23
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +0 -169
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.d.ts +0 -7
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +0 -38
|
@@ -32,21 +32,15 @@ declare class OrderModel {
|
|
|
32
32
|
static BagReturnableCancelableStatus(): any;
|
|
33
33
|
static Bags(): any;
|
|
34
34
|
static BagStateMapper(): any;
|
|
35
|
+
static BagStateTransitionMap(): any;
|
|
35
36
|
static BagStatusHistory(): any;
|
|
36
37
|
static BagUnit(): any;
|
|
37
38
|
static BaseResponse(): any;
|
|
38
39
|
static BillingInfo(): any;
|
|
39
40
|
static BillingStaffDetails(): any;
|
|
40
41
|
static Brand(): any;
|
|
41
|
-
static
|
|
42
|
-
static
|
|
43
|
-
static BulkActionPayload(): any;
|
|
44
|
-
static BulkActionResponse(): any;
|
|
45
|
-
static BulkInvoiceLabelResponse(): any;
|
|
46
|
-
static BulkInvoicingResponse(): any;
|
|
47
|
-
static bulkListingData(): any;
|
|
48
|
-
static BulkListingPage(): any;
|
|
49
|
-
static BulkListingResponse(): any;
|
|
42
|
+
static BulkActionTemplate(): any;
|
|
43
|
+
static BulkActionTemplateResponse(): any;
|
|
50
44
|
static BuyerDetails(): any;
|
|
51
45
|
static BuyRules(): any;
|
|
52
46
|
static Charge(): any;
|
|
@@ -103,23 +97,13 @@ declare class OrderModel {
|
|
|
103
97
|
static InvoiceInfo(): any;
|
|
104
98
|
static Item(): any;
|
|
105
99
|
static ItemCriterias(): any;
|
|
106
|
-
static JioCodeUpsertDataSet(): any;
|
|
107
|
-
static JioCodeUpsertPayload(): any;
|
|
108
|
-
static JioCodeUpsertResponse(): any;
|
|
109
100
|
static LaneConfigResponse(): any;
|
|
110
101
|
static LineItem(): any;
|
|
111
102
|
static LocationDetails(): any;
|
|
112
103
|
static LockData(): any;
|
|
113
|
-
static ManualAssignDPToShipment(): any;
|
|
114
|
-
static ManualAssignDPToShipmentResponse(): any;
|
|
115
104
|
static MarketPlacePdf(): any;
|
|
116
105
|
static Meta(): any;
|
|
117
106
|
static Meta1(): any;
|
|
118
|
-
static MetricCountResponse(): any;
|
|
119
|
-
static MetricsCount(): any;
|
|
120
|
-
static NestedErrorSchemaDataSet(): any;
|
|
121
|
-
static OmsReports(): any;
|
|
122
|
-
static Options(): any;
|
|
123
107
|
static OrderBagArticle(): any;
|
|
124
108
|
static OrderBags(): any;
|
|
125
109
|
static OrderBrandName(): any;
|
|
@@ -172,6 +156,7 @@ declare class OrderModel {
|
|
|
172
156
|
static QuestionSet(): any;
|
|
173
157
|
static Reason(): any;
|
|
174
158
|
static ReasonsData(): any;
|
|
159
|
+
static ReplacementDetails(): any;
|
|
175
160
|
static ResponseDetail(): any;
|
|
176
161
|
static ReturnConfig(): any;
|
|
177
162
|
static SendSmsPayload(): any;
|
|
@@ -207,7 +192,6 @@ declare class OrderModel {
|
|
|
207
192
|
static StoreReassign(): any;
|
|
208
193
|
static StoreReassignResponse(): any;
|
|
209
194
|
static SubLane(): any;
|
|
210
|
-
static Success(): any;
|
|
211
195
|
static SuccessResponse(): any;
|
|
212
196
|
static SuperLane(): any;
|
|
213
197
|
static Tax(): any;
|
|
@@ -139,6 +139,7 @@ class OrderModel {
|
|
|
139
139
|
marketplace_invoice_id: Joi.string().allow("").allow(null),
|
|
140
140
|
order_item_id: Joi.string().allow(""),
|
|
141
141
|
quantity: Joi.number(),
|
|
142
|
+
replacement_details: OrderModel.ReplacementDetails(),
|
|
142
143
|
size_level_total_qty: Joi.number().allow(null),
|
|
143
144
|
});
|
|
144
145
|
}
|
|
@@ -165,6 +166,8 @@ class OrderModel {
|
|
|
165
166
|
static AnnouncementsResponse() {
|
|
166
167
|
return Joi.object({
|
|
167
168
|
announcements: Joi.array().items(OrderModel.AnnouncementResponse()),
|
|
169
|
+
message: Joi.string().allow(""),
|
|
170
|
+
success: Joi.boolean(),
|
|
168
171
|
});
|
|
169
172
|
}
|
|
170
173
|
static AppliedPromos() {
|
|
@@ -359,6 +362,12 @@ class OrderModel {
|
|
|
359
362
|
state_type: Joi.string().allow("").required(),
|
|
360
363
|
});
|
|
361
364
|
}
|
|
365
|
+
static BagStateTransitionMap() {
|
|
366
|
+
return Joi.object({
|
|
367
|
+
affiliate: Joi.any(),
|
|
368
|
+
fynd: Joi.any(),
|
|
369
|
+
});
|
|
370
|
+
}
|
|
362
371
|
static BagStatusHistory() {
|
|
363
372
|
return Joi.object({
|
|
364
373
|
app_display_name: Joi.string().allow(""),
|
|
@@ -397,8 +406,8 @@ class OrderModel {
|
|
|
397
406
|
}
|
|
398
407
|
static BaseResponse() {
|
|
399
408
|
return Joi.object({
|
|
400
|
-
message: Joi.string().allow("")
|
|
401
|
-
success: Joi.boolean()
|
|
409
|
+
message: Joi.string().allow(""),
|
|
410
|
+
success: Joi.boolean(),
|
|
402
411
|
});
|
|
403
412
|
}
|
|
404
413
|
static BillingInfo() {
|
|
@@ -452,100 +461,15 @@ class OrderModel {
|
|
|
452
461
|
start_date: Joi.string().allow("").allow(null),
|
|
453
462
|
});
|
|
454
463
|
}
|
|
455
|
-
static
|
|
456
|
-
return Joi.object({
|
|
457
|
-
batch_id: Joi.string().allow(""),
|
|
458
|
-
company_id: Joi.string().allow(""),
|
|
459
|
-
failed_shipments_count: Joi.number(),
|
|
460
|
-
processing_shipments_count: Joi.number(),
|
|
461
|
-
successful_shipment_ids: Joi.array().items(Joi.string().allow("")),
|
|
462
|
-
successful_shipments_count: Joi.number(),
|
|
463
|
-
total_shipments_count: Joi.number(),
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
static BulkActionDetailsResponse() {
|
|
467
|
-
return Joi.object({
|
|
468
|
-
data: Joi.array().items(OrderModel.BulkActionDetailsDataField()),
|
|
469
|
-
error: Joi.array().items(Joi.string().allow("")),
|
|
470
|
-
failed_records: Joi.array().items(Joi.string().allow("")),
|
|
471
|
-
message: Joi.string().allow(""),
|
|
472
|
-
status: Joi.boolean(),
|
|
473
|
-
success: Joi.string().allow(""),
|
|
474
|
-
uploaded_by: Joi.string().allow(""),
|
|
475
|
-
uploaded_on: Joi.string().allow(""),
|
|
476
|
-
user_id: Joi.string().allow(""),
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
static BulkActionPayload() {
|
|
480
|
-
return Joi.object({
|
|
481
|
-
url: Joi.string().allow("").required(),
|
|
482
|
-
});
|
|
483
|
-
}
|
|
484
|
-
static BulkActionResponse() {
|
|
485
|
-
return Joi.object({
|
|
486
|
-
message: Joi.string().allow(""),
|
|
487
|
-
status: Joi.boolean(),
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
static BulkInvoiceLabelResponse() {
|
|
491
|
-
return Joi.object({
|
|
492
|
-
batch_id: Joi.string().allow("").required(),
|
|
493
|
-
company_id: Joi.string().allow(""),
|
|
494
|
-
data: Joi.any(),
|
|
495
|
-
do_invoice_label_generated: Joi.boolean().required(),
|
|
496
|
-
invoice: Joi.any(),
|
|
497
|
-
invoice_status: Joi.string().allow(""),
|
|
498
|
-
label: Joi.any(),
|
|
499
|
-
store_code: Joi.string().allow(""),
|
|
500
|
-
store_id: Joi.string().allow(""),
|
|
501
|
-
store_name: Joi.string().allow(""),
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
static BulkInvoicingResponse() {
|
|
505
|
-
return Joi.object({
|
|
506
|
-
message: Joi.string().allow(""),
|
|
507
|
-
success: Joi.boolean().required(),
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
static bulkListingData() {
|
|
464
|
+
static BulkActionTemplate() {
|
|
511
465
|
return Joi.object({
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
excel_url: Joi.string().allow(""),
|
|
515
|
-
failed: Joi.number(),
|
|
516
|
-
failed_shipments: Joi.array().items(Joi.any()),
|
|
517
|
-
file_name: Joi.string().allow(""),
|
|
518
|
-
id: Joi.string().allow(""),
|
|
519
|
-
processing: Joi.number(),
|
|
520
|
-
processing_shipments: Joi.array().items(Joi.string().allow("")),
|
|
521
|
-
status: Joi.string().allow(""),
|
|
522
|
-
store_code: Joi.string().allow(""),
|
|
523
|
-
store_id: Joi.number(),
|
|
524
|
-
store_name: Joi.string().allow(""),
|
|
525
|
-
successful: Joi.number(),
|
|
526
|
-
successful_shipments: Joi.array().items(Joi.any()),
|
|
527
|
-
total: Joi.number(),
|
|
528
|
-
uploaded_on: Joi.string().allow(""),
|
|
529
|
-
user_id: Joi.string().allow(""),
|
|
530
|
-
user_name: Joi.string().allow(""),
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
static BulkListingPage() {
|
|
534
|
-
return Joi.object({
|
|
535
|
-
current: Joi.number(),
|
|
536
|
-
has_next: Joi.boolean(),
|
|
537
|
-
has_previous: Joi.boolean(),
|
|
538
|
-
size: Joi.number(),
|
|
539
|
-
total: Joi.number(),
|
|
540
|
-
type: Joi.string().allow(""),
|
|
466
|
+
text: Joi.string().allow(""),
|
|
467
|
+
value: Joi.string().allow(""),
|
|
541
468
|
});
|
|
542
469
|
}
|
|
543
|
-
static
|
|
470
|
+
static BulkActionTemplateResponse() {
|
|
544
471
|
return Joi.object({
|
|
545
|
-
|
|
546
|
-
error: Joi.string().allow(""),
|
|
547
|
-
page: OrderModel.BulkListingPage(),
|
|
548
|
-
success: Joi.boolean(),
|
|
472
|
+
template_x_slug: Joi.array().items(OrderModel.BulkActionTemplate()),
|
|
549
473
|
});
|
|
550
474
|
}
|
|
551
475
|
static BuyerDetails() {
|
|
@@ -581,7 +505,7 @@ class OrderModel {
|
|
|
581
505
|
bags: Joi.array().items(OrderModel.Bags()),
|
|
582
506
|
is_bag_locked: Joi.boolean(),
|
|
583
507
|
is_shipment_locked: Joi.boolean(),
|
|
584
|
-
lock_status: Joi.
|
|
508
|
+
lock_status: Joi.string().allow("").allow(null),
|
|
585
509
|
original_filter: OrderModel.OriginalFilter(),
|
|
586
510
|
shipment_id: Joi.string().allow(""),
|
|
587
511
|
status: Joi.string().allow(""),
|
|
@@ -590,7 +514,7 @@ class OrderModel {
|
|
|
590
514
|
static Click2CallResponse() {
|
|
591
515
|
return Joi.object({
|
|
592
516
|
call_id: Joi.string().allow("").required(),
|
|
593
|
-
|
|
517
|
+
success: Joi.boolean().required(),
|
|
594
518
|
});
|
|
595
519
|
}
|
|
596
520
|
static CompanyDetails() {
|
|
@@ -824,8 +748,9 @@ class OrderModel {
|
|
|
824
748
|
static ErrorResponse1() {
|
|
825
749
|
return Joi.object({
|
|
826
750
|
error_trace: Joi.string().allow(""),
|
|
827
|
-
message: Joi.string().allow("")
|
|
828
|
-
status: Joi.number()
|
|
751
|
+
message: Joi.string().allow(""),
|
|
752
|
+
status: Joi.number(),
|
|
753
|
+
success: Joi.boolean(),
|
|
829
754
|
});
|
|
830
755
|
}
|
|
831
756
|
static FileResponse() {
|
|
@@ -950,12 +875,15 @@ class OrderModel {
|
|
|
950
875
|
}
|
|
951
876
|
static HistoryDict() {
|
|
952
877
|
return Joi.object({
|
|
878
|
+
assigned_agent: Joi.string().allow(""),
|
|
953
879
|
bag_id: Joi.number(),
|
|
954
880
|
createdat: Joi.string().allow("").required(),
|
|
881
|
+
display_message: Joi.string().allow(""),
|
|
955
882
|
l1_detail: Joi.string().allow(""),
|
|
956
883
|
l2_detail: Joi.string().allow(""),
|
|
957
884
|
l3_detail: Joi.string().allow(""),
|
|
958
885
|
message: Joi.string().allow("").required(),
|
|
886
|
+
meta: Joi.any(),
|
|
959
887
|
ticket_id: Joi.string().allow(""),
|
|
960
888
|
ticket_url: Joi.string().allow(""),
|
|
961
889
|
type: Joi.string().allow("").required(),
|
|
@@ -977,7 +905,9 @@ class OrderModel {
|
|
|
977
905
|
}
|
|
978
906
|
static InvalidateShipmentCachePayload() {
|
|
979
907
|
return Joi.object({
|
|
980
|
-
|
|
908
|
+
affiliate_bag_ids: Joi.array().items(Joi.string().allow("")),
|
|
909
|
+
bag_ids: Joi.array().items(Joi.string().allow("")),
|
|
910
|
+
shipment_ids: Joi.array().items(Joi.string().allow("")),
|
|
981
911
|
});
|
|
982
912
|
}
|
|
983
913
|
static InvalidateShipmentCacheResponse() {
|
|
@@ -1029,28 +959,6 @@ class OrderModel {
|
|
|
1029
959
|
item_brand: Joi.array().items(Joi.number()),
|
|
1030
960
|
});
|
|
1031
961
|
}
|
|
1032
|
-
static JioCodeUpsertDataSet() {
|
|
1033
|
-
return Joi.object({
|
|
1034
|
-
article_id: Joi.string().allow(""),
|
|
1035
|
-
company_id: Joi.string().allow(""),
|
|
1036
|
-
item_id: Joi.string().allow(""),
|
|
1037
|
-
jio_code: Joi.string().allow(""),
|
|
1038
|
-
});
|
|
1039
|
-
}
|
|
1040
|
-
static JioCodeUpsertPayload() {
|
|
1041
|
-
return Joi.object({
|
|
1042
|
-
data: Joi.array().items(OrderModel.JioCodeUpsertDataSet()),
|
|
1043
|
-
});
|
|
1044
|
-
}
|
|
1045
|
-
static JioCodeUpsertResponse() {
|
|
1046
|
-
return Joi.object({
|
|
1047
|
-
data: Joi.array().items(Joi.any()),
|
|
1048
|
-
error: Joi.array().items(OrderModel.NestedErrorSchemaDataSet()),
|
|
1049
|
-
identifier: Joi.string().allow(""),
|
|
1050
|
-
success: Joi.boolean(),
|
|
1051
|
-
trace_id: Joi.string().allow(""),
|
|
1052
|
-
});
|
|
1053
|
-
}
|
|
1054
962
|
static LaneConfigResponse() {
|
|
1055
963
|
return Joi.object({
|
|
1056
964
|
super_lanes: Joi.array().items(OrderModel.SuperLane()),
|
|
@@ -1080,20 +988,6 @@ class OrderModel {
|
|
|
1080
988
|
mto: Joi.boolean(),
|
|
1081
989
|
});
|
|
1082
990
|
}
|
|
1083
|
-
static ManualAssignDPToShipment() {
|
|
1084
|
-
return Joi.object({
|
|
1085
|
-
dp_id: Joi.number().required(),
|
|
1086
|
-
order_type: Joi.string().allow("").required(),
|
|
1087
|
-
qc_required: Joi.string().allow("").required(),
|
|
1088
|
-
shipment_ids: Joi.array().items(Joi.string().allow("")),
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
static ManualAssignDPToShipmentResponse() {
|
|
1092
|
-
return Joi.object({
|
|
1093
|
-
errors: Joi.array().items(Joi.string().allow("")),
|
|
1094
|
-
success: Joi.string().allow("").required(),
|
|
1095
|
-
});
|
|
1096
|
-
}
|
|
1097
991
|
static MarketPlacePdf() {
|
|
1098
992
|
return Joi.object({
|
|
1099
993
|
invoice: Joi.string().allow("").allow(null),
|
|
@@ -1111,45 +1005,6 @@ class OrderModel {
|
|
|
1111
1005
|
state_manager_used: Joi.string().allow(""),
|
|
1112
1006
|
});
|
|
1113
1007
|
}
|
|
1114
|
-
static MetricCountResponse() {
|
|
1115
|
-
return Joi.object({
|
|
1116
|
-
items: Joi.array().items(OrderModel.MetricsCount()),
|
|
1117
|
-
});
|
|
1118
|
-
}
|
|
1119
|
-
static MetricsCount() {
|
|
1120
|
-
return Joi.object({
|
|
1121
|
-
key: Joi.string().allow("").required(),
|
|
1122
|
-
options: Joi.array().items(OrderModel.Options()),
|
|
1123
|
-
text: Joi.string().allow("").required(),
|
|
1124
|
-
value: Joi.number().required(),
|
|
1125
|
-
});
|
|
1126
|
-
}
|
|
1127
|
-
static NestedErrorSchemaDataSet() {
|
|
1128
|
-
return Joi.object({
|
|
1129
|
-
message: Joi.string().allow(""),
|
|
1130
|
-
type: Joi.string().allow(""),
|
|
1131
|
-
value: Joi.string().allow(""),
|
|
1132
|
-
});
|
|
1133
|
-
}
|
|
1134
|
-
static OmsReports() {
|
|
1135
|
-
return Joi.object({
|
|
1136
|
-
display_name: Joi.string().allow(""),
|
|
1137
|
-
report_created_at: Joi.string().allow("").allow(null),
|
|
1138
|
-
report_id: Joi.string().allow(""),
|
|
1139
|
-
report_name: Joi.string().allow(""),
|
|
1140
|
-
report_requested_at: Joi.string().allow("").allow(null),
|
|
1141
|
-
report_type: Joi.string().allow(""),
|
|
1142
|
-
request_details: Joi.any(),
|
|
1143
|
-
s3_key: Joi.string().allow(""),
|
|
1144
|
-
status: Joi.string().allow(""),
|
|
1145
|
-
});
|
|
1146
|
-
}
|
|
1147
|
-
static Options() {
|
|
1148
|
-
return Joi.object({
|
|
1149
|
-
text: Joi.string().allow(""),
|
|
1150
|
-
value: Joi.number(),
|
|
1151
|
-
});
|
|
1152
|
-
}
|
|
1153
1008
|
static OrderBagArticle() {
|
|
1154
1009
|
return Joi.object({
|
|
1155
1010
|
identifiers: Joi.any(),
|
|
@@ -1691,6 +1546,12 @@ class OrderModel {
|
|
|
1691
1546
|
products: Joi.array().items(OrderModel.ProductsReasons()),
|
|
1692
1547
|
});
|
|
1693
1548
|
}
|
|
1549
|
+
static ReplacementDetails() {
|
|
1550
|
+
return Joi.object({
|
|
1551
|
+
original_affiliate_order_id: Joi.string().allow("").allow(null),
|
|
1552
|
+
replacement_type: Joi.string().allow("").allow(null),
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1694
1555
|
static ResponseDetail() {
|
|
1695
1556
|
return Joi.object({
|
|
1696
1557
|
message: Joi.array().items(Joi.string().allow("")),
|
|
@@ -1769,6 +1630,7 @@ class OrderModel {
|
|
|
1769
1630
|
static ShipmentHistoryResponse() {
|
|
1770
1631
|
return Joi.object({
|
|
1771
1632
|
activity_history: Joi.array().items(OrderModel.HistoryDict()).required(),
|
|
1633
|
+
success: Joi.boolean(),
|
|
1772
1634
|
});
|
|
1773
1635
|
}
|
|
1774
1636
|
static ShipmentInfoResponse() {
|
|
@@ -1936,13 +1798,13 @@ class OrderModel {
|
|
|
1936
1798
|
}
|
|
1937
1799
|
static SmsDataPayload() {
|
|
1938
1800
|
return Joi.object({
|
|
1939
|
-
amount_paid: Joi.number()
|
|
1940
|
-
brand_name: Joi.string().allow("")
|
|
1801
|
+
amount_paid: Joi.number(),
|
|
1802
|
+
brand_name: Joi.string().allow(""),
|
|
1941
1803
|
country_code: Joi.string().allow("").required(),
|
|
1942
|
-
customer_name: Joi.string().allow("")
|
|
1804
|
+
customer_name: Joi.string().allow(""),
|
|
1943
1805
|
message: Joi.string().allow("").required(),
|
|
1944
1806
|
order_id: Joi.string().allow("").required(),
|
|
1945
|
-
payment_mode: Joi.string().allow("")
|
|
1807
|
+
payment_mode: Joi.string().allow(""),
|
|
1946
1808
|
phone_number: Joi.number().required(),
|
|
1947
1809
|
shipment_id: Joi.number().required(),
|
|
1948
1810
|
});
|
|
@@ -2089,12 +1951,6 @@ class OrderModel {
|
|
|
2089
1951
|
value: Joi.string().allow(""),
|
|
2090
1952
|
});
|
|
2091
1953
|
}
|
|
2092
|
-
static Success() {
|
|
2093
|
-
return Joi.object({
|
|
2094
|
-
message: Joi.string().allow(""),
|
|
2095
|
-
success: Joi.boolean(),
|
|
2096
|
-
});
|
|
2097
|
-
}
|
|
2098
1954
|
static SuccessResponse() {
|
|
2099
1955
|
return Joi.object({
|
|
2100
1956
|
message: Joi.string().allow(""),
|
|
@@ -1,45 +1,36 @@
|
|
|
1
1
|
export = OrderValidator;
|
|
2
2
|
declare class OrderValidator {
|
|
3
|
-
static bulkActionDetails(): any;
|
|
4
|
-
static bulkActionProcessXlsxFile(): any;
|
|
5
3
|
static checkOrderStatus(): any;
|
|
6
4
|
static click2Call(): any;
|
|
7
5
|
static createChannelConfig(): any;
|
|
8
6
|
static createOrder(): any;
|
|
9
|
-
static createShipmentReport(): any;
|
|
10
7
|
static dispatchManifest(): any;
|
|
8
|
+
static downloadBulkActionTemplate(): any;
|
|
11
9
|
static getAnnouncements(): any;
|
|
12
10
|
static getBagById(): any;
|
|
13
11
|
static getBags(): any;
|
|
14
|
-
static
|
|
15
|
-
static getBulkInvoice(): any;
|
|
16
|
-
static getBulkInvoiceLabel(): any;
|
|
17
|
-
static getBulkList(): any;
|
|
12
|
+
static getBulkActionTemplate(): any;
|
|
18
13
|
static getBulkShipmentExcelFile(): any;
|
|
19
14
|
static getChannelConfig(): any;
|
|
20
15
|
static getLaneConfig(): any;
|
|
21
|
-
static getMetricCount(): any;
|
|
22
16
|
static getOrderById(): any;
|
|
23
17
|
static getOrders(): any;
|
|
24
|
-
static getReportsShipmentListing(): any;
|
|
25
18
|
static getRoleBasedActions(): any;
|
|
26
19
|
static getShipmentById(): any;
|
|
27
20
|
static getShipmentHistory(): any;
|
|
28
21
|
static getShipmentReasons(): any;
|
|
29
22
|
static getShipments(): any;
|
|
23
|
+
static getStateTransitionMap(): any;
|
|
30
24
|
static getfilters(): any;
|
|
31
25
|
static invalidateShipmentCache(): any;
|
|
32
26
|
static orderUpdate(): any;
|
|
33
|
-
static platformManualAssignDPToShipment(): any;
|
|
34
27
|
static postShipmentHistory(): any;
|
|
35
28
|
static processManifest(): any;
|
|
36
29
|
static reassignLocation(): any;
|
|
37
30
|
static sendSmsNinja(): any;
|
|
38
|
-
static sendSmsNinjaPlatform(): any;
|
|
39
31
|
static updateAddress(): any;
|
|
40
32
|
static updatePackagingDimensions(): any;
|
|
41
33
|
static updateShipmentLock(): any;
|
|
42
34
|
static updateShipmentStatus(): any;
|
|
43
35
|
static uploadConsent(): any;
|
|
44
|
-
static upsertJioCode(): any;
|
|
45
36
|
}
|
|
@@ -2,18 +2,6 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
const OrderModel = require("./OrderPlatformModel");
|
|
4
4
|
class OrderValidator {
|
|
5
|
-
static bulkActionDetails() {
|
|
6
|
-
return Joi.object({
|
|
7
|
-
batchId: Joi.string().allow("").required(),
|
|
8
|
-
}).required();
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
static bulkActionProcessXlsxFile() {
|
|
12
|
-
return Joi.object({
|
|
13
|
-
body: OrderModel.BulkActionPayload().required(),
|
|
14
|
-
}).required();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
5
|
static checkOrderStatus() {
|
|
18
6
|
return Joi.object({
|
|
19
7
|
body: OrderModel.OrderStatus().required(),
|
|
@@ -25,8 +13,8 @@ class OrderValidator {
|
|
|
25
13
|
caller: Joi.string().allow("").required(),
|
|
26
14
|
receiver: Joi.string().allow("").required(),
|
|
27
15
|
bagId: Joi.string().allow("").required(),
|
|
28
|
-
callingTo: Joi.string().allow(""),
|
|
29
16
|
callerId: Joi.string().allow(""),
|
|
17
|
+
method: Joi.string().allow(""),
|
|
30
18
|
}).required();
|
|
31
19
|
}
|
|
32
20
|
|
|
@@ -42,16 +30,15 @@ class OrderValidator {
|
|
|
42
30
|
}).required();
|
|
43
31
|
}
|
|
44
32
|
|
|
45
|
-
static
|
|
33
|
+
static dispatchManifest() {
|
|
46
34
|
return Joi.object({
|
|
47
|
-
|
|
48
|
-
toDate: Joi.string().allow(""),
|
|
35
|
+
body: OrderModel.DispatchManifest().required(),
|
|
49
36
|
}).required();
|
|
50
37
|
}
|
|
51
38
|
|
|
52
|
-
static
|
|
39
|
+
static downloadBulkActionTemplate() {
|
|
53
40
|
return Joi.object({
|
|
54
|
-
|
|
41
|
+
templateSlug: Joi.string().allow(""),
|
|
55
42
|
}).required();
|
|
56
43
|
}
|
|
57
44
|
|
|
@@ -83,61 +70,24 @@ class OrderValidator {
|
|
|
83
70
|
}).required();
|
|
84
71
|
}
|
|
85
72
|
|
|
86
|
-
static
|
|
87
|
-
return Joi.object({
|
|
88
|
-
batchId: Joi.string().allow("").required(),
|
|
89
|
-
reportType: Joi.string().allow(""),
|
|
90
|
-
}).required();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
static getBulkInvoice() {
|
|
94
|
-
return Joi.object({
|
|
95
|
-
batchId: Joi.string().allow("").required(),
|
|
96
|
-
docType: Joi.string().allow("").required(),
|
|
97
|
-
}).required();
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
static getBulkInvoiceLabel() {
|
|
101
|
-
return Joi.object({
|
|
102
|
-
batchId: Joi.string().allow("").required(),
|
|
103
|
-
}).required();
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
static getBulkList() {
|
|
107
|
-
return Joi.object({
|
|
108
|
-
lane: Joi.string().allow(""),
|
|
109
|
-
searchType: Joi.string().allow(""),
|
|
110
|
-
searchId: Joi.string().allow(""),
|
|
111
|
-
fromDate: Joi.string().allow(""),
|
|
112
|
-
toDate: Joi.string().allow(""),
|
|
113
|
-
dpIds: Joi.string().allow(""),
|
|
114
|
-
orderingCompanyId: Joi.string().allow(""),
|
|
115
|
-
stores: Joi.string().allow(""),
|
|
116
|
-
salesChannel: Joi.string().allow(""),
|
|
117
|
-
requestByExt: Joi.string().allow(""),
|
|
118
|
-
pageNo: Joi.number(),
|
|
119
|
-
pageSize: Joi.number(),
|
|
120
|
-
customerId: Joi.string().allow(""),
|
|
121
|
-
isPrioritySort: Joi.boolean(),
|
|
122
|
-
}).required();
|
|
73
|
+
static getBulkActionTemplate() {
|
|
74
|
+
return Joi.object({}).required();
|
|
123
75
|
}
|
|
124
76
|
|
|
125
77
|
static getBulkShipmentExcelFile() {
|
|
126
78
|
return Joi.object({
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
searchId: Joi.string().allow(""),
|
|
79
|
+
salesChannels: Joi.string().allow(""),
|
|
80
|
+
dpIds: Joi.string().allow(""),
|
|
130
81
|
fromDate: Joi.string().allow(""),
|
|
131
82
|
toDate: Joi.string().allow(""),
|
|
132
|
-
dpIds: Joi.string().allow(""),
|
|
133
|
-
orderingCompanyId: Joi.string().allow(""),
|
|
134
83
|
stores: Joi.string().allow(""),
|
|
135
|
-
|
|
136
|
-
|
|
84
|
+
tags: Joi.string().allow(""),
|
|
85
|
+
bagStatus: Joi.string().allow(""),
|
|
86
|
+
paymentMethods: Joi.string().allow(""),
|
|
87
|
+
fileType: Joi.string().allow(""),
|
|
88
|
+
timeToDispatch: Joi.number(),
|
|
137
89
|
pageNo: Joi.number(),
|
|
138
90
|
pageSize: Joi.number(),
|
|
139
|
-
customerId: Joi.string().allow(""),
|
|
140
|
-
isPrioritySort: Joi.boolean(),
|
|
141
91
|
}).required();
|
|
142
92
|
}
|
|
143
93
|
|
|
@@ -159,13 +109,6 @@ class OrderValidator {
|
|
|
159
109
|
}).required();
|
|
160
110
|
}
|
|
161
111
|
|
|
162
|
-
static getMetricCount() {
|
|
163
|
-
return Joi.object({
|
|
164
|
-
fromDate: Joi.string().allow(""),
|
|
165
|
-
toDate: Joi.string().allow(""),
|
|
166
|
-
}).required();
|
|
167
|
-
}
|
|
168
|
-
|
|
169
112
|
static getOrderById() {
|
|
170
113
|
return Joi.object({
|
|
171
114
|
orderId: Joi.string().allow("").required(),
|
|
@@ -193,13 +136,6 @@ class OrderValidator {
|
|
|
193
136
|
}).required();
|
|
194
137
|
}
|
|
195
138
|
|
|
196
|
-
static getReportsShipmentListing() {
|
|
197
|
-
return Joi.object({
|
|
198
|
-
pageNo: Joi.number(),
|
|
199
|
-
pageSize: Joi.number(),
|
|
200
|
-
}).required();
|
|
201
|
-
}
|
|
202
|
-
|
|
203
139
|
static getRoleBasedActions() {
|
|
204
140
|
return Joi.object({}).required();
|
|
205
141
|
}
|
|
@@ -215,7 +151,7 @@ class OrderValidator {
|
|
|
215
151
|
|
|
216
152
|
static getShipmentHistory() {
|
|
217
153
|
return Joi.object({
|
|
218
|
-
shipmentId: Joi.
|
|
154
|
+
shipmentId: Joi.string().allow(""),
|
|
219
155
|
bagId: Joi.number(),
|
|
220
156
|
}).required();
|
|
221
157
|
}
|
|
@@ -257,6 +193,10 @@ class OrderValidator {
|
|
|
257
193
|
}).required();
|
|
258
194
|
}
|
|
259
195
|
|
|
196
|
+
static getStateTransitionMap() {
|
|
197
|
+
return Joi.object({}).required();
|
|
198
|
+
}
|
|
199
|
+
|
|
260
200
|
static getfilters() {
|
|
261
201
|
return Joi.object({
|
|
262
202
|
view: Joi.string().allow("").required(),
|
|
@@ -276,12 +216,6 @@ class OrderValidator {
|
|
|
276
216
|
}).required();
|
|
277
217
|
}
|
|
278
218
|
|
|
279
|
-
static platformManualAssignDPToShipment() {
|
|
280
|
-
return Joi.object({
|
|
281
|
-
body: OrderModel.ManualAssignDPToShipment().required(),
|
|
282
|
-
}).required();
|
|
283
|
-
}
|
|
284
|
-
|
|
285
219
|
static postShipmentHistory() {
|
|
286
220
|
return Joi.object({
|
|
287
221
|
body: OrderModel.PostShipmentHistory().required(),
|
|
@@ -306,10 +240,6 @@ class OrderValidator {
|
|
|
306
240
|
}).required();
|
|
307
241
|
}
|
|
308
242
|
|
|
309
|
-
static sendSmsNinjaPlatform() {
|
|
310
|
-
return Joi.object({}).required();
|
|
311
|
-
}
|
|
312
|
-
|
|
313
243
|
static updateAddress() {
|
|
314
244
|
return Joi.object({
|
|
315
245
|
shipmentId: Joi.string().allow("").required(),
|
|
@@ -350,12 +280,6 @@ class OrderValidator {
|
|
|
350
280
|
body: OrderModel.UploadConsent().required(),
|
|
351
281
|
}).required();
|
|
352
282
|
}
|
|
353
|
-
|
|
354
|
-
static upsertJioCode() {
|
|
355
|
-
return Joi.object({
|
|
356
|
-
body: OrderModel.JioCodeUpsertPayload().required(),
|
|
357
|
-
}).required();
|
|
358
|
-
}
|
|
359
283
|
}
|
|
360
284
|
|
|
361
285
|
module.exports = OrderValidator;
|