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