@gofynd/fdk-client-javascript 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/index.d.ts +4 -7
- package/index.js +5 -12
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +20 -20
- package/sdk/application/ApplicationClient.js +26 -26
- package/sdk/application/Cart/CartApplicationClient.d.ts +36 -6
- package/sdk/application/Cart/CartApplicationClient.js +105 -10
- package/sdk/application/Cart/CartApplicationModel.d.ts +9 -0
- package/sdk/application/Cart/CartApplicationModel.js +105 -1
- package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -0
- package/sdk/application/Cart/CartApplicationValidator.js +15 -1
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +3 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +2 -2
- package/sdk/application/Order/OrderApplicationClient.js +2 -2
- package/sdk/application/Order/OrderApplicationModel.js +18 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
- package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
- package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
- package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +6 -0
- package/sdk/application/PosCart/PosCartApplicationModel.js +63 -1
- package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
- package/sdk/application/index.d.ts +10 -10
- package/sdk/application/index.js +13 -13
- package/sdk/common/Constant.d.ts +5 -0
- package/sdk/common/Constant.js +5 -0
- package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +459 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +2480 -340
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +29 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +250 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +52 -0
- package/sdk/platform/Cart/CartPlatformModel.js +580 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +41 -29
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +26 -0
- package/sdk/platform/Content/ContentPlatformModel.js +3 -1
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +159 -79
- package/sdk/platform/Order/OrderPlatformClient.js +541 -114
- package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
- package/sdk/platform/Order/OrderPlatformModel.js +569 -159
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +51 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
- package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
- package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +410 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +1149 -938
- package/sdk/platform/PlatformApplicationClient.js +1259 -1035
- package/sdk/platform/PlatformClient.d.ts +9888 -8286
- package/sdk/platform/PlatformClient.js +10960 -9038
- package/sdk/platform/index.d.ts +15 -14
- package/sdk/platform/index.js +20 -18
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +2 -2
- package/partner.d.ts +0 -4
- package/partner.js +0 -7
- package/sdk/partner/OAuthClient.d.ts +0 -14
- package/sdk/partner/OAuthClient.js +0 -112
- package/sdk/partner/PartnerAPIClient.d.ts +0 -12
- package/sdk/partner/PartnerAPIClient.js +0 -42
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -17
- package/sdk/partner/PartnerConfig.d.ts +0 -30
- package/sdk/partner/PartnerConfig.js +0 -39
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -5
|
@@ -9,6 +9,17 @@ class OrderModel {
|
|
|
9
9
|
slug: Joi.string().allow("").required(),
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
+
static AdvanceFilterInfo() {
|
|
13
|
+
return Joi.object({
|
|
14
|
+
action_centre: Joi.array().items(OrderModel.FiltersInfo()),
|
|
15
|
+
applied_filters: Joi.any(),
|
|
16
|
+
filters: Joi.array().items(OrderModel.FiltersInfo()),
|
|
17
|
+
page: Joi.any(),
|
|
18
|
+
processed: Joi.array().items(OrderModel.FiltersInfo()),
|
|
19
|
+
returned: Joi.array().items(OrderModel.FiltersInfo()),
|
|
20
|
+
unfulfilled: Joi.array().items(OrderModel.FiltersInfo()),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
12
23
|
static Affiliate() {
|
|
13
24
|
return Joi.object({
|
|
14
25
|
config: OrderModel.AffiliateConfig(),
|
|
@@ -71,6 +82,12 @@ class OrderModel {
|
|
|
71
82
|
loyalty_discount: Joi.number(),
|
|
72
83
|
});
|
|
73
84
|
}
|
|
85
|
+
static AffiliateBagsDetails() {
|
|
86
|
+
return Joi.object({
|
|
87
|
+
affiliate_bag_id: Joi.string().allow(""),
|
|
88
|
+
coupon_code: Joi.string().allow("").allow(null),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
74
91
|
static AffiliateConfig() {
|
|
75
92
|
return Joi.object({
|
|
76
93
|
app: OrderModel.AffiliateAppConfig(),
|
|
@@ -188,11 +205,12 @@ class OrderModel {
|
|
|
188
205
|
a_set: Joi.any().allow(null),
|
|
189
206
|
child_details: Joi.any().allow(null),
|
|
190
207
|
code: Joi.string().allow(""),
|
|
208
|
+
currency: Joi.any().allow(null),
|
|
191
209
|
dimensions: OrderModel.Dimensions(),
|
|
192
|
-
esp_modified: Joi.
|
|
193
|
-
identifiers:
|
|
210
|
+
esp_modified: Joi.boolean().allow(null),
|
|
211
|
+
identifiers: Joi.any().required(),
|
|
194
212
|
is_set: Joi.boolean(),
|
|
195
|
-
raw_meta: Joi.
|
|
213
|
+
raw_meta: Joi.string().allow("").allow(null),
|
|
196
214
|
return_config: OrderModel.ReturnConfig(),
|
|
197
215
|
seller_identifier: Joi.string().allow("").required(),
|
|
198
216
|
size: Joi.string().allow("").required(),
|
|
@@ -201,11 +219,6 @@ class OrderModel {
|
|
|
201
219
|
});
|
|
202
220
|
}
|
|
203
221
|
static ArticleDetails() {
|
|
204
|
-
return Joi.object({
|
|
205
|
-
status: Joi.any(),
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
static ArticleDetails1() {
|
|
209
222
|
return Joi.object({
|
|
210
223
|
_id: Joi.string().allow("").required(),
|
|
211
224
|
attributes: Joi.any().required(),
|
|
@@ -216,6 +229,37 @@ class OrderModel {
|
|
|
216
229
|
weight: Joi.any().required(),
|
|
217
230
|
});
|
|
218
231
|
}
|
|
232
|
+
static ArticleDetails1() {
|
|
233
|
+
return Joi.object({
|
|
234
|
+
status: Joi.any(),
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
static AttachOrderUser() {
|
|
238
|
+
return Joi.object({
|
|
239
|
+
fynd_order_id: Joi.string().allow("").required(),
|
|
240
|
+
otp_data: OrderModel.AttachUserOtpData().required(),
|
|
241
|
+
user_info: OrderModel.AttachUserInfo().required(),
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
static AttachOrderUserResponse() {
|
|
245
|
+
return Joi.object({
|
|
246
|
+
message: Joi.string().allow(""),
|
|
247
|
+
success: Joi.boolean(),
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
static AttachUserInfo() {
|
|
251
|
+
return Joi.object({
|
|
252
|
+
country_code: Joi.string().allow(""),
|
|
253
|
+
first_name: Joi.string().allow("").required(),
|
|
254
|
+
last_name: Joi.string().allow("").required(),
|
|
255
|
+
mobile: Joi.string().allow("").required(),
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
static AttachUserOtpData() {
|
|
259
|
+
return Joi.object({
|
|
260
|
+
request_id: Joi.string().allow("").required(),
|
|
261
|
+
});
|
|
262
|
+
}
|
|
219
263
|
static Attributes() {
|
|
220
264
|
return Joi.object({
|
|
221
265
|
brand_name: Joi.string().allow(""),
|
|
@@ -251,29 +295,26 @@ class OrderModel {
|
|
|
251
295
|
}
|
|
252
296
|
static BagDetailsPlatformResponse() {
|
|
253
297
|
return Joi.object({
|
|
254
|
-
affiliate_bag_details: OrderModel.AffiliateBagDetails()
|
|
298
|
+
affiliate_bag_details: OrderModel.AffiliateBagDetails(),
|
|
255
299
|
affiliate_details: OrderModel.AffiliateDetails(),
|
|
256
300
|
applied_promos: Joi.array().items(Joi.any()),
|
|
257
|
-
article: OrderModel.Article()
|
|
258
|
-
article_details: OrderModel.
|
|
259
|
-
|
|
260
|
-
b_type: Joi.string().allow(""),
|
|
261
|
-
bag_status: Joi.array().items(OrderModel.BagStatusHistory()).required(),
|
|
301
|
+
article: OrderModel.Article(),
|
|
302
|
+
article_details: OrderModel.ArticleDetails1(),
|
|
303
|
+
bag_status: Joi.array().items(OrderModel.BagStatusHistory()),
|
|
262
304
|
bag_status_history: OrderModel.BagStatusHistory(),
|
|
263
305
|
bag_update_time: Joi.number(),
|
|
264
|
-
brand: OrderModel.Brand()
|
|
265
|
-
current_operational_status: OrderModel.BagStatusHistory()
|
|
266
|
-
current_status: OrderModel.BagStatusHistory()
|
|
306
|
+
brand: OrderModel.Brand(),
|
|
307
|
+
current_operational_status: OrderModel.BagStatusHistory(),
|
|
308
|
+
current_status: OrderModel.BagStatusHistory(),
|
|
267
309
|
dates: OrderModel.Dates(),
|
|
268
310
|
display_name: Joi.string().allow(""),
|
|
269
311
|
entity_type: Joi.string().allow(""),
|
|
270
|
-
financial_breakup: Joi.array()
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
gst_details: OrderModel.BagGSTDetails().required(),
|
|
312
|
+
financial_breakup: Joi.array().items(OrderModel.FinancialBreakup()),
|
|
313
|
+
gst_details: OrderModel.BagGSTDetails(),
|
|
314
|
+
id: Joi.number(),
|
|
274
315
|
identifier: Joi.string().allow(""),
|
|
275
|
-
item: OrderModel.Item()
|
|
276
|
-
journey_type: Joi.string().allow("")
|
|
316
|
+
item: OrderModel.Item(),
|
|
317
|
+
journey_type: Joi.string().allow(""),
|
|
277
318
|
line_number: Joi.number(),
|
|
278
319
|
meta: OrderModel.BagMeta(),
|
|
279
320
|
no_of_bags_order: Joi.number(),
|
|
@@ -282,7 +323,7 @@ class OrderModel {
|
|
|
282
323
|
ordering_store: OrderModel.Store(),
|
|
283
324
|
original_bag_list: Joi.array().items(Joi.number()),
|
|
284
325
|
parent_promo_bags: Joi.any(),
|
|
285
|
-
prices: OrderModel.Prices()
|
|
326
|
+
prices: OrderModel.Prices(),
|
|
286
327
|
qc_required: Joi.any(),
|
|
287
328
|
quantity: Joi.number(),
|
|
288
329
|
reasons: Joi.array().items(Joi.any()),
|
|
@@ -290,19 +331,28 @@ class OrderModel {
|
|
|
290
331
|
restore_promos: Joi.any(),
|
|
291
332
|
seller_identifier: Joi.string().allow(""),
|
|
292
333
|
shipment_id: Joi.string().allow(""),
|
|
293
|
-
status: OrderModel.
|
|
334
|
+
status: OrderModel.BagReturnableCancelableStatus1(),
|
|
294
335
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
336
|
+
type: Joi.string().allow(""),
|
|
295
337
|
});
|
|
296
338
|
}
|
|
297
339
|
static BagGST() {
|
|
298
340
|
return Joi.object({
|
|
299
341
|
brand_calculated_amount: Joi.number(),
|
|
342
|
+
cgst_gst_fee: Joi.string().allow(""),
|
|
343
|
+
cgst_tax_percentage: Joi.number(),
|
|
300
344
|
gst_fee: Joi.number(),
|
|
301
345
|
gst_tag: Joi.string().allow(""),
|
|
302
346
|
gst_tax_percentage: Joi.number(),
|
|
303
347
|
gstin_code: Joi.string().allow(""),
|
|
304
348
|
hsn_code: Joi.string().allow(""),
|
|
349
|
+
hsn_code_id: Joi.string().allow(""),
|
|
350
|
+
igst_gst_fee: Joi.string().allow(""),
|
|
351
|
+
igst_tax_percentage: Joi.number(),
|
|
305
352
|
is_default_hsn_code: Joi.boolean(),
|
|
353
|
+
sgst_gst_fee: Joi.string().allow(""),
|
|
354
|
+
sgst_tax_percentage: Joi.number(),
|
|
355
|
+
tax_collected_at_source: Joi.number(),
|
|
306
356
|
value_of_good: Joi.number(),
|
|
307
357
|
});
|
|
308
358
|
}
|
|
@@ -329,6 +379,19 @@ class OrderModel {
|
|
|
329
379
|
static BagMeta() {
|
|
330
380
|
return Joi.object({
|
|
331
381
|
b2b_po_details: OrderModel.B2BPODetails(),
|
|
382
|
+
custom_json: Joi.any(),
|
|
383
|
+
custom_message: Joi.string().allow(""),
|
|
384
|
+
docket_number: Joi.string().allow(""),
|
|
385
|
+
extra_meta: Joi.any(),
|
|
386
|
+
gift_card: OrderModel.GiftCard(),
|
|
387
|
+
group_id: Joi.string().allow(""),
|
|
388
|
+
partial_can_ret: Joi.boolean(),
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
static BagPaymentMethods() {
|
|
392
|
+
return Joi.object({
|
|
393
|
+
amount: Joi.number(),
|
|
394
|
+
mode: Joi.string().allow(""),
|
|
332
395
|
});
|
|
333
396
|
}
|
|
334
397
|
static BagReturnableCancelableStatus() {
|
|
@@ -340,6 +403,15 @@ class OrderModel {
|
|
|
340
403
|
is_returnable: Joi.boolean().required(),
|
|
341
404
|
});
|
|
342
405
|
}
|
|
406
|
+
static BagReturnableCancelableStatus1() {
|
|
407
|
+
return Joi.object({
|
|
408
|
+
can_be_cancelled: Joi.boolean().required(),
|
|
409
|
+
enable_tracking: Joi.boolean().required(),
|
|
410
|
+
is_active: Joi.boolean().required(),
|
|
411
|
+
is_customer_return_allowed: Joi.boolean().required(),
|
|
412
|
+
is_returnable: Joi.boolean().required(),
|
|
413
|
+
});
|
|
414
|
+
}
|
|
343
415
|
static Bags() {
|
|
344
416
|
return Joi.object({
|
|
345
417
|
affiliate_bag_id: Joi.string().allow(""),
|
|
@@ -348,13 +420,22 @@ class OrderModel {
|
|
|
348
420
|
is_locked: Joi.boolean(),
|
|
349
421
|
});
|
|
350
422
|
}
|
|
423
|
+
static BagsPage() {
|
|
424
|
+
return Joi.object({
|
|
425
|
+
current: Joi.number().required(),
|
|
426
|
+
has_next: Joi.boolean().required(),
|
|
427
|
+
item_total: Joi.number().required(),
|
|
428
|
+
page_type: Joi.string().allow("").required(),
|
|
429
|
+
size: Joi.number().required(),
|
|
430
|
+
});
|
|
431
|
+
}
|
|
351
432
|
static BagStateMapper() {
|
|
352
433
|
return Joi.object({
|
|
353
434
|
app_display_name: Joi.string().allow(""),
|
|
354
435
|
app_facing: Joi.boolean(),
|
|
355
436
|
app_state_name: Joi.string().allow(""),
|
|
356
|
-
bs_id: Joi.number().required(),
|
|
357
437
|
display_name: Joi.string().allow("").required(),
|
|
438
|
+
id: Joi.number().required(),
|
|
358
439
|
is_active: Joi.boolean(),
|
|
359
440
|
journey_type: Joi.string().allow("").required(),
|
|
360
441
|
name: Joi.string().allow("").required(),
|
|
@@ -391,17 +472,32 @@ class OrderModel {
|
|
|
391
472
|
}
|
|
392
473
|
static BagUnit() {
|
|
393
474
|
return Joi.object({
|
|
475
|
+
affiliate_bag_details: OrderModel.AffiliateBagDetails(),
|
|
476
|
+
article: OrderModel.Article(),
|
|
477
|
+
bag_expiry_date: Joi.string().allow("").allow(null),
|
|
394
478
|
bag_id: Joi.number().required(),
|
|
479
|
+
bag_status: Joi.array().items(OrderModel.BagStatusHistory()),
|
|
480
|
+
bag_type: Joi.string().allow(""),
|
|
481
|
+
brand: OrderModel.ShipmentListingBrand(),
|
|
395
482
|
can_cancel: Joi.boolean(),
|
|
396
483
|
can_return: Joi.boolean(),
|
|
484
|
+
current_operational_status: OrderModel.BagStatusHistory().required(),
|
|
485
|
+
current_status: OrderModel.BagStatusHistory().required(),
|
|
486
|
+
dates: OrderModel.Dates(),
|
|
487
|
+
display_name: Joi.string().allow(""),
|
|
488
|
+
entity_type: Joi.string().allow(""),
|
|
489
|
+
financial_breakup: Joi.array()
|
|
490
|
+
.items(OrderModel.FinancialBreakup())
|
|
491
|
+
.required(),
|
|
397
492
|
gst: OrderModel.GSTDetailsData(),
|
|
398
493
|
item: OrderModel.PlatformItem(),
|
|
399
|
-
|
|
400
|
-
|
|
494
|
+
line_number: Joi.number(),
|
|
495
|
+
meta: Joi.any(),
|
|
401
496
|
prices: OrderModel.Prices(),
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
497
|
+
product_quantity: Joi.number().required(),
|
|
498
|
+
reasons: Joi.array().items(Joi.any()),
|
|
499
|
+
size: Joi.string().allow(""),
|
|
500
|
+
status: OrderModel.BagReturnableCancelableStatus().required(),
|
|
405
501
|
});
|
|
406
502
|
}
|
|
407
503
|
static BaseResponse() {
|
|
@@ -437,11 +533,11 @@ class OrderModel {
|
|
|
437
533
|
}
|
|
438
534
|
static BillingStaffDetails() {
|
|
439
535
|
return Joi.object({
|
|
440
|
-
employee_code: Joi.string().allow(""),
|
|
441
|
-
first_name: Joi.string().allow(""),
|
|
442
|
-
last_name: Joi.string().allow(""),
|
|
443
|
-
staff_id: Joi.number(),
|
|
444
|
-
user: Joi.string().allow(""),
|
|
536
|
+
employee_code: Joi.string().allow("").allow(null),
|
|
537
|
+
first_name: Joi.string().allow("").allow(null),
|
|
538
|
+
last_name: Joi.string().allow("").allow(null),
|
|
539
|
+
staff_id: Joi.number().allow(null),
|
|
540
|
+
user: Joi.string().allow("").allow(null),
|
|
445
541
|
});
|
|
446
542
|
}
|
|
447
543
|
static Brand() {
|
|
@@ -520,7 +616,7 @@ class OrderModel {
|
|
|
520
616
|
static CompanyDetails() {
|
|
521
617
|
return Joi.object({
|
|
522
618
|
address: Joi.any(),
|
|
523
|
-
company_cin: Joi.string().allow(""),
|
|
619
|
+
company_cin: Joi.string().allow("").allow(null),
|
|
524
620
|
company_contact: OrderModel.ContactDetails(),
|
|
525
621
|
company_gst: Joi.string().allow(""),
|
|
526
622
|
company_id: Joi.number(),
|
|
@@ -606,32 +702,40 @@ class OrderModel {
|
|
|
606
702
|
fynd_order_id: Joi.string().allow("").required(),
|
|
607
703
|
});
|
|
608
704
|
}
|
|
705
|
+
static CreditBalanceInfo() {
|
|
706
|
+
return Joi.object({
|
|
707
|
+
customer_mobile_number: Joi.string().allow(""),
|
|
708
|
+
reason: Joi.string().allow(""),
|
|
709
|
+
total_credited_balance: Joi.string().allow(""),
|
|
710
|
+
});
|
|
711
|
+
}
|
|
609
712
|
static CurrentStatus() {
|
|
610
713
|
return Joi.object({
|
|
611
714
|
bag_id: Joi.number(),
|
|
612
715
|
bag_state_mapper: OrderModel.BagStateMapper(),
|
|
613
716
|
created_at: Joi.string().allow("").allow(null),
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
717
|
+
delivery_awb_number: Joi.string().allow("").allow(null),
|
|
718
|
+
delivery_partner_id: Joi.number().allow(null),
|
|
719
|
+
id: Joi.number().required(),
|
|
617
720
|
kafka_sync: Joi.boolean(),
|
|
618
721
|
shipment_id: Joi.string().allow(""),
|
|
619
722
|
state_id: Joi.number(),
|
|
620
723
|
state_type: Joi.string().allow(""),
|
|
621
724
|
status: Joi.string().allow(""),
|
|
622
725
|
store_id: Joi.number(),
|
|
623
|
-
updated_at: Joi.
|
|
726
|
+
updated_at: Joi.number(),
|
|
624
727
|
});
|
|
625
728
|
}
|
|
626
729
|
static DataUpdates() {
|
|
627
730
|
return Joi.object({
|
|
628
731
|
entities: Joi.array().items(OrderModel.EntitiesDataUpdates()),
|
|
732
|
+
order_item_status: Joi.array().items(OrderModel.OrderItemDataUpdates()),
|
|
629
733
|
products: Joi.array().items(OrderModel.ProductsDataUpdates()),
|
|
630
734
|
});
|
|
631
735
|
}
|
|
632
736
|
static Dates() {
|
|
633
737
|
return Joi.object({
|
|
634
|
-
delivery_date: Joi.
|
|
738
|
+
delivery_date: Joi.string().allow("").allow(null),
|
|
635
739
|
order_created: Joi.string().allow(""),
|
|
636
740
|
});
|
|
637
741
|
}
|
|
@@ -640,6 +744,15 @@ class OrderModel {
|
|
|
640
744
|
stormbreaker_uuid: Joi.string().allow(""),
|
|
641
745
|
});
|
|
642
746
|
}
|
|
747
|
+
static Dimension() {
|
|
748
|
+
return Joi.object({
|
|
749
|
+
height: Joi.string().allow(""),
|
|
750
|
+
length: Joi.number(),
|
|
751
|
+
packaging_type: Joi.string().allow(""),
|
|
752
|
+
weight: Joi.string().allow(""),
|
|
753
|
+
width: Joi.number(),
|
|
754
|
+
});
|
|
755
|
+
}
|
|
643
756
|
static Dimensions() {
|
|
644
757
|
return Joi.object({
|
|
645
758
|
height: Joi.number(),
|
|
@@ -676,12 +789,12 @@ class OrderModel {
|
|
|
676
789
|
}
|
|
677
790
|
static DPDetailsData() {
|
|
678
791
|
return Joi.object({
|
|
679
|
-
awb_no: Joi.string().allow(""),
|
|
792
|
+
awb_no: Joi.string().allow("").allow(null),
|
|
680
793
|
country: Joi.string().allow(""),
|
|
681
794
|
eway_bill_id: Joi.string().allow("").allow(null),
|
|
682
795
|
gst_tag: Joi.string().allow(""),
|
|
683
|
-
id: Joi.number(),
|
|
684
|
-
name: Joi.string().allow(""),
|
|
796
|
+
id: Joi.number().allow(null),
|
|
797
|
+
name: Joi.string().allow("").allow(null),
|
|
685
798
|
pincode: Joi.string().allow(""),
|
|
686
799
|
track_url: Joi.string().allow("").allow(null),
|
|
687
800
|
});
|
|
@@ -740,49 +853,53 @@ class OrderModel {
|
|
|
740
853
|
});
|
|
741
854
|
}
|
|
742
855
|
static ErrorResponse() {
|
|
856
|
+
return Joi.object({
|
|
857
|
+
error_trace: Joi.string().allow(""),
|
|
858
|
+
message: Joi.string().allow(""),
|
|
859
|
+
status: Joi.number(),
|
|
860
|
+
success: Joi.boolean(),
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
static ErrorResponse1() {
|
|
743
864
|
return Joi.object({
|
|
744
865
|
error: Joi.string().allow("").required(),
|
|
745
866
|
message: Joi.string().allow("").required(),
|
|
746
867
|
});
|
|
747
868
|
}
|
|
748
|
-
static
|
|
869
|
+
static FetchCreditBalanceRequestPayload() {
|
|
749
870
|
return Joi.object({
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
success: Joi.boolean(),
|
|
871
|
+
affiliate_id: Joi.string().allow("").required(),
|
|
872
|
+
customer_mobile_number: Joi.string().allow("").required(),
|
|
873
|
+
seller_id: Joi.string().allow("").required(),
|
|
754
874
|
});
|
|
755
875
|
}
|
|
756
|
-
static
|
|
876
|
+
static FetchCreditBalanceResponsePayload() {
|
|
757
877
|
return Joi.object({
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
file_name: Joi.string().allow(""),
|
|
761
|
-
file_path: Joi.string().allow(""),
|
|
762
|
-
method: Joi.string().allow(""),
|
|
763
|
-
namespace: Joi.string().allow(""),
|
|
764
|
-
operation: Joi.string().allow(""),
|
|
765
|
-
size: Joi.number(),
|
|
766
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
767
|
-
upload: OrderModel.FileUploadResponse(),
|
|
878
|
+
data: OrderModel.CreditBalanceInfo().required(),
|
|
879
|
+
success: Joi.boolean().required(),
|
|
768
880
|
});
|
|
769
881
|
}
|
|
770
|
-
static
|
|
882
|
+
static FileResponse() {
|
|
771
883
|
return Joi.object({
|
|
772
|
-
|
|
773
|
-
|
|
884
|
+
cdn: OrderModel.URL(),
|
|
885
|
+
file_name: Joi.string().allow(""),
|
|
774
886
|
});
|
|
775
887
|
}
|
|
776
888
|
static FilterInfoOption() {
|
|
777
889
|
return Joi.object({
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
890
|
+
min_search_size: Joi.number(),
|
|
891
|
+
name: Joi.string().allow("").allow(null),
|
|
892
|
+
placeholder_text: Joi.string().allow(""),
|
|
893
|
+
show_ui: Joi.boolean(),
|
|
894
|
+
text: Joi.string().allow("").allow(null),
|
|
895
|
+
value: Joi.string().allow("").allow(null),
|
|
781
896
|
});
|
|
782
897
|
}
|
|
783
898
|
static FiltersInfo() {
|
|
784
899
|
return Joi.object({
|
|
785
900
|
options: Joi.array().items(OrderModel.FilterInfoOption()),
|
|
901
|
+
placeholder_text: Joi.string().allow(""),
|
|
902
|
+
required: Joi.boolean(),
|
|
786
903
|
text: Joi.string().allow("").required(),
|
|
787
904
|
type: Joi.string().allow("").required(),
|
|
788
905
|
value: Joi.string().allow("").required(),
|
|
@@ -790,7 +907,8 @@ class OrderModel {
|
|
|
790
907
|
}
|
|
791
908
|
static FiltersResponse() {
|
|
792
909
|
return Joi.object({
|
|
793
|
-
|
|
910
|
+
advance_filter: OrderModel.AdvanceFilterInfo(),
|
|
911
|
+
global_filter: Joi.array().items(OrderModel.FiltersInfo()),
|
|
794
912
|
});
|
|
795
913
|
}
|
|
796
914
|
static FinancialBreakup() {
|
|
@@ -826,8 +944,8 @@ class OrderModel {
|
|
|
826
944
|
}
|
|
827
945
|
static Formatted() {
|
|
828
946
|
return Joi.object({
|
|
829
|
-
|
|
830
|
-
|
|
947
|
+
max: Joi.string().allow(""),
|
|
948
|
+
min: Joi.string().allow(""),
|
|
831
949
|
});
|
|
832
950
|
}
|
|
833
951
|
static FulfillingStore() {
|
|
@@ -851,9 +969,19 @@ class OrderModel {
|
|
|
851
969
|
fynd_order_id: Joi.array().items(Joi.string().allow("")),
|
|
852
970
|
});
|
|
853
971
|
}
|
|
972
|
+
static GeneratePosOrderReceiptResponse() {
|
|
973
|
+
return Joi.object({
|
|
974
|
+
customer_cn_receipt: Joi.string().allow(""),
|
|
975
|
+
invoice_receipt: Joi.string().allow(""),
|
|
976
|
+
merchant_cn_receipt: Joi.string().allow(""),
|
|
977
|
+
order_id: Joi.string().allow(""),
|
|
978
|
+
payment_receipt: Joi.string().allow(""),
|
|
979
|
+
success: Joi.boolean(),
|
|
980
|
+
});
|
|
981
|
+
}
|
|
854
982
|
static GetActionsResponse() {
|
|
855
983
|
return Joi.object({
|
|
856
|
-
permissions:
|
|
984
|
+
permissions: Joi.array().items(OrderModel.ActionInfo()),
|
|
857
985
|
});
|
|
858
986
|
}
|
|
859
987
|
static GetBagsPlatformResponse() {
|
|
@@ -861,14 +989,33 @@ class OrderModel {
|
|
|
861
989
|
items: Joi.array()
|
|
862
990
|
.items(OrderModel.BagDetailsPlatformResponse())
|
|
863
991
|
.required(),
|
|
864
|
-
page: OrderModel.
|
|
992
|
+
page: OrderModel.BagsPage().required(),
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
static GiftCard() {
|
|
996
|
+
return Joi.object({
|
|
997
|
+
display_text: Joi.string().allow(""),
|
|
998
|
+
gift_message: Joi.string().allow(""),
|
|
999
|
+
gift_price: Joi.number(),
|
|
1000
|
+
is_gift_applied: Joi.boolean(),
|
|
865
1001
|
});
|
|
866
1002
|
}
|
|
867
1003
|
static GSTDetailsData() {
|
|
868
1004
|
return Joi.object({
|
|
869
1005
|
brand_calculated_amount: Joi.number().required(),
|
|
1006
|
+
cgst_gst_fee: Joi.string().allow(""),
|
|
1007
|
+
cgst_tax_percentage: Joi.number(),
|
|
870
1008
|
gst_fee: Joi.number().required(),
|
|
871
|
-
|
|
1009
|
+
gst_tag: Joi.string().allow(""),
|
|
1010
|
+
gst_tax_percentage: Joi.number(),
|
|
1011
|
+
gstin_code: Joi.string().allow("").allow(null).required(),
|
|
1012
|
+
hsn_code: Joi.string().allow(""),
|
|
1013
|
+
hsn_code_id: Joi.string().allow(""),
|
|
1014
|
+
igst_gst_fee: Joi.string().allow(""),
|
|
1015
|
+
igst_tax_percentage: Joi.number(),
|
|
1016
|
+
is_default_hsn_code: Joi.boolean(),
|
|
1017
|
+
sgst_gst_fee: Joi.string().allow(""),
|
|
1018
|
+
sgst_tax_percentage: Joi.number(),
|
|
872
1019
|
tax_collected_at_source: Joi.number().required(),
|
|
873
1020
|
value_of_good: Joi.number().required(),
|
|
874
1021
|
});
|
|
@@ -883,16 +1030,57 @@ class OrderModel {
|
|
|
883
1030
|
l2_detail: Joi.string().allow(""),
|
|
884
1031
|
l3_detail: Joi.string().allow(""),
|
|
885
1032
|
message: Joi.string().allow("").required(),
|
|
886
|
-
meta:
|
|
1033
|
+
meta: OrderModel.HistoryMeta(),
|
|
887
1034
|
ticket_id: Joi.string().allow(""),
|
|
888
1035
|
ticket_url: Joi.string().allow(""),
|
|
889
1036
|
type: Joi.string().allow("").required(),
|
|
890
1037
|
user: Joi.string().allow("").required(),
|
|
891
1038
|
});
|
|
892
1039
|
}
|
|
1040
|
+
static HistoryMeta() {
|
|
1041
|
+
return Joi.object({
|
|
1042
|
+
activity_comment: Joi.string().allow("").allow(null),
|
|
1043
|
+
activity_type: Joi.string().allow("").allow(null),
|
|
1044
|
+
billsec: Joi.string().allow("").allow(null),
|
|
1045
|
+
call_id: Joi.string().allow("").allow(null),
|
|
1046
|
+
caller: Joi.string().allow("").allow(null),
|
|
1047
|
+
callerid: Joi.string().allow("").allow(null),
|
|
1048
|
+
channel_type: Joi.string().allow("").allow(null),
|
|
1049
|
+
duration: Joi.string().allow("").allow(null),
|
|
1050
|
+
endtime: Joi.string().allow("").allow(null),
|
|
1051
|
+
message: Joi.string().allow("").allow(null),
|
|
1052
|
+
reason: OrderModel.HistoryReason(),
|
|
1053
|
+
receiver: Joi.string().allow("").allow(null),
|
|
1054
|
+
recipient: Joi.string().allow("").allow(null),
|
|
1055
|
+
recordpath: Joi.string().allow("").allow(null),
|
|
1056
|
+
short_link: Joi.string().allow("").allow(null),
|
|
1057
|
+
slug: Joi.string().allow("").allow(null),
|
|
1058
|
+
starttime: Joi.string().allow("").allow(null),
|
|
1059
|
+
status: Joi.string().allow("").allow(null),
|
|
1060
|
+
status1: Joi.string().allow("").allow(null),
|
|
1061
|
+
status2: Joi.string().allow("").allow(null),
|
|
1062
|
+
store_code: Joi.string().allow("").allow(null),
|
|
1063
|
+
store_id: Joi.number().allow(null),
|
|
1064
|
+
store_name: Joi.string().allow("").allow(null),
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
static HistoryReason() {
|
|
1068
|
+
return Joi.object({
|
|
1069
|
+
category: Joi.string().allow("").allow(null),
|
|
1070
|
+
code: Joi.number().allow(null),
|
|
1071
|
+
dislay_name: Joi.string().allow("").allow(null),
|
|
1072
|
+
quantity: Joi.number().allow(null),
|
|
1073
|
+
state: Joi.string().allow("").allow(null),
|
|
1074
|
+
text: Joi.string().allow("").allow(null),
|
|
1075
|
+
});
|
|
1076
|
+
}
|
|
893
1077
|
static Identifier() {
|
|
894
1078
|
return Joi.object({
|
|
1079
|
+
alu: Joi.string().allow(""),
|
|
895
1080
|
ean: Joi.string().allow(""),
|
|
1081
|
+
isbn: Joi.string().allow(""),
|
|
1082
|
+
sku_code: Joi.string().allow(""),
|
|
1083
|
+
upc: Joi.string().allow(""),
|
|
896
1084
|
});
|
|
897
1085
|
}
|
|
898
1086
|
static InvalidateShipmentCacheNestedResponse() {
|
|
@@ -919,10 +1107,11 @@ class OrderModel {
|
|
|
919
1107
|
}
|
|
920
1108
|
static InvoiceInfo() {
|
|
921
1109
|
return Joi.object({
|
|
922
|
-
credit_note_id: Joi.string().allow(""),
|
|
1110
|
+
credit_note_id: Joi.string().allow("").allow(null),
|
|
1111
|
+
external_invoice_id: Joi.string().allow(""),
|
|
923
1112
|
invoice_url: Joi.string().allow(""),
|
|
924
1113
|
label_url: Joi.string().allow(""),
|
|
925
|
-
store_invoice_id: Joi.string().allow(""),
|
|
1114
|
+
store_invoice_id: Joi.string().allow("").allow(null),
|
|
926
1115
|
updated_date: Joi.string().allow(""),
|
|
927
1116
|
});
|
|
928
1117
|
}
|
|
@@ -976,7 +1165,7 @@ class OrderModel {
|
|
|
976
1165
|
}
|
|
977
1166
|
static LocationDetails() {
|
|
978
1167
|
return Joi.object({
|
|
979
|
-
articles: Joi.array().items(OrderModel.
|
|
1168
|
+
articles: Joi.array().items(OrderModel.ArticleDetails()).required(),
|
|
980
1169
|
fulfillment_id: Joi.number().required(),
|
|
981
1170
|
fulfillment_type: Joi.string().allow("").required(),
|
|
982
1171
|
});
|
|
@@ -995,11 +1184,6 @@ class OrderModel {
|
|
|
995
1184
|
});
|
|
996
1185
|
}
|
|
997
1186
|
static Meta() {
|
|
998
|
-
return Joi.object({
|
|
999
|
-
dimension: OrderModel.Dimensions(),
|
|
1000
|
-
});
|
|
1001
|
-
}
|
|
1002
|
-
static Meta1() {
|
|
1003
1187
|
return Joi.object({
|
|
1004
1188
|
kafka_emission_status: Joi.number(),
|
|
1005
1189
|
state_manager_used: Joi.string().allow(""),
|
|
@@ -1008,12 +1192,14 @@ class OrderModel {
|
|
|
1008
1192
|
static OrderBagArticle() {
|
|
1009
1193
|
return Joi.object({
|
|
1010
1194
|
identifiers: Joi.any(),
|
|
1011
|
-
return_config:
|
|
1195
|
+
return_config: OrderModel.ReturnConfig1(),
|
|
1196
|
+
size: Joi.string().allow(""),
|
|
1012
1197
|
uid: Joi.string().allow(""),
|
|
1013
1198
|
});
|
|
1014
1199
|
}
|
|
1015
1200
|
static OrderBags() {
|
|
1016
1201
|
return Joi.object({
|
|
1202
|
+
affiliate_bag_details: OrderModel.AffiliateBagsDetails(),
|
|
1017
1203
|
applied_promos: Joi.array().items(OrderModel.AppliedPromos()),
|
|
1018
1204
|
article: OrderModel.OrderBagArticle(),
|
|
1019
1205
|
bag_configs: OrderModel.BagConfigs(),
|
|
@@ -1026,11 +1212,14 @@ class OrderModel {
|
|
|
1026
1212
|
display_name: Joi.string().allow(""),
|
|
1027
1213
|
entity_type: Joi.string().allow(""),
|
|
1028
1214
|
financial_breakup: OrderModel.FinancialBreakup(),
|
|
1215
|
+
group_id: Joi.string().allow(""),
|
|
1029
1216
|
gst_details: OrderModel.BagGST(),
|
|
1030
1217
|
identifier: Joi.string().allow(""),
|
|
1031
1218
|
item: OrderModel.PlatformItem(),
|
|
1032
1219
|
line_number: Joi.number(),
|
|
1220
|
+
meta: OrderModel.BagMeta(),
|
|
1033
1221
|
parent_promo_bags: Joi.any(),
|
|
1222
|
+
payment_methods: Joi.array().items(OrderModel.BagPaymentMethods()),
|
|
1034
1223
|
prices: OrderModel.Prices(),
|
|
1035
1224
|
quantity: Joi.number(),
|
|
1036
1225
|
seller_identifier: Joi.string().allow(""),
|
|
@@ -1038,11 +1227,11 @@ class OrderModel {
|
|
|
1038
1227
|
}
|
|
1039
1228
|
static OrderBrandName() {
|
|
1040
1229
|
return Joi.object({
|
|
1041
|
-
brand_name: Joi.string().allow("")
|
|
1042
|
-
company: Joi.
|
|
1043
|
-
created_on: Joi.string().allow("")
|
|
1230
|
+
brand_name: Joi.string().allow(""),
|
|
1231
|
+
company: Joi.number().allow(null).required(),
|
|
1232
|
+
created_on: Joi.string().allow(""),
|
|
1044
1233
|
id: Joi.number().required(),
|
|
1045
|
-
logo: Joi.string().allow("")
|
|
1234
|
+
logo: Joi.string().allow(""),
|
|
1046
1235
|
modified_on: Joi.string().allow(""),
|
|
1047
1236
|
});
|
|
1048
1237
|
}
|
|
@@ -1058,6 +1247,16 @@ class OrderModel {
|
|
|
1058
1247
|
store_lookup: Joi.string().allow(""),
|
|
1059
1248
|
});
|
|
1060
1249
|
}
|
|
1250
|
+
static OrderData() {
|
|
1251
|
+
return Joi.object({
|
|
1252
|
+
fynd_order_id: Joi.string().allow("").required(),
|
|
1253
|
+
meta: OrderModel.OrderMeta(),
|
|
1254
|
+
order_date: Joi.string().allow("").required(),
|
|
1255
|
+
payment_methods: Joi.any(),
|
|
1256
|
+
prices: OrderModel.Prices(),
|
|
1257
|
+
tax_details: OrderModel.TaxDetails(),
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
1061
1260
|
static OrderDetails() {
|
|
1062
1261
|
return Joi.object({
|
|
1063
1262
|
created_at: Joi.string().allow(""),
|
|
@@ -1077,14 +1276,11 @@ class OrderModel {
|
|
|
1077
1276
|
tax_details: Joi.any(),
|
|
1078
1277
|
});
|
|
1079
1278
|
}
|
|
1080
|
-
static
|
|
1279
|
+
static OrderDetailsResponse() {
|
|
1081
1280
|
return Joi.object({
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
payment_methods: Joi.any(),
|
|
1086
|
-
prices: OrderModel.Prices(),
|
|
1087
|
-
tax_details: OrderModel.TaxDetails(),
|
|
1281
|
+
order: OrderModel.OrderData(),
|
|
1282
|
+
shipments: Joi.array().items(OrderModel.PlatformShipment()),
|
|
1283
|
+
success: Joi.boolean().required(),
|
|
1088
1284
|
});
|
|
1089
1285
|
}
|
|
1090
1286
|
static OrderInfo() {
|
|
@@ -1108,17 +1304,22 @@ class OrderModel {
|
|
|
1108
1304
|
}
|
|
1109
1305
|
static OrderingStoreDetails() {
|
|
1110
1306
|
return Joi.object({
|
|
1111
|
-
address: Joi.string().allow("")
|
|
1112
|
-
city: Joi.string().allow("")
|
|
1113
|
-
code: Joi.string().allow("")
|
|
1114
|
-
contact_person: Joi.string().allow("")
|
|
1115
|
-
country: Joi.string().allow("")
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
phone: Joi.string().allow("")
|
|
1119
|
-
pincode: Joi.string().allow("")
|
|
1120
|
-
state: Joi.string().allow("")
|
|
1121
|
-
store_name: Joi.string().allow("")
|
|
1307
|
+
address: Joi.string().allow(""),
|
|
1308
|
+
city: Joi.string().allow(""),
|
|
1309
|
+
code: Joi.string().allow(""),
|
|
1310
|
+
contact_person: Joi.string().allow(""),
|
|
1311
|
+
country: Joi.string().allow(""),
|
|
1312
|
+
id: Joi.number(),
|
|
1313
|
+
meta: Joi.any(),
|
|
1314
|
+
phone: Joi.string().allow(""),
|
|
1315
|
+
pincode: Joi.string().allow(""),
|
|
1316
|
+
state: Joi.string().allow(""),
|
|
1317
|
+
store_name: Joi.string().allow(""),
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
static OrderItemDataUpdates() {
|
|
1321
|
+
return Joi.object({
|
|
1322
|
+
data: Joi.any(),
|
|
1122
1323
|
});
|
|
1123
1324
|
}
|
|
1124
1325
|
static OrderListingResponse() {
|
|
@@ -1139,13 +1340,13 @@ class OrderModel {
|
|
|
1139
1340
|
company_logo: Joi.string().allow(""),
|
|
1140
1341
|
currency_symbol: Joi.string().allow(""),
|
|
1141
1342
|
customer_note: Joi.string().allow(""),
|
|
1142
|
-
employee_id: Joi.number(),
|
|
1343
|
+
employee_id: Joi.number().allow(null),
|
|
1143
1344
|
extra_meta: Joi.any(),
|
|
1144
1345
|
files: Joi.array().items(Joi.any()),
|
|
1145
1346
|
mongo_cart_id: Joi.number(),
|
|
1146
1347
|
order_child_entities: Joi.array().items(Joi.string().allow("")),
|
|
1147
1348
|
order_platform: Joi.string().allow(""),
|
|
1148
|
-
order_tags: Joi.array().items(Joi.any()),
|
|
1349
|
+
order_tags: Joi.array().items(Joi.any().allow(null)),
|
|
1149
1350
|
order_type: Joi.string().allow(""),
|
|
1150
1351
|
ordering_store: Joi.number(),
|
|
1151
1352
|
payment_type: Joi.string().allow(""),
|
|
@@ -1214,15 +1415,6 @@ class OrderModel {
|
|
|
1214
1415
|
type: Joi.string().allow("").required(),
|
|
1215
1416
|
});
|
|
1216
1417
|
}
|
|
1217
|
-
static Page1() {
|
|
1218
|
-
return Joi.object({
|
|
1219
|
-
current: Joi.number().required(),
|
|
1220
|
-
has_next: Joi.boolean().required(),
|
|
1221
|
-
item_total: Joi.number().required(),
|
|
1222
|
-
page_type: Joi.string().allow("").required(),
|
|
1223
|
-
size: Joi.number().required(),
|
|
1224
|
-
});
|
|
1225
|
-
}
|
|
1226
1418
|
static PaymentInfo() {
|
|
1227
1419
|
return Joi.object({
|
|
1228
1420
|
payment_methods: Joi.array().items(OrderModel.PaymentMethod()),
|
|
@@ -1247,12 +1439,6 @@ class OrderModel {
|
|
|
1247
1439
|
refund_by: Joi.string().allow(""),
|
|
1248
1440
|
});
|
|
1249
1441
|
}
|
|
1250
|
-
static PaymentModeInfo() {
|
|
1251
|
-
return Joi.object({
|
|
1252
|
-
logo: Joi.string().allow("").required(),
|
|
1253
|
-
type: Joi.string().allow("").required(),
|
|
1254
|
-
});
|
|
1255
|
-
}
|
|
1256
1442
|
static PDFLinks() {
|
|
1257
1443
|
return Joi.object({
|
|
1258
1444
|
b2b: Joi.string().allow(""),
|
|
@@ -1261,11 +1447,13 @@ class OrderModel {
|
|
|
1261
1447
|
invoice: Joi.string().allow(""),
|
|
1262
1448
|
invoice_a4: Joi.string().allow(""),
|
|
1263
1449
|
invoice_a6: Joi.string().allow(""),
|
|
1450
|
+
invoice_export: Joi.string().allow(""),
|
|
1264
1451
|
invoice_pos: Joi.string().allow(""),
|
|
1265
1452
|
invoice_type: Joi.string().allow("").required(),
|
|
1266
1453
|
label: Joi.string().allow(""),
|
|
1267
1454
|
label_a4: Joi.string().allow(""),
|
|
1268
1455
|
label_a6: Joi.string().allow(""),
|
|
1456
|
+
label_export: Joi.string().allow(""),
|
|
1269
1457
|
label_pos: Joi.string().allow(""),
|
|
1270
1458
|
label_type: Joi.string().allow("").required(),
|
|
1271
1459
|
po_invoice: Joi.string().allow(""),
|
|
@@ -1274,7 +1462,12 @@ class OrderModel {
|
|
|
1274
1462
|
static PhoneDetails() {
|
|
1275
1463
|
return Joi.object({
|
|
1276
1464
|
country_code: Joi.number(),
|
|
1277
|
-
|
|
1465
|
+
number: Joi.string().allow(""),
|
|
1466
|
+
});
|
|
1467
|
+
}
|
|
1468
|
+
static PlatformArticleAttributes() {
|
|
1469
|
+
return Joi.object({
|
|
1470
|
+
currency: Joi.string().allow(""),
|
|
1278
1471
|
});
|
|
1279
1472
|
}
|
|
1280
1473
|
static PlatformBreakupValues() {
|
|
@@ -1314,6 +1507,10 @@ class OrderModel {
|
|
|
1314
1507
|
}
|
|
1315
1508
|
static PlatformItem() {
|
|
1316
1509
|
return Joi.object({
|
|
1510
|
+
attributes: OrderModel.PlatformArticleAttributes(),
|
|
1511
|
+
branch_url: Joi.string().allow("").allow(null),
|
|
1512
|
+
brand: Joi.string().allow(""),
|
|
1513
|
+
brand_id: Joi.number(),
|
|
1317
1514
|
can_cancel: Joi.boolean(),
|
|
1318
1515
|
can_return: Joi.boolean(),
|
|
1319
1516
|
code: Joi.string().allow(""),
|
|
@@ -1323,10 +1520,14 @@ class OrderModel {
|
|
|
1323
1520
|
image: Joi.array().items(Joi.string().allow("")),
|
|
1324
1521
|
images: Joi.array().items(Joi.string().allow("")),
|
|
1325
1522
|
l1_category: Joi.array().items(Joi.string().allow("")),
|
|
1523
|
+
l2_category: Joi.array().items(Joi.string().allow("")),
|
|
1326
1524
|
l3_category: Joi.number(),
|
|
1327
1525
|
l3_category_name: Joi.string().allow(""),
|
|
1526
|
+
last_updated_at: Joi.string().allow(""),
|
|
1527
|
+
meta: Joi.any(),
|
|
1328
1528
|
name: Joi.string().allow(""),
|
|
1329
1529
|
size: Joi.string().allow(""),
|
|
1530
|
+
slug_key: Joi.string().allow(""),
|
|
1330
1531
|
});
|
|
1331
1532
|
}
|
|
1332
1533
|
static PlatformOrderItems() {
|
|
@@ -1354,22 +1555,27 @@ class OrderModel {
|
|
|
1354
1555
|
bag_status_history: Joi.array().items(OrderModel.BagStatusHistory()),
|
|
1355
1556
|
bags: Joi.array().items(OrderModel.OrderBags()),
|
|
1356
1557
|
billing_details: OrderModel.UserDetailsData(),
|
|
1558
|
+
can_update_dimension: Joi.boolean(),
|
|
1357
1559
|
company_details: OrderModel.CompanyDetails(),
|
|
1358
1560
|
coupon: Joi.any(),
|
|
1561
|
+
custom_message: Joi.string().allow(""),
|
|
1359
1562
|
custom_meta: Joi.array().items(Joi.any()),
|
|
1360
1563
|
delivery_details: OrderModel.UserDetailsData(),
|
|
1361
1564
|
delivery_slot: Joi.any(),
|
|
1565
|
+
dp_assignment: Joi.boolean(),
|
|
1362
1566
|
dp_details: OrderModel.DPDetailsData(),
|
|
1363
1567
|
enable_dp_tracking: Joi.boolean(),
|
|
1364
|
-
|
|
1568
|
+
estimated_sla_time: Joi.string().allow(""),
|
|
1569
|
+
forward_shipment_id: Joi.string().allow("").allow(null),
|
|
1365
1570
|
fulfilling_store: OrderModel.FulfillingStore(),
|
|
1366
1571
|
fulfilment_priority: Joi.number(),
|
|
1367
1572
|
gst_details: OrderModel.GSTDetailsData(),
|
|
1368
1573
|
invoice: OrderModel.InvoiceInfo(),
|
|
1369
1574
|
invoice_id: Joi.string().allow(""),
|
|
1575
|
+
is_dp_assign_enabled: Joi.boolean(),
|
|
1370
1576
|
journey_type: Joi.string().allow(""),
|
|
1371
1577
|
lock_status: Joi.boolean(),
|
|
1372
|
-
meta: OrderModel.
|
|
1578
|
+
meta: OrderModel.ShipmentMeta(),
|
|
1373
1579
|
operational_status: Joi.string().allow(""),
|
|
1374
1580
|
order: OrderModel.OrderDetailsData(),
|
|
1375
1581
|
ordering_store: OrderModel.OrderingStoreDetails(),
|
|
@@ -1377,10 +1583,13 @@ class OrderModel {
|
|
|
1377
1583
|
payment_methods: Joi.any(),
|
|
1378
1584
|
payment_mode: Joi.string().allow(""),
|
|
1379
1585
|
payments: OrderModel.ShipmentPayments(),
|
|
1586
|
+
pdf_links: Joi.any(),
|
|
1380
1587
|
picked_date: Joi.string().allow(""),
|
|
1381
1588
|
platform_logo: Joi.string().allow(""),
|
|
1382
1589
|
prices: OrderModel.Prices(),
|
|
1383
1590
|
priority_text: Joi.string().allow("").allow(null),
|
|
1591
|
+
shipment_created_at: Joi.string().allow(""),
|
|
1592
|
+
shipment_details: OrderModel.ShipmentDetails1(),
|
|
1384
1593
|
shipment_id: Joi.string().allow("").required(),
|
|
1385
1594
|
shipment_images: Joi.array().items(Joi.string().allow("")),
|
|
1386
1595
|
shipment_quantity: Joi.number(),
|
|
@@ -1422,12 +1631,20 @@ class OrderModel {
|
|
|
1422
1631
|
}
|
|
1423
1632
|
static PlatformUserDetails() {
|
|
1424
1633
|
return Joi.object({
|
|
1425
|
-
platform_user_employee_code: Joi.string().allow(""),
|
|
1634
|
+
platform_user_employee_code: Joi.string().allow("").allow(null),
|
|
1426
1635
|
platform_user_first_name: Joi.string().allow(""),
|
|
1427
|
-
platform_user_id: Joi.string().allow(""),
|
|
1636
|
+
platform_user_id: Joi.string().allow("").allow(null),
|
|
1428
1637
|
platform_user_last_name: Joi.string().allow(""),
|
|
1429
1638
|
});
|
|
1430
1639
|
}
|
|
1640
|
+
static PointBlankOtpData() {
|
|
1641
|
+
return Joi.object({
|
|
1642
|
+
message: Joi.string().allow(""),
|
|
1643
|
+
mobile: Joi.number(),
|
|
1644
|
+
request_id: Joi.string().allow(""),
|
|
1645
|
+
resend_timer: Joi.number(),
|
|
1646
|
+
});
|
|
1647
|
+
}
|
|
1431
1648
|
static PostActivityHistory() {
|
|
1432
1649
|
return Joi.object({
|
|
1433
1650
|
data: OrderModel.PostHistoryData().required(),
|
|
@@ -1461,13 +1678,17 @@ class OrderModel {
|
|
|
1461
1678
|
return Joi.object({
|
|
1462
1679
|
amount_paid: Joi.number(),
|
|
1463
1680
|
amount_paid_roundoff: Joi.number(),
|
|
1681
|
+
brand_calculated_amount: Joi.number(),
|
|
1464
1682
|
cashback: Joi.number(),
|
|
1465
1683
|
cashback_applied: Joi.number(),
|
|
1466
1684
|
cod_charges: Joi.number(),
|
|
1685
|
+
coupon_effective_discount: Joi.number(),
|
|
1467
1686
|
coupon_value: Joi.number(),
|
|
1468
1687
|
delivery_charge: Joi.number(),
|
|
1469
1688
|
discount: Joi.number(),
|
|
1470
1689
|
fynd_credits: Joi.number(),
|
|
1690
|
+
gift_price: Joi.number(),
|
|
1691
|
+
pm_price_split: Joi.number(),
|
|
1471
1692
|
price_effective: Joi.number(),
|
|
1472
1693
|
price_marked: Joi.number(),
|
|
1473
1694
|
promotion_effective_discount: Joi.number(),
|
|
@@ -1546,6 +1767,36 @@ class OrderModel {
|
|
|
1546
1767
|
products: Joi.array().items(OrderModel.ProductsReasons()),
|
|
1547
1768
|
});
|
|
1548
1769
|
}
|
|
1770
|
+
static RefundModeConfigRequestPayload() {
|
|
1771
|
+
return Joi.object({
|
|
1772
|
+
affiliate_id: Joi.string().allow("").required(),
|
|
1773
|
+
customer_mobile_number: Joi.string().allow(""),
|
|
1774
|
+
fynd_order_id: Joi.string().allow("").required(),
|
|
1775
|
+
seller_id: Joi.number().required(),
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
static RefundModeConfigResponsePayload() {
|
|
1779
|
+
return Joi.object({
|
|
1780
|
+
data: Joi.array().items(OrderModel.RefundModeInfo()).required(),
|
|
1781
|
+
success: Joi.boolean().required(),
|
|
1782
|
+
});
|
|
1783
|
+
}
|
|
1784
|
+
static RefundModeInfo() {
|
|
1785
|
+
return Joi.object({
|
|
1786
|
+
display_name: Joi.string().allow(""),
|
|
1787
|
+
is_active: Joi.boolean(),
|
|
1788
|
+
options: Joi.array().items(OrderModel.RefundOption()),
|
|
1789
|
+
slug: Joi.string().allow(""),
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
static RefundOption() {
|
|
1793
|
+
return Joi.object({
|
|
1794
|
+
name: Joi.string().allow(""),
|
|
1795
|
+
slug: Joi.string().allow(""),
|
|
1796
|
+
type: Joi.string().allow(""),
|
|
1797
|
+
value: Joi.string().allow(""),
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1549
1800
|
static ReplacementDetails() {
|
|
1550
1801
|
return Joi.object({
|
|
1551
1802
|
original_affiliate_order_id: Joi.string().allow("").allow(null),
|
|
@@ -1565,6 +1816,13 @@ class OrderModel {
|
|
|
1565
1816
|
unit: Joi.string().allow(""),
|
|
1566
1817
|
});
|
|
1567
1818
|
}
|
|
1819
|
+
static ReturnConfig1() {
|
|
1820
|
+
return Joi.object({
|
|
1821
|
+
returnable: Joi.boolean(),
|
|
1822
|
+
time: Joi.number(),
|
|
1823
|
+
unit: Joi.string().allow(""),
|
|
1824
|
+
});
|
|
1825
|
+
}
|
|
1568
1826
|
static SendSmsPayload() {
|
|
1569
1827
|
return Joi.object({
|
|
1570
1828
|
bag_id: Joi.number().required(),
|
|
@@ -1572,6 +1830,19 @@ class OrderModel {
|
|
|
1572
1830
|
slug: Joi.string().allow("").required(),
|
|
1573
1831
|
});
|
|
1574
1832
|
}
|
|
1833
|
+
static SendUserMobileOTP() {
|
|
1834
|
+
return Joi.object({
|
|
1835
|
+
country_code: Joi.string().allow(""),
|
|
1836
|
+
mobile: Joi.string().allow("").required(),
|
|
1837
|
+
});
|
|
1838
|
+
}
|
|
1839
|
+
static SendUserMobileOtpResponse() {
|
|
1840
|
+
return Joi.object({
|
|
1841
|
+
data: OrderModel.PointBlankOtpData(),
|
|
1842
|
+
message: Joi.string().allow(""),
|
|
1843
|
+
success: Joi.boolean(),
|
|
1844
|
+
});
|
|
1845
|
+
}
|
|
1575
1846
|
static Shipment() {
|
|
1576
1847
|
return Joi.object({
|
|
1577
1848
|
external_shipment_id: Joi.string().allow(""),
|
|
@@ -1603,7 +1874,7 @@ class OrderModel {
|
|
|
1603
1874
|
return Joi.object({
|
|
1604
1875
|
bag_list: Joi.array().items(Joi.number()),
|
|
1605
1876
|
id: Joi.number().required(),
|
|
1606
|
-
meta: OrderModel.
|
|
1877
|
+
meta: OrderModel.Meta().required(),
|
|
1607
1878
|
remarks: Joi.string().allow(""),
|
|
1608
1879
|
shipment_id: Joi.string().allow(""),
|
|
1609
1880
|
status: Joi.string().allow(""),
|
|
@@ -1612,7 +1883,7 @@ class OrderModel {
|
|
|
1612
1883
|
static ShipmentDetails() {
|
|
1613
1884
|
return Joi.object({
|
|
1614
1885
|
affiliate_shipment_id: Joi.string().allow("").required(),
|
|
1615
|
-
articles: Joi.array().items(OrderModel.
|
|
1886
|
+
articles: Joi.array().items(OrderModel.ArticleDetails()).required(),
|
|
1616
1887
|
box_type: Joi.string().allow("").allow(null),
|
|
1617
1888
|
dp_id: Joi.number().allow(null),
|
|
1618
1889
|
fulfillment_id: Joi.number().required(),
|
|
@@ -1620,11 +1891,11 @@ class OrderModel {
|
|
|
1620
1891
|
shipments: Joi.number().required(),
|
|
1621
1892
|
});
|
|
1622
1893
|
}
|
|
1623
|
-
static
|
|
1894
|
+
static ShipmentDetails1() {
|
|
1624
1895
|
return Joi.object({
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1896
|
+
action_to_status: Joi.any(),
|
|
1897
|
+
lock_message: Joi.string().allow(""),
|
|
1898
|
+
lock_status: Joi.boolean(),
|
|
1628
1899
|
});
|
|
1629
1900
|
}
|
|
1630
1901
|
static ShipmentHistoryResponse() {
|
|
@@ -1642,50 +1913,118 @@ class OrderModel {
|
|
|
1642
1913
|
}
|
|
1643
1914
|
static ShipmentInternalPlatformViewResponse() {
|
|
1644
1915
|
return Joi.object({
|
|
1645
|
-
applied_filters: Joi.any(),
|
|
1646
|
-
filters: Joi.array().items(OrderModel.FiltersInfo()),
|
|
1647
1916
|
items: Joi.array().items(OrderModel.ShipmentItem()),
|
|
1648
|
-
|
|
1917
|
+
lane: Joi.string().allow(""),
|
|
1918
|
+
message: Joi.string().allow(""),
|
|
1919
|
+
page: OrderModel.Page(),
|
|
1920
|
+
success: Joi.boolean(),
|
|
1921
|
+
total_count: Joi.number(),
|
|
1649
1922
|
});
|
|
1650
1923
|
}
|
|
1651
1924
|
static ShipmentItem() {
|
|
1652
1925
|
return Joi.object({
|
|
1653
|
-
application: Joi.any(),
|
|
1654
1926
|
bags: Joi.array().items(OrderModel.BagUnit()),
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1927
|
+
can_process: Joi.boolean(),
|
|
1928
|
+
channel: OrderModel.ShipmentListingChannel(),
|
|
1929
|
+
customer_note: Joi.string().allow(""),
|
|
1930
|
+
delivery_address: OrderModel.PlatformDeliveryAddress(),
|
|
1931
|
+
display_name: Joi.string().allow(""),
|
|
1932
|
+
estimated_sla_time: Joi.string().allow("").allow(null),
|
|
1659
1933
|
fulfilling_store: OrderModel.ShipmentItemFulFillingStore(),
|
|
1660
|
-
|
|
1934
|
+
invoice_id: Joi.string().allow("").allow(null),
|
|
1935
|
+
lock_status: Joi.boolean(),
|
|
1936
|
+
meta: OrderModel.ShipmentItemMeta(),
|
|
1937
|
+
order_date: Joi.string().allow(""),
|
|
1938
|
+
order_id: Joi.string().allow("").required(),
|
|
1939
|
+
ordering_channnel: Joi.string().allow(""),
|
|
1661
1940
|
payment_methods: Joi.any(),
|
|
1662
|
-
|
|
1941
|
+
payment_mode: Joi.string().allow(""),
|
|
1942
|
+
previous_shipment_id: Joi.string().allow("").allow(null),
|
|
1663
1943
|
prices: OrderModel.Prices(),
|
|
1664
1944
|
shipment_created_at: Joi.string().allow("").required(),
|
|
1665
1945
|
shipment_id: Joi.string().allow(""),
|
|
1666
1946
|
shipment_status: OrderModel.ShipmentStatus(),
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
total_shipments_in_order: Joi.number().required(),
|
|
1947
|
+
status_created_at: Joi.string().allow(""),
|
|
1948
|
+
total_bags: Joi.number().required(),
|
|
1670
1949
|
user: OrderModel.UserDataInfo(),
|
|
1671
1950
|
});
|
|
1672
1951
|
}
|
|
1673
1952
|
static ShipmentItemFulFillingStore() {
|
|
1674
1953
|
return Joi.object({
|
|
1954
|
+
address: Joi.string().allow("").allow(null),
|
|
1955
|
+
brand_store_tags: Joi.string().allow("").allow(null),
|
|
1956
|
+
city: Joi.string().allow(""),
|
|
1675
1957
|
code: Joi.string().allow("").required(),
|
|
1676
|
-
id: Joi.
|
|
1958
|
+
id: Joi.number().required(),
|
|
1959
|
+
location_type: Joi.string().allow(""),
|
|
1960
|
+
meta: Joi.any().allow(null),
|
|
1961
|
+
name: Joi.string().allow(""),
|
|
1962
|
+
phone: Joi.string().allow(""),
|
|
1963
|
+
pincode: Joi.string().allow(""),
|
|
1964
|
+
state: Joi.string().allow(""),
|
|
1965
|
+
store_email: Joi.string().allow(""),
|
|
1677
1966
|
});
|
|
1678
1967
|
}
|
|
1679
|
-
static
|
|
1968
|
+
static ShipmentItemMeta() {
|
|
1680
1969
|
return Joi.object({
|
|
1970
|
+
activity_comment: Joi.string().allow(""),
|
|
1681
1971
|
assign_dp_from_sb: Joi.boolean(),
|
|
1682
1972
|
auto_trigger_dp_assignment_acf: Joi.boolean().required(),
|
|
1973
|
+
bag_weight: Joi.any(),
|
|
1974
|
+
debug_info: Joi.any(),
|
|
1975
|
+
dp_options: Joi.any(),
|
|
1976
|
+
dp_sort_key: Joi.string().allow("").allow(null),
|
|
1977
|
+
ewaybill_info: Joi.any(),
|
|
1978
|
+
existing_dp_list: Joi.array().items(Joi.string().allow("")),
|
|
1979
|
+
external: Joi.any(),
|
|
1980
|
+
formatted: OrderModel.Formatted(),
|
|
1981
|
+
fulfilment_priority_text: Joi.string().allow("").allow(null),
|
|
1982
|
+
is_international: Joi.boolean(),
|
|
1983
|
+
lock_data: OrderModel.LockData(),
|
|
1984
|
+
order_type: Joi.string().allow("").allow(null),
|
|
1985
|
+
packaging_name: Joi.string().allow(""),
|
|
1986
|
+
parent_dp_id: Joi.string().allow(""),
|
|
1987
|
+
pdf_media: Joi.array().items(Joi.any()),
|
|
1988
|
+
same_store_available: Joi.boolean(),
|
|
1989
|
+
shipment_chargeable_weight: Joi.number(),
|
|
1990
|
+
shipment_tags: Joi.array().items(OrderModel.ShipmentTags()),
|
|
1991
|
+
shipment_volumetric_weight: Joi.number(),
|
|
1992
|
+
shipment_weight: Joi.number(),
|
|
1993
|
+
shipping_zone: Joi.string().allow(""),
|
|
1994
|
+
sla: Joi.number(),
|
|
1995
|
+
store_invoice_updated_date: Joi.string().allow(""),
|
|
1996
|
+
tags: Joi.array().items(Joi.any()),
|
|
1997
|
+
timestamp: OrderModel.ShipmentTimeStamp(),
|
|
1998
|
+
weight: Joi.number(),
|
|
1999
|
+
});
|
|
2000
|
+
}
|
|
2001
|
+
static ShipmentListingBrand() {
|
|
2002
|
+
return Joi.object({
|
|
2003
|
+
created_on: Joi.string().allow(""),
|
|
2004
|
+
logo: Joi.string().allow(""),
|
|
2005
|
+
logo_base64: Joi.string().allow(""),
|
|
2006
|
+
name: Joi.string().allow(""),
|
|
2007
|
+
});
|
|
2008
|
+
}
|
|
2009
|
+
static ShipmentListingChannel() {
|
|
2010
|
+
return Joi.object({
|
|
2011
|
+
channel_shipment_id: Joi.string().allow(""),
|
|
2012
|
+
is_affiliate: Joi.boolean(),
|
|
2013
|
+
logo: Joi.string().allow(""),
|
|
2014
|
+
name: Joi.string().allow(""),
|
|
2015
|
+
});
|
|
2016
|
+
}
|
|
2017
|
+
static ShipmentMeta() {
|
|
2018
|
+
return Joi.object({
|
|
2019
|
+
assign_dp_from_sb: Joi.boolean(),
|
|
2020
|
+
auto_trigger_dp_assignment_acf: Joi.boolean(),
|
|
1683
2021
|
awb_number: Joi.string().allow(""),
|
|
1684
2022
|
b2b_buyer_details: OrderModel.BuyerDetails(),
|
|
1685
2023
|
b2c_buyer_details: Joi.any().allow(null),
|
|
1686
2024
|
bag_weight: Joi.any(),
|
|
1687
2025
|
box_type: Joi.string().allow("").allow(null),
|
|
1688
2026
|
debug_info: OrderModel.DebugInfo(),
|
|
2027
|
+
dimension: OrderModel.Dimensions(),
|
|
1689
2028
|
dp_id: Joi.string().allow("").allow(null),
|
|
1690
2029
|
dp_name: Joi.string().allow(""),
|
|
1691
2030
|
dp_options: Joi.any(),
|
|
@@ -1702,6 +2041,7 @@ class OrderModel {
|
|
|
1702
2041
|
marketplace_store_id: Joi.string().allow(""),
|
|
1703
2042
|
order_type: Joi.string().allow("").allow(null),
|
|
1704
2043
|
packaging_name: Joi.string().allow(""),
|
|
2044
|
+
parent_dp_id: Joi.string().allow("").allow(null),
|
|
1705
2045
|
po_number: Joi.string().allow(""),
|
|
1706
2046
|
return_affiliate_order_id: Joi.string().allow(""),
|
|
1707
2047
|
return_affiliate_shipment_id: Joi.string().allow(""),
|
|
@@ -1709,6 +2049,7 @@ class OrderModel {
|
|
|
1709
2049
|
return_details: Joi.any(),
|
|
1710
2050
|
return_store_node: Joi.number(),
|
|
1711
2051
|
same_store_available: Joi.boolean().required(),
|
|
2052
|
+
shipment_tags: Joi.array().items(OrderModel.ShipmentTags()),
|
|
1712
2053
|
shipment_volumetric_weight: Joi.number(),
|
|
1713
2054
|
shipment_weight: Joi.number(),
|
|
1714
2055
|
store_invoice_updated_date: Joi.string().allow(""),
|
|
@@ -1723,6 +2064,21 @@ class OrderModel {
|
|
|
1723
2064
|
source: Joi.string().allow(""),
|
|
1724
2065
|
});
|
|
1725
2066
|
}
|
|
2067
|
+
static ShipmentReasonsResponse() {
|
|
2068
|
+
return Joi.object({
|
|
2069
|
+
message: Joi.string().allow("").required(),
|
|
2070
|
+
reasons: Joi.array()
|
|
2071
|
+
.items(OrderModel.ShipmentResponseReasons())
|
|
2072
|
+
.required(),
|
|
2073
|
+
success: Joi.boolean().required(),
|
|
2074
|
+
});
|
|
2075
|
+
}
|
|
2076
|
+
static ShipmentResponseReasons() {
|
|
2077
|
+
return Joi.object({
|
|
2078
|
+
reason: Joi.string().allow(""),
|
|
2079
|
+
reason_id: Joi.number(),
|
|
2080
|
+
});
|
|
2081
|
+
}
|
|
1726
2082
|
static ShipmentsRequest() {
|
|
1727
2083
|
return Joi.object({
|
|
1728
2084
|
data_updates: OrderModel.DataUpdates(),
|
|
@@ -1745,10 +2101,14 @@ class OrderModel {
|
|
|
1745
2101
|
}
|
|
1746
2102
|
static ShipmentStatus() {
|
|
1747
2103
|
return Joi.object({
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
2104
|
+
bag_list: Joi.array().items(Joi.string().allow("")),
|
|
2105
|
+
created_at: Joi.string().allow(""),
|
|
2106
|
+
current_shipment_status: Joi.string().allow(""),
|
|
2107
|
+
meta: Joi.any().allow(null),
|
|
2108
|
+
shipment_id: Joi.string().allow(""),
|
|
2109
|
+
shipment_status_id: Joi.number(),
|
|
1751
2110
|
status: Joi.string().allow("").required(),
|
|
2111
|
+
status_created_at: Joi.string().allow(""),
|
|
1752
2112
|
title: Joi.string().allow("").required(),
|
|
1753
2113
|
});
|
|
1754
2114
|
}
|
|
@@ -1756,15 +2116,24 @@ class OrderModel {
|
|
|
1756
2116
|
return Joi.object({
|
|
1757
2117
|
bag_list: Joi.array().items(Joi.string().allow("")),
|
|
1758
2118
|
created_at: Joi.string().allow("").allow(null),
|
|
2119
|
+
display_name: Joi.string().allow(""),
|
|
1759
2120
|
id: Joi.number(),
|
|
2121
|
+
meta: Joi.any(),
|
|
1760
2122
|
shipment_id: Joi.string().allow(""),
|
|
1761
2123
|
status: Joi.string().allow(""),
|
|
1762
2124
|
});
|
|
1763
2125
|
}
|
|
2126
|
+
static ShipmentTags() {
|
|
2127
|
+
return Joi.object({
|
|
2128
|
+
display_text: Joi.string().allow(""),
|
|
2129
|
+
entity_type: Joi.string().allow(""),
|
|
2130
|
+
slug: Joi.string().allow(""),
|
|
2131
|
+
});
|
|
2132
|
+
}
|
|
1764
2133
|
static ShipmentTimeStamp() {
|
|
1765
2134
|
return Joi.object({
|
|
1766
|
-
|
|
1767
|
-
|
|
2135
|
+
max: Joi.number(),
|
|
2136
|
+
min: Joi.number(),
|
|
1768
2137
|
});
|
|
1769
2138
|
}
|
|
1770
2139
|
static ShippingInfo() {
|
|
@@ -1977,8 +2346,8 @@ class OrderModel {
|
|
|
1977
2346
|
}
|
|
1978
2347
|
static TaxDetails() {
|
|
1979
2348
|
return Joi.object({
|
|
1980
|
-
gstin: Joi.string().allow(""),
|
|
1981
|
-
pan_no: Joi.string().allow(""),
|
|
2349
|
+
gstin: Joi.string().allow("").allow(null),
|
|
2350
|
+
pan_no: Joi.string().allow("").allow(null),
|
|
1982
2351
|
});
|
|
1983
2352
|
}
|
|
1984
2353
|
static TaxInfo() {
|
|
@@ -1998,7 +2367,7 @@ class OrderModel {
|
|
|
1998
2367
|
}
|
|
1999
2368
|
static TransactionData() {
|
|
2000
2369
|
return Joi.object({
|
|
2001
|
-
amount_paid: Joi.
|
|
2370
|
+
amount_paid: Joi.number(),
|
|
2002
2371
|
currency: Joi.string().allow(""),
|
|
2003
2372
|
entity: Joi.string().allow(""),
|
|
2004
2373
|
payment_id: Joi.string().allow(""),
|
|
@@ -2008,6 +2377,18 @@ class OrderModel {
|
|
|
2008
2377
|
unique_reference_number: Joi.string().allow(""),
|
|
2009
2378
|
});
|
|
2010
2379
|
}
|
|
2380
|
+
static UpdatePackagingDimensionsPayload() {
|
|
2381
|
+
return Joi.object({
|
|
2382
|
+
current_status: Joi.string().allow("").required(),
|
|
2383
|
+
dimension: Joi.array().items(OrderModel.Dimension()).required(),
|
|
2384
|
+
shipment_id: Joi.string().allow("").required(),
|
|
2385
|
+
});
|
|
2386
|
+
}
|
|
2387
|
+
static UpdatePackagingDimensionsResponse() {
|
|
2388
|
+
return Joi.object({
|
|
2389
|
+
message: Joi.string().allow(""),
|
|
2390
|
+
});
|
|
2391
|
+
}
|
|
2011
2392
|
static UpdateShipmentLockPayload() {
|
|
2012
2393
|
return Joi.object({
|
|
2013
2394
|
action: Joi.string().allow("").required(),
|
|
@@ -2057,12 +2438,12 @@ class OrderModel {
|
|
|
2057
2438
|
static UserDataInfo() {
|
|
2058
2439
|
return Joi.object({
|
|
2059
2440
|
avis_user_id: Joi.string().allow(""),
|
|
2060
|
-
email: Joi.string().allow(""),
|
|
2441
|
+
email: Joi.string().allow("").allow(null),
|
|
2061
2442
|
first_name: Joi.string().allow(""),
|
|
2062
|
-
gender: Joi.string().allow(""),
|
|
2443
|
+
gender: Joi.string().allow("").allow(null),
|
|
2063
2444
|
is_anonymous_user: Joi.boolean(),
|
|
2064
2445
|
last_name: Joi.string().allow(""),
|
|
2065
|
-
mobile: Joi.string().allow(""),
|
|
2446
|
+
mobile: Joi.string().allow("").allow(null),
|
|
2066
2447
|
name: Joi.string().allow(""),
|
|
2067
2448
|
uid: Joi.number(),
|
|
2068
2449
|
});
|
|
@@ -2083,6 +2464,35 @@ class OrderModel {
|
|
|
2083
2464
|
state: Joi.string().allow("").required(),
|
|
2084
2465
|
});
|
|
2085
2466
|
}
|
|
2467
|
+
static VerifyMobileOTP() {
|
|
2468
|
+
return Joi.object({
|
|
2469
|
+
fynd_order_id: Joi.string().allow("").required(),
|
|
2470
|
+
otp_data: OrderModel.VerifyOtpData().required(),
|
|
2471
|
+
});
|
|
2472
|
+
}
|
|
2473
|
+
static VerifyOtpData() {
|
|
2474
|
+
return Joi.object({
|
|
2475
|
+
mobile: Joi.string().allow("").required(),
|
|
2476
|
+
otp_code: Joi.number().required(),
|
|
2477
|
+
request_id: Joi.string().allow("").required(),
|
|
2478
|
+
});
|
|
2479
|
+
}
|
|
2480
|
+
static VerifyOtpResponse() {
|
|
2481
|
+
return Joi.object({
|
|
2482
|
+
data: OrderModel.VerifyOtpResponseData(),
|
|
2483
|
+
message: Joi.string().allow(""),
|
|
2484
|
+
status: Joi.number(),
|
|
2485
|
+
success: Joi.boolean(),
|
|
2486
|
+
});
|
|
2487
|
+
}
|
|
2488
|
+
static VerifyOtpResponseData() {
|
|
2489
|
+
return Joi.object({
|
|
2490
|
+
country_code: Joi.string().allow(""),
|
|
2491
|
+
fynd_order_id: Joi.string().allow(""),
|
|
2492
|
+
message: Joi.string().allow(""),
|
|
2493
|
+
mobile: Joi.string().allow(""),
|
|
2494
|
+
});
|
|
2495
|
+
}
|
|
2086
2496
|
static Weight() {
|
|
2087
2497
|
return Joi.object({
|
|
2088
2498
|
is_default: Joi.boolean(),
|