@gofynd/fdk-client-javascript 1.4.15-beta.1 → 1.4.15-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/README.md +2 -2
  2. package/application.d.ts +1 -2
  3. package/application.js +2 -3
  4. package/index.d.ts +1 -2
  5. package/index.js +7 -1
  6. package/package.json +2 -3
  7. package/sdk/application/ApplicationClient.d.ts +2 -0
  8. package/sdk/application/ApplicationClient.js +2 -18
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +75 -90
  10. package/sdk/application/Cart/CartApplicationClient.js +111 -1200
  11. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +81 -142
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +41 -1344
  13. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
  14. package/sdk/application/Common/CommonApplicationClient.js +2 -92
  15. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
  16. package/sdk/application/Communication/CommunicationApplicationClient.js +3 -148
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
  18. package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -727
  19. package/sdk/application/Content/ContentApplicationClient.d.ts +52 -95
  20. package/sdk/application/Content/ContentApplicationClient.js +46 -990
  21. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -13
  22. package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -138
  23. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  24. package/sdk/application/Finance/FinanceApplicationClient.js +105 -0
  25. package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
  26. package/sdk/application/Lead/LeadApplicationClient.js +5 -217
  27. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +42 -39
  28. package/sdk/application/Logistic/LogisticApplicationClient.js +89 -493
  29. package/sdk/application/Order/OrderApplicationClient.d.ts +36 -46
  30. package/sdk/application/Order/OrderApplicationClient.js +52 -507
  31. package/sdk/application/Payment/PaymentApplicationClient.d.ts +93 -213
  32. package/sdk/application/Payment/PaymentApplicationClient.js +49 -2109
  33. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -29
  34. package/sdk/application/Rewards/RewardsApplicationClient.js +8 -312
  35. package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
  36. package/sdk/application/Share/ShareApplicationClient.js +7 -309
  37. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
  38. package/sdk/application/Theme/ThemeApplicationClient.js +8 -176
  39. package/sdk/application/User/UserApplicationClient.d.ts +87 -138
  40. package/sdk/application/User/UserApplicationClient.js +44 -1820
  41. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
  42. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -52
  43. package/sdk/application/index.d.ts +0 -18
  44. package/sdk/application/index.js +0 -33
  45. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
  46. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
  47. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
  48. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
  49. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
  50. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
  51. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  52. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  53. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  54. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  55. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +126 -20
  56. package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
  57. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1200 -167
  58. package/sdk/partner/Logistics/LogisticsPartnerModel.js +571 -160
  59. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
  60. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +121 -7
  61. package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
  62. package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
  63. package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
  64. package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
  65. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  66. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
  67. package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
  68. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
  69. package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
  70. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
  71. package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
  72. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
  73. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
  74. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
  75. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
  76. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
  77. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
  78. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
  79. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
  80. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  81. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  82. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  83. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  84. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  85. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  86. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  87. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  88. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
  89. package/sdk/platform/Cart/CartPlatformApplicationClient.js +419 -115
  90. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +118 -65
  91. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +109 -44
  92. package/sdk/platform/Cart/CartPlatformModel.d.ts +5067 -1300
  93. package/sdk/platform/Cart/CartPlatformModel.js +1988 -1217
  94. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
  95. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
  96. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
  97. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
  98. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +154 -117
  99. package/sdk/platform/Catalog/CatalogPlatformClient.js +292 -172
  100. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6506 -1775
  101. package/sdk/platform/Catalog/CatalogPlatformModel.js +3224 -1690
  102. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +72 -31
  103. package/sdk/platform/Catalog/CatalogPlatformValidator.js +50 -24
  104. package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
  105. package/sdk/platform/Common/CommonPlatformClient.js +3 -2
  106. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  107. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  108. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
  109. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  111. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  112. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
  113. package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
  114. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
  115. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  120. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
  121. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  124. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
  125. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
  126. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
  127. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
  128. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  129. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  130. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +124 -141
  131. package/sdk/platform/Content/ContentPlatformApplicationClient.js +449 -422
  132. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +179 -141
  133. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +168 -130
  134. package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
  135. package/sdk/platform/Content/ContentPlatformClient.js +523 -336
  136. package/sdk/platform/Content/ContentPlatformModel.d.ts +1241 -395
  137. package/sdk/platform/Content/ContentPlatformModel.js +521 -390
  138. package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
  139. package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
  140. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
  141. package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
  142. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  143. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  144. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  145. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  146. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +94 -36
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
  148. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
  149. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
  150. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
  151. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
  152. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
  153. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
  154. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  155. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  156. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  157. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  158. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  159. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  160. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +17 -6
  161. package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
  162. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
  163. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
  164. package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
  165. package/sdk/platform/Order/OrderPlatformClient.js +416 -198
  166. package/sdk/platform/Order/OrderPlatformModel.d.ts +7602 -1269
  167. package/sdk/platform/Order/OrderPlatformModel.js +3926 -1269
  168. package/sdk/platform/Order/OrderPlatformValidator.d.ts +270 -109
  169. package/sdk/platform/Order/OrderPlatformValidator.js +135 -77
  170. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
  171. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
  172. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  173. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  174. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
  175. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
  176. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  177. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  178. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  179. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  180. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +333 -319
  181. package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
  182. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  183. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  184. package/sdk/platform/PlatformClient.d.ts +0 -2
  185. package/sdk/platform/PlatformClient.js +0 -4
  186. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  187. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  188. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  189. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  190. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  191. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +46 -36
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +132 -41
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1893 -623
  199. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +924 -568
  200. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +42 -46
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +26 -28
  202. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
  203. package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
  204. package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
  205. package/sdk/platform/Share/SharePlatformModel.js +27 -4
  206. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  207. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
  208. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
  209. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
  210. package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
  211. package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
  212. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  213. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  214. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  215. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  216. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  217. package/sdk/platform/User/UserPlatformModel.js +23 -23
  218. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
  219. package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
  220. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
  221. package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
  222. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  223. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  224. package/sdk/platform/index.d.ts +0 -1
  225. package/sdk/platform/index.js +0 -2
  226. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
  227. package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -7
  228. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  229. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  230. package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
  231. package/sdk/public/Content/ContentPublicClient.js +795 -7
  232. package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
  233. package/sdk/public/Content/ContentPublicModel.js +649 -3
  234. package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
  235. package/sdk/public/Content/ContentPublicValidator.js +88 -2
  236. package/sdk/public/Partner/PartnerPublicClient.js +4 -2
  237. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  238. package/sdk/public/Webhook/WebhookPublicClient.js +12 -10
  239. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  240. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  241. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  242. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  243. package/sdk/application/Cart/CartApplicationModel.d.ts +0 -3994
  244. package/sdk/application/Cart/CartApplicationModel.js +0 -2497
  245. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -769
  246. package/sdk/application/Cart/CartApplicationValidator.js +0 -530
  247. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3857
  248. package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2629
  249. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
  250. package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
  251. package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
  252. package/sdk/application/Common/CommonApplicationModel.js +0 -308
  253. package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
  254. package/sdk/application/Common/CommonApplicationValidator.js +0 -38
  255. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
  256. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
  257. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
  258. package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
  259. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2556
  260. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1887
  261. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
  262. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
  263. package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2133
  264. package/sdk/application/Content/ContentApplicationModel.js +0 -1589
  265. package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -284
  266. package/sdk/application/Content/ContentApplicationValidator.js +0 -264
  267. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -272
  268. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -190
  269. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
  270. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
  271. package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
  272. package/sdk/application/Lead/LeadApplicationModel.js +0 -480
  273. package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
  274. package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
  275. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -1675
  276. package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1121
  277. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -254
  278. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -190
  279. package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2296
  280. package/sdk/application/Order/OrderApplicationModel.js +0 -1471
  281. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -265
  282. package/sdk/application/Order/OrderApplicationValidator.js +0 -197
  283. package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4058
  284. package/sdk/application/Payment/PaymentApplicationModel.js +0 -2630
  285. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
  286. package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
  287. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
  288. package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
  289. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
  290. package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
  291. package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
  292. package/sdk/application/Share/ShareApplicationModel.js +0 -234
  293. package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
  294. package/sdk/application/Share/ShareApplicationValidator.js +0 -91
  295. package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1713
  296. package/sdk/application/Theme/ThemeApplicationModel.js +0 -1426
  297. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -66
  298. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -58
  299. package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
  300. package/sdk/application/User/UserApplicationModel.js +0 -1382
  301. package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
  302. package/sdk/application/User/UserApplicationValidator.js +0 -573
  303. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -52
  304. package/sdk/application/Webhook/WebhookApplicationModel.js +0 -46
  305. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
  306. package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
  307. package/sdk/common/Clickstream.d.ts +0 -1
  308. package/sdk/common/Clickstream.js +0 -464
  309. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  310. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  311. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  312. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  313. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  314. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
@@ -2,65 +2,74 @@ const Joi = require("joi");
2
2
 
3
3
  /**
4
4
  * @typedef CouponDateMeta
5
- * @property {string} [modified_on]
6
- * @property {string} [created_on]
5
+ * @property {string} [modified_on] - Date time format when the coupon last modified
6
+ * @property {string} [created_on] - Date time format when the coupon created
7
+ * @property {string} [approved_on] - Date time format when the coupon approved
8
+ * @property {string} [rejected_on] - Date time format when the coupon rejected
9
+ * @property {string} [reviewed_on] - Date time format when the coupon reviewed
7
10
  */
8
11
 
9
12
  /**
10
13
  * @typedef Ownership
11
- * @property {string} payable_category
12
- * @property {string} payable_by
14
+ * @property {string} payable_category - Coupon amount payable category
15
+ * @property {string} [payable_by] - Coupon amount bearable party
13
16
  */
14
17
 
15
18
  /**
16
19
  * @typedef CouponAuthor
17
- * @property {string} [created_by]
18
- * @property {string} [modified_by]
20
+ * @property {string} [created_by] - The user id of user, who has created the coupon
21
+ * @property {string} [modified_by] - The user id of user, who has modified the coupon
22
+ * @property {string} [approved_by] - The user id of user, who has approved the coupon
23
+ * @property {string} [rejected_by] - The user id of user, who has rejected the coupon
24
+ * @property {string} [reviewed_by] - The user id of user, who has reviewed the coupon
19
25
  */
20
26
 
21
27
  /**
22
28
  * @typedef State
23
- * @property {boolean} [is_archived]
24
- * @property {boolean} [is_display]
25
- * @property {boolean} [is_public]
29
+ * @property {boolean} [is_archived] - Publish or unpublish the coupon
30
+ * @property {boolean} [is_display] - Coupon needs to display or not
31
+ * @property {boolean} [is_public] - Coupon is publicaly available or not
26
32
  */
27
33
 
28
34
  /**
29
35
  * @typedef PaymentAllowValue
30
- * @property {number} [max]
36
+ * @property {number} [max] - Maximum value need to allow for payment
31
37
  */
32
38
 
33
39
  /**
34
40
  * @typedef PaymentModes
35
- * @property {string[]} [codes]
36
- * @property {string[]} [iins]
37
- * @property {string[]} [types]
38
- * @property {string[]} [networks]
41
+ * @property {string[]} [codes] - Identifier used by payment gateway for a given
42
+ * payment mode, e.g. NB_ICIC, PAYTM
43
+ * @property {string[]} [iins] - Debit/Credit card prefix (first 6 digit)
44
+ * @property {string[]} [types] - Card type, e.g. Credit, Debit
45
+ * @property {string[]} [networks] - Credit/Debit card issuer, e.g. VISA,
46
+ * MASTERCARD, RUPAY
39
47
  * @property {PaymentAllowValue} [uses]
40
48
  */
41
49
 
42
50
  /**
43
51
  * @typedef PriceRange
44
- * @property {number} [max]
45
- * @property {number} [min]
52
+ * @property {number} [max] - Max price valid for article in coupon
53
+ * @property {number} [min] - Min price valid for article in coupon
46
54
  */
47
55
 
48
56
  /**
49
57
  * @typedef PostOrder
50
- * @property {boolean} [cancellation_allowed]
51
- * @property {boolean} [return_allowed]
58
+ * @property {boolean} [cancellation_allowed] - Cancellation allowed in coupon
59
+ * @property {boolean} [return_allowed] - Return allowed in coupon
52
60
  */
53
61
 
54
62
  /**
55
63
  * @typedef BulkBundleRestriction
56
- * @property {boolean} multi_store_allowed
64
+ * @property {boolean} multi_store_allowed - Multi store allowed in bulk bundle
65
+ * coupon or not
57
66
  */
58
67
 
59
68
  /**
60
69
  * @typedef UsesRemaining
61
- * @property {number} [user]
62
- * @property {number} [total]
63
- * @property {number} [app]
70
+ * @property {number} [user] - Define total coupon count per user
71
+ * @property {number} [total] - Define total coupon counts
72
+ * @property {number} [app] - Define coupon counts associated with application id
64
73
  */
65
74
 
66
75
  /**
@@ -71,115 +80,129 @@ const Joi = require("joi");
71
80
 
72
81
  /**
73
82
  * @typedef Restrictions
74
- * @property {Object} [payments]
83
+ * @property {PaymentModes} [payments]
75
84
  * @property {string} [user_type]
76
85
  * @property {PriceRange} [price_range]
77
- * @property {string[]} [platforms]
86
+ * @property {string[]} [platforms] - List of platform on which coupon allowed
87
+ * like web, android
78
88
  * @property {PostOrder} [post_order]
79
89
  * @property {BulkBundleRestriction} [bulk_bundle]
80
- * @property {number[]} [user_groups]
81
- * @property {boolean} [coupon_allowed]
90
+ * @property {number[]} [user_groups] - List of user group on which coupon allowed
91
+ * @property {boolean} [coupon_allowed] - Allow applying normal coupon if bulk
92
+ * coupon is applied
82
93
  * @property {UsesRestriction} [uses]
83
- * @property {number[]} [ordering_stores]
94
+ * @property {number[]} [ordering_stores] - List of store id on which coupon allowed
84
95
  */
85
96
 
86
97
  /**
87
98
  * @typedef Validation
88
- * @property {string[]} [app_id]
89
- * @property {boolean} [anonymous]
90
- * @property {string} [user_registered_after]
99
+ * @property {string[]} [app_id] - List of sales channel's application id
100
+ * @property {boolean} [anonymous] - Coupon applicable for guest user or not
101
+ * @property {string} [user_registered_after] - Coupon applicable for user which
102
+ * is registered after Date Format
91
103
  */
92
104
 
93
105
  /**
94
106
  * @typedef CouponAction
95
- * @property {string} [action_date]
96
- * @property {string} [txn_mode]
107
+ * @property {string} [action_date] - Coupon transaction mode's date time format
108
+ * @property {string} [txn_mode] - Coupon transaction mode like cash, coupon etc
97
109
  */
98
110
 
99
111
  /**
100
112
  * @typedef CouponSchedule
101
- * @property {string} [end]
102
- * @property {string} [start]
103
- * @property {Object[]} [next_schedule]
104
- * @property {string} [cron]
105
- * @property {number} [duration]
113
+ * @property {string} [end] - The end date of coupon
114
+ * @property {string} [start] - The start date of coupon
115
+ * @property {Object[]} [next_schedule] - List of date time, which we will
116
+ * schedule the promotion
117
+ * @property {string} [cron] - Schedule the cron to run your job periodically
118
+ * @property {string} [status] - Coupon status like draft, review
119
+ * @property {number} [duration] - Time in minutes for execution
106
120
  */
107
121
 
108
122
  /**
109
123
  * @typedef Rule
110
- * @property {number} [key]
111
- * @property {number} [value]
112
- * @property {number} [max]
113
- * @property {number} [discount_qty]
114
- * @property {number} [min]
124
+ * @property {number} [key] - Key defines the number of product should be buy
125
+ * for applicability of cart
126
+ * @property {number} [value] - Value defines discount percentage in coupon
127
+ * @property {number} [max] - Max defines maximum number of discount amount in coupon
128
+ * @property {number} [discount_qty] - Discount_qty defines free quantity as
129
+ * discount in coupon
130
+ * @property {number} [min] - Min defines minimum number of discount amount in coupon
115
131
  */
116
132
 
117
133
  /**
118
134
  * @typedef DisplayMetaDict
119
- * @property {string} [title]
120
- * @property {string} [subtitle]
135
+ * @property {string} [title] - Coupon title which is used to display
136
+ * @property {string} [subtitle] - Coupon sub title which is used to display
121
137
  */
122
138
 
123
139
  /**
124
140
  * @typedef DisplayMeta
125
- * @property {string} [title]
141
+ * @property {string} [title] - Coupon title which is used to display
126
142
  * @property {DisplayMetaDict} [auto]
127
143
  * @property {DisplayMetaDict} [apply]
128
144
  * @property {DisplayMetaDict} [remove]
129
- * @property {string} [subtitle]
130
- * @property {string} [description]
145
+ * @property {string} [subtitle] - Coupon sub title which is used to display
146
+ * @property {string} [description] - Detail about the offers in coupon
131
147
  */
132
148
 
133
149
  /**
134
150
  * @typedef Identifier
135
- * @property {number[]} [brand_id]
136
- * @property {string[]} [email_domain]
137
- * @property {number[]} [company_id]
138
- * @property {number[]} [store_id]
139
- * @property {string[]} [collection_id]
140
- * @property {number[]} [item_id]
141
- * @property {string[]} [user_id]
142
- * @property {number[]} [category_id]
143
- * @property {string[]} [article_id]
144
- * @property {number[]} [exclude_brand_id]
151
+ * @property {number[]} [brand_id] - List of brand id available for coupon
152
+ * @property {string[]} [email_domain] - List of email domain available for coupon
153
+ * @property {number[]} [company_id] - List of company id available for coupon
154
+ * @property {number[]} [store_id] - List of store id available for coupon
155
+ * @property {string[]} [collection_id] - List of collection id available for coupon
156
+ * @property {number[]} [item_id] - List of item id available for coupon
157
+ * @property {string[]} [user_id] - List of user id available for coupon
158
+ * @property {number[]} [category_id] - List of category id available for coupon
159
+ * @property {string[]} [article_id] - List of article id available for coupon
160
+ * @property {number[]} [exclude_brand_id] - List of brand id should not be
161
+ * available for coupon
145
162
  */
146
163
 
147
164
  /**
148
165
  * @typedef Validity
149
- * @property {number} [priority]
166
+ * @property {number} [priority] - Priority of coupon to show in list
150
167
  */
151
168
 
152
169
  /**
153
170
  * @typedef RuleDefinition
154
- * @property {string} [currency_code]
155
- * @property {boolean} [auto_apply]
156
- * @property {string} type
157
- * @property {boolean} [is_exact]
158
- * @property {string} applicable_on
159
- * @property {string} calculate_on
160
- * @property {string} value_type
161
- * @property {string[]} [scope]
171
+ * @property {string} [currency_code] - Currency code like INR
172
+ * @property {boolean} [auto_apply] - Coupon should be auto apply or not
173
+ * @property {string} [type] - Type of coupon like absolute, percentage etc.
174
+ * @property {boolean} [is_exact] - Flag is true then use coupon applicable
175
+ * articles for calculation
176
+ * @property {string} [applicable_on] - Coupon will be applicable on either
177
+ * amount or quantity
178
+ * @property {string} [calculate_on] - Article Price on which coupon calculated
179
+ * like effective price or marked price
180
+ * @property {string} [value_type] - Define the type of coupon value
181
+ * @property {string[]} [scope] - List of item level rule applicable for coupon
162
182
  */
163
183
 
164
184
  /**
165
185
  * @typedef CouponAdd
166
186
  * @property {CouponDateMeta} [date_meta]
167
- * @property {Ownership} ownership
187
+ * @property {Ownership} [ownership]
168
188
  * @property {CouponAuthor} [author]
169
189
  * @property {State} [state]
170
190
  * @property {Restrictions} [restrictions]
171
191
  * @property {Validation} [validation]
172
192
  * @property {CouponAction} [action]
173
- * @property {string[]} [tags]
193
+ * @property {string} [coupon_type] - The type of coupon like bulk or single
194
+ * @property {string} [coupon_prefix] - Bulk coupon code prefix string
195
+ * @property {number} [coupon_counts] - Counts of bulk coupon
196
+ * @property {string[]} [tags] - List of tags specify to platform
174
197
  * @property {CouponSchedule} [_schedule]
175
- * @property {Rule[]} rule
176
- * @property {DisplayMeta} display_meta
177
- * @property {string} code
178
- * @property {string} type_slug
179
- * @property {Identifier} identifiers
180
- * @property {Validity} validity
181
- * @property {RuleDefinition} rule_definition
182
- * @property {string} [_id] - Coupon id
198
+ * @property {Rule[]} [rule]
199
+ * @property {DisplayMeta} [display_meta]
200
+ * @property {string} code - Unique code of coupon
201
+ * @property {string} type_slug - The type slug of coupon discount
202
+ * @property {Identifier} [identifiers]
203
+ * @property {Validity} [validity]
204
+ * @property {RuleDefinition} [rule_definition]
205
+ * @property {string} [_id] - Unique identifier of coupon
183
206
  */
184
207
 
185
208
  /**
@@ -194,42 +217,46 @@ const Joi = require("joi");
194
217
  */
195
218
 
196
219
  /**
197
- * @typedef CouponsResponse
198
- * @property {CouponAdd[]} [items]
220
+ * @typedef CouponsResult
221
+ * @property {CouponAdd[]} [items] - Coupons list for sales channel
199
222
  * @property {Page} [page]
200
223
  */
201
224
 
202
225
  /**
203
226
  * @typedef SuccessMessage
204
- * @property {boolean} [success]
205
- * @property {string} [message]
227
+ * @property {boolean} [success] - Whether the request was successful (true/false).
228
+ * @property {string} [message] - Response message needs to display
206
229
  */
207
230
 
208
231
  /**
209
- * @typedef OperationErrorResponse
210
- * @property {boolean} [success]
211
- * @property {string} [message]
212
- * @property {string} [error]
232
+ * @typedef OperationErrorResult
233
+ * @property {boolean} [success] - Whether the request was successful (true/false).
234
+ * @property {string} [message] - Response message needs to display
235
+ * @property {string} [error] - Response error message in detail
213
236
  */
214
237
 
215
238
  /**
216
239
  * @typedef CouponUpdate
217
240
  * @property {CouponDateMeta} [date_meta]
218
- * @property {Ownership} ownership
241
+ * @property {Ownership} [ownership]
219
242
  * @property {CouponAuthor} [author]
220
243
  * @property {State} [state]
221
244
  * @property {Restrictions} [restrictions]
222
245
  * @property {Validation} [validation]
223
246
  * @property {CouponAction} [action]
224
- * @property {string[]} [tags]
247
+ * @property {string[]} [tags] - List of tags specify to platform
225
248
  * @property {CouponSchedule} [_schedule]
226
- * @property {Rule[]} rule
227
- * @property {DisplayMeta} display_meta
228
- * @property {string} code
229
- * @property {string} type_slug
230
- * @property {Identifier} identifiers
231
- * @property {Validity} validity
232
- * @property {RuleDefinition} rule_definition
249
+ * @property {Rule[]} [rule]
250
+ * @property {DisplayMeta} [display_meta]
251
+ * @property {string} code - Unique code that is used to apply coupon
252
+ * @property {string} [coupon_type] - The type of coupon like bulk or single
253
+ * @property {string} [coupon_prefix] - Bulk coupon code prefix string
254
+ * @property {number} [coupon_counts] - Counts of culk coupon
255
+ * @property {string} [reason] - Coupon rejection reason added by reviewer
256
+ * @property {string} type_slug - The type slug of coupon discount
257
+ * @property {Identifier} [identifiers]
258
+ * @property {Validity} [validity]
259
+ * @property {RuleDefinition} [rule_definition]
233
260
  */
234
261
 
235
262
  /**
@@ -238,110 +265,149 @@ const Joi = require("joi");
238
265
  * @property {CouponSchedule} [schedule]
239
266
  */
240
267
 
268
+ /**
269
+ * @typedef CouponCreateResult
270
+ * @property {boolean} [success] - Whether the request was successful (true/false)
271
+ * @property {string} [message] - Create coupon response message that can shown
272
+ * to creator user
273
+ * @property {string} [_id] - Unique identifier for coupon created
274
+ */
275
+
241
276
  /**
242
277
  * @typedef DisplayMeta1
243
- * @property {string} [description]
244
- * @property {string} [offer_label]
245
- * @property {string} [name]
246
- * @property {string} [offer_text]
278
+ * @property {string} [description] - Define details about the offer in promotion
279
+ * @property {string} [offer_label] - Offer label of promotion that needs to display
280
+ * @property {string} [name] - Name of promotion that needs to display
281
+ * @property {string} [offer_text] - Promotion offer text used to display
247
282
  */
248
283
 
249
284
  /**
250
285
  * @typedef Ownership1
251
- * @property {string} payable_category
252
- * @property {string} payable_by
286
+ * @property {string} [payable_category] - Promotion amount payable category
287
+ * @property {string} [payable_by] - Promotion amount bearable party
253
288
  */
254
289
 
255
290
  /**
256
291
  * @typedef CompareObject
257
- * @property {number} [equals]
258
- * @property {number} [greater_than]
259
- * @property {number} [less_than_equals]
260
- * @property {number} [less_than]
261
- * @property {number} [greater_than_equals]
292
+ * @property {number} [equals] - Nummeric value must be equal to cart level rules
293
+ * @property {number} [greater_than] - Nummeric value must be greater than cart
294
+ * level rules
295
+ * @property {number} [less_than_equals] - Nummeric value must be less than or
296
+ * equal to cart level rules
297
+ * @property {number} [less_than] - Nummeric value must be less than cart level rules
298
+ * @property {number} [greater_than_equals] - Nummeric value must be greater
299
+ * than or equal to cart level rules
300
+ */
301
+
302
+ /**
303
+ * @typedef ItemSizeMapping
304
+ * @property {Object} [item_size_mapping] - Item size mapping in promotion
262
305
  */
263
306
 
264
307
  /**
265
308
  * @typedef ItemCriteria
266
309
  * @property {CompareObject} [cart_quantity]
267
- * @property {string[]} [available_zones]
268
- * @property {number[]} [item_exclude_company]
269
- * @property {number[]} [item_id]
270
- * @property {number[]} [item_l1_category]
310
+ * @property {string[]} [available_zones] - List of all zones on which promotion
311
+ * is applicable
312
+ * @property {number[]} [item_exclude_company] - List of all company id on which
313
+ * promotion is not applicable
314
+ * @property {number[]} [item_id] - List of all item ids on which promotion is applicable
315
+ * @property {number[]} [item_l1_category] - List of all L1 category on which
316
+ * promotion is applicable
271
317
  * @property {CompareObject} [cart_total]
272
318
  * @property {CompareObject} [cart_unique_item_quantity]
273
319
  * @property {CompareObject} [cart_unique_item_amount]
274
- * @property {number[]} [item_exclude_id]
275
- * @property {boolean} [all_items]
276
- * @property {number[]} [item_exclude_l1_category]
277
- * @property {string[]} [item_size]
278
- * @property {number[]} [item_store]
279
- * @property {string[]} [item_exclude_sku]
280
- * @property {number[]} [item_department]
281
- * @property {number[]} [item_exclude_store]
282
- * @property {number[]} [item_brand]
283
- * @property {number[]} [item_exclude_department]
284
- * @property {number[]} [item_exclude_category]
285
- * @property {number[]} [item_category]
320
+ * @property {number[]} [item_exclude_id] - List of all item ids on which
321
+ * promotion is not applicable
322
+ * @property {boolean} [all_items] - Boolean flag set true to applicable the
323
+ * promotion for all products
324
+ * @property {number[]} [item_exclude_l1_category] - List of all item ids on
325
+ * which promotion is not applicable
326
+ * @property {string[]} [item_size] - List of all item sizes on which promotion
327
+ * is applicable
328
+ * @property {number[]} [item_store] - List of all item store ids on which
329
+ * promotion is applicable
330
+ * @property {string[]} [item_exclude_sku] - List of all item sku on which
331
+ * promotion is not applicable
332
+ * @property {number[]} [item_department] - List of all departments ids on which
333
+ * promotion is applicable
334
+ * @property {number[]} [item_exclude_store] - List of all item store ids on
335
+ * which promotion is not applicable
336
+ * @property {number[]} [item_brand] - List of all brand ids on which promotion
337
+ * is applicable
338
+ * @property {number[]} [item_exclude_department] - List of all department ids
339
+ * on which promotion is not applicable
340
+ * @property {number[]} [item_exclude_category] - List of all L3 category on
341
+ * which promotion is not applicable
342
+ * @property {number[]} [item_category] - List of all L3 category on which
343
+ * promotion is applicable
286
344
  * @property {string[]} [buy_rules]
287
- * @property {number[]} [item_exclude_brand]
288
- * @property {number[]} [item_l2_category]
289
- * @property {number[]} [item_company]
290
- * @property {string[]} [item_tags]
291
- * @property {number[]} [item_exclude_l2_category]
292
- * @property {string[]} [item_sku]
345
+ * @property {number[]} [item_exclude_brand] - List of all brand ids on which
346
+ * promotion is not applicable
347
+ * @property {number[]} [item_l2_category] - List of all L2 category on which
348
+ * promotion is applicable
349
+ * @property {number[]} [item_company] - List of all company ids on which
350
+ * promotion is applicable
351
+ * @property {string[]} [item_tags] - List of all product tags on which
352
+ * promotion is applicable
353
+ * @property {number[]} [item_exclude_l2_category] - List of all L2 category on
354
+ * which promotion is not applicable
355
+ * @property {string[]} [item_sku] - List of all item sku on which promotion is applicable
293
356
  */
294
357
 
295
358
  /**
296
359
  * @typedef DiscountOffer
297
- * @property {number} [max_discount_amount]
298
- * @property {number} [discount_price]
299
- * @property {boolean} [apportion_discount]
300
- * @property {boolean} [partial_can_ret]
301
- * @property {number} [max_usage_per_transaction]
302
- * @property {number} [min_offer_quantity]
303
- * @property {string} [code]
304
- * @property {number} [discount_amount]
305
- * @property {number} [discount_percentage]
306
- * @property {number} [max_offer_quantity]
360
+ * @property {number} [max_discount_amount] - Maximum discount amount in promotion
361
+ * @property {number} [discount_price] - Discount price in promotion
362
+ * @property {boolean} [apportion_discount] - Flag to distribute discount for each article
363
+ * @property {boolean} [partial_can_ret] - Flag indicated return the product partially
364
+ * @property {number} [max_usage_per_transaction] - Maximum usage per
365
+ * transaction in promotion
366
+ * @property {number} [min_offer_quantity] - Minimum quantity of offer in promotion
367
+ * @property {string} [code] - Unique code of promotion
368
+ * @property {number} [discount_amount] - Discount amount in promotion
369
+ * @property {number} [discount_percentage] - Discount percentage in promotion
370
+ * @property {number} [max_offer_quantity] - Maximum quantity of product in promotion
307
371
  */
308
372
 
