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