@gofynd/fdk-client-javascript 1.0.0 → 1.0.2
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/CART.md +251 -251
- package/documentation/application/CATALOG.md +393 -393
- package/documentation/application/CONTENT.md +15 -1
- package/documentation/application/ORDER.md +268 -268
- package/documentation/application/PAYMENT.md +249 -249
- package/documentation/application/POSCART.md +297 -297
- package/documentation/platform/CART.md +499 -499
- package/documentation/platform/CATALOG.md +3497 -3097
- package/documentation/platform/COMPANYPROFILE.md +207 -207
- package/documentation/platform/CONTENT.md +123 -1
- package/documentation/platform/ORDER.md +1518 -1324
- package/documentation/platform/PARTNER.md +7 -7
- package/documentation/platform/PAYMENT.md +96 -96
- package/index.js +7 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationConfig.js +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +865 -52
- package/sdk/application/Cart/CartApplicationModel.d.ts +7 -7
- package/sdk/application/Cart/CartApplicationModel.js +335 -335
- package/sdk/application/Cart/CartApplicationValidator.js +1 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.js +1034 -60
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationModel.js +532 -532
- package/sdk/application/Catalog/CatalogApplicationValidator.js +1 -0
- package/sdk/application/Common/CommonApplicationClient.js +66 -4
- package/sdk/application/Common/CommonApplicationValidator.js +1 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +108 -6
- package/sdk/application/Communication/CommunicationApplicationValidator.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +1 -1
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +558 -32
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationClient.js +621 -38
- package/sdk/application/Content/ContentApplicationModel.d.ts +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +11 -1
- package/sdk/application/Content/ContentApplicationValidator.js +1 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +101 -6
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +1 -0
- package/sdk/application/Lead/LeadApplicationClient.js +229 -14
- package/sdk/application/Lead/LeadApplicationValidator.js +1 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +134 -8
- package/sdk/application/Logistic/LogisticApplicationValidator.js +1 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +1 -1
- package/sdk/application/Order/OrderApplicationClient.js +403 -24
- package/sdk/application/Order/OrderApplicationModel.d.ts +20 -20
- package/sdk/application/Order/OrderApplicationModel.js +334 -334
- package/sdk/application/Order/OrderApplicationValidator.js +1 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +1381 -78
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +2 -2
- package/sdk/application/Payment/PaymentApplicationModel.js +350 -350
- package/sdk/application/Payment/PaymentApplicationValidator.js +1 -0
- package/sdk/application/PosCart/PosCartApplicationClient.js +914 -54
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +15 -15
- package/sdk/application/PosCart/PosCartApplicationModel.js +389 -389
- package/sdk/application/PosCart/PosCartApplicationValidator.js +1 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +235 -14
- package/sdk/application/Rewards/RewardsApplicationValidator.js +1 -0
- package/sdk/application/Share/ShareApplicationClient.js +226 -14
- package/sdk/application/Share/ShareApplicationValidator.js +1 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +130 -8
- package/sdk/application/Theme/ThemeApplicationValidator.js +1 -0
- package/sdk/application/User/UserApplicationClient.js +1133 -70
- package/sdk/application/User/UserApplicationValidator.js +1 -0
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +16 -8
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +287 -16
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +153 -8
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +141 -8
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +24 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +429 -24
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +34 -17
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +617 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -35
- package/sdk/platform/Cart/CartPlatformModel.js +617 -617
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +191 -138
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2202 -302
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +45 -45
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +344 -226
- package/sdk/platform/Catalog/CatalogPlatformClient.js +3282 -488
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +110 -100
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2073 -1795
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +23 -21
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +103 -84
- package/sdk/platform/Common/CommonPlatformClient.d.ts +4 -2
- package/sdk/platform/Common/CommonPlatformClient.js +73 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -40
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1499 -80
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +41 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +27 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +486 -26
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +9 -9
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +274 -274
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +56 -28
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1022 -56
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +693 -36
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +148 -67
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +2446 -140
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +4 -0
- package/sdk/platform/Content/ContentPlatformModel.js +43 -1
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +21 -10
- package/sdk/platform/Discount/DiscountPlatformClient.js +400 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +8 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +148 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +12 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +214 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +27 -14
- package/sdk/platform/Inventory/InventoryPlatformClient.js +449 -24
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +26 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +447 -26
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +22 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +384 -22
- package/sdk/platform/OAuthClient.js +8 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -3
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +125 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +108 -47
- package/sdk/platform/Order/OrderPlatformClient.js +1641 -100
- package/sdk/platform/Order/OrderPlatformModel.d.ts +69 -58
- package/sdk/platform/Order/OrderPlatformModel.js +1485 -1493
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +15 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +74 -4
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +22 -11
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +418 -22
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +21 -11
- package/sdk/platform/Payment/PaymentPlatformClient.js +374 -20
- package/sdk/platform/Payment/PaymentPlatformModel.js +139 -139
- package/sdk/platform/PlatformApplicationClient.d.ts +2973 -2827
- package/sdk/platform/PlatformApplicationClient.js +3461 -3263
- package/sdk/platform/PlatformClient.d.ts +2973 -2827
- package/sdk/platform/PlatformClient.js +3461 -3263
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +26 -13
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +449 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +8 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +139 -8
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +47 -23
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +816 -48
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +24 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +417 -24
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +12 -6
- package/sdk/platform/Webhook/WebhookPlatformClient.js +229 -12
- package/sdk/public/Configuration/ConfigurationPublicClient.js +72 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +3 -1
- package/sdk/public/Inventory/InventoryPublicClient.js +210 -12
- package/sdk/public/Inventory/InventoryPublicValidator.js +3 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +74 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +3 -1
|
@@ -3,571 +3,545 @@ const Joi = require("joi");
|
|
|
3
3
|
class OrderModel {
|
|
4
4
|
static FilterInfoOption() {
|
|
5
5
|
return Joi.object({
|
|
6
|
-
|
|
6
|
+
name: Joi.string().allow(""),
|
|
7
7
|
|
|
8
8
|
value: Joi.string().allow(""),
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
text: Joi.string().allow("").required(),
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
static FiltersInfo() {
|
|
15
15
|
return Joi.object({
|
|
16
|
-
text: Joi.string().allow("").required(),
|
|
17
|
-
|
|
18
16
|
options: Joi.array().items(OrderModel.FilterInfoOption()),
|
|
19
17
|
|
|
20
|
-
type: Joi.string().allow("").required(),
|
|
21
|
-
|
|
22
18
|
value: Joi.string().allow("").required(),
|
|
19
|
+
|
|
20
|
+
text: Joi.string().allow("").required(),
|
|
21
|
+
|
|
22
|
+
type: Joi.string().allow("").required(),
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
static
|
|
26
|
+
static PaymentModeInfo() {
|
|
27
27
|
return Joi.object({
|
|
28
|
-
|
|
28
|
+
logo: Joi.string().allow("").required(),
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
type: Joi.string().allow("").required(),
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
static
|
|
34
|
+
static GSTDetailsData() {
|
|
35
35
|
return Joi.object({
|
|
36
|
-
|
|
36
|
+
value_of_good: Joi.number().required(),
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
tax_collected_at_source: Joi.number().required(),
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
gst_fee: Joi.number().required(),
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
brand_calculated_amount: Joi.number().required(),
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
gstin_code: Joi.string().allow("").required(),
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
static
|
|
48
|
+
static Prices() {
|
|
49
49
|
return Joi.object({
|
|
50
|
-
|
|
50
|
+
transfer_price: Joi.number(),
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
}
|
|
52
|
+
price_marked: Joi.number(),
|
|
55
53
|
|
|
56
|
-
|
|
57
|
-
return Joi.object({
|
|
58
|
-
can_cancel: Joi.boolean(),
|
|
54
|
+
refund_amount: Joi.number(),
|
|
59
55
|
|
|
60
|
-
|
|
56
|
+
cashback_applied: Joi.number(),
|
|
61
57
|
|
|
62
|
-
|
|
58
|
+
delivery_charge: Joi.number(),
|
|
63
59
|
|
|
64
|
-
|
|
60
|
+
cashback: Joi.number(),
|
|
65
61
|
|
|
66
|
-
|
|
62
|
+
value_of_good: Joi.number(),
|
|
67
63
|
|
|
68
|
-
|
|
64
|
+
coupon_value: Joi.number(),
|
|
69
65
|
|
|
70
|
-
|
|
66
|
+
amount_paid: Joi.number(),
|
|
71
67
|
|
|
72
|
-
|
|
68
|
+
fynd_credits: Joi.number(),
|
|
73
69
|
|
|
74
|
-
|
|
70
|
+
cod_charges: Joi.number(),
|
|
75
71
|
|
|
76
|
-
|
|
72
|
+
tax_collected_at_source: Joi.number(),
|
|
77
73
|
|
|
78
|
-
|
|
74
|
+
discount: Joi.number(),
|
|
79
75
|
|
|
80
|
-
|
|
76
|
+
promotion_effective_discount: Joi.number(),
|
|
81
77
|
|
|
82
|
-
|
|
78
|
+
price_effective: Joi.number(),
|
|
79
|
+
|
|
80
|
+
refund_credit: Joi.number(),
|
|
81
|
+
|
|
82
|
+
amount_paid_roundoff: Joi.number(),
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
static
|
|
86
|
+
static PlatformItem() {
|
|
87
87
|
return Joi.object({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
coupon_value: Joi.number(),
|
|
91
|
-
|
|
92
|
-
price_effective: Joi.number(),
|
|
93
|
-
|
|
94
|
-
amount_paid: Joi.number(),
|
|
88
|
+
l1_category: Joi.array().items(Joi.string().allow("")),
|
|
95
89
|
|
|
96
|
-
|
|
90
|
+
images: Joi.array().items(Joi.string().allow("")),
|
|
97
91
|
|
|
98
|
-
|
|
92
|
+
l3_category_name: Joi.string().allow(""),
|
|
99
93
|
|
|
100
|
-
|
|
94
|
+
name: Joi.string().allow(""),
|
|
101
95
|
|
|
102
|
-
|
|
96
|
+
can_cancel: Joi.boolean(),
|
|
103
97
|
|
|
104
|
-
|
|
98
|
+
color: Joi.string().allow("").allow(null),
|
|
105
99
|
|
|
106
|
-
|
|
100
|
+
image: Joi.array().items(Joi.string().allow("")),
|
|
107
101
|
|
|
108
|
-
|
|
102
|
+
code: Joi.string().allow(""),
|
|
109
103
|
|
|
110
|
-
|
|
104
|
+
size: Joi.string().allow(""),
|
|
111
105
|
|
|
112
|
-
|
|
106
|
+
can_return: Joi.boolean(),
|
|
113
107
|
|
|
114
|
-
|
|
108
|
+
department_id: Joi.number(),
|
|
115
109
|
|
|
116
|
-
|
|
110
|
+
id: Joi.number(),
|
|
117
111
|
|
|
118
|
-
|
|
112
|
+
l3_category: Joi.number(),
|
|
119
113
|
});
|
|
120
114
|
}
|
|
121
115
|
|
|
122
|
-
static
|
|
116
|
+
static BagUnit() {
|
|
123
117
|
return Joi.object({
|
|
124
|
-
|
|
118
|
+
total_shipment_bags: Joi.number().required(),
|
|
125
119
|
|
|
126
|
-
|
|
120
|
+
gst: OrderModel.GSTDetailsData(),
|
|
127
121
|
|
|
128
|
-
|
|
122
|
+
can_cancel: Joi.boolean(),
|
|
129
123
|
|
|
130
|
-
|
|
124
|
+
status: Joi.any().required(),
|
|
131
125
|
|
|
132
|
-
|
|
133
|
-
});
|
|
134
|
-
}
|
|
126
|
+
item_quantity: Joi.number().required(),
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
return Joi.object({
|
|
138
|
-
can_cancel: Joi.boolean(),
|
|
128
|
+
prices: OrderModel.Prices(),
|
|
139
129
|
|
|
140
|
-
|
|
130
|
+
bag_id: Joi.number().required(),
|
|
131
|
+
|
|
132
|
+
can_return: Joi.boolean(),
|
|
141
133
|
|
|
142
134
|
item: OrderModel.PlatformItem(),
|
|
143
135
|
|
|
144
|
-
|
|
136
|
+
shipment_id: Joi.string().allow("").required(),
|
|
145
137
|
|
|
146
138
|
ordering_channel: Joi.string().allow("").required(),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
147
141
|
|
|
148
|
-
|
|
142
|
+
static ShipmentItemFulFillingStore() {
|
|
143
|
+
return Joi.object({
|
|
144
|
+
id: Joi.string().allow("").required(),
|
|
149
145
|
|
|
150
|
-
|
|
146
|
+
code: Joi.string().allow("").required(),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
151
149
|
|
|
152
|
-
|
|
150
|
+
static ShipmentStatus() {
|
|
151
|
+
return Joi.object({
|
|
152
|
+
actual_status: Joi.string().allow("").required(),
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
hex_code: Joi.string().allow("").required(),
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
status: Joi.string().allow("").required(),
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
title: Joi.string().allow("").required(),
|
|
159
|
+
|
|
160
|
+
ops_status: Joi.string().allow("").required(),
|
|
159
161
|
});
|
|
160
162
|
}
|
|
161
163
|
|
|
162
164
|
static UserDataInfo() {
|
|
163
165
|
return Joi.object({
|
|
164
|
-
last_name: Joi.string().allow(""),
|
|
165
|
-
|
|
166
|
-
mobile: Joi.string().allow(""),
|
|
167
|
-
|
|
168
166
|
name: Joi.string().allow(""),
|
|
169
167
|
|
|
170
|
-
|
|
168
|
+
last_name: Joi.string().allow(""),
|
|
171
169
|
|
|
172
170
|
uid: Joi.number(),
|
|
173
171
|
|
|
174
|
-
|
|
172
|
+
gender: Joi.string().allow(""),
|
|
175
173
|
|
|
176
174
|
email: Joi.string().allow(""),
|
|
177
175
|
|
|
176
|
+
mobile: Joi.string().allow(""),
|
|
177
|
+
|
|
178
|
+
avis_user_id: Joi.string().allow(""),
|
|
179
|
+
|
|
178
180
|
first_name: Joi.string().allow(""),
|
|
179
181
|
|
|
180
|
-
|
|
182
|
+
is_anonymous_user: Joi.boolean(),
|
|
181
183
|
});
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
static ShipmentItem() {
|
|
185
187
|
return Joi.object({
|
|
186
|
-
|
|
188
|
+
payment_mode_info: OrderModel.PaymentModeInfo(),
|
|
189
|
+
|
|
190
|
+
total_bags_count: Joi.number().required(),
|
|
187
191
|
|
|
188
192
|
application: Joi.any(),
|
|
189
193
|
|
|
190
|
-
|
|
194
|
+
payment_methods: Joi.any(),
|
|
191
195
|
|
|
192
|
-
|
|
196
|
+
sla: Joi.any(),
|
|
193
197
|
|
|
194
|
-
|
|
198
|
+
bags: Joi.array().items(OrderModel.BagUnit()),
|
|
195
199
|
|
|
196
200
|
channel: Joi.any(),
|
|
197
201
|
|
|
198
|
-
|
|
202
|
+
prices: OrderModel.Prices(),
|
|
199
203
|
|
|
200
|
-
|
|
204
|
+
fulfilling_centre: Joi.string().allow("").required(),
|
|
205
|
+
|
|
206
|
+
shipment_created_at: Joi.string().allow("").required(),
|
|
201
207
|
|
|
202
208
|
total_shipments_in_order: Joi.number().required(),
|
|
203
209
|
|
|
204
|
-
|
|
210
|
+
created_at: Joi.string().allow("").required(),
|
|
205
211
|
|
|
206
|
-
|
|
212
|
+
fulfilling_store: OrderModel.ShipmentItemFulFillingStore(),
|
|
207
213
|
|
|
208
|
-
|
|
214
|
+
shipment_status: OrderModel.ShipmentStatus(),
|
|
209
215
|
|
|
210
216
|
user: OrderModel.UserDataInfo(),
|
|
211
217
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
prices: OrderModel.Prices(),
|
|
218
|
+
shipment_id: Joi.string().allow(""),
|
|
215
219
|
|
|
216
|
-
|
|
220
|
+
id: Joi.string().allow("").required(),
|
|
217
221
|
});
|
|
218
222
|
}
|
|
219
223
|
|
|
220
224
|
static ShipmentInternalPlatformViewResponse() {
|
|
221
225
|
return Joi.object({
|
|
222
|
-
page: Joi.any(),
|
|
223
|
-
|
|
224
226
|
filters: Joi.array().items(OrderModel.FiltersInfo()),
|
|
225
227
|
|
|
226
|
-
|
|
228
|
+
page: Joi.any(),
|
|
227
229
|
|
|
228
230
|
applied_filters: Joi.any(),
|
|
231
|
+
|
|
232
|
+
items: Joi.array().items(OrderModel.ShipmentItem()),
|
|
229
233
|
});
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
static Error() {
|
|
233
237
|
return Joi.object({
|
|
234
|
-
message: Joi.string().allow(""),
|
|
235
|
-
|
|
236
238
|
success: Joi.boolean(),
|
|
239
|
+
|
|
240
|
+
message: Joi.string().allow(""),
|
|
237
241
|
});
|
|
238
242
|
}
|
|
239
243
|
|
|
240
|
-
static
|
|
244
|
+
static DPDetailsData() {
|
|
241
245
|
return Joi.object({
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
phone: Joi.string().allow("").required(),
|
|
245
|
-
|
|
246
|
-
store_name: Joi.string().allow("").required(),
|
|
247
|
-
|
|
248
|
-
pincode: Joi.string().allow("").required(),
|
|
249
|
-
|
|
250
|
-
fulfillment_channel: Joi.string().allow("").required(),
|
|
246
|
+
eway_bill_id: Joi.string().allow("").allow(null),
|
|
251
247
|
|
|
252
|
-
|
|
248
|
+
name: Joi.string().allow(""),
|
|
253
249
|
|
|
254
|
-
|
|
250
|
+
gst_tag: Joi.string().allow(""),
|
|
255
251
|
|
|
256
|
-
|
|
252
|
+
pincode: Joi.string().allow(""),
|
|
257
253
|
|
|
258
|
-
|
|
254
|
+
awb_no: Joi.string().allow(""),
|
|
259
255
|
|
|
260
|
-
|
|
256
|
+
track_url: Joi.string().allow("").allow(null),
|
|
261
257
|
|
|
262
|
-
|
|
258
|
+
id: Joi.number(),
|
|
263
259
|
|
|
264
|
-
country: Joi.string().allow("")
|
|
260
|
+
country: Joi.string().allow(""),
|
|
265
261
|
});
|
|
266
262
|
}
|
|
267
263
|
|
|
268
|
-
static
|
|
264
|
+
static LockData() {
|
|
269
265
|
return Joi.object({
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
is_active: Joi.boolean().required(),
|
|
273
|
-
|
|
274
|
-
is_customer_return_allowed: Joi.boolean().required(),
|
|
275
|
-
|
|
276
|
-
enable_tracking: Joi.boolean().required(),
|
|
266
|
+
lock_message: Joi.string().allow(""),
|
|
277
267
|
|
|
278
|
-
|
|
268
|
+
locked: Joi.boolean(),
|
|
279
269
|
|
|
280
|
-
|
|
270
|
+
mto: Joi.boolean(),
|
|
281
271
|
});
|
|
282
272
|
}
|
|
283
273
|
|
|
284
|
-
static
|
|
274
|
+
static Formatted() {
|
|
285
275
|
return Joi.object({
|
|
286
|
-
|
|
276
|
+
f_max: Joi.string().allow(""),
|
|
287
277
|
|
|
288
|
-
|
|
278
|
+
f_min: Joi.string().allow(""),
|
|
289
279
|
});
|
|
290
280
|
}
|
|
291
281
|
|
|
292
|
-
static
|
|
282
|
+
static DebugInfo() {
|
|
293
283
|
return Joi.object({
|
|
294
|
-
|
|
284
|
+
stormbreaker_uuid: Joi.string().allow(""),
|
|
295
285
|
});
|
|
296
286
|
}
|
|
297
287
|
|
|
298
|
-
static
|
|
288
|
+
static EinvoiceInfo() {
|
|
299
289
|
return Joi.object({
|
|
300
|
-
|
|
290
|
+
invoice: Joi.any(),
|
|
301
291
|
|
|
302
|
-
|
|
292
|
+
credit_note: Joi.any(),
|
|
303
293
|
});
|
|
304
294
|
}
|
|
305
295
|
|
|
306
|
-
static
|
|
296
|
+
static BuyerDetails() {
|
|
307
297
|
return Joi.object({
|
|
308
|
-
|
|
298
|
+
name: Joi.string().allow("").required(),
|
|
309
299
|
|
|
310
|
-
|
|
300
|
+
address: Joi.string().allow("").allow(null).required(),
|
|
311
301
|
|
|
312
|
-
|
|
302
|
+
pincode: Joi.number().required(),
|
|
313
303
|
|
|
314
|
-
|
|
304
|
+
gstin: Joi.string().allow("").required(),
|
|
315
305
|
|
|
316
|
-
|
|
306
|
+
city: Joi.string().allow("").required(),
|
|
317
307
|
|
|
318
|
-
|
|
308
|
+
state: Joi.string().allow("").required(),
|
|
319
309
|
|
|
320
|
-
|
|
310
|
+
ajio_site_id: Joi.string().allow(""),
|
|
311
|
+
});
|
|
312
|
+
}
|
|
321
313
|
|
|
322
|
-
|
|
314
|
+
static ShipmentTimeStamp() {
|
|
315
|
+
return Joi.object({
|
|
316
|
+
t_min: Joi.string().allow(""),
|
|
317
|
+
|
|
318
|
+
t_max: Joi.string().allow(""),
|
|
323
319
|
});
|
|
324
320
|
}
|
|
325
321
|
|
|
326
|
-
static
|
|
322
|
+
static ShipmentMeta() {
|
|
327
323
|
return Joi.object({
|
|
328
|
-
|
|
324
|
+
forward_affiliate_order_id: Joi.string().allow(""),
|
|
329
325
|
|
|
330
|
-
|
|
326
|
+
lock_data: OrderModel.LockData(),
|
|
331
327
|
|
|
332
|
-
|
|
328
|
+
formatted: OrderModel.Formatted(),
|
|
333
329
|
|
|
334
|
-
|
|
330
|
+
due_date: Joi.string().allow(""),
|
|
335
331
|
|
|
336
|
-
|
|
332
|
+
order_type: Joi.string().allow("").allow(null),
|
|
337
333
|
|
|
338
|
-
|
|
334
|
+
dp_name: Joi.string().allow(""),
|
|
339
335
|
|
|
340
|
-
|
|
336
|
+
shipment_volumetric_weight: Joi.number(),
|
|
341
337
|
|
|
342
|
-
|
|
343
|
-
});
|
|
344
|
-
}
|
|
338
|
+
debug_info: OrderModel.DebugInfo(),
|
|
345
339
|
|
|
346
|
-
|
|
347
|
-
return Joi.object({
|
|
348
|
-
uid: Joi.string().allow(""),
|
|
340
|
+
bag_weight: Joi.any(),
|
|
349
341
|
|
|
350
|
-
|
|
342
|
+
same_store_available: Joi.boolean().required(),
|
|
351
343
|
|
|
352
|
-
|
|
353
|
-
});
|
|
354
|
-
}
|
|
344
|
+
return_affiliate_order_id: Joi.string().allow(""),
|
|
355
345
|
|
|
356
|
-
|
|
357
|
-
return Joi.object({
|
|
358
|
-
app_display_name: Joi.string().allow(""),
|
|
346
|
+
dp_sort_key: Joi.string().allow(""),
|
|
359
347
|
|
|
360
|
-
|
|
348
|
+
shipment_weight: Joi.number(),
|
|
361
349
|
|
|
362
|
-
|
|
350
|
+
ewaybill_info: Joi.any().allow(null),
|
|
363
351
|
|
|
364
|
-
|
|
352
|
+
return_awb_number: Joi.string().allow(""),
|
|
365
353
|
|
|
366
|
-
|
|
354
|
+
b2c_buyer_details: Joi.any().allow(null),
|
|
367
355
|
|
|
368
|
-
|
|
356
|
+
einvoice_info: OrderModel.EinvoiceInfo(),
|
|
369
357
|
|
|
370
|
-
|
|
358
|
+
return_store_node: Joi.number(),
|
|
371
359
|
|
|
372
|
-
|
|
360
|
+
awb_number: Joi.string().allow(""),
|
|
373
361
|
|
|
374
|
-
|
|
362
|
+
b2b_buyer_details: OrderModel.BuyerDetails(),
|
|
375
363
|
|
|
376
|
-
|
|
377
|
-
});
|
|
378
|
-
}
|
|
364
|
+
dp_id: Joi.string().allow("").allow(null),
|
|
379
365
|
|
|
380
|
-
|
|
381
|
-
return Joi.object({
|
|
382
|
-
current_status_id: Joi.number().required(),
|
|
366
|
+
box_type: Joi.string().allow("").allow(null),
|
|
383
367
|
|
|
384
|
-
|
|
368
|
+
packaging_name: Joi.string().allow(""),
|
|
385
369
|
|
|
386
|
-
|
|
370
|
+
external: Joi.any(),
|
|
387
371
|
|
|
388
|
-
|
|
372
|
+
dp_options: Joi.any(),
|
|
389
373
|
|
|
390
|
-
|
|
374
|
+
weight: Joi.number().required(),
|
|
391
375
|
|
|
392
|
-
|
|
376
|
+
return_affiliate_shipment_id: Joi.string().allow(""),
|
|
393
377
|
|
|
394
|
-
|
|
378
|
+
return_details: Joi.any(),
|
|
395
379
|
|
|
396
|
-
|
|
380
|
+
timestamp: OrderModel.ShipmentTimeStamp(),
|
|
397
381
|
|
|
398
|
-
|
|
382
|
+
auto_trigger_dp_assignment_acf: Joi.boolean().required(),
|
|
399
383
|
|
|
400
|
-
|
|
384
|
+
store_invoice_updated_date: Joi.string().allow(""),
|
|
401
385
|
|
|
402
|
-
|
|
386
|
+
fulfilment_priority_text: Joi.string().allow("").allow(null),
|
|
403
387
|
|
|
404
|
-
|
|
388
|
+
po_number: Joi.string().allow(""),
|
|
405
389
|
|
|
406
|
-
|
|
407
|
-
});
|
|
408
|
-
}
|
|
390
|
+
marketplace_store_id: Joi.string().allow(""),
|
|
409
391
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
392
|
+
assign_dp_from_sb: Joi.boolean(),
|
|
393
|
+
|
|
394
|
+
forward_affiliate_shipment_id: Joi.string().allow(""),
|
|
413
395
|
});
|
|
414
396
|
}
|
|
415
397
|
|
|
416
|
-
static
|
|
398
|
+
static PDFLinks() {
|
|
417
399
|
return Joi.object({
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
item_name: Joi.string().allow("").required(),
|
|
421
|
-
|
|
422
|
-
cashback: Joi.number().required(),
|
|
400
|
+
credit_note_url: Joi.string().allow(""),
|
|
423
401
|
|
|
424
|
-
|
|
402
|
+
label_a6: Joi.string().allow(""),
|
|
425
403
|
|
|
426
|
-
|
|
404
|
+
label_type: Joi.string().allow("").required(),
|
|
427
405
|
|
|
428
|
-
|
|
406
|
+
b2b: Joi.string().allow(""),
|
|
429
407
|
|
|
430
|
-
|
|
408
|
+
invoice_a4: Joi.string().allow(""),
|
|
431
409
|
|
|
432
|
-
|
|
410
|
+
label_pos: Joi.string().allow(""),
|
|
433
411
|
|
|
434
|
-
|
|
412
|
+
label: Joi.string().allow(""),
|
|
435
413
|
|
|
436
|
-
|
|
414
|
+
invoice_pos: Joi.string().allow(""),
|
|
437
415
|
|
|
438
|
-
|
|
416
|
+
label_a4: Joi.string().allow(""),
|
|
439
417
|
|
|
440
|
-
|
|
418
|
+
invoice: Joi.string().allow(""),
|
|
441
419
|
|
|
442
|
-
|
|
420
|
+
invoice_a6: Joi.string().allow(""),
|
|
443
421
|
|
|
444
|
-
|
|
422
|
+
invoice_type: Joi.string().allow("").required(),
|
|
445
423
|
|
|
446
|
-
|
|
424
|
+
po_invoice: Joi.string().allow(""),
|
|
447
425
|
|
|
448
|
-
|
|
426
|
+
delivery_challan_a4: Joi.string().allow(""),
|
|
427
|
+
});
|
|
428
|
+
}
|
|
449
429
|
|
|
450
|
-
|
|
430
|
+
static AffiliateMeta() {
|
|
431
|
+
return Joi.object({
|
|
432
|
+
channel_shipment_id: Joi.string().allow("").allow(null),
|
|
451
433
|
|
|
452
|
-
|
|
434
|
+
due_date: Joi.string().allow("").allow(null),
|
|
453
435
|
|
|
454
|
-
|
|
436
|
+
coupon_code: Joi.string().allow("").allow(null),
|
|
455
437
|
|
|
456
|
-
|
|
438
|
+
employee_discount: Joi.number(),
|
|
457
439
|
|
|
458
|
-
|
|
440
|
+
loyalty_discount: Joi.number(),
|
|
459
441
|
|
|
460
|
-
|
|
442
|
+
quantity: Joi.number(),
|
|
461
443
|
|
|
462
|
-
|
|
444
|
+
box_type: Joi.string().allow("").allow(null),
|
|
463
445
|
|
|
464
|
-
|
|
446
|
+
is_priority: Joi.boolean(),
|
|
465
447
|
|
|
466
|
-
|
|
448
|
+
size_level_total_qty: Joi.number().allow(null),
|
|
467
449
|
|
|
468
|
-
|
|
450
|
+
order_item_id: Joi.string().allow(""),
|
|
469
451
|
|
|
470
|
-
|
|
452
|
+
channel_order_id: Joi.string().allow("").allow(null),
|
|
471
453
|
});
|
|
472
454
|
}
|
|
473
455
|
|
|
474
|
-
static
|
|
456
|
+
static AffiliateDetails() {
|
|
475
457
|
return Joi.object({
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
landmark: Joi.string().allow(""),
|
|
458
|
+
affiliate_shipment_id: Joi.string().allow("").required(),
|
|
479
459
|
|
|
480
|
-
|
|
460
|
+
affiliate_id: Joi.string().allow(""),
|
|
481
461
|
|
|
482
|
-
|
|
462
|
+
affiliate_order_id: Joi.string().allow("").required(),
|
|
483
463
|
|
|
484
|
-
|
|
464
|
+
shipment_meta: OrderModel.ShipmentMeta().required(),
|
|
485
465
|
|
|
486
|
-
|
|
466
|
+
affiliate_bag_id: Joi.string().allow("").required(),
|
|
487
467
|
|
|
488
|
-
|
|
468
|
+
ad_id: Joi.string().allow(""),
|
|
489
469
|
|
|
490
|
-
|
|
470
|
+
pdf_links: OrderModel.PDFLinks(),
|
|
491
471
|
|
|
492
|
-
|
|
472
|
+
affiliate_store_id: Joi.string().allow("").required(),
|
|
493
473
|
|
|
494
|
-
|
|
474
|
+
company_affiliate_tag: Joi.string().allow(""),
|
|
495
475
|
|
|
496
|
-
|
|
476
|
+
affiliate_meta: OrderModel.AffiliateMeta().required(),
|
|
477
|
+
});
|
|
478
|
+
}
|
|
497
479
|
|
|
498
|
-
|
|
480
|
+
static FulfillingStore() {
|
|
481
|
+
return Joi.object({
|
|
482
|
+
store_name: Joi.string().allow("").required(),
|
|
499
483
|
|
|
500
|
-
|
|
484
|
+
address: Joi.string().allow("").required(),
|
|
501
485
|
|
|
502
|
-
|
|
486
|
+
fulfillment_channel: Joi.string().allow("").required(),
|
|
503
487
|
|
|
504
|
-
|
|
488
|
+
pincode: Joi.string().allow("").required(),
|
|
505
489
|
|
|
506
|
-
|
|
490
|
+
code: Joi.string().allow("").required(),
|
|
507
491
|
|
|
508
|
-
|
|
492
|
+
city: Joi.string().allow("").required(),
|
|
509
493
|
|
|
510
|
-
|
|
511
|
-
});
|
|
512
|
-
}
|
|
494
|
+
state: Joi.string().allow("").required(),
|
|
513
495
|
|
|
514
|
-
|
|
515
|
-
return Joi.object({
|
|
516
|
-
logo: Joi.string().allow("").required(),
|
|
496
|
+
meta: Joi.any().required(),
|
|
517
497
|
|
|
518
|
-
|
|
498
|
+
contact_person: Joi.string().allow("").required(),
|
|
519
499
|
|
|
520
|
-
|
|
500
|
+
phone: Joi.string().allow("").required(),
|
|
521
501
|
|
|
522
502
|
id: Joi.number().required(),
|
|
523
503
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
created_on: Joi.string().allow("").required(),
|
|
504
|
+
country: Joi.string().allow("").required(),
|
|
527
505
|
});
|
|
528
506
|
}
|
|
529
507
|
|
|
530
|
-
static
|
|
508
|
+
static UserDetailsData() {
|
|
531
509
|
return Joi.object({
|
|
532
|
-
|
|
510
|
+
name: Joi.string().allow("").required(),
|
|
533
511
|
|
|
534
|
-
|
|
512
|
+
address: Joi.string().allow("").required(),
|
|
535
513
|
|
|
536
|
-
|
|
514
|
+
pincode: Joi.string().allow("").required(),
|
|
537
515
|
|
|
538
|
-
|
|
516
|
+
city: Joi.string().allow("").required(),
|
|
539
517
|
|
|
540
|
-
|
|
518
|
+
email: Joi.string().allow(""),
|
|
541
519
|
|
|
542
|
-
|
|
520
|
+
state: Joi.string().allow("").required(),
|
|
543
521
|
|
|
544
|
-
|
|
522
|
+
phone: Joi.string().allow("").required(),
|
|
545
523
|
|
|
546
|
-
|
|
524
|
+
country: Joi.string().allow("").required(),
|
|
525
|
+
});
|
|
526
|
+
}
|
|
547
527
|
|
|
548
|
-
|
|
528
|
+
static Dimensions() {
|
|
529
|
+
return Joi.object({
|
|
530
|
+
unit: Joi.string().allow(""),
|
|
549
531
|
|
|
550
|
-
|
|
532
|
+
width: Joi.number(),
|
|
551
533
|
|
|
552
|
-
|
|
534
|
+
is_default: Joi.boolean(),
|
|
553
535
|
|
|
554
|
-
|
|
536
|
+
length: Joi.number(),
|
|
555
537
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
can_cancel: Joi.boolean(),
|
|
561
|
-
|
|
562
|
-
item: OrderModel.PlatformItem(),
|
|
563
|
-
|
|
564
|
-
delivery_address: OrderModel.PlatformDeliveryAddress(),
|
|
565
|
-
|
|
566
|
-
can_return: Joi.boolean(),
|
|
567
|
-
|
|
568
|
-
brand: OrderModel.OrderBrandName(),
|
|
538
|
+
height: Joi.number(),
|
|
539
|
+
});
|
|
540
|
+
}
|
|
569
541
|
|
|
570
|
-
|
|
542
|
+
static Meta() {
|
|
543
|
+
return Joi.object({
|
|
544
|
+
dimension: OrderModel.Dimensions(),
|
|
571
545
|
});
|
|
572
546
|
}
|
|
573
547
|
|
|
@@ -575,471 +549,697 @@ class OrderModel {
|
|
|
575
549
|
return Joi.object({
|
|
576
550
|
source: Joi.string().allow(""),
|
|
577
551
|
|
|
578
|
-
logo: Joi.string().allow(""),
|
|
579
|
-
|
|
580
552
|
mode: Joi.string().allow(""),
|
|
553
|
+
|
|
554
|
+
logo: Joi.string().allow(""),
|
|
581
555
|
});
|
|
582
556
|
}
|
|
583
557
|
|
|
584
|
-
static
|
|
558
|
+
static TrackingList() {
|
|
585
559
|
return Joi.object({
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
name: Joi.string().allow("").required(),
|
|
589
|
-
|
|
590
|
-
phone: Joi.string().allow("").required(),
|
|
591
|
-
|
|
592
|
-
pincode: Joi.string().allow("").required(),
|
|
560
|
+
status: Joi.string().allow("").required(),
|
|
593
561
|
|
|
594
|
-
|
|
562
|
+
is_current: Joi.boolean(),
|
|
595
563
|
|
|
596
|
-
|
|
564
|
+
is_passed: Joi.boolean(),
|
|
597
565
|
|
|
598
|
-
|
|
566
|
+
time: Joi.string().allow(""),
|
|
599
567
|
|
|
600
|
-
|
|
568
|
+
text: Joi.string().allow("").required(),
|
|
601
569
|
});
|
|
602
570
|
}
|
|
603
571
|
|
|
604
|
-
static
|
|
572
|
+
static InvoiceInfo() {
|
|
605
573
|
return Joi.object({
|
|
606
|
-
|
|
574
|
+
label_url: Joi.string().allow(""),
|
|
607
575
|
|
|
608
|
-
|
|
576
|
+
store_invoice_id: Joi.string().allow(""),
|
|
609
577
|
|
|
610
|
-
|
|
578
|
+
updated_date: Joi.string().allow(""),
|
|
611
579
|
|
|
612
|
-
|
|
580
|
+
credit_note_id: Joi.string().allow(""),
|
|
613
581
|
|
|
614
|
-
|
|
582
|
+
invoice_url: Joi.string().allow(""),
|
|
583
|
+
});
|
|
584
|
+
}
|
|
615
585
|
|
|
616
|
-
|
|
586
|
+
static BagConfigs() {
|
|
587
|
+
return Joi.object({
|
|
588
|
+
enable_tracking: Joi.boolean().required(),
|
|
617
589
|
|
|
618
|
-
|
|
590
|
+
is_customer_return_allowed: Joi.boolean().required(),
|
|
619
591
|
|
|
620
|
-
|
|
592
|
+
is_active: Joi.boolean().required(),
|
|
621
593
|
|
|
622
|
-
|
|
594
|
+
is_returnable: Joi.boolean().required(),
|
|
623
595
|
|
|
624
|
-
|
|
596
|
+
can_be_cancelled: Joi.boolean().required(),
|
|
625
597
|
|
|
626
|
-
|
|
598
|
+
allow_force_return: Joi.boolean().required(),
|
|
599
|
+
});
|
|
600
|
+
}
|
|
627
601
|
|
|
628
|
-
|
|
602
|
+
static OrderBagArticle() {
|
|
603
|
+
return Joi.object({
|
|
604
|
+
uid: Joi.string().allow(""),
|
|
629
605
|
|
|
630
|
-
|
|
606
|
+
return_config: Joi.any(),
|
|
631
607
|
|
|
632
|
-
|
|
608
|
+
identifiers: Joi.any(),
|
|
609
|
+
});
|
|
610
|
+
}
|
|
633
611
|
|
|
634
|
-
|
|
612
|
+
static ItemCriterias() {
|
|
613
|
+
return Joi.object({
|
|
614
|
+
item_brand: Joi.array().items(Joi.number()),
|
|
615
|
+
});
|
|
616
|
+
}
|
|
635
617
|
|
|
636
|
-
|
|
618
|
+
static BuyRules() {
|
|
619
|
+
return Joi.object({
|
|
620
|
+
cart_conditions: Joi.any(),
|
|
637
621
|
|
|
638
|
-
|
|
622
|
+
item_criteria: OrderModel.ItemCriterias(),
|
|
639
623
|
});
|
|
640
624
|
}
|
|
641
625
|
|
|
642
|
-
static
|
|
626
|
+
static DiscountRules() {
|
|
643
627
|
return Joi.object({
|
|
644
|
-
|
|
628
|
+
value: Joi.number(),
|
|
645
629
|
|
|
646
|
-
|
|
630
|
+
type: Joi.string().allow(""),
|
|
631
|
+
});
|
|
632
|
+
}
|
|
647
633
|
|
|
648
|
-
|
|
634
|
+
static AppliedPromos() {
|
|
635
|
+
return Joi.object({
|
|
636
|
+
buy_rules: Joi.array().items(OrderModel.BuyRules()),
|
|
649
637
|
|
|
650
|
-
|
|
638
|
+
article_quantity: Joi.number(),
|
|
651
639
|
|
|
652
|
-
|
|
640
|
+
discount_rules: Joi.array().items(OrderModel.DiscountRules()),
|
|
653
641
|
|
|
654
|
-
|
|
642
|
+
mrp_promotion: Joi.boolean(),
|
|
655
643
|
|
|
656
|
-
|
|
644
|
+
promotion_type: Joi.string().allow(""),
|
|
657
645
|
|
|
658
|
-
|
|
646
|
+
promotion_name: Joi.string().allow(""),
|
|
659
647
|
|
|
660
|
-
|
|
648
|
+
promo_id: Joi.string().allow(""),
|
|
649
|
+
|
|
650
|
+
amount: Joi.number(),
|
|
661
651
|
});
|
|
662
652
|
}
|
|
663
653
|
|
|
664
|
-
static
|
|
654
|
+
static BagStateMapper() {
|
|
665
655
|
return Joi.object({
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
is_current: Joi.boolean(),
|
|
669
|
-
|
|
670
|
-
status: Joi.string().allow("").required(),
|
|
671
|
-
|
|
672
|
-
time: Joi.string().allow(""),
|
|
656
|
+
name: Joi.string().allow("").required(),
|
|
673
657
|
|
|
674
|
-
|
|
675
|
-
});
|
|
676
|
-
}
|
|
658
|
+
app_facing: Joi.boolean(),
|
|
677
659
|
|
|
678
|
-
|
|
679
|
-
return Joi.object({
|
|
680
|
-
awb_no: Joi.string().allow(""),
|
|
660
|
+
state_type: Joi.string().allow("").required(),
|
|
681
661
|
|
|
682
|
-
|
|
662
|
+
is_active: Joi.boolean(),
|
|
683
663
|
|
|
684
|
-
|
|
664
|
+
notify_customer: Joi.boolean(),
|
|
685
665
|
|
|
686
|
-
|
|
666
|
+
app_display_name: Joi.string().allow(""),
|
|
687
667
|
|
|
688
|
-
|
|
668
|
+
app_state_name: Joi.string().allow(""),
|
|
689
669
|
|
|
690
|
-
|
|
670
|
+
display_name: Joi.string().allow("").required(),
|
|
691
671
|
|
|
692
|
-
|
|
672
|
+
journey_type: Joi.string().allow("").required(),
|
|
693
673
|
|
|
694
|
-
|
|
674
|
+
bs_id: Joi.number().required(),
|
|
695
675
|
});
|
|
696
676
|
}
|
|
697
677
|
|
|
698
|
-
static
|
|
678
|
+
static CurrentStatus() {
|
|
699
679
|
return Joi.object({
|
|
700
|
-
|
|
680
|
+
delivery_partner_id: Joi.number(),
|
|
701
681
|
|
|
702
|
-
|
|
682
|
+
updated_at: Joi.string().allow(""),
|
|
703
683
|
|
|
704
684
|
status: Joi.string().allow(""),
|
|
705
685
|
|
|
706
|
-
|
|
686
|
+
state_id: Joi.number(),
|
|
707
687
|
|
|
708
|
-
|
|
709
|
-
});
|
|
710
|
-
}
|
|
688
|
+
delivery_awb_number: Joi.string().allow(""),
|
|
711
689
|
|
|
712
|
-
|
|
713
|
-
return Joi.object({
|
|
714
|
-
pay_button: Joi.string().allow(""),
|
|
690
|
+
store_id: Joi.number(),
|
|
715
691
|
|
|
716
|
-
|
|
692
|
+
state_type: Joi.string().allow(""),
|
|
717
693
|
|
|
718
|
-
|
|
694
|
+
kafka_sync: Joi.boolean(),
|
|
719
695
|
|
|
720
|
-
|
|
696
|
+
created_at: Joi.string().allow("").allow(null),
|
|
721
697
|
|
|
722
|
-
|
|
698
|
+
bag_id: Joi.number(),
|
|
723
699
|
|
|
724
|
-
|
|
700
|
+
current_status_id: Joi.number().required(),
|
|
725
701
|
|
|
726
|
-
|
|
702
|
+
shipment_id: Joi.string().allow(""),
|
|
727
703
|
|
|
728
|
-
|
|
704
|
+
bag_state_mapper: OrderModel.BagStateMapper(),
|
|
705
|
+
});
|
|
706
|
+
}
|
|
729
707
|
|
|
730
|
-
|
|
708
|
+
static OrderBrandName() {
|
|
709
|
+
return Joi.object({
|
|
710
|
+
created_on: Joi.string().allow("").required(),
|
|
731
711
|
|
|
732
|
-
|
|
712
|
+
modified_on: Joi.string().allow(""),
|
|
733
713
|
|
|
734
|
-
|
|
714
|
+
brand_name: Joi.string().allow("").required(),
|
|
735
715
|
|
|
736
|
-
|
|
716
|
+
id: Joi.number().required(),
|
|
737
717
|
|
|
738
|
-
|
|
718
|
+
company: Joi.string().allow("").allow(null).required(),
|
|
739
719
|
|
|
740
|
-
|
|
720
|
+
logo: Joi.string().allow("").required(),
|
|
721
|
+
});
|
|
722
|
+
}
|
|
741
723
|
|
|
742
|
-
|
|
724
|
+
static PlatformDeliveryAddress() {
|
|
725
|
+
return Joi.object({
|
|
726
|
+
contact_person: Joi.string().allow(""),
|
|
743
727
|
|
|
744
|
-
|
|
728
|
+
latitude: Joi.number(),
|
|
745
729
|
|
|
746
|
-
|
|
730
|
+
updated_at: Joi.string().allow(""),
|
|
747
731
|
|
|
748
|
-
|
|
732
|
+
area: Joi.string().allow(""),
|
|
749
733
|
|
|
750
|
-
|
|
734
|
+
pincode: Joi.string().allow(""),
|
|
751
735
|
|
|
752
|
-
|
|
736
|
+
city: Joi.string().allow(""),
|
|
753
737
|
|
|
754
|
-
|
|
738
|
+
email: Joi.string().allow(""),
|
|
755
739
|
|
|
756
|
-
|
|
740
|
+
state: Joi.string().allow(""),
|
|
757
741
|
|
|
758
|
-
|
|
742
|
+
address2: Joi.string().allow(""),
|
|
759
743
|
|
|
760
|
-
|
|
744
|
+
landmark: Joi.string().allow(""),
|
|
761
745
|
|
|
762
|
-
|
|
746
|
+
created_at: Joi.string().allow(""),
|
|
763
747
|
|
|
764
|
-
|
|
748
|
+
address_type: Joi.string().allow(""),
|
|
765
749
|
|
|
766
|
-
|
|
750
|
+
longitude: Joi.number(),
|
|
767
751
|
|
|
768
|
-
|
|
752
|
+
phone: Joi.string().allow(""),
|
|
769
753
|
|
|
770
|
-
|
|
754
|
+
address_category: Joi.string().allow(""),
|
|
771
755
|
|
|
772
|
-
|
|
756
|
+
address1: Joi.string().allow(""),
|
|
773
757
|
|
|
774
|
-
|
|
758
|
+
version: Joi.string().allow(""),
|
|
775
759
|
|
|
776
|
-
|
|
760
|
+
country: Joi.string().allow(""),
|
|
761
|
+
});
|
|
762
|
+
}
|
|
777
763
|
|
|
778
|
-
|
|
764
|
+
static Identifier() {
|
|
765
|
+
return Joi.object({
|
|
766
|
+
ean: Joi.string().allow(""),
|
|
767
|
+
});
|
|
768
|
+
}
|
|
779
769
|
|
|
780
|
-
|
|
770
|
+
static FinancialBreakup() {
|
|
771
|
+
return Joi.object({
|
|
772
|
+
value_of_good: Joi.number().required(),
|
|
781
773
|
|
|
782
|
-
|
|
774
|
+
cod_charges: Joi.number().required(),
|
|
783
775
|
|
|
784
|
-
|
|
776
|
+
gst_fee: Joi.number().required(),
|
|
785
777
|
|
|
786
|
-
|
|
778
|
+
promotion_effective_discount: Joi.number().required(),
|
|
787
779
|
|
|
788
|
-
|
|
780
|
+
transfer_price: Joi.number().required(),
|
|
789
781
|
|
|
790
|
-
|
|
782
|
+
price_marked: Joi.number().required(),
|
|
791
783
|
|
|
792
|
-
|
|
784
|
+
cashback: Joi.number().required(),
|
|
793
785
|
|
|
794
|
-
|
|
786
|
+
amount_paid: Joi.number().required(),
|
|
795
787
|
|
|
796
|
-
|
|
788
|
+
fynd_credits: Joi.number().required(),
|
|
797
789
|
|
|
798
|
-
|
|
790
|
+
total_units: Joi.number().required(),
|
|
799
791
|
|
|
800
|
-
|
|
792
|
+
price_effective: Joi.number().required(),
|
|
801
793
|
|
|
802
|
-
|
|
794
|
+
refund_credit: Joi.number().required(),
|
|
803
795
|
|
|
804
|
-
|
|
796
|
+
coupon_value: Joi.number().required(),
|
|
805
797
|
|
|
806
|
-
|
|
798
|
+
gst_tag: Joi.string().allow("").required(),
|
|
807
799
|
|
|
808
|
-
|
|
800
|
+
brand_calculated_amount: Joi.number().required(),
|
|
809
801
|
|
|
810
|
-
|
|
802
|
+
gst_tax_percentage: Joi.number().required(),
|
|
811
803
|
|
|
812
|
-
|
|
804
|
+
amount_paid_roundoff: Joi.number(),
|
|
813
805
|
|
|
814
|
-
|
|
806
|
+
hsn_code: Joi.string().allow("").required(),
|
|
815
807
|
|
|
816
|
-
|
|
808
|
+
delivery_charge: Joi.number().required(),
|
|
817
809
|
|
|
818
|
-
|
|
810
|
+
cashback_applied: Joi.number().required(),
|
|
819
811
|
|
|
820
|
-
|
|
812
|
+
coupon_effective_discount: Joi.number().required(),
|
|
821
813
|
|
|
822
|
-
|
|
814
|
+
tax_collected_at_source: Joi.number(),
|
|
823
815
|
|
|
824
|
-
|
|
816
|
+
identifiers: OrderModel.Identifier().required(),
|
|
825
817
|
|
|
826
|
-
|
|
818
|
+
size: Joi.string().allow("").required(),
|
|
827
819
|
|
|
828
|
-
|
|
820
|
+
discount: Joi.number().required(),
|
|
829
821
|
|
|
830
|
-
|
|
822
|
+
item_name: Joi.string().allow("").required(),
|
|
831
823
|
|
|
832
|
-
|
|
824
|
+
added_to_fynd_cash: Joi.boolean().required(),
|
|
825
|
+
});
|
|
826
|
+
}
|
|
833
827
|
|
|
834
|
-
|
|
828
|
+
static BagGST() {
|
|
829
|
+
return Joi.object({
|
|
830
|
+
gst_tax_percentage: Joi.number(),
|
|
835
831
|
|
|
836
|
-
|
|
832
|
+
is_default_hsn_code: Joi.boolean(),
|
|
837
833
|
|
|
838
|
-
|
|
834
|
+
value_of_good: Joi.number(),
|
|
839
835
|
|
|
840
|
-
|
|
836
|
+
gst_tag: Joi.string().allow(""),
|
|
841
837
|
|
|
842
|
-
|
|
838
|
+
gst_fee: Joi.number(),
|
|
843
839
|
|
|
844
|
-
|
|
840
|
+
brand_calculated_amount: Joi.number(),
|
|
845
841
|
|
|
846
|
-
|
|
842
|
+
gstin_code: Joi.string().allow(""),
|
|
847
843
|
|
|
848
|
-
|
|
844
|
+
hsn_code: Joi.string().allow(""),
|
|
845
|
+
});
|
|
846
|
+
}
|
|
849
847
|
|
|
850
|
-
|
|
848
|
+
static OrderBags() {
|
|
849
|
+
return Joi.object({
|
|
850
|
+
bag_configs: OrderModel.BagConfigs(),
|
|
851
|
+
|
|
852
|
+
article: OrderModel.OrderBagArticle(),
|
|
851
853
|
|
|
852
|
-
|
|
854
|
+
can_cancel: Joi.boolean(),
|
|
853
855
|
|
|
854
|
-
|
|
856
|
+
prices: OrderModel.Prices(),
|
|
855
857
|
|
|
856
|
-
|
|
858
|
+
identifier: Joi.string().allow(""),
|
|
857
859
|
|
|
858
|
-
|
|
860
|
+
can_return: Joi.boolean(),
|
|
859
861
|
|
|
860
|
-
|
|
862
|
+
seller_identifier: Joi.string().allow(""),
|
|
861
863
|
|
|
862
|
-
|
|
864
|
+
applied_promos: Joi.array().items(OrderModel.AppliedPromos()),
|
|
865
|
+
|
|
866
|
+
current_status: OrderModel.CurrentStatus(),
|
|
867
|
+
|
|
868
|
+
brand: OrderModel.OrderBrandName(),
|
|
869
|
+
|
|
870
|
+
quantity: Joi.number(),
|
|
871
|
+
|
|
872
|
+
line_number: Joi.number(),
|
|
873
|
+
|
|
874
|
+
item: OrderModel.PlatformItem(),
|
|
875
|
+
|
|
876
|
+
delivery_address: OrderModel.PlatformDeliveryAddress(),
|
|
877
|
+
|
|
878
|
+
financial_breakup: OrderModel.FinancialBreakup(),
|
|
879
|
+
|
|
880
|
+
gst_details: OrderModel.BagGST(),
|
|
881
|
+
|
|
882
|
+
bag_id: Joi.number().required(),
|
|
883
|
+
|
|
884
|
+
display_name: Joi.string().allow(""),
|
|
885
|
+
|
|
886
|
+
parent_promo_bags: Joi.any(),
|
|
887
|
+
|
|
888
|
+
entity_type: Joi.string().allow(""),
|
|
863
889
|
});
|
|
864
890
|
}
|
|
865
891
|
|
|
866
|
-
static
|
|
892
|
+
static ShipmentStatusData() {
|
|
867
893
|
return Joi.object({
|
|
868
|
-
|
|
894
|
+
status: Joi.string().allow(""),
|
|
869
895
|
|
|
870
|
-
|
|
896
|
+
created_at: Joi.string().allow("").allow(null),
|
|
871
897
|
|
|
872
|
-
|
|
898
|
+
shipment_id: Joi.string().allow(""),
|
|
899
|
+
|
|
900
|
+
id: Joi.number(),
|
|
901
|
+
|
|
902
|
+
bag_list: Joi.array().items(Joi.string().allow("")),
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
static BagStatusHistory() {
|
|
907
|
+
return Joi.object({
|
|
908
|
+
delivery_partner_id: Joi.number().allow(null),
|
|
909
|
+
|
|
910
|
+
updated_at: Joi.string().allow(""),
|
|
911
|
+
|
|
912
|
+
status: Joi.string().allow("").required(),
|
|
913
|
+
|
|
914
|
+
state_id: Joi.number(),
|
|
915
|
+
|
|
916
|
+
bsh_id: Joi.number(),
|
|
917
|
+
|
|
918
|
+
delivery_awb_number: Joi.string().allow("").allow(null),
|
|
919
|
+
|
|
920
|
+
store_id: Joi.number(),
|
|
921
|
+
|
|
922
|
+
display_name: Joi.string().allow(""),
|
|
923
|
+
|
|
924
|
+
bag_id: Joi.number(),
|
|
873
925
|
|
|
926
|
+
kafka_sync: Joi.boolean(),
|
|
927
|
+
|
|
928
|
+
state_type: Joi.string().allow(""),
|
|
929
|
+
|
|
930
|
+
created_at: Joi.string().allow(""),
|
|
931
|
+
|
|
932
|
+
reasons: Joi.array().items(Joi.any()),
|
|
933
|
+
|
|
934
|
+
forward: Joi.boolean().allow(null),
|
|
935
|
+
|
|
936
|
+
app_display_name: Joi.string().allow(""),
|
|
937
|
+
|
|
938
|
+
shipment_id: Joi.string().allow(""),
|
|
939
|
+
|
|
940
|
+
bag_state_mapper: OrderModel.BagStateMapper(),
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
static OrderingStoreDetails() {
|
|
945
|
+
return Joi.object({
|
|
874
946
|
store_name: Joi.string().allow("").required(),
|
|
875
947
|
|
|
948
|
+
address: Joi.string().allow("").required(),
|
|
949
|
+
|
|
876
950
|
pincode: Joi.string().allow("").required(),
|
|
877
951
|
|
|
952
|
+
code: Joi.string().allow("").required(),
|
|
953
|
+
|
|
878
954
|
city: Joi.string().allow("").required(),
|
|
879
955
|
|
|
880
|
-
|
|
956
|
+
state: Joi.string().allow("").required(),
|
|
881
957
|
|
|
882
958
|
meta: Joi.any().required(),
|
|
883
959
|
|
|
960
|
+
ordering_store_id: Joi.number().required(),
|
|
961
|
+
|
|
884
962
|
contact_person: Joi.string().allow("").required(),
|
|
885
963
|
|
|
886
|
-
|
|
964
|
+
phone: Joi.string().allow("").required(),
|
|
887
965
|
|
|
888
966
|
country: Joi.string().allow("").required(),
|
|
889
967
|
});
|
|
890
968
|
}
|
|
891
969
|
|
|
892
|
-
static
|
|
970
|
+
static CompanyDetails() {
|
|
893
971
|
return Joi.object({
|
|
894
|
-
|
|
972
|
+
company_cin: Joi.string().allow(""),
|
|
895
973
|
|
|
896
|
-
|
|
974
|
+
company_id: Joi.number(),
|
|
897
975
|
|
|
898
|
-
|
|
976
|
+
manufacturer_address: Joi.any(),
|
|
899
977
|
|
|
900
|
-
|
|
978
|
+
company_name: Joi.string().allow(""),
|
|
979
|
+
});
|
|
980
|
+
}
|
|
901
981
|
|
|
902
|
-
|
|
982
|
+
static OrderDetailsData() {
|
|
983
|
+
return Joi.object({
|
|
984
|
+
ordering_channel_logo: Joi.any(),
|
|
903
985
|
|
|
904
|
-
|
|
986
|
+
order_value: Joi.string().allow(""),
|
|
905
987
|
|
|
906
|
-
|
|
988
|
+
affiliate_id: Joi.string().allow(""),
|
|
907
989
|
|
|
908
|
-
|
|
990
|
+
cod_charges: Joi.string().allow(""),
|
|
909
991
|
|
|
910
|
-
|
|
992
|
+
source: Joi.string().allow(""),
|
|
911
993
|
|
|
912
|
-
|
|
994
|
+
fynd_order_id: Joi.string().allow("").required(),
|
|
913
995
|
|
|
914
|
-
|
|
996
|
+
order_date: Joi.string().allow(""),
|
|
997
|
+
|
|
998
|
+
tax_details: Joi.any(),
|
|
999
|
+
|
|
1000
|
+
ordering_channel: Joi.string().allow(""),
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
static PlatformShipment() {
|
|
1005
|
+
return Joi.object({
|
|
1006
|
+
priority_text: Joi.string().allow("").allow(null),
|
|
915
1007
|
|
|
916
1008
|
picked_date: Joi.string().allow(""),
|
|
917
1009
|
|
|
918
|
-
|
|
1010
|
+
dp_details: OrderModel.DPDetailsData(),
|
|
919
1011
|
|
|
920
|
-
|
|
1012
|
+
affiliate_details: OrderModel.AffiliateDetails(),
|
|
921
1013
|
|
|
922
|
-
|
|
1014
|
+
fulfilment_priority: Joi.number(),
|
|
923
1015
|
|
|
924
|
-
|
|
1016
|
+
fulfilling_store: OrderModel.FulfillingStore(),
|
|
925
1017
|
|
|
926
|
-
|
|
1018
|
+
total_bags: Joi.number(),
|
|
927
1019
|
|
|
928
|
-
|
|
1020
|
+
operational_status: Joi.string().allow(""),
|
|
929
1021
|
|
|
930
1022
|
delivery_slot: Joi.any(),
|
|
931
1023
|
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
shipment_images: Joi.array().items(Joi.string().allow("")),
|
|
1024
|
+
user: OrderModel.UserDataInfo(),
|
|
935
1025
|
|
|
936
|
-
|
|
1026
|
+
billing_details: OrderModel.UserDetailsData(),
|
|
937
1027
|
|
|
938
|
-
|
|
1028
|
+
lock_status: Joi.boolean(),
|
|
939
1029
|
|
|
940
|
-
|
|
1030
|
+
payment_mode: Joi.string().allow(""),
|
|
941
1031
|
|
|
942
|
-
|
|
1032
|
+
platform_logo: Joi.string().allow(""),
|
|
943
1033
|
|
|
944
|
-
|
|
1034
|
+
prices: OrderModel.Prices(),
|
|
945
1035
|
|
|
946
|
-
|
|
1036
|
+
shipment_quantity: Joi.number(),
|
|
947
1037
|
|
|
948
|
-
|
|
1038
|
+
meta: OrderModel.Meta(),
|
|
949
1039
|
|
|
950
|
-
|
|
1040
|
+
delivery_details: OrderModel.UserDetailsData(),
|
|
951
1041
|
|
|
952
|
-
|
|
1042
|
+
coupon: Joi.any(),
|
|
953
1043
|
|
|
954
|
-
|
|
1044
|
+
invoice_id: Joi.string().allow(""),
|
|
955
1045
|
|
|
956
|
-
|
|
957
|
-
});
|
|
958
|
-
}
|
|
1046
|
+
payments: OrderModel.ShipmentPayments(),
|
|
959
1047
|
|
|
960
|
-
|
|
961
|
-
return Joi.object({
|
|
962
|
-
comment: Joi.string().allow(""),
|
|
1048
|
+
tracking_list: Joi.array().items(OrderModel.TrackingList()),
|
|
963
1049
|
|
|
964
|
-
|
|
1050
|
+
enable_dp_tracking: Joi.boolean(),
|
|
965
1051
|
|
|
966
|
-
|
|
1052
|
+
invoice: OrderModel.InvoiceInfo(),
|
|
967
1053
|
|
|
968
|
-
|
|
1054
|
+
total_items: Joi.number(),
|
|
969
1055
|
|
|
970
|
-
|
|
1056
|
+
custom_meta: Joi.array().items(Joi.any()),
|
|
971
1057
|
|
|
972
|
-
|
|
1058
|
+
shipment_images: Joi.array().items(Joi.string().allow("")),
|
|
973
1059
|
|
|
974
|
-
|
|
1060
|
+
forward_shipment_id: Joi.string().allow(""),
|
|
975
1061
|
|
|
976
|
-
|
|
1062
|
+
packaging_type: Joi.string().allow(""),
|
|
977
1063
|
|
|
978
|
-
|
|
1064
|
+
vertical: Joi.string().allow("").allow(null),
|
|
979
1065
|
|
|
980
|
-
|
|
1066
|
+
bags: Joi.array().items(OrderModel.OrderBags()),
|
|
981
1067
|
|
|
982
|
-
|
|
1068
|
+
status: OrderModel.ShipmentStatusData(),
|
|
983
1069
|
|
|
984
|
-
|
|
1070
|
+
gst_details: OrderModel.GSTDetailsData(),
|
|
985
1071
|
|
|
986
|
-
|
|
1072
|
+
payment_methods: Joi.any(),
|
|
987
1073
|
|
|
988
|
-
|
|
1074
|
+
bag_status_history: Joi.array().items(OrderModel.BagStatusHistory()),
|
|
989
1075
|
|
|
990
|
-
|
|
991
|
-
});
|
|
992
|
-
}
|
|
1076
|
+
ordering_store: OrderModel.OrderingStoreDetails(),
|
|
993
1077
|
|
|
994
|
-
|
|
995
|
-
return Joi.object({
|
|
996
|
-
fynd_order_id: Joi.string().allow("").required(),
|
|
1078
|
+
user_agent: Joi.string().allow(""),
|
|
997
1079
|
|
|
998
|
-
|
|
1080
|
+
company_details: OrderModel.CompanyDetails(),
|
|
999
1081
|
|
|
1000
|
-
|
|
1082
|
+
order: OrderModel.OrderDetailsData(),
|
|
1001
1083
|
|
|
1002
|
-
|
|
1084
|
+
shipment_status: Joi.string().allow(""),
|
|
1003
1085
|
|
|
1004
|
-
|
|
1086
|
+
journey_type: Joi.string().allow(""),
|
|
1005
1087
|
|
|
1006
|
-
|
|
1088
|
+
shipment_id: Joi.string().allow("").required(),
|
|
1007
1089
|
});
|
|
1008
1090
|
}
|
|
1009
1091
|
|
|
1010
|
-
static
|
|
1092
|
+
static ShipmentInfoResponse() {
|
|
1011
1093
|
return Joi.object({
|
|
1012
1094
|
shipments: Joi.array().items(OrderModel.PlatformShipment()),
|
|
1013
1095
|
|
|
1014
1096
|
success: Joi.boolean().required(),
|
|
1015
1097
|
|
|
1016
|
-
|
|
1098
|
+
message: Joi.string().allow(""),
|
|
1017
1099
|
});
|
|
1018
1100
|
}
|
|
1019
1101
|
|
|
1020
|
-
static
|
|
1102
|
+
static TransactionData() {
|
|
1021
1103
|
return Joi.object({
|
|
1022
|
-
|
|
1104
|
+
status: Joi.string().allow(""),
|
|
1023
1105
|
|
|
1024
|
-
|
|
1106
|
+
currency: Joi.string().allow(""),
|
|
1025
1107
|
|
|
1026
|
-
|
|
1108
|
+
amount_paid: Joi.string().allow(""),
|
|
1027
1109
|
|
|
1028
|
-
|
|
1110
|
+
terminal_id: Joi.string().allow(""),
|
|
1029
1111
|
|
|
1030
|
-
|
|
1112
|
+
transaction_id: Joi.string().allow(""),
|
|
1113
|
+
|
|
1114
|
+
payment_id: Joi.string().allow(""),
|
|
1115
|
+
|
|
1116
|
+
entity: Joi.string().allow(""),
|
|
1117
|
+
|
|
1118
|
+
unique_reference_number: Joi.string().allow(""),
|
|
1031
1119
|
});
|
|
1032
1120
|
}
|
|
1033
1121
|
|
|
1034
|
-
static
|
|
1122
|
+
static BillingStaffDetails() {
|
|
1035
1123
|
return Joi.object({
|
|
1036
|
-
|
|
1124
|
+
staff_id: Joi.number(),
|
|
1125
|
+
|
|
1126
|
+
first_name: Joi.string().allow(""),
|
|
1127
|
+
|
|
1128
|
+
last_name: Joi.string().allow(""),
|
|
1129
|
+
|
|
1130
|
+
user: Joi.string().allow(""),
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
static PlatformUserDetails() {
|
|
1135
|
+
return Joi.object({
|
|
1136
|
+
platform_user_first_name: Joi.string().allow(""),
|
|
1137
|
+
|
|
1138
|
+
platform_user_id: Joi.string().allow(""),
|
|
1139
|
+
|
|
1140
|
+
platform_user_last_name: Joi.string().allow(""),
|
|
1141
|
+
});
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
static OrderMeta() {
|
|
1145
|
+
return Joi.object({
|
|
1146
|
+
order_type: Joi.string().allow(""),
|
|
1147
|
+
|
|
1148
|
+
customer_note: Joi.string().allow(""),
|
|
1149
|
+
|
|
1150
|
+
transaction_data: OrderModel.TransactionData(),
|
|
1151
|
+
|
|
1152
|
+
order_tags: Joi.array().items(Joi.any()),
|
|
1153
|
+
|
|
1154
|
+
files: Joi.array().items(Joi.any()),
|
|
1155
|
+
|
|
1156
|
+
cart_id: Joi.number(),
|
|
1157
|
+
|
|
1158
|
+
payment_type: Joi.string().allow(""),
|
|
1159
|
+
|
|
1160
|
+
extra_meta: Joi.any(),
|
|
1161
|
+
|
|
1162
|
+
employee_id: Joi.number(),
|
|
1163
|
+
|
|
1164
|
+
order_child_entities: Joi.array().items(Joi.string().allow("")),
|
|
1165
|
+
|
|
1166
|
+
mongo_cart_id: Joi.number(),
|
|
1167
|
+
|
|
1168
|
+
company_logo: Joi.string().allow(""),
|
|
1169
|
+
|
|
1170
|
+
staff: Joi.any(),
|
|
1171
|
+
|
|
1172
|
+
billing_staff_details: OrderModel.BillingStaffDetails(),
|
|
1173
|
+
|
|
1174
|
+
order_platform: Joi.string().allow(""),
|
|
1175
|
+
|
|
1176
|
+
platform_user_details: OrderModel.PlatformUserDetails(),
|
|
1177
|
+
|
|
1178
|
+
ordering_store: Joi.number(),
|
|
1179
|
+
|
|
1180
|
+
comment: Joi.string().allow(""),
|
|
1181
|
+
|
|
1182
|
+
currency_symbol: Joi.string().allow(""),
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
static TaxDetails() {
|
|
1187
|
+
return Joi.object({
|
|
1188
|
+
pan_no: Joi.string().allow(""),
|
|
1189
|
+
|
|
1190
|
+
gstin: Joi.string().allow(""),
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
static OrderDict() {
|
|
1195
|
+
return Joi.object({
|
|
1196
|
+
payment_methods: Joi.any(),
|
|
1197
|
+
|
|
1198
|
+
prices: OrderModel.Prices(),
|
|
1199
|
+
|
|
1200
|
+
order_date: Joi.string().allow("").required(),
|
|
1201
|
+
|
|
1202
|
+
fynd_order_id: Joi.string().allow("").required(),
|
|
1203
|
+
|
|
1204
|
+
meta: OrderModel.OrderMeta(),
|
|
1205
|
+
|
|
1206
|
+
tax_details: OrderModel.TaxDetails(),
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
static ShipmentDetailsResponse() {
|
|
1211
|
+
return Joi.object({
|
|
1212
|
+
shipments: Joi.array().items(OrderModel.PlatformShipment()),
|
|
1213
|
+
|
|
1214
|
+
success: Joi.boolean().required(),
|
|
1215
|
+
|
|
1216
|
+
order: OrderModel.OrderDict(),
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
static SubLane() {
|
|
1221
|
+
return Joi.object({
|
|
1222
|
+
value: Joi.string().allow(""),
|
|
1223
|
+
|
|
1224
|
+
actions: Joi.array().items(Joi.any()),
|
|
1225
|
+
|
|
1226
|
+
total_items: Joi.number(),
|
|
1227
|
+
|
|
1228
|
+
text: Joi.string().allow(""),
|
|
1229
|
+
|
|
1230
|
+
index: Joi.number(),
|
|
1231
|
+
});
|
|
1232
|
+
}
|
|
1037
1233
|
|
|
1234
|
+
static SuperLane() {
|
|
1235
|
+
return Joi.object({
|
|
1038
1236
|
options: Joi.array().items(OrderModel.SubLane()),
|
|
1039
1237
|
|
|
1040
1238
|
total_items: Joi.number(),
|
|
1041
1239
|
|
|
1042
1240
|
value: Joi.string().allow("").required(),
|
|
1241
|
+
|
|
1242
|
+
text: Joi.string().allow("").required(),
|
|
1043
1243
|
});
|
|
1044
1244
|
}
|
|
1045
1245
|
|
|
@@ -1069,48 +1269,50 @@ class OrderModel {
|
|
|
1069
1269
|
|
|
1070
1270
|
static PlatformChannel() {
|
|
1071
1271
|
return Joi.object({
|
|
1072
|
-
logo: Joi.string().allow(""),
|
|
1073
|
-
|
|
1074
1272
|
name: Joi.string().allow(""),
|
|
1273
|
+
|
|
1274
|
+
logo: Joi.string().allow(""),
|
|
1075
1275
|
});
|
|
1076
1276
|
}
|
|
1077
1277
|
|
|
1078
1278
|
static PlatformBreakupValues() {
|
|
1079
1279
|
return Joi.object({
|
|
1280
|
+
name: Joi.string().allow(""),
|
|
1281
|
+
|
|
1080
1282
|
display: Joi.string().allow(""),
|
|
1081
1283
|
|
|
1082
1284
|
value: Joi.string().allow(""),
|
|
1083
|
-
|
|
1084
|
-
name: Joi.string().allow(""),
|
|
1085
1285
|
});
|
|
1086
1286
|
}
|
|
1087
1287
|
|
|
1088
1288
|
static PlatformOrderItems() {
|
|
1089
1289
|
return Joi.object({
|
|
1090
|
-
|
|
1290
|
+
user_info: OrderModel.UserDataInfo(),
|
|
1091
1291
|
|
|
1092
|
-
|
|
1292
|
+
payment_mode: Joi.string().allow(""),
|
|
1093
1293
|
|
|
1094
|
-
|
|
1294
|
+
order_value: Joi.number(),
|
|
1095
1295
|
|
|
1096
|
-
|
|
1296
|
+
shipments: Joi.array().items(OrderModel.PlatformShipment()),
|
|
1097
1297
|
|
|
1098
1298
|
channel: OrderModel.PlatformChannel(),
|
|
1099
1299
|
|
|
1100
|
-
total_order_value: Joi.number(),
|
|
1101
|
-
|
|
1102
1300
|
order_id: Joi.string().allow(""),
|
|
1103
1301
|
|
|
1302
|
+
meta: Joi.any(),
|
|
1303
|
+
|
|
1104
1304
|
breakup_values: Joi.array().items(OrderModel.PlatformBreakupValues()),
|
|
1105
1305
|
|
|
1106
|
-
|
|
1306
|
+
order_created_time: Joi.string().allow(""),
|
|
1107
1307
|
|
|
1108
|
-
|
|
1308
|
+
total_order_value: Joi.number(),
|
|
1109
1309
|
});
|
|
1110
1310
|
}
|
|
1111
1311
|
|
|
1112
1312
|
static OrderListingResponse() {
|
|
1113
1313
|
return Joi.object({
|
|
1314
|
+
message: Joi.string().allow(""),
|
|
1315
|
+
|
|
1114
1316
|
lane: Joi.string().allow(""),
|
|
1115
1317
|
|
|
1116
1318
|
page: OrderModel.Page(),
|
|
@@ -1119,17 +1321,15 @@ class OrderModel {
|
|
|
1119
1321
|
|
|
1120
1322
|
success: Joi.boolean(),
|
|
1121
1323
|
|
|
1122
|
-
message: Joi.string().allow(""),
|
|
1123
|
-
|
|
1124
1324
|
items: Joi.array().items(OrderModel.PlatformOrderItems()),
|
|
1125
1325
|
});
|
|
1126
1326
|
}
|
|
1127
1327
|
|
|
1128
1328
|
static Options() {
|
|
1129
1329
|
return Joi.object({
|
|
1130
|
-
text: Joi.string().allow(""),
|
|
1131
|
-
|
|
1132
1330
|
value: Joi.number(),
|
|
1331
|
+
|
|
1332
|
+
text: Joi.string().allow(""),
|
|
1133
1333
|
});
|
|
1134
1334
|
}
|
|
1135
1335
|
|
|
@@ -1137,10 +1337,10 @@ class OrderModel {
|
|
|
1137
1337
|
return Joi.object({
|
|
1138
1338
|
options: Joi.array().items(OrderModel.Options()),
|
|
1139
1339
|
|
|
1140
|
-
value: Joi.number().required(),
|
|
1141
|
-
|
|
1142
1340
|
key: Joi.string().allow("").required(),
|
|
1143
1341
|
|
|
1342
|
+
value: Joi.number().required(),
|
|
1343
|
+
|
|
1144
1344
|
text: Joi.string().allow("").required(),
|
|
1145
1345
|
});
|
|
1146
1346
|
}
|
|
@@ -1153,33 +1353,33 @@ class OrderModel {
|
|
|
1153
1353
|
|
|
1154
1354
|
static PlatformTrack() {
|
|
1155
1355
|
return Joi.object({
|
|
1156
|
-
|
|
1356
|
+
updated_at: Joi.string().allow(""),
|
|
1157
1357
|
|
|
1158
|
-
|
|
1358
|
+
status: Joi.string().allow(""),
|
|
1159
1359
|
|
|
1160
|
-
|
|
1360
|
+
raw_status: Joi.string().allow(""),
|
|
1161
1361
|
|
|
1162
|
-
|
|
1362
|
+
shipment_type: Joi.string().allow(""),
|
|
1163
1363
|
|
|
1164
|
-
|
|
1364
|
+
account_name: Joi.string().allow(""),
|
|
1165
1365
|
|
|
1166
|
-
|
|
1366
|
+
awb: Joi.string().allow(""),
|
|
1167
1367
|
|
|
1168
|
-
|
|
1368
|
+
updated_time: Joi.string().allow(""),
|
|
1169
1369
|
|
|
1170
|
-
|
|
1370
|
+
meta: Joi.any(),
|
|
1171
1371
|
|
|
1172
|
-
|
|
1372
|
+
last_location_recieved_at: Joi.string().allow(""),
|
|
1173
1373
|
|
|
1174
|
-
|
|
1374
|
+
reason: Joi.string().allow(""),
|
|
1175
1375
|
});
|
|
1176
1376
|
}
|
|
1177
1377
|
|
|
1178
1378
|
static PlatformShipmentTrack() {
|
|
1179
1379
|
return Joi.object({
|
|
1180
|
-
meta: Joi.any(),
|
|
1181
|
-
|
|
1182
1380
|
results: Joi.array().items(OrderModel.PlatformTrack()),
|
|
1381
|
+
|
|
1382
|
+
meta: Joi.any(),
|
|
1183
1383
|
});
|
|
1184
1384
|
}
|
|
1185
1385
|
|
|
@@ -1191,40 +1391,40 @@ class OrderModel {
|
|
|
1191
1391
|
|
|
1192
1392
|
static Success() {
|
|
1193
1393
|
return Joi.object({
|
|
1194
|
-
message: Joi.string().allow(""),
|
|
1195
|
-
|
|
1196
1394
|
success: Joi.boolean(),
|
|
1395
|
+
|
|
1396
|
+
message: Joi.string().allow(""),
|
|
1197
1397
|
});
|
|
1198
1398
|
}
|
|
1199
1399
|
|
|
1200
1400
|
static OmsReports() {
|
|
1201
1401
|
return Joi.object({
|
|
1202
|
-
request_details: Joi.any(),
|
|
1203
|
-
|
|
1204
|
-
display_name: Joi.string().allow(""),
|
|
1205
|
-
|
|
1206
1402
|
report_id: Joi.string().allow(""),
|
|
1207
1403
|
|
|
1208
1404
|
status: Joi.string().allow(""),
|
|
1209
1405
|
|
|
1210
|
-
s3_key: Joi.string().allow(""),
|
|
1211
|
-
|
|
1212
1406
|
report_name: Joi.string().allow(""),
|
|
1213
1407
|
|
|
1214
1408
|
report_type: Joi.string().allow(""),
|
|
1215
1409
|
|
|
1216
1410
|
report_created_at: Joi.string().allow("").allow(null),
|
|
1217
1411
|
|
|
1412
|
+
request_details: Joi.any(),
|
|
1413
|
+
|
|
1414
|
+
display_name: Joi.string().allow(""),
|
|
1415
|
+
|
|
1218
1416
|
report_requested_at: Joi.string().allow("").allow(null),
|
|
1417
|
+
|
|
1418
|
+
s3_key: Joi.string().allow(""),
|
|
1219
1419
|
});
|
|
1220
1420
|
}
|
|
1221
1421
|
|
|
1222
1422
|
static JioCodeUpsertDataSet() {
|
|
1223
1423
|
return Joi.object({
|
|
1224
|
-
article_id: Joi.string().allow(""),
|
|
1225
|
-
|
|
1226
1424
|
item_id: Joi.string().allow(""),
|
|
1227
1425
|
|
|
1426
|
+
article_id: Joi.string().allow(""),
|
|
1427
|
+
|
|
1228
1428
|
jio_code: Joi.string().allow(""),
|
|
1229
1429
|
|
|
1230
1430
|
company_id: Joi.string().allow(""),
|
|
@@ -1241,163 +1441,163 @@ class OrderModel {
|
|
|
1241
1441
|
return Joi.object({
|
|
1242
1442
|
message: Joi.string().allow(""),
|
|
1243
1443
|
|
|
1244
|
-
type: Joi.string().allow(""),
|
|
1245
|
-
|
|
1246
1444
|
value: Joi.string().allow(""),
|
|
1445
|
+
|
|
1446
|
+
type: Joi.string().allow(""),
|
|
1247
1447
|
});
|
|
1248
1448
|
}
|
|
1249
1449
|
|
|
1250
1450
|
static JioCodeUpsertResponse() {
|
|
1251
1451
|
return Joi.object({
|
|
1452
|
+
error: Joi.array().items(OrderModel.NestedErrorSchemaDataSet()),
|
|
1453
|
+
|
|
1252
1454
|
trace_id: Joi.string().allow(""),
|
|
1253
1455
|
|
|
1456
|
+
data: Joi.array().items(Joi.any()),
|
|
1457
|
+
|
|
1254
1458
|
identifier: Joi.string().allow(""),
|
|
1255
1459
|
|
|
1256
1460
|
success: Joi.boolean(),
|
|
1257
|
-
|
|
1258
|
-
error: Joi.array().items(OrderModel.NestedErrorSchemaDataSet()),
|
|
1259
|
-
|
|
1260
|
-
data: Joi.array().items(Joi.any()),
|
|
1261
1461
|
});
|
|
1262
1462
|
}
|
|
1263
1463
|
|
|
1264
1464
|
static BulkInvoicingResponse() {
|
|
1265
1465
|
return Joi.object({
|
|
1266
|
-
message: Joi.string().allow(""),
|
|
1267
|
-
|
|
1268
1466
|
success: Joi.boolean().required(),
|
|
1467
|
+
|
|
1468
|
+
message: Joi.string().allow(""),
|
|
1269
1469
|
});
|
|
1270
1470
|
}
|
|
1271
1471
|
|
|
1272
1472
|
static BulkInvoiceLabelResponse() {
|
|
1273
1473
|
return Joi.object({
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
store_id: Joi.string().allow(""),
|
|
1277
|
-
|
|
1278
|
-
store_code: Joi.string().allow(""),
|
|
1474
|
+
store_name: Joi.string().allow(""),
|
|
1279
1475
|
|
|
1280
|
-
|
|
1476
|
+
do_invoice_label_generated: Joi.boolean().required(),
|
|
1281
1477
|
|
|
1282
|
-
|
|
1478
|
+
store_id: Joi.string().allow(""),
|
|
1283
1479
|
|
|
1284
|
-
|
|
1480
|
+
label: Joi.any(),
|
|
1285
1481
|
|
|
1286
1482
|
data: Joi.any(),
|
|
1287
1483
|
|
|
1288
1484
|
invoice: Joi.any(),
|
|
1289
1485
|
|
|
1290
|
-
|
|
1486
|
+
batch_id: Joi.string().allow("").required(),
|
|
1291
1487
|
|
|
1292
|
-
|
|
1488
|
+
company_id: Joi.string().allow(""),
|
|
1489
|
+
|
|
1490
|
+
invoice_status: Joi.string().allow(""),
|
|
1491
|
+
|
|
1492
|
+
store_code: Joi.string().allow(""),
|
|
1293
1493
|
});
|
|
1294
1494
|
}
|
|
1295
1495
|
|
|
1296
|
-
static
|
|
1496
|
+
static FileUploadResponse() {
|
|
1297
1497
|
return Joi.object({
|
|
1498
|
+
expiry: Joi.number(),
|
|
1499
|
+
|
|
1298
1500
|
url: Joi.string().allow(""),
|
|
1299
1501
|
});
|
|
1300
1502
|
}
|
|
1301
1503
|
|
|
1302
|
-
static
|
|
1504
|
+
static URL() {
|
|
1303
1505
|
return Joi.object({
|
|
1304
|
-
expiry: Joi.number(),
|
|
1305
|
-
|
|
1306
1506
|
url: Joi.string().allow(""),
|
|
1307
1507
|
});
|
|
1308
1508
|
}
|
|
1309
1509
|
|
|
1310
1510
|
static FileResponse() {
|
|
1311
1511
|
return Joi.object({
|
|
1312
|
-
|
|
1512
|
+
upload: OrderModel.FileUploadResponse(),
|
|
1313
1513
|
|
|
1314
1514
|
method: Joi.string().allow(""),
|
|
1315
1515
|
|
|
1316
|
-
cdn: OrderModel.URL(),
|
|
1317
|
-
|
|
1318
|
-
size: Joi.number(),
|
|
1319
|
-
|
|
1320
|
-
file_path: Joi.string().allow(""),
|
|
1321
|
-
|
|
1322
1516
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1323
1517
|
|
|
1324
|
-
content_type: Joi.string().allow(""),
|
|
1325
|
-
|
|
1326
|
-
upload: OrderModel.FileUploadResponse(),
|
|
1327
|
-
|
|
1328
1518
|
namespace: Joi.string().allow(""),
|
|
1329
1519
|
|
|
1330
1520
|
file_name: Joi.string().allow(""),
|
|
1331
|
-
});
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
static BulkListingPage() {
|
|
1335
|
-
return Joi.object({
|
|
1336
|
-
has_previous: Joi.boolean(),
|
|
1337
1521
|
|
|
1338
1522
|
size: Joi.number(),
|
|
1339
1523
|
|
|
1340
|
-
|
|
1524
|
+
file_path: Joi.string().allow(""),
|
|
1341
1525
|
|
|
1342
|
-
|
|
1526
|
+
cdn: OrderModel.URL(),
|
|
1343
1527
|
|
|
1344
|
-
|
|
1528
|
+
operation: Joi.string().allow(""),
|
|
1345
1529
|
|
|
1346
|
-
|
|
1530
|
+
content_type: Joi.string().allow(""),
|
|
1347
1531
|
});
|
|
1348
1532
|
}
|
|
1349
1533
|
|
|
1350
1534
|
static bulkListingData() {
|
|
1351
1535
|
return Joi.object({
|
|
1352
|
-
batch_id: Joi.string().allow(""),
|
|
1353
|
-
|
|
1354
1536
|
store_id: Joi.number(),
|
|
1355
1537
|
|
|
1356
|
-
|
|
1538
|
+
company_id: Joi.number(),
|
|
1357
1539
|
|
|
1358
|
-
|
|
1540
|
+
processing_shipments: Joi.array().items(Joi.string().allow("")),
|
|
1359
1541
|
|
|
1360
|
-
|
|
1542
|
+
id: Joi.string().allow(""),
|
|
1361
1543
|
|
|
1362
|
-
|
|
1544
|
+
successful_shipments: Joi.array().items(Joi.any()),
|
|
1363
1545
|
|
|
1364
1546
|
excel_url: Joi.string().allow(""),
|
|
1365
1547
|
|
|
1366
|
-
|
|
1548
|
+
user_name: Joi.string().allow(""),
|
|
1367
1549
|
|
|
1368
|
-
|
|
1550
|
+
uploaded_on: Joi.string().allow(""),
|
|
1369
1551
|
|
|
1370
|
-
|
|
1552
|
+
batch_id: Joi.string().allow(""),
|
|
1371
1553
|
|
|
1372
|
-
|
|
1554
|
+
failed: Joi.number(),
|
|
1373
1555
|
|
|
1374
|
-
|
|
1556
|
+
processing: Joi.number(),
|
|
1375
1557
|
|
|
1376
|
-
|
|
1558
|
+
store_name: Joi.string().allow(""),
|
|
1377
1559
|
|
|
1378
|
-
|
|
1560
|
+
successful: Joi.number(),
|
|
1379
1561
|
|
|
1380
|
-
|
|
1562
|
+
total: Joi.number(),
|
|
1563
|
+
|
|
1564
|
+
user_id: Joi.string().allow(""),
|
|
1565
|
+
|
|
1566
|
+
store_code: Joi.string().allow(""),
|
|
1381
1567
|
|
|
1382
1568
|
status: Joi.string().allow(""),
|
|
1383
1569
|
|
|
1384
|
-
|
|
1570
|
+
file_name: Joi.string().allow(""),
|
|
1385
1571
|
|
|
1386
1572
|
failed_shipments: Joi.array().items(Joi.any()),
|
|
1573
|
+
});
|
|
1574
|
+
}
|
|
1387
1575
|
|
|
1388
|
-
|
|
1576
|
+
static BulkListingPage() {
|
|
1577
|
+
return Joi.object({
|
|
1578
|
+
type: Joi.string().allow(""),
|
|
1579
|
+
|
|
1580
|
+
current: Joi.number(),
|
|
1581
|
+
|
|
1582
|
+
total: Joi.number(),
|
|
1583
|
+
|
|
1584
|
+
size: Joi.number(),
|
|
1585
|
+
|
|
1586
|
+
has_previous: Joi.boolean(),
|
|
1587
|
+
|
|
1588
|
+
has_next: Joi.boolean(),
|
|
1389
1589
|
});
|
|
1390
1590
|
}
|
|
1391
1591
|
|
|
1392
1592
|
static BulkListingResponse() {
|
|
1393
1593
|
return Joi.object({
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
page: OrderModel.BulkListingPage(),
|
|
1594
|
+
data: Joi.array().items(OrderModel.bulkListingData()),
|
|
1397
1595
|
|
|
1398
1596
|
success: Joi.boolean(),
|
|
1399
1597
|
|
|
1400
|
-
|
|
1598
|
+
page: OrderModel.BulkListingPage(),
|
|
1599
|
+
|
|
1600
|
+
error: Joi.string().allow(""),
|
|
1401
1601
|
});
|
|
1402
1602
|
}
|
|
1403
1603
|
|
|
@@ -1413,11 +1613,11 @@ class OrderModel {
|
|
|
1413
1613
|
return Joi.object({
|
|
1414
1614
|
display_name: Joi.string().allow(""),
|
|
1415
1615
|
|
|
1416
|
-
qc_type: Joi.array().items(Joi.string().allow("")),
|
|
1417
|
-
|
|
1418
1616
|
question_set: Joi.array().items(OrderModel.QuestionSet()),
|
|
1419
1617
|
|
|
1420
1618
|
id: Joi.number(),
|
|
1619
|
+
|
|
1620
|
+
qc_type: Joi.array().items(Joi.string().allow("")),
|
|
1421
1621
|
});
|
|
1422
1622
|
}
|
|
1423
1623
|
|
|
@@ -1445,17 +1645,17 @@ class OrderModel {
|
|
|
1445
1645
|
|
|
1446
1646
|
static BulkActionDetailsDataField() {
|
|
1447
1647
|
return Joi.object({
|
|
1448
|
-
|
|
1648
|
+
successful_shipments_count: Joi.number(),
|
|
1449
1649
|
|
|
1450
|
-
|
|
1650
|
+
failed_shipments_count: Joi.number(),
|
|
1451
1651
|
|
|
1452
1652
|
successful_shipment_ids: Joi.array().items(Joi.string().allow("")),
|
|
1453
1653
|
|
|
1454
|
-
|
|
1654
|
+
total_shipments_count: Joi.number(),
|
|
1455
1655
|
|
|
1456
|
-
|
|
1656
|
+
batch_id: Joi.string().allow(""),
|
|
1457
1657
|
|
|
1458
|
-
|
|
1658
|
+
company_id: Joi.string().allow(""),
|
|
1459
1659
|
|
|
1460
1660
|
processing_shipments_count: Joi.number(),
|
|
1461
1661
|
});
|
|
@@ -1463,123 +1663,47 @@ class OrderModel {
|
|
|
1463
1663
|
|
|
1464
1664
|
static BulkActionDetailsResponse() {
|
|
1465
1665
|
return Joi.object({
|
|
1466
|
-
failed_records: Joi.array().items(Joi.string().allow("")),
|
|
1467
|
-
|
|
1468
|
-
uploaded_on: Joi.string().allow(""),
|
|
1469
|
-
|
|
1470
|
-
success: Joi.string().allow(""),
|
|
1471
|
-
|
|
1472
|
-
status: Joi.boolean(),
|
|
1473
|
-
|
|
1474
1666
|
error: Joi.array().items(Joi.string().allow("")),
|
|
1475
1667
|
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
user_id: Joi.string().allow(""),
|
|
1668
|
+
status: Joi.boolean(),
|
|
1479
1669
|
|
|
1480
|
-
|
|
1670
|
+
failed_records: Joi.array().items(Joi.string().allow("")),
|
|
1481
1671
|
|
|
1482
1672
|
message: Joi.string().allow(""),
|
|
1483
|
-
});
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
static AffiliateMeta() {
|
|
1487
|
-
return Joi.object({
|
|
1488
|
-
box_type: Joi.string().allow("").allow(null),
|
|
1489
|
-
|
|
1490
|
-
order_item_id: Joi.string().allow(""),
|
|
1491
|
-
|
|
1492
|
-
coupon_code: Joi.string().allow("").allow(null),
|
|
1493
|
-
|
|
1494
|
-
employee_discount: Joi.number(),
|
|
1495
|
-
|
|
1496
|
-
channel_shipment_id: Joi.string().allow("").allow(null),
|
|
1497
|
-
|
|
1498
|
-
is_priority: Joi.boolean(),
|
|
1499
1673
|
|
|
1500
|
-
|
|
1674
|
+
uploaded_by: Joi.string().allow(""),
|
|
1501
1675
|
|
|
1502
|
-
|
|
1676
|
+
data: Joi.array().items(OrderModel.BulkActionDetailsDataField()),
|
|
1503
1677
|
|
|
1504
|
-
|
|
1678
|
+
uploaded_on: Joi.string().allow(""),
|
|
1505
1679
|
|
|
1506
|
-
|
|
1680
|
+
user_id: Joi.string().allow(""),
|
|
1507
1681
|
|
|
1508
|
-
|
|
1682
|
+
success: Joi.string().allow(""),
|
|
1509
1683
|
});
|
|
1510
1684
|
}
|
|
1511
1685
|
|
|
1512
1686
|
static AffiliateBagDetails() {
|
|
1513
1687
|
return Joi.object({
|
|
1514
|
-
affiliate_order_id: Joi.string().allow("").required(),
|
|
1515
|
-
|
|
1516
1688
|
employee_discount: Joi.number(),
|
|
1517
1689
|
|
|
1518
|
-
|
|
1690
|
+
affiliate_order_id: Joi.string().allow("").required(),
|
|
1519
1691
|
|
|
1520
1692
|
affiliate_bag_id: Joi.string().allow("").required(),
|
|
1521
1693
|
|
|
1522
|
-
|
|
1523
|
-
});
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
static BagGSTDetails() {
|
|
1527
|
-
return Joi.object({
|
|
1528
|
-
gst_fee: Joi.number().required(),
|
|
1529
|
-
|
|
1530
|
-
igst_tax_percentage: Joi.number().required(),
|
|
1531
|
-
|
|
1532
|
-
hsn_code_id: Joi.string().allow("").required(),
|
|
1533
|
-
|
|
1534
|
-
cgst_gst_fee: Joi.string().allow("").required(),
|
|
1535
|
-
|
|
1536
|
-
is_default_hsn_code: Joi.boolean(),
|
|
1537
|
-
|
|
1538
|
-
brand_calculated_amount: Joi.number().required(),
|
|
1539
|
-
|
|
1540
|
-
sgst_tax_percentage: Joi.number().required(),
|
|
1541
|
-
|
|
1542
|
-
sgst_gst_fee: Joi.string().allow("").required(),
|
|
1543
|
-
|
|
1544
|
-
igst_gst_fee: Joi.string().allow("").required(),
|
|
1545
|
-
|
|
1546
|
-
gst_tag: Joi.string().allow("").required(),
|
|
1547
|
-
|
|
1548
|
-
gst_tax_percentage: Joi.number().required(),
|
|
1549
|
-
|
|
1550
|
-
tax_collected_at_source: Joi.number().required(),
|
|
1551
|
-
|
|
1552
|
-
cgst_tax_percentage: Joi.number().required(),
|
|
1553
|
-
|
|
1554
|
-
gstin_code: Joi.string().allow("").allow(null),
|
|
1555
|
-
|
|
1556
|
-
hsn_code: Joi.string().allow("").required(),
|
|
1694
|
+
loyalty_discount: Joi.number(),
|
|
1557
1695
|
|
|
1558
|
-
|
|
1696
|
+
affiliate_meta: OrderModel.AffiliateMeta().required(),
|
|
1559
1697
|
});
|
|
1560
1698
|
}
|
|
1561
1699
|
|
|
1562
1700
|
static ReturnConfig() {
|
|
1563
1701
|
return Joi.object({
|
|
1564
|
-
time: Joi.number(),
|
|
1565
|
-
|
|
1566
1702
|
returnable: Joi.boolean(),
|
|
1567
1703
|
|
|
1568
|
-
|
|
1569
|
-
});
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
static Dimensions() {
|
|
1573
|
-
return Joi.object({
|
|
1574
|
-
length: Joi.number(),
|
|
1704
|
+
time: Joi.number(),
|
|
1575
1705
|
|
|
1576
1706
|
unit: Joi.string().allow(""),
|
|
1577
|
-
|
|
1578
|
-
width: Joi.number(),
|
|
1579
|
-
|
|
1580
|
-
height: Joi.number(),
|
|
1581
|
-
|
|
1582
|
-
is_default: Joi.boolean(),
|
|
1583
1707
|
});
|
|
1584
1708
|
}
|
|
1585
1709
|
|
|
@@ -1595,697 +1719,527 @@ class OrderModel {
|
|
|
1595
1719
|
|
|
1596
1720
|
static Article() {
|
|
1597
1721
|
return Joi.object({
|
|
1598
|
-
|
|
1722
|
+
return_config: OrderModel.ReturnConfig(),
|
|
1599
1723
|
|
|
1600
|
-
|
|
1724
|
+
_id: Joi.string().allow("").required(),
|
|
1601
1725
|
|
|
1602
|
-
|
|
1726
|
+
a_set: Joi.any().allow(null),
|
|
1603
1727
|
|
|
1604
|
-
|
|
1728
|
+
uid: Joi.string().allow("").required(),
|
|
1605
1729
|
|
|
1606
|
-
|
|
1730
|
+
is_set: Joi.boolean(),
|
|
1607
1731
|
|
|
1608
|
-
|
|
1732
|
+
child_details: Joi.any().allow(null),
|
|
1609
1733
|
|
|
1610
|
-
|
|
1734
|
+
identifiers: OrderModel.Identifier().required(),
|
|
1611
1735
|
|
|
1612
|
-
|
|
1736
|
+
code: Joi.string().allow(""),
|
|
1613
1737
|
|
|
1614
|
-
|
|
1738
|
+
size: Joi.string().allow("").required(),
|
|
1615
1739
|
|
|
1616
|
-
|
|
1740
|
+
esp_modified: Joi.any(),
|
|
1617
1741
|
|
|
1618
1742
|
weight: OrderModel.Weight(),
|
|
1619
1743
|
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
code: Joi.string().allow(""),
|
|
1744
|
+
seller_identifier: Joi.string().allow("").required(),
|
|
1623
1745
|
|
|
1624
|
-
|
|
1625
|
-
});
|
|
1626
|
-
}
|
|
1746
|
+
dimensions: OrderModel.Dimensions(),
|
|
1627
1747
|
|
|
1628
|
-
|
|
1629
|
-
return Joi.object({
|
|
1630
|
-
status: Joi.any(),
|
|
1748
|
+
raw_meta: Joi.any(),
|
|
1631
1749
|
});
|
|
1632
1750
|
}
|
|
1633
1751
|
|
|
1634
|
-
static
|
|
1752
|
+
static B2BPODetails() {
|
|
1635
1753
|
return Joi.object({
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
acknowledge_date: Joi.string().allow(""),
|
|
1754
|
+
item_base_price: Joi.number(),
|
|
1639
1755
|
|
|
1640
|
-
|
|
1756
|
+
docker_number: Joi.string().allow(""),
|
|
1641
1757
|
|
|
1642
|
-
|
|
1758
|
+
partial_can_ret: Joi.boolean(),
|
|
1643
1759
|
|
|
1644
|
-
|
|
1760
|
+
po_line_amount: Joi.number(),
|
|
1645
1761
|
|
|
1646
|
-
|
|
1762
|
+
total_gst_percentage: Joi.number(),
|
|
1647
1763
|
|
|
1648
|
-
|
|
1764
|
+
po_tax_amount: Joi.number(),
|
|
1649
1765
|
});
|
|
1650
1766
|
}
|
|
1651
1767
|
|
|
1652
|
-
static
|
|
1768
|
+
static BagMeta() {
|
|
1653
1769
|
return Joi.object({
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
credit_note: OrderModel.EInvoice(),
|
|
1770
|
+
b2b_po_details: OrderModel.B2BPODetails(),
|
|
1657
1771
|
});
|
|
1658
1772
|
}
|
|
1659
1773
|
|
|
1660
|
-
static
|
|
1774
|
+
static Dates() {
|
|
1661
1775
|
return Joi.object({
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
locked: Joi.boolean(),
|
|
1776
|
+
delivery_date: Joi.any(),
|
|
1665
1777
|
|
|
1666
|
-
|
|
1778
|
+
order_created: Joi.string().allow(""),
|
|
1667
1779
|
});
|
|
1668
1780
|
}
|
|
1669
1781
|
|
|
1670
|
-
static
|
|
1782
|
+
static Brand() {
|
|
1671
1783
|
return Joi.object({
|
|
1672
|
-
|
|
1784
|
+
created_on: Joi.number(),
|
|
1673
1785
|
|
|
1674
|
-
|
|
1675
|
-
});
|
|
1676
|
-
}
|
|
1786
|
+
script_last_ran: Joi.string().allow("").allow(null),
|
|
1677
1787
|
|
|
1678
|
-
|
|
1679
|
-
return Joi.object({
|
|
1680
|
-
state: Joi.string().allow("").required(),
|
|
1788
|
+
credit_note_allowed: Joi.boolean(),
|
|
1681
1789
|
|
|
1682
|
-
|
|
1790
|
+
start_date: Joi.string().allow("").allow(null),
|
|
1683
1791
|
|
|
1684
|
-
|
|
1792
|
+
pickup_location: Joi.string().allow("").allow(null),
|
|
1685
1793
|
|
|
1686
|
-
|
|
1794
|
+
logo: Joi.string().allow(""),
|
|
1687
1795
|
|
|
1688
|
-
|
|
1796
|
+
is_virtual_invoice: Joi.boolean().allow(null),
|
|
1689
1797
|
|
|
1690
|
-
|
|
1798
|
+
modified_on: Joi.number(),
|
|
1691
1799
|
|
|
1692
|
-
|
|
1693
|
-
});
|
|
1694
|
-
}
|
|
1800
|
+
invoice_prefix: Joi.string().allow("").allow(null),
|
|
1695
1801
|
|
|
1696
|
-
|
|
1697
|
-
return Joi.object({
|
|
1698
|
-
stormbreaker_uuid: Joi.string().allow(""),
|
|
1699
|
-
});
|
|
1700
|
-
}
|
|
1802
|
+
brand_name: Joi.string().allow("").required(),
|
|
1701
1803
|
|
|
1702
|
-
|
|
1703
|
-
return Joi.object({
|
|
1704
|
-
f_min: Joi.string().allow(""),
|
|
1804
|
+
brand_id: Joi.number().required(),
|
|
1705
1805
|
|
|
1706
|
-
|
|
1806
|
+
company: Joi.string().allow("").required(),
|
|
1807
|
+
|
|
1808
|
+
credit_note_expiry_days: Joi.number().allow(null),
|
|
1707
1809
|
});
|
|
1708
1810
|
}
|
|
1709
1811
|
|
|
1710
|
-
static
|
|
1812
|
+
static Attributes() {
|
|
1711
1813
|
return Joi.object({
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
einvoice_info: OrderModel.EinvoiceInfo(),
|
|
1715
|
-
|
|
1716
|
-
return_affiliate_shipment_id: Joi.string().allow(""),
|
|
1717
|
-
|
|
1718
|
-
lock_data: OrderModel.LockData(),
|
|
1719
|
-
|
|
1720
|
-
bag_weight: Joi.any(),
|
|
1721
|
-
|
|
1722
|
-
forward_affiliate_shipment_id: Joi.string().allow(""),
|
|
1723
|
-
|
|
1724
|
-
timestamp: OrderModel.ShipmentTimeStamp(),
|
|
1725
|
-
|
|
1726
|
-
dp_name: Joi.string().allow(""),
|
|
1727
|
-
|
|
1728
|
-
due_date: Joi.string().allow(""),
|
|
1729
|
-
|
|
1730
|
-
forward_affiliate_order_id: Joi.string().allow(""),
|
|
1731
|
-
|
|
1732
|
-
shipment_volumetric_weight: Joi.number(),
|
|
1733
|
-
|
|
1734
|
-
assign_dp_from_sb: Joi.boolean(),
|
|
1735
|
-
|
|
1736
|
-
fulfilment_priority_text: Joi.string().allow("").allow(null),
|
|
1737
|
-
|
|
1738
|
-
auto_trigger_dp_assignment_acf: Joi.boolean().required(),
|
|
1739
|
-
|
|
1740
|
-
weight: Joi.number().required(),
|
|
1741
|
-
|
|
1742
|
-
awb_number: Joi.string().allow(""),
|
|
1743
|
-
|
|
1744
|
-
same_store_available: Joi.boolean().required(),
|
|
1814
|
+
name: Joi.string().allow(""),
|
|
1745
1815
|
|
|
1746
|
-
|
|
1816
|
+
primary_color_hex: Joi.string().allow(""),
|
|
1747
1817
|
|
|
1748
|
-
|
|
1818
|
+
gender: Joi.array().items(Joi.string().allow("")),
|
|
1749
1819
|
|
|
1750
|
-
|
|
1820
|
+
primary_color: Joi.string().allow(""),
|
|
1751
1821
|
|
|
1752
|
-
|
|
1822
|
+
brand_name: Joi.string().allow(""),
|
|
1753
1823
|
|
|
1754
|
-
|
|
1824
|
+
essential: Joi.string().allow(""),
|
|
1755
1825
|
|
|
1756
|
-
|
|
1826
|
+
marketer_address: Joi.string().allow(""),
|
|
1757
1827
|
|
|
1758
|
-
|
|
1828
|
+
primary_material: Joi.string().allow(""),
|
|
1759
1829
|
|
|
1760
|
-
|
|
1830
|
+
marketer_name: Joi.string().allow(""),
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1761
1833
|
|
|
1762
|
-
|
|
1834
|
+
static Item() {
|
|
1835
|
+
return Joi.object({
|
|
1836
|
+
l1_category: Joi.array().items(Joi.string().allow("")),
|
|
1763
1837
|
|
|
1764
|
-
|
|
1838
|
+
color: Joi.string().allow("").allow(null),
|
|
1765
1839
|
|
|
1766
|
-
|
|
1840
|
+
image: Joi.array().items(Joi.string().allow("")).required(),
|
|
1767
1841
|
|
|
1768
|
-
|
|
1842
|
+
l2_category_id: Joi.number(),
|
|
1769
1843
|
|
|
1770
|
-
|
|
1844
|
+
slug_key: Joi.string().allow("").required(),
|
|
1771
1845
|
|
|
1772
|
-
|
|
1846
|
+
l3_category_name: Joi.string().allow(""),
|
|
1773
1847
|
|
|
1774
|
-
|
|
1848
|
+
l2_category: Joi.array().items(Joi.string().allow("")),
|
|
1775
1849
|
|
|
1776
|
-
|
|
1850
|
+
can_cancel: Joi.boolean(),
|
|
1777
1851
|
|
|
1778
|
-
|
|
1852
|
+
last_updated_at: Joi.string().allow(""),
|
|
1779
1853
|
|
|
1780
|
-
|
|
1854
|
+
item_id: Joi.number().required(),
|
|
1781
1855
|
|
|
1782
|
-
|
|
1783
|
-
});
|
|
1784
|
-
}
|
|
1856
|
+
meta: Joi.any(),
|
|
1785
1857
|
|
|
1786
|
-
|
|
1787
|
-
return Joi.object({
|
|
1788
|
-
label_type: Joi.string().allow("").required(),
|
|
1858
|
+
can_return: Joi.boolean(),
|
|
1789
1859
|
|
|
1790
|
-
|
|
1860
|
+
department_id: Joi.number(),
|
|
1791
1861
|
|
|
1792
|
-
|
|
1862
|
+
brand_id: Joi.number().required(),
|
|
1793
1863
|
|
|
1794
|
-
|
|
1864
|
+
name: Joi.string().allow("").required(),
|
|
1795
1865
|
|
|
1796
|
-
|
|
1866
|
+
brand: Joi.string().allow("").required(),
|
|
1797
1867
|
|
|
1798
|
-
|
|
1868
|
+
branch_url: Joi.string().allow("").allow(null),
|
|
1799
1869
|
|
|
1800
|
-
|
|
1870
|
+
code: Joi.string().allow(""),
|
|
1801
1871
|
|
|
1802
|
-
|
|
1872
|
+
gender: Joi.string().allow("").allow(null),
|
|
1803
1873
|
|
|
1804
|
-
|
|
1874
|
+
size: Joi.string().allow("").required(),
|
|
1805
1875
|
|
|
1806
|
-
|
|
1876
|
+
l1_category_id: Joi.number(),
|
|
1807
1877
|
|
|
1808
|
-
|
|
1878
|
+
webstore_product_url: Joi.string().allow("").allow(null),
|
|
1809
1879
|
|
|
1810
|
-
|
|
1880
|
+
l3_category: Joi.number(),
|
|
1811
1881
|
|
|
1812
|
-
|
|
1882
|
+
attributes: OrderModel.Attributes().required(),
|
|
1813
1883
|
});
|
|
1814
1884
|
}
|
|
1815
1885
|
|
|
1816
|
-
static
|
|
1886
|
+
static BagReturnableCancelableStatus() {
|
|
1817
1887
|
return Joi.object({
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
affiliate_id: Joi.string().allow(""),
|
|
1821
|
-
|
|
1822
|
-
affiliate_store_id: Joi.string().allow("").required(),
|
|
1823
|
-
|
|
1824
|
-
shipment_meta: OrderModel.ShipmentMeta().required(),
|
|
1825
|
-
|
|
1826
|
-
company_affiliate_tag: Joi.string().allow(""),
|
|
1827
|
-
|
|
1828
|
-
affiliate_shipment_id: Joi.string().allow("").required(),
|
|
1888
|
+
enable_tracking: Joi.boolean().required(),
|
|
1829
1889
|
|
|
1830
|
-
|
|
1890
|
+
is_customer_return_allowed: Joi.boolean().required(),
|
|
1831
1891
|
|
|
1832
|
-
|
|
1892
|
+
is_active: Joi.boolean().required(),
|
|
1833
1893
|
|
|
1834
|
-
|
|
1894
|
+
is_returnable: Joi.boolean().required(),
|
|
1835
1895
|
|
|
1836
|
-
|
|
1896
|
+
can_be_cancelled: Joi.boolean().required(),
|
|
1837
1897
|
});
|
|
1838
1898
|
}
|
|
1839
1899
|
|
|
1840
|
-
static
|
|
1900
|
+
static BagGSTDetails() {
|
|
1841
1901
|
return Joi.object({
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
address_category: Joi.string().allow("").required(),
|
|
1845
|
-
|
|
1846
|
-
pincode: Joi.number().required(),
|
|
1847
|
-
|
|
1848
|
-
country: Joi.string().allow("").required(),
|
|
1849
|
-
|
|
1850
|
-
phone: Joi.string().allow("").allow(null).required(),
|
|
1851
|
-
|
|
1852
|
-
area: Joi.string().allow(""),
|
|
1853
|
-
|
|
1854
|
-
version: Joi.string().allow(""),
|
|
1902
|
+
hsn_code_id: Joi.string().allow("").required(),
|
|
1855
1903
|
|
|
1856
|
-
|
|
1904
|
+
gst_tax_percentage: Joi.number().required(),
|
|
1857
1905
|
|
|
1858
|
-
|
|
1906
|
+
igst_gst_fee: Joi.string().allow("").required(),
|
|
1859
1907
|
|
|
1860
|
-
|
|
1908
|
+
is_default_hsn_code: Joi.boolean(),
|
|
1861
1909
|
|
|
1862
|
-
|
|
1910
|
+
sgst_tax_percentage: Joi.number().required(),
|
|
1863
1911
|
|
|
1864
|
-
|
|
1912
|
+
value_of_good: Joi.number().required(),
|
|
1865
1913
|
|
|
1866
|
-
|
|
1914
|
+
tax_collected_at_source: Joi.number().required(),
|
|
1867
1915
|
|
|
1868
|
-
|
|
1916
|
+
gst_tag: Joi.string().allow("").required(),
|
|
1869
1917
|
|
|
1870
|
-
|
|
1918
|
+
gst_fee: Joi.number().required(),
|
|
1871
1919
|
|
|
1872
|
-
|
|
1920
|
+
brand_calculated_amount: Joi.number().required(),
|
|
1873
1921
|
|
|
1874
|
-
|
|
1922
|
+
cgst_gst_fee: Joi.string().allow("").required(),
|
|
1875
1923
|
|
|
1876
|
-
|
|
1924
|
+
sgst_gst_fee: Joi.string().allow("").required(),
|
|
1877
1925
|
|
|
1878
|
-
|
|
1879
|
-
});
|
|
1880
|
-
}
|
|
1926
|
+
cgst_tax_percentage: Joi.number().required(),
|
|
1881
1927
|
|
|
1882
|
-
|
|
1883
|
-
return Joi.object({
|
|
1884
|
-
user: Joi.string().allow(""),
|
|
1928
|
+
gstin_code: Joi.string().allow("").allow(null),
|
|
1885
1929
|
|
|
1886
|
-
|
|
1930
|
+
igst_tax_percentage: Joi.number().required(),
|
|
1887
1931
|
|
|
1888
|
-
|
|
1932
|
+
hsn_code: Joi.string().allow("").required(),
|
|
1889
1933
|
});
|
|
1890
1934
|
}
|
|
1891
1935
|
|
|
1892
|
-
static
|
|
1936
|
+
static ArticleDetails() {
|
|
1893
1937
|
return Joi.object({
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
url: Joi.string().allow(""),
|
|
1897
|
-
|
|
1898
|
-
value: Joi.string().allow("").required(),
|
|
1899
|
-
|
|
1900
|
-
verified: Joi.boolean().required(),
|
|
1901
|
-
|
|
1902
|
-
legal_name: Joi.string().allow("").required(),
|
|
1938
|
+
status: Joi.any(),
|
|
1903
1939
|
});
|
|
1904
1940
|
}
|
|
1905
1941
|
|
|
1906
|
-
static
|
|
1942
|
+
static StoreEwaybill() {
|
|
1907
1943
|
return Joi.object({
|
|
1908
|
-
|
|
1944
|
+
enabled: Joi.boolean(),
|
|
1909
1945
|
});
|
|
1910
1946
|
}
|
|
1911
1947
|
|
|
1912
1948
|
static StoreEinvoice() {
|
|
1913
1949
|
return Joi.object({
|
|
1914
|
-
password: Joi.string().allow(""),
|
|
1915
|
-
|
|
1916
1950
|
enabled: Joi.boolean().required(),
|
|
1917
1951
|
|
|
1918
1952
|
username: Joi.string().allow(""),
|
|
1919
1953
|
|
|
1920
|
-
|
|
1921
|
-
});
|
|
1922
|
-
}
|
|
1954
|
+
password: Joi.string().allow(""),
|
|
1923
1955
|
|
|
1924
|
-
|
|
1925
|
-
return Joi.object({
|
|
1926
|
-
enabled: Joi.boolean(),
|
|
1956
|
+
user: Joi.string().allow(""),
|
|
1927
1957
|
});
|
|
1928
1958
|
}
|
|
1929
1959
|
|
|
1930
1960
|
static StoreGstCredentials() {
|
|
1931
1961
|
return Joi.object({
|
|
1932
|
-
e_invoice: OrderModel.StoreEinvoice(),
|
|
1933
|
-
|
|
1934
1962
|
e_waybill: OrderModel.StoreEwaybill(),
|
|
1963
|
+
|
|
1964
|
+
e_invoice: OrderModel.StoreEinvoice(),
|
|
1935
1965
|
});
|
|
1936
1966
|
}
|
|
1937
1967
|
|
|
1938
|
-
static
|
|
1968
|
+
static EInvoicePortalDetails() {
|
|
1939
1969
|
return Joi.object({
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
notification_emails: Joi.array().items(Joi.string().allow("")),
|
|
1943
|
-
|
|
1944
|
-
display_name: Joi.string().allow("").required(),
|
|
1945
|
-
|
|
1946
|
-
additional_contact_details: Joi.any(),
|
|
1947
|
-
|
|
1948
|
-
documents: OrderModel.StoreDocuments(),
|
|
1949
|
-
|
|
1950
|
-
stage: Joi.string().allow("").required(),
|
|
1951
|
-
|
|
1952
|
-
gst_credentials: OrderModel.StoreGstCredentials().required(),
|
|
1953
|
-
|
|
1954
|
-
ewaybill_portal_details: Joi.any(),
|
|
1955
|
-
|
|
1956
|
-
timing: Joi.array().items(Joi.any()),
|
|
1970
|
+
username: Joi.string().allow(""),
|
|
1957
1971
|
|
|
1958
|
-
|
|
1972
|
+
password: Joi.string().allow(""),
|
|
1959
1973
|
|
|
1960
|
-
|
|
1974
|
+
user: Joi.string().allow(""),
|
|
1961
1975
|
});
|
|
1962
1976
|
}
|
|
1963
1977
|
|
|
1964
|
-
static
|
|
1978
|
+
static Document() {
|
|
1965
1979
|
return Joi.object({
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
store_address_json: OrderModel.StoreAddress(),
|
|
1969
|
-
|
|
1970
|
-
order_integration_id: Joi.string().allow(""),
|
|
1971
|
-
|
|
1972
|
-
pincode: Joi.string().allow("").required(),
|
|
1973
|
-
|
|
1974
|
-
parent_store_id: Joi.number(),
|
|
1975
|
-
|
|
1976
|
-
code: Joi.string().allow(""),
|
|
1977
|
-
|
|
1978
|
-
country: Joi.string().allow("").required(),
|
|
1979
|
-
|
|
1980
|
-
login_username: Joi.string().allow("").required(),
|
|
1981
|
-
|
|
1982
|
-
mall_name: Joi.string().allow("").allow(null),
|
|
1983
|
-
|
|
1984
|
-
phone: Joi.number().required(),
|
|
1985
|
-
|
|
1986
|
-
is_archived: Joi.boolean(),
|
|
1987
|
-
|
|
1988
|
-
alohomora_user_id: Joi.number(),
|
|
1989
|
-
|
|
1990
|
-
is_active: Joi.boolean(),
|
|
1991
|
-
|
|
1992
|
-
city: Joi.string().allow("").required(),
|
|
1993
|
-
|
|
1994
|
-
mall_area: Joi.string().allow("").allow(null),
|
|
1995
|
-
|
|
1996
|
-
packaging_material_count: Joi.number(),
|
|
1997
|
-
|
|
1998
|
-
vat_no: Joi.string().allow("").allow(null),
|
|
1999
|
-
|
|
2000
|
-
brand_id: Joi.any(),
|
|
2001
|
-
|
|
2002
|
-
contact_person: Joi.string().allow("").required(),
|
|
2003
|
-
|
|
2004
|
-
created_at: Joi.string().allow("").required(),
|
|
2005
|
-
|
|
2006
|
-
state: Joi.string().allow("").required(),
|
|
2007
|
-
|
|
2008
|
-
is_enabled_for_recon: Joi.boolean(),
|
|
2009
|
-
|
|
2010
|
-
store_email: Joi.string().allow("").required(),
|
|
2011
|
-
|
|
2012
|
-
location_type: Joi.string().allow("").required(),
|
|
2013
|
-
|
|
2014
|
-
longitude: Joi.number().required(),
|
|
2015
|
-
|
|
2016
|
-
latitude: Joi.number().required(),
|
|
2017
|
-
|
|
2018
|
-
meta: OrderModel.StoreMeta().required(),
|
|
2019
|
-
|
|
2020
|
-
address1: Joi.string().allow("").required(),
|
|
2021
|
-
|
|
2022
|
-
address2: Joi.string().allow(""),
|
|
2023
|
-
|
|
2024
|
-
s_id: Joi.string().allow("").required(),
|
|
1980
|
+
ds_type: Joi.string().allow("").required(),
|
|
2025
1981
|
|
|
2026
|
-
|
|
1982
|
+
url: Joi.string().allow(""),
|
|
2027
1983
|
|
|
2028
|
-
|
|
1984
|
+
value: Joi.string().allow("").required(),
|
|
2029
1985
|
|
|
2030
|
-
|
|
1986
|
+
verified: Joi.boolean().required(),
|
|
2031
1987
|
|
|
2032
|
-
|
|
1988
|
+
legal_name: Joi.string().allow("").required(),
|
|
1989
|
+
});
|
|
1990
|
+
}
|
|
2033
1991
|
|
|
2034
|
-
|
|
1992
|
+
static StoreDocuments() {
|
|
1993
|
+
return Joi.object({
|
|
1994
|
+
gst: OrderModel.Document(),
|
|
2035
1995
|
});
|
|
2036
1996
|
}
|
|
2037
1997
|
|
|
2038
|
-
static
|
|
1998
|
+
static StoreMeta() {
|
|
2039
1999
|
return Joi.object({
|
|
2040
|
-
|
|
2000
|
+
gst_credentials: OrderModel.StoreGstCredentials().required(),
|
|
2041
2001
|
|
|
2042
|
-
|
|
2002
|
+
ewaybill_portal_details: Joi.any(),
|
|
2043
2003
|
|
|
2044
|
-
|
|
2004
|
+
additional_contact_details: Joi.any(),
|
|
2045
2005
|
|
|
2046
|
-
|
|
2006
|
+
gst_number: Joi.string().allow(""),
|
|
2047
2007
|
|
|
2048
|
-
|
|
2008
|
+
stage: Joi.string().allow("").required(),
|
|
2049
2009
|
|
|
2050
|
-
|
|
2010
|
+
einvoice_portal_details: OrderModel.EInvoicePortalDetails(),
|
|
2051
2011
|
|
|
2052
|
-
|
|
2012
|
+
notification_emails: Joi.array().items(Joi.string().allow("")),
|
|
2053
2013
|
|
|
2054
|
-
|
|
2014
|
+
documents: OrderModel.StoreDocuments(),
|
|
2055
2015
|
|
|
2056
|
-
|
|
2016
|
+
display_name: Joi.string().allow("").required(),
|
|
2017
|
+
|
|
2018
|
+
product_return_config: Joi.any(),
|
|
2019
|
+
|
|
2020
|
+
timing: Joi.array().items(Joi.any()),
|
|
2057
2021
|
});
|
|
2058
2022
|
}
|
|
2059
2023
|
|
|
2060
|
-
static
|
|
2024
|
+
static StoreAddress() {
|
|
2061
2025
|
return Joi.object({
|
|
2062
|
-
|
|
2026
|
+
latitude: Joi.number().required(),
|
|
2063
2027
|
|
|
2064
|
-
|
|
2028
|
+
state: Joi.string().allow("").required(),
|
|
2065
2029
|
|
|
2066
|
-
|
|
2030
|
+
address2: Joi.string().allow(""),
|
|
2067
2031
|
|
|
2068
|
-
|
|
2032
|
+
created_at: Joi.string().allow("").required(),
|
|
2069
2033
|
|
|
2070
|
-
|
|
2034
|
+
contact_person: Joi.string().allow("").required(),
|
|
2071
2035
|
|
|
2072
|
-
|
|
2036
|
+
address1: Joi.string().allow("").required(),
|
|
2073
2037
|
|
|
2074
|
-
|
|
2038
|
+
country_code: Joi.string().allow("").required(),
|
|
2075
2039
|
|
|
2076
|
-
|
|
2040
|
+
area: Joi.string().allow(""),
|
|
2077
2041
|
|
|
2078
|
-
|
|
2042
|
+
phone: Joi.string().allow("").allow(null).required(),
|
|
2079
2043
|
|
|
2080
|
-
|
|
2044
|
+
version: Joi.string().allow(""),
|
|
2081
2045
|
|
|
2082
|
-
|
|
2046
|
+
updated_at: Joi.string().allow("").required(),
|
|
2083
2047
|
|
|
2084
|
-
|
|
2048
|
+
pincode: Joi.number().required(),
|
|
2085
2049
|
|
|
2086
|
-
|
|
2050
|
+
city: Joi.string().allow("").required(),
|
|
2087
2051
|
|
|
2088
|
-
|
|
2052
|
+
address_type: Joi.string().allow("").required(),
|
|
2089
2053
|
|
|
2090
|
-
|
|
2054
|
+
longitude: Joi.number().required(),
|
|
2091
2055
|
|
|
2092
|
-
|
|
2056
|
+
landmark: Joi.string().allow(""),
|
|
2093
2057
|
|
|
2094
|
-
|
|
2058
|
+
email: Joi.string().allow(""),
|
|
2095
2059
|
|
|
2096
|
-
|
|
2060
|
+
address_category: Joi.string().allow("").required(),
|
|
2097
2061
|
|
|
2098
|
-
|
|
2062
|
+
country: Joi.string().allow("").required(),
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
2099
2065
|
|
|
2100
|
-
|
|
2066
|
+
static Store() {
|
|
2067
|
+
return Joi.object({
|
|
2068
|
+
store_active_from: Joi.string().allow("").allow(null),
|
|
2101
2069
|
|
|
2102
|
-
|
|
2070
|
+
latitude: Joi.number().required(),
|
|
2103
2071
|
|
|
2104
|
-
|
|
2072
|
+
fulfillment_channel: Joi.string().allow("").required(),
|
|
2105
2073
|
|
|
2106
|
-
|
|
2074
|
+
created_at: Joi.string().allow("").required(),
|
|
2107
2075
|
|
|
2108
|
-
|
|
2109
|
-
});
|
|
2110
|
-
}
|
|
2076
|
+
address2: Joi.string().allow(""),
|
|
2111
2077
|
|
|
2112
|
-
|
|
2113
|
-
return Joi.object({
|
|
2114
|
-
po_line_amount: Joi.number(),
|
|
2078
|
+
state: Joi.string().allow("").required(),
|
|
2115
2079
|
|
|
2116
|
-
|
|
2080
|
+
packaging_material_count: Joi.number(),
|
|
2117
2081
|
|
|
2118
|
-
|
|
2082
|
+
contact_person: Joi.string().allow("").required(),
|
|
2119
2083
|
|
|
2120
|
-
|
|
2084
|
+
company_id: Joi.number().required(),
|
|
2121
2085
|
|
|
2122
|
-
|
|
2086
|
+
address1: Joi.string().allow("").required(),
|
|
2123
2087
|
|
|
2124
|
-
|
|
2125
|
-
});
|
|
2126
|
-
}
|
|
2088
|
+
is_enabled_for_recon: Joi.boolean(),
|
|
2127
2089
|
|
|
2128
|
-
|
|
2129
|
-
return Joi.object({
|
|
2130
|
-
b2b_po_details: OrderModel.B2BPODetails(),
|
|
2131
|
-
});
|
|
2132
|
-
}
|
|
2090
|
+
location_type: Joi.string().allow("").required(),
|
|
2133
2091
|
|
|
2134
|
-
|
|
2135
|
-
return Joi.object({
|
|
2136
|
-
delivery_date: Joi.any(),
|
|
2092
|
+
is_active: Joi.boolean(),
|
|
2137
2093
|
|
|
2138
|
-
|
|
2139
|
-
});
|
|
2140
|
-
}
|
|
2094
|
+
parent_store_id: Joi.number(),
|
|
2141
2095
|
|
|
2142
|
-
|
|
2143
|
-
return Joi.object({
|
|
2144
|
-
credit_note_allowed: Joi.boolean(),
|
|
2096
|
+
meta: OrderModel.StoreMeta().required(),
|
|
2145
2097
|
|
|
2146
|
-
|
|
2098
|
+
vat_no: Joi.string().allow("").allow(null),
|
|
2147
2099
|
|
|
2148
|
-
|
|
2100
|
+
phone: Joi.number().required(),
|
|
2149
2101
|
|
|
2150
|
-
|
|
2102
|
+
brand_id: Joi.any(),
|
|
2151
2103
|
|
|
2152
|
-
|
|
2104
|
+
brand_store_tags: Joi.array().items(Joi.string().allow("")),
|
|
2153
2105
|
|
|
2154
|
-
|
|
2106
|
+
mall_area: Joi.string().allow("").allow(null),
|
|
2155
2107
|
|
|
2156
|
-
|
|
2108
|
+
name: Joi.string().allow("").required(),
|
|
2157
2109
|
|
|
2158
|
-
|
|
2110
|
+
updated_at: Joi.string().allow("").allow(null),
|
|
2159
2111
|
|
|
2160
|
-
|
|
2112
|
+
order_integration_id: Joi.string().allow(""),
|
|
2161
2113
|
|
|
2162
|
-
|
|
2114
|
+
pincode: Joi.string().allow("").required(),
|
|
2163
2115
|
|
|
2164
|
-
|
|
2116
|
+
city: Joi.string().allow("").required(),
|
|
2165
2117
|
|
|
2166
|
-
|
|
2118
|
+
is_archived: Joi.boolean(),
|
|
2167
2119
|
|
|
2168
|
-
|
|
2169
|
-
});
|
|
2170
|
-
}
|
|
2120
|
+
login_username: Joi.string().allow("").required(),
|
|
2171
2121
|
|
|
2172
|
-
|
|
2173
|
-
return Joi.object({
|
|
2174
|
-
is_returnable: Joi.boolean().required(),
|
|
2122
|
+
longitude: Joi.number().required(),
|
|
2175
2123
|
|
|
2176
|
-
|
|
2124
|
+
s_id: Joi.string().allow("").required(),
|
|
2177
2125
|
|
|
2178
|
-
|
|
2126
|
+
store_address_json: OrderModel.StoreAddress(),
|
|
2179
2127
|
|
|
2180
|
-
|
|
2128
|
+
mall_name: Joi.string().allow("").allow(null),
|
|
2181
2129
|
|
|
2182
|
-
|
|
2130
|
+
code: Joi.string().allow(""),
|
|
2131
|
+
|
|
2132
|
+
store_email: Joi.string().allow("").required(),
|
|
2133
|
+
|
|
2134
|
+
alohomora_user_id: Joi.number(),
|
|
2135
|
+
|
|
2136
|
+
country: Joi.string().allow("").required(),
|
|
2183
2137
|
});
|
|
2184
2138
|
}
|
|
2185
2139
|
|
|
2186
2140
|
static BagDetailsPlatformResponse() {
|
|
2187
2141
|
return Joi.object({
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
parent_promo_bags: Joi.any(),
|
|
2142
|
+
restore_promos: Joi.any(),
|
|
2191
2143
|
|
|
2192
|
-
|
|
2144
|
+
current_operational_status: OrderModel.BagStatusHistory().required(),
|
|
2193
2145
|
|
|
2194
2146
|
affiliate_bag_details: OrderModel.AffiliateBagDetails().required(),
|
|
2195
2147
|
|
|
2196
|
-
|
|
2148
|
+
affiliate_details: OrderModel.AffiliateDetails(),
|
|
2197
2149
|
|
|
2198
|
-
|
|
2150
|
+
article: OrderModel.Article().required(),
|
|
2199
2151
|
|
|
2200
|
-
|
|
2152
|
+
operational_status: Joi.string().allow(""),
|
|
2201
2153
|
|
|
2202
|
-
|
|
2154
|
+
shipment_id: Joi.string().allow(""),
|
|
2203
2155
|
|
|
2204
|
-
|
|
2156
|
+
prices: OrderModel.Prices().required(),
|
|
2205
2157
|
|
|
2206
|
-
|
|
2158
|
+
b_id: Joi.number().required(),
|
|
2207
2159
|
|
|
2208
|
-
|
|
2160
|
+
original_bag_list: Joi.array().items(Joi.number()),
|
|
2209
2161
|
|
|
2210
|
-
|
|
2162
|
+
reasons: Joi.array().items(Joi.any()),
|
|
2211
2163
|
|
|
2212
|
-
|
|
2164
|
+
bag_status: Joi.array().items(OrderModel.BagStatusHistory()).required(),
|
|
2213
2165
|
|
|
2214
|
-
|
|
2166
|
+
identifier: Joi.string().allow(""),
|
|
2215
2167
|
|
|
2216
|
-
|
|
2168
|
+
meta: OrderModel.BagMeta(),
|
|
2217
2169
|
|
|
2218
|
-
|
|
2170
|
+
qc_required: Joi.any(),
|
|
2219
2171
|
|
|
2220
|
-
|
|
2172
|
+
b_type: Joi.string().allow(""),
|
|
2221
2173
|
|
|
2222
|
-
|
|
2174
|
+
seller_identifier: Joi.string().allow(""),
|
|
2223
2175
|
|
|
2224
|
-
|
|
2176
|
+
applied_promos: Joi.array().items(Joi.any()),
|
|
2225
2177
|
|
|
2226
|
-
|
|
2178
|
+
current_status: OrderModel.BagStatusHistory().required(),
|
|
2227
2179
|
|
|
2228
|
-
|
|
2180
|
+
dates: OrderModel.Dates(),
|
|
2229
2181
|
|
|
2230
|
-
|
|
2182
|
+
order_integration_id: Joi.string().allow("").allow(null),
|
|
2231
2183
|
|
|
2232
|
-
|
|
2184
|
+
restore_coupon: Joi.boolean(),
|
|
2233
2185
|
|
|
2234
|
-
|
|
2186
|
+
brand: OrderModel.Brand().required(),
|
|
2235
2187
|
|
|
2236
|
-
|
|
2237
|
-
.items(OrderModel.FinancialBreakup())
|
|
2238
|
-
.required(),
|
|
2188
|
+
quantity: Joi.number(),
|
|
2239
2189
|
|
|
2240
|
-
|
|
2190
|
+
line_number: Joi.number(),
|
|
2241
2191
|
|
|
2242
2192
|
item: OrderModel.Item().required(),
|
|
2243
2193
|
|
|
2244
|
-
|
|
2194
|
+
no_of_bags_order: Joi.number(),
|
|
2245
2195
|
|
|
2246
|
-
|
|
2196
|
+
financial_breakup: Joi.array()
|
|
2197
|
+
.items(OrderModel.FinancialBreakup())
|
|
2198
|
+
.required(),
|
|
2247
2199
|
|
|
2248
|
-
|
|
2200
|
+
bag_update_time: Joi.number(),
|
|
2249
2201
|
|
|
2250
|
-
|
|
2202
|
+
status: OrderModel.BagReturnableCancelableStatus().required(),
|
|
2251
2203
|
|
|
2252
|
-
|
|
2204
|
+
gst_details: OrderModel.BagGSTDetails().required(),
|
|
2253
2205
|
|
|
2254
|
-
|
|
2206
|
+
article_details: OrderModel.ArticleDetails(),
|
|
2255
2207
|
|
|
2256
|
-
|
|
2208
|
+
bag_status_history: OrderModel.BagStatusHistory(),
|
|
2257
2209
|
|
|
2258
|
-
|
|
2210
|
+
ordering_store: OrderModel.Store(),
|
|
2259
2211
|
|
|
2260
|
-
|
|
2212
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
2261
2213
|
|
|
2262
2214
|
journey_type: Joi.string().allow("").required(),
|
|
2263
2215
|
|
|
2264
|
-
|
|
2216
|
+
display_name: Joi.string().allow(""),
|
|
2265
2217
|
|
|
2266
|
-
|
|
2218
|
+
parent_promo_bags: Joi.any(),
|
|
2219
|
+
|
|
2220
|
+
entity_type: Joi.string().allow(""),
|
|
2267
2221
|
});
|
|
2268
2222
|
}
|
|
2269
2223
|
|
|
2270
2224
|
static ErrorResponse() {
|
|
2271
2225
|
return Joi.object({
|
|
2272
|
-
error: Joi.string().allow("").required(),
|
|
2273
|
-
|
|
2274
2226
|
message: Joi.string().allow("").required(),
|
|
2227
|
+
|
|
2228
|
+
error: Joi.string().allow("").required(),
|
|
2275
2229
|
});
|
|
2276
2230
|
}
|
|
2277
2231
|
|
|
2278
2232
|
static Page1() {
|
|
2279
2233
|
return Joi.object({
|
|
2280
|
-
|
|
2234
|
+
item_total: Joi.number().required(),
|
|
2281
2235
|
|
|
2282
|
-
|
|
2236
|
+
current: Joi.number().required(),
|
|
2283
2237
|
|
|
2284
|
-
|
|
2238
|
+
size: Joi.number().required(),
|
|
2285
2239
|
|
|
2286
|
-
|
|
2240
|
+
page_type: Joi.string().allow("").required(),
|
|
2287
2241
|
|
|
2288
|
-
|
|
2242
|
+
has_next: Joi.boolean().required(),
|
|
2289
2243
|
});
|
|
2290
2244
|
}
|
|
2291
2245
|
|
|
@@ -2307,13 +2261,13 @@ class OrderModel {
|
|
|
2307
2261
|
|
|
2308
2262
|
static InvalidateShipmentCacheNestedResponse() {
|
|
2309
2263
|
return Joi.object({
|
|
2264
|
+
error: Joi.string().allow(""),
|
|
2265
|
+
|
|
2310
2266
|
message: Joi.string().allow(""),
|
|
2311
2267
|
|
|
2312
2268
|
status: Joi.number(),
|
|
2313
2269
|
|
|
2314
2270
|
shipment_id: Joi.string().allow(""),
|
|
2315
|
-
|
|
2316
|
-
error: Joi.string().allow(""),
|
|
2317
2271
|
});
|
|
2318
2272
|
}
|
|
2319
2273
|
|
|
@@ -2337,61 +2291,61 @@ class OrderModel {
|
|
|
2337
2291
|
|
|
2338
2292
|
static StoreReassign() {
|
|
2339
2293
|
return Joi.object({
|
|
2340
|
-
|
|
2294
|
+
bag_id: Joi.number().allow(null),
|
|
2341
2295
|
|
|
2342
|
-
|
|
2296
|
+
affiliate_order_id: Joi.string().allow("").allow(null),
|
|
2343
2297
|
|
|
2344
|
-
|
|
2298
|
+
store_id: Joi.number().required(),
|
|
2345
2299
|
|
|
2346
2300
|
item_id: Joi.string().allow("").allow(null),
|
|
2347
2301
|
|
|
2348
2302
|
reason_ids: Joi.array().items(Joi.number()),
|
|
2349
2303
|
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
bag_id: Joi.number().allow(null),
|
|
2304
|
+
fynd_order_id: Joi.string().allow("").allow(null),
|
|
2353
2305
|
|
|
2354
2306
|
set_id: Joi.string().allow("").allow(null),
|
|
2355
2307
|
|
|
2356
|
-
|
|
2308
|
+
affiliate_bag_id: Joi.string().allow("").allow(null),
|
|
2357
2309
|
|
|
2358
|
-
|
|
2310
|
+
affiliate_id: Joi.string().allow("").allow(null),
|
|
2311
|
+
|
|
2312
|
+
mongo_article_id: Joi.string().allow("").allow(null),
|
|
2359
2313
|
});
|
|
2360
2314
|
}
|
|
2361
2315
|
|
|
2362
2316
|
static StoreReassignResponse() {
|
|
2363
2317
|
return Joi.object({
|
|
2364
|
-
message: Joi.string().allow(""),
|
|
2365
|
-
|
|
2366
2318
|
success: Joi.boolean(),
|
|
2319
|
+
|
|
2320
|
+
message: Joi.string().allow(""),
|
|
2367
2321
|
});
|
|
2368
2322
|
}
|
|
2369
2323
|
|
|
2370
2324
|
static Entities() {
|
|
2371
2325
|
return Joi.object({
|
|
2326
|
+
id: Joi.string().allow(""),
|
|
2327
|
+
|
|
2328
|
+
affiliate_order_id: Joi.string().allow(""),
|
|
2329
|
+
|
|
2372
2330
|
reason_text: Joi.string().allow("").required(),
|
|
2373
2331
|
|
|
2374
2332
|
affiliate_bag_id: Joi.string().allow(""),
|
|
2375
2333
|
|
|
2376
|
-
affiliate_shipment_id: Joi.string().allow(""),
|
|
2377
|
-
|
|
2378
2334
|
affiliate_id: Joi.string().allow(""),
|
|
2379
2335
|
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
affiliate_order_id: Joi.string().allow(""),
|
|
2336
|
+
affiliate_shipment_id: Joi.string().allow(""),
|
|
2383
2337
|
});
|
|
2384
2338
|
}
|
|
2385
2339
|
|
|
2386
2340
|
static UpdateShipmentLockPayload() {
|
|
2387
2341
|
return Joi.object({
|
|
2388
|
-
|
|
2342
|
+
action_type: Joi.string().allow("").required(),
|
|
2389
2343
|
|
|
2390
2344
|
entity_type: Joi.string().allow("").required(),
|
|
2391
2345
|
|
|
2392
2346
|
action: Joi.string().allow("").required(),
|
|
2393
2347
|
|
|
2394
|
-
|
|
2348
|
+
entities: Joi.array().items(OrderModel.Entities()).required(),
|
|
2395
2349
|
});
|
|
2396
2350
|
}
|
|
2397
2351
|
|
|
@@ -2409,65 +2363,65 @@ class OrderModel {
|
|
|
2409
2363
|
|
|
2410
2364
|
static OriginalFilter() {
|
|
2411
2365
|
return Joi.object({
|
|
2412
|
-
affiliate_id: Joi.string().allow(""),
|
|
2413
|
-
|
|
2414
2366
|
affiliate_shipment_id: Joi.string().allow(""),
|
|
2367
|
+
|
|
2368
|
+
affiliate_id: Joi.string().allow(""),
|
|
2415
2369
|
});
|
|
2416
2370
|
}
|
|
2417
2371
|
|
|
2418
2372
|
static CheckResponse() {
|
|
2419
2373
|
return Joi.object({
|
|
2420
|
-
status: Joi.string().allow(""),
|
|
2421
|
-
|
|
2422
|
-
affiliate_shipment_id: Joi.string().allow(""),
|
|
2423
|
-
|
|
2424
2374
|
bags: Joi.array().items(OrderModel.Bags()),
|
|
2425
2375
|
|
|
2426
|
-
affiliate_id: Joi.string().allow(""),
|
|
2427
|
-
|
|
2428
2376
|
original_filter: OrderModel.OriginalFilter(),
|
|
2429
2377
|
|
|
2430
|
-
|
|
2378
|
+
status: Joi.string().allow(""),
|
|
2431
2379
|
|
|
2432
2380
|
is_bag_locked: Joi.boolean(),
|
|
2433
2381
|
|
|
2382
|
+
is_shipment_locked: Joi.boolean(),
|
|
2383
|
+
|
|
2384
|
+
shipment_id: Joi.string().allow(""),
|
|
2385
|
+
|
|
2434
2386
|
lock_status: Joi.boolean().allow(null),
|
|
2435
2387
|
|
|
2436
|
-
|
|
2388
|
+
affiliate_id: Joi.string().allow(""),
|
|
2389
|
+
|
|
2390
|
+
affiliate_shipment_id: Joi.string().allow(""),
|
|
2437
2391
|
});
|
|
2438
2392
|
}
|
|
2439
2393
|
|
|
2440
2394
|
static UpdateShipmentLockResponse() {
|
|
2441
2395
|
return Joi.object({
|
|
2396
|
+
success: Joi.boolean(),
|
|
2397
|
+
|
|
2442
2398
|
message: Joi.string().allow(""),
|
|
2443
2399
|
|
|
2444
2400
|
check_response: Joi.array().items(OrderModel.CheckResponse()),
|
|
2445
|
-
|
|
2446
|
-
success: Joi.boolean(),
|
|
2447
2401
|
});
|
|
2448
2402
|
}
|
|
2449
2403
|
|
|
2450
2404
|
static AnnouncementResponse() {
|
|
2451
2405
|
return Joi.object({
|
|
2452
|
-
|
|
2406
|
+
platform_name: Joi.string().allow(""),
|
|
2453
2407
|
|
|
2454
|
-
|
|
2408
|
+
id: Joi.number().required(),
|
|
2455
2409
|
|
|
2456
|
-
|
|
2410
|
+
from_datetime: Joi.string().allow(""),
|
|
2457
2411
|
|
|
2458
|
-
|
|
2412
|
+
platform_id: Joi.string().allow(""),
|
|
2459
2413
|
|
|
2460
|
-
|
|
2414
|
+
created_at: Joi.string().allow(""),
|
|
2461
2415
|
|
|
2462
|
-
|
|
2416
|
+
company_id: Joi.number(),
|
|
2463
2417
|
|
|
2464
|
-
|
|
2418
|
+
description: Joi.string().allow(""),
|
|
2465
2419
|
|
|
2466
|
-
|
|
2420
|
+
title: Joi.string().allow(""),
|
|
2467
2421
|
|
|
2468
|
-
|
|
2422
|
+
to_datetime: Joi.string().allow(""),
|
|
2469
2423
|
|
|
2470
|
-
|
|
2424
|
+
logo_url: Joi.string().allow(""),
|
|
2471
2425
|
});
|
|
2472
2426
|
}
|
|
2473
2427
|
|
|
@@ -2479,41 +2433,41 @@ class OrderModel {
|
|
|
2479
2433
|
|
|
2480
2434
|
static BaseResponse() {
|
|
2481
2435
|
return Joi.object({
|
|
2482
|
-
message: Joi.string().allow("").required(),
|
|
2483
|
-
|
|
2484
2436
|
success: Joi.boolean().required(),
|
|
2437
|
+
|
|
2438
|
+
message: Joi.string().allow("").required(),
|
|
2485
2439
|
});
|
|
2486
2440
|
}
|
|
2487
2441
|
|
|
2488
2442
|
static Click2CallResponse() {
|
|
2489
2443
|
return Joi.object({
|
|
2490
|
-
status: Joi.boolean().required(),
|
|
2491
|
-
|
|
2492
2444
|
call_id: Joi.string().allow("").required(),
|
|
2445
|
+
|
|
2446
|
+
status: Joi.boolean().required(),
|
|
2493
2447
|
});
|
|
2494
2448
|
}
|
|
2495
2449
|
|
|
2496
2450
|
static EntitiesDataUpdates() {
|
|
2497
2451
|
return Joi.object({
|
|
2498
|
-
filters: Joi.array().items(Joi.any()),
|
|
2499
|
-
|
|
2500
2452
|
data: Joi.any(),
|
|
2453
|
+
|
|
2454
|
+
filters: Joi.array().items(Joi.any()),
|
|
2501
2455
|
});
|
|
2502
2456
|
}
|
|
2503
2457
|
|
|
2504
2458
|
static ProductsDataUpdatesFilters() {
|
|
2505
2459
|
return Joi.object({
|
|
2506
|
-
line_number: Joi.number(),
|
|
2507
|
-
|
|
2508
2460
|
identifier: Joi.string().allow(""),
|
|
2461
|
+
|
|
2462
|
+
line_number: Joi.number(),
|
|
2509
2463
|
});
|
|
2510
2464
|
}
|
|
2511
2465
|
|
|
2512
2466
|
static ProductsDataUpdates() {
|
|
2513
2467
|
return Joi.object({
|
|
2514
|
-
filters: Joi.array().items(OrderModel.ProductsDataUpdatesFilters()),
|
|
2515
|
-
|
|
2516
2468
|
data: Joi.any(),
|
|
2469
|
+
|
|
2470
|
+
filters: Joi.array().items(OrderModel.ProductsDataUpdatesFilters()),
|
|
2517
2471
|
});
|
|
2518
2472
|
}
|
|
2519
2473
|
|
|
@@ -2527,43 +2481,43 @@ class OrderModel {
|
|
|
2527
2481
|
|
|
2528
2482
|
static EntityReasonData() {
|
|
2529
2483
|
return Joi.object({
|
|
2530
|
-
reason_id: Joi.number(),
|
|
2531
|
-
|
|
2532
2484
|
reason_text: Joi.string().allow(""),
|
|
2485
|
+
|
|
2486
|
+
reason_id: Joi.number(),
|
|
2533
2487
|
});
|
|
2534
2488
|
}
|
|
2535
2489
|
|
|
2536
2490
|
static EntitiesReasons() {
|
|
2537
2491
|
return Joi.object({
|
|
2538
|
-
filters: Joi.array().items(Joi.any()),
|
|
2539
|
-
|
|
2540
2492
|
data: OrderModel.EntityReasonData(),
|
|
2493
|
+
|
|
2494
|
+
filters: Joi.array().items(Joi.any()),
|
|
2541
2495
|
});
|
|
2542
2496
|
}
|
|
2543
2497
|
|
|
2544
|
-
static
|
|
2498
|
+
static ProductsReasonsData() {
|
|
2545
2499
|
return Joi.object({
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
identifier: Joi.string().allow(""),
|
|
2500
|
+
reason_text: Joi.string().allow(""),
|
|
2549
2501
|
|
|
2550
|
-
|
|
2502
|
+
reason_id: Joi.number(),
|
|
2551
2503
|
});
|
|
2552
2504
|
}
|
|
2553
2505
|
|
|
2554
|
-
static
|
|
2506
|
+
static ProductsReasonsFilters() {
|
|
2555
2507
|
return Joi.object({
|
|
2556
|
-
|
|
2508
|
+
quantity: Joi.number(),
|
|
2557
2509
|
|
|
2558
|
-
|
|
2510
|
+
identifier: Joi.string().allow(""),
|
|
2511
|
+
|
|
2512
|
+
line_number: Joi.number(),
|
|
2559
2513
|
});
|
|
2560
2514
|
}
|
|
2561
2515
|
|
|
2562
2516
|
static ProductsReasons() {
|
|
2563
2517
|
return Joi.object({
|
|
2564
|
-
filters: Joi.array().items(OrderModel.ProductsReasonsFilters()),
|
|
2565
|
-
|
|
2566
2518
|
data: OrderModel.ProductsReasonsData(),
|
|
2519
|
+
|
|
2520
|
+
filters: Joi.array().items(OrderModel.ProductsReasonsFilters()),
|
|
2567
2521
|
});
|
|
2568
2522
|
}
|
|
2569
2523
|
|
|
@@ -2577,20 +2531,20 @@ class OrderModel {
|
|
|
2577
2531
|
|
|
2578
2532
|
static Products() {
|
|
2579
2533
|
return Joi.object({
|
|
2580
|
-
|
|
2534
|
+
quantity: Joi.number(),
|
|
2581
2535
|
|
|
2582
2536
|
identifier: Joi.string().allow(""),
|
|
2583
2537
|
|
|
2584
|
-
|
|
2538
|
+
line_number: Joi.number(),
|
|
2585
2539
|
});
|
|
2586
2540
|
}
|
|
2587
2541
|
|
|
2588
2542
|
static ShipmentsRequest() {
|
|
2589
2543
|
return Joi.object({
|
|
2590
|
-
data_updates: OrderModel.DataUpdates(),
|
|
2591
|
-
|
|
2592
2544
|
identifier: Joi.string().allow("").required(),
|
|
2593
2545
|
|
|
2546
|
+
data_updates: OrderModel.DataUpdates(),
|
|
2547
|
+
|
|
2594
2548
|
reasons: OrderModel.ReasonsData(),
|
|
2595
2549
|
|
|
2596
2550
|
products: Joi.array().items(OrderModel.Products()),
|
|
@@ -2599,43 +2553,43 @@ class OrderModel {
|
|
|
2599
2553
|
|
|
2600
2554
|
static StatuesRequest() {
|
|
2601
2555
|
return Joi.object({
|
|
2602
|
-
status: Joi.string().allow(""),
|
|
2603
|
-
|
|
2604
2556
|
shipments: Joi.array().items(OrderModel.ShipmentsRequest()),
|
|
2605
2557
|
|
|
2558
|
+
status: Joi.string().allow(""),
|
|
2559
|
+
|
|
2606
2560
|
exclude_bags_next_state: Joi.string().allow(""),
|
|
2607
2561
|
});
|
|
2608
2562
|
}
|
|
2609
2563
|
|
|
2610
2564
|
static UpdateShipmentStatusRequest() {
|
|
2611
2565
|
return Joi.object({
|
|
2612
|
-
|
|
2566
|
+
unlock_before_transition: Joi.boolean(),
|
|
2613
2567
|
|
|
2614
2568
|
force_transition: Joi.boolean(),
|
|
2615
2569
|
|
|
2616
|
-
|
|
2570
|
+
lock_after_transition: Joi.boolean(),
|
|
2617
2571
|
|
|
2618
|
-
|
|
2572
|
+
task: Joi.boolean(),
|
|
2619
2573
|
|
|
2620
|
-
|
|
2574
|
+
statuses: Joi.array().items(OrderModel.StatuesRequest()),
|
|
2621
2575
|
});
|
|
2622
2576
|
}
|
|
2623
2577
|
|
|
2624
2578
|
static ShipmentsResponse() {
|
|
2625
2579
|
return Joi.object({
|
|
2626
|
-
|
|
2580
|
+
meta: Joi.any(),
|
|
2627
2581
|
|
|
2628
|
-
|
|
2582
|
+
code: Joi.string().allow(""),
|
|
2629
2583
|
|
|
2630
|
-
|
|
2584
|
+
stack_trace: Joi.string().allow(""),
|
|
2631
2585
|
|
|
2632
2586
|
identifier: Joi.string().allow(""),
|
|
2633
2587
|
|
|
2634
|
-
|
|
2588
|
+
status: Joi.number(),
|
|
2635
2589
|
|
|
2636
|
-
|
|
2590
|
+
final_state: Joi.any(),
|
|
2637
2591
|
|
|
2638
|
-
|
|
2592
|
+
message: Joi.string().allow(""),
|
|
2639
2593
|
|
|
2640
2594
|
exception: Joi.string().allow(""),
|
|
2641
2595
|
});
|
|
@@ -2653,15 +2607,17 @@ class OrderModel {
|
|
|
2653
2607
|
});
|
|
2654
2608
|
}
|
|
2655
2609
|
|
|
2656
|
-
static
|
|
2610
|
+
static AffiliateStoreIdMapping() {
|
|
2657
2611
|
return Joi.object({
|
|
2658
|
-
|
|
2612
|
+
store_id: Joi.number().required(),
|
|
2613
|
+
|
|
2614
|
+
marketplace_store_id: Joi.string().allow("").required(),
|
|
2659
2615
|
});
|
|
2660
2616
|
}
|
|
2661
2617
|
|
|
2662
|
-
static
|
|
2618
|
+
static AffiliateInventoryOrderConfig() {
|
|
2663
2619
|
return Joi.object({
|
|
2664
|
-
|
|
2620
|
+
force_reassignment: Joi.boolean(),
|
|
2665
2621
|
});
|
|
2666
2622
|
}
|
|
2667
2623
|
|
|
@@ -2673,29 +2629,35 @@ class OrderModel {
|
|
|
2673
2629
|
});
|
|
2674
2630
|
}
|
|
2675
2631
|
|
|
2676
|
-
static
|
|
2632
|
+
static AffiliateInventoryLogisticsConfig() {
|
|
2677
2633
|
return Joi.object({
|
|
2678
|
-
|
|
2634
|
+
dp_assignment: Joi.boolean(),
|
|
2679
2635
|
});
|
|
2680
2636
|
}
|
|
2681
2637
|
|
|
2682
|
-
static
|
|
2638
|
+
static AffiliateInventoryArticleAssignmentConfig() {
|
|
2683
2639
|
return Joi.object({
|
|
2684
|
-
|
|
2640
|
+
post_order_reassignment: Joi.boolean(),
|
|
2641
|
+
});
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
static AffiliateInventoryStoreConfig() {
|
|
2645
|
+
return Joi.object({
|
|
2646
|
+
store: Joi.any(),
|
|
2685
2647
|
});
|
|
2686
2648
|
}
|
|
2687
2649
|
|
|
2688
2650
|
static AffiliateInventoryConfig() {
|
|
2689
2651
|
return Joi.object({
|
|
2690
|
-
|
|
2652
|
+
order: OrderModel.AffiliateInventoryOrderConfig(),
|
|
2653
|
+
|
|
2654
|
+
payment: OrderModel.AffiliateInventoryPaymentConfig(),
|
|
2691
2655
|
|
|
2692
2656
|
logistics: OrderModel.AffiliateInventoryLogisticsConfig(),
|
|
2693
2657
|
|
|
2694
|
-
|
|
2658
|
+
article_assignment: OrderModel.AffiliateInventoryArticleAssignmentConfig(),
|
|
2695
2659
|
|
|
2696
2660
|
inventory: OrderModel.AffiliateInventoryStoreConfig(),
|
|
2697
|
-
|
|
2698
|
-
order: OrderModel.AffiliateInventoryOrderConfig(),
|
|
2699
2661
|
});
|
|
2700
2662
|
}
|
|
2701
2663
|
|
|
@@ -2709,23 +2671,23 @@ class OrderModel {
|
|
|
2709
2671
|
|
|
2710
2672
|
static AffiliateAppConfig() {
|
|
2711
2673
|
return Joi.object({
|
|
2712
|
-
|
|
2674
|
+
owner: Joi.string().allow("").required(),
|
|
2713
2675
|
|
|
2714
2676
|
meta: Joi.array().items(OrderModel.AffiliateAppConfigMeta()),
|
|
2715
2677
|
|
|
2716
|
-
|
|
2678
|
+
id: Joi.string().allow("").required(),
|
|
2717
2679
|
|
|
2718
2680
|
updated_at: Joi.string().allow("").required(),
|
|
2719
2681
|
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
owner: Joi.string().allow("").required(),
|
|
2682
|
+
name: Joi.string().allow("").required(),
|
|
2723
2683
|
|
|
2724
|
-
|
|
2684
|
+
secret: Joi.string().allow("").required(),
|
|
2725
2685
|
|
|
2726
2686
|
token: Joi.string().allow("").required(),
|
|
2727
2687
|
|
|
2728
2688
|
created_at: Joi.string().allow("").required(),
|
|
2689
|
+
|
|
2690
|
+
description: Joi.string().allow(""),
|
|
2729
2691
|
});
|
|
2730
2692
|
}
|
|
2731
2693
|
|
|
@@ -2739,183 +2701,175 @@ class OrderModel {
|
|
|
2739
2701
|
|
|
2740
2702
|
static Affiliate() {
|
|
2741
2703
|
return Joi.object({
|
|
2742
|
-
token: Joi.string().allow("").required(),
|
|
2743
|
-
|
|
2744
|
-
config: OrderModel.AffiliateConfig(),
|
|
2745
|
-
|
|
2746
2704
|
id: Joi.string().allow("").required(),
|
|
2747
|
-
});
|
|
2748
|
-
}
|
|
2749
2705
|
|
|
2750
|
-
|
|
2751
|
-
return Joi.object({
|
|
2752
|
-
store_id: Joi.number().required(),
|
|
2706
|
+
token: Joi.string().allow("").required(),
|
|
2753
2707
|
|
|
2754
|
-
|
|
2708
|
+
config: OrderModel.AffiliateConfig(),
|
|
2755
2709
|
});
|
|
2756
2710
|
}
|
|
2757
2711
|
|
|
2758
2712
|
static OrderConfig() {
|
|
2759
2713
|
return Joi.object({
|
|
2760
|
-
|
|
2714
|
+
affiliate_store_id_mapping: Joi.array()
|
|
2715
|
+
.items(OrderModel.AffiliateStoreIdMapping())
|
|
2716
|
+
.required(),
|
|
2761
2717
|
|
|
2762
2718
|
create_user: Joi.boolean(),
|
|
2763
2719
|
|
|
2764
|
-
bag_end_state: Joi.string().allow(""),
|
|
2765
|
-
|
|
2766
2720
|
store_lookup: Joi.string().allow(""),
|
|
2767
2721
|
|
|
2722
|
+
bag_end_state: Joi.string().allow(""),
|
|
2723
|
+
|
|
2768
2724
|
article_lookup: Joi.string().allow(""),
|
|
2769
2725
|
|
|
2770
|
-
|
|
2771
|
-
.items(OrderModel.AffiliateStoreIdMapping())
|
|
2772
|
-
.required(),
|
|
2726
|
+
affiliate: OrderModel.Affiliate().required(),
|
|
2773
2727
|
});
|
|
2774
2728
|
}
|
|
2775
2729
|
|
|
2776
2730
|
static OrderUser() {
|
|
2777
2731
|
return Joi.object({
|
|
2778
|
-
phone: Joi.number().required(),
|
|
2779
|
-
|
|
2780
2732
|
city: Joi.string().allow("").required(),
|
|
2781
2733
|
|
|
2782
2734
|
state: Joi.string().allow("").required(),
|
|
2783
2735
|
|
|
2784
|
-
|
|
2736
|
+
email: Joi.string().allow("").required(),
|
|
2785
2737
|
|
|
2786
|
-
|
|
2738
|
+
phone: Joi.number().required(),
|
|
2787
2739
|
|
|
2788
|
-
|
|
2740
|
+
mobile: Joi.number().required(),
|
|
2789
2741
|
|
|
2790
2742
|
address1: Joi.string().allow("").allow(null),
|
|
2791
2743
|
|
|
2744
|
+
last_name: Joi.string().allow("").required(),
|
|
2745
|
+
|
|
2792
2746
|
address2: Joi.string().allow("").allow(null),
|
|
2793
2747
|
|
|
2794
2748
|
country: Joi.string().allow("").required(),
|
|
2795
2749
|
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
first_name: Joi.string().allow("").required(),
|
|
2799
|
-
});
|
|
2800
|
-
}
|
|
2801
|
-
|
|
2802
|
-
static UserData() {
|
|
2803
|
-
return Joi.object({
|
|
2804
|
-
billing_user: OrderModel.OrderUser(),
|
|
2805
|
-
|
|
2806
|
-
shipping_user: OrderModel.OrderUser(),
|
|
2807
|
-
});
|
|
2808
|
-
}
|
|
2809
|
-
|
|
2810
|
-
static OrderPriority() {
|
|
2811
|
-
return Joi.object({
|
|
2812
|
-
fulfilment_priority_text: Joi.string().allow(""),
|
|
2813
|
-
|
|
2814
|
-
fulfilment_priority: Joi.number().allow(null),
|
|
2750
|
+
first_name: Joi.string().allow("").required(),
|
|
2815
2751
|
|
|
2816
|
-
|
|
2752
|
+
pincode: Joi.string().allow("").required(),
|
|
2817
2753
|
});
|
|
2818
2754
|
}
|
|
2819
2755
|
|
|
2820
2756
|
static MarketPlacePdf() {
|
|
2821
2757
|
return Joi.object({
|
|
2822
|
-
invoice: Joi.string().allow("").allow(null),
|
|
2823
|
-
|
|
2824
2758
|
label: Joi.string().allow("").allow(null),
|
|
2759
|
+
|
|
2760
|
+
invoice: Joi.string().allow("").allow(null),
|
|
2825
2761
|
});
|
|
2826
2762
|
}
|
|
2827
2763
|
|
|
2828
2764
|
static AffiliateBag() {
|
|
2829
2765
|
return Joi.object({
|
|
2830
|
-
|
|
2766
|
+
unit_price: Joi.number().required(),
|
|
2831
2767
|
|
|
2832
2768
|
store_id: Joi.number().required(),
|
|
2833
2769
|
|
|
2834
|
-
|
|
2770
|
+
delivery_charge: Joi.number().required(),
|
|
2835
2771
|
|
|
2836
|
-
|
|
2772
|
+
pdf_links: OrderModel.MarketPlacePdf(),
|
|
2837
2773
|
|
|
2838
|
-
|
|
2774
|
+
item_size: Joi.string().allow("").required(),
|
|
2839
2775
|
|
|
2840
|
-
|
|
2776
|
+
avl_qty: Joi.number().required(),
|
|
2777
|
+
|
|
2778
|
+
company_id: Joi.number().required(),
|
|
2841
2779
|
|
|
2842
2780
|
amount_paid: Joi.number().required(),
|
|
2843
2781
|
|
|
2844
|
-
|
|
2782
|
+
discount: Joi.number().required(),
|
|
2845
2783
|
|
|
2846
2784
|
price_effective: Joi.number().required(),
|
|
2847
2785
|
|
|
2848
|
-
|
|
2786
|
+
fynd_store_id: Joi.string().allow("").required(),
|
|
2849
2787
|
|
|
2850
|
-
|
|
2788
|
+
sku: Joi.string().allow("").required(),
|
|
2851
2789
|
|
|
2852
|
-
|
|
2790
|
+
price_marked: Joi.number().required(),
|
|
2853
2791
|
|
|
2854
|
-
|
|
2792
|
+
affiliate_meta: Joi.any().required(),
|
|
2855
2793
|
|
|
2856
|
-
|
|
2794
|
+
seller_identifier: Joi.string().allow("").required(),
|
|
2857
2795
|
|
|
2858
|
-
|
|
2796
|
+
affiliate_store_id: Joi.string().allow("").required(),
|
|
2859
2797
|
|
|
2860
|
-
|
|
2798
|
+
quantity: Joi.number().required(),
|
|
2861
2799
|
|
|
2862
|
-
|
|
2800
|
+
item_id: Joi.number().required(),
|
|
2863
2801
|
|
|
2864
|
-
|
|
2802
|
+
identifier: Joi.any().required(),
|
|
2865
2803
|
|
|
2866
|
-
|
|
2804
|
+
modified_on: Joi.string().allow("").required(),
|
|
2805
|
+
|
|
2806
|
+
transfer_price: Joi.number().required(),
|
|
2867
2807
|
|
|
2868
2808
|
hsn_code_id: Joi.string().allow("").required(),
|
|
2869
2809
|
|
|
2870
|
-
|
|
2810
|
+
_id: Joi.string().allow("").required(),
|
|
2811
|
+
});
|
|
2812
|
+
}
|
|
2871
2813
|
|
|
2872
|
-
|
|
2814
|
+
static OrderPriority() {
|
|
2815
|
+
return Joi.object({
|
|
2816
|
+
fulfilment_priority: Joi.number().allow(null),
|
|
2873
2817
|
|
|
2874
|
-
|
|
2818
|
+
fulfilment_priority_text: Joi.string().allow(""),
|
|
2819
|
+
|
|
2820
|
+
affiliate_priority_code: Joi.string().allow("").allow(null),
|
|
2875
2821
|
});
|
|
2876
2822
|
}
|
|
2877
2823
|
|
|
2878
|
-
static
|
|
2824
|
+
static UserData() {
|
|
2879
2825
|
return Joi.object({
|
|
2880
|
-
|
|
2826
|
+
billing_user: OrderModel.OrderUser(),
|
|
2881
2827
|
|
|
2882
|
-
|
|
2828
|
+
shipping_user: OrderModel.OrderUser(),
|
|
2829
|
+
});
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
static ArticleDetails1() {
|
|
2833
|
+
return Joi.object({
|
|
2834
|
+
quantity: Joi.number().required(),
|
|
2883
2835
|
|
|
2884
2836
|
category: Joi.any().required(),
|
|
2885
2837
|
|
|
2886
|
-
|
|
2838
|
+
weight: Joi.any().required(),
|
|
2887
2839
|
|
|
2888
2840
|
dimension: Joi.any().required(),
|
|
2889
2841
|
|
|
2890
|
-
|
|
2842
|
+
brand_id: Joi.number().required(),
|
|
2891
2843
|
|
|
2892
2844
|
_id: Joi.string().allow("").required(),
|
|
2845
|
+
|
|
2846
|
+
attributes: Joi.any().required(),
|
|
2893
2847
|
});
|
|
2894
2848
|
}
|
|
2895
2849
|
|
|
2896
|
-
static
|
|
2850
|
+
static LocationDetails() {
|
|
2897
2851
|
return Joi.object({
|
|
2898
|
-
dp_id: Joi.number().allow(null),
|
|
2899
|
-
|
|
2900
|
-
meta: Joi.any(),
|
|
2901
|
-
|
|
2902
|
-
affiliate_shipment_id: Joi.string().allow("").required(),
|
|
2903
|
-
|
|
2904
|
-
fulfillment_id: Joi.number().required(),
|
|
2905
|
-
|
|
2906
2852
|
articles: Joi.array().items(OrderModel.ArticleDetails1()).required(),
|
|
2907
2853
|
|
|
2908
|
-
|
|
2854
|
+
fulfillment_type: Joi.string().allow("").required(),
|
|
2909
2855
|
|
|
2910
|
-
|
|
2856
|
+
fulfillment_id: Joi.number().required(),
|
|
2911
2857
|
});
|
|
2912
2858
|
}
|
|
2913
2859
|
|
|
2914
|
-
static
|
|
2860
|
+
static ShipmentDetails() {
|
|
2915
2861
|
return Joi.object({
|
|
2862
|
+
meta: Joi.any(),
|
|
2863
|
+
|
|
2916
2864
|
articles: Joi.array().items(OrderModel.ArticleDetails1()).required(),
|
|
2917
2865
|
|
|
2918
|
-
|
|
2866
|
+
box_type: Joi.string().allow("").allow(null),
|
|
2867
|
+
|
|
2868
|
+
shipments: Joi.number().required(),
|
|
2869
|
+
|
|
2870
|
+
dp_id: Joi.number().allow(null),
|
|
2871
|
+
|
|
2872
|
+
affiliate_shipment_id: Joi.string().allow("").required(),
|
|
2919
2873
|
|
|
2920
2874
|
fulfillment_id: Joi.number().required(),
|
|
2921
2875
|
});
|
|
@@ -2923,19 +2877,19 @@ class OrderModel {
|
|
|
2923
2877
|
|
|
2924
2878
|
static ShipmentConfig() {
|
|
2925
2879
|
return Joi.object({
|
|
2926
|
-
|
|
2880
|
+
payment_mode: Joi.string().allow("").required(),
|
|
2927
2881
|
|
|
2928
2882
|
to_pincode: Joi.string().allow("").required(),
|
|
2929
2883
|
|
|
2930
|
-
|
|
2884
|
+
identifier: Joi.string().allow("").required(),
|
|
2931
2885
|
|
|
2932
|
-
|
|
2886
|
+
action: Joi.string().allow("").required(),
|
|
2933
2887
|
|
|
2934
|
-
|
|
2888
|
+
location_details: OrderModel.LocationDetails(),
|
|
2935
2889
|
|
|
2936
2890
|
journey: Joi.string().allow("").required(),
|
|
2937
2891
|
|
|
2938
|
-
|
|
2892
|
+
shipment: Joi.array().items(OrderModel.ShipmentDetails()).required(),
|
|
2939
2893
|
|
|
2940
2894
|
source: Joi.string().allow("").required(),
|
|
2941
2895
|
});
|
|
@@ -2949,35 +2903,35 @@ class OrderModel {
|
|
|
2949
2903
|
|
|
2950
2904
|
static OrderInfo() {
|
|
2951
2905
|
return Joi.object({
|
|
2952
|
-
|
|
2906
|
+
payment_mode: Joi.string().allow("").required(),
|
|
2953
2907
|
|
|
2954
|
-
|
|
2908
|
+
shipping_address: OrderModel.OrderUser().required(),
|
|
2955
2909
|
|
|
2956
|
-
|
|
2910
|
+
affiliate_order_id: Joi.string().allow(""),
|
|
2957
2911
|
|
|
2958
|
-
|
|
2912
|
+
bags: Joi.array().items(OrderModel.AffiliateBag()).required(),
|
|
2959
2913
|
|
|
2960
2914
|
delivery_charges: Joi.number().required(),
|
|
2961
2915
|
|
|
2962
2916
|
order_priority: OrderModel.OrderPriority(),
|
|
2963
2917
|
|
|
2964
|
-
|
|
2918
|
+
items: Joi.any().required(),
|
|
2965
2919
|
|
|
2966
|
-
|
|
2920
|
+
coupon: Joi.string().allow("").allow(null),
|
|
2967
2921
|
|
|
2968
|
-
|
|
2922
|
+
discount: Joi.number().required(),
|
|
2923
|
+
|
|
2924
|
+
payment: Joi.any(),
|
|
2969
2925
|
|
|
2970
2926
|
billing_address: OrderModel.OrderUser().required(),
|
|
2971
2927
|
|
|
2972
|
-
|
|
2928
|
+
user: OrderModel.UserData().required(),
|
|
2973
2929
|
|
|
2974
|
-
|
|
2930
|
+
shipment: OrderModel.ShipmentData(),
|
|
2975
2931
|
|
|
2976
|
-
|
|
2932
|
+
cod_charges: Joi.number().required(),
|
|
2977
2933
|
|
|
2978
2934
|
order_value: Joi.number().required(),
|
|
2979
|
-
|
|
2980
|
-
affiliate_order_id: Joi.string().allow(""),
|
|
2981
2935
|
});
|
|
2982
2936
|
}
|
|
2983
2937
|
|
|
@@ -3005,18 +2959,18 @@ class OrderModel {
|
|
|
3005
2959
|
|
|
3006
2960
|
static SuccessResponse() {
|
|
3007
2961
|
return Joi.object({
|
|
3008
|
-
message: Joi.string().allow(""),
|
|
3009
|
-
|
|
3010
2962
|
success: Joi.boolean(),
|
|
2963
|
+
|
|
2964
|
+
message: Joi.string().allow(""),
|
|
3011
2965
|
});
|
|
3012
2966
|
}
|
|
3013
2967
|
|
|
3014
2968
|
static ActionInfo() {
|
|
3015
2969
|
return Joi.object({
|
|
3016
|
-
display_text: Joi.string().allow("").required(),
|
|
3017
|
-
|
|
3018
2970
|
id: Joi.number().required(),
|
|
3019
2971
|
|
|
2972
|
+
display_text: Joi.string().allow("").required(),
|
|
2973
|
+
|
|
3020
2974
|
slug: Joi.string().allow("").required(),
|
|
3021
2975
|
|
|
3022
2976
|
description: Joi.string().allow("").required(),
|
|
@@ -3031,61 +2985,99 @@ class OrderModel {
|
|
|
3031
2985
|
|
|
3032
2986
|
static HistoryDict() {
|
|
3033
2987
|
return Joi.object({
|
|
3034
|
-
|
|
2988
|
+
type: Joi.string().allow("").required(),
|
|
2989
|
+
|
|
2990
|
+
l3_detail: Joi.string().allow(""),
|
|
3035
2991
|
|
|
3036
2992
|
ticket_url: Joi.string().allow(""),
|
|
3037
2993
|
|
|
2994
|
+
bag_id: Joi.number(),
|
|
2995
|
+
|
|
2996
|
+
l1_detail: Joi.string().allow(""),
|
|
2997
|
+
|
|
3038
2998
|
user: Joi.string().allow("").required(),
|
|
3039
2999
|
|
|
3040
|
-
|
|
3000
|
+
ticket_id: Joi.string().allow(""),
|
|
3041
3001
|
|
|
3042
3002
|
createdat: Joi.string().allow("").required(),
|
|
3043
3003
|
|
|
3044
|
-
|
|
3004
|
+
message: Joi.string().allow("").required(),
|
|
3045
3005
|
|
|
3046
3006
|
l2_detail: Joi.string().allow(""),
|
|
3007
|
+
});
|
|
3008
|
+
}
|
|
3047
3009
|
|
|
3048
|
-
|
|
3010
|
+
static ShipmentHistoryResponse() {
|
|
3011
|
+
return Joi.object({
|
|
3012
|
+
activity_history: Joi.array().items(OrderModel.HistoryDict()).required(),
|
|
3013
|
+
});
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
static ErrorDetail() {
|
|
3017
|
+
return Joi.object({
|
|
3018
|
+
success: Joi.boolean(),
|
|
3019
|
+
|
|
3020
|
+
message: Joi.string().allow(""),
|
|
3021
|
+
});
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
static PostHistoryData() {
|
|
3025
|
+
return Joi.object({
|
|
3026
|
+
user_name: Joi.string().allow("").required(),
|
|
3049
3027
|
|
|
3050
3028
|
message: Joi.string().allow("").required(),
|
|
3029
|
+
});
|
|
3030
|
+
}
|
|
3051
3031
|
|
|
3052
|
-
|
|
3032
|
+
static PostHistoryFilters() {
|
|
3033
|
+
return Joi.object({
|
|
3034
|
+
shipment_id: Joi.string().allow("").required(),
|
|
3035
|
+
|
|
3036
|
+
line_number: Joi.string().allow(""),
|
|
3037
|
+
|
|
3038
|
+
identifier: Joi.string().allow(""),
|
|
3053
3039
|
});
|
|
3054
3040
|
}
|
|
3055
3041
|
|
|
3056
|
-
static
|
|
3042
|
+
static PostActivityHistory() {
|
|
3057
3043
|
return Joi.object({
|
|
3058
|
-
|
|
3044
|
+
data: OrderModel.PostHistoryData().required(),
|
|
3045
|
+
|
|
3046
|
+
filters: Joi.array().items(OrderModel.PostHistoryFilters()).required(),
|
|
3059
3047
|
});
|
|
3060
3048
|
}
|
|
3061
3049
|
|
|
3062
|
-
static
|
|
3050
|
+
static PostHistoryDict() {
|
|
3063
3051
|
return Joi.object({
|
|
3064
|
-
|
|
3052
|
+
activity_history: OrderModel.PostActivityHistory().required(),
|
|
3053
|
+
});
|
|
3054
|
+
}
|
|
3065
3055
|
|
|
3066
|
-
|
|
3056
|
+
static PostShipmentHistory() {
|
|
3057
|
+
return Joi.object({
|
|
3058
|
+
activity_history: Joi.array().items(OrderModel.PostHistoryDict()),
|
|
3067
3059
|
});
|
|
3068
3060
|
}
|
|
3069
3061
|
|
|
3070
3062
|
static SmsDataPayload() {
|
|
3071
3063
|
return Joi.object({
|
|
3072
|
-
order_id: Joi.string().allow("").required(),
|
|
3073
|
-
|
|
3074
3064
|
customer_name: Joi.string().allow("").required(),
|
|
3075
3065
|
|
|
3076
|
-
|
|
3066
|
+
country_code: Joi.string().allow("").required(),
|
|
3077
3067
|
|
|
3078
3068
|
payment_mode: Joi.string().allow("").required(),
|
|
3079
3069
|
|
|
3070
|
+
amount_paid: Joi.number().required(),
|
|
3071
|
+
|
|
3072
|
+
phone_number: Joi.number().required(),
|
|
3073
|
+
|
|
3080
3074
|
shipment_id: Joi.number().required(),
|
|
3081
3075
|
|
|
3082
3076
|
brand_name: Joi.string().allow("").required(),
|
|
3083
3077
|
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
amount_paid: Joi.number().required(),
|
|
3078
|
+
order_id: Joi.string().allow("").required(),
|
|
3087
3079
|
|
|
3088
|
-
|
|
3080
|
+
message: Joi.string().allow("").required(),
|
|
3089
3081
|
});
|
|
3090
3082
|
}
|
|
3091
3083
|
|
|
@@ -3099,15 +3091,7 @@ class OrderModel {
|
|
|
3099
3091
|
});
|
|
3100
3092
|
}
|
|
3101
3093
|
|
|
3102
|
-
static
|
|
3103
|
-
return Joi.object({
|
|
3104
|
-
created_at: Joi.string().allow(""),
|
|
3105
|
-
|
|
3106
|
-
fynd_order_id: Joi.string().allow(""),
|
|
3107
|
-
});
|
|
3108
|
-
}
|
|
3109
|
-
|
|
3110
|
-
static Meta() {
|
|
3094
|
+
static Meta1() {
|
|
3111
3095
|
return Joi.object({
|
|
3112
3096
|
state_manager_used: Joi.string().allow(""),
|
|
3113
3097
|
|
|
@@ -3117,265 +3101,273 @@ class OrderModel {
|
|
|
3117
3101
|
|
|
3118
3102
|
static ShipmentDetail() {
|
|
3119
3103
|
return Joi.object({
|
|
3120
|
-
|
|
3104
|
+
meta: OrderModel.Meta1().required(),
|
|
3105
|
+
|
|
3106
|
+
id: Joi.number().required(),
|
|
3121
3107
|
|
|
3122
3108
|
status: Joi.string().allow(""),
|
|
3123
3109
|
|
|
3124
|
-
|
|
3110
|
+
bag_list: Joi.array().items(Joi.number()),
|
|
3111
|
+
|
|
3112
|
+
shipment_id: Joi.string().allow(""),
|
|
3125
3113
|
|
|
3126
3114
|
remarks: Joi.string().allow(""),
|
|
3115
|
+
});
|
|
3116
|
+
}
|
|
3127
3117
|
|
|
3128
|
-
|
|
3118
|
+
static OrderDetails() {
|
|
3119
|
+
return Joi.object({
|
|
3120
|
+
fynd_order_id: Joi.string().allow(""),
|
|
3129
3121
|
|
|
3130
|
-
|
|
3122
|
+
created_at: Joi.string().allow(""),
|
|
3131
3123
|
});
|
|
3132
3124
|
}
|
|
3133
3125
|
|
|
3134
3126
|
static OrderStatusData() {
|
|
3135
3127
|
return Joi.object({
|
|
3128
|
+
shipment_details: Joi.array().items(OrderModel.ShipmentDetail()),
|
|
3129
|
+
|
|
3136
3130
|
order_details: OrderModel.OrderDetails().required(),
|
|
3137
3131
|
|
|
3138
3132
|
errors: Joi.array().items(Joi.string().allow("")),
|
|
3139
|
-
|
|
3140
|
-
shipment_details: Joi.array().items(OrderModel.ShipmentDetail()),
|
|
3141
3133
|
});
|
|
3142
3134
|
}
|
|
3143
3135
|
|
|
3144
3136
|
static OrderStatusResult() {
|
|
3145
3137
|
return Joi.object({
|
|
3146
|
-
result: Joi.array().items(OrderModel.OrderStatusData()),
|
|
3147
|
-
|
|
3148
3138
|
success: Joi.string().allow("").required(),
|
|
3139
|
+
|
|
3140
|
+
result: Joi.array().items(OrderModel.OrderStatusData()),
|
|
3149
3141
|
});
|
|
3150
3142
|
}
|
|
3151
3143
|
|
|
3152
3144
|
static ManualAssignDPToShipment() {
|
|
3153
3145
|
return Joi.object({
|
|
3154
|
-
|
|
3146
|
+
shipment_ids: Joi.array().items(Joi.string().allow("")),
|
|
3155
3147
|
|
|
3156
3148
|
dp_id: Joi.number().required(),
|
|
3157
3149
|
|
|
3158
|
-
shipment_ids: Joi.array().items(Joi.string().allow("")),
|
|
3159
|
-
|
|
3160
3150
|
order_type: Joi.string().allow("").required(),
|
|
3151
|
+
|
|
3152
|
+
qc_required: Joi.string().allow("").required(),
|
|
3153
|
+
});
|
|
3154
|
+
}
|
|
3155
|
+
|
|
3156
|
+
static ManualAssignDPToShipmentResponse() {
|
|
3157
|
+
return Joi.object({
|
|
3158
|
+
success: Joi.string().allow("").required(),
|
|
3159
|
+
|
|
3160
|
+
errors: Joi.array().items(Joi.string().allow("")),
|
|
3161
3161
|
});
|
|
3162
3162
|
}
|
|
3163
3163
|
|
|
3164
|
-
static
|
|
3165
|
-
return Joi.object({
|
|
3166
|
-
|
|
3164
|
+
static PaymentMethod() {
|
|
3165
|
+
return Joi.object({
|
|
3166
|
+
meta: Joi.any(),
|
|
3167
|
+
|
|
3168
|
+
name: Joi.string().allow("").required(),
|
|
3169
|
+
|
|
3170
|
+
refund_by: Joi.string().allow("").required(),
|
|
3171
|
+
|
|
3172
|
+
mode: Joi.string().allow("").required(),
|
|
3173
|
+
|
|
3174
|
+
transaction_data: Joi.any(),
|
|
3167
3175
|
|
|
3168
|
-
|
|
3176
|
+
collect_by: Joi.string().allow("").required(),
|
|
3177
|
+
|
|
3178
|
+
amount: Joi.number().required(),
|
|
3169
3179
|
});
|
|
3170
3180
|
}
|
|
3171
3181
|
|
|
3172
|
-
static
|
|
3182
|
+
static PaymentInfo() {
|
|
3173
3183
|
return Joi.object({
|
|
3174
|
-
|
|
3184
|
+
payment_methods: Joi.array().items(OrderModel.PaymentMethod()),
|
|
3175
3185
|
|
|
3176
|
-
|
|
3186
|
+
primary_mode: Joi.string().allow("").required(),
|
|
3177
3187
|
});
|
|
3178
3188
|
}
|
|
3179
3189
|
|
|
3180
3190
|
static ShippingInfo() {
|
|
3181
3191
|
return Joi.object({
|
|
3182
|
-
|
|
3192
|
+
state_code: Joi.string().allow(""),
|
|
3183
3193
|
|
|
3184
3194
|
alternate_email: Joi.string().allow(""),
|
|
3185
3195
|
|
|
3186
|
-
|
|
3196
|
+
last_name: Joi.string().allow(""),
|
|
3187
3197
|
|
|
3188
|
-
|
|
3198
|
+
alternate_mobile_number: Joi.string().allow(""),
|
|
3189
3199
|
|
|
3190
|
-
|
|
3200
|
+
primary_mobile_number: Joi.string().allow("").required(),
|
|
3191
3201
|
|
|
3192
|
-
|
|
3202
|
+
customer_code: Joi.string().allow(""),
|
|
3193
3203
|
|
|
3194
|
-
|
|
3204
|
+
floor_no: Joi.string().allow(""),
|
|
3195
3205
|
|
|
3196
|
-
|
|
3206
|
+
address1: Joi.string().allow("").required(),
|
|
3197
3207
|
|
|
3198
|
-
|
|
3208
|
+
slot: Joi.array().items(Joi.any()),
|
|
3199
3209
|
|
|
3200
|
-
|
|
3210
|
+
geo_location: Joi.any(),
|
|
3201
3211
|
|
|
3202
|
-
|
|
3212
|
+
landmark: Joi.string().allow(""),
|
|
3203
3213
|
|
|
3204
|
-
|
|
3214
|
+
city: Joi.string().allow("").required(),
|
|
3205
3215
|
|
|
3206
|
-
|
|
3216
|
+
state: Joi.string().allow("").required(),
|
|
3207
3217
|
|
|
3208
|
-
|
|
3218
|
+
primary_email: Joi.string().allow("").required(),
|
|
3209
3219
|
|
|
3210
|
-
|
|
3220
|
+
address_type: Joi.string().allow(""),
|
|
3211
3221
|
|
|
3212
|
-
|
|
3222
|
+
gender: Joi.string().allow(""),
|
|
3213
3223
|
|
|
3214
|
-
|
|
3224
|
+
address2: Joi.string().allow(""),
|
|
3215
3225
|
|
|
3216
|
-
|
|
3226
|
+
country: Joi.string().allow("").required(),
|
|
3217
3227
|
|
|
3218
|
-
|
|
3228
|
+
first_name: Joi.string().allow("").required(),
|
|
3219
3229
|
|
|
3220
|
-
|
|
3230
|
+
house_no: Joi.string().allow(""),
|
|
3221
3231
|
|
|
3222
|
-
|
|
3232
|
+
external_customer_code: Joi.string().allow(""),
|
|
3223
3233
|
|
|
3224
|
-
|
|
3234
|
+
middle_name: Joi.string().allow(""),
|
|
3225
3235
|
|
|
3226
|
-
|
|
3236
|
+
pincode: Joi.string().allow("").required(),
|
|
3227
3237
|
|
|
3228
|
-
|
|
3238
|
+
country_code: Joi.string().allow(""),
|
|
3229
3239
|
|
|
3230
|
-
|
|
3240
|
+
title: Joi.string().allow(""),
|
|
3231
3241
|
|
|
3232
|
-
|
|
3242
|
+
shipping_type: Joi.string().allow(""),
|
|
3233
3243
|
});
|
|
3234
3244
|
}
|
|
3235
3245
|
|
|
3236
3246
|
static Tax() {
|
|
3237
3247
|
return Joi.object({
|
|
3238
|
-
rate: Joi.number().required(),
|
|
3239
|
-
|
|
3240
|
-
name: Joi.string().allow("").required(),
|
|
3241
|
-
|
|
3242
3248
|
breakup: Joi.array().items(Joi.any()),
|
|
3243
3249
|
|
|
3250
|
+
rate: Joi.number().required(),
|
|
3251
|
+
|
|
3244
3252
|
amount: Joi.any().required(),
|
|
3253
|
+
|
|
3254
|
+
name: Joi.string().allow("").required(),
|
|
3245
3255
|
});
|
|
3246
3256
|
}
|
|
3247
3257
|
|
|
3248
3258
|
static Charge() {
|
|
3249
3259
|
return Joi.object({
|
|
3250
|
-
tax: OrderModel.Tax(),
|
|
3251
|
-
|
|
3252
3260
|
type: Joi.string().allow("").required(),
|
|
3253
3261
|
|
|
3262
|
+
code: Joi.string().allow(""),
|
|
3263
|
+
|
|
3264
|
+
tax: OrderModel.Tax(),
|
|
3265
|
+
|
|
3254
3266
|
name: Joi.string().allow("").required(),
|
|
3255
3267
|
|
|
3256
3268
|
amount: Joi.any().required(),
|
|
3257
|
-
|
|
3258
|
-
code: Joi.string().allow(""),
|
|
3259
3269
|
});
|
|
3260
3270
|
}
|
|
3261
3271
|
|
|
3262
|
-
static
|
|
3272
|
+
static LineItem() {
|
|
3263
3273
|
return Joi.object({
|
|
3264
|
-
|
|
3274
|
+
meta: Joi.any(),
|
|
3265
3275
|
|
|
3266
|
-
|
|
3276
|
+
quantity: Joi.number(),
|
|
3267
3277
|
|
|
3268
|
-
|
|
3278
|
+
external_line_id: Joi.string().allow(""),
|
|
3269
3279
|
|
|
3270
|
-
|
|
3280
|
+
charges: Joi.array().items(OrderModel.Charge()),
|
|
3271
3281
|
|
|
3272
|
-
|
|
3282
|
+
seller_identifier: Joi.string().allow("").required(),
|
|
3273
3283
|
|
|
3274
|
-
|
|
3284
|
+
custom_messasge: Joi.string().allow(""),
|
|
3275
3285
|
});
|
|
3276
3286
|
}
|
|
3277
3287
|
|
|
3278
|
-
static
|
|
3288
|
+
static ProcessingDates() {
|
|
3279
3289
|
return Joi.object({
|
|
3280
|
-
|
|
3290
|
+
dp_pickup_slot: Joi.any(),
|
|
3281
3291
|
|
|
3282
|
-
|
|
3292
|
+
pack_by_date: Joi.string().allow(""),
|
|
3283
3293
|
|
|
3284
|
-
|
|
3294
|
+
dispatch_after_date: Joi.string().allow(""),
|
|
3285
3295
|
|
|
3286
|
-
|
|
3296
|
+
dispatch_by_date: Joi.string().allow(""),
|
|
3287
3297
|
|
|
3288
|
-
|
|
3298
|
+
confirm_by_date: Joi.string().allow(""),
|
|
3289
3299
|
|
|
3290
|
-
|
|
3300
|
+
customer_pickup_slot: Joi.any(),
|
|
3291
3301
|
});
|
|
3292
3302
|
}
|
|
3293
3303
|
|
|
3294
3304
|
static Shipment() {
|
|
3295
3305
|
return Joi.object({
|
|
3296
|
-
|
|
3306
|
+
meta: Joi.any(),
|
|
3297
3307
|
|
|
3298
3308
|
external_shipment_id: Joi.string().allow(""),
|
|
3299
3309
|
|
|
3300
|
-
|
|
3310
|
+
priority: Joi.number(),
|
|
3301
3311
|
|
|
3302
3312
|
location_id: Joi.number().required(),
|
|
3303
3313
|
|
|
3304
|
-
priority: Joi.number(),
|
|
3305
|
-
|
|
3306
3314
|
line_items: Joi.array().items(OrderModel.LineItem()).required(),
|
|
3315
|
+
|
|
3316
|
+
processing_dates: OrderModel.ProcessingDates(),
|
|
3307
3317
|
});
|
|
3308
3318
|
}
|
|
3309
3319
|
|
|
3310
|
-
static
|
|
3320
|
+
static BillingInfo() {
|
|
3311
3321
|
return Joi.object({
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
transaction_data: Joi.any(),
|
|
3315
|
-
|
|
3316
|
-
name: Joi.string().allow("").required(),
|
|
3317
|
-
|
|
3318
|
-
meta: Joi.any(),
|
|
3319
|
-
|
|
3320
|
-
refund_by: Joi.string().allow("").required(),
|
|
3321
|
-
|
|
3322
|
-
amount: Joi.number().required(),
|
|
3322
|
+
state_code: Joi.string().allow(""),
|
|
3323
3323
|
|
|
3324
|
-
|
|
3325
|
-
});
|
|
3326
|
-
}
|
|
3324
|
+
alternate_email: Joi.string().allow(""),
|
|
3327
3325
|
|
|
3328
|
-
|
|
3329
|
-
return Joi.object({
|
|
3330
|
-
primary_mode: Joi.string().allow("").required(),
|
|
3326
|
+
last_name: Joi.string().allow(""),
|
|
3331
3327
|
|
|
3332
|
-
|
|
3333
|
-
});
|
|
3334
|
-
}
|
|
3328
|
+
alternate_mobile_number: Joi.string().allow(""),
|
|
3335
3329
|
|
|
3336
|
-
|
|
3337
|
-
return Joi.object({
|
|
3338
|
-
alternate_email: Joi.string().allow(""),
|
|
3330
|
+
primary_mobile_number: Joi.string().allow("").required(),
|
|
3339
3331
|
|
|
3340
3332
|
customer_code: Joi.string().allow(""),
|
|
3341
3333
|
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
country_code: Joi.string().allow(""),
|
|
3334
|
+
floor_no: Joi.string().allow(""),
|
|
3345
3335
|
|
|
3346
|
-
|
|
3336
|
+
address1: Joi.string().allow("").required(),
|
|
3347
3337
|
|
|
3348
|
-
|
|
3338
|
+
city: Joi.string().allow("").required(),
|
|
3349
3339
|
|
|
3350
3340
|
state: Joi.string().allow("").required(),
|
|
3351
3341
|
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
last_name: Joi.string().allow(""),
|
|
3342
|
+
primary_email: Joi.string().allow("").required(),
|
|
3355
3343
|
|
|
3356
3344
|
gender: Joi.string().allow(""),
|
|
3357
3345
|
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
address1: Joi.string().allow("").required(),
|
|
3346
|
+
address2: Joi.string().allow(""),
|
|
3361
3347
|
|
|
3362
|
-
|
|
3348
|
+
country: Joi.string().allow("").required(),
|
|
3363
3349
|
|
|
3364
|
-
|
|
3350
|
+
first_name: Joi.string().allow("").required(),
|
|
3365
3351
|
|
|
3366
|
-
|
|
3352
|
+
house_no: Joi.string().allow(""),
|
|
3367
3353
|
|
|
3368
|
-
|
|
3354
|
+
external_customer_code: Joi.string().allow(""),
|
|
3369
3355
|
|
|
3370
3356
|
middle_name: Joi.string().allow(""),
|
|
3371
3357
|
|
|
3372
|
-
|
|
3358
|
+
pincode: Joi.string().allow("").required(),
|
|
3373
3359
|
|
|
3374
|
-
|
|
3360
|
+
country_code: Joi.string().allow(""),
|
|
3375
3361
|
|
|
3376
|
-
|
|
3362
|
+
title: Joi.string().allow(""),
|
|
3363
|
+
});
|
|
3364
|
+
}
|
|
3377
3365
|
|
|
3378
|
-
|
|
3366
|
+
static TaxInfo() {
|
|
3367
|
+
return Joi.object({
|
|
3368
|
+
b2b_gstin_number: Joi.string().allow(""),
|
|
3369
|
+
|
|
3370
|
+
gstin: Joi.string().allow(""),
|
|
3379
3371
|
});
|
|
3380
3372
|
}
|
|
3381
3373
|
|
|
@@ -3383,52 +3375,58 @@ class OrderModel {
|
|
|
3383
3375
|
return Joi.object({
|
|
3384
3376
|
external_creation_date: Joi.string().allow(""),
|
|
3385
3377
|
|
|
3386
|
-
tax_info: OrderModel.TaxInfo(),
|
|
3387
|
-
|
|
3388
|
-
currency_info: Joi.any(),
|
|
3389
|
-
|
|
3390
3378
|
meta: Joi.any(),
|
|
3391
3379
|
|
|
3392
3380
|
external_order_id: Joi.string().allow(""),
|
|
3393
3381
|
|
|
3394
|
-
|
|
3382
|
+
payment_info: OrderModel.PaymentInfo().required(),
|
|
3395
3383
|
|
|
3396
|
-
|
|
3384
|
+
shipping_info: OrderModel.ShippingInfo().required(),
|
|
3397
3385
|
|
|
3398
3386
|
shipments: Joi.array().items(OrderModel.Shipment()).required(),
|
|
3399
3387
|
|
|
3400
|
-
|
|
3388
|
+
currency_info: Joi.any(),
|
|
3401
3389
|
|
|
3402
3390
|
billing_info: OrderModel.BillingInfo().required(),
|
|
3391
|
+
|
|
3392
|
+
charges: Joi.array().items(OrderModel.Charge()),
|
|
3393
|
+
|
|
3394
|
+
tax_info: OrderModel.TaxInfo(),
|
|
3403
3395
|
});
|
|
3404
3396
|
}
|
|
3405
3397
|
|
|
3406
3398
|
static CreateOrderErrorReponse() {
|
|
3407
3399
|
return Joi.object({
|
|
3400
|
+
meta: Joi.string().allow("").allow(null),
|
|
3401
|
+
|
|
3402
|
+
code: Joi.string().allow("").allow(null),
|
|
3403
|
+
|
|
3408
3404
|
request_id: Joi.string().allow("").allow(null),
|
|
3409
3405
|
|
|
3410
|
-
|
|
3406
|
+
stack_trace: Joi.string().allow("").allow(null),
|
|
3411
3407
|
|
|
3412
|
-
|
|
3408
|
+
status: Joi.number().required(),
|
|
3413
3409
|
|
|
3414
3410
|
info: Joi.any(),
|
|
3415
3411
|
|
|
3416
|
-
code: Joi.string().allow("").allow(null),
|
|
3417
|
-
|
|
3418
3412
|
message: Joi.string().allow("").required(),
|
|
3419
3413
|
|
|
3420
|
-
stack_trace: Joi.string().allow("").allow(null),
|
|
3421
|
-
|
|
3422
3414
|
exception: Joi.string().allow("").allow(null),
|
|
3423
3415
|
});
|
|
3424
3416
|
}
|
|
3425
3417
|
|
|
3426
|
-
static
|
|
3418
|
+
static DpConfiguration() {
|
|
3427
3419
|
return Joi.object({
|
|
3428
|
-
|
|
3420
|
+
shipping_by: Joi.string().allow(""),
|
|
3421
|
+
});
|
|
3422
|
+
}
|
|
3429
3423
|
|
|
3424
|
+
static PaymentMethods() {
|
|
3425
|
+
return Joi.object({
|
|
3430
3426
|
refund_by: Joi.string().allow(""),
|
|
3431
3427
|
|
|
3428
|
+
collect_by: Joi.string().allow(""),
|
|
3429
|
+
|
|
3432
3430
|
mode: Joi.string().allow(""),
|
|
3433
3431
|
});
|
|
3434
3432
|
}
|
|
@@ -3443,25 +3441,19 @@ class OrderModel {
|
|
|
3443
3441
|
});
|
|
3444
3442
|
}
|
|
3445
3443
|
|
|
3446
|
-
static DpConfiguration() {
|
|
3447
|
-
return Joi.object({
|
|
3448
|
-
shipping_by: Joi.string().allow(""),
|
|
3449
|
-
});
|
|
3450
|
-
}
|
|
3451
|
-
|
|
3452
3444
|
static CreateChannelConfig() {
|
|
3453
3445
|
return Joi.object({
|
|
3454
|
-
|
|
3446
|
+
dp_configuration: OrderModel.DpConfiguration(),
|
|
3455
3447
|
|
|
3456
3448
|
lock_states: Joi.array().items(Joi.string().allow("")),
|
|
3457
3449
|
|
|
3458
|
-
|
|
3450
|
+
shipment_assignment: Joi.string().allow(""),
|
|
3459
3451
|
|
|
3460
3452
|
payment_info: OrderModel.CreateChannelPaymentInfo(),
|
|
3461
3453
|
|
|
3462
|
-
|
|
3454
|
+
location_reassignment: Joi.boolean(),
|
|
3463
3455
|
|
|
3464
|
-
|
|
3456
|
+
logo_url: Joi.any(),
|
|
3465
3457
|
});
|
|
3466
3458
|
}
|
|
3467
3459
|
|
|
@@ -3471,19 +3463,19 @@ class OrderModel {
|
|
|
3471
3463
|
});
|
|
3472
3464
|
}
|
|
3473
3465
|
|
|
3474
|
-
static
|
|
3466
|
+
static CreateChannelConifgErrorResponse() {
|
|
3475
3467
|
return Joi.object({
|
|
3476
|
-
|
|
3468
|
+
error: Joi.string().allow(""),
|
|
3469
|
+
});
|
|
3470
|
+
}
|
|
3477
3471
|
|
|
3472
|
+
static CreateChannelConfigResponse() {
|
|
3473
|
+
return Joi.object({
|
|
3478
3474
|
acknowledged: Joi.boolean(),
|
|
3479
3475
|
|
|
3480
3476
|
is_inserted: Joi.boolean(),
|
|
3481
|
-
});
|
|
3482
|
-
}
|
|
3483
3477
|
|
|
3484
|
-
|
|
3485
|
-
return Joi.object({
|
|
3486
|
-
error: Joi.string().allow(""),
|
|
3478
|
+
is_upserted: Joi.boolean(),
|
|
3487
3479
|
});
|
|
3488
3480
|
}
|
|
3489
3481
|
|
|
@@ -3503,9 +3495,9 @@ class OrderModel {
|
|
|
3503
3495
|
|
|
3504
3496
|
static ResponseDetail() {
|
|
3505
3497
|
return Joi.object({
|
|
3506
|
-
message: Joi.array().items(Joi.string().allow("")),
|
|
3507
|
-
|
|
3508
3498
|
success: Joi.boolean(),
|
|
3499
|
+
|
|
3500
|
+
message: Joi.array().items(Joi.string().allow("")),
|
|
3509
3501
|
});
|
|
3510
3502
|
}
|
|
3511
3503
|
|
|
@@ -3521,9 +3513,9 @@ class OrderModel {
|
|
|
3521
3513
|
|
|
3522
3514
|
order_details: Joi.array().items(OrderModel.FyndOrderIdList()),
|
|
3523
3515
|
|
|
3524
|
-
start_date: Joi.string().allow("").required(),
|
|
3525
|
-
|
|
3526
3516
|
end_date: Joi.string().allow("").required(),
|
|
3517
|
+
|
|
3518
|
+
start_date: Joi.string().allow("").required(),
|
|
3527
3519
|
});
|
|
3528
3520
|
}
|
|
3529
3521
|
}
|