309
373
  /**
310
374
  * @typedef DiscountRule
311
- * @property {string} discount_type
312
- * @property {string} buy_condition
375
+ * @property {string} discount_type - The type of discount in promotion
376
+ * @property {string} buy_condition - Promotion buy rules in offer level
313
377
  * @property {ItemCriteria} item_criteria
378
+ * @property {ItemSizeMapping} [meta]
314
379
  * @property {DiscountOffer} offer
315
380
  */
316
381
 
317
382
  /**
318
383
  * @typedef PaymentAllowValue1
319
- * @property {number} [max]
384
+ * @property {number} [max] - Maximum value need to allow for payment in promotion
320
385
  */
321
386
 
322
387
  /**
323
388
  * @typedef PromotionPaymentModes
324
- * @property {string} type
389
+ * @property {string} [type] - Define the type of payment
325
390
  * @property {PaymentAllowValue1} [uses]
326
- * @property {string[]} [codes]
391
+ * @property {string[]} [codes] - List of codes associated with payment options
327
392
  */
328
393
 
329
394
  /**
330
395
  * @typedef UserRegistered
331
- * @property {string} [end]
332
- * @property {string} [start]
396
+ * @property {string} [end] - End date time format till the user is registerd
397
+ * @property {string} [start] - Start date time format when user is registerd
333
398
  */
334
399
 
335
400
  /**
336
401
  * @typedef PostOrder1
337
- * @property {boolean} [cancellation_allowed]
338
- * @property {boolean} [return_allowed]
402
+ * @property {boolean} [cancellation_allowed] - Cancellation allowed in
403
+ * promotion after order
404
+ * @property {boolean} [return_allowed] - Return allowed in promotion after order
339
405
  */
340
406
 
341
407
  /**
342
408
  * @typedef UsesRemaining1
343
- * @property {number} [user]
344
- * @property {number} [total]
409
+ * @property {number} [user] - Define total promotion count per user
410
+ * @property {number} [total] - Define total promotions count
345
411
  */
346
412
 
347
413
  /**
@@ -352,62 +418,75 @@ const Joi = require("joi");
352
418
 
353
419
  /**
354
420
  * @typedef Restrictions1
355
- * @property {Object} [payments]
421
+ * @property {PaymentModes} [payments]
356
422
  * @property {UserRegistered} [user_registered]
357
- * @property {string[]} [platforms]
423
+ * @property {string[]} [platforms] - List of platform on which promotion is
424
+ * applicable like android, ios
358
425
  * @property {PostOrder1} [post_order]
359
- * @property {number[]} [user_groups]
360
- * @property {number} [order_quantity]
361
- * @property {boolean} [anonymous_users]
362
- * @property {string[]} [user_id]
363
- * @property {UsesRestriction1} uses
364
- * @property {number[]} [ordering_stores]
426
+ * @property {number[]} [user_groups] - List of user groups on which promotion
427
+ * is applicable
428
+ * @property {number} [order_quantity] - Prmomotion max order count
429
+ * @property {boolean} [anonymous_users] - Set true, if promotion is applicable
430
+ * for guest user
431
+ * @property {string[]} [user_id] - List of user id on which promotion is applicable
432
+ * @property {UsesRestriction1} [uses]
433
+ * @property {number[]} [ordering_stores] - List of store id on which promotion
434
+ * is applicable
365
435
  */
366
436
 
367
437
  /**
368
438
  * @typedef PromotionSchedule
369
- * @property {string} end
370
- * @property {string} start
371
- * @property {boolean} published
372
- * @property {Object[]} [next_schedule]
373
- * @property {string} [cron]
374
- * @property {number} [duration]
439
+ * @property {string} [end] - Then end date of promotion till valid
440
+ * @property {string} [start] - Then start date of promotion is valid
441
+ * @property {string} [status] - Promotion status like draft, review
442
+ * @property {boolean} [published] - The status of promotion is published or not
443
+ * @property {Object[]} [next_schedule] - List of date time, which we will
444
+ * schedule the promotion
445
+ * @property {string} [cron] - Schedule the cron to run your job periodically
446
+ * @property {number} [duration] - Time in minutes for execution
375
447
  */
376
448
 
377
449
  /**
378
450
  * @typedef PromotionAction
379
- * @property {string} action_date
380
- * @property {string} action_type
451
+ * @property {string} [action_date] - Date time format in promotion
452
+ * @property {string} [action_type] - The action type of promotion
381
453
  */
382
454
 
383
455
  /**
384
456
  * @typedef PromotionAuthor
385
- * @property {string} [created_by]
386
- * @property {string} [modified_by]
457
+ * @property {string} [created_by] - The user id of user, who has created the promotion
458
+ * @property {string} [modified_by] - The user id of user, who has modified the promotion
459
+ * @property {string} [approved_by] - The user id of user, who has approved the promotion
460
+ * @property {string} [rejected_by] - The user id of user, who has rejected the promotion
461
+ * @property {string} [reviewed_by] - The user id of user, who has reviewed the promotion
387
462
  */
388
463
 
389
464
  /**
390
465
  * @typedef Visibility
391
- * @property {boolean} coupon_list
392
- * @property {boolean} pdp
466
+ * @property {boolean} [coupon_list] - Flag to show promotion on Coupon list
467
+ * @property {boolean} [pdp] - Flag to show promotion on PDP page
393
468
  */
394
469
 
395
470
  /**
396
471
  * @typedef PromotionDateMeta
397
- * @property {string} [modified_on]
398
- * @property {string} [created_on]
472
+ * @property {string} [modified_on] - Date time format when the promotion last modified
473
+ * @property {string} [created_on] - Date time format when the promotion created
474
+ * @property {string} [approved_on] - Date time format when the promotion approved
475
+ * @property {string} [rejected_on] - Date time format when the promotion rejected
476
+ * @property {string} [reviewed_on] - Date time format when the promotion reviewed
399
477
  */
400
478
 
401
479
  /**
402
480
  * @typedef PromotionListItem
403
481
  * @property {boolean} [stackable] - Allows more than one promotion to get
404
482
  * combined benefits
405
- * @property {string} [calculate_on] - Only available for Contract pricing and
406
- * Ladder pricing promotion type
483
+ * @property {string} [calculate_on] - Article Price on which promotion
484
+ * calculated like effective price or marked price. Only available for
485
+ * Contract pricing and Ladder pricing promotion type
407
486
  * @property {string} [apply_exclusive] - Doesn't allow other promotion after
408
487
  * current promotion applied on cart or article
409
488
  * @property {string} promo_group - Group into which promotion fall
410
- * @property {string} mode - Promotion mode
489
+ * @property {string} mode - Promotion mode, like coupon or promotion
411
490
  * @property {boolean} [apply_all_discount] - Prevents more than one promotion discounts
412
491
  * @property {DisplayMeta1} display_meta
413
492
  * @property {Ownership1} ownership
@@ -416,81 +495,159 @@ const Joi = require("joi");
416
495
  * promotion will be applied
417
496
  * @property {Restrictions1} [restrictions]
418
497
  * @property {string} [currency] - Currency used for promotion
419
- * @property {string} [code] - Promotion code
498
+ * @property {boolean} [is_processed] - Flag to verify if promotion is ready to
499
+ * be applied on cart and ready to update promotion
500
+ * @property {string} [code] - Unique code of promotion
420
501
  * @property {PromotionSchedule} [_schedule]
421
502
  * @property {PromotionAction} [post_order_action]
422
503
  * @property {number} [apply_priority] - Priority based on which promotion are
423
504
  * applied on articles
424
505
  * @property {PromotionAuthor} [author]
425
506
  * @property {Visibility} [visiblility]
426
- * @property {string} application_id - App id in which promotion will be used
427
- * @property {Object} buy_rules - Buy rules for the promotion
507
+ * @property {string} application_id - Application id in which promotion will be used
508
+ * @property {ItemCriteria} buy_rules
428
509
  * @property {Object} [_custom_json] - Custom data stored in promotion
429
510
  * @property {PromotionDateMeta} [date_meta]
430
- * @property {string} [_id] - Promotion id
431
- * @property {string[]} [tags]
511
+ * @property {string} [_id] - Unique identifier of promotion
512
+ * @property {string[]} [tags] - List of tags on which promotion is applicable
432
513
  */
433
514
 
434
515
  /**
435
- * @typedef PromotionsResponse
436
- * @property {PromotionListItem[]} [items]
516
+ * @typedef PromotionsResult
517
+ * @property {PromotionListItem[]} [items] - List of promotions
437
518
  * @property {Page} [page]
438
519
  */
439
520
 
440
521
  /**
441
522
  * @typedef PromotionAdd
442
- * @property {boolean} [stackable]
443
- * @property {string} [calculate_on] - Only available for Contract pricing and
444
- * Ladder pricing promotion type
445
- * @property {string} [apply_exclusive]
446
- * @property {string} promo_group
447
- * @property {string} mode
448
- * @property {boolean} [apply_all_discount]
449
- * @property {DisplayMeta1} display_meta
450
- * @property {Ownership1} ownership
451
- * @property {string} promotion_type
452
- * @property {DiscountRule[]} discount_rules
523
+ * @property {boolean} [stackable] - Boolean value set true to apply other promotions also
524
+ * @property {string} [calculate_on] - Article Price on which promotion
525
+ * calculated like effective price or marked price. Only available for
526
+ * Contract pricing and Ladder pricing promotion type
527
+ * @property {string} [apply_exclusive] - Promotion should apply on either
528
+ * article or cart.
529
+ * @property {string} promo_group - The type of promotion group
530
+ * @property {string} mode - Promotion mode, like coupon or promotion
531
+ * @property {boolean} [apply_all_discount] - True means to apply all discount offers
532
+ * @property {DisplayMeta1} [display_meta]
533
+ * @property {Ownership1} [ownership]
534
+ * @property {string} promotion_type - Type of promotion
535
+ * @property {DiscountRule[]} [discount_rules] - List of discount offers and
536
+ * their applicable conditions
453
537
  * @property {Restrictions1} [restrictions]
454
- * @property {string} [currency]
455
- * @property {string} [code]
538
+ * @property {string} [currency] - Promotion Currency code like INR
539
+ * @property {string} [code] - Promotion unique code
456
540
  * @property {PromotionSchedule} [_schedule]
457
541
  * @property {PromotionAction} [post_order_action]
458
- * @property {number} [apply_priority]
542
+ * @property {number} [apply_priority] - Promotion applicable priority
459
543
  * @property {PromotionAuthor} [author]
460
544
  * @property {Visibility} [visiblility]
461
- * @property {string} application_id
462
- * @property {Object} buy_rules
463
- * @property {Object} [_custom_json]
545
+ * @property {string} application_id - Current application id of sales channel
546
+ * @property {ItemCriteria} [buy_rules]
547
+ * @property {Object} [_custom_json] - Set extra properties in promotion
464
548
  * @property {PromotionDateMeta} [date_meta]
465
- * @property {string[]} [tags]
549
+ * @property {string[]} [tags] - List of tags applicable for promotion
550
+ */
551
+
552
+ /**
553
+ * @typedef PromotionAddResult
554
+ * @property {boolean} [stackable] - Boolean value set true to apply other promotions also
555
+ * @property {string} [calculate_on] - Article Price on which promotion
556
+ * calculated like effective price or marked price. Only available for
557
+ * Contract pricing and Ladder pricing promotion type
558
+ * @property {string} [apply_exclusive] - Promotion should apply on either
559
+ * article or cart.
560
+ * @property {string} promo_group - The type of promotion group
561
+ * @property {string} mode - Promotion mode, like coupon or promotion
562
+ * @property {boolean} [is_processed] - Flag to verify if promotion is ready to
563
+ * be applied on cart and ready to update promotion
564
+ * @property {boolean} [apply_all_discount] - True means to apply all discount offers
565
+ * @property {DisplayMeta1} [display_meta]
566
+ * @property {Ownership1} [ownership]
567
+ * @property {string} promotion_type - Type of promotion
568
+ * @property {DiscountRule[]} [discount_rules] - List of discount offers and
569
+ * their applicable conditions
570
+ * @property {Restrictions1} [restrictions]
571
+ * @property {string} [currency] - Promotion Currency code like INR
572
+ * @property {string} [code] - Promotion unique code
573
+ * @property {PromotionSchedule} [_schedule]
574
+ * @property {PromotionAction} [post_order_action]
575
+ * @property {number} [apply_priority] - Promotion applicable priority
576
+ * @property {PromotionAuthor} [author]
577
+ * @property {Visibility} [visiblility]
578
+ * @property {string} application_id - Current application id of sales channel
579
+ * @property {ItemCriteria} [buy_rules]
580
+ * @property {Object} [_custom_json] - Set extra properties in promotion
581
+ * @property {PromotionDateMeta} [date_meta]
582
+ * @property {string[]} [tags] - List of tags applicable for promotion
466
583
  */
467
584
 
468
585
  /**
469
586
  * @typedef PromotionUpdate
470
- * @property {boolean} [stackable]
471
- * @property {string} [calculate_on] - Only available for Contract pricing and
472
- * Ladder pricing promotion type
473
- * @property {string} [apply_exclusive]
474
- * @property {string} promo_group
475
- * @property {string} mode
476
- * @property {boolean} [apply_all_discount]
477
- * @property {DisplayMeta1} display_meta
478
- * @property {Ownership1} ownership
479
- * @property {string} promotion_type
480
- * @property {DiscountRule[]} discount_rules
587
+ * @property {boolean} [stackable] - Set true to apply other promotions in cart
588
+ * @property {string} [calculate_on] - Article Price on which promotion
589
+ * calculated like effective price or marked price. Only available for
590
+ * Contract pricing and Ladder pricing promotion type
591
+ * @property {string} [apply_exclusive] - Promotion should apply on either
592
+ * article or cart.
593
+ * @property {string} [reason] - Promotion rejection reason added by reviewer
594
+ * @property {string} promo_group - The type of promotion group
595
+ * @property {string} mode - Promotion mode
596
+ * @property {boolean} [apply_all_discount] - True means to apply all discount offers
597
+ * @property {DisplayMeta1} [display_meta]
598
+ * @property {Ownership1} [ownership]
599
+ * @property {string} promotion_type - The Promotion type like amount, bogo and
600
+ * percentage etc.
601
+ * @property {DiscountRule[]} [discount_rules] - List of discount offers and
602
+ * their applicable conditions
481
603
  * @property {Restrictions1} [restrictions]
482
- * @property {string} [currency]
483
- * @property {string} [code]
604
+ * @property {string} [currency] - Promotion Currency code like INR
605
+ * @property {string} [code] - Promotion unique code
484
606
  * @property {PromotionSchedule} [_schedule]
485
607
  * @property {PromotionAction} [post_order_action]
486
- * @property {number} [apply_priority]
608
+ * @property {number} [apply_priority] - Promotion applicable priority
487
609
  * @property {PromotionAuthor} [author]
488
610
  * @property {Visibility} [visiblility]
489
- * @property {string} application_id
490
- * @property {Object} buy_rules
491
- * @property {Object} [_custom_json]
611
+ * @property {string} application_id - Current application id of sales channel
612
+ * @property {ItemCriteria} [buy_rules]
613
+ * @property {Object} [_custom_json] - Set extra properties in promotion
492
614
  * @property {PromotionDateMeta} [date_meta]
493
- * @property {string[]} [tags]
615
+ * @property {string[]} [tags] - List of tags applicable for promotion
616
+ */
617
+
618
+ /**
619
+ * @typedef PromotionUpdateResult
620
+ * @property {boolean} [stackable] - Set true to apply other promotions in cart
621
+ * @property {string} [calculate_on] - Article Price on which promotion
622
+ * calculated like effective price or marked price. Only available for
623
+ * Contract pricing and Ladder pricing promotion type
624
+ * @property {string} [apply_exclusive] - Promotion should apply on either
625
+ * article or cart.
626
+ * @property {string} [reason] - Promotion rejection reason added by reviewer
627
+ * @property {boolean} [is_processed] - Flag to verify if promotion is ready to
628
+ * be applied on cart and ready to update promotion
629
+ * @property {string} promo_group - The type of promotion group
630
+ * @property {string} mode - Promotion mode
631
+ * @property {boolean} [apply_all_discount] - True means to apply all discount offers
632
+ * @property {DisplayMeta1} [display_meta]
633
+ * @property {Ownership1} [ownership]
634
+ * @property {string} promotion_type - The Promotion type like amount, bogo and
635
+ * percentage etc.
636
+ * @property {DiscountRule[]} [discount_rules] - List of discount offers and
637
+ * their applicable conditions
638
+ * @property {Restrictions1} [restrictions]
639
+ * @property {string} [currency] - Promotion Currency code like INR
640
+ * @property {string} [code] - Promotion unique code
641
+ * @property {PromotionSchedule} [_schedule]
642
+ * @property {PromotionAction} [post_order_action]
643
+ * @property {number} [apply_priority] - Promotion applicable priority
644
+ * @property {PromotionAuthor} [author]
645
+ * @property {Visibility} [visiblility]
646
+ * @property {string} application_id - Current application id of sales channel
647
+ * @property {ItemCriteria} [buy_rules]
648
+ * @property {Object} [_custom_json] - Set extra properties in promotion
649
+ * @property {PromotionDateMeta} [date_meta]
650
+ * @property {string[]} [tags] - List of tags applicable for promotion
494
651
  */
495
652
 
496
653
  /**
@@ -500,56 +657,60 @@ const Joi = require("joi");
500
657
  */
501
658
 
502
659
  /**
503
- * @typedef ActivePromosResponse
504
- * @property {string} [entity_slug]
505
- * @property {string} [title] - Name of the promotion
506
- * @property {string} [modified_on] - Coupon modification date
660
+ * @typedef ActivePromosResult
661
+ * @property {string} [entity_slug] - A short, human-readable, URL-friendly
662
+ * identifier of Promotion or coupon
663
+ * @property {string} [title] - Name of the promotion or coupon
664
+ * @property {string} [modified_on] - Coupon or promotion modification date
507
665
  * @property {string} [example] - Discount offers examples
508
666
  * @property {string} [entity_type] - Type of entity to be selected from :
509
667
  * ['coupon', 'promotion']
510
- * @property {string} [created_on] - Coupon creation date
668
+ * @property {string} [created_on] - Coupon or modification creation date
511
669
  * @property {boolean} [is_hidden] - If the promo is active or not
512
- * @property {string} [type] - Coupon type
670
+ * @property {string} [type] - Coupon or promotion type
513
671
  * @property {string} [subtitle] - Small description of the current offer
514
672
  * @property {string} [description] - The description of the offer in the form of an HTML
515
673
  */
516
674
 
517
675
  /**
518
676
  * @typedef Charges
519
- * @property {number} [charges]
520
- * @property {number} [threshold]
677
+ * @property {number} [charges] - Delivery chanrges applied on the product of cart
678
+ * @property {number} [threshold] - Threshold of cart value on which the charge
679
+ * should be applied
521
680
  */
522
681
 
523
682
  /**
524
683
  * @typedef DeliveryCharges
525
- * @property {Charges[]} [charges]
526
- * @property {boolean} [enabled]
684
+ * @property {Charges[]} [charges] - List of delivery changes information of the cart
685
+ * @property {boolean} [enabled] - Enable or disable delivery charge on cart
527
686
  */
528
687
 
529
688
  /**
530
689
  * @typedef CartMetaConfigUpdate
531
- * @property {number} [min_cart_value]
532
- * @property {number} [max_cart_value]
533
- * @property {boolean} [bulk_coupons]
534
- * @property {number} [max_cart_items]
535
- * @property {string} [gift_display_text]
690
+ * @property {number} [min_cart_value] - Minimum order value to checkout
691
+ * @property {number} [max_cart_value] - Maximum order value to checkout
692
+ * @property {boolean} [bulk_coupons] - Indicates bulk coupon applicable for cart
693
+ * @property {number} [max_cart_items] - Maximum cart items to checkout
694
+ * @property {string} [gift_display_text] - Free gift charges text to show
536
695
  * @property {DeliveryCharges} [delivery_charges]
537
- * @property {boolean} [revenue_engine_coupon]
538
- * @property {number} [gift_pricing]
539
- * @property {boolean} [enabled]
696
+ * @property {boolean} [revenue_engine_coupon] - It define credit coupon
697
+ * applicable for cart
698
+ * @property {number} [gift_pricing] - Free gift charges per product
699
+ * @property {boolean} [enabled] - Enabled flag for cart configuration
540
700
  */
541
701
 
542
702
  /**
543
703
  * @typedef CartMetaConfigAdd
544
- * @property {number} [min_cart_value]
545
- * @property {number} [max_cart_value]
546
- * @property {boolean} [bulk_coupons]
547
- * @property {number} [max_cart_items]
548
- * @property {string} [gift_display_text]
704
+ * @property {number} [min_cart_value] - Minimum order value to checkout
705
+ * @property {number} [max_cart_value] - Maximum order value to checkout
706
+ * @property {boolean} [bulk_coupons] - Indicates bulk coupon applicable for cart
707
+ * @property {number} [max_cart_items] - Maximum cart items to checkout
708
+ * @property {string} [gift_display_text] - Free gift charges text to show
549
709
  * @property {DeliveryCharges} [delivery_charges]
550
- * @property {boolean} [revenue_engine_coupon]
551
- * @property {number} [gift_pricing]
552
- * @property {boolean} [enabled]
710
+ * @property {boolean} [revenue_engine_coupon] - It define credit coupon
711
+ * applicable for cart
712
+ * @property {number} [gift_pricing] - Free gift charges per product
713
+ * @property {boolean} [enabled] - Enabled flag for cart configuration
553
714
  */
554
715
 
555
716
  /**
@@ -557,10 +718,10 @@ const Joi = require("joi");
557
718
  * @property {number} [value] - Value of price adjustment for article
558
719
  * @property {string} [code] - Code to identify price adjustment on article
559
720
  * @property {string} [type] - Type of price adjusment
560
- * @property {string} article_id - Id of article
721
+ * @property {string} article_id - Unique identifier of article
561
722
  * @property {number} [quantity] - Total quantity of the article to be
562
723
  * considered (currently used only in discount type)
563
- * @property {Object} [meta] - Meta related to article
724
+ * @property {Object} [meta] - Meta data related to article
564
725
  */
565
726
 
566
727
  /**
@@ -571,14 +732,14 @@ const Joi = require("joi");
571
732
 
572
733
  /**
573
734
  * @typedef Collection
574
- * @property {string} refund_by
575
- * @property {string} collected_by
735
+ * @property {string} refund_by - Bearable party who is refunding the amount
736
+ * @property {string} collected_by - The party who is collecting the amount
576
737
  */
577
738
 
578
739
  /**
579
740
  * @typedef PriceAdjustmentUpdate
580
741
  * @property {string} [modified_by] - The entity that modified the field
581
- * @property {number} value
742
+ * @property {number} value - The amount applied on the cart
582
743
  * @property {string} message - The message associated with the price adjustment
583
744
  * @property {string} [apply_expiry] - The date and time when the expiry should be applied
584
745
  * @property {PriceAdjustmentRestrictions} [restrictions] - Restrictions applied
@@ -587,51 +748,57 @@ const Joi = require("joi");
587
748
  * @property {boolean} article_level_distribution - Flag indicating whether the
588
749
  * distribution should is done at the article level
589
750
  * @property {Collection} collection
590
- * @property {string} type - Type of price adjusment
751
+ * @property {string} type - Type of price adjusment like charge, mop, discount etc.
591
752
  * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
592
753
  * allowed (default: False)
593
754
  * @property {boolean} is_authenticated - Flag indicating whether the user is
594
755
  * authenticated
595
756
  * @property {Article[]} article_ids - The list of article object in the price adjustment
596
- * @property {Object} [meta]
597
- * @property {string} cart_id - The ID of the cart
757
+ * @property {boolean} [auto_remove] - This field if set true will remove mop
758
+ * type price adjustment.
759
+ * @property {Object} [meta] - Additional information regarding price adjustment
760
+ * @property {string} cart_id - Unique identifier of the cart
761
+ * @property {DistributionLogic} [distribution_logic]
598
762
  */
599
763
 
600
764
  /**
601
765
  * @typedef PriceAdjustment
602
- * @property {number} value
766
+ * @property {number} value - The amount applied on the cart
603
767
  * @property {string} message - The message associated with the price adjustment
604
768
  * @property {string} [apply_expiry] - The date and time when the expiry should be applied
605
- * @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
606
- * the restrictions applied to this particular item or service, including
607
- * whether or not cancellation and return are allowed, etc
769
+ * @property {PriceAdjustmentRestrictions} [restrictions] - This field specifies
770
+ * the restrictions for this item or service, such as whether cancellation and
771
+ * return are permitted, except for `charge` type.
608
772
  * @property {boolean} article_level_distribution - Flag indicating whether the
609
773
  * distribution should is done at the article level
610
- * @property {string} [id]
774
+ * @property {string} [id] - Unique identifier of Price adjustment
611
775
  * @property {Collection} collection
612
- * @property {string} type - Type of price adjusment
776
+ * @property {string} type - Type of price adjusment like charge, discount, mop etc.
613
777
  * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
614
- * allowed (default: False)
778
+ * allowed (default: False) expect for `charge` type
615
779
  * @property {boolean} is_authenticated - Flag indicating whether the user is
616
780
  * authenticated
617
781
  * @property {Article[]} article_ids - The list of article object in the price adjustment
618
- * @property {Object} [meta]
619
- * @property {string} cart_id - The ID of the cart
782
+ * @property {boolean} [auto_remove] - This field if set true will remove mop
783
+ * type price adjustment.
784
+ * @property {Object} [meta] - Additional information regarding price adjustment
785
+ * @property {string} cart_id - Unique identifier of the cart
786
+ * @property {DistributionLogic} [distribution_logic]
620
787
  */
621
788
 
622
789
  /**
623
- * @typedef PriceAdjustmentResponse
790
+ * @typedef PriceAdjustmentResult
624
791
  * @property {PriceAdjustment} [data]
625
792
  */
626
793
 
627
794
  /**
628
- * @typedef GetPriceAdjustmentResponse
795
+ * @typedef GetPriceAdjustmentResult
629
796
  * @property {PriceAdjustment[]} [data]
630
797
  */
631
798
 
632
799
  /**
633
800
  * @typedef PriceAdjustmentAdd
634
- * @property {number} value
801
+ * @property {number} value - The amount applied on the cart
635
802
  * @property {string} message - The message associated with the price adjustment
636
803
  * @property {string} [apply_expiry] - The date and time when the expiry should be applied
637
804
  * @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
@@ -647,98 +814,134 @@ const Joi = require("joi");
647
814
  * @property {boolean} is_authenticated - Flag indicating whether the user is
648
815
  * authenticated
649
816
  * @property {Article[]} article_ids - The list of article object in the price adjustment
650
- * @property {Object} [meta]
651
- * @property {string} cart_id - The ID of the cart
817
+ * @property {Object} [meta] - Additional information regarding price adjustment
818
+ * @property {string} cart_id - Unique identifier of the cart
819
+ * @property {boolean} [auto_remove] - This field if set true will remove mop
820
+ * type price adjustment.
821
+ * @property {DistributionLogic} [distribution_logic]
822
+ */
823
+
824
+ /**
825
+ * @typedef DistributionRule
826
+ * @property {Object} [conditions] - This field defines the distribution conditions
827
+ */
828
+
829
+ /**
830
+ * @typedef Distribution
831
+ * @property {string} [type] - This field defines the distribution type allowed
832
+ * values('multi', 'single')
833
+ * @property {string} [logic] - This field defines the distribution logic
834
+ * allowed values('apportion', 'weighted', 'equally')
835
+ * @property {DistributionRule} [rule]
836
+ */
837
+
838
+ /**
839
+ * @typedef DistributionLogic
840
+ * @property {string} [distribution_level] - This field defines the distribution
841
+ * level, currently allowed distribution level is (shipment)
842
+ * @property {Distribution} [distribution]
652
843
  */
653
844
 
654
845
  /**
655
846
  * @typedef CartItem
656
- * @property {number} [quantity]
657
- * @property {string} product_id
658
- * @property {string} size
847
+ * @property {number} [quantity] - Quantity of product in cart
848
+ * @property {string} product_id - Unique identifier of product in cart
849
+ * @property {string} size - Size of product in cart
659
850
  */
660
851
 
661
852
  /**
662
- * @typedef OpenapiCartDetailsRequest
663
- * @property {CartItem[]} cart_items
853
+ * @typedef OpenapiCartDetailsCreation
854
+ * @property {CartItem[]} cart_items - List of products in cart
664
855
  */
665
856
 
666
857
  /**
667
858
  * @typedef CouponBreakup
668
- * @property {string} [title]
669
- * @property {number} [max_discount_value]
670
- * @property {number} [value]
671
- * @property {boolean} [is_applied]
672
- * @property {string} [uid]
673
- * @property {string} [coupon_type]
674
- * @property {string} [sub_title]
675
- * @property {number} [coupon_value]
676
- * @property {string} [code]
677
- * @property {string} [type]
678
- * @property {number} [minimum_cart_value]
679
- * @property {string} [message]
680
- * @property {string} [description]
859
+ * @property {string} [title] - Coupon Title of the coupon applied denotes name
860
+ * of the coupon
861
+ * @property {number} [max_discount_value] - Maximum discount value of the
862
+ * coupon applied to cart
863
+ * @property {number} [value] - Coupon value of the coupon applied to cart
864
+ * @property {boolean} [is_applied] - Applied flag which denotes if any coupon
865
+ * is applied to cart
866
+ * @property {string} [uid] - Unique identifier of the coupon applied to cart
867
+ * @property {string} [coupon_type] - Type of the coupon applied to cart
868
+ * @property {string} [sub_title] - Coupon subtitle of the coupon applied to
869
+ * cart which is used to display
870
+ * @property {number} [coupon_value] - Value of the coupon applied to cart
871
+ * @property {string} [code] - Coupon code of the coupon applied
872
+ * @property {string} [type] - Type of the coupon applied to cart
873
+ * @property {number} [minimum_cart_value] - Minimum cart value of the coupon
874
+ * applied to cart
875
+ * @property {string} [message] - Coupon message of the coupon applied to cart
876
+ * @property {string} [description] - Coupon description of the coupon applied to cart.
681
877
  */
682
878
 
683
879
  /**
684
880
  * @typedef DisplayBreakup
685
- * @property {string} [key]
686
- * @property {number} [value]
687
- * @property {string} [currency_code]
688
- * @property {string} [currency_symbol]
689
- * @property {string} [display]
690
- * @property {string[]} [message]
881
+ * @property {string} [key] - Key of the price like total_mrp, total, subtotal etc
882
+ * @property {number} [value] - Numeric value for the price
883
+ * @property {string} [currency_code] - Currency code for the price
884
+ * @property {string} [currency_symbol] - Currency symbol for the price
885
+ * @property {string} [display] - Display key field that to be shown against the value
886
+ * @property {string[]} [message] - List of message at price level to be displayed
691
887
  */
692
888
 
