@gofynd/fdk-client-javascript 1.0.0 → 1.0.2

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