@gofynd/fdk-client-javascript 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation/application/CATALOG.md +371 -371
- package/documentation/application/ORDER.md +272 -272
- package/documentation/application/PAYMENT.md +269 -269
- package/documentation/platform/CATALOG.md +1678 -1664
- package/documentation/platform/COMPANYPROFILE.md +201 -201
- package/documentation/platform/ORDER.md +1442 -1323
- package/documentation/platform/PAYMENT.md +88 -88
- package/index.js +7 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +302 -0
- package/sdk/application/Cart/CartApplicationValidator.js +1 -0
- package/sdk/application/Catalog/CatalogApplicationClient.js +378 -0
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +17 -17
- package/sdk/application/Catalog/CatalogApplicationModel.js +500 -500
- package/sdk/application/Catalog/CatalogApplicationValidator.js +1 -0
- package/sdk/application/Common/CommonApplicationClient.js +22 -0
- package/sdk/application/Common/CommonApplicationValidator.js +1 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +41 -0
- package/sdk/application/Communication/CommunicationApplicationValidator.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +200 -0
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationClient.js +215 -0
- package/sdk/application/Content/ContentApplicationValidator.js +1 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +33 -0
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +1 -0
- package/sdk/application/Lead/LeadApplicationClient.js +81 -0
- package/sdk/application/Lead/LeadApplicationValidator.js +1 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +44 -0
- package/sdk/application/Logistic/LogisticApplicationValidator.js +1 -0
- package/sdk/application/Order/OrderApplicationClient.js +146 -0
- package/sdk/application/Order/OrderApplicationModel.d.ts +20 -20
- package/sdk/application/Order/OrderApplicationModel.js +329 -329
- package/sdk/application/Order/OrderApplicationValidator.js +1 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +528 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationModel.js +391 -391
- package/sdk/application/Payment/PaymentApplicationValidator.js +1 -0
- package/sdk/application/PosCart/PosCartApplicationClient.js +329 -0
- package/sdk/application/PosCart/PosCartApplicationValidator.js +1 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +81 -0
- package/sdk/application/Rewards/RewardsApplicationValidator.js +1 -0
- package/sdk/application/Share/ShareApplicationClient.js +87 -0
- package/sdk/application/Share/ShareApplicationValidator.js +1 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +44 -0
- package/sdk/application/Theme/ThemeApplicationValidator.js +1 -0
- package/sdk/application/User/UserApplicationClient.js +405 -0
- package/sdk/application/User/UserApplicationValidator.js +1 -0
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +114 -0
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +58 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +46 -0
- package/sdk/platform/Billing/BillingPlatformClient.js +160 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +246 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +29 -29
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +839 -48
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +3 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +9 -9
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +54 -54
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1149 -96
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +58 -57
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1626 -1614
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +6 -6
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +20 -20
- package/sdk/platform/Common/CommonPlatformClient.js +26 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +587 -0
- package/sdk/platform/Communication/CommunicationPlatformClient.js +15 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +179 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +11 -11
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +269 -269
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +382 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +282 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +866 -0
- package/sdk/platform/Discount/DiscountPlatformClient.js +152 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +54 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +76 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.js +161 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +162 -0
- package/sdk/platform/Lead/LeadPlatformClient.js +140 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +55 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +15 -6
- package/sdk/platform/Order/OrderPlatformClient.js +674 -15
- package/sdk/platform/Order/OrderPlatformModel.d.ts +67 -60
- package/sdk/platform/Order/OrderPlatformModel.js +1559 -1623
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +10 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +26 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +165 -0
- package/sdk/platform/Payment/PaymentPlatformClient.js +139 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +137 -137
- package/sdk/platform/PlatformApplicationClient.d.ts +2217 -2243
- package/sdk/platform/PlatformApplicationClient.js +2514 -2524
- package/sdk/platform/PlatformClient.d.ts +2217 -2243
- package/sdk/platform/PlatformClient.js +2514 -2524
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +169 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.js +53 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +293 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +145 -0
- package/sdk/platform/Webhook/WebhookPlatformClient.js +90 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +25 -0
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +3 -1
- package/sdk/public/Inventory/InventoryPublicClient.js +75 -0
- package/sdk/public/Inventory/InventoryPublicValidator.js +3 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +29 -0
- package/sdk/public/Webhook/WebhookPublicValidator.js +3 -1
|
@@ -3,10 +3,10 @@ const Joi = require("joi");
|
|
|
3
3
|
class OrderModel {
|
|
4
4
|
static OrderStatuses() {
|
|
5
5
|
return Joi.object({
|
|
6
|
-
value: Joi.number(),
|
|
7
|
-
|
|
8
6
|
display: Joi.string().allow(""),
|
|
9
7
|
|
|
8
|
+
value: Joi.number(),
|
|
9
|
+
|
|
10
10
|
is_selected: Joi.boolean(),
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -17,175 +17,159 @@ class OrderModel {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
static
|
|
20
|
+
static OrderPage() {
|
|
21
21
|
return Joi.object({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
value: Joi.number(),
|
|
25
|
-
|
|
26
|
-
display: Joi.string().allow(""),
|
|
27
|
-
});
|
|
28
|
-
}
|
|
22
|
+
size: Joi.number(),
|
|
29
23
|
|
|
30
|
-
|
|
31
|
-
return Joi.object({
|
|
32
|
-
name: Joi.string().allow(""),
|
|
24
|
+
type: Joi.string().allow(""),
|
|
33
25
|
|
|
34
|
-
|
|
26
|
+
current: Joi.number(),
|
|
35
27
|
|
|
36
|
-
|
|
28
|
+
item_total: Joi.number(),
|
|
37
29
|
|
|
38
|
-
|
|
30
|
+
has_next: Joi.boolean(),
|
|
39
31
|
});
|
|
40
32
|
}
|
|
41
33
|
|
|
42
34
|
static BagsForReorderArticleAssignment() {
|
|
43
35
|
return Joi.object({
|
|
44
|
-
strategy: Joi.string().allow(""),
|
|
45
|
-
|
|
46
36
|
level: Joi.string().allow(""),
|
|
37
|
+
|
|
38
|
+
strategy: Joi.string().allow(""),
|
|
47
39
|
});
|
|
48
40
|
}
|
|
49
41
|
|
|
50
42
|
static BagsForReorder() {
|
|
51
43
|
return Joi.object({
|
|
52
|
-
seller_id: Joi.number(),
|
|
53
|
-
|
|
54
|
-
item_id: Joi.number(),
|
|
55
|
-
|
|
56
44
|
quantity: Joi.number(),
|
|
57
45
|
|
|
46
|
+
store_id: Joi.number(),
|
|
47
|
+
|
|
58
48
|
article_assignment: OrderModel.BagsForReorderArticleAssignment(),
|
|
59
49
|
|
|
60
|
-
|
|
50
|
+
seller_id: Joi.number(),
|
|
61
51
|
|
|
62
|
-
|
|
52
|
+
item_id: Joi.number(),
|
|
53
|
+
|
|
54
|
+
item_size: Joi.string().allow(""),
|
|
63
55
|
});
|
|
64
56
|
}
|
|
65
57
|
|
|
66
|
-
static
|
|
58
|
+
static UserInfo() {
|
|
67
59
|
return Joi.object({
|
|
68
|
-
|
|
60
|
+
mobile: Joi.string().allow(""),
|
|
69
61
|
|
|
70
|
-
|
|
71
|
-
});
|
|
72
|
-
}
|
|
62
|
+
name: Joi.string().allow(""),
|
|
73
63
|
|
|
74
|
-
|
|
75
|
-
return Joi.object({
|
|
76
|
-
show_promise: Joi.boolean(),
|
|
64
|
+
gender: Joi.string().allow(""),
|
|
77
65
|
|
|
78
|
-
|
|
66
|
+
email: Joi.string().allow(""),
|
|
79
67
|
});
|
|
80
68
|
}
|
|
81
69
|
|
|
82
|
-
static
|
|
70
|
+
static NestedTrackingDetails() {
|
|
83
71
|
return Joi.object({
|
|
84
|
-
|
|
72
|
+
time: Joi.string().allow(""),
|
|
85
73
|
|
|
86
|
-
|
|
74
|
+
is_passed: Joi.boolean(),
|
|
87
75
|
|
|
88
|
-
|
|
76
|
+
is_current: Joi.boolean(),
|
|
89
77
|
|
|
90
|
-
|
|
78
|
+
status: Joi.string().allow(""),
|
|
91
79
|
});
|
|
92
80
|
}
|
|
93
81
|
|
|
94
|
-
static
|
|
82
|
+
static TrackingDetails() {
|
|
95
83
|
return Joi.object({
|
|
96
|
-
|
|
84
|
+
status: Joi.string().allow(""),
|
|
97
85
|
|
|
98
|
-
|
|
86
|
+
is_passed: Joi.boolean(),
|
|
99
87
|
|
|
100
|
-
|
|
88
|
+
tracking_details: Joi.array().items(OrderModel.NestedTrackingDetails()),
|
|
89
|
+
|
|
90
|
+
time: Joi.string().allow(""),
|
|
91
|
+
|
|
92
|
+
is_current: Joi.boolean(),
|
|
101
93
|
});
|
|
102
94
|
}
|
|
103
95
|
|
|
104
|
-
static
|
|
96
|
+
static FulfillingCompany() {
|
|
105
97
|
return Joi.object({
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
payment_mode: Joi.string().allow(""),
|
|
109
|
-
|
|
110
|
-
mode: Joi.string().allow(""),
|
|
98
|
+
id: Joi.number(),
|
|
111
99
|
|
|
112
|
-
|
|
100
|
+
name: Joi.string().allow(""),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
113
103
|
|
|
114
|
-
|
|
104
|
+
static TimeStampData() {
|
|
105
|
+
return Joi.object({
|
|
106
|
+
max: Joi.string().allow(""),
|
|
115
107
|
|
|
116
|
-
|
|
108
|
+
min: Joi.string().allow(""),
|
|
117
109
|
});
|
|
118
110
|
}
|
|
119
111
|
|
|
120
|
-
static
|
|
112
|
+
static Promise() {
|
|
121
113
|
return Joi.object({
|
|
122
|
-
|
|
114
|
+
timestamp: OrderModel.TimeStampData(),
|
|
123
115
|
|
|
124
|
-
|
|
116
|
+
show_promise: Joi.boolean(),
|
|
125
117
|
});
|
|
126
118
|
}
|
|
127
119
|
|
|
128
|
-
static
|
|
120
|
+
static Prices() {
|
|
129
121
|
return Joi.object({
|
|
130
|
-
|
|
122
|
+
refund_amount: Joi.number(),
|
|
131
123
|
|
|
132
|
-
|
|
124
|
+
amount_paid_roundoff: Joi.number(),
|
|
133
125
|
|
|
134
|
-
|
|
126
|
+
coupon_effective_discount: Joi.number(),
|
|
135
127
|
|
|
136
|
-
|
|
128
|
+
value_of_good: Joi.number(),
|
|
137
129
|
|
|
138
|
-
|
|
130
|
+
gst_tax_percentage: Joi.number(),
|
|
139
131
|
|
|
140
|
-
|
|
132
|
+
fynd_credits: Joi.number(),
|
|
141
133
|
|
|
142
|
-
|
|
134
|
+
delivery_charge: Joi.number(),
|
|
143
135
|
|
|
144
|
-
|
|
136
|
+
price_marked: Joi.number(),
|
|
145
137
|
|
|
146
|
-
|
|
138
|
+
cashback: Joi.number(),
|
|
147
139
|
|
|
148
|
-
|
|
140
|
+
discount: Joi.number(),
|
|
149
141
|
|
|
150
|
-
|
|
142
|
+
cashback_applied: Joi.number(),
|
|
151
143
|
|
|
152
|
-
|
|
144
|
+
coupon_value: Joi.number(),
|
|
153
145
|
|
|
154
|
-
|
|
146
|
+
price_effective: Joi.number(),
|
|
155
147
|
|
|
156
|
-
|
|
148
|
+
refund_credit: Joi.number(),
|
|
157
149
|
|
|
158
|
-
|
|
150
|
+
cod_charges: Joi.number(),
|
|
159
151
|
|
|
160
|
-
|
|
152
|
+
brand_calculated_amount: Joi.number(),
|
|
161
153
|
|
|
162
|
-
|
|
154
|
+
added_to_fynd_cash: Joi.boolean(),
|
|
163
155
|
|
|
164
|
-
|
|
156
|
+
promotion_effective_discount: Joi.number(),
|
|
165
157
|
|
|
166
|
-
|
|
158
|
+
transfer_price: Joi.number(),
|
|
167
159
|
|
|
168
|
-
|
|
160
|
+
amount_paid: Joi.number(),
|
|
169
161
|
});
|
|
170
162
|
}
|
|
171
163
|
|
|
172
|
-
static
|
|
164
|
+
static CurrentStatus() {
|
|
173
165
|
return Joi.object({
|
|
174
|
-
|
|
166
|
+
journey_type: Joi.string().allow(""),
|
|
175
167
|
|
|
176
|
-
|
|
177
|
-
});
|
|
178
|
-
}
|
|
168
|
+
status: Joi.string().allow(""),
|
|
179
169
|
|
|
180
|
-
static CurrentStatus() {
|
|
181
|
-
return Joi.object({
|
|
182
170
|
name: Joi.string().allow(""),
|
|
183
171
|
|
|
184
|
-
journey_type: Joi.string().allow(""),
|
|
185
|
-
|
|
186
172
|
updated_at: Joi.string().allow(""),
|
|
187
|
-
|
|
188
|
-
status: Joi.string().allow(""),
|
|
189
173
|
});
|
|
190
174
|
}
|
|
191
175
|
|
|
@@ -199,97 +183,53 @@ class OrderModel {
|
|
|
199
183
|
|
|
200
184
|
static Item() {
|
|
201
185
|
return Joi.object({
|
|
202
|
-
|
|
186
|
+
size: Joi.string().allow(""),
|
|
203
187
|
|
|
204
|
-
|
|
188
|
+
name: Joi.string().allow(""),
|
|
205
189
|
|
|
206
190
|
code: Joi.string().allow(""),
|
|
207
191
|
|
|
208
|
-
slug_key: Joi.string().allow(""),
|
|
209
|
-
|
|
210
|
-
id: Joi.number(),
|
|
211
|
-
|
|
212
|
-
brand: OrderModel.ItemBrand(),
|
|
213
|
-
|
|
214
|
-
size: Joi.string().allow(""),
|
|
215
|
-
|
|
216
192
|
image: Joi.array().items(Joi.string().allow("")),
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
static Prices() {
|
|
221
|
-
return Joi.object({
|
|
222
|
-
discount: Joi.number(),
|
|
223
|
-
|
|
224
|
-
refund_amount: Joi.number(),
|
|
225
|
-
|
|
226
|
-
amount_paid: Joi.number(),
|
|
227
|
-
|
|
228
|
-
gst_tax_percentage: Joi.number(),
|
|
229
|
-
|
|
230
|
-
coupon_effective_discount: Joi.number(),
|
|
231
|
-
|
|
232
|
-
value_of_good: Joi.number(),
|
|
233
|
-
|
|
234
|
-
refund_credit: Joi.number(),
|
|
235
|
-
|
|
236
|
-
added_to_fynd_cash: Joi.boolean(),
|
|
237
|
-
|
|
238
|
-
cashback_applied: Joi.number(),
|
|
239
|
-
|
|
240
|
-
fynd_credits: Joi.number(),
|
|
241
|
-
|
|
242
|
-
amount_paid_roundoff: Joi.number(),
|
|
243
|
-
|
|
244
|
-
delivery_charge: Joi.number(),
|
|
245
|
-
|
|
246
|
-
promotion_effective_discount: Joi.number(),
|
|
247
|
-
|
|
248
|
-
price_effective: Joi.number(),
|
|
249
|
-
|
|
250
|
-
cod_charges: Joi.number(),
|
|
251
|
-
|
|
252
|
-
brand_calculated_amount: Joi.number(),
|
|
253
193
|
|
|
254
|
-
|
|
194
|
+
brand: OrderModel.ItemBrand(),
|
|
255
195
|
|
|
256
|
-
|
|
196
|
+
slug_key: Joi.string().allow(""),
|
|
257
197
|
|
|
258
|
-
|
|
198
|
+
id: Joi.number(),
|
|
259
199
|
|
|
260
|
-
|
|
200
|
+
seller_identifier: Joi.string().allow(""),
|
|
261
201
|
});
|
|
262
202
|
}
|
|
263
203
|
|
|
264
204
|
static AppliedFreeArticles() {
|
|
265
205
|
return Joi.object({
|
|
266
|
-
free_gift_item_details: Joi.any(),
|
|
267
|
-
|
|
268
206
|
article_id: Joi.string().allow(""),
|
|
269
207
|
|
|
270
208
|
parent_item_identifier: Joi.string().allow(""),
|
|
271
209
|
|
|
210
|
+
free_gift_item_details: Joi.any(),
|
|
211
|
+
|
|
272
212
|
quantity: Joi.number(),
|
|
273
213
|
});
|
|
274
214
|
}
|
|
275
215
|
|
|
276
216
|
static AppliedPromos() {
|
|
277
217
|
return Joi.object({
|
|
278
|
-
amount: Joi.number(),
|
|
279
|
-
|
|
280
218
|
promotion_type: Joi.string().allow(""),
|
|
281
219
|
|
|
282
|
-
|
|
220
|
+
promo_id: Joi.string().allow(""),
|
|
283
221
|
|
|
284
222
|
applied_free_articles: Joi.array().items(
|
|
285
223
|
OrderModel.AppliedFreeArticles()
|
|
286
224
|
),
|
|
287
225
|
|
|
288
|
-
|
|
226
|
+
amount: Joi.number(),
|
|
227
|
+
|
|
228
|
+
mrp_promotion: Joi.boolean(),
|
|
289
229
|
|
|
290
230
|
article_quantity: Joi.number(),
|
|
291
231
|
|
|
292
|
-
|
|
232
|
+
promotion_name: Joi.string().allow(""),
|
|
293
233
|
});
|
|
294
234
|
}
|
|
295
235
|
|
|
@@ -303,247 +243,307 @@ class OrderModel {
|
|
|
303
243
|
|
|
304
244
|
static FinancialBreakup() {
|
|
305
245
|
return Joi.object({
|
|
306
|
-
discount: Joi.number(),
|
|
307
|
-
|
|
308
246
|
refund_amount: Joi.number(),
|
|
309
247
|
|
|
310
|
-
|
|
248
|
+
size: Joi.string().allow(""),
|
|
311
249
|
|
|
312
|
-
|
|
250
|
+
amount_paid_roundoff: Joi.number(),
|
|
313
251
|
|
|
314
252
|
coupon_effective_discount: Joi.number(),
|
|
315
253
|
|
|
316
|
-
|
|
254
|
+
gst_tag: Joi.string().allow(""),
|
|
317
255
|
|
|
318
256
|
value_of_good: Joi.number(),
|
|
319
257
|
|
|
320
|
-
|
|
258
|
+
gst_tax_percentage: Joi.number(),
|
|
321
259
|
|
|
322
|
-
|
|
260
|
+
gst_fee: Joi.number(),
|
|
323
261
|
|
|
324
|
-
|
|
262
|
+
fynd_credits: Joi.number(),
|
|
325
263
|
|
|
326
|
-
|
|
264
|
+
delivery_charge: Joi.number(),
|
|
327
265
|
|
|
328
|
-
|
|
266
|
+
total_units: Joi.number(),
|
|
329
267
|
|
|
330
|
-
|
|
268
|
+
price_marked: Joi.number(),
|
|
331
269
|
|
|
332
|
-
|
|
270
|
+
cashback: Joi.number(),
|
|
333
271
|
|
|
334
|
-
|
|
272
|
+
identifiers: OrderModel.Identifiers(),
|
|
335
273
|
|
|
336
|
-
|
|
274
|
+
discount: Joi.number(),
|
|
337
275
|
|
|
338
|
-
|
|
276
|
+
item_name: Joi.string().allow(""),
|
|
339
277
|
|
|
340
|
-
|
|
278
|
+
coupon_value: Joi.number(),
|
|
341
279
|
|
|
342
|
-
|
|
280
|
+
cashback_applied: Joi.number(),
|
|
343
281
|
|
|
344
|
-
|
|
282
|
+
refund_credit: Joi.number(),
|
|
345
283
|
|
|
346
|
-
|
|
284
|
+
price_effective: Joi.number(),
|
|
347
285
|
|
|
348
|
-
|
|
286
|
+
cod_charges: Joi.number(),
|
|
349
287
|
|
|
350
|
-
|
|
288
|
+
brand_calculated_amount: Joi.number(),
|
|
351
289
|
|
|
352
|
-
|
|
290
|
+
added_to_fynd_cash: Joi.boolean(),
|
|
353
291
|
|
|
354
|
-
|
|
292
|
+
promotion_effective_discount: Joi.number(),
|
|
355
293
|
|
|
356
294
|
transfer_price: Joi.number(),
|
|
357
295
|
|
|
358
|
-
|
|
296
|
+
hsn_code: Joi.string().allow(""),
|
|
297
|
+
|
|
298
|
+
amount_paid: Joi.number(),
|
|
359
299
|
});
|
|
360
300
|
}
|
|
361
301
|
|
|
362
302
|
static Bags() {
|
|
363
303
|
return Joi.object({
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
current_status: OrderModel.CurrentStatus(),
|
|
304
|
+
prices: OrderModel.Prices(),
|
|
367
305
|
|
|
368
|
-
|
|
306
|
+
can_cancel: Joi.boolean(),
|
|
369
307
|
|
|
370
|
-
|
|
308
|
+
parent_promo_bags: Joi.any(),
|
|
371
309
|
|
|
372
|
-
|
|
310
|
+
quantity: Joi.number(),
|
|
373
311
|
|
|
374
|
-
|
|
312
|
+
line_number: Joi.number(),
|
|
375
313
|
|
|
376
|
-
|
|
314
|
+
can_return: Joi.boolean(),
|
|
377
315
|
|
|
378
|
-
|
|
316
|
+
current_status: OrderModel.CurrentStatus(),
|
|
379
317
|
|
|
380
|
-
|
|
318
|
+
returnable_date: Joi.string().allow(""),
|
|
381
319
|
|
|
382
|
-
|
|
320
|
+
item: OrderModel.Item(),
|
|
383
321
|
|
|
384
322
|
applied_promos: Joi.array().items(OrderModel.AppliedPromos()),
|
|
385
323
|
|
|
386
324
|
id: Joi.number(),
|
|
387
325
|
|
|
388
|
-
|
|
326
|
+
seller_identifier: Joi.string().allow(""),
|
|
327
|
+
|
|
328
|
+
delivery_date: Joi.string().allow(""),
|
|
389
329
|
|
|
390
330
|
financial_breakup: Joi.array().items(OrderModel.FinancialBreakup()),
|
|
391
331
|
});
|
|
392
332
|
}
|
|
393
333
|
|
|
334
|
+
static ShipmentUserInfo() {
|
|
335
|
+
return Joi.object({
|
|
336
|
+
last_name: Joi.string().allow(""),
|
|
337
|
+
|
|
338
|
+
mobile: Joi.string().allow(""),
|
|
339
|
+
|
|
340
|
+
gender: Joi.string().allow(""),
|
|
341
|
+
|
|
342
|
+
first_name: Joi.string().allow(""),
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
|
|
394
346
|
static FulfillingStore() {
|
|
395
347
|
return Joi.object({
|
|
396
|
-
|
|
348
|
+
code: Joi.string().allow(""),
|
|
397
349
|
|
|
398
350
|
name: Joi.string().allow(""),
|
|
399
351
|
|
|
400
|
-
|
|
352
|
+
company_name: Joi.string().allow(""),
|
|
401
353
|
|
|
402
354
|
id: Joi.number(),
|
|
403
355
|
|
|
404
|
-
|
|
356
|
+
company_id: Joi.number(),
|
|
405
357
|
});
|
|
406
358
|
}
|
|
407
359
|
|
|
408
|
-
static
|
|
360
|
+
static BreakupValues() {
|
|
409
361
|
return Joi.object({
|
|
410
|
-
|
|
362
|
+
display: Joi.string().allow(""),
|
|
363
|
+
|
|
364
|
+
value: Joi.number(),
|
|
365
|
+
|
|
366
|
+
name: Joi.string().allow(""),
|
|
367
|
+
});
|
|
368
|
+
}
|
|
411
369
|
|
|
370
|
+
static Invoice() {
|
|
371
|
+
return Joi.object({
|
|
412
372
|
label_url: Joi.string().allow(""),
|
|
413
373
|
|
|
414
374
|
invoice_url: Joi.string().allow(""),
|
|
375
|
+
|
|
376
|
+
updated_date: Joi.string().allow(""),
|
|
415
377
|
});
|
|
416
378
|
}
|
|
417
379
|
|
|
418
|
-
static
|
|
380
|
+
static DeliveryAddress() {
|
|
419
381
|
return Joi.object({
|
|
420
|
-
|
|
382
|
+
address_type: Joi.string().allow(""),
|
|
421
383
|
|
|
422
|
-
|
|
384
|
+
phone: Joi.string().allow(""),
|
|
423
385
|
|
|
424
|
-
|
|
386
|
+
name: Joi.string().allow(""),
|
|
425
387
|
|
|
426
|
-
|
|
388
|
+
version: Joi.string().allow(""),
|
|
389
|
+
|
|
390
|
+
contact_person: Joi.string().allow(""),
|
|
391
|
+
|
|
392
|
+
city: Joi.string().allow(""),
|
|
393
|
+
|
|
394
|
+
address: Joi.string().allow(""),
|
|
395
|
+
|
|
396
|
+
updated_at: Joi.string().allow(""),
|
|
397
|
+
|
|
398
|
+
address_category: Joi.string().allow(""),
|
|
399
|
+
|
|
400
|
+
pincode: Joi.string().allow(""),
|
|
401
|
+
|
|
402
|
+
address1: Joi.string().allow(""),
|
|
403
|
+
|
|
404
|
+
state: Joi.string().allow(""),
|
|
405
|
+
|
|
406
|
+
longitude: Joi.number(),
|
|
407
|
+
|
|
408
|
+
landmark: Joi.string().allow(""),
|
|
409
|
+
|
|
410
|
+
created_at: Joi.string().allow(""),
|
|
411
|
+
|
|
412
|
+
address2: Joi.string().allow(""),
|
|
413
|
+
|
|
414
|
+
email: Joi.string().allow(""),
|
|
415
|
+
|
|
416
|
+
latitude: Joi.number(),
|
|
417
|
+
|
|
418
|
+
country: Joi.string().allow(""),
|
|
419
|
+
|
|
420
|
+
area: Joi.string().allow(""),
|
|
427
421
|
});
|
|
428
422
|
}
|
|
429
423
|
|
|
430
|
-
static
|
|
424
|
+
static ShipmentStatus() {
|
|
431
425
|
return Joi.object({
|
|
432
|
-
|
|
426
|
+
hex_code: Joi.string().allow(""),
|
|
433
427
|
|
|
434
|
-
|
|
428
|
+
title: Joi.string().allow(""),
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
static ShipmentPayment() {
|
|
433
|
+
return Joi.object({
|
|
434
|
+
mop: Joi.string().allow(""),
|
|
435
|
+
|
|
436
|
+
payment_mode: Joi.string().allow(""),
|
|
437
|
+
|
|
438
|
+
mode: Joi.string().allow(""),
|
|
435
439
|
|
|
436
440
|
status: Joi.string().allow(""),
|
|
437
441
|
|
|
438
|
-
|
|
442
|
+
display_name: Joi.string().allow(""),
|
|
439
443
|
|
|
440
|
-
|
|
444
|
+
logo: Joi.string().allow(""),
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
static ShipmentTotalDetails() {
|
|
449
|
+
return Joi.object({
|
|
450
|
+
sizes: Joi.number(),
|
|
451
|
+
|
|
452
|
+
total_price: Joi.number(),
|
|
453
|
+
|
|
454
|
+
pieces: Joi.number(),
|
|
441
455
|
});
|
|
442
456
|
}
|
|
443
457
|
|
|
444
458
|
static Shipments() {
|
|
445
459
|
return Joi.object({
|
|
446
|
-
|
|
460
|
+
order_type: Joi.string().allow(""),
|
|
447
461
|
|
|
448
|
-
|
|
462
|
+
refund_details: Joi.any(),
|
|
449
463
|
|
|
450
|
-
|
|
464
|
+
comment: Joi.string().allow(""),
|
|
451
465
|
|
|
452
|
-
|
|
466
|
+
shipment_id: Joi.string().allow(""),
|
|
453
467
|
|
|
454
|
-
|
|
468
|
+
tracking_details: Joi.array().items(OrderModel.TrackingDetails()),
|
|
455
469
|
|
|
456
|
-
|
|
470
|
+
show_download_invoice: Joi.boolean(),
|
|
457
471
|
|
|
458
|
-
|
|
472
|
+
fulfilling_company: OrderModel.FulfillingCompany(),
|
|
459
473
|
|
|
460
|
-
|
|
474
|
+
show_track_link: Joi.boolean(),
|
|
461
475
|
|
|
462
|
-
|
|
476
|
+
awb_no: Joi.string().allow(""),
|
|
463
477
|
|
|
464
|
-
|
|
478
|
+
promise: OrderModel.Promise(),
|
|
465
479
|
|
|
466
|
-
|
|
480
|
+
traking_no: Joi.string().allow(""),
|
|
467
481
|
|
|
468
|
-
|
|
482
|
+
bags: Joi.array().items(OrderModel.Bags()),
|
|
469
483
|
|
|
470
|
-
|
|
484
|
+
user_info: OrderModel.ShipmentUserInfo(),
|
|
471
485
|
|
|
472
|
-
|
|
486
|
+
can_break: Joi.any(),
|
|
473
487
|
|
|
474
|
-
|
|
488
|
+
returnable_date: Joi.string().allow(""),
|
|
475
489
|
|
|
476
|
-
|
|
490
|
+
need_help_url: Joi.string().allow(""),
|
|
477
491
|
|
|
478
|
-
|
|
492
|
+
fulfilling_store: OrderModel.FulfillingStore(),
|
|
479
493
|
|
|
480
|
-
|
|
494
|
+
breakup_values: Joi.array().items(OrderModel.BreakupValues()),
|
|
481
495
|
|
|
482
|
-
|
|
496
|
+
invoice: OrderModel.Invoice(),
|
|
483
497
|
|
|
484
|
-
|
|
498
|
+
prices: OrderModel.Prices(),
|
|
485
499
|
|
|
486
|
-
|
|
500
|
+
size_info: Joi.any(),
|
|
487
501
|
|
|
488
|
-
|
|
502
|
+
can_return: Joi.boolean(),
|
|
489
503
|
|
|
490
|
-
|
|
504
|
+
custom_meta: Joi.array().items(Joi.any()),
|
|
491
505
|
|
|
492
|
-
|
|
506
|
+
order_id: Joi.string().allow(""),
|
|
493
507
|
|
|
494
|
-
|
|
508
|
+
track_url: Joi.string().allow(""),
|
|
495
509
|
|
|
496
|
-
|
|
510
|
+
total_bags: Joi.number(),
|
|
497
511
|
|
|
498
|
-
|
|
512
|
+
delivery_address: OrderModel.DeliveryAddress(),
|
|
499
513
|
|
|
500
|
-
|
|
514
|
+
delivery_date: Joi.string().allow(""),
|
|
501
515
|
|
|
502
|
-
|
|
516
|
+
shipment_created_at: Joi.string().allow(""),
|
|
503
517
|
|
|
504
|
-
|
|
518
|
+
shipment_status: OrderModel.ShipmentStatus(),
|
|
505
519
|
|
|
506
|
-
|
|
520
|
+
can_cancel: Joi.boolean(),
|
|
507
521
|
|
|
508
|
-
|
|
522
|
+
payment: OrderModel.ShipmentPayment(),
|
|
509
523
|
|
|
510
|
-
|
|
524
|
+
dp_name: Joi.string().allow(""),
|
|
511
525
|
|
|
512
|
-
|
|
526
|
+
total_details: OrderModel.ShipmentTotalDetails(),
|
|
513
527
|
|
|
514
|
-
|
|
528
|
+
beneficiary_details: Joi.boolean(),
|
|
515
529
|
});
|
|
516
530
|
}
|
|
517
531
|
|
|
518
532
|
static OrderSchema() {
|
|
519
533
|
return Joi.object({
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
breakup_values: Joi.array().items(OrderModel.BreakupValues()),
|
|
534
|
+
bags_for_reorder: Joi.array().items(OrderModel.BagsForReorder()),
|
|
523
535
|
|
|
524
|
-
|
|
536
|
+
order_created_time: Joi.string().allow(""),
|
|
525
537
|
|
|
526
538
|
user_info: OrderModel.UserInfo(),
|
|
527
539
|
|
|
528
|
-
bags_for_reorder: Joi.array().items(OrderModel.BagsForReorder()),
|
|
529
|
-
|
|
530
540
|
shipments: Joi.array().items(OrderModel.Shipments()),
|
|
531
541
|
|
|
532
542
|
order_id: Joi.string().allow(""),
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
543
|
|
|
536
|
-
|
|
537
|
-
return Joi.object({
|
|
538
|
-
type: Joi.string().allow(""),
|
|
539
|
-
|
|
540
|
-
item_total: Joi.number(),
|
|
541
|
-
|
|
542
|
-
current: Joi.number(),
|
|
543
|
-
|
|
544
|
-
has_next: Joi.boolean(),
|
|
544
|
+
total_shipments_in_order: Joi.number(),
|
|
545
545
|
|
|
546
|
-
|
|
546
|
+
breakup_values: Joi.array().items(OrderModel.BreakupValues()),
|
|
547
547
|
});
|
|
548
548
|
}
|
|
549
549
|
|
|
@@ -551,9 +551,9 @@ class OrderModel {
|
|
|
551
551
|
return Joi.object({
|
|
552
552
|
filters: OrderModel.OrderFilters(),
|
|
553
553
|
|
|
554
|
-
items: Joi.array().items(OrderModel.OrderSchema()),
|
|
555
|
-
|
|
556
554
|
page: OrderModel.OrderPage(),
|
|
555
|
+
|
|
556
|
+
items: Joi.array().items(OrderModel.OrderSchema()),
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
559
|
|
|
@@ -581,30 +581,30 @@ class OrderModel {
|
|
|
581
581
|
return Joi.object({
|
|
582
582
|
success: Joi.boolean().required(),
|
|
583
583
|
|
|
584
|
-
presigned_type: Joi.string().allow("").required(),
|
|
585
|
-
|
|
586
584
|
presigned_url: Joi.string().allow("").required(),
|
|
587
585
|
|
|
586
|
+
presigned_type: Joi.string().allow("").required(),
|
|
587
|
+
|
|
588
588
|
shipment_id: Joi.string().allow("").required(),
|
|
589
589
|
});
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
static Track() {
|
|
593
593
|
return Joi.object({
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
last_location_recieved_at: Joi.string().allow(""),
|
|
594
|
+
updated_time: Joi.string().allow(""),
|
|
597
595
|
|
|
598
596
|
status: Joi.string().allow(""),
|
|
599
597
|
|
|
600
|
-
|
|
598
|
+
shipment_type: Joi.string().allow(""),
|
|
601
599
|
|
|
602
600
|
updated_at: Joi.string().allow(""),
|
|
603
601
|
|
|
604
|
-
|
|
602
|
+
awb: Joi.string().allow(""),
|
|
605
603
|
|
|
606
604
|
account_name: Joi.string().allow(""),
|
|
607
605
|
|
|
606
|
+
last_location_recieved_at: Joi.string().allow(""),
|
|
607
|
+
|
|
608
608
|
reason: Joi.string().allow(""),
|
|
609
609
|
});
|
|
610
610
|
}
|
|
@@ -617,26 +617,26 @@ class OrderModel {
|
|
|
617
617
|
|
|
618
618
|
static CustomerDetailsResponse() {
|
|
619
619
|
return Joi.object({
|
|
620
|
-
country: Joi.string().allow(""),
|
|
621
|
-
|
|
622
|
-
shipment_id: Joi.string().allow(""),
|
|
623
|
-
|
|
624
620
|
name: Joi.string().allow(""),
|
|
625
621
|
|
|
626
622
|
phone: Joi.string().allow(""),
|
|
627
623
|
|
|
624
|
+
country: Joi.string().allow(""),
|
|
625
|
+
|
|
626
|
+
shipment_id: Joi.string().allow(""),
|
|
627
|
+
|
|
628
628
|
order_id: Joi.string().allow(""),
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
static SendOtpToCustomerResponse() {
|
|
633
633
|
return Joi.object({
|
|
634
|
-
request_id: Joi.string().allow(""),
|
|
635
|
-
|
|
636
634
|
success: Joi.boolean(),
|
|
637
635
|
|
|
638
636
|
resend_timer: Joi.number(),
|
|
639
637
|
|
|
638
|
+
request_id: Joi.string().allow(""),
|
|
639
|
+
|
|
640
640
|
message: Joi.string().allow(""),
|
|
641
641
|
});
|
|
642
642
|
}
|
|
@@ -655,57 +655,57 @@ class OrderModel {
|
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
657
|
|
|
658
|
-
static
|
|
658
|
+
static BagReasonMeta() {
|
|
659
659
|
return Joi.object({
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
display_name: Joi.string().allow(""),
|
|
660
|
+
show_text_area: Joi.boolean(),
|
|
663
661
|
});
|
|
664
662
|
}
|
|
665
663
|
|
|
666
|
-
static
|
|
664
|
+
static QuestionSet() {
|
|
667
665
|
return Joi.object({
|
|
668
|
-
|
|
666
|
+
id: Joi.number(),
|
|
667
|
+
|
|
668
|
+
display_name: Joi.string().allow(""),
|
|
669
669
|
});
|
|
670
670
|
}
|
|
671
671
|
|
|
672
672
|
static BagReasons() {
|
|
673
673
|
return Joi.object({
|
|
674
|
-
|
|
674
|
+
qc_type: Joi.array().items(Joi.string().allow("")),
|
|
675
675
|
|
|
676
|
-
|
|
676
|
+
reasons: Joi.array().items(OrderModel.BagReasons()),
|
|
677
677
|
|
|
678
|
-
|
|
678
|
+
meta: OrderModel.BagReasonMeta(),
|
|
679
679
|
|
|
680
680
|
id: Joi.number(),
|
|
681
681
|
|
|
682
|
-
|
|
682
|
+
display_name: Joi.string().allow(""),
|
|
683
683
|
|
|
684
|
-
|
|
684
|
+
question_set: Joi.array().items(OrderModel.QuestionSet()),
|
|
685
685
|
});
|
|
686
686
|
}
|
|
687
687
|
|
|
688
688
|
static ShipmentBagReasons() {
|
|
689
689
|
return Joi.object({
|
|
690
|
-
reasons: Joi.array().items(OrderModel.BagReasons()),
|
|
691
|
-
|
|
692
690
|
success: Joi.boolean(),
|
|
691
|
+
|
|
692
|
+
reasons: Joi.array().items(OrderModel.BagReasons()),
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
695
|
|
|
696
696
|
static ShipmentReason() {
|
|
697
697
|
return Joi.object({
|
|
698
|
-
reason_text: Joi.string().allow(""),
|
|
699
|
-
|
|
700
|
-
flow: Joi.string().allow(""),
|
|
701
|
-
|
|
702
698
|
priority: Joi.number(),
|
|
703
699
|
|
|
704
700
|
show_text_area: Joi.boolean(),
|
|
705
701
|
|
|
706
|
-
|
|
702
|
+
flow: Joi.string().allow(""),
|
|
707
703
|
|
|
708
704
|
feedback_type: Joi.string().allow(""),
|
|
705
|
+
|
|
706
|
+
reason_text: Joi.string().allow(""),
|
|
707
|
+
|
|
708
|
+
reason_id: Joi.number(),
|
|
709
709
|
});
|
|
710
710
|
}
|
|
711
711
|
|
|
@@ -715,117 +715,117 @@ class OrderModel {
|
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
717
|
|
|
718
|
-
static
|
|
718
|
+
static ProductsDataUpdatesFilters() {
|
|
719
719
|
return Joi.object({
|
|
720
|
-
|
|
720
|
+
identifier: Joi.string().allow(""),
|
|
721
721
|
|
|
722
|
-
|
|
722
|
+
line_number: Joi.number(),
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
725
|
|
|
726
|
-
static
|
|
726
|
+
static ProductsDataUpdates() {
|
|
727
727
|
return Joi.object({
|
|
728
|
-
filters: Joi.array().items(
|
|
728
|
+
filters: Joi.array().items(OrderModel.ProductsDataUpdatesFilters()),
|
|
729
729
|
|
|
730
|
-
data:
|
|
730
|
+
data: Joi.any(),
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
733
|
|
|
734
|
-
static
|
|
734
|
+
static EntitiesDataUpdates() {
|
|
735
735
|
return Joi.object({
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
identifier: Joi.string().allow(""),
|
|
736
|
+
filters: Joi.array().items(Joi.any()),
|
|
739
737
|
|
|
740
|
-
|
|
738
|
+
data: Joi.any(),
|
|
741
739
|
});
|
|
742
740
|
}
|
|
743
741
|
|
|
744
|
-
static
|
|
742
|
+
static DataUpdates() {
|
|
745
743
|
return Joi.object({
|
|
746
|
-
|
|
744
|
+
products: Joi.array().items(OrderModel.ProductsDataUpdates()),
|
|
747
745
|
|
|
748
|
-
|
|
746
|
+
entities: Joi.array().items(OrderModel.EntitiesDataUpdates()),
|
|
749
747
|
});
|
|
750
748
|
}
|
|
751
749
|
|
|
752
|
-
static
|
|
750
|
+
static Products() {
|
|
753
751
|
return Joi.object({
|
|
754
|
-
|
|
752
|
+
identifier: Joi.string().allow(""),
|
|
755
753
|
|
|
756
|
-
|
|
754
|
+
line_number: Joi.number(),
|
|
755
|
+
|
|
756
|
+
quantity: Joi.number(),
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
759
|
|
|
760
|
-
static
|
|
760
|
+
static ProductsReasonsFilters() {
|
|
761
761
|
return Joi.object({
|
|
762
|
-
|
|
762
|
+
identifier: Joi.string().allow(""),
|
|
763
763
|
|
|
764
|
-
|
|
764
|
+
line_number: Joi.number(),
|
|
765
|
+
|
|
766
|
+
quantity: Joi.number(),
|
|
765
767
|
});
|
|
766
768
|
}
|
|
767
769
|
|
|
768
|
-
static
|
|
770
|
+
static ProductsReasonsData() {
|
|
769
771
|
return Joi.object({
|
|
770
|
-
|
|
772
|
+
reason_text: Joi.string().allow(""),
|
|
771
773
|
|
|
772
|
-
|
|
774
|
+
reason_id: Joi.number(),
|
|
773
775
|
});
|
|
774
776
|
}
|
|
775
777
|
|
|
776
|
-
static
|
|
778
|
+
static ProductsReasons() {
|
|
777
779
|
return Joi.object({
|
|
778
|
-
|
|
780
|
+
filters: Joi.array().items(OrderModel.ProductsReasonsFilters()),
|
|
779
781
|
|
|
780
|
-
|
|
782
|
+
data: OrderModel.ProductsReasonsData(),
|
|
781
783
|
});
|
|
782
784
|
}
|
|
783
785
|
|
|
784
|
-
static
|
|
786
|
+
static EntityReasonData() {
|
|
785
787
|
return Joi.object({
|
|
786
|
-
|
|
788
|
+
reason_text: Joi.string().allow(""),
|
|
787
789
|
|
|
788
|
-
|
|
790
|
+
reason_id: Joi.number(),
|
|
789
791
|
});
|
|
790
792
|
}
|
|
791
793
|
|
|
792
|
-
static
|
|
794
|
+
static EntitiesReasons() {
|
|
793
795
|
return Joi.object({
|
|
794
|
-
|
|
796
|
+
filters: Joi.array().items(Joi.any()),
|
|
795
797
|
|
|
796
|
-
|
|
798
|
+
data: OrderModel.EntityReasonData(),
|
|
797
799
|
});
|
|
798
800
|
}
|
|
799
801
|
|
|
800
|
-
static
|
|
802
|
+
static ReasonsData() {
|
|
801
803
|
return Joi.object({
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
identifier: Joi.string().allow(""),
|
|
804
|
+
products: Joi.array().items(OrderModel.ProductsReasons()),
|
|
805
805
|
|
|
806
|
-
|
|
806
|
+
entities: Joi.array().items(OrderModel.EntitiesReasons()),
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
809
|
|
|
810
810
|
static ShipmentsRequest() {
|
|
811
811
|
return Joi.object({
|
|
812
|
-
reasons: OrderModel.ReasonsData(),
|
|
813
|
-
|
|
814
|
-
identifier: Joi.string().allow("").required(),
|
|
815
|
-
|
|
816
812
|
data_updates: OrderModel.DataUpdates(),
|
|
817
813
|
|
|
818
814
|
products: Joi.array().items(OrderModel.Products()),
|
|
815
|
+
|
|
816
|
+
identifier: Joi.string().allow("").required(),
|
|
817
|
+
|
|
818
|
+
reasons: OrderModel.ReasonsData(),
|
|
819
819
|
});
|
|
820
820
|
}
|
|
821
821
|
|
|
822
822
|
static StatuesRequest() {
|
|
823
823
|
return Joi.object({
|
|
824
|
-
status: Joi.string().allow(""),
|
|
825
|
-
|
|
826
824
|
exclude_bags_next_state: Joi.string().allow(""),
|
|
827
825
|
|
|
828
826
|
shipments: Joi.array().items(OrderModel.ShipmentsRequest()),
|
|
827
|
+
|
|
828
|
+
status: Joi.string().allow(""),
|
|
829
829
|
});
|
|
830
830
|
}
|
|
831
831
|
|
|
@@ -835,11 +835,11 @@ class OrderModel {
|
|
|
835
835
|
|
|
836
836
|
statuses: Joi.array().items(OrderModel.StatuesRequest()),
|
|
837
837
|
|
|
838
|
+
unlock_before_transition: Joi.boolean(),
|
|
839
|
+
|
|
838
840
|
lock_after_transition: Joi.boolean(),
|
|
839
841
|
|
|
840
842
|
force_transition: Joi.boolean(),
|
|
841
|
-
|
|
842
|
-
unlock_before_transition: Joi.boolean(),
|
|
843
843
|
});
|
|
844
844
|
}
|
|
845
845
|
|
|
@@ -857,14 +857,14 @@ class OrderModel {
|
|
|
857
857
|
|
|
858
858
|
static ErrorResponse() {
|
|
859
859
|
return Joi.object({
|
|
860
|
-
message: Joi.string().allow("").allow(null),
|
|
861
|
-
|
|
862
|
-
status: Joi.number(),
|
|
863
|
-
|
|
864
860
|
exception: Joi.string().allow("").allow(null),
|
|
865
861
|
|
|
866
862
|
code: Joi.string().allow("").allow(null),
|
|
867
863
|
|
|
864
|
+
status: Joi.number(),
|
|
865
|
+
|
|
866
|
+
message: Joi.string().allow("").allow(null),
|
|
867
|
+
|
|
868
868
|
stack_trace: Joi.string().allow("").allow(null),
|
|
869
869
|
});
|
|
870
870
|
}
|