693
889
  /**
694
890
  * @typedef LoyaltyPoints
695
- * @property {boolean} [is_applied]
696
- * @property {number} [total]
697
- * @property {number} [applicable]
698
- * @property {string} [description]
891
+ * @property {boolean} [is_applied] - Whether the loyalty points are applied on the cart
892
+ * @property {number} [total] - Total loyalty points available with user
893
+ * @property {number} [applicable] - Whether the loyalty points are applicable
894
+ * for the cart
895
+ * @property {string} [description] - Description for loyalty points
699
896
  */
700
897
 
701
898
  /**
702
899
  * @typedef RawBreakup
703
- * @property {number} [coupon]
704
- * @property {number} [gst_charges]
705
- * @property {number} [mrp_total]
706
- * @property {number} [fynd_cash]
707
- * @property {number} [vog]
708
- * @property {number} [gift_card]
709
- * @property {number} [cod_charge]
710
- * @property {number} [total]
711
- * @property {number} [discount]
712
- * @property {number} [delivery_charge]
713
- * @property {number} [you_saved]
714
- * @property {number} [subtotal]
715
- * @property {number} [convenience_fee]
900
+ * @property {number} [coupon] - Coupon amount applied to cart
901
+ * @property {number} [gst_charges] - GST charges applied on cart
902
+ * @property {number} [mrp_total] - Maximum price total amount of all products in cart
903
+ * @property {number} [fynd_cash] - Loyalty points applied on cart
904
+ * @property {number} [vog] - Total value of goods after all discount, coupons
905
+ * and promotion applied of all products in cart
906
+ * @property {number} [gift_card] - Gift cart amount applied on cart
907
+ * @property {number} [cod_charge] - Cod charge value applied to cart. This is
908
+ * applied when user select payment mode as COD
909
+ * @property {number} [total] - Total payable amount by the customer
910
+ * @property {number} [discount] - Discount amount recieved on cart
911
+ * @property {number} [delivery_charge] - Delivery charge applied to cart
912
+ * @property {number} [you_saved] - Total amount will be saved if customer
913
+ * places the order
914
+ * @property {number} [subtotal] - Selling price amount of all products in cart
915
+ * @property {number} [convenience_fee] - Convenience fee amount applied to cart
716
916
  */
717
917
 
718
918
  /**
719
919
  * @typedef CartBreakup
720
920
  * @property {CouponBreakup} [coupon]
721
- * @property {DisplayBreakup[]} [display]
921
+ * @property {DisplayBreakup[]} [display] - List of breakup data which is used
922
+ * to display the breakup to the customer like MRP total, Discount, Sub total,
923
+ * coupon value, promotion value and final total
722
924
  * @property {LoyaltyPoints} [loyalty_points]
723
925
  * @property {RawBreakup} [raw]
724
926
  */
725
927
 
726
928
  /**
727
929
  * @typedef ProductImage
728
- * @property {string} [secure_url]
729
- * @property {string} [url]
730
- * @property {string} [aspect_ratio]
930
+ * @property {string} [secure_url] - Secured url of the product image
931
+ * @property {string} [url] - Bucket link url for product image
932
+ * @property {string} [aspect_ratio] - Aspect ratio of the product image
731
933
  */
732
934
 
733
935
  /**
734
936
  * @typedef Tags
735
- * @property {Object} [tags]
937
+ * @property {Object} [tags] - Tags is a lable or batch that is attached to a
938
+ * product in cart
736
939
  */
737
940
 
738
941
  /**
739
942
  * @typedef BaseInfo
740
- * @property {number} [uid]
741
- * @property {string} [name]
943
+ * @property {number} [uid] - Unique identifier of entities like brand or seller
944
+ * @property {string} [name] - Name of entities like brand or seller
742
945
  */
743
946
 
744
947
  /**
@@ -746,43 +949,62 @@ const Joi = require("joi");
746
949
  * @property {string[]} [product_slug] - Contains list of product slug
747
950
  */
748
951
 
952
+ /**
953
+ * @typedef ProductActionParams
954
+ * @property {string[]} [slug] - Unique product url name generated via product
955
+ * name and other meta data.
956
+ */
957
+
958
+ /**
959
+ * @typedef ProductActionPage
960
+ * @property {string} [type] - Entity of page to be redirected on click
961
+ * @property {ProductActionParams} [params]
962
+ */
963
+
749
964
  /**
750
965
  * @typedef ProductAction
751
- * @property {string} [type]
752
- * @property {string} [url]
966
+ * @property {string} [type] - Type of action
967
+ * @property {string} [url] - Url of the product to render the product
753
968
  * @property {ActionQuery} [query]
969
+ * @property {ProductActionPage} [page]
754
970
  */
755
971
 
756
972
  /**
757
973
  * @typedef CategoryInfo
758
- * @property {number} [uid] - Product Category Id
759
- * @property {string} [name]
974
+ * @property {number} [uid] - Unique identifier of Product Category
975
+ * @property {string} [name] - Category name of the product
760
976
  */
761
977
 
762
978
  /**
763
979
  * @typedef CartProduct
764
980
  * @property {string} [slug] - Unique product url name generated via product
765
981
  * name and other meta data
766
- * @property {ProductImage[]} [images]
982
+ * @property {ProductImage[]} [images] - Product Images urls of different types
983
+ * like secure url, aspect ration url and url
767
984
  * @property {Tags} [teaser_tag]
768
985
  * @property {BaseInfo} [brand]
769
986
  * @property {ProductAction} [action]
770
- * @property {number} [uid]
771
- * @property {string[]} [tags]
772
- * @property {Object} [_custom_json]
773
- * @property {string} [type]
774
- * @property {string} [name]
775
- * @property {string} [item_code]
776
- * @property {CategoryInfo[]} [categories]
777
- * @property {Object} [attributes]
987
+ * @property {number} [uid] - Unique identifier of the product in cart
988
+ * @property {string[]} [tags] - Products tags that are added to each product to
989
+ * identify the set of products
990
+ * @property {Object} [_custom_json] - Field to add custom json of the product in cart
991
+ * @property {string} [type] - Type of product in cart
992
+ * @property {string} [name] - Product name of the product in cart which is
993
+ * defined on platform
994
+ * @property {string} [item_code] - Product code of the product while defining
995
+ * product on platform
996
+ * @property {CategoryInfo[]} [categories] - Product category information which
997
+ * incldes category name and category id
998
+ * @property {Object} [attributes] - Product attributes defined on platform
778
999
  */
779
1000
 
780
1001
  /**
781
1002
  * @typedef BasePrice
782
- * @property {number} [effective]
783
- * @property {string} [currency_code]
784
- * @property {string} [currency_symbol]
785
- * @property {number} [marked]
1003
+ * @property {number} [effective] - Current per unit price of product after
1004
+ * existing deductions
1005
+ * @property {string} [currency_code] - Currency code for all amounts
1006
+ * @property {string} [currency_symbol] - Currency symbol of the currncy used for price
1007
+ * @property {number} [marked] - Original price of product
786
1008
  */
787
1009
 
788
1010
  /**
@@ -793,43 +1015,54 @@ const Joi = require("joi");
793
1015
 
794
1016
  /**
795
1017
  * @typedef StoreInfo
796
- * @property {number} [uid]
797
- * @property {string} [name]
798
- * @property {string} [store_code]
1018
+ * @property {number} [uid] - Unique identifiers of the store from where product
1019
+ * is fulfileld
1020
+ * @property {string} [name] - Store name of the store from where the product is fulfiled
1021
+ * @property {string} [store_code] - A unique code or identifier for the store,
1022
+ * often used for internal reference
799
1023
  */
800
1024
 
801
1025
  /**
802
1026
  * @typedef ProductArticle
803
- * @property {string} [seller_identifier]
804
- * @property {number} [quantity]
1027
+ * @property {string} [seller_identifier] - List of identifiers used by sellers
1028
+ * for the product size.
1029
+ * @property {number} [quantity] - Quantity of the article added in cart
805
1030
  * @property {BaseInfo} [seller]
806
- * @property {Object} [cart_item_meta]
807
- * @property {Object} [parent_item_identifiers]
808
- * @property {boolean} [is_gift_visible]
809
- * @property {string} [uid]
810
- * @property {Object} [gift_card]
811
- * @property {string[]} [product_group_tags]
812
- * @property {Object} [identifier]
813
- * @property {number} [mto_quantity]
814
- * @property {Object} [extra_meta]
815
- * @property {string} [type]
816
- * @property {Object} [_custom_json]
1031
+ * @property {Object} [cart_item_meta] - Meta details of the article added from cart
1032
+ * @property {Object} [parent_item_identifiers] - Fields to determine parent
1033
+ * product of the product
1034
+ * @property {boolean} [is_gift_visible] - Whether the product can be purchased
1035
+ * as a gift. It is true if the product is available for gifting and false otherwise.
1036
+ * @property {string} [uid] - This unique identifier is assigned to the specific
1037
+ * article. This represents item x size x location.
1038
+ * @property {Object} [gift_card] - Gift card detail if gift card applied to the
1039
+ * product which indicates gift price, gift applicable flag and display
1040
+ * message for the gift
1041
+ * @property {string[]} [product_group_tags] - List fot the unique identifier
1042
+ * for the product grouping.
1043
+ * @property {Object} [identifier] - Unique identifier of the article
1044
+ * @property {number} [mto_quantity] - Quantity of the product which will
1045
+ * specially manufactured as not available in stock
1046
+ * @property {Object} [extra_meta] - Field to update extra meta of the article in cart
1047
+ * @property {string} [type] - Type of the data sent in response. Possible value
1048
+ * is article
1049
+ * @property {Object} [_custom_json] - Field to update custom json of the article in cart
817
1050
  * @property {ArticlePriceInfo} [price]
818
- * @property {Object} [meta]
819
- * @property {string} [size]
1051
+ * @property {Object} [meta] - Meta data of article in cart
1052
+ * @property {string} [size] - Size of the article added in cart
820
1053
  * @property {StoreInfo} [store]
821
1054
  * @property {string[]} [tags] - A list of article tags
822
1055
  */
823
1056
 
824
1057
  /**
825
1058
  * @typedef Ownership2
826
- * @property {string} [payable_category] - Promo amount payable category
827
- * @property {string} [payable_by] - Promo amount bearable party
1059
+ * @property {string} [payable_category] - Promotion amount payable category
1060
+ * @property {string} [payable_by] - Promotion amount bearable party
828
1061
  */
829
1062
 
830
1063
  /**
831
1064
  * @typedef DiscountRulesApp
832
- * @property {Object} [offer] - Offer for promotion
1065
+ * @property {Object} [offer] - Offer detail for promotion
833
1066
  * @property {Object} [raw_offer] - Raw offer details for promotion
834
1067
  * @property {Object} [item_criteria] - Item criteria of promotion
835
1068
  * @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
@@ -838,9 +1071,10 @@ const Joi = require("joi");
838
1071
  /**
839
1072
  * @typedef AppliedFreeArticles
840
1073
  * @property {string} [parent_item_identifier] - Parent item identifier for free article
841
- * @property {number} [quantity] - Free article quantity
842
- * @property {string} [article_id] - Free article id
1074
+ * @property {number} [quantity] - Free article quantity in promotion
1075
+ * @property {string} [article_id] - Unique identifier of free article
843
1076
  * @property {FreeGiftItems} [free_gift_item_details] - Free gift items details
1077
+ * in promotion
844
1078
  */
845
1079
 
846
1080
  /**
@@ -862,19 +1096,21 @@ const Joi = require("joi");
862
1096
  * @property {BuyRules[]} [buy_rules] - Buy rules for promotions
863
1097
  * @property {string} [offer_text] - Offer text of current promotion
864
1098
  * @property {number} [amount] - Per unit discount amount applied with current promotion
1099
+ * @property {string} [float_amount] - Per unit discount amount with decimal
1100
+ * values applied with current promotion.
865
1101
  * @property {string} [promotion_type] - Promotion type of current promotion
866
1102
  * @property {boolean} [mrp_promotion] - If applied promotion is applied on
867
1103
  * product MRP or ESP
868
1104
  * @property {string} [promotion_group] - Promotion group for the promotion
869
- * @property {string} [promo_id] - Promotion id
1105
+ * @property {string} [promo_id] - Promotion unique identifier
870
1106
  * @property {Object} [meta] - Meta object for extra data
871
- * @property {string} [code] - Promotion code
1107
+ * @property {string} [code] - Promotion unique code
872
1108
  */
873
1109
 
874
1110
  /**
875
1111
  * @typedef PromiseFormatted
876
- * @property {string} [max]
877
- * @property {string} [min]
1112
+ * @property {string} [max] - Maximum Delivery promise formatted timestamp
1113
+ * @property {string} [min] - Minimum Delivery promise formatted timestamp
878
1114
  */
879
1115
 
880
1116
  /**
@@ -885,8 +1121,8 @@ const Joi = require("joi");
885
1121
 
886
1122
  /**
887
1123
  * @typedef PromiseTimestamp
888
- * @property {number} [max]
889
- * @property {number} [min]
1124
+ * @property {number} [max] - Maximum Promise for the shipment
1125
+ * @property {number} [min] - Minimum delivery promise time for the shipment
890
1126
  */
891
1127
 
892
1128
  /**
@@ -898,19 +1134,23 @@ const Joi = require("joi");
898
1134
 
899
1135
  /**
900
1136
  * @typedef CouponDetails
901
- * @property {number} [discount_total_quantity]
902
- * @property {number} [discount_single_quantity]
903
- * @property {string} [code]
1137
+ * @property {number} [discount_total_quantity] - Total discount earned from
1138
+ * coupon applied to cart
1139
+ * @property {number} [discount_single_quantity] - Discout amount applied from
1140
+ * coupon for single quantity of the product
1141
+ * @property {string} [code] - Coupon code of the coupon applied
904
1142
  */
905
1143
 
906
1144
  /**
907
1145
  * @typedef ProductPrice
908
- * @property {number} [marked]
909
- * @property {number} [add_on]
910
- * @property {string} [currency_code]
911
- * @property {string} [currency_symbol]
912
- * @property {number} [effective]
913
- * @property {number} [selling]
1146
+ * @property {number} [marked] - Maximum price of the product
1147
+ * @property {number} [add_on] - Price before promotion and coupon amount
1148
+ * applied for calculation
1149
+ * @property {string} [currency_code] - Currency code of the price defined for the product
1150
+ * @property {string} [currency_symbol] - Currency symbol of the price defined
1151
+ * for the product
1152
+ * @property {number} [effective] - Selling price of the product
1153
+ * @property {number} [selling] - Selling price of the product
914
1154
  */
915
1155
 
916
1156
  /**
@@ -926,226 +1166,259 @@ const Joi = require("joi");
926
1166
 
927
1167
  /**
928
1168
  * @typedef ProductAvailabilitySize
929
- * @property {string} [display]
930
- * @property {string} [value]
931
- * @property {boolean} [is_available]
1169
+ * @property {string} [display] - Display size of the product
1170
+ * @property {string} [value] - Actual value of the size
1171
+ * @property {boolean} [is_available] - Available flag for the size of the
1172
+ * product if that is available
932
1173
  */
933
1174
 
934
1175
  /**
935
1176
  * @typedef ProductAvailability
936
- * @property {boolean} [is_valid]
937
- * @property {number} [other_store_quantity]
938
- * @property {boolean} [deliverable]
939
- * @property {ProductAvailabilitySize[]} [available_sizes]
940
- * @property {boolean} [out_of_stock]
941
- * @property {string[]} [sizes]
1177
+ * @property {boolean} [is_valid] - Valid flag for the product if the product
1178
+ * added in cart is valid to place the order
1179
+ * @property {number} [other_store_quantity] - Quantity of the product available
1180
+ * on other store
1181
+ * @property {boolean} [deliverable] - Deliverable flag denotes if the product
1182
+ * is deliverable or not
1183
+ * @property {ProductAvailabilitySize[]} [available_sizes] - Product sizes availability
1184
+ * @property {boolean} [out_of_stock] - Denotes if the product is available in stock
1185
+ * @property {string[]} [sizes] - All sizes of the product
942
1186
  */
943
1187
 
944
1188
  /**
945
1189
  * @typedef PromoMeta
946
- * @property {string} [message]
1190
+ * @property {string} [message] - Loyalty points message denotes how much
1191
+ * loyalty points and applied and how much left with the user
947
1192
  */
948
1193
 
949
1194
  /**
950
1195
  * @typedef CartProductInfo
951
- * @property {number} [quantity]
1196
+ * @property {number} [quantity] - Quantity of the product added in cart
952
1197
  * @property {CartProduct} [product]
953
- * @property {string} [product_ean_id]
954
- * @property {Object} [parent_item_identifiers]
955
- * @property {boolean} [is_set]
1198
+ * @property {string} [product_ean_id] - European Article Number of the product
1199
+ * (limited upto 50 EAN identifier in a single request)
1200
+ * @property {Object} [parent_item_identifiers] - Parent item information of the
1201
+ * product which identifies the parent of the product in cart
1202
+ * @property {boolean} [is_set] - Whether or not the product is a set of items
956
1203
  * @property {ProductArticle} [article]
957
- * @property {AppliedPromotion[]} [promotions_applied]
1204
+ * @property {AppliedPromotion[]} [promotions_applied] - List of applicable
1205
+ * promotion for the product in cart
958
1206
  * @property {ShipmentPromise} [delivery_promise]
959
- * @property {string} [key]
1207
+ * @property {string} [key] - The attribute key associated with the size
960
1208
  * @property {CouponDetails} [coupon]
961
- * @property {Object} [bulk_offer]
1209
+ * @property {Object} [bulk_offer] - Bulk offer information for the product
1210
+ * which denotes if any bulk offer is applied to the product in cart
962
1211
  * @property {ProductPriceInfo} [price]
963
- * @property {string} [coupon_message]
1212
+ * @property {string} [coupon_message] - Message for the coupon denotes which
1213
+ * coupon is applied and empty if not applied
964
1214
  * @property {CartProductIdentifer} identifiers
965
- * @property {string} [message]
966
- * @property {string} [discount]
1215
+ * @property {string} [message] - Product level message which denotes error
1216
+ * information to display over the product in cart
1217
+ * @property {string} [discount] - Discount amount of the product in cart
967
1218
  * @property {ProductAvailability} [availability]
968
- * @property {Object} [moq]
1219
+ * @property {Object} [moq] - An Integer indication the Minimum Order Quantity
1220
+ * of a product, e.g. 100.
969
1221
  * @property {ProductPriceInfo} [price_per_unit]
970
1222
  * @property {PromoMeta} [promo_meta]
971
- * @property {Object} [custom_order]
1223
+ * @property {Object} [custom_order] - Whether MTO (Make to Order) is enabled or not.
972
1224
  */
973
1225
 
974
1226
  /**
975
- * @typedef OpenapiCartDetailsResponse
976
- * @property {boolean} [is_valid]
977
- * @property {string} [message]
1227
+ * @typedef OpenapiCartDetailsResult
1228
+ * @property {boolean} [is_valid] - Cart validity flag determines the if the
1229
+ * response is valid or not
1230
+ * @property {string} [message] - Message of the cart Open API cart detail response
978
1231
  * @property {CartBreakup} [breakup_values]
979
- * @property {CartProductInfo[]} [items]
1232
+ * @property {CartProductInfo[]} [items] - Items details in cart
980
1233
  */
981
1234
 
982
1235
  /**
983
- * @typedef OpenApiErrorResponse
984
- * @property {boolean} [success]
985
- * @property {string} [message]
1236
+ * @typedef OpenApiErrorResult
1237
+ * @property {boolean} [success] - Success flag for cart detail open api response
1238
+ * @property {string} [message] - Error message of the Open API cart detail response
986
1239
  * @property {Object} [errors] - Contains field name which has error as key and
987
1240
  * error message as value
988
1241
  */
989
1242
 
990
1243
  /**
991
1244
  * @typedef ShippingAddress
992
- * @property {string} [country]
993
- * @property {string} [state]
994
- * @property {string} [city]
995
- * @property {number} [phone]
996
- * @property {string} area_code
997
- * @property {string} [country_iso_code]
998
- * @property {string} [country_phone_code]
999
- * @property {Object} [meta]
1000
- * @property {string} [address_type]
1001
- * @property {string} [area]
1002
- * @property {string} [area_code_slug]
1003
- * @property {string} [name]
1004
- * @property {string} [landmark]
1005
- * @property {string} [email]
1006
- * @property {string} [country_code]
1007
- * @property {number} [pincode]
1008
- * @property {string} [address]
1009
- */
1010
-
1011
- /**
1012
- * @typedef OpenApiCartServiceabilityRequest
1013
- * @property {CartItem[]} cart_items
1245
+ * @property {string} [country] - Country of address
1246
+ * @property {string} [state] - State of the address
1247
+ * @property {string} [city] - City of the address
1248
+ * @property {number} [phone] - Phone number for address
1249
+ * @property {string} area_code - Area code of the address
1250
+ * @property {string} [country_iso_code] - Country iso code for address
1251
+ * @property {string} [country_phone_code] - Country phone code for address
1252
+ * @property {Object} [meta] - Metadata of the address
1253
+ * @property {string} [address_type] - Address type of address
1254
+ * @property {string} [area] - Area description for address
1255
+ * @property {string} [area_code_slug] - Area code slug for address. example
1256
+ * pincode is slug for India
1257
+ * @property {string} [name] - Name of person in address data to whom it belongs to
1258
+ * @property {string} [landmark] - Landmark of address
1259
+ * @property {string} [email] - Email address for address data
1260
+ * @property {string} [country_code] - Country code of address
1261
+ * @property {number} [pincode] - Pincode for address data
1262
+ * @property {string} [address] - Address description for address data
1263
+ */
1264
+
1265
+ /**
1266
+ * @typedef OpenApiCartServiceabilityCreation
1267
+ * @property {CartItem[]} cart_items - List of items in open api cart response
1014
1268
  * @property {ShippingAddress} shipping_address
1015
1269
  */
1016
1270
 
1017
1271
  /**
1018
- * @typedef OpenApiCartServiceabilityResponse
1019
- * @property {boolean} [is_valid]
1020
- * @property {CartProductInfo[]} [items]
1272
+ * @typedef OpenApiCartServiceabilityResult
1273
+ * @property {boolean} [is_valid] - Cart validity flag determines the if the
1274
+ * response is valid or not
1275
+ * @property {CartProductInfo[]} [items] - Items data list in user cart that
1276
+ * includes item id, item size, store id, available sizes and rest of the item
1277
+ * related data
1021
1278
  * @property {ShipmentPromise} [delivery_promise]
1022
- * @property {string} [message]
1279
+ * @property {string} [message] - Message of the cart detail API response
1023
1280
  * @property {CartBreakup} [breakup_values]
1024
1281
  */
1025
1282
 
1026
1283
  /**
1027
1284
  * @typedef OpenApiFiles
1028
- * @property {string} key
1029
- * @property {string[]} values
1285
+ * @property {string} key - Key represents name of file
1286
+ * @property {string[]} values - List of urls path
1030
1287
  */
1031
1288
 
1032
1289
  /**
1033
1290
  * @typedef CartItemMeta
1034
- * @property {boolean} [primary_item]
1035
- * @property {string} [group_id]
1291
+ * @property {boolean} [primary_item] - Flags indicates item is primary or not
1292
+ * @property {string} [group_id] - Fields to determine group id of the product
1036
1293
  */
1037
1294
 
1038
1295
  /**
1039
1296
  * @typedef MultiTenderPaymentMeta
1040
- * @property {string} [payment_id]
1041
- * @property {string} [payment_gateway]
1042
- * @property {Object} [extra_meta]
1043
- * @property {string} [current_status]
1044
- * @property {string} [order_id]
1297
+ * @property {string} [payment_id] - Payment gateway identifier
1298
+ * @property {string} [payment_gateway] - Payment gateway used to do the payment
1299
+ * @property {Object} [extra_meta] - Payment extra meta for the payment mode to
1300
+ * do the payment
1301
+ * @property {string} [current_status] - Current status of the payment
1302
+ * @property {string} [order_id] - Payment gateway order id
1045
1303
  */
1046
1304
 
1047
1305
  /**
1048
1306
  * @typedef MultiTenderPaymentMethod
1049
- * @property {string} mode
1050
- * @property {number} amount - Payment amount
1307
+ * @property {string} mode - Payment mode of payment method used to make payment
1308
+ * @property {number} amount - Amount of the payment mode to be paid
1051
1309
  * @property {MultiTenderPaymentMeta} [meta]
1052
- * @property {string} [name] - Payment mode name
1310
+ * @property {string} [name] - Name of the payment mode used to make payment
1053
1311
  */
1054
1312
 
1055
1313
  /**
1056
1314
  * @typedef OpenApiOrderItem
1057
- * @property {number} cashback_applied
1058
- * @property {number} [quantity]
1059
- * @property {string} size
1060
- * @property {number} coupon_effective_discount
1061
- * @property {number} amount_paid
1062
- * @property {number} delivery_charges
1063
- * @property {number} price_marked
1064
- * @property {OpenApiFiles[]} [files]
1315
+ * @property {number} cashback_applied - Cashback applied on user cart
1316
+ * @property {number} [quantity] - Article quantity in user cart
1317
+ * @property {string} size - Size of the article added in cart
1318
+ * @property {number} coupon_effective_discount - Coupon discount applied on
1319
+ * article in user cart
1320
+ * @property {number} amount_paid - Amount needs to paid for article in cart
1321
+ * @property {number} delivery_charges - Delivery charges applied on article in cart
1322
+ * @property {number} price_marked - Original price of product
1323
+ * @property {OpenApiFiles[]} [files] - List of file url
1065
1324
  * @property {CartItemMeta} [meta]
1066
- * @property {Object} [extra_meta]
1067
- * @property {number} product_id
1068
- * @property {number} [loyalty_discount]
1069
- * @property {number} discount
1070
- * @property {number} price_effective
1071
- * @property {MultiTenderPaymentMethod[]} payment_methods
1072
- * @property {number} [employee_discount]
1073
- * @property {number} cod_charges
1325
+ * @property {Object} [extra_meta] - Extra meta of the article in cart
1326
+ * @property {number} product_id - Product id associated with article in cart
1327
+ * @property {number} [loyalty_discount] - Loyalty points applied on cart
1328
+ * @property {number} discount - Discount value applied on article in cart
1329
+ * @property {number} price_effective - Current per unit price of product after
1330
+ * existing deductions
1331
+ * @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list
1332
+ * used to make the payment
1333
+ * @property {number} [employee_discount] - Employee discount value applied on
1334
+ * article in cart
1335
+ * @property {number} cod_charges - Cash On Delivery charges applied on article in cart
1074
1336
  */
1075
1337
 
1076
1338
  /**
1077
1339
  * @typedef OpenApiPlatformCheckoutReq
1078
- * @property {string} [payment_mode]
1079
- * @property {number} cart_value
1080
- * @property {OpenApiOrderItem[]} cart_items
1340
+ * @property {string} [payment_mode] - Payment mode from which the payment to be
1341
+ * done for the order
1342
+ * @property {number} cart_value - Total amount of user cart
1343
+ * @property {OpenApiOrderItem[]} cart_items - List of items in user cart
1081
1344
  * @property {ShippingAddress} [shipping_address]
1082
- * @property {number} [loyalty_discount]
1083
- * @property {string} [comment]
1084
- * @property {MultiTenderPaymentMethod[]} payment_methods
1085
- * @property {Object} [employee_discount]
1086
- * @property {string} [coupon]
1087
- * @property {number} cashback_applied
1088
- * @property {string} [gstin]
1345
+ * @property {number} [loyalty_discount] - Loyalty points applied on cart
1346
+ * @property {string} [comment] - Comment message added in cart after order placed
1347
+ * @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list
1348
+ * used to make the payment
1349
+ * @property {Object} [employee_discount] - Employee discount value applied on user cart
1350
+ * @property {string} [coupon] - Coupon text of coupon applied on user cart
1351
+ * @property {number} cashback_applied - Cashback applied on user cart
1352
+ * @property {string} [gstin] - GSTIN number added in cart
1089
1353
  * @property {ShippingAddress} billing_address
1090
- * @property {string} coupon_code
1091
- * @property {number} coupon_value
1092
- * @property {number} delivery_charges
1093
- * @property {string} [affiliate_order_id]
1094
- * @property {string} [currency_code]
1095
- * @property {string} [order_id]
1096
- * @property {OpenApiFiles[]} [files]
1097
- * @property {number} cod_charges
1354
+ * @property {string} coupon_code - Coupon code to be applied to cart
1355
+ * @property {number} coupon_value - Value of the coupon applied to cart
1356
+ * @property {number} delivery_charges - Delivery charges of the order placed
1357
+ * via checkout API
1358
+ * @property {string} [affiliate_order_id] - Order id generated after placing order
1359
+ * @property {string} [currency_code] - Currency code for the price
1360
+ * @property {string} [order_id] - Order id generated after placing order
1361
+ * @property {OpenApiFiles[]} [files] - List of file url
1362
+ * @property {number} cod_charges - Cash On Delivery charges of the user cart
1098
1363
  */
1099
1364
 
1100
1365
  /**
1101
- * @typedef OpenApiCheckoutResponse
1102
- * @property {boolean} [success]
1103
- * @property {string} [message]
1366
+ * @typedef OpenApiCheckoutResult
1367
+ * @property {boolean} [success] - The request success is defined
1368
+ * @property {string} [message] - Message of the api response
1104
1369
  * @property {string} [order_ref_id] - Order id sent in request
1105
1370
  * @property {string} order_id - Fynd order id
1106
1371
  */
1107
1372
 
