@gofynd/fdk-client-javascript 0.1.37 → 1.0.1

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