@gofynd/fdk-client-javascript 0.1.37 → 1.0.0

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