1108
1373
  /**
1109
1374
  * @typedef AbandonedCart
1110
- * @property {string} expire_at
1111
- * @property {Object} [promotion]
1112
- * @property {boolean} is_default
1113
- * @property {string} [comment]
1114
- * @property {Object[]} articles
1115
- * @property {Object} [coupon]
1116
- * @property {number} [bulk_coupon_discount]
1117
- * @property {string} _id
1118
- * @property {Object} [fynd_credits]
1119
- * @property {number[]} [fc_index_map]
1120
- * @property {string} [order_id]
1121
- * @property {number} [discount]
1122
- * @property {Object} [cod_charges]
1123
- * @property {Object} [payments]
1124
- * @property {string} [payment_mode]
1125
- * @property {Object[]} [shipments]
1126
- * @property {Object} [pick_up_customer_details]
1127
- * @property {number} uid
1128
- * @property {string} [checkout_mode]
1129
- * @property {number} [cart_value]
1130
- * @property {boolean} [is_archive]
1131
- * @property {string} created_on
1132
- * @property {string} last_modified
1133
- * @property {Object} [meta]
1134
- * @property {boolean} [buy_now]
1135
- * @property {boolean} [is_active]
1136
- * @property {Object} cashback
1137
- * @property {Object[]} [payment_methods]
1138
- * @property {string} [gstin]
1139
- * @property {Object} [delivery_charges]
1140
- * @property {boolean} [merge_qty]
1141
- * @property {string} user_id
1142
- * @property {string} [app_id]
1143
- */
1144
-
1145
- /**
1146
- * @typedef AbandonedCartResponse
1147
- * @property {AbandonedCart[]} [items]
1148
- * @property {Object} [result]
1375
+ * @property {string} expire_at - Expire details of user cart
1376
+ * @property {Object} [promotion] - Promotion object details like amount, mode,
1377
+ * currency and list of promotions in user cart
1378
+ * @property {boolean} is_default - User cart default status
1379
+ * @property {string} [comment] - Comment message to be added in user cart
1380
+ * @property {Object[]} articles - List of articles in user cart
1381
+ * @property {Object} [coupon] - Coupon data of user cart which denotes if
1382
+ * coupon is applied, coupon code, coupon amount, coupon title and coupon message
1383
+ * @property {number} [bulk_coupon_discount] - Total bulk discount amount
1384
+ * applied in user cart
1385
+ * @property {string} _id - Unique identifier of the user cart
1386
+ * @property {Object} [fynd_credits] - Fynd credit points applied in user cart
1387
+ * @property {number[]} [fc_index_map] - Flat article index in user cart
1388
+ * @property {string} [order_id] - Order id generated in user cart
1389
+ * @property {number} [discount] - Discount amount of the product in cart
1390
+ * @property {Object} [cod_charges] - Cash On Delivery charges of the user cart
1391
+ * @property {Object} [payments] - Payment object selected in user cart
1392
+ * @property {string} [payment_mode] - Payment mode of the payment selected to
1393
+ * do the payment
1394
+ * @property {Object[]} [shipments] - Shipment details for the items in a cart,
1395
+ * specific to the selected address.
1396
+ * @property {Object} [pick_up_customer_details] - Customer contact details for
1397
+ * customer pickup at store
1398
+ * @property {number} uid - Unique Identifier of user cart
1399
+ * @property {string} [checkout_mode] - Checkout mode of user cart
1400
+ * @property {number} [cart_value] - Total amount of user cart
1401
+ * @property {boolean} [is_archive] - Flag to indicate cart is archived or not
1402
+ * @property {string} created_on - Date time format when user cart created
1403
+ * @property {string} last_modified - Date time format when user cart last modified
1404
+ * @property {Object} [meta] - Extra meta data of user cart
1405
+ * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
1406
+ * is doing fast checkout for the cart using buy now
1407
+ * @property {boolean} [is_active] - Flag indicates user cart is active or not
1408
+ * @property {Object} cashback - Cart level cashback data which denotes cashback
1409
+ * amount and cashback message
1410
+ * @property {Object[]} [payment_methods] - Payment methods list used to make the payment
1411
+ * @property {string} [gstin] - GSTIN added in user cart
1412
+ * @property {Object} [delivery_charges] - Delivery charges of user cart
1413
+ * @property {boolean} [merge_qty] - Flag indicates cart has merged article or not
1414
+ * @property {string} user_id - User Id of user cart
1415
+ * @property {string} [app_id] - Application id of user cart
1416
+ */
1417
+
1418
+ /**
1419
+ * @typedef AbandonedCartResult
1420
+ * @property {AbandonedCart[]} [items] - List of items in abandon cart
1421
+ * @property {Object} [result] - Define the list of items with updated status
1149
1422
  * @property {Page} [page]
1150
1423
  * @property {boolean} [success] - The request success is defined
1151
1424
  * @property {string} [message] - Message of the response
@@ -1153,47 +1426,54 @@ const Joi = require("joi");
1153
1426
 
1154
1427
  /**
1155
1428
  * @typedef PaymentSelectionLock
1156
- * @property {string} [payment_identifier]
1157
- * @property {string} [default_options]
1158
- * @property {boolean} [enabled]
1429
+ * @property {string} [payment_identifier] - Identifier for Payment Mode
1430
+ * @property {string} [default_options] - Default Selection Payment Mode
1431
+ * @property {boolean} [enabled] - Denotes if default payment selection is enable
1159
1432
  */
1160
1433
 
1161
1434
  /**
1162
1435
  * @typedef CartCurrency
1163
1436
  * @property {string} [code] - Currency code defined by ISO 4217:2015
1164
- * @property {string} [symbol]
1437
+ * @property {string} [symbol] - Currency symbol for currency of user cart prices
1165
1438
  */
1166
1439
 
1167
1440
  /**
1168
1441
  * @typedef CartDetailCoupon
1169
- * @property {number} [cashback_amount]
1170
- * @property {string} [cashback_message_primary]
1171
- * @property {string} [cashback_message_secondary]
1172
- * @property {string} [coupon_code]
1173
- * @property {string} [coupon_description]
1174
- * @property {string} [coupon_id]
1175
- * @property {string} [coupon_subtitle]
1176
- * @property {string} [coupon_title]
1177
- * @property {string} [coupon_type]
1178
- * @property {number} [coupon_value]
1179
- * @property {number} [discount]
1180
- * @property {boolean} [is_applied]
1181
- * @property {boolean} [is_valid]
1182
- * @property {number} [maximum_discount_value]
1183
- * @property {string} [message]
1184
- * @property {number} [minimum_cart_value]
1442
+ * @property {number} [cashback_amount] - Fields denotes cashback amount applied to cart
1443
+ * @property {string} [cashback_message_primary] - Primary cashback message for
1444
+ * coupon applied to cart
1445
+ * @property {string} [cashback_message_secondary] - Secondary cashback message
1446
+ * for coupon applied to cart
1447
+ * @property {string} [coupon_code] - Coupon code to be applied to cart
1448
+ * @property {string} [coupon_description] - Coupon description of the coupon
1449
+ * applied to cart
1450
+ * @property {string} [coupon_id] - Unique identifier of the coupon applied to cart
1451
+ * @property {string} [coupon_subtitle] - Coupon subtitle of the coupon applied to cart
1452
+ * @property {string} [coupon_title] - Coupon title of the coupon applied
1453
+ * @property {string} [coupon_type] - Type of the coupon applied to cart
1454
+ * @property {number} [coupon_value] - Value of the coupon applied to cart
1455
+ * @property {number} [discount] - Total discount earned from coupon applied to cart
1456
+ * @property {boolean} [is_applied] - Flag to determine where the coupon is
1457
+ * applied to cart or not
1458
+ * @property {boolean} [is_valid] - Determine where the coupon applied to cart is valid
1459
+ * @property {number} [maximum_discount_value] - Maximum discount value of the
1460
+ * coupon applied to cart
1461
+ * @property {string} [message] - Coupon message of the coupon applied to cart
1462
+ * @property {number} [minimum_cart_value] - Minimum cart value of the coupon
1463
+ * applied to cart
1185
1464
  */
1186
1465
 
1187
1466
  /**
1188
1467
  * @typedef ChargesThreshold
1189
- * @property {number} [charges]
1190
- * @property {number} [threshold]
1468
+ * @property {number} [charges] - Charges amount to be applied on cart
1469
+ * @property {number} [threshold] - Threshold of cart value on which the charge
1470
+ * should be applied
1191
1471
  */
1192
1472
 
1193
1473
  /**
1194
1474
  * @typedef DeliveryChargesConfig
1195
- * @property {boolean} [enabled]
1196
- * @property {ChargesThreshold[]} [charges]
1475
+ * @property {boolean} [enabled] - Delivery charge enabled for the cart or not
1476
+ * @property {ChargesThreshold[]} [charges] - Charges applicable based on threshold
1197
1477
  */
1198
1478
 
1199
1479
  /**
@@ -1202,546 +1482,734 @@ const Joi = require("joi");
1202
1482
  */
1203
1483
 
1204
1484
  /**
1205
- * @typedef CartDetailResponse
1206
- * @property {number} [cart_id]
1207
- * @property {string} [uid]
1208
- * @property {string} [coupon_text]
1209
- * @property {string} [id]
1210
- * @property {Object} [pan_config]
1485
+ * @typedef CartDetailResult
1486
+ * @property {number} [cart_id] - Unique identifier of the user cart
1487
+ * @property {string} [uid] - Unique identifier of the user cart
1488
+ * @property {string} [coupon_text] - Coupon text of coupon applied on cart
1489
+ * @property {string} [id] - Unique identifier of the user cart
1490
+ * @property {Object} [pan_config] - Pan card config states at what condition
1491
+ * user should enter the pan card
1211
1492
  * @property {ShipmentPromise} [delivery_promise]
1212
- * @property {string} [comment]
1213
- * @property {CartProductInfo[]} [items]
1493
+ * @property {string} [comment] - Comment message to be added in user cart
1494
+ * @property {CartProductInfo[]} [items] - Items data list in user cart that
1495
+ * includes item id, item size, store id, available sizes and rest of the item
1496
+ * related data
1214
1497
  * @property {PaymentSelectionLock} [payment_selection_lock]
1215
- * @property {string} [delivery_charge_info]
1498
+ * @property {string} [delivery_charge_info] - Delivery charge in information
1499
+ * message on shipment
1216
1500
  * @property {CartCommonConfig} [common_config]
1217
1501
  * @property {CartDetailCoupon} [coupon]
1218
- * @property {boolean} [restrict_checkout]
1219
- * @property {string} [message]
1220
- * @property {Object} [notification]
1221
- * @property {string} [staff_user_id]
1222
- * @property {boolean} [success]
1502
+ * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
1503
+ * the checkout process
1504
+ * @property {string} [message] - Message of the cart detail API response
1505
+ * @property {Object} [notification] - Notification object which denotes
1506
+ * notification data for user cart
1507
+ * @property {string} [staff_user_id] - Staff employee user id if cart is
1508
+ * created by staff employee for the customer
1509
+ * @property {boolean} [success] - Success flag of get cart detail API response
1223
1510
  * @property {CartBreakup} [breakup_values]
1224
- * @property {boolean} [is_valid]
1511
+ * @property {boolean} [is_valid] - Cart validity flag determines the if the
1512
+ * response is valid or not
1225
1513
  * @property {CartCurrency} [currency]
1226
- * @property {string} [checkout_mode]
1227
- * @property {string} [last_modified]
1228
- * @property {boolean} [buy_now]
1229
- * @property {string} [gstin]
1230
- * @property {AppliedPromotion[]} [applied_promo_details]
1231
- * @property {string} [pan_no]
1232
- * @property {Object} [custom_cart_meta]
1514
+ * @property {string} [checkout_mode] - Checkout mode of user cart
1515
+ * @property {string} [last_modified] - Last modified timestamp of cart
1516
+ * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
1517
+ * is doing fast checkout for the cart using buy now
1518
+ * @property {string} [gstin] - GSTIN added in user cart
1519
+ * @property {AppliedPromotion[]} [applied_promo_details] - List of applied
1520
+ * promotions data to cart which includes promotion id, promotion name, offer
1521
+ * text, description, buy rules, discount rules and promotion type
1522
+ * @property {string} [pan_no] - Permanent Account Number of the user
1523
+ * @property {Object} [custom_cart_meta] - Custom meta details added cart
1524
+ * checkout API payload
1233
1525
  */
1234
1526
 
1235
1527
  /**
1236
1528
  * @typedef AddProductCart
1237
- * @property {number} [quantity]
1238
- * @property {string} [item_size]
1239
- * @property {number} [seller_id]
1240
- * @property {Object[]} [parent_item_identifiers]
1241
- * @property {string[]} [product_group_tags]
1242
- * @property {string} [article_id]
1243
- * @property {Object} [article_assignment]
1244
- * @property {number} [store_id]
1245
- * @property {string} [display]
1246
- * @property {number} [item_id]
1247
- * @property {Object} [extra_meta]
1248
- * @property {Object} [_custom_json]
1249
- * @property {Object} [meta]
1250
- * @property {boolean} [pos]
1529
+ * @property {number} [quantity] - Field to specify the product quantity that
1530
+ * user wants to buy
1531
+ * @property {string} [item_size] - Field to determine size of the product
1532
+ * @property {number} [seller_id] - Unique identifier of the seller selected by
1533
+ * the user from which user want to buy a product
1534
+ * @property {Object[]} [parent_item_identifiers] - Fields to determine parent
1535
+ * product of the product
1536
+ * @property {string[]} [product_group_tags] - Field to specify the product
1537
+ * groups of the product that the user is trying to add in cart
1538
+ * @property {string} [article_id] - Unique identifier of an article
1539
+ * @property {Object} [article_assignment] - Field to determine how article
1540
+ * assignment should happen by article assignment level and strategy
1541
+ * @property {number} [store_id] - Unique identifier of the store selected by
1542
+ * the user from which user want to buy a product
1543
+ * @property {string} [display] - Display field at article level
1544
+ * @property {number} [item_id] - Unique identifier to identify product
1545
+ * @property {Object} [extra_meta] - Extra meta data to be added at article
1546
+ * level while add items to cart
1547
+ * @property {Object} [_custom_json] - Field to add custom json at article level
1548
+ * while add items to cart
1549
+ * @property {Object} [meta] - Field to add meta data at article level
1550
+ * @property {boolean} [pos] - Filed to determine whether user is making request
1551
+ * from pos or not
1251
1552
  * @property {string} [seller_identifier] - Add items using seller identifier for store os
1252
1553
  */
1253
1554
 
1254
1555
  /**
1255
- * @typedef AddCartRequest
1256
- * @property {boolean} [new_cart]
1257
- * @property {AddProductCart[]} [items]
1556
+ * @typedef AddCartCreation
1557
+ * @property {boolean} [new_cart] - Field to create to new cart whille user adds
1558
+ * item to cart
1559
+ * @property {AddProductCart[]} [items] - List of items detail which need to be
1560
+ * added to cart like item id, item size, and item quantity
1258
1561
  */
1259
1562
 
1260
1563
  /**
1261
- * @typedef AddCartDetailResponse
1564
+ * @typedef AddCartDetailResult
1262
1565
  * @property {boolean} [success] - True if all items are added successfully.
1263
1566
  * False if partially added or not added.
1264
- * @property {CartDetailResponse} [cart]
1567
+ * @property {CartDetailResult} [cart]
1265
1568
  * @property {boolean} [partial] - When adding multiple items check if all
1266
1569
  * added. True if only few are added.
1267
- * @property {string} [message]
1570
+ * @property {string} [message] - Message of add cart API response
1268
1571
  */
1269
1572
 
1270
1573
  /**
1271
1574
  * @typedef UpdateProductCart
1272
- * @property {number} [quantity]
1273
- * @property {string} [item_size]
1274
- * @property {Object} [parent_item_identifiers]
1275
- * @property {Object} [meta]
1276
- * @property {Object} [extra_meta]
1277
- * @property {Object} [_custom_json]
1278
- * @property {number} [item_id]
1279
- * @property {number} [item_index]
1575
+ * @property {number} [quantity] - Field to update the quantity of the item in cart
1576
+ * @property {string} [item_size] - Field to update the size of the product in cart
1577
+ * @property {Object} [parent_item_identifiers] - Field to update parent product
1578
+ * of the item in cart
1579
+ * @property {Object} [meta] - Field to update meta of the item in cart
1580
+ * @property {Object} [extra_meta] - Field to update extra meta of the product in cart
1581
+ * @property {Object} [_custom_json] - Field to update custom json of the product in cart
1582
+ * @property {number} [item_id] - Item id of the product that needs to be updated
1583
+ * @property {number} [item_index] - Item index determines on which index the
1584
+ * product falls to be updated
1280
1585
  * @property {CartProductIdentifer} identifiers
1281
- * @property {string} [article_id]
1586
+ * @property {string} [article_id] - Article id of the product in cart
1587
+ */
1588
+
1589
+ /**
1590
+ * @typedef FreeGiftItemCreation
1591
+ * @property {string} promotion_id - Unique identifier of the free gift promotion.
1592
+ * @property {string} item_id - Unique identifier of the selected free gift item.
1593
+ * @property {string} item_size - Size of the selected free gift item.
1282
1594
  */
1283
1595
 
1284
1596
  /**
1285
- * @typedef UpdateCartRequest
1597
+ * @typedef UpdateCartCreation
1286
1598
  * @property {UpdateProductCart[]} [items]
1287
- * @property {string} operation
1599
+ * @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift
1600
+ * items with updated sizes.
1601
+ * @property {string} operation - Cart opertaion type
1288
1602
  */
1289
1603
 
1290
1604
  /**
1291
- * @typedef UpdateCartDetailResponse
1605
+ * @typedef UpdateCartDetailResult
1292
1606
  * @property {boolean} [success] - True if all items are added successfully.
1293
1607
  * False if partially added or not added.
1294
- * @property {CartDetailResponse} [cart]
1295
- * @property {string} [message]
1608
+ * @property {CartDetailResult} [cart]
1609
+ * @property {string} [message] - Message of update cart API response
1296
1610
  */
1297
1611
 
1298
1612
  /**
1299
1613
  * @typedef OverrideCartItemPromo
1300
- * @property {string} promo_id
1301
- * @property {string} promo_amount
1302
- * @property {string} [promo_desc]
1614
+ * @property {string} promo_id - Promotion id applied on product
1615
+ * @property {string} promo_amount - Promotion amount applied on product
1616
+ * @property {string} [promo_desc] - Promotion description applied on product
1303
1617
  * @property {string} [rwrd_tndr]
1304
- * @property {Object[]} [item_list]
1305
- * @property {string} [parent_promo_id]
1618
+ * @property {Object[]} [item_list] - List of items
1619
+ * @property {string} [parent_promo_id] - Parent promotion unique identifier
1306
1620
  */
1307
1621
 
1308
1622
  /**
1309
1623
  * @typedef OverrideCartItem
1310
- * @property {string} [seller_identifier]
1311
- * @property {number} [quantity]
1312
- * @property {string} size
1313
- * @property {number} price_marked
1314
- * @property {number} amount_paid
1315
- * @property {OverrideCartItemPromo[]} [promo_list]
1316
- * @property {Object} [extra_meta]
1317
- * @property {number} item_id
1318
- * @property {number} discount
1319
- * @property {number} price_effective
1624
+ * @property {string} [seller_identifier] - Seller identifiers of the product size.
1625
+ * @property {number} [quantity] - Item quantity, which you have added into cart
1626
+ * @property {string} size - Item size, which you have added into cart
1627
+ * @property {number} price_marked - Original price of product
1628
+ * @property {number} amount_paid - Amount needs to paid for item
1629
+ * @property {OverrideCartItemPromo[]} [promo_list] - List of promotion applied on item
1630
+ * @property {Object} [extra_meta] - Extra meta to be added while checkout in order
1631
+ * @property {number} item_id - Item unique id in user cart
1632
+ * @property {number} discount - Discount amount applied on item
1633
+ * @property {number} price_effective - Current per unit price of product after
1634
+ * existing deductions
1320
1635
  */
1321
1636
 
1322
1637
  /**
1323
1638
  * @typedef OverrideCheckoutReq
1324
- * @property {string} cart_id
1325
- * @property {string} payment_mode
1326
- * @property {Object} [billing_address]
1327
- * @property {string} merchant_code
1328
- * @property {string} payment_identifier
1329
- * @property {string} currency_code
1330
- * @property {string} aggregator
1331
- * @property {string} order_type
1332
- * @property {string} [callback_url]
1333
- * @property {OverrideCartItem[]} cart_items
1334
- * @property {number} [ordering_store]
1335
- * @property {Object} [shipping_address]
1336
- */
1337
-
1338
- /**
1339
- * @typedef OverrideCheckoutResponse
1340
- * @property {Object} data
1341
- * @property {Object} cart
1342
- * @property {string} success
1343
- * @property {string} order_id
1344
- * @property {string} message
1345
- */
1346
-
1347
- /**
1348
- * @typedef GetShareCartLinkRequest
1639
+ * @property {string} cart_id - The cart id of user cart
1640
+ * @property {string} payment_mode - Payment mode from which the payment to be
1641
+ * done for the order
1642
+ * @property {Object} [billing_address] - Billing address json which includes
1643
+ * customer address, customer phone, customer email, customer pincode,
1644
+ * customer landmark and customer name
1645
+ * @property {string} merchant_code - Merchant code of the payment mode selected
1646
+ * to do the payment
1647
+ * @property {string} payment_identifier - Payment identifier of the payment
1648
+ * mode selected to do the payment
1649
+ * @property {string} currency_code - Currency code for the price
1650
+ * @property {string} aggregator - Aggregator name of the payment gateway
1651
+ * @property {string} order_type - Order type of the order being placed like
1652
+ * pickAtStore or HomeDelivery
1653
+ * @property {string} [callback_url] - Callback url to be redirected after
1654
+ * payment received/failed
1655
+ * @property {OverrideCartItem[]} cart_items - List of items which includes
1656
+ * their size, id, discount and promo details
1657
+ * @property {number} [ordering_store] - Ordering store id of the store from
1658
+ * which the order is getting placed
1659
+ * @property {Object} [shipping_address] - Shipping address json which includes
1660
+ * name, area, address, phone, area_code, state, country, country code and email
1661
+ */
1662
+
1663
+ /**
1664
+ * @typedef OverrideCheckoutResult
1665
+ * @property {Object} data - Data of the user cart checkout includes cart data,
1666
+ * address, user id, order type etc
1667
+ * @property {Object} cart - Cart details in API response which included cart
1668
+ * id, items in cart, promise, order type, breakup values etc.
1669
+ * @property {string} success - Success flag of cart override checkout API response
1670
+ * @property {string} order_id - Order id generated after placing order
1671
+ * @property {string} message - Message of the cart override checkout API response
1672
+ */
1673
+
1674
+ /**
1675
+ * @typedef GetShareCartLinkCreation
1349
1676
  * @property {string} [id] - Cart uid for generating sharing
1350
1677
  * @property {Object} [meta] - Staff, Ordering store or any other data. This
1351
1678
  * data will be used to generate link as well as sent as shared details.
1352
1679
  */
1353
1680
 
1354
1681
  /**
1355
- * @typedef GetShareCartLinkResponse
1356
- * @property {string} [token] - Short url unique id
1357
- * @property {string} [share_url] - Short shareable final url
1682
+ * @typedef GetShareCartLinkResult
1683
+ * @property {string} [token] - Short url unique id of the cart which is opted
1684
+ * to share with other user
1685
+ * @property {string} [share_url] - Short shareable final url which can populate
1686
+ * shared cart items in one's cart or replaced one's cart with shared cart items
1358
1687
  */
1359
1688
 
1360
1689
  /**
1361
1690
  * @typedef SharedCartDetails
1362
1691
  * @property {Object} [source] - Share link device and other source information
1363
1692
  * @property {Object} [user] - User details of who generated share link
1364
- * @property {string} [token] - Short link id
1365
- * @property {string} [created_on]
1693
+ * @property {string} [token] - Short link id of the user cart that needs to be shared
1694
+ * @property {string} [created_on] - Created on timestamp of user cart
1366
1695
  * @property {Object} [meta] - Meta data sent while generating share cart link
1367
1696
  */
1368
1697
 
1369
1698
  /**
1370
1699
  * @typedef SharedCart
1371
- * @property {string} [coupon_text]
1372
- * @property {string} [id]
1700
+ * @property {string} [coupon_text] - Coupon text of the applied coupon on user cart
1701
+ * @property {string} [id] - Cart id of shared cart
1373
1702
  * @property {ShipmentPromise} [delivery_promise]
1374
- * @property {string} [comment]
1375
- * @property {CartProductInfo[]} [items]
1703
+ * @property {string} [comment] - Comment message added in user cart
1704
+ * @property {CartProductInfo[]} [items] - Items data list in user cart that
1705
+ * includes item id, item size, store id, available sizes and rest of the item
1706
+ * related data
1376
1707
  * @property {SharedCartDetails} [shared_cart_details]
1377
1708
  * @property {PaymentSelectionLock} [payment_selection_lock]
1378
- * @property {string} [delivery_charge_info]
1379
- * @property {boolean} [restrict_checkout]
1380
- * @property {string} [message]
1709
+ * @property {string} [delivery_charge_info] - Delivery charge info message of
1710
+ * the user cart
1711
+ * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
1712
+ * the checkout process
1713
+ * @property {string} [message] - Message of the get shared cart API response
1381
1714
  * @property {CartBreakup} [breakup_values]
1382
- * @property {boolean} [is_valid]
1383
- * @property {string} [uid]
1384
- * @property {string} [checkout_mode]
1715
+ * @property {boolean} [is_valid] - Valid flag for get shared cart detail API
1716
+ * @property {string} [uid] - Cart id of the user cart
1717
+ * @property {string} [checkout_mode] - Checkout mode of address on which
1718
+ * address to be used for which checkout mode of cart
1385
1719
  * @property {CartCurrency} [currency]
1386
- * @property {string} [last_modified]
1387
- * @property {boolean} [buy_now]
1388
- * @property {number} [cart_id]
1389
- * @property {string} [gstin]
1390
- * @property {Object} [custom_cart_meta]
1720
+ * @property {string} [last_modified] - Last modified timestamp of user cart
1721
+ * @property {boolean} [buy_now] - Buy now flag of user cart
1722
+ * @property {number} [cart_id] - Cart id of user cart for generating cart sharing token
1723
+ * @property {string} [gstin] - GSTIN added in user cart
1724
+ * @property {Object} [custom_cart_meta] - Custom cart meta of user cart added
1725
+ * via update cart meta API
1391
1726
  */
1392
1727
 
1393
1728
  /**
1394
- * @typedef SharedCartResponse
1729
+ * @typedef SharedCartResult
1395
1730
  * @property {SharedCart} [cart]
1396
- * @property {string} [error]
1731
+ * @property {string} [error] - Error details if any error occurs which includes
1732
+ * type of error, error code and error message
1397
1733
  */
1398
1734
 
1399
1735
  /**
1400
1736
  * @typedef CartList
1401
- * @property {string} [cart_id]
1402
- * @property {Object} [pick_up_customer_details]
1403
- * @property {number} [cart_value]
1404
- * @property {string} [created_on]
1405
- * @property {string} [user_id]
1406
- * @property {string} [currency_code]
1407
- * @property {number} [item_counts]
1737
+ * @property {string} [cart_id] - The cart id of user
1738
+ * @property {Object} [pick_up_customer_details] - Customer contact details for
1739
+ * customer pickup at store
1740
+ * @property {number} [cart_value] - Total amount of cart
1741
+ * @property {string} [created_on] - Date format when cart created
1742
+ * @property {string} [user_id] - User id which is associated with cart
1743
+ * @property {string} [currency_code] - Active cart currency code
1744
+ * @property {number} [item_counts] - Article total count in cart
1408
1745
  */
1409
1746
 
1410
1747
  /**
1411
- * @typedef MultiCartResponse
1412
- * @property {boolean} [success]
1413
- * @property {CartList[]} [data]
1748
+ * @typedef MultiCartResult
1749
+ * @property {boolean} [success] - True if get list of cart successfully.
1750
+ * @property {CartList[]} [data] - List of active carts and their item's count
1414
1751
  */
1415
1752
 
1416
1753
  /**
1417
1754
  * @typedef UpdateUserCartMapping
1418
- * @property {string} user_id
1755
+ * @property {string} user_id - User Id of user for which we map with the cart
1419
1756
  */
1420
1757
 
1421
1758
  /**
1422
1759
  * @typedef UserInfo
1423
- * @property {string} [gender]
1424
- * @property {string} [modified_on]
1425
- * @property {string} [_id]
1426
- * @property {string} [uid]
1427
- * @property {string} [external_id]
1428
- * @property {string} [mobile]
1429
- * @property {string} [last_name]
1430
- * @property {string} [created_at]
1431
- * @property {string} [first_name]
1760
+ * @property {string} [gender] - User gender
1761
+ * @property {string} [modified_on] - Date format of user when user last modified
1762
+ * @property {string} [_id] - Unique Identifier of user
1763
+ * @property {string} [uid] - Unique UID of user
1764
+ * @property {string} [external_id] - Unique external id
1765
+ * @property {string} [mobile] - 10 digit Mobile number of user
1766
+ * @property {string} [last_name] - Last name of user
1767
+ * @property {string} [created_at] - Date format of user when user registered
1768
+ * @property {string} [first_name] - First name of user
1432
1769
  */
1433
1770
 
1434
1771
  /**
1435
- * @typedef UserCartMappingResponse
1436
- * @property {string} [coupon_text]
1772
+ * @typedef UserCartMappingResult
1773
+ * @property {string} [coupon_text] - Coupon text of coupon applied on cart
1437
1774
  * @property {UserInfo} [user]
1438
- * @property {string} [id]
1439
- * @property {Object} [pan_config]
1775
+ * @property {string} [id] - Unique identifier of the user cart
1776
+ * @property {Object} [pan_config] - Pan card config states at what condition
1777
+ * user should enter the pan card
1440
1778
  * @property {ShipmentPromise} [delivery_promise]
1441
- * @property {string} [comment]
1442
- * @property {CartProductInfo[]} [items]
1779
+ * @property {string} [comment] - Comment message to be added in user cart
1780
+ * @property {CartProductInfo[]} [items] - Items data list in user cart that
1781
+ * includes item id, item size, store id, available sizes and rest of the item
1782
+ * related data
1443
1783
  * @property {PaymentSelectionLock} [payment_selection_lock]
1444
- * @property {string} [delivery_charge_info]
1445
- * @property {boolean} [restrict_checkout]
1446
- * @property {string} [message]
1784
+ * @property {string} [delivery_charge_info] - Delivery charge in information
1785
+ * message on shipment
1786
+ * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
1787
+ * the checkout process
1788
+ * @property {string} [message] - Message of the get cart detail API response
1447
1789
  * @property {CartBreakup} [breakup_values]
1448
- * @property {boolean} [is_valid]
1790
+ * @property {boolean} [is_valid] - Cart validity flag determines the if the
1791
+ * response is valid or not
1449
1792
  * @property {CartCurrency} [currency]
1450
- * @property {string} [checkout_mode]
1451
- * @property {string} [last_modified]
1452
- * @property {boolean} [buy_now]
1453
- * @property {string} [gstin]
1454
- * @property {Object} [custom_cart_meta]
1455
- * @property {AppliedPromotion[]} [applied_promo_details]
1456
- * @property {string} [pan_no]
1793
+ * @property {string} [checkout_mode] - Checkout mode of user cart
1794
+ * @property {string} [last_modified] - Last modified timestamp of cart
1795
+ * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
1796
+ * is doing fast checkout for the cart using buy now
1797
+ * @property {string} [gstin] - GSTIN added in user cart
1798
+ * @property {Object} [custom_cart_meta] - Custom meta details added cart
1799
+ * checkout API payload
1800
+ * @property {AppliedPromotion[]} [applied_promo_details] - List of applied
1801
+ * promotions data to cart which includes promotion id, promotion name, offer
1802
+ * text, description, buy rules, discount rules and promotion type
1803
+ * @property {string} [pan_no] - Permanent Account Number of the user
1457
1804
  */
1458
1805
 
1459
1806
  /**
1460
- * @typedef PlatformAddCartRequest
1461
- * @property {string} [user_id]
1462
- * @property {boolean} [new_cart]
1463
- * @property {AddProductCart[]} [items]
1807
+ * @typedef PlatformAddCartDetails
1808
+ * @property {string} [user_id] - The user id of user, for which we need to add
1809
+ * item into cart
1810
+ * @property {boolean} [new_cart] - Field to create to new cart whille user adds
1811
+ * item to cart
1812
+ * @property {AddProductCart[]} [items] - List of items detail which need to be
1813
+ * added to cart like item id, item size, and item quantity
1464
1814
  */
1465
1815
 
1466
1816
  /**
1467
- * @typedef PlatformUpdateCartRequest
1468
- * @property {string} [user_id]
1469
- * @property {UpdateProductCart[]} [items]
1470
- * @property {string} operation
1817
+ * @typedef PlatformUpdateCartDetails
1818
+ * @property {string} [user_id] - The user id of user, for which we need to
1819
+ * update the cart
1820
+ * @property {UpdateProductCart[]} [items] - List items data that needs to be
1821
+ * updated in cart
1822
+ * @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift
1823
+ * items with updated sizes.
1824
+ * @property {string} operation - Field to determine if item to be removed from
1825
+ * cart or it needs to be updated
1471
1826
  */
1472
1827
 
1473
1828
  /**
1474
- * @typedef DeleteCartRequest
1475
- * @property {string[]} [cart_id_list]
1829
+ * @typedef DeleteCartDetails
1830
+ * @property {string[]} [cart_id_list] - List of all cart ids, which need to delete
1476
1831
  */
1477
1832
 
1478
1833
  /**
1479
- * @typedef DeleteCartDetailResponse
1834
+ * @typedef DeleteCartDetailResult
1480
1835
  * @property {boolean} [success] - True if cart is archived successfully. False
1481
1836
  * if not archived.
1482
- * @property {string} [message]
1837
+ * @property {string} [message] - Message for delete cart response
1483
1838
  */
1484
1839
 
1485
1840
  /**
1486
- * @typedef CartItemCountResponse
1841
+ * @typedef CartItemCountResult
1487
1842
  * @property {number} [user_cart_items_count] - Item count present in cart
1488
1843
  */
1489
1844
 
1490
1845
  /**
1491
1846
  * @typedef Coupon
1492
- * @property {string} [title]
1493
- * @property {number} [max_discount_value]
1494
- * @property {string} [coupon_code]
1495
- * @property {boolean} [is_applied]
1496
- * @property {string} [coupon_type]
1497
- * @property {string} [expires_on]
1498
- * @property {number} [coupon_value]
1499
- * @property {string} [sub_title]
1500
- * @property {number} [minimum_cart_value]
1501
- * @property {boolean} [is_applicable]
1502
- * @property {string} [message]
1503
- * @property {string} [description]
1504
- * @property {string} [start_date]
1505
- * @property {string} [end_date]
1506
- * @property {string} [coupon_applicable_message]
1847
+ * @property {string} [title] - Coupon Title of the coupon applied denotes name
1848
+ * of the coupon
1849
+ * @property {number} [max_discount_value] - Maximum discount value of the
1850
+ * coupon applied to cart
1851
+ * @property {string} [coupon_code] - Coupon code of the coupon applied on cart
1852
+ * @property {boolean} [is_applied] - Flag to determine where the coupon is
1853
+ * applied to cart or not
1854
+ * @property {string} [coupon_type] - Type of the coupon applied to cart
1855
+ * @property {string} [expires_on] - Message to display to user for expiry of the coupon
1856
+ * @property {number} [coupon_value] - Coupon value of the coupon applied to cart
1857
+ * @property {string} [sub_title] - Coupon subtitle of the coupon applied to
1858
+ * cart which is used to display
1859
+ * @property {number} [minimum_cart_value] - Minimum cart value of the coupon
1860
+ * applied to cart
1861
+ * @property {boolean} [is_applicable] - Flag to determine where the coupon is
1862
+ * applicable to cart or not
1863
+ * @property {string} [message] - Coupon message of the coupon applied to cart
1864
+ * @property {string} [description] - Coupon description of the coupon applied to cart
1865
+ * @property {string} [start_date] - Start date of the coupon when the coupon
1866
+ * will be live for the users to apply on cart
1867
+ * @property {string} [end_date] - End date of the coupon on which the coupon expires
1868
+ * @property {string} [coupon_applicable_message] - Message which is used to
1869
+ * display to the customer if the coupon is applied successfully
1507
1870
  */
1508
1871
 
1509
1872
  /**
1510
1873
  * @typedef PageCoupon
1511
- * @property {boolean} [has_next]
1512
- * @property {number} [current]
1513
- * @property {number} [total]
1514
- * @property {number} [total_item_count]
1515
- * @property {boolean} [has_previous]
1874
+ * @property {boolean} [has_next] - Denotes if next page of coupon is available
1875
+ * @property {number} [current] - Current page number
1876
+ * @property {number} [total] - Total pages of coupon availalbe
1877
+ * @property {number} [total_item_count] - Total coupons are available for the cart
1878
+ * @property {boolean} [has_previous] - Denotes if previous page of the coupon
1879
+ * is available
1516
1880
  */
1517
1881
 
1518
1882
  /**
1519
- * @typedef GetCouponResponse
1520
- * @property {Coupon[]} [available_coupon_list]
1883
+ * @typedef GetCouponResult
1884
+ * @property {Coupon[]} [available_coupon_list] - List of available coupon which
1885
+ * can be applied on cart
1521
1886
  * @property {PageCoupon} [page]
1522
1887
  */
1523
1888
 
1524
1889
  /**
1525
- * @typedef ApplyCouponRequest
1890
+ * @typedef ApplyCouponDetails
1526
1891
  * @property {string} coupon_code - Coupon code to be applied
1527
1892
  */
1528
1893
 
1529
1894
  /**
1530
1895
  * @typedef GeoLocation
1531
- * @property {number} [longitude]
1532
- * @property {number} [latitude]
1896
+ * @property {number} [longitude] - Longitude coordinate for address
1897
+ * @property {number} [latitude] - Latitude coordinate for address
1533
1898
  */
1534
1899
 
1535
1900
  /**
1536
1901
  * @typedef PlatformAddress
1537
- * @property {string} [phone]
1538
- * @property {string} [id]
1539
- * @property {string} [area_code_slug]
1540
- * @property {string} [country_code]
1902
+ * @property {string} [phone] - Phone number for address
1903
+ * @property {string} [id] - Id of the address
1904
+ * @property {string} [area_code_slug] - Area code slug for address. example
1905
+ * pincode is slug for India
1906
+ * @property {string} [country_code] - Country code of address
1541
1907
  * @property {GeoLocation} [geo_location]
1542
- * @property {string} [country]
1543
- * @property {string} [state]
1544
- * @property {boolean} [is_default_address]
1545
- * @property {string[]} [tags]
1546
- * @property {string} [created_by_user_id]
1547
- * @property {string} [landmark]
1548
- * @property {string} [email]
1549
- * @property {string} [area_code]
1550
- * @property {string} [checkout_mode]
1551
- * @property {Object} [meta]
1552
- * @property {boolean} [is_active]
1553
- * @property {string} [name]
1554
- * @property {Object} [google_map_point]
1555
- * @property {string} [cart_id]
1556
- * @property {string} [city]
1557
- * @property {string} [sector]
1908
+ * @property {string} [country] - Country of address
1909
+ * @property {string} [state] - State of the address
1910
+ * @property {boolean} [is_default_address] - Default address flag if no address
1911
+ * selected then this should be the default address selected
1912
+ * @property {string[]} [tags] - Tags of address from which it can be identified
1913
+ * @property {string} [created_by_user_id] - Created by user id of address
1914
+ * @property {string} [landmark] - Landmark of address
1915
+ * @property {string} [email] - Email address for address data
1916
+ * @property {string} [area_code] - Area code of the address
1917
+ * @property {string} [checkout_mode] - Checkout mode of address on which
1918
+ * address to be used for which checkout mode of cart
1919
+ * @property {Object} [meta] - Metadata of the address
1920
+ * @property {boolean} [is_active] - States whether address is active or not
1921
+ * @property {string} [name] - Name of person in address data to whom it belongs to
1922
+ * @property {Object} [google_map_point] - Google map point of the address
1923
+ * @property {string} [cart_id] - The cart id of user cart
1924
+ * @property {string} [city] - City of the address
1925
+ * @property {string} [sector] - Sector of the address
1558
1926
  * @property {string} [state_code] - State code for international address
1559
- * @property {string} [area]
1560
- * @property {string} [user_id]
1561
- * @property {string} [address_type]
1562
- * @property {string} [address]
1563
- * @property {string} [country_phone_code]
1564
- * @property {string} [country_iso_code]
1565
- * @property {Object} [_custom_json]
1927
+ * @property {string} [area] - Area description for address
1928
+ * @property {string} [user_id] - User id of address for which address is created
1929
+ * @property {string} [address_type] - Address type of address
1930
+ * @property {string} [address] - Address description for address data
1931
+ * @property {string} [country_phone_code] - Country phone code for address
1932
+ * @property {string} [country_iso_code] - Country iso code for address
1933
+ * @property {Object} [_custom_json] - Custom json of the address
1566
1934
  */
1567
1935
 
1568
1936
  /**
1569
- * @typedef PlatformGetAddressesResponse
1570
- * @property {PlatformAddress[]} [address]
1937
+ * @typedef ValidationConfig
1938
+ * @property {number} address_max_limit - The maximum number of addresses a user can have.
1939
+ * @property {number} user_address_count - The total number of addresses saved by a user.
1571
1940
  */
1572
1941
 
1573
1942
  /**
1574
- * @typedef SaveAddressResponse
1575
- * @property {string} [id]
1576
- * @property {boolean} [success]
1577
- * @property {boolean} [is_default_address]
1943
+ * @typedef PlatformGetAddressesDetails
1944
+ * @property {PlatformAddress[]} [address] - List of all address saved by customer
1945
+ * @property {ValidationConfig} [validation_config]
1578
1946
  */
1579
1947
 
1580
1948
  /**
1581
- * @typedef UpdateAddressResponse
1582
- * @property {string} [id]
1583
- * @property {boolean} [is_default_address]
1584
- * @property {boolean} [success]
1585
- * @property {boolean} [is_updated]
1949
+ * @typedef SaveAddressDetails
1950
+ * @property {string} [id] - Id of the address
1951
+ * @property {boolean} [success] - Success flag of save address Response
1952
+ * @property {boolean} [is_default_address] - Default address flag if no address
1953
+ * selected then this should be the default address selected
1586
1954
  */
1587
1955
 
1588
1956
  /**
1589
- * @typedef DeleteAddressResponse
1590
- * @property {string} [id]
1591
- * @property {boolean} [is_deleted]
1957
+ * @typedef UpdateAddressDetails
1958
+ * @property {string} [id] - ID of an address
1959
+ * @property {boolean} [is_default_address] - Default address flag if no address
1960
+ * selected then this should be the default address selected
1961
+ * @property {boolean} [success] - Success flag of update address response
1962
+ * @property {boolean} [is_updated] - Updated flag for update address operation
1963
+ * if the address updated or not
1592
1964
  */
1593
1965
 
1594
1966
  /**
1595
- * @typedef PlatformSelectCartAddressRequest
1596
- * @property {string} [cart_id]
1597
- * @property {string} [billing_address_id]
1598
- * @property {string} [checkout_mode]
1599
- * @property {string} [id]
1600
- * @property {string} [user_id]
1967
+ * @typedef DeleteAddressResult
1968
+ * @property {string} [id] - Id of the address
1969
+ * @property {boolean} [is_deleted] - Deleted flag in delete address response
1970
+ * states whether the address was deleted or not
1601
1971
  */
1602
1972
 
1603
1973
  /**
1604
- * @typedef ShipmentArticle
1605
- * @property {string} [meta]
1606
- * @property {string} [quantity]
1607
- * @property {string} [article_id]
1974
+ * @typedef PlatformSelectCartAddress
1975
+ * @property {string} [cart_id] - Cart id of the user cart for which the select
1976
+ * address operation performed
1977
+ * @property {string} [billing_address_id] - Billing address id selected by user
1978
+ * on which shipment bill to be generated
1979
+ * @property {string} [checkout_mode] - The checkout mode in cart
1980
+ * @property {string} [id] - Address is selected by user on which shipment to be delivered
1981
+ * @property {string} [user_id] - Unique Identifier of user
1608
1982
  */
1609
1983
 
1610
1984
  /**
1611
- * @typedef PlatformShipmentResponse
1612
- * @property {number} [shipments]
1613
- * @property {number} [fulfillment_id]
1614
- * @property {CartProductInfo[]} [items]
1615
- * @property {Object} [dp_options]
1616
- * @property {string} [shipment_type]
1617
- * @property {string} [order_type]
1618
- * @property {string} [box_type]
1985
+ * @typedef ShipmentArticle
1986
+ * @property {string} [meta] - Article meta data for shipment
1987
+ * @property {string} [quantity] - Article quantity for shipment
1988
+ * @property {string} [article_id] - Article unique id for shipment
1989
+ */
1990
+
1991
+ /**
1992
+ * @typedef PlatformShipmentDetails
1993
+ * @property {number} [shipments] - Count of shipments that will be shipped
1994
+ * @property {number} [fulfillment_id] - Fulfilment id of the shipment
1995
+ * @property {CartProductInfo[]} [items] - Item details in the shipment
1996
+ * @property {Object} [dp_options] - Delivery partner options that are available
1997
+ * to deliver the shipment
1998
+ * @property {string} [shipment_type] - Shipment type of the shipment returned
1999
+ * in get shipments API like single_shipment or multiple shipment. Single
2000
+ * Shipment means 1 item in 1 shipment and vice versa in the other one
2001
+ * @property {string} [order_type] - Order type of the shipment like pickAtStore
2002
+ * or HomeDelivery
2003
+ * @property {string} [box_type] - Box type of the shipment in which the
2004
+ * shipment will be delivered
1619
2005
  * @property {ShipmentPromise} [promise]
1620
- * @property {string} [dp_id]
1621
- * @property {string} [fulfillment_type]
1622
- * @property {ShipmentArticle[]} [articles]
2006
+ * @property {string} [dp_id] - Delivery partner id of the shipment
2007
+ * @property {string} [fulfillment_type] - Fulfilment type of shipment
2008
+ * @property {ShipmentArticle[]} [articles] - List of articles in shipment
1623
2009
  */
1624
2010
 
1625
2011
  /**
1626
- * @typedef PlatformCartShipmentsResponse
1627
- * @property {string} [coupon_text]
1628
- * @property {string} [id]
1629
- * @property {Object} [pan_config]
2012
+ * @typedef PlatformCartShipmentsResult
2013
+ * @property {string} [coupon_text] - Coupon text of coupon applied on cart
2014
+ * @property {string} [id] - Cart id of the user cart
2015
+ * @property {Object} [pan_config] - Pan card config states at what condition
2016
+ * user should enter the pan card
1630
2017
  * @property {ShipmentPromise} [delivery_promise]
1631
- * @property {string} [comment]
1632
- * @property {CartProductInfo[]} [items]
2018
+ * @property {string} [comment] - Comment message added in cart
2019
+ * @property {CartProductInfo[]} [items] - List of items in cart
1633
2020
  * @property {PaymentSelectionLock} [payment_selection_lock]
1634
- * @property {string} [delivery_charge_info]
1635
- * @property {boolean} [restrict_checkout]
1636
- * @property {string} [message]
2021
+ * @property {string} [delivery_charge_info] - Delivery charge in information
2022
+ * message on shipment
2023
+ * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
2024
+ * the checkout process
2025
+ * @property {string} [message] - Response message of get shipments API
1637
2026
  * @property {CartBreakup} [breakup_values]
1638
- * @property {string} [staff_user_id]
1639
- * @property {boolean} [is_valid]
1640
- * @property {PlatformShipmentResponse[]} [shipments]
2027
+ * @property {string} [staff_user_id] - Staff employee user id if cart is
2028
+ * created by staff employee for the customer
2029
+ * @property {boolean} [is_valid] - Cart validity flag determines the if the
2030
+ * response is valid or not
2031
+ * @property {PlatformShipmentDetails[]} [shipments] - List of shipments that
2032
+ * will be shipped
1641
2033
  * @property {CartCurrency} [currency]
1642
- * @property {string} [checkout_mode]
1643
- * @property {string} [last_modified]
1644
- * @property {boolean} [buy_now]
1645
- * @property {string} [gstin]
1646
- * @property {AppliedPromotion[]} [applied_promo_details]
1647
- * @property {boolean} [error]
1648
- * @property {string} [pan_no]
1649
- * @property {Object} [custom_cart_meta]
2034
+ * @property {string} [checkout_mode] - Checkout mode of cart
2035
+ * @property {string} [last_modified] - Last modified timestamp of cart
2036
+ * @property {boolean} [buy_now] - Buy now flag of user cart
2037
+ * @property {string} [gstin] - GSTIN number added in cart
2038
+ * @property {AppliedPromotion[]} [applied_promo_details] - List of applied
2039
+ * promotions data to cart which includes promotion id, promotion name, offer
2040
+ * text, description, buy rules, discount rules and promotion type
2041
+ * @property {boolean} [error] - Error details if any error occurs which
2042
+ * includes type of error, error code and error message
2043
+ * @property {string} [pan_no] - Permanent Account Number of the user
2044
+ * @property {Object} [custom_cart_meta] - Custom cart meta details added in cart
1650
2045
  */
1651
2046
 
1652
2047
  /**
1653
2048
  * @typedef UpdateCartShipmentItem
1654
2049
  * @property {number} [quantity] - Quantity of product in shipment
1655
2050
  * @property {string} shipment_type - Shipment delivery type
1656
- * @property {string} article_uid - Article mongo id
2051
+ * @property {string} article_uid - Article unique id for shipment
1657
2052
  */
1658
2053
 
1659
2054
  /**
1660
- * @typedef UpdateCartShipmentRequest
1661
- * @property {UpdateCartShipmentItem[]} shipments
2055
+ * @typedef UpdateCartShipmentCreation
2056
+ * @property {UpdateCartShipmentItem[]} shipments - List of Shipments which
2057
+ * includes shipment data like shipment items, shipment promise, Shipment
2058
+ * type, shipment order type, shipment dp options etc
1662
2059
  */
1663
2060
 
1664
2061
  /**
1665
- * @typedef PlatformCartMetaRequest
1666
- * @property {string} [gstin]
2062
+ * @typedef PlatformCartMetaCreation
2063
+ * @property {string} [gstin] - GSTIN number to be added in user cart
1667
2064
  * @property {Object} [pick_up_customer_details] - Customer contact details for
1668
2065
  * customer pickup at store
1669
- * @property {string} [checkout_mode]
1670
- * @property {Object} [gift_details]
1671
- * @property {string} [pan_no]
1672
- * @property {string} [comment]
2066
+ * @property {string} [checkout_mode] - Checkout mode of user cart
2067
+ * @property {Object} [gift_details] - Gift details is open json which can
2068
+ * include gift message
2069
+ * @property {string} [pan_no] - Permanent Account Number of the user
2070
+ * @property {string} [comment] - Comment message to be added in user cart
1673
2071
  * @property {string} [staff_user_id] - Staff user id
1674
2072
  */
1675
2073
 
1676
2074
  /**
1677
- * @typedef CartMetaResponse
1678
- * @property {boolean} [is_valid]
1679
- * @property {string} [message]
2075
+ * @typedef CartMetaDetails
2076
+ * @property {boolean} [is_valid] - Whether added meta was vaild
2077
+ * @property {string} [message] - Detailed message that used to display
1680
2078
  */
1681
2079
 
1682
2080
  /**
1683
- * @typedef CartMetaMissingResponse
1684
- * @property {string[]} [errors]
2081
+ * @typedef CartMetaMissingDetails
2082
+ * @property {string[]} [errors] - Detailed errors for invalid cart meta request
1685
2083
  */
1686
2084
 
1687
2085
  /**
1688
2086
  * @typedef StaffCheckout
1689
- * @property {string} [employee_code]
1690
- * @property {string} _id
1691
- * @property {string} user
1692
- * @property {string} last_name
1693
- * @property {string} first_name
2087
+ * @property {string} [employee_code] - Employee code of staff who does checkout
2088
+ * on behalf of customer
2089
+ * @property {string} _id - Id of staff who does checkout on behalf of customer
2090
+ * @property {string} user - User id of the employee who does checkout on behalf
2091
+ * of customer
2092
+ * @property {string} last_name - Last name of staff employee who does checkout
2093
+ * on behalf of customer
2094
+ * @property {string} first_name - First name of staff emplyee who does checkout
2095
+ * on behalf of customer
1694
2096
  */
1695
2097
 
1696
2098
  /**
1697
2099
  * @typedef CustomerDetails
1698
- * @property {string} [name]
1699
- * @property {string} [email]
1700
- * @property {string} mobile
2100
+ * @property {string} [name] - Name of customer to be added in customer detail
2101
+ * while checkout
2102
+ * @property {string} [email] - Email address of the customer to be added in
2103
+ * customer detail while checkout
2104
+ * @property {string} mobile - Mobile number of customer to be added in customer
2105
+ * detail while checkout
1701
2106
  */
1702
2107
 
1703
2108
  /**
1704
2109
  * @typedef Files
1705
- * @property {string} key
1706
- * @property {string[]} values
2110
+ * @property {string} key - Key represents name of file
2111
+ * @property {string[]} values - List of urls path
2112
+ */
2113
+
2114
+ /**
2115
+ * @typedef CartCheckoutCustomMeta
2116
+ * @property {string} key - Key name of custom meta
2117
+ * @property {string} value - Value to be added in key
2118
+ */
2119
+
2120
+ /**
2121
+ * @typedef PlatformCartCheckoutDetailCreation
2122
+ * @property {CartCheckoutCustomMeta[]} [custom_meta]
2123
+ * @property {string} [address_id]
2124
+ * @property {string} [payment_identifier]
2125
+ * @property {Object} [payment_params]
2126
+ * @property {boolean} [payment_auto_confirm]
2127
+ * @property {string} id
2128
+ * @property {boolean} [pos]
2129
+ * @property {string} [billing_address_id]
2130
+ * @property {string} [merchant_code]
2131
+ * @property {string} [aggregator]
2132
+ * @property {number} [pick_at_store_uid]
2133
+ * @property {string} [device_id]
2134
+ * @property {Object} [delivery_address]
2135
+ * @property {string} payment_mode
2136
+ * @property {string} [checkout_mode]
2137
+ * @property {CustomerDetails} [customer_details] - Customer details
2138
+ * @property {Object} [meta]
2139
+ * @property {StaffCheckout} [staff]
2140
+ * @property {string} [employee_code]
2141
+ * @property {Object} [billing_address]
2142
+ * @property {string} [callback_url]
2143
+ * @property {string} [user_id]
2144
+ * @property {Object} [extra_meta]
2145
+ * @property {string} order_type
2146
+ * @property {Files[]} [files] - List of file url
2147
+ * @property {number} [ordering_store]
2148
+ * @property {Object} [payment_extra_identifiers]
2149
+ * @property {string} [iin]
2150
+ * @property {string} [network]
2151
+ * @property {string} [type]
2152
+ * @property {string} [card_id]
1707
2153
  */
1708
2154
 
1709
2155
  /**
1710
2156
  * @typedef CheckCart
1711
- * @property {string} [coupon_text]
1712
- * @property {string} [cod_message]
1713
- * @property {string} [id]
1714
- * @property {string} [store_code]
2157
+ * @property {string} [coupon_text] - Coupon text of the applied coupon on order placed
2158
+ * @property {string} [cod_message] - Cash On Delivery message for the order placed
2159
+ * @property {string} [id] - Cart id of the user cart
2160
+ * @property {string} [store_code] - Store code from which the order placed
1715
2161
  * @property {ShipmentPromise} [delivery_promise]
1716
- * @property {string} [comment]
1717
- * @property {string} [user_type]
1718
- * @property {CartProductInfo[]} [items]
1719
- * @property {string} [error_message]
1720
- * @property {boolean} [success]
2162
+ * @property {string} [comment] - Comment message added in cart after order placed
2163
+ * @property {string} [user_type] - User type of the cart who places the order
2164
+ * @property {CartProductInfo[]} [items] - Items details in cart after order placed
2165
+ * @property {string} [error_message] - Error details if any error occurs which
2166
+ * includes type of error, error code and error message
2167
+ * @property {boolean} [success] - Success flag of checkout cart API response
1721
2168
  * @property {PaymentSelectionLock} [payment_selection_lock]
1722
- * @property {string} [delivery_charge_info]
1723
- * @property {boolean} [restrict_checkout]
1724
- * @property {string} [order_id]
1725
- * @property {string} [message]
2169
+ * @property {string} [delivery_charge_info] - Delivery charge in information
2170
+ * message on shipment
2171
+ * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
2172
+ * the checkout process
2173
+ * @property {string} [order_id] - Order id generated after placing order
2174
+ * @property {string} [message] - Message of the cart checkout API response
1726
2175
  * @property {CartBreakup} [breakup_values]
1727
- * @property {number} [cod_charges]
1728
- * @property {boolean} [is_valid]
1729
- * @property {string} [uid]
1730
- * @property {string} [checkout_mode]
2176
+ * @property {number} [cod_charges] - Cash On Delivery charges of the user cart
2177
+ * @property {boolean} [is_valid] - Valid flag fotr the checkout response if
2178
+ * order placed was valid
2179
+ * @property {string} [uid] - Cart id of user cart
2180
+ * @property {string} [checkout_mode] - Checkout mode of user cart
1731
2181
  * @property {CartCurrency} [currency]
1732
- * @property {string} [last_modified]
1733
- * @property {boolean} [buy_now]
1734
- * @property {number} [delivery_charge_order_value]
1735
- * @property {number} [cart_id]
1736
- * @property {Object[]} [store_emps]
1737
- * @property {string} [gstin]
1738
- * @property {boolean} [cod_available]
1739
- * @property {number} [delivery_charges]
1740
- * @property {Object} [custom_cart_meta]
2182
+ * @property {string} [last_modified] - Last modified timestamp of cart
2183
+ * @property {boolean} [buy_now] - Buy now flag of user cart
2184
+ * @property {number} [delivery_charge_order_value] - Delivery charge order value
2185
+ * @property {number} [cart_id] - Cart id of the user cart for which the order placed
2186
+ * @property {Object[]} [store_emps] - Store employees data
2187
+ * @property {string} [gstin] - GSTIN number added in cart
2188
+ * @property {boolean} [cod_available] - Whether Cash On Delivery available
2189
+ * @property {number} [delivery_charges] - Delivery charges of the order placed
2190
+ * via checkout API
2191
+ * @property {Object} [custom_cart_meta] - Custom meta details added cart
2192
+ * checkout API payload
2193
+ */
2194
+
2195
+ /**
2196
+ * @typedef CartCheckoutDetails
2197
+ * @property {string} [app_intercept_url] - App intercept url which is used to
2198
+ * redirect on app after payment in confirmed/failed
2199
+ * @property {Object} [data] - Data of the user cart checkout includes cart
2200
+ * data, address, user id, order type etc
2201
+ * @property {CheckCart} [cart]
2202
+ * @property {boolean} [success] - Success flag of cart checkout API response
2203
+ * @property {string} [callback_url] - Callback url to be redirected after
2204
+ * payment received/failed
2205
+ * @property {string} [payment_confirm_url] - Payment confirm url used to
2206
+ * redirect after payment is confirmed
2207
+ * @property {string} [order_id] - Order id generated after placing order
2208
+ * @property {string} [message] - Message of the cart checkout v2 API response
1741
2209
  */
1742
2210
 
1743
2211
  /**
1744
- * @typedef CartCheckoutResponse
2212
+ * @typedef CartCheckoutResult
1745
2213
  * @property {string} [app_intercept_url]
1746
2214
  * @property {Object} [data]
1747
2215
  * @property {CheckCart} [cart]
@@ -1753,196 +2221,256 @@ const Joi = require("joi");
1753
2221
  */
1754
2222
 
1755
2223
  /**
1756
- * @typedef CartDeliveryModesResponse
2224
+ * @typedef CartDeliveryModesDetails
1757
2225
  * @property {number[]} [pickup_stores] - Store pick up available store uids
1758
2226
  * @property {string[]} [available_modes] - Available delivery modes
1759
2227
  */
1760
2228
 
1761
2229
  /**
1762
2230
  * @typedef PickupStoreDetail
1763
- * @property {string} [country]
1764
- * @property {string} [state]
1765
- * @property {string} [city]
1766
- * @property {string} [phone]
1767
- * @property {string} [area_code]
1768
- * @property {number} [uid]
1769
- * @property {string} [area_code_slug]
1770
- * @property {string} [address_type]
1771
- * @property {string} [area]
1772
- * @property {number} [id]
1773
- * @property {string} [store_manager_name]
1774
- * @property {string} [name]
1775
- * @property {string} [store_code]
1776
- * @property {string} [landmark]
1777
- * @property {string} [email]
1778
- * @property {number} [pincode]
1779
- * @property {string} [address]
1780
- */
1781
-
1782
- /**
1783
- * @typedef StoreDetailsResponse
1784
- * @property {PickupStoreDetail[]} [items]
1785
- */
1786
-
1787
- /**
1788
- * @typedef UpdateCartPaymentRequest
1789
- * @property {string} [address_id]
1790
- * @property {string} [payment_mode]
1791
- * @property {string} [aggregator_name]
1792
- * @property {string} [merchant_code]
1793
- * @property {string} [payment_identifier]
1794
- * @property {string} [id]
2231
+ * @property {string} [country] - Country of address
2232
+ * @property {string} [state] - State of the address
2233
+ * @property {string} [city] - City of the address
2234
+ * @property {string} [phone] - Phone number for address
2235
+ * @property {string} [area_code] - Area code of the address
2236
+ * @property {number} [uid] - Uid of the address
2237
+ * @property {string} [area_code_slug] - Area code slug for address. example
2238
+ * pincode is slug for India
2239
+ * @property {string} [address_type] - Address type of address
2240
+ * @property {string} [area] - Area description for address
2241
+ * @property {number} [id] - Id of the address
2242
+ * @property {string} [store_manager_name] - Name of store manager
2243
+ * @property {string} [name] - Name of person in address data to whom it belongs to
2244
+ * @property {string} [store_code] - Store code from which the order placed
2245
+ * @property {string} [landmark] - Landmark of address
2246
+ * @property {string} [email] - Email address for address data
2247
+ * @property {number} [pincode] - Address pincode
2248
+ * @property {string} [address] - Address description for address data
2249
+ */
2250
+
2251
+ /**
2252
+ * @typedef StoreDetails
2253
+ * @property {PickupStoreDetail[]} [items] - List of items need to pickup from store
2254
+ */
2255
+
2256
+ /**
2257
+ * @typedef CartPaymentUpdate
2258
+ * @property {string} [address_id] - Address id of the user on which the order
2259
+ * to be delivered
2260
+ * @property {string} [payment_mode] - Payment mode from which the payment to be
2261
+ * done for the order
2262
+ * @property {string} [aggregator_name] - Aggregator name of the payment gateway
2263
+ * @property {string} [merchant_code] - Merchant code of the payment mode
2264
+ * selected to do the payment
2265
+ * @property {string} [payment_identifier] - Payment identifier of the payment
2266
+ * mode selected to do the payment
2267
+ * @property {string} [id] - Cart id of the user cart
1795
2268
  */
1796
2269
 
1797
2270
  /**
1798
2271
  * @typedef CouponValidity
1799
- * @property {string} [title]
1800
- * @property {boolean} [next_validation_required]
1801
- * @property {boolean} [valid]
1802
- * @property {string} [display_message_en]
1803
- * @property {string} [code]
1804
- * @property {number} [discount]
2272
+ * @property {string} [title] - Coupon Title of the coupon applied
2273
+ * @property {boolean} [next_validation_required] - Flag for coupon validation
2274
+ * required on next page or not
2275
+ * @property {boolean} [valid] - Valid flag which denotes if the applied coupon
2276
+ * is valid or not
2277
+ * @property {string} [display_message_en] - Display message for coupon validity
2278
+ * @property {string} [code] - Coupon code of the coupon applied
2279
+ * @property {number} [discount] - Coupon discount value of the coupon applied
2280
+ * @property {string} [error_en] - Error message for the selected payment mode.
1805
2281
  */
1806
2282
 
1807
2283
  /**
1808
2284
  * @typedef PaymentCouponValidate
1809
- * @property {boolean} success
1810
- * @property {string} [message]
2285
+ * @property {boolean} success - Success flag of coupon payment mode validity API response
2286
+ * @property {string} [message] - Payment mode valid message for coupon
1811
2287
  * @property {CouponValidity} [coupon_validity]
1812
2288
  */
1813
2289
 
1814
2290
  /**
1815
2291
  * @typedef PaymentMeta
1816
- * @property {string} [payment_gateway]
1817
- * @property {string} [type]
1818
- * @property {string} [payment_identifier]
1819
- * @property {string} [merchant_code]
2292
+ * @property {string} [payment_gateway] - Payment gateway used to do the payment
2293
+ * @property {string} [type] - Type of card if payment mode is card to do the payment
2294
+ * @property {string} [payment_identifier] - Payment identifier of the payment
2295
+ * mode selected to do the payment
2296
+ * @property {string} [merchant_code] - Merchant code of the payment mode
2297
+ * selected to do the payment
1820
2298
  */
1821
2299
 
1822
2300
  /**
1823
2301
  * @typedef PaymentMethod
1824
- * @property {string} mode
1825
- * @property {string} [payment]
2302
+ * @property {string} mode - Payment mode of payment method used to make payment
2303
+ * @property {string} [payment] - Payment name of payment method used to make payment
1826
2304
  * @property {PaymentMeta} payment_meta
1827
- * @property {number} [amount]
1828
- * @property {string} [name]
1829
- * @property {Object} [payment_extra_identifiers]
1830
- */
1831
-
1832
- /**
1833
- * @typedef PlatformCartCheckoutDetailV2Request
1834
- * @property {string} [address_id]
1835
- * @property {string} [payment_identifier]
1836
- * @property {Object} [payment_params]
1837
- * @property {Object} [custom_meta]
1838
- * @property {boolean} [payment_auto_confirm]
1839
- * @property {string} id
1840
- * @property {boolean} [pos]
1841
- * @property {string} [billing_address_id]
1842
- * @property {string} [merchant_code]
1843
- * @property {string} [aggregator]
1844
- * @property {number} [pick_at_store_uid]
1845
- * @property {string} [device_id]
1846
- * @property {Object} [delivery_address]
1847
- * @property {string} [payment_mode]
1848
- * @property {string} [checkout_mode]
1849
- * @property {Object} [customer_details] - Customer details
1850
- * @property {Object} [meta]
1851
- * @property {PaymentMethod[]} payment_methods
2305
+ * @property {number} [amount] - Amount of the payment mode to be paid
2306
+ * @property {string} [name] - Name of the payment mode used to make payment
2307
+ * @property {Object} [payment_extra_identifiers] - Payment extra identifier for
2308
+ * the payment mode to do the payment
2309
+ */
2310
+
2311
+ /**
2312
+ * @typedef PlatformCartCheckoutDetailV2Creation
2313
+ * @property {string} [address_id] - Address id of the user on which the order
2314
+ * to be delivered
2315
+ * @property {string} [payment_identifier] - Payment identifier of the payment
2316
+ * mode selected to do the payment
2317
+ * @property {Object} [payment_params] - Payment params which includes payment
2318
+ * identifier and merchant code
2319
+ * @property {CartCheckoutCustomMeta[]} [custom_meta] - Custom meta data to be
2320
+ * added in order
2321
+ * @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
2322
+ * payment need not to be collected from user
2323
+ * @property {string} id - Cart id of the user cart
2324
+ * @property {boolean} [pos] - Filed to determine whether user is making request
2325
+ * from pos or not
2326
+ * @property {string} [billing_address_id] - Billing address id of the customer
2327
+ * on which the invoice to be generated after the order is placed
2328
+ * @property {string} [merchant_code] - Merchant code of the payment mode
2329
+ * selected to do the payment
2330
+ * @property {string} [aggregator] - Aggregator name of the payment gateway
2331
+ * @property {number} [pick_at_store_uid] - Store id where we have to pick product
2332
+ * @property {string} [device_id] - Device id
2333
+ * @property {Object} [delivery_address] - Delivery address data which includes
2334
+ * customer address, customer phone, customer email, customer pincode,
2335
+ * customer landmark and customer name
2336
+ * @property {string} [payment_mode] - Payment mode from which the payment to be
2337
+ * done for the order
2338
+ * @property {string} [checkout_mode] - Mode of checkout used in cart
2339
+ * @property {CustomerDetails} [customer_details]
2340
+ * @property {Object} [meta] - Meta data to be added in order
2341
+ * @property {PaymentMethod[]} payment_methods - Payment methods list used to
2342
+ * make the payment
1852
2343
  * @property {StaffCheckout} [staff]
1853
- * @property {string} [employee_code]
1854
- * @property {Object} [billing_address]
1855
- * @property {string} [callback_url]
1856
- * @property {string} user_id
1857
- * @property {Object} [extra_meta]
1858
- * @property {string} order_type
2344
+ * @property {string} [employee_code] - Employee code of staff who does checkout
2345
+ * on behalf of customer
2346
+ * @property {Object} [billing_address] - Billing address json which includes
2347
+ * customer address, customer phone, customer email, customer pincode,
2348
+ * customer landmark and customer name
2349
+ * @property {string} [callback_url] - Callback url after payment received/failed
2350
+ * @property {string} user_id - The user id of user cart
2351
+ * @property {Object} [extra_meta] - Extra meta to be added while checkout in order
2352
+ * @property {string} order_type - Order type of the order being placed like
2353
+ * pickAtStore or HomeDelivery
1859
2354
  * @property {Files[]} [files] - List of file url
1860
- * @property {number} [ordering_store]
1861
- * @property {string} [iin]
1862
- * @property {string} [network]
1863
- * @property {string} [type]
1864
- * @property {string} [card_id]
2355
+ * @property {number} [ordering_store] - Ordering store id of the store from
2356
+ * which the order is getting placed
2357
+ * @property {string} [iin] - Issuer Identification Number number of card if
2358
+ * payment mode is card to do the payment
2359
+ * @property {string} [network] - Network of card if payment mode is card to do
2360
+ * the payment
2361
+ * @property {string} [type] - Type of cart if payment mode is card to do the payment
2362
+ * @property {string} [card_id] - Saved card id if payment mode is card to do the payment
1865
2363
  */
1866
2364
 
1867
2365
  /**
1868
2366
  * @typedef UpdateCartPaymentRequestV2
1869
- * @property {string} [address_id]
1870
- * @property {string} [payment_mode]
1871
- * @property {string} [aggregator_name]
1872
- * @property {string} [merchant_code]
1873
- * @property {string} [payment_identifier]
1874
- * @property {string} [id]
2367
+ * @property {string} [address_id] - Address id of the user address selected to
2368
+ * deliver the shipment
2369
+ * @property {string} [payment_mode] - Payment mode of the payment selected to
2370
+ * do the payment
2371
+ * @property {string} [aggregator_name] - Aggregator name of the payment gateway
2372
+ * @property {string} [merchant_code] - Merchant code of the payment mode
2373
+ * selected to do the payment
2374
+ * @property {string} [payment_identifier] - Payment identifier of the payment
2375
+ * mode selected to do the payment
2376
+ * @property {string} [id] - Cart id of the user cart for which the update cart
2377
+ * payment operation performed
1875
2378
  * @property {PaymentMethod[]} [payment_methods]
1876
2379
  */
1877
2380
 
1878
2381
  /**
1879
2382
  * @typedef PriceMinMax
1880
- * @property {number} [min]
1881
- * @property {number} [max]
2383
+ * @property {number} [min] - Min price of article added in user cart
2384
+ * @property {number} [max] - Max price of article added in user cart
1882
2385
  */
1883
2386
 
1884
2387
  /**
1885
2388
  * @typedef ItemPriceDetails
1886
2389
  * @property {PriceMinMax} [marked]
1887
2390
  * @property {PriceMinMax} [effective]
1888
- * @property {string} [currency]
2391
+ * @property {string} [currency] - The currency code for price
2392
+ */
2393
+
2394
+ /**
2395
+ * @typedef ArticlePriceDetails
2396
+ * @property {number} [marked] - The Marked Price refers to the initial price of
2397
+ * the free gift article before product discount.
2398
+ * @property {number} [effective] - The Effective Price refers to the final
2399
+ * amount of the free gift article after applying the product discount.
1889
2400
  */
1890
2401
 
1891
2402
  /**
1892
2403
  * @typedef FreeGiftItems
1893
- * @property {string} [item_slug] - Item slug
1894
- * @property {string} [item_name] - Item name
2404
+ * @property {string} [item_slug] - Free gift product slug
2405
+ * @property {string} [item_name] - Free gift product name
1895
2406
  * @property {ItemPriceDetails} [item_price_details]
1896
- * @property {string} [item_brand_name] - Item brand name
1897
- * @property {number} [item_id] - Item id
1898
- * @property {string[]} [item_images_url] - Item images URL
2407
+ * @property {ArticlePriceDetails} [article_price]
2408
+ * @property {string} [item_brand_name] - Free gift product brand name
2409
+ * @property {number} [item_id] - Free gift product id
2410
+ * @property {string[]} [available_sizes] - Available sizes for the free gift item.
2411
+ * @property {string} [size] - Selected size for the free gift item.
2412
+ * @property {string[]} [item_images_url] - List of free gift product images URL
1899
2413
  */
1900
2414
 
1901
2415
  /**
1902
2416
  * @typedef PromotionOffer
1903
- * @property {string} [id] - Promotion id
2417
+ * @property {string} [id] - Promotion unique identifier
1904
2418
  * @property {Object} [buy_rules] - Buy rules of promotions
1905
- * @property {string} [offer_text] - Offer title
1906
- * @property {string} [promotion_type] - Promotion type
2419
+ * @property {string} [offer_text] - Offer title of promotion that used to display
2420
+ * @property {string} [promotion_type] - Type of Promotion like percentage,
2421
+ * amount, bogo etc.
1907
2422
  * @property {string} [promotion_name] - Name of the promotion
1908
2423
  * @property {string} [promotion_group] - Group of promotion belongs to
1909
2424
  * @property {string} [valid_till] - Datetime ISOString for promotion end date
1910
2425
  * @property {Object[]} [discount_rules] - Discount rules of promotions
1911
2426
  * @property {FreeGiftItems[]} [free_gift_items] - Details of free gift items
1912
2427
  * @property {string} [description] - Offer details including T&C
2428
+ * @property {boolean} [is_bank_offer] - Indicates whether the promotion is
2429
+ * associated with a bank offer.
1913
2430
  */
1914
2431
 
1915
2432
  /**
1916
- * @typedef PromotionOffersResponse
1917
- * @property {PromotionOffer[]} [available_promotions]
2433
+ * @typedef PromotionOffersDetails
2434
+ * @property {PromotionOffer[]} [available_promotions] - List of available
2435
+ * promotion for product
1918
2436
  */
1919
2437
 
1920
2438
  /**
1921
2439
  * @typedef PromotionPaymentOffer
1922
- * @property {string} [application_id] - Application id
2440
+ * @property {string} [application_id] - Application id of the sales channel
1923
2441
  * @property {Object[]} [buy_rules] - Buy rules of promotions
1924
2442
  * @property {string} [calculate_on] - Price on which promotion calculated
1925
2443
  * @property {string} [description] - Offer details including T&C
1926
2444
  * @property {Object[]} [discount_rules] - Discount rules of promotions
1927
- * @property {string} [id] - Promotion id
1928
- * @property {string} [offer_text] - Offer title
2445
+ * @property {string} [id] - Promotion unique identifier
2446
+ * @property {string} [offer_text] - Offer title of promotion that used to display
1929
2447
  * @property {string} [promotion_group] - Group of promotion belongs to
1930
- * @property {string} [promotion_type] - Promotion type
2448
+ * @property {string} [promotion_type] - Type of Promotion like bogo, amount,
2449
+ * percentage etc.
1931
2450
  * @property {string} [promotion_name] - Name of the promotion
1932
2451
  */
1933
2452
 
1934
2453
  /**
1935
- * @typedef PromotionPaymentOffersResponse
1936
- * @property {boolean} [success]
2454
+ * @typedef PromotionPaymentOffersDetails
2455
+ * @property {boolean} [success] - Indicates if operation is successful or not.
1937
2456
  * @property {PromotionPaymentOffer[]} [promotions]
1938
2457
  */
1939
2458
 
2459
+ /**
2460
+ * @typedef ValidationError
2461
+ * @property {string} message - A brief description of the error encountered.
2462
+ * @property {string} field - The field in the request that caused the error.
2463
+ */
2464
+
1940
2465
  class CartPlatformModel {
1941
2466
  /** @returns {CouponDateMeta} */
1942
2467
  static CouponDateMeta() {
1943
2468
  return Joi.object({
1944
2469
  modified_on: Joi.string().allow("").allow(null),
1945
2470
  created_on: Joi.string().allow("").allow(null),
2471
+ approved_on: Joi.string().allow("").allow(null),
2472
+ rejected_on: Joi.string().allow("").allow(null),
2473
+ reviewed_on: Joi.string().allow("").allow(null),
1946
2474
  });
1947
2475
  }
1948
2476
 
@@ -1950,7 +2478,7 @@ class CartPlatformModel {
1950
2478
  static Ownership() {
1951
2479
  return Joi.object({
1952
2480
  payable_category: Joi.string().allow("").required(),
1953
- payable_by: Joi.string().allow("").required(),
2481
+ payable_by: Joi.string().allow("").allow(null),
1954
2482
  });
1955
2483
  }
1956
2484
 
@@ -1959,6 +2487,9 @@ class CartPlatformModel {
1959
2487
  return Joi.object({
1960
2488
  created_by: Joi.string().allow("").allow(null),
1961
2489
  modified_by: Joi.string().allow("").allow(null),
2490
+ approved_by: Joi.string().allow("").allow(null),
2491
+ rejected_by: Joi.string().allow("").allow(null),
2492
+ reviewed_by: Joi.string().allow("").allow(null),
1962
2493
  });
1963
2494
  }
1964
2495
 
@@ -2032,7 +2563,7 @@ class CartPlatformModel {
2032
2563
  /** @returns {Restrictions} */
2033
2564
  static Restrictions() {
2034
2565
  return Joi.object({
2035
- payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
2566
+ payments: CartPlatformModel.PaymentModes(),
2036
2567
  user_type: Joi.string().allow(""),
2037
2568
  price_range: CartPlatformModel.PriceRange(),
2038
2569
  platforms: Joi.array().items(Joi.string().allow("")),
@@ -2066,9 +2597,10 @@ class CartPlatformModel {
2066
2597
  static CouponSchedule() {
2067
2598
  return Joi.object({
2068
2599
  end: Joi.string().allow("").allow(null),
2069
- start: Joi.string().allow(""),
2600
+ start: Joi.string().allow("").allow(null),
2070
2601
  next_schedule: Joi.array().items(Joi.any()),
2071
2602
  cron: Joi.string().allow("").allow(null),
2603
+ status: Joi.string().allow(""),
2072
2604
  duration: Joi.number().allow(null),
2073
2605
  });
2074
2606
  }
@@ -2132,11 +2664,11 @@ class CartPlatformModel {
2132
2664
  return Joi.object({
2133
2665
  currency_code: Joi.string().allow(""),
2134
2666
  auto_apply: Joi.boolean(),
2135
- type: Joi.string().allow("").required(),
2667
+ type: Joi.string().allow(""),
2136
2668
  is_exact: Joi.boolean(),
2137
- applicable_on: Joi.string().allow("").required(),
2138
- calculate_on: Joi.string().allow("").required(),
2139
- value_type: Joi.string().allow("").required(),
2669
+ applicable_on: Joi.string().allow(""),
2670
+ calculate_on: Joi.string().allow(""),
2671
+ value_type: Joi.string().allow(""),
2140
2672
  scope: Joi.array().items(Joi.string().allow("")),
2141
2673
  });
2142
2674
  }
@@ -2145,21 +2677,24 @@ class CartPlatformModel {
2145
2677
  static CouponAdd() {
2146
2678
  return Joi.object({
2147
2679
  date_meta: CartPlatformModel.CouponDateMeta(),
2148
- ownership: CartPlatformModel.Ownership().required(),
2680
+ ownership: CartPlatformModel.Ownership(),
2149
2681
  author: CartPlatformModel.CouponAuthor(),
2150
2682
  state: CartPlatformModel.State(),
2151
2683
  restrictions: CartPlatformModel.Restrictions(),
2152
2684
  validation: CartPlatformModel.Validation(),
2153
2685
  action: CartPlatformModel.CouponAction(),
2686
+ coupon_type: Joi.string().allow(""),
2687
+ coupon_prefix: Joi.string().allow("").allow(null),
2688
+ coupon_counts: Joi.number(),
2154
2689
  tags: Joi.array().items(Joi.string().allow("")),
2155
2690
  _schedule: CartPlatformModel.CouponSchedule(),
2156
- rule: Joi.array().items(CartPlatformModel.Rule()).required(),
2157
- display_meta: CartPlatformModel.DisplayMeta().required(),
2691
+ rule: Joi.array().items(CartPlatformModel.Rule()),
2692
+ display_meta: CartPlatformModel.DisplayMeta(),
2158
2693
  code: Joi.string().allow("").required(),
2159
2694
  type_slug: Joi.string().allow("").required(),
2160
- identifiers: CartPlatformModel.Identifier().required(),
2161
- validity: CartPlatformModel.Validity().required(),
2162
- rule_definition: CartPlatformModel.RuleDefinition().required(),
2695
+ identifiers: CartPlatformModel.Identifier(),
2696
+ validity: CartPlatformModel.Validity(),
2697
+ rule_definition: CartPlatformModel.RuleDefinition(),
2163
2698
  _id: Joi.string().allow(""),
2164
2699
  });
2165
2700
  }
@@ -2177,8 +2712,8 @@ class CartPlatformModel {
2177
2712
  });
2178
2713
  }
2179
2714
 
2180
- /** @returns {CouponsResponse} */
2181
- static CouponsResponse() {
2715
+ /** @returns {CouponsResult} */
2716
+ static CouponsResult() {
2182
2717
  return Joi.object({
2183
2718
  items: Joi.array().items(CartPlatformModel.CouponAdd()),
2184
2719
  page: CartPlatformModel.Page(),
@@ -2193,8 +2728,8 @@ class CartPlatformModel {
2193
2728
  });
2194
2729
  }
2195
2730
 
2196
- /** @returns {OperationErrorResponse} */
2197
- static OperationErrorResponse() {
2731
+ /** @returns {OperationErrorResult} */
2732
+ static OperationErrorResult() {
2198
2733
  return Joi.object({
2199
2734
  success: Joi.boolean(),
2200
2735
  message: Joi.string().allow(""),
@@ -2206,7 +2741,7 @@ class CartPlatformModel {
2206
2741
  static CouponUpdate() {
2207
2742
  return Joi.object({
2208
2743
  date_meta: CartPlatformModel.CouponDateMeta(),
2209
- ownership: CartPlatformModel.Ownership().required(),
2744
+ ownership: CartPlatformModel.Ownership(),
2210
2745
  author: CartPlatformModel.CouponAuthor(),
2211
2746
  state: CartPlatformModel.State(),
2212
2747
  restrictions: CartPlatformModel.Restrictions(),
@@ -2214,13 +2749,17 @@ class CartPlatformModel {
2214
2749
  action: CartPlatformModel.CouponAction(),
2215
2750
  tags: Joi.array().items(Joi.string().allow("")),
2216
2751
  _schedule: CartPlatformModel.CouponSchedule(),
2217
- rule: Joi.array().items(CartPlatformModel.Rule()).required(),
2218
- display_meta: CartPlatformModel.DisplayMeta().required(),
2752
+ rule: Joi.array().items(CartPlatformModel.Rule()),
2753
+ display_meta: CartPlatformModel.DisplayMeta(),
2219
2754
  code: Joi.string().allow("").required(),
2755
+ coupon_type: Joi.string().allow(""),
2756
+ coupon_prefix: Joi.string().allow("").allow(null),
2757
+ coupon_counts: Joi.number(),
2758
+ reason: Joi.string().allow("").allow(null),
2220
2759
  type_slug: Joi.string().allow("").required(),
2221
- identifiers: CartPlatformModel.Identifier().required(),
2222
- validity: CartPlatformModel.Validity().required(),
2223
- rule_definition: CartPlatformModel.RuleDefinition().required(),
2760
+ identifiers: CartPlatformModel.Identifier(),
2761
+ validity: CartPlatformModel.Validity(),
2762
+ rule_definition: CartPlatformModel.RuleDefinition(),
2224
2763
  });
2225
2764
  }
2226
2765
 
@@ -2232,32 +2771,48 @@ class CartPlatformModel {
2232
2771
  });
2233
2772
  }
2234
2773
 
2774
+ /** @returns {CouponCreateResult} */
2775
+ static CouponCreateResult() {
2776
+ return Joi.object({
2777
+ success: Joi.boolean(),
2778
+ message: Joi.string().allow(""),
2779
+ _id: Joi.string().allow(""),
2780
+ });
2781
+ }
2782
+
2235
2783
  /** @returns {DisplayMeta1} */
2236
2784
  static DisplayMeta1() {
2237
2785
  return Joi.object({
2238
- description: Joi.string().allow(""),
2786
+ description: Joi.string().allow("").allow(null),
2239
2787
  offer_label: Joi.string().allow(""),
2240
- name: Joi.string().allow(""),
2241
- offer_text: Joi.string().allow(""),
2788
+ name: Joi.string().allow("").allow(null),
2789
+ offer_text: Joi.string().allow("").allow(null),
2242
2790
  });
2243
2791
  }
2244
2792
 
2245
2793
  /** @returns {Ownership1} */
2246
2794
  static Ownership1() {
2247
2795
  return Joi.object({
2248
- payable_category: Joi.string().allow("").required(),
2249
- payable_by: Joi.string().allow("").required(),
2796
+ payable_category: Joi.string().allow(""),
2797
+ payable_by: Joi.string().allow(""),
2250
2798
  });
2251
2799
  }
2252
2800
 
2253
2801
  /** @returns {CompareObject} */
2254
2802
  static CompareObject() {
2255
2803
  return Joi.object({
2256
- equals: Joi.number(),
2257
- greater_than: Joi.number(),
2258
- less_than_equals: Joi.number(),
2259
- less_than: Joi.number(),
2260
- greater_than_equals: Joi.number(),
2804
+ equals: Joi.number().allow(null),
2805
+ greater_than: Joi.number().allow(null),
2806
+ less_than_equals: Joi.number().allow(null),
2807
+ less_than: Joi.number().allow(null),
2808
+ greater_than_equals: Joi.number().allow(null),
2809
+ });
2810
+ }
2811
+
2812
+ /** @returns {ItemSizeMapping} */
2813
+ static ItemSizeMapping() {
2814
+ return Joi.object({
2815
+ item_size_mapping: Joi.object().pattern(/\S/, Joi.any()),
2261
2816
  });
2262
2817
  }
2263
2818
 
@@ -2301,7 +2856,7 @@ class CartPlatformModel {
2301
2856
  discount_price: Joi.number(),
2302
2857
  apportion_discount: Joi.boolean(),
2303
2858
  partial_can_ret: Joi.boolean(),
2304
- max_usage_per_transaction: Joi.number(),
2859
+ max_usage_per_transaction: Joi.number().allow(null),
2305
2860
  min_offer_quantity: Joi.number(),
2306
2861
  code: Joi.string().allow(""),
2307
2862
  discount_amount: Joi.number(),
@@ -2316,6 +2871,7 @@ class CartPlatformModel {
2316
2871
  discount_type: Joi.string().allow("").required(),
2317
2872
  buy_condition: Joi.string().allow("").required(),
2318
2873
  item_criteria: CartPlatformModel.ItemCriteria().required(),
2874
+ meta: CartPlatformModel.ItemSizeMapping(),
2319
2875
  offer: CartPlatformModel.DiscountOffer().required(),
2320
2876
  });
2321
2877
  }
@@ -2330,7 +2886,7 @@ class CartPlatformModel {
2330
2886
  /** @returns {PromotionPaymentModes} */
2331
2887
  static PromotionPaymentModes() {
2332
2888
  return Joi.object({
2333
- type: Joi.string().allow("").required(),
2889
+ type: Joi.string().allow(""),
2334
2890
  uses: CartPlatformModel.PaymentAllowValue1(),
2335
2891
  codes: Joi.array().items(Joi.string().allow("")),
2336
2892
  });
@@ -2371,7 +2927,7 @@ class CartPlatformModel {
2371
2927
  /** @returns {Restrictions1} */
2372
2928
  static Restrictions1() {
2373
2929
  return Joi.object({
2374
- payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
2930
+ payments: CartPlatformModel.PaymentModes(),
2375
2931
  user_registered: CartPlatformModel.UserRegistered(),
2376
2932
  platforms: Joi.array().items(Joi.string().allow("")),
2377
2933
  post_order: CartPlatformModel.PostOrder1(),
@@ -2379,7 +2935,7 @@ class CartPlatformModel {
2379
2935
  order_quantity: Joi.number(),
2380
2936
  anonymous_users: Joi.boolean(),
2381
2937
  user_id: Joi.array().items(Joi.string().allow("")),
2382
- uses: CartPlatformModel.UsesRestriction1().required(),
2938
+ uses: CartPlatformModel.UsesRestriction1(),
2383
2939
  ordering_stores: Joi.array().items(Joi.number()),
2384
2940
  });
2385
2941
  }
@@ -2387,9 +2943,10 @@ class CartPlatformModel {
2387
2943
  /** @returns {PromotionSchedule} */
2388
2944
  static PromotionSchedule() {
2389
2945
  return Joi.object({
2390
- end: Joi.string().allow("").required(),
2391
- start: Joi.string().allow("").required(),
2392
- published: Joi.boolean().required(),
2946
+ end: Joi.string().allow("").allow(null),
2947
+ start: Joi.string().allow("").allow(null),
2948
+ status: Joi.string().allow(""),
2949
+ published: Joi.boolean(),
2393
2950
  next_schedule: Joi.array().items(Joi.any()),
2394
2951
  cron: Joi.string().allow("").allow(null),
2395
2952
  duration: Joi.number().allow(null),
@@ -2399,8 +2956,8 @@ class CartPlatformModel {
2399
2956
  /** @returns {PromotionAction} */
2400
2957
  static PromotionAction() {
2401
2958
  return Joi.object({
2402
- action_date: Joi.string().allow("").allow(null).required(),
2403
- action_type: Joi.string().allow("").required(),
2959
+ action_date: Joi.string().allow("").allow(null),
2960
+ action_type: Joi.string().allow(""),
2404
2961
  });
2405
2962
  }
2406
2963
 
@@ -2409,14 +2966,17 @@ class CartPlatformModel {
2409
2966
  return Joi.object({
2410
2967
  created_by: Joi.string().allow("").allow(null),
2411
2968
  modified_by: Joi.string().allow("").allow(null),
2969
+ approved_by: Joi.string().allow("").allow(null),
2970
+ rejected_by: Joi.string().allow("").allow(null),
2971
+ reviewed_by: Joi.string().allow("").allow(null),
2412
2972
  });
2413
2973
  }
2414
2974
 
2415
2975
  /** @returns {Visibility} */
2416
2976
  static Visibility() {
2417
2977
  return Joi.object({
2418
- coupon_list: Joi.boolean().required(),
2419
- pdp: Joi.boolean().required(),
2978
+ coupon_list: Joi.boolean(),
2979
+ pdp: Joi.boolean(),
2420
2980
  });
2421
2981
  }
2422
2982
 
@@ -2425,6 +2985,9 @@ class CartPlatformModel {
2425
2985
  return Joi.object({
2426
2986
  modified_on: Joi.string().allow("").allow(null),
2427
2987
  created_on: Joi.string().allow("").allow(null),
2988
+ approved_on: Joi.string().allow("").allow(null),
2989
+ rejected_on: Joi.string().allow("").allow(null),
2990
+ reviewed_on: Joi.string().allow("").allow(null),
2428
2991
  });
2429
2992
  }
2430
2993
 
@@ -2445,6 +3008,7 @@ class CartPlatformModel {
2445
3008
  .required(),
2446
3009
  restrictions: CartPlatformModel.Restrictions1(),
2447
3010
  currency: Joi.string().allow(""),
3011
+ is_processed: Joi.boolean(),
2448
3012
  code: Joi.string().allow(""),
2449
3013
  _schedule: CartPlatformModel.PromotionSchedule(),
2450
3014
  post_order_action: CartPlatformModel.PromotionAction(),
@@ -2452,18 +3016,16 @@ class CartPlatformModel {
2452
3016
  author: CartPlatformModel.PromotionAuthor(),
2453
3017
  visiblility: CartPlatformModel.Visibility(),
2454
3018
  application_id: Joi.string().allow("").required(),
2455
- buy_rules: Joi.object()
2456
- .pattern(/\S/, CartPlatformModel.ItemCriteria())
2457
- .required(),
2458
- _custom_json: Joi.any(),
3019
+ buy_rules: CartPlatformModel.ItemCriteria().required(),
3020
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2459
3021
  date_meta: CartPlatformModel.PromotionDateMeta(),
2460
3022
  _id: Joi.string().allow(""),
2461
3023
  tags: Joi.array().items(Joi.string().allow("")),
2462
3024
  });
2463
3025
  }
2464
3026
 
2465
- /** @returns {PromotionsResponse} */
2466
- static PromotionsResponse() {
3027
+ /** @returns {PromotionsResult} */
3028
+ static PromotionsResult() {
2467
3029
  return Joi.object({
2468
3030
  items: Joi.array().items(CartPlatformModel.PromotionListItem()),
2469
3031
  page: CartPlatformModel.Page(),
@@ -2479,12 +3041,10 @@ class CartPlatformModel {
2479
3041
  promo_group: Joi.string().allow("").required(),
2480
3042
  mode: Joi.string().allow("").required(),
2481
3043
  apply_all_discount: Joi.boolean(),
2482
- display_meta: CartPlatformModel.DisplayMeta1().required(),
2483
- ownership: CartPlatformModel.Ownership1().required(),
3044
+ display_meta: CartPlatformModel.DisplayMeta1(),
3045
+ ownership: CartPlatformModel.Ownership1(),
2484
3046
  promotion_type: Joi.string().allow("").required(),
2485
- discount_rules: Joi.array()
2486
- .items(CartPlatformModel.DiscountRule())
2487
- .required(),
3047
+ discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
2488
3048
  restrictions: CartPlatformModel.Restrictions1(),
2489
3049
  currency: Joi.string().allow(""),
2490
3050
  code: Joi.string().allow(""),
@@ -2494,10 +3054,38 @@ class CartPlatformModel {
2494
3054
  author: CartPlatformModel.PromotionAuthor(),
2495
3055
  visiblility: CartPlatformModel.Visibility(),
2496
3056
  application_id: Joi.string().allow("").required(),
2497
- buy_rules: Joi.object()
2498
- .pattern(/\S/, CartPlatformModel.ItemCriteria())
2499
- .required(),
2500
- _custom_json: Joi.any(),
3057
+ buy_rules: CartPlatformModel.ItemCriteria(),
3058
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3059
+ date_meta: CartPlatformModel.PromotionDateMeta(),
3060
+ tags: Joi.array().items(Joi.string().allow("")),
3061
+ });
3062
+ }
3063
+
3064
+ /** @returns {PromotionAddResult} */
3065
+ static PromotionAddResult() {
3066
+ return Joi.object({
3067
+ stackable: Joi.boolean(),
3068
+ calculate_on: Joi.string().allow(""),
3069
+ apply_exclusive: Joi.string().allow("").allow(null),
3070
+ promo_group: Joi.string().allow("").required(),
3071
+ mode: Joi.string().allow("").required(),
3072
+ is_processed: Joi.boolean(),
3073
+ apply_all_discount: Joi.boolean(),
3074
+ display_meta: CartPlatformModel.DisplayMeta1(),
3075
+ ownership: CartPlatformModel.Ownership1(),
3076
+ promotion_type: Joi.string().allow("").required(),
3077
+ discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
3078
+ restrictions: CartPlatformModel.Restrictions1(),
3079
+ currency: Joi.string().allow(""),
3080
+ code: Joi.string().allow(""),
3081
+ _schedule: CartPlatformModel.PromotionSchedule(),
3082
+ post_order_action: CartPlatformModel.PromotionAction(),
3083
+ apply_priority: Joi.number(),
3084
+ author: CartPlatformModel.PromotionAuthor(),
3085
+ visiblility: CartPlatformModel.Visibility(),
3086
+ application_id: Joi.string().allow("").required(),
3087
+ buy_rules: CartPlatformModel.ItemCriteria(),
3088
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2501
3089
  date_meta: CartPlatformModel.PromotionDateMeta(),
2502
3090
  tags: Joi.array().items(Joi.string().allow("")),
2503
3091
  });
@@ -2509,15 +3097,14 @@ class CartPlatformModel {
2509
3097
  stackable: Joi.boolean(),
2510
3098
  calculate_on: Joi.string().allow(""),
2511
3099
  apply_exclusive: Joi.string().allow("").allow(null),
3100
+ reason: Joi.string().allow("").allow(null),
2512
3101
  promo_group: Joi.string().allow("").required(),
2513
3102
  mode: Joi.string().allow("").required(),
2514
3103
  apply_all_discount: Joi.boolean(),
2515
- display_meta: CartPlatformModel.DisplayMeta1().required(),
2516
- ownership: CartPlatformModel.Ownership1().required(),
3104
+ display_meta: CartPlatformModel.DisplayMeta1(),
3105
+ ownership: CartPlatformModel.Ownership1(),
2517
3106
  promotion_type: Joi.string().allow("").required(),
2518
- discount_rules: Joi.array()
2519
- .items(CartPlatformModel.DiscountRule())
2520
- .required(),
3107
+ discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
2521
3108
  restrictions: CartPlatformModel.Restrictions1(),
2522
3109
  currency: Joi.string().allow(""),
2523
3110
  code: Joi.string().allow(""),
@@ -2527,10 +3114,39 @@ class CartPlatformModel {
2527
3114
  author: CartPlatformModel.PromotionAuthor(),
2528
3115
  visiblility: CartPlatformModel.Visibility(),
2529
3116
  application_id: Joi.string().allow("").required(),
2530
- buy_rules: Joi.object()
2531
- .pattern(/\S/, CartPlatformModel.ItemCriteria())
2532
- .required(),
2533
- _custom_json: Joi.any(),
3117
+ buy_rules: CartPlatformModel.ItemCriteria(),
3118
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3119
+ date_meta: CartPlatformModel.PromotionDateMeta(),
3120
+ tags: Joi.array().items(Joi.string().allow("")),
3121
+ });
3122
+ }
3123
+
3124
+ /** @returns {PromotionUpdateResult} */
3125
+ static PromotionUpdateResult() {
3126
+ return Joi.object({
3127
+ stackable: Joi.boolean(),
3128
+ calculate_on: Joi.string().allow(""),
3129
+ apply_exclusive: Joi.string().allow("").allow(null),
3130
+ reason: Joi.string().allow("").allow(null),
3131
+ is_processed: Joi.boolean(),
3132
+ promo_group: Joi.string().allow("").required(),
3133
+ mode: Joi.string().allow("").required(),
3134
+ apply_all_discount: Joi.boolean(),
3135
+ display_meta: CartPlatformModel.DisplayMeta1(),
3136
+ ownership: CartPlatformModel.Ownership1(),
3137
+ promotion_type: Joi.string().allow("").required(),
3138
+ discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
3139
+ restrictions: CartPlatformModel.Restrictions1(),
3140
+ currency: Joi.string().allow(""),
3141
+ code: Joi.string().allow(""),
3142
+ _schedule: CartPlatformModel.PromotionSchedule(),
3143
+ post_order_action: CartPlatformModel.PromotionAction(),
3144
+ apply_priority: Joi.number(),
3145
+ author: CartPlatformModel.PromotionAuthor(),
3146
+ visiblility: CartPlatformModel.Visibility(),
3147
+ application_id: Joi.string().allow("").required(),
3148
+ buy_rules: CartPlatformModel.ItemCriteria(),
3149
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2534
3150
  date_meta: CartPlatformModel.PromotionDateMeta(),
2535
3151
  tags: Joi.array().items(Joi.string().allow("")),
2536
3152
  });
@@ -2544,8 +3160,8 @@ class CartPlatformModel {
2544
3160
  });
2545
3161
  }
2546
3162
 
2547
- /** @returns {ActivePromosResponse} */
2548
- static ActivePromosResponse() {
3163
+ /** @returns {ActivePromosResult} */
3164
+ static ActivePromosResult() {
2549
3165
  return Joi.object({
2550
3166
  entity_slug: Joi.string().allow(""),
2551
3167
  title: Joi.string().allow(""),
@@ -2614,14 +3230,14 @@ class CartPlatformModel {
2614
3230
  type: Joi.string().allow(""),
2615
3231
  article_id: Joi.string().allow("").required(),
2616
3232
  quantity: Joi.number(),
2617
- meta: Joi.any(),
3233
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2618
3234
  });
2619
3235
  }
2620
3236
 
2621
3237
  /** @returns {PriceAdjustmentRestrictions} */
2622
3238
  static PriceAdjustmentRestrictions() {
2623
3239
  return Joi.object({
2624
- post_order: Joi.any(),
3240
+ post_order: Joi.object().pattern(/\S/, Joi.any()),
2625
3241
  });
2626
3242
  }
2627
3243
 
@@ -2647,8 +3263,10 @@ class CartPlatformModel {
2647
3263
  allowed_refund: Joi.boolean(),
2648
3264
  is_authenticated: Joi.boolean().required(),
2649
3265
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
2650
- meta: Joi.any(),
3266
+ auto_remove: Joi.boolean(),
3267
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2651
3268
  cart_id: Joi.string().allow("").required(),
3269
+ distribution_logic: CartPlatformModel.DistributionLogic(),
2652
3270
  });
2653
3271
  }
2654
3272
 
@@ -2666,20 +3284,22 @@ class CartPlatformModel {
2666
3284
  allowed_refund: Joi.boolean(),
2667
3285
  is_authenticated: Joi.boolean().required(),
2668
3286
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
2669
- meta: Joi.any(),
3287
+ auto_remove: Joi.boolean(),
3288
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2670
3289
  cart_id: Joi.string().allow("").required(),
3290
+ distribution_logic: CartPlatformModel.DistributionLogic(),
2671
3291
  });
2672
3292
  }
2673
3293
 
2674
- /** @returns {PriceAdjustmentResponse} */
2675
- static PriceAdjustmentResponse() {
3294
+ /** @returns {PriceAdjustmentResult} */
3295
+ static PriceAdjustmentResult() {
2676
3296
  return Joi.object({
2677
3297
  data: CartPlatformModel.PriceAdjustment(),
2678
3298
  });
2679
3299
  }
2680
3300
 
2681
- /** @returns {GetPriceAdjustmentResponse} */
2682
- static GetPriceAdjustmentResponse() {
3301
+ /** @returns {GetPriceAdjustmentResult} */
3302
+ static GetPriceAdjustmentResult() {
2683
3303
  return Joi.object({
2684
3304
  data: Joi.array().items(CartPlatformModel.PriceAdjustment()),
2685
3305
  });
@@ -2699,8 +3319,34 @@ class CartPlatformModel {
2699
3319
  allowed_refund: Joi.boolean(),
2700
3320
  is_authenticated: Joi.boolean().required(),
2701
3321
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
2702
- meta: Joi.any(),
3322
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2703
3323
  cart_id: Joi.string().allow("").required(),
3324
+ auto_remove: Joi.boolean(),
3325
+ distribution_logic: CartPlatformModel.DistributionLogic(),
3326
+ });
3327
+ }
3328
+
3329
+ /** @returns {DistributionRule} */
3330
+ static DistributionRule() {
3331
+ return Joi.object({
3332
+ conditions: Joi.object().pattern(/\S/, Joi.any()),
3333
+ });
3334
+ }
3335
+
3336
+ /** @returns {Distribution} */
3337
+ static Distribution() {
3338
+ return Joi.object({
3339
+ type: Joi.string().allow(""),
3340
+ logic: Joi.string().allow(""),
3341
+ rule: CartPlatformModel.DistributionRule(),
3342
+ });
3343
+ }
3344
+
3345
+ /** @returns {DistributionLogic} */
3346
+ static DistributionLogic() {
3347
+ return Joi.object({
3348
+ distribution_level: Joi.string().allow(""),
3349
+ distribution: CartPlatformModel.Distribution(),
2704
3350
  });
2705
3351
  }
2706
3352
 
@@ -2713,8 +3359,8 @@ class CartPlatformModel {
2713
3359
  });
2714
3360
  }
2715
3361
 
2716
- /** @returns {OpenapiCartDetailsRequest} */
2717
- static OpenapiCartDetailsRequest() {
3362
+ /** @returns {OpenapiCartDetailsCreation} */
3363
+ static OpenapiCartDetailsCreation() {
2718
3364
  return Joi.object({
2719
3365
  cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
2720
3366
  });
@@ -2802,7 +3448,7 @@ class CartPlatformModel {
2802
3448
  /** @returns {Tags} */
2803
3449
  static Tags() {
2804
3450
  return Joi.object({
2805
- tags: Joi.any(),
3451
+ tags: Joi.object().pattern(/\S/, Joi.any()),
2806
3452
  });
2807
3453
  }
2808
3454
 
@@ -2821,12 +3467,28 @@ class CartPlatformModel {
2821
3467
  });
2822
3468
  }
2823
3469
 
3470
+ /** @returns {ProductActionParams} */
3471
+ static ProductActionParams() {
3472
+ return Joi.object({
3473
+ slug: Joi.array().items(Joi.string().allow("")),
3474
+ });
3475
+ }
3476
+
3477
+ /** @returns {ProductActionPage} */
3478
+ static ProductActionPage() {
3479
+ return Joi.object({
3480
+ type: Joi.string().allow(""),
3481
+ params: CartPlatformModel.ProductActionParams(),
3482
+ });
3483
+ }
3484
+
2824
3485
  /** @returns {ProductAction} */
2825
3486
  static ProductAction() {
2826
3487
  return Joi.object({
2827
3488
  type: Joi.string().allow(""),
2828
3489
  url: Joi.string().allow(""),
2829
3490
  query: CartPlatformModel.ActionQuery(),
3491
+ page: CartPlatformModel.ProductActionPage(),
2830
3492
  });
2831
3493
  }
2832
3494
 
@@ -2848,12 +3510,12 @@ class CartPlatformModel {
2848
3510
  action: CartPlatformModel.ProductAction(),
2849
3511
  uid: Joi.number(),
2850
3512
  tags: Joi.array().items(Joi.string().allow("")),
2851
- _custom_json: Joi.any(),
3513
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2852
3514
  type: Joi.string().allow(""),
2853
3515
  name: Joi.string().allow(""),
2854
3516
  item_code: Joi.string().allow("").allow(null),
2855
3517
  categories: Joi.array().items(CartPlatformModel.CategoryInfo()),
2856
- attributes: Joi.any(),
3518
+ attributes: Joi.object().pattern(/\S/, Joi.any()),
2857
3519
  });
2858
3520
  }
2859
3521
 
@@ -2890,19 +3552,19 @@ class CartPlatformModel {
2890
3552
  seller_identifier: Joi.string().allow(""),
2891
3553
  quantity: Joi.number(),
2892
3554
  seller: CartPlatformModel.BaseInfo(),
2893
- cart_item_meta: Joi.any(),
2894
- parent_item_identifiers: Joi.any(),
3555
+ cart_item_meta: Joi.object().pattern(/\S/, Joi.any()),
3556
+ parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
2895
3557
  is_gift_visible: Joi.boolean(),
2896
3558
  uid: Joi.string().allow(""),
2897
- gift_card: Joi.any(),
3559
+ gift_card: Joi.object().pattern(/\S/, Joi.any()),
2898
3560
  product_group_tags: Joi.array().items(Joi.string().allow("")),
2899
- identifier: Joi.any(),
3561
+ identifier: Joi.object().pattern(/\S/, Joi.any()),
2900
3562
  mto_quantity: Joi.number(),
2901
- extra_meta: Joi.any(),
3563
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
2902
3564
  type: Joi.string().allow(""),
2903
- _custom_json: Joi.any(),
3565
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2904
3566
  price: CartPlatformModel.ArticlePriceInfo(),
2905
- meta: Joi.any(),
3567
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2906
3568
  size: Joi.string().allow(""),
2907
3569
  store: CartPlatformModel.StoreInfo(),
2908
3570
  tags: Joi.array().items(Joi.string().allow("")),
@@ -2920,9 +3582,9 @@ class CartPlatformModel {
2920
3582
  /** @returns {DiscountRulesApp} */
2921
3583
  static DiscountRulesApp() {
2922
3584
  return Joi.object({
2923
- offer: Joi.any(),
2924
- raw_offer: Joi.any(),
2925
- item_criteria: Joi.any(),
3585
+ offer: Joi.object().pattern(/\S/, Joi.any()),
3586
+ raw_offer: Joi.object().pattern(/\S/, Joi.any()),
3587
+ item_criteria: Joi.object().pattern(/\S/, Joi.any()),
2926
3588
  matched_buy_rules: Joi.array().items(Joi.string().allow("")),
2927
3589
  });
2928
3590
  }
@@ -2940,8 +3602,8 @@ class CartPlatformModel {
2940
3602
  /** @returns {BuyRules} */
2941
3603
  static BuyRules() {
2942
3604
  return Joi.object({
2943
- cart_conditions: Joi.any(),
2944
- item_criteria: Joi.any(),
3605
+ cart_conditions: Joi.object().pattern(/\S/, Joi.any()),
3606
+ item_criteria: Joi.object().pattern(/\S/, Joi.any()),
2945
3607
  });
2946
3608
  }
2947
3609
 
@@ -2959,11 +3621,12 @@ class CartPlatformModel {
2959
3621
  buy_rules: Joi.array().items(CartPlatformModel.BuyRules()),
2960
3622
  offer_text: Joi.string().allow(""),
2961
3623
  amount: Joi.number(),
3624
+ float_amount: Joi.string().allow(""),
2962
3625
  promotion_type: Joi.string().allow(""),
2963
3626
  mrp_promotion: Joi.boolean(),
2964
3627
  promotion_group: Joi.string().allow(""),
2965
3628
  promo_id: Joi.string().allow(""),
2966
- meta: Joi.any(),
3629
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2967
3630
  code: Joi.string().allow("").allow(null),
2968
3631
  });
2969
3632
  }
@@ -3073,7 +3736,7 @@ class CartPlatformModel {
3073
3736
  quantity: Joi.number(),
3074
3737
  product: CartPlatformModel.CartProduct(),
3075
3738
  product_ean_id: Joi.string().allow(""),
3076
- parent_item_identifiers: Joi.any(),
3739
+ parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
3077
3740
  is_set: Joi.boolean(),
3078
3741
  article: CartPlatformModel.ProductArticle(),
3079
3742
  promotions_applied: Joi.array().items(
@@ -3082,22 +3745,22 @@ class CartPlatformModel {
3082
3745
  delivery_promise: CartPlatformModel.ShipmentPromise(),
3083
3746
  key: Joi.string().allow(""),
3084
3747
  coupon: CartPlatformModel.CouponDetails(),
3085
- bulk_offer: Joi.any(),
3748
+ bulk_offer: Joi.object().pattern(/\S/, Joi.any()),
3086
3749
  price: CartPlatformModel.ProductPriceInfo(),
3087
3750
  coupon_message: Joi.string().allow(""),
3088
3751
  identifiers: CartPlatformModel.CartProductIdentifer().required(),
3089
3752
  message: Joi.string().allow(""),
3090
3753
  discount: Joi.string().allow(""),
3091
3754
  availability: CartPlatformModel.ProductAvailability(),
3092
- moq: Joi.any(),
3755
+ moq: Joi.object().pattern(/\S/, Joi.any()),
3093
3756
  price_per_unit: CartPlatformModel.ProductPriceInfo(),
3094
3757
  promo_meta: CartPlatformModel.PromoMeta(),
3095
- custom_order: Joi.any(),
3758
+ custom_order: Joi.object().pattern(/\S/, Joi.any()),
3096
3759
  });
3097
3760
  }
3098
3761
 
3099
- /** @returns {OpenapiCartDetailsResponse} */
3100
- static OpenapiCartDetailsResponse() {
3762
+ /** @returns {OpenapiCartDetailsResult} */
3763
+ static OpenapiCartDetailsResult() {
3101
3764
  return Joi.object({
3102
3765
  is_valid: Joi.boolean(),
3103
3766
  message: Joi.string().allow(""),
@@ -3106,12 +3769,12 @@ class CartPlatformModel {
3106
3769
  });
3107
3770
  }
3108
3771
 
3109
- /** @returns {OpenApiErrorResponse} */
3110
- static OpenApiErrorResponse() {
3772
+ /** @returns {OpenApiErrorResult} */
3773
+ static OpenApiErrorResult() {
3111
3774
  return Joi.object({
3112
3775
  success: Joi.boolean(),
3113
3776
  message: Joi.string().allow(""),
3114
- errors: Joi.any(),
3777
+ errors: Joi.object().pattern(/\S/, Joi.any()),
3115
3778
  });
3116
3779
  }
3117
3780
 
@@ -3125,7 +3788,7 @@ class CartPlatformModel {
3125
3788
  area_code: Joi.string().allow("").required(),
3126
3789
  country_iso_code: Joi.string().allow(""),
3127
3790
  country_phone_code: Joi.string().allow(""),
3128
- meta: Joi.any(),
3791
+ meta: Joi.object().pattern(/\S/, Joi.any()),
3129
3792
  address_type: Joi.string().allow(""),
3130
3793
  area: Joi.string().allow(""),
3131
3794
  area_code_slug: Joi.string().allow(""),
@@ -3138,16 +3801,16 @@ class CartPlatformModel {
3138
3801
  });
3139
3802
  }
3140
3803
 
3141
- /** @returns {OpenApiCartServiceabilityRequest} */
3142
- static OpenApiCartServiceabilityRequest() {
3804
+ /** @returns {OpenApiCartServiceabilityCreation} */
3805
+ static OpenApiCartServiceabilityCreation() {
3143
3806
  return Joi.object({
3144
3807
  cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
3145
3808
  shipping_address: CartPlatformModel.ShippingAddress().required(),
3146
3809
  });
3147
3810
  }
3148
3811
 
3149
- /** @returns {OpenApiCartServiceabilityResponse} */
3150
- static OpenApiCartServiceabilityResponse() {
3812
+ /** @returns {OpenApiCartServiceabilityResult} */
3813
+ static OpenApiCartServiceabilityResult() {
3151
3814
  return Joi.object({
3152
3815
  is_valid: Joi.boolean(),
3153
3816
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -3178,7 +3841,7 @@ class CartPlatformModel {
3178
3841
  return Joi.object({
3179
3842
  payment_id: Joi.string().allow("").allow(null),
3180
3843
  payment_gateway: Joi.string().allow("").allow(null),
3181
- extra_meta: Joi.any().allow(null),
3844
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3182
3845
  current_status: Joi.string().allow("").allow(null),
3183
3846
  order_id: Joi.string().allow("").allow(null),
3184
3847
  });
@@ -3206,7 +3869,7 @@ class CartPlatformModel {
3206
3869
  price_marked: Joi.number().required(),
3207
3870
  files: Joi.array().items(CartPlatformModel.OpenApiFiles()),
3208
3871
  meta: CartPlatformModel.CartItemMeta(),
3209
- extra_meta: Joi.any(),
3872
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
3210
3873
  product_id: Joi.number().required(),
3211
3874
  loyalty_discount: Joi.number(),
3212
3875
  discount: Joi.number().required(),
@@ -3233,7 +3896,7 @@ class CartPlatformModel {
3233
3896
  payment_methods: Joi.array()
3234
3897
  .items(CartPlatformModel.MultiTenderPaymentMethod())
3235
3898
  .required(),
3236
- employee_discount: Joi.any(),
3899
+ employee_discount: Joi.object().pattern(/\S/, Joi.any()),
3237
3900
  coupon: Joi.string().allow(""),
3238
3901
  cashback_applied: Joi.number().required(),
3239
3902
  gstin: Joi.string().allow("").allow(null),
@@ -3249,8 +3912,8 @@ class CartPlatformModel {
3249
3912
  });
3250
3913
  }
3251
3914
 
3252
- /** @returns {OpenApiCheckoutResponse} */
3253
- static OpenApiCheckoutResponse() {
3915
+ /** @returns {OpenApiCheckoutResult} */
3916
+ static OpenApiCheckoutResult() {
3254
3917
  return Joi.object({
3255
3918
  success: Joi.boolean(),
3256
3919
  message: Joi.string().allow(""),
@@ -3263,46 +3926,48 @@ class CartPlatformModel {
3263
3926
  static AbandonedCart() {
3264
3927
  return Joi.object({
3265
3928
  expire_at: Joi.string().allow("").required(),
3266
- promotion: Joi.any(),
3929
+ promotion: Joi.object().pattern(/\S/, Joi.any()),
3267
3930
  is_default: Joi.boolean().required(),
3268
3931
  comment: Joi.string().allow("").allow(null),
3269
3932
  articles: Joi.array().items(Joi.any()).required(),
3270
- coupon: Joi.any().allow(null),
3933
+ coupon: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3271
3934
  bulk_coupon_discount: Joi.number().allow(null),
3272
3935
  _id: Joi.string().allow("").required(),
3273
- fynd_credits: Joi.any(),
3936
+ fynd_credits: Joi.object().pattern(/\S/, Joi.any()),
3274
3937
  fc_index_map: Joi.array().items(Joi.number()),
3275
3938
  order_id: Joi.string().allow(""),
3276
3939
  discount: Joi.number(),
3277
- cod_charges: Joi.any(),
3278
- payments: Joi.any().allow(null),
3940
+ cod_charges: Joi.object().pattern(/\S/, Joi.any()),
3941
+ payments: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3279
3942
  payment_mode: Joi.string().allow("").allow(null),
3280
3943
  shipments: Joi.array().items(Joi.any()),
3281
- pick_up_customer_details: Joi.any().allow(null),
3944
+ pick_up_customer_details: Joi.object()
3945
+ .pattern(/\S/, Joi.any())
3946
+ .allow(null, ""),
3282
3947
  uid: Joi.number().required(),
3283
3948
  checkout_mode: Joi.string().allow(""),
3284
3949
  cart_value: Joi.number(),
3285
3950
  is_archive: Joi.boolean(),
3286
3951
  created_on: Joi.string().allow("").required(),
3287
3952
  last_modified: Joi.string().allow("").required(),
3288
- meta: Joi.any().allow(null),
3953
+ meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3289
3954
  buy_now: Joi.boolean(),
3290
3955
  is_active: Joi.boolean(),
3291
- cashback: Joi.any().required(),
3956
+ cashback: Joi.object().pattern(/\S/, Joi.any()).required(),
3292
3957
  payment_methods: Joi.array().items(Joi.any()),
3293
3958
  gstin: Joi.string().allow("").allow(null),
3294
- delivery_charges: Joi.any(),
3959
+ delivery_charges: Joi.object().pattern(/\S/, Joi.any()),
3295
3960
  merge_qty: Joi.boolean().allow(null),
3296
3961
  user_id: Joi.string().allow("").required(),
3297
3962
  app_id: Joi.string().allow(""),
3298
3963
  });
3299
3964
  }
3300
3965
 
3301
- /** @returns {AbandonedCartResponse} */
3302
- static AbandonedCartResponse() {
3966
+ /** @returns {AbandonedCartResult} */
3967
+ static AbandonedCartResult() {
3303
3968
  return Joi.object({
3304
3969
  items: Joi.array().items(CartPlatformModel.AbandonedCart()),
3305
- result: Joi.any(),
3970
+ result: Joi.object().pattern(/\S/, Joi.any()),
3306
3971
  page: CartPlatformModel.Page(),
3307
3972
  success: Joi.boolean(),
3308
3973
  message: Joi.string().allow(""),
@@ -3371,14 +4036,14 @@ class CartPlatformModel {
3371
4036
  });
3372
4037
  }
3373
4038
 
3374
- /** @returns {CartDetailResponse} */
3375
- static CartDetailResponse() {
4039
+ /** @returns {CartDetailResult} */
4040
+ static CartDetailResult() {
3376
4041
  return Joi.object({
3377
4042
  cart_id: Joi.number(),
3378
4043
  uid: Joi.string().allow(""),
3379
4044
  coupon_text: Joi.string().allow(""),
3380
4045
  id: Joi.string().allow(""),
3381
- pan_config: Joi.any(),
4046
+ pan_config: Joi.object().pattern(/\S/, Joi.any()),
3382
4047
  delivery_promise: CartPlatformModel.ShipmentPromise(),
3383
4048
  comment: Joi.string().allow(""),
3384
4049
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -3388,7 +4053,7 @@ class CartPlatformModel {
3388
4053
  coupon: CartPlatformModel.CartDetailCoupon(),
3389
4054
  restrict_checkout: Joi.boolean(),
3390
4055
  message: Joi.string().allow(""),
3391
- notification: Joi.any(),
4056
+ notification: Joi.object().pattern(/\S/, Joi.any()),
3392
4057
  staff_user_id: Joi.string().allow(""),
3393
4058
  success: Joi.boolean(),
3394
4059
  breakup_values: CartPlatformModel.CartBreakup(),
@@ -3402,7 +4067,7 @@ class CartPlatformModel {
3402
4067
  CartPlatformModel.AppliedPromotion()
3403
4068
  ),
3404
4069
  pan_no: Joi.string().allow(""),
3405
- custom_cart_meta: Joi.any(),
4070
+ custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3406
4071
  });
3407
4072
  }
3408
4073
 
@@ -3417,31 +4082,31 @@ class CartPlatformModel {
3417
4082
  ),
3418
4083
  product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
3419
4084
  article_id: Joi.string().allow(""),
3420
- article_assignment: Joi.any(),
4085
+ article_assignment: Joi.object().pattern(/\S/, Joi.any()),
3421
4086
  store_id: Joi.number(),
3422
4087
  display: Joi.string().allow(""),
3423
4088
  item_id: Joi.number(),
3424
- extra_meta: Joi.any(),
3425
- _custom_json: Joi.any(),
3426
- meta: Joi.any(),
4089
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4090
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
4091
+ meta: Joi.object().pattern(/\S/, Joi.any()),
3427
4092
  pos: Joi.boolean(),
3428
4093
  seller_identifier: Joi.string().allow(""),
3429
4094
  });
3430
4095
  }
3431
4096
 
3432
- /** @returns {AddCartRequest} */
3433
- static AddCartRequest() {
4097
+ /** @returns {AddCartCreation} */
4098
+ static AddCartCreation() {
3434
4099
  return Joi.object({
3435
4100
  new_cart: Joi.boolean(),
3436
4101
  items: Joi.array().items(CartPlatformModel.AddProductCart()),
3437
4102
  });
3438
4103
  }
3439
4104
 
3440
- /** @returns {AddCartDetailResponse} */
3441
- static AddCartDetailResponse() {
4105
+ /** @returns {AddCartDetailResult} */
4106
+ static AddCartDetailResult() {
3442
4107
  return Joi.object({
3443
4108
  success: Joi.boolean(),
3444
- cart: CartPlatformModel.CartDetailResponse(),
4109
+ cart: CartPlatformModel.CartDetailResult(),
3445
4110
  partial: Joi.boolean(),
3446
4111
  message: Joi.string().allow(""),
3447
4112
  });
@@ -3452,10 +4117,10 @@ class CartPlatformModel {
3452
4117
  return Joi.object({
3453
4118
  quantity: Joi.number(),
3454
4119
  item_size: Joi.string().allow(""),
3455
- parent_item_identifiers: Joi.any(),
3456
- meta: Joi.any(),
3457
- extra_meta: Joi.any(),
3458
- _custom_json: Joi.any(),
4120
+ parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
4121
+ meta: Joi.object().pattern(/\S/, Joi.any()),
4122
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4123
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3459
4124
  item_id: Joi.number(),
3460
4125
  item_index: Joi.number(),
3461
4126
  identifiers: CartPlatformModel.CartProductIdentifer().required(),
@@ -3463,19 +4128,31 @@ class CartPlatformModel {
3463
4128
  });
3464
4129
  }
3465
4130
 
3466
- /** @returns {UpdateCartRequest} */
3467
- static UpdateCartRequest() {
4131
+ /** @returns {FreeGiftItemCreation} */
4132
+ static FreeGiftItemCreation() {
4133
+ return Joi.object({
4134
+ promotion_id: Joi.string().allow("").required(),
4135
+ item_id: Joi.string().allow("").required(),
4136
+ item_size: Joi.string().allow("").required(),
4137
+ });
4138
+ }
4139
+
4140
+ /** @returns {UpdateCartCreation} */
4141
+ static UpdateCartCreation() {
3468
4142
  return Joi.object({
3469
4143
  items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
4144
+ free_gift_items: Joi.array().items(
4145
+ CartPlatformModel.FreeGiftItemCreation()
4146
+ ),
3470
4147
  operation: Joi.string().allow("").required(),
3471
4148
  });
3472
4149
  }
3473
4150
 
3474
- /** @returns {UpdateCartDetailResponse} */
3475
- static UpdateCartDetailResponse() {
4151
+ /** @returns {UpdateCartDetailResult} */
4152
+ static UpdateCartDetailResult() {
3476
4153
  return Joi.object({
3477
4154
  success: Joi.boolean(),
3478
- cart: CartPlatformModel.CartDetailResponse(),
4155
+ cart: CartPlatformModel.CartDetailResult(),
3479
4156
  message: Joi.string().allow(""),
3480
4157
  });
3481
4158
  }
@@ -3501,7 +4178,7 @@ class CartPlatformModel {
3501
4178
  price_marked: Joi.number().required(),
3502
4179
  amount_paid: Joi.number().required(),
3503
4180
  promo_list: Joi.array().items(CartPlatformModel.OverrideCartItemPromo()),
3504
- extra_meta: Joi.any(),
4181
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
3505
4182
  item_id: Joi.number().required(),
3506
4183
  discount: Joi.number().required(),
3507
4184
  price_effective: Joi.number().required(),
@@ -3513,9 +4190,9 @@ class CartPlatformModel {
3513
4190
  return Joi.object({
3514
4191
  cart_id: Joi.string().allow("").required(),
3515
4192
  payment_mode: Joi.string().allow("").required(),
3516
- billing_address: Joi.any(),
4193
+ billing_address: Joi.object().pattern(/\S/, Joi.any()),
3517
4194
  merchant_code: Joi.string().allow("").required(),
3518
- payment_identifier: Joi.string().allow("").allow(null).required(),
4195
+ payment_identifier: Joi.string().allow("").required(),
3519
4196
  currency_code: Joi.string().allow("").required(),
3520
4197
  aggregator: Joi.string().allow("").required(),
3521
4198
  order_type: Joi.string().allow("").required(),
@@ -3524,31 +4201,31 @@ class CartPlatformModel {
3524
4201
  .items(CartPlatformModel.OverrideCartItem())
3525
4202
  .required(),
3526
4203
  ordering_store: Joi.number().allow(null),
3527
- shipping_address: Joi.any(),
4204
+ shipping_address: Joi.object().pattern(/\S/, Joi.any()),
3528
4205
  });
3529
4206
  }
3530
4207
 
3531
- /** @returns {OverrideCheckoutResponse} */
3532
- static OverrideCheckoutResponse() {
4208
+ /** @returns {OverrideCheckoutResult} */
4209
+ static OverrideCheckoutResult() {
3533
4210
  return Joi.object({
3534
- data: Joi.any().required(),
3535
- cart: Joi.any().required(),
4211
+ data: Joi.object().pattern(/\S/, Joi.any()).required(),
4212
+ cart: Joi.object().pattern(/\S/, Joi.any()).required(),
3536
4213
  success: Joi.string().allow("").required(),
3537
4214
  order_id: Joi.string().allow("").required(),
3538
4215
  message: Joi.string().allow("").required(),
3539
4216
  });
3540
4217
  }
3541
4218
 
3542
- /** @returns {GetShareCartLinkRequest} */
3543
- static GetShareCartLinkRequest() {
4219
+ /** @returns {GetShareCartLinkCreation} */
4220
+ static GetShareCartLinkCreation() {
3544
4221
  return Joi.object({
3545
4222
  id: Joi.string().allow(""),
3546
- meta: Joi.any(),
4223
+ meta: Joi.object().pattern(/\S/, Joi.any()),
3547
4224
  });
3548
4225
  }
3549
4226
 
3550
- /** @returns {GetShareCartLinkResponse} */
3551
- static GetShareCartLinkResponse() {
4227
+ /** @returns {GetShareCartLinkResult} */
4228
+ static GetShareCartLinkResult() {
3552
4229
  return Joi.object({
3553
4230
  token: Joi.string().allow(""),
3554
4231
  share_url: Joi.string().allow(""),
@@ -3558,11 +4235,11 @@ class CartPlatformModel {
3558
4235
  /** @returns {SharedCartDetails} */
3559
4236
  static SharedCartDetails() {
3560
4237
  return Joi.object({
3561
- source: Joi.any(),
3562
- user: Joi.any(),
4238
+ source: Joi.object().pattern(/\S/, Joi.any()),
4239
+ user: Joi.object().pattern(/\S/, Joi.any()),
3563
4240
  token: Joi.string().allow(""),
3564
4241
  created_on: Joi.string().allow(""),
3565
- meta: Joi.any(),
4242
+ meta: Joi.object().pattern(/\S/, Joi.any()),
3566
4243
  });
3567
4244
  }
3568
4245
 
@@ -3588,12 +4265,12 @@ class CartPlatformModel {
3588
4265
  buy_now: Joi.boolean(),
3589
4266
  cart_id: Joi.number(),
3590
4267
  gstin: Joi.string().allow(""),
3591
- custom_cart_meta: Joi.any(),
4268
+ custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3592
4269
  });
3593
4270
  }
3594
4271
 
3595
- /** @returns {SharedCartResponse} */
3596
- static SharedCartResponse() {
4272
+ /** @returns {SharedCartResult} */
4273
+ static SharedCartResult() {
3597
4274
  return Joi.object({
3598
4275
  cart: CartPlatformModel.SharedCart(),
3599
4276
  error: Joi.string().allow(""),
@@ -3604,7 +4281,7 @@ class CartPlatformModel {
3604
4281
  static CartList() {
3605
4282
  return Joi.object({
3606
4283
  cart_id: Joi.string().allow(""),
3607
- pick_up_customer_details: Joi.any(),
4284
+ pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()),
3608
4285
  cart_value: Joi.number(),
3609
4286
  created_on: Joi.string().allow(""),
3610
4287
  user_id: Joi.string().allow(""),
@@ -3613,8 +4290,8 @@ class CartPlatformModel {
3613
4290
  });
3614
4291
  }
3615
4292
 
3616
- /** @returns {MultiCartResponse} */
3617
- static MultiCartResponse() {
4293
+ /** @returns {MultiCartResult} */
4294
+ static MultiCartResult() {
3618
4295
  return Joi.object({
3619
4296
  success: Joi.boolean(),
3620
4297
  data: Joi.array().items(CartPlatformModel.CartList()),
@@ -3643,13 +4320,13 @@ class CartPlatformModel {
3643
4320
  });
3644
4321
  }
3645
4322
 
3646
- /** @returns {UserCartMappingResponse} */
3647
- static UserCartMappingResponse() {
4323
+ /** @returns {UserCartMappingResult} */
4324
+ static UserCartMappingResult() {
3648
4325
  return Joi.object({
3649
4326
  coupon_text: Joi.string().allow(""),
3650
4327
  user: CartPlatformModel.UserInfo(),
3651
4328
  id: Joi.string().allow(""),
3652
- pan_config: Joi.any(),
4329
+ pan_config: Joi.object().pattern(/\S/, Joi.any()),
3653
4330
  delivery_promise: CartPlatformModel.ShipmentPromise(),
3654
4331
  comment: Joi.string().allow(""),
3655
4332
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -3664,7 +4341,7 @@ class CartPlatformModel {
3664
4341
  last_modified: Joi.string().allow(""),
3665
4342
  buy_now: Joi.boolean(),
3666
4343
  gstin: Joi.string().allow(""),
3667
- custom_cart_meta: Joi.any(),
4344
+ custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3668
4345
  applied_promo_details: Joi.array().items(
3669
4346
  CartPlatformModel.AppliedPromotion()
3670
4347
  ),
@@ -3672,8 +4349,8 @@ class CartPlatformModel {
3672
4349
  });
3673
4350
  }
3674
4351
 
3675
- /** @returns {PlatformAddCartRequest} */
3676
- static PlatformAddCartRequest() {
4352
+ /** @returns {PlatformAddCartDetails} */
4353
+ static PlatformAddCartDetails() {
3677
4354
  return Joi.object({
3678
4355
  user_id: Joi.string().allow(""),
3679
4356
  new_cart: Joi.boolean(),
@@ -3681,32 +4358,35 @@ class CartPlatformModel {
3681
4358
  });
3682
4359
  }
3683
4360
 
3684
- /** @returns {PlatformUpdateCartRequest} */
3685
- static PlatformUpdateCartRequest() {
4361
+ /** @returns {PlatformUpdateCartDetails} */
4362
+ static PlatformUpdateCartDetails() {
3686
4363
  return Joi.object({
3687
4364
  user_id: Joi.string().allow(""),
3688
4365
  items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
4366
+ free_gift_items: Joi.array().items(
4367
+ CartPlatformModel.FreeGiftItemCreation()
4368
+ ),
3689
4369
  operation: Joi.string().allow("").required(),
3690
4370
  });
3691
4371
  }
3692
4372
 
3693
- /** @returns {DeleteCartRequest} */
3694
- static DeleteCartRequest() {
4373
+ /** @returns {DeleteCartDetails} */
4374
+ static DeleteCartDetails() {
3695
4375
  return Joi.object({
3696
4376
  cart_id_list: Joi.array().items(Joi.string().allow("")),
3697
4377
  });
3698
4378
  }
3699
4379
 
3700
- /** @returns {DeleteCartDetailResponse} */
3701
- static DeleteCartDetailResponse() {
4380
+ /** @returns {DeleteCartDetailResult} */
4381
+ static DeleteCartDetailResult() {
3702
4382
  return Joi.object({
3703
4383
  success: Joi.boolean(),
3704
4384
  message: Joi.string().allow(""),
3705
4385
  });
3706
4386
  }
3707
4387
 
3708
- /** @returns {CartItemCountResponse} */
3709
- static CartItemCountResponse() {
4388
+ /** @returns {CartItemCountResult} */
4389
+ static CartItemCountResult() {
3710
4390
  return Joi.object({
3711
4391
  user_cart_items_count: Joi.number(),
3712
4392
  });
@@ -3744,16 +4424,16 @@ class CartPlatformModel {
3744
4424
  });
3745
4425
  }
3746
4426
 
3747
- /** @returns {GetCouponResponse} */
3748
- static GetCouponResponse() {
4427
+ /** @returns {GetCouponResult} */
4428
+ static GetCouponResult() {
3749
4429
  return Joi.object({
3750
4430
  available_coupon_list: Joi.array().items(CartPlatformModel.Coupon()),
3751
4431
  page: CartPlatformModel.PageCoupon(),
3752
4432
  });
3753
4433
  }
3754
4434
 
3755
- /** @returns {ApplyCouponRequest} */
3756
- static ApplyCouponRequest() {
4435
+ /** @returns {ApplyCouponDetails} */
4436
+ static ApplyCouponDetails() {
3757
4437
  return Joi.object({
3758
4438
  coupon_code: Joi.string().allow("").required(),
3759
4439
  });
@@ -3784,10 +4464,10 @@ class CartPlatformModel {
3784
4464
  email: Joi.string().allow(""),
3785
4465
  area_code: Joi.string().allow(""),
3786
4466
  checkout_mode: Joi.string().allow(""),
3787
- meta: Joi.any(),
4467
+ meta: Joi.object().pattern(/\S/, Joi.any()),
3788
4468
  is_active: Joi.boolean(),
3789
4469
  name: Joi.string().allow(""),
3790
- google_map_point: Joi.any(),
4470
+ google_map_point: Joi.object().pattern(/\S/, Joi.any()),
3791
4471
  cart_id: Joi.string().allow(""),
3792
4472
  city: Joi.string().allow(""),
3793
4473
  sector: Joi.string().allow(""),
@@ -3798,19 +4478,28 @@ class CartPlatformModel {
3798
4478
  address: Joi.string().allow(""),
3799
4479
  country_phone_code: Joi.string().allow(""),
3800
4480
  country_iso_code: Joi.string().allow(""),
3801
- _custom_json: Joi.any(),
4481
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
4482
+ });
4483
+ }
4484
+
4485
+ /** @returns {ValidationConfig} */
4486
+ static ValidationConfig() {
4487
+ return Joi.object({
4488
+ address_max_limit: Joi.number().required(),
4489
+ user_address_count: Joi.number().required(),
3802
4490
  });
3803
4491
  }
3804
4492
 
3805
- /** @returns {PlatformGetAddressesResponse} */
3806
- static PlatformGetAddressesResponse() {
4493
+ /** @returns {PlatformGetAddressesDetails} */
4494
+ static PlatformGetAddressesDetails() {
3807
4495
  return Joi.object({
3808
4496
  address: Joi.array().items(CartPlatformModel.PlatformAddress()),
4497
+ validation_config: CartPlatformModel.ValidationConfig(),
3809
4498
  });
3810
4499
  }
3811
4500
 
3812
- /** @returns {SaveAddressResponse} */
3813
- static SaveAddressResponse() {
4501
+ /** @returns {SaveAddressDetails} */
4502
+ static SaveAddressDetails() {
3814
4503
  return Joi.object({
3815
4504
  id: Joi.string().allow(""),
3816
4505
  success: Joi.boolean(),
@@ -3818,8 +4507,8 @@ class CartPlatformModel {
3818
4507
  });
3819
4508
  }
3820
4509
 
3821
- /** @returns {UpdateAddressResponse} */
3822
- static UpdateAddressResponse() {
4510
+ /** @returns {UpdateAddressDetails} */
4511
+ static UpdateAddressDetails() {
3823
4512
  return Joi.object({
3824
4513
  id: Joi.string().allow(""),
3825
4514
  is_default_address: Joi.boolean(),
@@ -3828,16 +4517,16 @@ class CartPlatformModel {
3828
4517
  });
3829
4518
  }
3830
4519
 
3831
- /** @returns {DeleteAddressResponse} */
3832
- static DeleteAddressResponse() {
4520
+ /** @returns {DeleteAddressResult} */
4521
+ static DeleteAddressResult() {
3833
4522
  return Joi.object({
3834
4523
  id: Joi.string().allow(""),
3835
4524
  is_deleted: Joi.boolean(),
3836
4525
  });
3837
4526
  }
3838
4527
 
3839
- /** @returns {PlatformSelectCartAddressRequest} */
3840
- static PlatformSelectCartAddressRequest() {
4528
+ /** @returns {PlatformSelectCartAddress} */
4529
+ static PlatformSelectCartAddress() {
3841
4530
  return Joi.object({
3842
4531
  cart_id: Joi.string().allow(""),
3843
4532
  billing_address_id: Joi.string().allow(""),
@@ -3856,13 +4545,13 @@ class CartPlatformModel {
3856
4545
  });
3857
4546
  }
3858
4547
 
3859
- /** @returns {PlatformShipmentResponse} */
3860
- static PlatformShipmentResponse() {
4548
+ /** @returns {PlatformShipmentDetails} */
4549
+ static PlatformShipmentDetails() {
3861
4550
  return Joi.object({
3862
4551
  shipments: Joi.number(),
3863
4552
  fulfillment_id: Joi.number(),
3864
4553
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
3865
- dp_options: Joi.any().allow(null),
4554
+ dp_options: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3866
4555
  shipment_type: Joi.string().allow(""),
3867
4556
  order_type: Joi.string().allow(""),
3868
4557
  box_type: Joi.string().allow("").allow(null),
@@ -3873,12 +4562,12 @@ class CartPlatformModel {
3873
4562
  });
3874
4563
  }
3875
4564
 
3876
- /** @returns {PlatformCartShipmentsResponse} */
3877
- static PlatformCartShipmentsResponse() {
4565
+ /** @returns {PlatformCartShipmentsResult} */
4566
+ static PlatformCartShipmentsResult() {
3878
4567
  return Joi.object({
3879
4568
  coupon_text: Joi.string().allow(""),
3880
4569
  id: Joi.string().allow(""),
3881
- pan_config: Joi.any(),
4570
+ pan_config: Joi.object().pattern(/\S/, Joi.any()),
3882
4571
  delivery_promise: CartPlatformModel.ShipmentPromise(),
3883
4572
  comment: Joi.string().allow(""),
3884
4573
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -3889,9 +4578,7 @@ class CartPlatformModel {
3889
4578
  breakup_values: CartPlatformModel.CartBreakup(),
3890
4579
  staff_user_id: Joi.string().allow("").allow(null),
3891
4580
  is_valid: Joi.boolean(),
3892
- shipments: Joi.array().items(
3893
- CartPlatformModel.PlatformShipmentResponse()
3894
- ),
4581
+ shipments: Joi.array().items(CartPlatformModel.PlatformShipmentDetails()),
3895
4582
  currency: CartPlatformModel.CartCurrency(),
3896
4583
  checkout_mode: Joi.string().allow(""),
3897
4584
  last_modified: Joi.string().allow(""),
@@ -3902,7 +4589,7 @@ class CartPlatformModel {
3902
4589
  ),
3903
4590
  error: Joi.boolean(),
3904
4591
  pan_no: Joi.string().allow(""),
3905
- custom_cart_meta: Joi.any(),
4592
+ custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3906
4593
  });
3907
4594
  }
3908
4595
 
@@ -3915,8 +4602,8 @@ class CartPlatformModel {
3915
4602
  });
3916
4603
  }
3917
4604
 
3918
- /** @returns {UpdateCartShipmentRequest} */
3919
- static UpdateCartShipmentRequest() {
4605
+ /** @returns {UpdateCartShipmentCreation} */
4606
+ static UpdateCartShipmentCreation() {
3920
4607
  return Joi.object({
3921
4608
  shipments: Joi.array()
3922
4609
  .items(CartPlatformModel.UpdateCartShipmentItem())
@@ -3924,29 +4611,29 @@ class CartPlatformModel {
3924
4611
  });
3925
4612
  }
3926
4613
 
3927
- /** @returns {PlatformCartMetaRequest} */
3928
- static PlatformCartMetaRequest() {
4614
+ /** @returns {PlatformCartMetaCreation} */
4615
+ static PlatformCartMetaCreation() {
3929
4616
  return Joi.object({
3930
4617
  gstin: Joi.string().allow(""),
3931
- pick_up_customer_details: Joi.any(),
4618
+ pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()),
3932
4619
  checkout_mode: Joi.string().allow(""),
3933
- gift_details: Joi.any().allow(null),
4620
+ gift_details: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3934
4621
  pan_no: Joi.string().allow(""),
3935
4622
  comment: Joi.string().allow(""),
3936
4623
  staff_user_id: Joi.string().allow("").allow(null),
3937
4624
  });
3938
4625
  }
3939
4626
 
3940
- /** @returns {CartMetaResponse} */
3941
- static CartMetaResponse() {
4627
+ /** @returns {CartMetaDetails} */
4628
+ static CartMetaDetails() {
3942
4629
  return Joi.object({
3943
4630
  is_valid: Joi.boolean(),
3944
4631
  message: Joi.string().allow(""),
3945
4632
  });
3946
4633
  }
3947
4634
 
3948
- /** @returns {CartMetaMissingResponse} */
3949
- static CartMetaMissingResponse() {
4635
+ /** @returns {CartMetaMissingDetails} */
4636
+ static CartMetaMissingDetails() {
3950
4637
  return Joi.object({
3951
4638
  errors: Joi.array().items(Joi.string().allow("")),
3952
4639
  });
@@ -3980,6 +4667,53 @@ class CartPlatformModel {
3980
4667
  });
3981
4668
  }
3982
4669
 
4670
+ /** @returns {CartCheckoutCustomMeta} */
4671
+ static CartCheckoutCustomMeta() {
4672
+ return Joi.object({
4673
+ key: Joi.string().allow("").required(),
4674
+ value: Joi.string().allow("").required(),
4675
+ });
4676
+ }
4677
+
4678
+ /** @returns {PlatformCartCheckoutDetailCreation} */
4679
+ static PlatformCartCheckoutDetailCreation() {
4680
+ return Joi.object({
4681
+ custom_meta: Joi.array().items(
4682
+ CartPlatformModel.CartCheckoutCustomMeta()
4683
+ ),
4684
+ address_id: Joi.string().allow(""),
4685
+ payment_identifier: Joi.string().allow("").allow(null),
4686
+ payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
4687
+ payment_auto_confirm: Joi.boolean(),
4688
+ id: Joi.string().allow("").required(),
4689
+ pos: Joi.boolean(),
4690
+ billing_address_id: Joi.string().allow(""),
4691
+ merchant_code: Joi.string().allow(""),
4692
+ aggregator: Joi.string().allow(""),
4693
+ pick_at_store_uid: Joi.number().allow(null),
4694
+ device_id: Joi.string().allow("").allow(null),
4695
+ delivery_address: Joi.object().pattern(/\S/, Joi.any()),
4696
+ payment_mode: Joi.string().allow("").required(),
4697
+ checkout_mode: Joi.string().allow(""),
4698
+ customer_details: CartPlatformModel.CustomerDetails(),
4699
+ meta: Joi.object().pattern(/\S/, Joi.any()),
4700
+ staff: CartPlatformModel.StaffCheckout(),
4701
+ employee_code: Joi.string().allow("").allow(null),
4702
+ billing_address: Joi.object().pattern(/\S/, Joi.any()),
4703
+ callback_url: Joi.string().allow("").allow(null),
4704
+ user_id: Joi.string().allow("").allow(null),
4705
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4706
+ order_type: Joi.string().allow("").required(),
4707
+ files: Joi.array().items(CartPlatformModel.Files()),
4708
+ ordering_store: Joi.number().allow(null),
4709
+ payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
4710
+ iin: Joi.string().allow(""),
4711
+ network: Joi.string().allow(""),
4712
+ type: Joi.string().allow(""),
4713
+ card_id: Joi.string().allow(""),
4714
+ });
4715
+ }
4716
+
3983
4717
  /** @returns {CheckCart} */
3984
4718
  static CheckCart() {
3985
4719
  return Joi.object({
@@ -4012,15 +4746,15 @@ class CartPlatformModel {
4012
4746
  gstin: Joi.string().allow(""),
4013
4747
  cod_available: Joi.boolean(),
4014
4748
  delivery_charges: Joi.number(),
4015
- custom_cart_meta: Joi.any(),
4749
+ custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
4016
4750
  });
4017
4751
  }
4018
4752
 
4019
- /** @returns {CartCheckoutResponse} */
4020
- static CartCheckoutResponse() {
4753
+ /** @returns {CartCheckoutDetails} */
4754
+ static CartCheckoutDetails() {
4021
4755
  return Joi.object({
4022
4756
  app_intercept_url: Joi.string().allow(""),
4023
- data: Joi.any(),
4757
+ data: Joi.object().pattern(/\S/, Joi.any()),
4024
4758
  cart: CartPlatformModel.CheckCart(),
4025
4759
  success: Joi.boolean(),
4026
4760
  callback_url: Joi.string().allow(""),
@@ -4030,8 +4764,22 @@ class CartPlatformModel {
4030
4764
  });
4031
4765
  }
4032
4766
 
4033
- /** @returns {CartDeliveryModesResponse} */
4034
- static CartDeliveryModesResponse() {
4767
+ /** @returns {CartCheckoutResult} */
4768
+ static CartCheckoutResult() {
4769
+ return Joi.object({
4770
+ app_intercept_url: Joi.string().allow(""),
4771
+ data: Joi.object().pattern(/\S/, Joi.any()),
4772
+ cart: CartPlatformModel.CheckCart(),
4773
+ success: Joi.boolean(),
4774
+ callback_url: Joi.string().allow(""),
4775
+ payment_confirm_url: Joi.string().allow(""),
4776
+ order_id: Joi.string().allow(""),
4777
+ message: Joi.string().allow(""),
4778
+ });
4779
+ }
4780
+
4781
+ /** @returns {CartDeliveryModesDetails} */
4782
+ static CartDeliveryModesDetails() {
4035
4783
  return Joi.object({
4036
4784
  pickup_stores: Joi.array().items(Joi.number()),
4037
4785
  available_modes: Joi.array().items(Joi.string().allow("")),
@@ -4061,15 +4809,15 @@ class CartPlatformModel {
4061
4809
  });
4062
4810
  }
4063
4811
 
4064
- /** @returns {StoreDetailsResponse} */
4065
- static StoreDetailsResponse() {
4812
+ /** @returns {StoreDetails} */
4813
+ static StoreDetails() {
4066
4814
  return Joi.object({
4067
4815
  items: Joi.array().items(CartPlatformModel.PickupStoreDetail()),
4068
4816
  });
4069
4817
  }
4070
4818
 
4071
- /** @returns {UpdateCartPaymentRequest} */
4072
- static UpdateCartPaymentRequest() {
4819
+ /** @returns {CartPaymentUpdate} */
4820
+ static CartPaymentUpdate() {
4073
4821
  return Joi.object({
4074
4822
  address_id: Joi.string().allow(""),
4075
4823
  payment_mode: Joi.string().allow(""),
@@ -4089,6 +4837,7 @@ class CartPlatformModel {
4089
4837
  display_message_en: Joi.string().allow("").allow(null),
4090
4838
  code: Joi.string().allow("").allow(null),
4091
4839
  discount: Joi.number(),
4840
+ error_en: Joi.string().allow("").allow(null),
4092
4841
  });
4093
4842
  }
4094
4843
 
@@ -4119,17 +4868,19 @@ class CartPlatformModel {
4119
4868
  payment_meta: CartPlatformModel.PaymentMeta().required(),
4120
4869
  amount: Joi.number().allow(null),
4121
4870
  name: Joi.string().allow(""),
4122
- payment_extra_identifiers: Joi.any(),
4871
+ payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
4123
4872
  });
4124
4873
  }
4125
4874
 
4126
- /** @returns {PlatformCartCheckoutDetailV2Request} */
4127
- static PlatformCartCheckoutDetailV2Request() {
4875
+ /** @returns {PlatformCartCheckoutDetailV2Creation} */
4876
+ static PlatformCartCheckoutDetailV2Creation() {
4128
4877
  return Joi.object({
4129
4878
  address_id: Joi.string().allow(""),
4130
4879
  payment_identifier: Joi.string().allow("").allow(null),
4131
- payment_params: Joi.any().allow(null),
4132
- custom_meta: Joi.any(),
4880
+ payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
4881
+ custom_meta: Joi.array().items(
4882
+ CartPlatformModel.CartCheckoutCustomMeta()
4883
+ ),
4133
4884
  payment_auto_confirm: Joi.boolean(),
4134
4885
  id: Joi.string().allow("").required(),
4135
4886
  pos: Joi.boolean(),
@@ -4138,20 +4889,20 @@ class CartPlatformModel {
4138
4889
  aggregator: Joi.string().allow(""),
4139
4890
  pick_at_store_uid: Joi.number().allow(null),
4140
4891
  device_id: Joi.string().allow("").allow(null),
4141
- delivery_address: Joi.any(),
4892
+ delivery_address: Joi.object().pattern(/\S/, Joi.any()),
4142
4893
  payment_mode: Joi.string().allow(""),
4143
4894
  checkout_mode: Joi.string().allow(""),
4144
- customer_details: Joi.any().allow(null),
4145
- meta: Joi.any(),
4895
+ customer_details: CartPlatformModel.CustomerDetails(),
4896
+ meta: Joi.object().pattern(/\S/, Joi.any()),
4146
4897
  payment_methods: Joi.array()
4147
4898
  .items(CartPlatformModel.PaymentMethod())
4148
4899
  .required(),
4149
4900
  staff: CartPlatformModel.StaffCheckout(),
4150
4901
  employee_code: Joi.string().allow("").allow(null),
4151
- billing_address: Joi.any(),
4902
+ billing_address: Joi.object().pattern(/\S/, Joi.any()),
4152
4903
  callback_url: Joi.string().allow("").allow(null),
4153
- user_id: Joi.string().allow("").allow(null).required(),
4154
- extra_meta: Joi.any(),
4904
+ user_id: Joi.string().allow("").required(),
4905
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4155
4906
  order_type: Joi.string().allow("").required(),
4156
4907
  files: Joi.array().items(CartPlatformModel.Files()),
4157
4908
  ordering_store: Joi.number().allow(null),
@@ -4192,14 +4943,25 @@ class CartPlatformModel {
4192
4943
  });
4193
4944
  }
4194
4945
 
4946
+ /** @returns {ArticlePriceDetails} */
4947
+ static ArticlePriceDetails() {
4948
+ return Joi.object({
4949
+ marked: Joi.number(),
4950
+ effective: Joi.number(),
4951
+ });
4952
+ }
4953
+
4195
4954
  /** @returns {FreeGiftItems} */
4196
4955
  static FreeGiftItems() {
4197
4956
  return Joi.object({
4198
4957
  item_slug: Joi.string().allow(""),
4199
4958
  item_name: Joi.string().allow(""),
4200
4959
  item_price_details: CartPlatformModel.ItemPriceDetails(),
4960
+ article_price: CartPlatformModel.ArticlePriceDetails(),
4201
4961
  item_brand_name: Joi.string().allow(""),
4202
4962
  item_id: Joi.number(),
4963
+ available_sizes: Joi.array().items(Joi.string().allow("")),
4964
+ size: Joi.string().allow(""),
4203
4965
  item_images_url: Joi.array().items(Joi.string().allow("")),
4204
4966
  });
4205
4967
  }
@@ -4208,7 +4970,7 @@ class CartPlatformModel {
4208
4970
  static PromotionOffer() {
4209
4971
  return Joi.object({
4210
4972
  id: Joi.string().allow(""),
4211
- buy_rules: Joi.any(),
4973
+ buy_rules: Joi.object().pattern(/\S/, Joi.any()),
4212
4974
  offer_text: Joi.string().allow(""),
4213
4975
  promotion_type: Joi.string().allow(""),
4214
4976
  promotion_name: Joi.string().allow(""),
@@ -4217,11 +4979,12 @@ class CartPlatformModel {
4217
4979
  discount_rules: Joi.array().items(Joi.any()),
4218
4980
  free_gift_items: Joi.array().items(CartPlatformModel.FreeGiftItems()),
4219
4981
  description: Joi.string().allow(""),
4982
+ is_bank_offer: Joi.boolean(),
4220
4983
  });
4221
4984
  }
4222
4985
 
4223
- /** @returns {PromotionOffersResponse} */
4224
- static PromotionOffersResponse() {
4986
+ /** @returns {PromotionOffersDetails} */
4987
+ static PromotionOffersDetails() {
4225
4988
  return Joi.object({
4226
4989
  available_promotions: Joi.array().items(
4227
4990
  CartPlatformModel.PromotionOffer()
@@ -4245,12 +5008,20 @@ class CartPlatformModel {
4245
5008
  });
4246
5009
  }
4247
5010
 
4248
- /** @returns {PromotionPaymentOffersResponse} */
4249
- static PromotionPaymentOffersResponse() {
5011
+ /** @returns {PromotionPaymentOffersDetails} */
5012
+ static PromotionPaymentOffersDetails() {
4250
5013
  return Joi.object({
4251
5014
  success: Joi.boolean(),
4252
5015
  promotions: Joi.array().items(CartPlatformModel.PromotionPaymentOffer()),
4253
5016
  });
4254
5017
  }
5018
+
5019
+ /** @returns {ValidationError} */
5020
+ static ValidationError() {
5021
+ return Joi.object({
5022
+ message: Joi.string().allow("").required(),
5023
+ field: Joi.string().allow("").required(),
5024
+ });
5025
+ }
4255
5026
  }
4256
5027
  module.exports = CartPlatformModel;