@gofynd/fdk-client-javascript 1.4.12 → 1.4.14

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 (297) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/sdk/application/ApplicationClient.d.ts +2 -0
  4. package/sdk/application/ApplicationClient.js +2 -0
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +60 -53
  6. package/sdk/application/Cart/CartApplicationClient.js +130 -53
  7. package/sdk/application/Cart/CartApplicationModel.d.ts +489 -143
  8. package/sdk/application/Cart/CartApplicationModel.js +380 -159
  9. package/sdk/application/Cart/CartApplicationValidator.d.ts +38 -19
  10. package/sdk/application/Cart/CartApplicationValidator.js +34 -18
  11. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +88 -68
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +114 -94
  13. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +194 -142
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +171 -133
  15. package/sdk/application/Common/CommonApplicationClient.d.ts +3 -2
  16. package/sdk/application/Common/CommonApplicationClient.js +6 -5
  17. package/sdk/application/Common/CommonApplicationModel.d.ts +9 -9
  18. package/sdk/application/Common/CommonApplicationModel.js +6 -6
  19. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +34 -27
  20. package/sdk/application/Configuration/ConfigurationApplicationClient.js +34 -27
  21. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +45 -57
  22. package/sdk/application/Configuration/ConfigurationApplicationModel.js +35 -47
  23. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +2 -2
  24. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +2 -2
  25. package/sdk/application/Content/ContentApplicationClient.d.ts +23 -33
  26. package/sdk/application/Content/ContentApplicationClient.js +54 -75
  27. package/sdk/application/Content/ContentApplicationModel.d.ts +96 -39
  28. package/sdk/application/Content/ContentApplicationModel.js +88 -34
  29. package/sdk/application/Content/ContentApplicationValidator.d.ts +23 -17
  30. package/sdk/application/Content/ContentApplicationValidator.js +15 -10
  31. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -8
  32. package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -13
  33. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +23 -25
  34. package/sdk/application/FileStorage/FileStorageApplicationModel.js +16 -18
  35. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +6 -6
  36. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +6 -6
  37. package/sdk/application/Finance/FinanceApplicationClient.d.ts +36 -0
  38. package/sdk/application/Finance/FinanceApplicationClient.js +202 -0
  39. package/sdk/application/Finance/FinanceApplicationModel.d.ts +289 -0
  40. package/sdk/application/Finance/FinanceApplicationModel.js +208 -0
  41. package/sdk/application/Finance/FinanceApplicationValidator.d.ts +25 -0
  42. package/sdk/application/Finance/FinanceApplicationValidator.js +31 -0
  43. package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -3
  44. package/sdk/application/Lead/LeadApplicationClient.js +2 -3
  45. package/sdk/application/Lead/LeadApplicationModel.d.ts +11 -11
  46. package/sdk/application/Lead/LeadApplicationModel.js +19 -19
  47. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +39 -16
  48. package/sdk/application/Logistic/LogisticApplicationClient.js +189 -21
  49. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +532 -173
  50. package/sdk/application/Logistic/LogisticApplicationModel.js +409 -139
  51. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +54 -9
  52. package/sdk/application/Logistic/LogisticApplicationValidator.js +42 -8
  53. package/sdk/application/Order/OrderApplicationClient.d.ts +24 -10
  54. package/sdk/application/Order/OrderApplicationClient.js +96 -13
  55. package/sdk/application/Order/OrderApplicationModel.d.ts +434 -102
  56. package/sdk/application/Order/OrderApplicationModel.js +278 -73
  57. package/sdk/application/Order/OrderApplicationValidator.d.ts +17 -3
  58. package/sdk/application/Order/OrderApplicationValidator.js +15 -2
  59. package/sdk/application/Payment/PaymentApplicationClient.d.ts +96 -99
  60. package/sdk/application/Payment/PaymentApplicationClient.js +111 -114
  61. package/sdk/application/Payment/PaymentApplicationModel.d.ts +293 -289
  62. package/sdk/application/Payment/PaymentApplicationModel.js +243 -241
  63. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +46 -46
  64. package/sdk/application/Payment/PaymentApplicationValidator.js +46 -46
  65. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -16
  66. package/sdk/application/Rewards/RewardsApplicationClient.js +19 -22
  67. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +37 -37
  68. package/sdk/application/Rewards/RewardsApplicationModel.js +29 -29
  69. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +6 -6
  70. package/sdk/application/Rewards/RewardsApplicationValidator.js +6 -6
  71. package/sdk/application/Share/ShareApplicationModel.js +1 -1
  72. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  73. package/sdk/application/Theme/ThemeApplicationClient.js +8 -6
  74. package/sdk/application/Theme/ThemeApplicationModel.d.ts +51 -19
  75. package/sdk/application/Theme/ThemeApplicationModel.js +47 -24
  76. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +16 -3
  77. package/sdk/application/Theme/ThemeApplicationValidator.js +9 -2
  78. package/sdk/application/User/UserApplicationClient.d.ts +10 -10
  79. package/sdk/application/User/UserApplicationClient.js +10 -10
  80. package/sdk/application/User/UserApplicationModel.d.ts +17 -17
  81. package/sdk/application/User/UserApplicationModel.js +16 -16
  82. package/sdk/application/User/UserApplicationValidator.d.ts +2 -2
  83. package/sdk/application/User/UserApplicationValidator.js +2 -2
  84. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  85. package/sdk/application/Webhook/WebhookApplicationClient.js +4 -4
  86. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +11 -9
  87. package/sdk/application/Webhook/WebhookApplicationModel.js +8 -6
  88. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +2 -2
  89. package/sdk/application/Webhook/WebhookApplicationValidator.js +2 -2
  90. package/sdk/application/index.d.ts +1 -0
  91. package/sdk/application/index.js +2 -0
  92. package/sdk/common/Clickstream.js +12 -0
  93. package/sdk/common/Constant.d.ts +5 -0
  94. package/sdk/common/Constant.js +5 -0
  95. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
  96. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
  97. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
  98. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
  99. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
  100. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
  101. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  102. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  103. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  104. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  105. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +126 -20
  106. package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
  107. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +767 -85
  108. package/sdk/partner/Logistics/LogisticsPartnerModel.js +429 -76
  109. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
  110. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +120 -6
  111. package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
  112. package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
  113. package/sdk/partner/Theme/ThemePartnerModel.d.ts +99 -39
  114. package/sdk/partner/Theme/ThemePartnerModel.js +95 -38
  115. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  116. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
  117. package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
  118. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
  119. package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
  120. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
  121. package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
  122. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
  123. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
  124. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
  125. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
  126. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
  127. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
  128. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
  129. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
  130. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  131. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  132. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  133. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  134. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  135. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  136. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  137. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  138. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
  139. package/sdk/platform/Cart/CartPlatformApplicationClient.js +407 -112
  140. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
  141. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
  142. package/sdk/platform/Cart/CartPlatformModel.d.ts +4978 -1303
  143. package/sdk/platform/Cart/CartPlatformModel.js +1922 -1217
  144. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +192 -164
  145. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +371 -343
  146. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +99 -99
  147. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +54 -54
  148. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +139 -116
  149. package/sdk/platform/Catalog/CatalogPlatformClient.js +191 -168
  150. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1374 -749
  151. package/sdk/platform/Catalog/CatalogPlatformModel.js +1241 -830
  152. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
  153. package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
  154. package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
  155. package/sdk/platform/Common/CommonPlatformClient.js +3 -2
  156. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  157. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  158. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
  159. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
  160. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  161. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  162. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
  163. package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
  168. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  169. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
  172. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  173. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  174. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
  175. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
  176. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
  177. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
  178. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  179. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  180. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +124 -141
  181. package/sdk/platform/Content/ContentPlatformApplicationClient.js +449 -422
  182. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +179 -141
  183. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +168 -130
  184. package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
  185. package/sdk/platform/Content/ContentPlatformClient.js +523 -336
  186. package/sdk/platform/Content/ContentPlatformModel.d.ts +1244 -397
  187. package/sdk/platform/Content/ContentPlatformModel.js +526 -392
  188. package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
  189. package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
  190. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
  191. package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
  192. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  193. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  194. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  195. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  196. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +94 -36
  197. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
  198. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
  199. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
  200. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
  201. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
  202. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
  203. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
  204. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  205. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  206. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  207. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  208. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  209. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  210. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +15 -4
  211. package/sdk/platform/Order/OrderPlatformApplicationClient.js +83 -5
  212. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +25 -4
  213. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  214. package/sdk/platform/Order/OrderPlatformClient.d.ts +138 -101
  215. package/sdk/platform/Order/OrderPlatformClient.js +267 -203
  216. package/sdk/platform/Order/OrderPlatformModel.d.ts +4497 -877
  217. package/sdk/platform/Order/OrderPlatformModel.js +2336 -812
  218. package/sdk/platform/Order/OrderPlatformValidator.d.ts +147 -50
  219. package/sdk/platform/Order/OrderPlatformValidator.js +75 -46
  220. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
  221. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
  222. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  223. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  224. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
  225. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
  226. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  227. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  228. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  229. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  230. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +327 -313
  231. package/sdk/platform/Payment/PaymentPlatformModel.js +283 -273
  232. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  233. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  234. package/sdk/platform/PlatformClient.d.ts +0 -2
  235. package/sdk/platform/PlatformClient.js +0 -4
  236. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  237. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  238. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  239. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  240. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  241. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  242. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +45 -35
  243. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +117 -38
  244. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +22 -13
  245. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +24 -12
  246. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
  247. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
  248. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +602 -341
  249. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +483 -284
  250. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +8 -8
  251. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +8 -8
  252. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
  253. package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
  254. package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
  255. package/sdk/platform/Share/SharePlatformModel.js +27 -4
  256. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  257. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
  258. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
  259. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
  260. package/sdk/platform/Theme/ThemePlatformModel.d.ts +40 -13
  261. package/sdk/platform/Theme/ThemePlatformModel.js +38 -17
  262. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  263. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  264. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  265. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  266. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  267. package/sdk/platform/User/UserPlatformModel.js +23 -23
  268. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
  269. package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
  270. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
  271. package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
  272. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  273. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  274. package/sdk/platform/index.d.ts +0 -1
  275. package/sdk/platform/index.js +0 -2
  276. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
  277. package/sdk/public/Configuration/ConfigurationPublicClient.js +6 -5
  278. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  279. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  280. package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
  281. package/sdk/public/Content/ContentPublicClient.js +791 -5
  282. package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
  283. package/sdk/public/Content/ContentPublicModel.js +649 -3
  284. package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
  285. package/sdk/public/Content/ContentPublicValidator.js +88 -2
  286. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  287. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  288. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  289. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  290. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  291. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  292. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  293. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  294. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  295. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  296. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  297. 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
537
+ * @property {Restrictions1} [restrictions]
538
+ * @property {string} [currency] - Promotion Currency code like INR
539
+ * @property {string} [code] - Promotion unique code
540
+ * @property {PromotionSchedule} [_schedule]
541
+ * @property {PromotionAction} [post_order_action]
542
+ * @property {number} [apply_priority] - Promotion applicable priority
543
+ * @property {PromotionAuthor} [author]
544
+ * @property {Visibility} [visiblility]
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
548
+ * @property {PromotionDateMeta} [date_meta]
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
453
570
  * @property {Restrictions1} [restrictions]
454
- * @property {string} [currency]
455
- * @property {string} [code]
571
+ * @property {string} [currency] - Promotion Currency code like INR
572
+ * @property {string} [code] - Promotion unique code
456
573
  * @property {PromotionSchedule} [_schedule]
457
574
  * @property {PromotionAction} [post_order_action]
458
- * @property {number} [apply_priority]
575
+ * @property {number} [apply_priority] - Promotion applicable priority
459
576
  * @property {PromotionAuthor} [author]
460
577
  * @property {Visibility} [visiblility]
461
- * @property {string} application_id
462
- * @property {Object} buy_rules
463
- * @property {Object} [_custom_json]
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
464
581
  * @property {PromotionDateMeta} [date_meta]
465
- * @property {string[]} [tags]
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,51 @@ 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 {Object} [meta] - Additional information regarding price adjustment
758
+ * @property {string} cart_id - Unique identifier of the cart
598
759
  */
599
760
 
600
761
  /**
601
762
  * @typedef PriceAdjustment
602
- * @property {number} value
763
+ * @property {number} value - The amount applied on the cart
603
764
  * @property {string} message - The message associated with the price adjustment
604
765
  * @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
766
+ * @property {PriceAdjustmentRestrictions} [restrictions] - This field specifies
767
+ * the restrictions for this item or service, such as whether cancellation and
768
+ * return are permitted, except for `charge` type.
608
769
  * @property {boolean} article_level_distribution - Flag indicating whether the
609
770
  * distribution should is done at the article level
610
- * @property {string} [id]
771
+ * @property {string} [id] - Unique identifier of Price adjustment
611
772
  * @property {Collection} collection
612
- * @property {string} type - Type of price adjusment
773
+ * @property {string} type - Type of price adjusment like charge, discount, mop etc.
613
774
  * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
614
- * allowed (default: False)
775
+ * allowed (default: False) expect for `charge` type
615
776
  * @property {boolean} is_authenticated - Flag indicating whether the user is
616
777
  * authenticated
617
778
  * @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
779
+ * @property {Object} [meta] - Additional information regarding price adjustment
780
+ * @property {string} cart_id - Unique identifier of the cart
620
781
  */
621
782
 
622
783
  /**
623
- * @typedef PriceAdjustmentResponse
784
+ * @typedef PriceAdjustmentResult
624
785
  * @property {PriceAdjustment} [data]
625
786
  */
626
787
 
627
788
  /**
628
- * @typedef GetPriceAdjustmentResponse
789
+ * @typedef GetPriceAdjustmentResult
629
790
  * @property {PriceAdjustment[]} [data]
630
791
  */
631
792
 
632
793
  /**
633
794
  * @typedef PriceAdjustmentAdd
634
- * @property {number} value
795
+ * @property {number} value - The amount applied on the cart
635
796
  * @property {string} message - The message associated with the price adjustment
636
797
  * @property {string} [apply_expiry] - The date and time when the expiry should be applied
637
798
  * @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
@@ -647,98 +808,110 @@ const Joi = require("joi");
647
808
  * @property {boolean} is_authenticated - Flag indicating whether the user is
648
809
  * authenticated
649
810
  * @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
811
+ * @property {Object} [meta] - Additional information regarding price adjustment
812
+ * @property {string} cart_id - Unique identifier of the cart
652
813
  */
653
814
 
654
815
  /**
655
816
  * @typedef CartItem
656
- * @property {number} [quantity]
657
- * @property {string} product_id
658
- * @property {string} size
817
+ * @property {number} [quantity] - Quantity of product in cart
818
+ * @property {string} product_id - Unique identifier of product in cart
819
+ * @property {string} size - Size of product in cart
659
820
  */
660
821
 
661
822
  /**
662
- * @typedef OpenapiCartDetailsRequest
663
- * @property {CartItem[]} cart_items
823
+ * @typedef OpenapiCartDetailsCreation
824
+ * @property {CartItem[]} cart_items - List of products in cart
664
825
  */
665
826
 
666
827
  /**
667
828
  * @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]
829
+ * @property {string} [title] - Coupon Title of the coupon applied denotes name
830
+ * of the coupon
831
+ * @property {number} [max_discount_value] - Maximum discount value of the
832
+ * coupon applied to cart
833
+ * @property {number} [value] - Coupon value of the coupon applied to cart
834
+ * @property {boolean} [is_applied] - Applied flag which denotes if any coupon
835
+ * is applied to cart
836
+ * @property {string} [uid] - Unique identifier of the coupon applied to cart
837
+ * @property {string} [coupon_type] - Type of the coupon applied to cart
838
+ * @property {string} [sub_title] - Coupon subtitle of the coupon applied to
839
+ * cart which is used to display
840
+ * @property {number} [coupon_value] - Value of the coupon applied to cart
841
+ * @property {string} [code] - Coupon code of the coupon applied
842
+ * @property {string} [type] - Type of the coupon applied to cart
843
+ * @property {number} [minimum_cart_value] - Minimum cart value of the coupon
844
+ * applied to cart
845
+ * @property {string} [message] - Coupon message of the coupon applied to cart
846
+ * @property {string} [description] - Coupon description of the coupon applied to cart.
681
847
  */
682
848
 
683
849
  /**
684
850
  * @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]
851
+ * @property {string} [key] - Key of the price like total_mrp, total, subtotal etc
852
+ * @property {number} [value] - Numeric value for the price
853
+ * @property {string} [currency_code] - Currency code for the price
854
+ * @property {string} [currency_symbol] - Currency symbol for the price
855
+ * @property {string} [display] - Display key field that to be shown against the value
856
+ * @property {string[]} [message] - List of message at price level to be displayed
691
857
  */
692
858
 
693
859
  /**
694
860
  * @typedef LoyaltyPoints
695
- * @property {boolean} [is_applied]
696
- * @property {number} [total]
697
- * @property {number} [applicable]
698
- * @property {string} [description]
861
+ * @property {boolean} [is_applied] - Whether the loyalty points are applied on the cart
862
+ * @property {number} [total] - Total loyalty points available with user
863
+ * @property {number} [applicable] - Whether the loyalty points are applicable
864
+ * for the cart
865
+ * @property {string} [description] - Description for loyalty points
699
866
  */
700
867
 
701
868
  /**
702
869
  * @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]
870
+ * @property {number} [coupon] - Coupon amount applied to cart
871
+ * @property {number} [gst_charges] - GST charges applied on cart
872
+ * @property {number} [mrp_total] - Maximum price total amount of all products in cart
873
+ * @property {number} [fynd_cash] - Loyalty points applied on cart
874
+ * @property {number} [vog] - Total value of goods after all discount, coupons
875
+ * and promotion applied of all products in cart
876
+ * @property {number} [gift_card] - Gift cart amount applied on cart
877
+ * @property {number} [cod_charge] - Cod charge value applied to cart. This is
878
+ * applied when user select payment mode as COD
879
+ * @property {number} [total] - Total payable amount by the customer
880
+ * @property {number} [discount] - Discount amount recieved on cart
881
+ * @property {number} [delivery_charge] - Delivery charge applied to cart
882
+ * @property {number} [you_saved] - Total amount will be saved if customer
883
+ * places the order
884
+ * @property {number} [subtotal] - Selling price amount of all products in cart
885
+ * @property {number} [convenience_fee] - Convenience fee amount applied to cart
716
886
  */
717
887
 
718
888
  /**
719
889
  * @typedef CartBreakup
720
890
  * @property {CouponBreakup} [coupon]
721
- * @property {DisplayBreakup[]} [display]
891
+ * @property {DisplayBreakup[]} [display] - List of breakup data which is used
892
+ * to display the breakup to the customer like MRP total, Discount, Sub total,
893
+ * coupon value, promotion value and final total
722
894
  * @property {LoyaltyPoints} [loyalty_points]
723
895
  * @property {RawBreakup} [raw]
724
896
  */
725
897
 
726
898
  /**
727
899
  * @typedef ProductImage
728
- * @property {string} [secure_url]
729
- * @property {string} [url]
730
- * @property {string} [aspect_ratio]
900
+ * @property {string} [secure_url] - Secured url of the product image
901
+ * @property {string} [url] - Bucket link url for product image
902
+ * @property {string} [aspect_ratio] - Aspect ratio of the product image
731
903
  */
732
904
 
733
905
  /**
734
906
  * @typedef Tags
735
- * @property {Object} [tags]
907
+ * @property {Object} [tags] - Tags is a lable or batch that is attached to a
908
+ * product in cart
736
909
  */
737
910
 
738
911
  /**
739
912
  * @typedef BaseInfo
740
- * @property {number} [uid]
741
- * @property {string} [name]
913
+ * @property {number} [uid] - Unique identifier of entities like brand or seller
914
+ * @property {string} [name] - Name of entities like brand or seller
742
915
  */
743
916
 
744
917
  /**
@@ -746,43 +919,62 @@ const Joi = require("joi");
746
919
  * @property {string[]} [product_slug] - Contains list of product slug
747
920
  */
748
921
 
922
+ /**
923
+ * @typedef ProductActionParams
924
+ * @property {string[]} [slug] - Unique product url name generated via product
925
+ * name and other meta data.
926
+ */
927
+
928
+ /**
929
+ * @typedef ProductActionPage
930
+ * @property {string} [type] - Entity of page to be redirected on click
931
+ * @property {ProductActionParams} [params]
932
+ */
933
+
749
934
  /**
750
935
  * @typedef ProductAction
751
- * @property {string} [type]
752
- * @property {string} [url]
936
+ * @property {string} [type] - Type of action
937
+ * @property {string} [url] - Url of the product to render the product
753
938
  * @property {ActionQuery} [query]
939
+ * @property {ProductActionPage} [page]
754
940
  */
755
941
 
756
942
  /**
757
943
  * @typedef CategoryInfo
758
- * @property {number} [uid] - Product Category Id
759
- * @property {string} [name]
944
+ * @property {number} [uid] - Unique identifier of Product Category
945
+ * @property {string} [name] - Category name of the product
760
946
  */
761
947
 
762
948
  /**
763
949
  * @typedef CartProduct
764
950
  * @property {string} [slug] - Unique product url name generated via product
765
951
  * name and other meta data
766
- * @property {ProductImage[]} [images]
952
+ * @property {ProductImage[]} [images] - Product Images urls of different types
953
+ * like secure url, aspect ration url and url
767
954
  * @property {Tags} [teaser_tag]
768
955
  * @property {BaseInfo} [brand]
769
956
  * @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]
957
+ * @property {number} [uid] - Unique identifier of the product in cart
958
+ * @property {string[]} [tags] - Products tags that are added to each product to
959
+ * identify the set of products
960
+ * @property {Object} [_custom_json] - Field to add custom json of the product in cart
961
+ * @property {string} [type] - Type of product in cart
962
+ * @property {string} [name] - Product name of the product in cart which is
963
+ * defined on platform
964
+ * @property {string} [item_code] - Product code of the product while defining
965
+ * product on platform
966
+ * @property {CategoryInfo[]} [categories] - Product category information which
967
+ * incldes category name and category id
968
+ * @property {Object} [attributes] - Product attributes defined on platform
778
969
  */
779
970
 
780
971
  /**
781
972
  * @typedef BasePrice
782
- * @property {number} [effective]
783
- * @property {string} [currency_code]
784
- * @property {string} [currency_symbol]
785
- * @property {number} [marked]
973
+ * @property {number} [effective] - Current per unit price of product after
974
+ * existing deductions
975
+ * @property {string} [currency_code] - Currency code for all amounts
976
+ * @property {string} [currency_symbol] - Currency symbol of the currncy used for price
977
+ * @property {number} [marked] - Original price of product
786
978
  */
787
979
 
788
980
  /**
@@ -793,43 +985,54 @@ const Joi = require("joi");
793
985
 
794
986
  /**
795
987
  * @typedef StoreInfo
796
- * @property {number} [uid]
797
- * @property {string} [name]
798
- * @property {string} [store_code]
988
+ * @property {number} [uid] - Unique identifiers of the store from where product
989
+ * is fulfileld
990
+ * @property {string} [name] - Store name of the store from where the product is fulfiled
991
+ * @property {string} [store_code] - A unique code or identifier for the store,
992
+ * often used for internal reference
799
993
  */
800
994
 
801
995
  /**
802
996
  * @typedef ProductArticle
803
- * @property {string} [seller_identifier]
804
- * @property {number} [quantity]
997
+ * @property {string} [seller_identifier] - List of identifiers used by sellers
998
+ * for the product size.
999
+ * @property {number} [quantity] - Quantity of the article added in cart
805
1000
  * @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]
1001
+ * @property {Object} [cart_item_meta] - Meta details of the article added from cart
1002
+ * @property {Object} [parent_item_identifiers] - Fields to determine parent
1003
+ * product of the product
1004
+ * @property {boolean} [is_gift_visible] - Whether the product can be purchased
1005
+ * as a gift. It is true if the product is available for gifting and false otherwise.
1006
+ * @property {string} [uid] - This unique identifier is assigned to the specific
1007
+ * article. This represents item x size x location.
1008
+ * @property {Object} [gift_card] - Gift card detail if gift card applied to the
1009
+ * product which indicates gift price, gift applicable flag and display
1010
+ * message for the gift
1011
+ * @property {string[]} [product_group_tags] - List fot the unique identifier
1012
+ * for the product grouping.
1013
+ * @property {Object} [identifier] - Unique identifier of the article
1014
+ * @property {number} [mto_quantity] - Quantity of the product which will
1015
+ * specially manufactured as not available in stock
1016
+ * @property {Object} [extra_meta] - Field to update extra meta of the article in cart
1017
+ * @property {string} [type] - Type of the data sent in response. Possible value
1018
+ * is article
1019
+ * @property {Object} [_custom_json] - Field to update custom json of the article in cart
817
1020
  * @property {ArticlePriceInfo} [price]
818
- * @property {Object} [meta]
819
- * @property {string} [size]
1021
+ * @property {Object} [meta] - Meta data of article in cart
1022
+ * @property {string} [size] - Size of the article added in cart
820
1023
  * @property {StoreInfo} [store]
821
1024
  * @property {string[]} [tags] - A list of article tags
822
1025
  */
823
1026
 
824
1027
  /**
825
1028
  * @typedef Ownership2
826
- * @property {string} [payable_category] - Promo amount payable category
827
- * @property {string} [payable_by] - Promo amount bearable party
1029
+ * @property {string} [payable_category] - Promotion amount payable category
1030
+ * @property {string} [payable_by] - Promotion amount bearable party
828
1031
  */
829
1032
 
830
1033
  /**
831
1034
  * @typedef DiscountRulesApp
832
- * @property {Object} [offer] - Offer for promotion
1035
+ * @property {Object} [offer] - Offer detail for promotion
833
1036
  * @property {Object} [raw_offer] - Raw offer details for promotion
834
1037
  * @property {Object} [item_criteria] - Item criteria of promotion
835
1038
  * @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
@@ -838,9 +1041,10 @@ const Joi = require("joi");
838
1041
  /**
839
1042
  * @typedef AppliedFreeArticles
840
1043
  * @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
1044
+ * @property {number} [quantity] - Free article quantity in promotion
1045
+ * @property {string} [article_id] - Unique identifier of free article
843
1046
  * @property {FreeGiftItems} [free_gift_item_details] - Free gift items details
1047
+ * in promotion
844
1048
  */
845
1049
 
846
1050
  /**
@@ -866,15 +1070,15 @@ const Joi = require("joi");
866
1070
  * @property {boolean} [mrp_promotion] - If applied promotion is applied on
867
1071
  * product MRP or ESP
868
1072
  * @property {string} [promotion_group] - Promotion group for the promotion
869
- * @property {string} [promo_id] - Promotion id
1073
+ * @property {string} [promo_id] - Promotion unique identifier
870
1074
  * @property {Object} [meta] - Meta object for extra data
871
- * @property {string} [code] - Promotion code
1075
+ * @property {string} [code] - Promotion unique code
872
1076
  */
873
1077
 
874
1078
  /**
875
1079
  * @typedef PromiseFormatted
876
- * @property {string} [max]
877
- * @property {string} [min]
1080
+ * @property {string} [max] - Maximum Delivery promise formatted timestamp
1081
+ * @property {string} [min] - Minimum Delivery promise formatted timestamp
878
1082
  */
879
1083
 
880
1084
  /**
@@ -885,8 +1089,8 @@ const Joi = require("joi");
885
1089
 
886
1090
  /**
887
1091
  * @typedef PromiseTimestamp
888
- * @property {number} [max]
889
- * @property {number} [min]
1092
+ * @property {number} [max] - Maximum Promise for the shipment
1093
+ * @property {number} [min] - Minimum delivery promise time for the shipment
890
1094
  */
891
1095
 
892
1096
  /**
@@ -898,19 +1102,23 @@ const Joi = require("joi");
898
1102
 
899
1103
  /**
900
1104
  * @typedef CouponDetails
901
- * @property {number} [discount_total_quantity]
902
- * @property {number} [discount_single_quantity]
903
- * @property {string} [code]
1105
+ * @property {number} [discount_total_quantity] - Total discount earned from
1106
+ * coupon applied to cart
1107
+ * @property {number} [discount_single_quantity] - Discout amount applied from
1108
+ * coupon for single quantity of the product
1109
+ * @property {string} [code] - Coupon code of the coupon applied
904
1110
  */
905
1111
 
906
1112
  /**
907
1113
  * @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]
1114
+ * @property {number} [marked] - Maximum price of the product
1115
+ * @property {number} [add_on] - Price before promotion and coupon amount
1116
+ * applied for calculation
1117
+ * @property {string} [currency_code] - Currency code of the price defined for the product
1118
+ * @property {string} [currency_symbol] - Currency symbol of the price defined
1119
+ * for the product
1120
+ * @property {number} [effective] - Selling price of the product
1121
+ * @property {number} [selling] - Selling price of the product
914
1122
  */
915
1123
 
916
1124
  /**
@@ -926,226 +1134,259 @@ const Joi = require("joi");
926
1134
 
927
1135
  /**
928
1136
  * @typedef ProductAvailabilitySize
929
- * @property {string} [display]
930
- * @property {string} [value]
931
- * @property {boolean} [is_available]
1137
+ * @property {string} [display] - Display size of the product
1138
+ * @property {string} [value] - Actual value of the size
1139
+ * @property {boolean} [is_available] - Available flag for the size of the
1140
+ * product if that is available
932
1141
  */
933
1142
 
934
1143
  /**
935
1144
  * @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]
1145
+ * @property {boolean} [is_valid] - Valid flag for the product if the product
1146
+ * added in cart is valid to place the order
1147
+ * @property {number} [other_store_quantity] - Quantity of the product available
1148
+ * on other store
1149
+ * @property {boolean} [deliverable] - Deliverable flag denotes if the product
1150
+ * is deliverable or not
1151
+ * @property {ProductAvailabilitySize[]} [available_sizes] - Product sizes availability
1152
+ * @property {boolean} [out_of_stock] - Denotes if the product is available in stock
1153
+ * @property {string[]} [sizes] - All sizes of the product
942
1154
  */
943
1155
 
944
1156
  /**
945
1157
  * @typedef PromoMeta
946
- * @property {string} [message]
1158
+ * @property {string} [message] - Loyalty points message denotes how much
1159
+ * loyalty points and applied and how much left with the user
947
1160
  */
948
1161
 
949
1162
  /**
950
1163
  * @typedef CartProductInfo
951
- * @property {number} [quantity]
1164
+ * @property {number} [quantity] - Quantity of the product added in cart
952
1165
  * @property {CartProduct} [product]
953
- * @property {string} [product_ean_id]
954
- * @property {Object} [parent_item_identifiers]
955
- * @property {boolean} [is_set]
1166
+ * @property {string} [product_ean_id] - European Article Number of the product
1167
+ * (limited upto 50 EAN identifier in a single request)
1168
+ * @property {Object} [parent_item_identifiers] - Parent item information of the
1169
+ * product which identifies the parent of the product in cart
1170
+ * @property {boolean} [is_set] - Whether or not the product is a set of items
956
1171
  * @property {ProductArticle} [article]
957
- * @property {AppliedPromotion[]} [promotions_applied]
1172
+ * @property {AppliedPromotion[]} [promotions_applied] - List of applicable
1173
+ * promotion for the product in cart
958
1174
  * @property {ShipmentPromise} [delivery_promise]
959
- * @property {string} [key]
1175
+ * @property {string} [key] - The attribute key associated with the size
960
1176
  * @property {CouponDetails} [coupon]
961
- * @property {Object} [bulk_offer]
1177
+ * @property {Object} [bulk_offer] - Bulk offer information for the product
1178
+ * which denotes if any bulk offer is applied to the product in cart
962
1179
  * @property {ProductPriceInfo} [price]
963
- * @property {string} [coupon_message]
1180
+ * @property {string} [coupon_message] - Message for the coupon denotes which
1181
+ * coupon is applied and empty if not applied
964
1182
  * @property {CartProductIdentifer} identifiers
965
- * @property {string} [message]
966
- * @property {string} [discount]
1183
+ * @property {string} [message] - Product level message which denotes error
1184
+ * information to display over the product in cart
1185
+ * @property {string} [discount] - Discount amount of the product in cart
967
1186
  * @property {ProductAvailability} [availability]
968
- * @property {Object} [moq]
1187
+ * @property {Object} [moq] - An Integer indication the Minimum Order Quantity
1188
+ * of a product, e.g. 100.
969
1189
  * @property {ProductPriceInfo} [price_per_unit]
970
1190
  * @property {PromoMeta} [promo_meta]
971
- * @property {Object} [custom_order]
1191
+ * @property {Object} [custom_order] - Whether MTO (Make to Order) is enabled or not.
972
1192
  */
973
1193
 
974
1194
  /**
975
- * @typedef OpenapiCartDetailsResponse
976
- * @property {boolean} [is_valid]
977
- * @property {string} [message]
1195
+ * @typedef OpenapiCartDetailsResult
1196
+ * @property {boolean} [is_valid] - Cart validity flag determines the if the
1197
+ * response is valid or not
1198
+ * @property {string} [message] - Message of the cart Open API cart detail response
978
1199
  * @property {CartBreakup} [breakup_values]
979
- * @property {CartProductInfo[]} [items]
1200
+ * @property {CartProductInfo[]} [items] - Items details in cart
980
1201
  */
981
1202
 
982
1203
  /**
983
- * @typedef OpenApiErrorResponse
984
- * @property {boolean} [success]
985
- * @property {string} [message]
1204
+ * @typedef OpenApiErrorResult
1205
+ * @property {boolean} [success] - Success flag for cart detail open api response
1206
+ * @property {string} [message] - Error message of the Open API cart detail response
986
1207
  * @property {Object} [errors] - Contains field name which has error as key and
987
1208
  * error message as value
988
1209
  */
989
1210
 
990
1211
  /**
991
1212
  * @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
1213
+ * @property {string} [country] - Country of address
1214
+ * @property {string} [state] - State of the address
1215
+ * @property {string} [city] - City of the address
1216
+ * @property {number} [phone] - Phone number for address
1217
+ * @property {string} area_code - Area code of the address
1218
+ * @property {string} [country_iso_code] - Country iso code for address
1219
+ * @property {string} [country_phone_code] - Country phone code for address
1220
+ * @property {Object} [meta] - Metadata of the address
1221
+ * @property {string} [address_type] - Address type of address
1222
+ * @property {string} [area] - Area description for address
1223
+ * @property {string} [area_code_slug] - Area code slug for address. example
1224
+ * pincode is slug for India
1225
+ * @property {string} [name] - Name of person in address data to whom it belongs to
1226
+ * @property {string} [landmark] - Landmark of address
1227
+ * @property {string} [email] - Email address for address data
1228
+ * @property {string} [country_code] - Country code of address
1229
+ * @property {number} [pincode] - Pincode for address data
1230
+ * @property {string} [address] - Address description for address data
1231
+ */
1232
+
1233
+ /**
1234
+ * @typedef OpenApiCartServiceabilityCreation
1235
+ * @property {CartItem[]} cart_items - List of items in open api cart response
1014
1236
  * @property {ShippingAddress} shipping_address
1015
1237
  */
1016
1238
 
1017
1239
  /**
1018
- * @typedef OpenApiCartServiceabilityResponse
1019
- * @property {boolean} [is_valid]
1020
- * @property {CartProductInfo[]} [items]
1240
+ * @typedef OpenApiCartServiceabilityResult
1241
+ * @property {boolean} [is_valid] - Cart validity flag determines the if the
1242
+ * response is valid or not
1243
+ * @property {CartProductInfo[]} [items] - Items data list in user cart that
1244
+ * includes item id, item size, store id, available sizes and rest of the item
1245
+ * related data
1021
1246
  * @property {ShipmentPromise} [delivery_promise]
1022
- * @property {string} [message]
1247
+ * @property {string} [message] - Message of the cart detail API response
1023
1248
  * @property {CartBreakup} [breakup_values]
1024
1249
  */
1025
1250
 
1026
1251
  /**
1027
1252
  * @typedef OpenApiFiles
1028
- * @property {string} key
1029
- * @property {string[]} values
1253
+ * @property {string} key - Key represents name of file
1254
+ * @property {string[]} values - List of urls path
1030
1255
  */
1031
1256
 
1032
1257
  /**
1033
1258
  * @typedef CartItemMeta
1034
- * @property {boolean} [primary_item]
1035
- * @property {string} [group_id]
1259
+ * @property {boolean} [primary_item] - Flags indicates item is primary or not
1260
+ * @property {string} [group_id] - Fields to determine group id of the product
1036
1261
  */
1037
1262
 
1038
1263
  /**
1039
1264
  * @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]
1265
+ * @property {string} [payment_id] - Payment gateway identifier
1266
+ * @property {string} [payment_gateway] - Payment gateway used to do the payment
1267
+ * @property {Object} [extra_meta] - Payment extra meta for the payment mode to
1268
+ * do the payment
1269
+ * @property {string} [current_status] - Current status of the payment
1270
+ * @property {string} [order_id] - Payment gateway order id
1045
1271
  */
1046
1272
 
1047
1273
  /**
1048
1274
  * @typedef MultiTenderPaymentMethod
1049
- * @property {string} mode
1050
- * @property {number} amount - Payment amount
1275
+ * @property {string} mode - Payment mode of payment method used to make payment
1276
+ * @property {number} amount - Amount of the payment mode to be paid
1051
1277
  * @property {MultiTenderPaymentMeta} [meta]
1052
- * @property {string} [name] - Payment mode name
1278
+ * @property {string} [name] - Name of the payment mode used to make payment
1053
1279
  */
1054
1280
 
1055
1281
  /**
1056
1282
  * @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]
1283
+ * @property {number} cashback_applied - Cashback applied on user cart
1284
+ * @property {number} [quantity] - Article quantity in user cart
1285
+ * @property {string} size - Size of the article added in cart
1286
+ * @property {number} coupon_effective_discount - Coupon discount applied on
1287
+ * article in user cart
1288
+ * @property {number} amount_paid - Amount needs to paid for article in cart
1289
+ * @property {number} delivery_charges - Delivery charges applied on article in cart
1290
+ * @property {number} price_marked - Original price of product
1291
+ * @property {OpenApiFiles[]} [files] - List of file url
1065
1292
  * @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
1293
+ * @property {Object} [extra_meta] - Extra meta of the article in cart
1294
+ * @property {number} product_id - Product id associated with article in cart
1295
+ * @property {number} [loyalty_discount] - Loyalty points applied on cart
1296
+ * @property {number} discount - Discount value applied on article in cart
1297
+ * @property {number} price_effective - Current per unit price of product after
1298
+ * existing deductions
1299
+ * @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list
1300
+ * used to make the payment
1301
+ * @property {number} [employee_discount] - Employee discount value applied on
1302
+ * article in cart
1303
+ * @property {number} cod_charges - Cash On Delivery charges applied on article in cart
1074
1304
  */
1075
1305
 
1076
1306
  /**
1077
1307
  * @typedef OpenApiPlatformCheckoutReq
1078
- * @property {string} [payment_mode]
1079
- * @property {number} cart_value
1080
- * @property {OpenApiOrderItem[]} cart_items
1308
+ * @property {string} [payment_mode] - Payment mode from which the payment to be
1309
+ * done for the order
1310
+ * @property {number} cart_value - Total amount of user cart
1311
+ * @property {OpenApiOrderItem[]} cart_items - List of items in user cart
1081
1312
  * @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]
1313
+ * @property {number} [loyalty_discount] - Loyalty points applied on cart
1314
+ * @property {string} [comment] - Comment message added in cart after order placed
1315
+ * @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list
1316
+ * used to make the payment
1317
+ * @property {Object} [employee_discount] - Employee discount value applied on user cart
1318
+ * @property {string} [coupon] - Coupon text of coupon applied on user cart
1319
+ * @property {number} cashback_applied - Cashback applied on user cart
1320
+ * @property {string} [gstin] - GSTIN number added in cart
1089
1321
  * @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
1322
+ * @property {string} coupon_code - Coupon code to be applied to cart
1323
+ * @property {number} coupon_value - Value of the coupon applied to cart
1324
+ * @property {number} delivery_charges - Delivery charges of the order placed
1325
+ * via checkout API
1326
+ * @property {string} [affiliate_order_id] - Order id generated after placing order
1327
+ * @property {string} [currency_code] - Currency code for the price
1328
+ * @property {string} [order_id] - Order id generated after placing order
1329
+ * @property {OpenApiFiles[]} [files] - List of file url
1330
+ * @property {number} cod_charges - Cash On Delivery charges of the user cart
1098
1331
  */
1099
1332
 
1100
1333
  /**
1101
- * @typedef OpenApiCheckoutResponse
1102
- * @property {boolean} [success]
1103
- * @property {string} [message]
1334
+ * @typedef OpenApiCheckoutResult
1335
+ * @property {boolean} [success] - The request success is defined
1336
+ * @property {string} [message] - Message of the api response
1104
1337
  * @property {string} [order_ref_id] - Order id sent in request
1105
1338
  * @property {string} order_id - Fynd order id
1106
1339
  */
1107
1340
 
1108
1341
  /**
1109
1342
  * @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]
1343
+ * @property {string} expire_at - Expire details of user cart
1344
+ * @property {Object} [promotion] - Promotion object details like amount, mode,
1345
+ * currency and list of promotions in user cart
1346
+ * @property {boolean} is_default - User cart default status
1347
+ * @property {string} [comment] - Comment message to be added in user cart
1348
+ * @property {Object[]} articles - List of articles in user cart
1349
+ * @property {Object} [coupon] - Coupon data of user cart which denotes if
1350
+ * coupon is applied, coupon code, coupon amount, coupon title and coupon message
1351
+ * @property {number} [bulk_coupon_discount] - Total bulk discount amount
1352
+ * applied in user cart
1353
+ * @property {string} _id - Unique identifier of the user cart
1354
+ * @property {Object} [fynd_credits] - Fynd credit points applied in user cart
1355
+ * @property {number[]} [fc_index_map] - Flat article index in user cart
1356
+ * @property {string} [order_id] - Order id generated in user cart
1357
+ * @property {number} [discount] - Discount amount of the product in cart
1358
+ * @property {Object} [cod_charges] - Cash On Delivery charges of the user cart
1359
+ * @property {Object} [payments] - Payment object selected in user cart
1360
+ * @property {string} [payment_mode] - Payment mode of the payment selected to
1361
+ * do the payment
1362
+ * @property {Object[]} [shipments] - Shipment details for the items in a cart,
1363
+ * specific to the selected address.
1364
+ * @property {Object} [pick_up_customer_details] - Customer contact details for
1365
+ * customer pickup at store
1366
+ * @property {number} uid - Unique Identifier of user cart
1367
+ * @property {string} [checkout_mode] - Checkout mode of user cart
1368
+ * @property {number} [cart_value] - Total amount of user cart
1369
+ * @property {boolean} [is_archive] - Flag to indicate cart is archived or not
1370
+ * @property {string} created_on - Date time format when user cart created
1371
+ * @property {string} last_modified - Date time format when user cart last modified
1372
+ * @property {Object} [meta] - Extra meta data of user cart
1373
+ * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
1374
+ * is doing fast checkout for the cart using buy now
1375
+ * @property {boolean} [is_active] - Flag indicates user cart is active or not
1376
+ * @property {Object} cashback - Cart level cashback data which denotes cashback
1377
+ * amount and cashback message
1378
+ * @property {Object[]} [payment_methods] - Payment methods list used to make the payment
1379
+ * @property {string} [gstin] - GSTIN added in user cart
1380
+ * @property {Object} [delivery_charges] - Delivery charges of user cart
1381
+ * @property {boolean} [merge_qty] - Flag indicates cart has merged article or not
1382
+ * @property {string} user_id - User Id of user cart
1383
+ * @property {string} [app_id] - Application id of user cart
1384
+ */
1385
+
1386
+ /**
1387
+ * @typedef AbandonedCartResult
1388
+ * @property {AbandonedCart[]} [items] - List of items in abandon cart
1389
+ * @property {Object} [result] - Define the list of items with updated status
1149
1390
  * @property {Page} [page]
1150
1391
  * @property {boolean} [success] - The request success is defined
1151
1392
  * @property {string} [message] - Message of the response
@@ -1153,47 +1394,54 @@ const Joi = require("joi");
1153
1394
 
1154
1395
  /**
1155
1396
  * @typedef PaymentSelectionLock
1156
- * @property {string} [payment_identifier]
1157
- * @property {string} [default_options]
1158
- * @property {boolean} [enabled]
1397
+ * @property {string} [payment_identifier] - Identifier for Payment Mode
1398
+ * @property {string} [default_options] - Default Selection Payment Mode
1399
+ * @property {boolean} [enabled] - Denotes if default payment selection is enable
1159
1400
  */
1160
1401
 
1161
1402
  /**
1162
1403
  * @typedef CartCurrency
1163
1404
  * @property {string} [code] - Currency code defined by ISO 4217:2015
1164
- * @property {string} [symbol]
1405
+ * @property {string} [symbol] - Currency symbol for currency of user cart prices
1165
1406
  */
1166
1407
 
1167
1408
  /**
1168
1409
  * @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]
1410
+ * @property {number} [cashback_amount] - Fields denotes cashback amount applied to cart
1411
+ * @property {string} [cashback_message_primary] - Primary cashback message for
1412
+ * coupon applied to cart
1413
+ * @property {string} [cashback_message_secondary] - Secondary cashback message
1414
+ * for coupon applied to cart
1415
+ * @property {string} [coupon_code] - Coupon code to be applied to cart
1416
+ * @property {string} [coupon_description] - Coupon description of the coupon
1417
+ * applied to cart
1418
+ * @property {string} [coupon_id] - Unique identifier of the coupon applied to cart
1419
+ * @property {string} [coupon_subtitle] - Coupon subtitle of the coupon applied to cart
1420
+ * @property {string} [coupon_title] - Coupon title of the coupon applied
1421
+ * @property {string} [coupon_type] - Type of the coupon applied to cart
1422
+ * @property {number} [coupon_value] - Value of the coupon applied to cart
1423
+ * @property {number} [discount] - Total discount earned from coupon applied to cart
1424
+ * @property {boolean} [is_applied] - Flag to determine where the coupon is
1425
+ * applied to cart or not
1426
+ * @property {boolean} [is_valid] - Determine where the coupon applied to cart is valid
1427
+ * @property {number} [maximum_discount_value] - Maximum discount value of the
1428
+ * coupon applied to cart
1429
+ * @property {string} [message] - Coupon message of the coupon applied to cart
1430
+ * @property {number} [minimum_cart_value] - Minimum cart value of the coupon
1431
+ * applied to cart
1185
1432
  */
1186
1433
 
1187
1434
  /**
1188
1435
  * @typedef ChargesThreshold
1189
- * @property {number} [charges]
1190
- * @property {number} [threshold]
1436
+ * @property {number} [charges] - Charges amount to be applied on cart
1437
+ * @property {number} [threshold] - Threshold of cart value on which the charge
1438
+ * should be applied
1191
1439
  */
1192
1440
 
1193
1441
  /**
1194
1442
  * @typedef DeliveryChargesConfig
1195
- * @property {boolean} [enabled]
1196
- * @property {ChargesThreshold[]} [charges]
1443
+ * @property {boolean} [enabled] - Delivery charge enabled for the cart or not
1444
+ * @property {ChargesThreshold[]} [charges] - Charges applicable based on threshold
1197
1445
  */
1198
1446
 
1199
1447
  /**
@@ -1202,546 +1450,734 @@ const Joi = require("joi");
1202
1450
  */
1203
1451
 
1204
1452
  /**
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]
1453
+ * @typedef CartDetailResult
1454
+ * @property {number} [cart_id] - Unique identifier of the user cart
1455
+ * @property {string} [uid] - Unique identifier of the user cart
1456
+ * @property {string} [coupon_text] - Coupon text of coupon applied on cart
1457
+ * @property {string} [id] - Unique identifier of the user cart
1458
+ * @property {Object} [pan_config] - Pan card config states at what condition
1459
+ * user should enter the pan card
1211
1460
  * @property {ShipmentPromise} [delivery_promise]
1212
- * @property {string} [comment]
1213
- * @property {CartProductInfo[]} [items]
1461
+ * @property {string} [comment] - Comment message to be added in user cart
1462
+ * @property {CartProductInfo[]} [items] - Items data list in user cart that
1463
+ * includes item id, item size, store id, available sizes and rest of the item
1464
+ * related data
1214
1465
  * @property {PaymentSelectionLock} [payment_selection_lock]
1215
- * @property {string} [delivery_charge_info]
1466
+ * @property {string} [delivery_charge_info] - Delivery charge in information
1467
+ * message on shipment
1216
1468
  * @property {CartCommonConfig} [common_config]
1217
1469
  * @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]
1470
+ * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
1471
+ * the checkout process
1472
+ * @property {string} [message] - Message of the cart detail API response
1473
+ * @property {Object} [notification] - Notification object which denotes
1474
+ * notification data for user cart
1475
+ * @property {string} [staff_user_id] - Staff employee user id if cart is
1476
+ * created by staff employee for the customer
1477
+ * @property {boolean} [success] - Success flag of get cart detail API response
1223
1478
  * @property {CartBreakup} [breakup_values]
1224
- * @property {boolean} [is_valid]
1479
+ * @property {boolean} [is_valid] - Cart validity flag determines the if the
1480
+ * response is valid or not
1225
1481
  * @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]
1482
+ * @property {string} [checkout_mode] - Checkout mode of user cart
1483
+ * @property {string} [last_modified] - Last modified timestamp of cart
1484
+ * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
1485
+ * is doing fast checkout for the cart using buy now
1486
+ * @property {string} [gstin] - GSTIN added in user cart
1487
+ * @property {AppliedPromotion[]} [applied_promo_details] - List of applied
1488
+ * promotions data to cart which includes promotion id, promotion name, offer
1489
+ * text, description, buy rules, discount rules and promotion type
1490
+ * @property {string} [pan_no] - Permanent Account Number of the user
1491
+ * @property {Object} [custom_cart_meta] - Custom meta details added cart
1492
+ * checkout API payload
1233
1493
  */
1234
1494
 
1235
1495
  /**
1236
1496
  * @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]
1497
+ * @property {number} [quantity] - Field to specify the product quantity that
1498
+ * user wants to buy
1499
+ * @property {string} [item_size] - Field to determine size of the product
1500
+ * @property {number} [seller_id] - Unique identifier of the seller selected by
1501
+ * the user from which user want to buy a product
1502
+ * @property {Object[]} [parent_item_identifiers] - Fields to determine parent
1503
+ * product of the product
1504
+ * @property {string[]} [product_group_tags] - Field to specify the product
1505
+ * groups of the product that the user is trying to add in cart
1506
+ * @property {string} [article_id] - Unique identifier of an article
1507
+ * @property {Object} [article_assignment] - Field to determine how article
1508
+ * assignment should happen by article assignment level and strategy
1509
+ * @property {number} [store_id] - Unique identifier of the store selected by
1510
+ * the user from which user want to buy a product
1511
+ * @property {string} [display] - Display field at article level
1512
+ * @property {number} [item_id] - Unique identifier to identify product
1513
+ * @property {Object} [extra_meta] - Extra meta data to be added at article
1514
+ * level while add items to cart
1515
+ * @property {Object} [_custom_json] - Field to add custom json at article level
1516
+ * while add items to cart
1517
+ * @property {Object} [meta] - Field to add meta data at article level
1518
+ * @property {boolean} [pos] - Filed to determine whether user is making request
1519
+ * from pos or not
1251
1520
  * @property {string} [seller_identifier] - Add items using seller identifier for store os
1252
1521
  */
1253
1522
 
1254
1523
  /**
1255
- * @typedef AddCartRequest
1256
- * @property {boolean} [new_cart]
1257
- * @property {AddProductCart[]} [items]
1524
+ * @typedef AddCartCreation
1525
+ * @property {boolean} [new_cart] - Field to create to new cart whille user adds
1526
+ * item to cart
1527
+ * @property {AddProductCart[]} [items] - List of items detail which need to be
1528
+ * added to cart like item id, item size, and item quantity
1258
1529
  */
1259
1530
 
1260
1531
  /**
1261
- * @typedef AddCartDetailResponse
1532
+ * @typedef AddCartDetailResult
1262
1533
  * @property {boolean} [success] - True if all items are added successfully.
1263
1534
  * False if partially added or not added.
1264
- * @property {CartDetailResponse} [cart]
1535
+ * @property {CartDetailResult} [cart]
1265
1536
  * @property {boolean} [partial] - When adding multiple items check if all
1266
1537
  * added. True if only few are added.
1267
- * @property {string} [message]
1538
+ * @property {string} [message] - Message of add cart API response
1268
1539
  */
1269
1540
 
1270
1541
  /**
1271
1542
  * @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]
1543
+ * @property {number} [quantity] - Field to update the quantity of the item in cart
1544
+ * @property {string} [item_size] - Field to update the size of the product in cart
1545
+ * @property {Object} [parent_item_identifiers] - Field to update parent product
1546
+ * of the item in cart
1547
+ * @property {Object} [meta] - Field to update meta of the item in cart
1548
+ * @property {Object} [extra_meta] - Field to update extra meta of the product in cart
1549
+ * @property {Object} [_custom_json] - Field to update custom json of the product in cart
1550
+ * @property {number} [item_id] - Item id of the product that needs to be updated
1551
+ * @property {number} [item_index] - Item index determines on which index the
1552
+ * product falls to be updated
1280
1553
  * @property {CartProductIdentifer} identifiers
1281
- * @property {string} [article_id]
1554
+ * @property {string} [article_id] - Article id of the product in cart
1555
+ */
1556
+
1557
+ /**
1558
+ * @typedef FreeGiftItemCreation
1559
+ * @property {string} promotion_id - Unique identifier of the free gift promotion.
1560
+ * @property {string} item_id - Unique identifier of the selected free gift item.
1561
+ * @property {string} item_size - Size of the selected free gift item.
1282
1562
  */
1283
1563
 
1284
1564
  /**
1285
- * @typedef UpdateCartRequest
1565
+ * @typedef UpdateCartCreation
1286
1566
  * @property {UpdateProductCart[]} [items]
1287
- * @property {string} operation
1567
+ * @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift
1568
+ * items with updated sizes.
1569
+ * @property {string} operation - Cart opertaion type
1288
1570
  */
1289
1571
 
1290
1572
  /**
1291
- * @typedef UpdateCartDetailResponse
1573
+ * @typedef UpdateCartDetailResult
1292
1574
  * @property {boolean} [success] - True if all items are added successfully.
1293
1575
  * False if partially added or not added.
1294
- * @property {CartDetailResponse} [cart]
1295
- * @property {string} [message]
1576
+ * @property {CartDetailResult} [cart]
1577
+ * @property {string} [message] - Message of update cart API response
1296
1578
  */
1297
1579
 
1298
1580
  /**
1299
1581
  * @typedef OverrideCartItemPromo
1300
- * @property {string} promo_id
1301
- * @property {string} promo_amount
1302
- * @property {string} [promo_desc]
1582
+ * @property {string} promo_id - Promotion id applied on product
1583
+ * @property {string} promo_amount - Promotion amount applied on product
1584
+ * @property {string} [promo_desc] - Promotion description applied on product
1303
1585
  * @property {string} [rwrd_tndr]
1304
- * @property {Object[]} [item_list]
1305
- * @property {string} [parent_promo_id]
1586
+ * @property {Object[]} [item_list] - List of items
1587
+ * @property {string} [parent_promo_id] - Parent promotion unique identifier
1306
1588
  */
1307
1589
 
1308
1590
  /**
1309
1591
  * @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
1592
+ * @property {string} [seller_identifier] - Seller identifiers of the product size.
1593
+ * @property {number} [quantity] - Item quantity, which you have added into cart
1594
+ * @property {string} size - Item size, which you have added into cart
1595
+ * @property {number} price_marked - Original price of product
1596
+ * @property {number} amount_paid - Amount needs to paid for item
1597
+ * @property {OverrideCartItemPromo[]} [promo_list] - List of promotion applied on item
1598
+ * @property {Object} [extra_meta] - Extra meta to be added while checkout in order
1599
+ * @property {number} item_id - Item unique id in user cart
1600
+ * @property {number} discount - Discount amount applied on item
1601
+ * @property {number} price_effective - Current per unit price of product after
1602
+ * existing deductions
1320
1603
  */
1321
1604
 
1322
1605
  /**
1323
1606
  * @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
1607
+ * @property {string} cart_id - The cart id of user cart
1608
+ * @property {string} payment_mode - Payment mode from which the payment to be
1609
+ * done for the order
1610
+ * @property {Object} [billing_address] - Billing address json which includes
1611
+ * customer address, customer phone, customer email, customer pincode,
1612
+ * customer landmark and customer name
1613
+ * @property {string} merchant_code - Merchant code of the payment mode selected
1614
+ * to do the payment
1615
+ * @property {string} payment_identifier - Payment identifier of the payment
1616
+ * mode selected to do the payment
1617
+ * @property {string} currency_code - Currency code for the price
1618
+ * @property {string} aggregator - Aggregator name of the payment gateway
1619
+ * @property {string} order_type - Order type of the order being placed like
1620
+ * pickAtStore or HomeDelivery
1621
+ * @property {string} [callback_url] - Callback url to be redirected after
1622
+ * payment received/failed
1623
+ * @property {OverrideCartItem[]} cart_items - List of items which includes
1624
+ * their size, id, discount and promo details
1625
+ * @property {number} [ordering_store] - Ordering store id of the store from
1626
+ * which the order is getting placed
1627
+ * @property {Object} [shipping_address] - Shipping address json which includes
1628
+ * name, area, address, phone, area_code, state, country, country code and email
1629
+ */
1630
+
1631
+ /**
1632
+ * @typedef OverrideCheckoutResult
1633
+ * @property {Object} data - Data of the user cart checkout includes cart data,
1634
+ * address, user id, order type etc
1635
+ * @property {Object} cart - Cart details in API response which included cart
1636
+ * id, items in cart, promise, order type, breakup values etc.
1637
+ * @property {string} success - Success flag of cart override checkout API response
1638
+ * @property {string} order_id - Order id generated after placing order
1639
+ * @property {string} message - Message of the cart override checkout API response
1640
+ */
1641
+
1642
+ /**
1643
+ * @typedef GetShareCartLinkCreation
1349
1644
  * @property {string} [id] - Cart uid for generating sharing
1350
1645
  * @property {Object} [meta] - Staff, Ordering store or any other data. This
1351
1646
  * data will be used to generate link as well as sent as shared details.
1352
1647
  */
1353
1648
 
1354
1649
  /**
1355
- * @typedef GetShareCartLinkResponse
1356
- * @property {string} [token] - Short url unique id
1357
- * @property {string} [share_url] - Short shareable final url
1650
+ * @typedef GetShareCartLinkResult
1651
+ * @property {string} [token] - Short url unique id of the cart which is opted
1652
+ * to share with other user
1653
+ * @property {string} [share_url] - Short shareable final url which can populate
1654
+ * shared cart items in one's cart or replaced one's cart with shared cart items
1358
1655
  */
1359
1656
 
1360
1657
  /**
1361
1658
  * @typedef SharedCartDetails
1362
1659
  * @property {Object} [source] - Share link device and other source information
1363
1660
  * @property {Object} [user] - User details of who generated share link
1364
- * @property {string} [token] - Short link id
1365
- * @property {string} [created_on]
1661
+ * @property {string} [token] - Short link id of the user cart that needs to be shared
1662
+ * @property {string} [created_on] - Created on timestamp of user cart
1366
1663
  * @property {Object} [meta] - Meta data sent while generating share cart link
1367
1664
  */
1368
1665
 
1369
1666
  /**
1370
1667
  * @typedef SharedCart
1371
- * @property {string} [coupon_text]
1372
- * @property {string} [id]
1668
+ * @property {string} [coupon_text] - Coupon text of the applied coupon on user cart
1669
+ * @property {string} [id] - Cart id of shared cart
1373
1670
  * @property {ShipmentPromise} [delivery_promise]
1374
- * @property {string} [comment]
1375
- * @property {CartProductInfo[]} [items]
1671
+ * @property {string} [comment] - Comment message added in user cart
1672
+ * @property {CartProductInfo[]} [items] - Items data list in user cart that
1673
+ * includes item id, item size, store id, available sizes and rest of the item
1674
+ * related data
1376
1675
  * @property {SharedCartDetails} [shared_cart_details]
1377
1676
  * @property {PaymentSelectionLock} [payment_selection_lock]
1378
- * @property {string} [delivery_charge_info]
1379
- * @property {boolean} [restrict_checkout]
1380
- * @property {string} [message]
1677
+ * @property {string} [delivery_charge_info] - Delivery charge info message of
1678
+ * the user cart
1679
+ * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
1680
+ * the checkout process
1681
+ * @property {string} [message] - Message of the get shared cart API response
1381
1682
  * @property {CartBreakup} [breakup_values]
1382
- * @property {boolean} [is_valid]
1383
- * @property {string} [uid]
1384
- * @property {string} [checkout_mode]
1683
+ * @property {boolean} [is_valid] - Valid flag for get shared cart detail API
1684
+ * @property {string} [uid] - Cart id of the user cart
1685
+ * @property {string} [checkout_mode] - Checkout mode of address on which
1686
+ * address to be used for which checkout mode of cart
1385
1687
  * @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]
1688
+ * @property {string} [last_modified] - Last modified timestamp of user cart
1689
+ * @property {boolean} [buy_now] - Buy now flag of user cart
1690
+ * @property {number} [cart_id] - Cart id of user cart for generating cart sharing token
1691
+ * @property {string} [gstin] - GSTIN added in user cart
1692
+ * @property {Object} [custom_cart_meta] - Custom cart meta of user cart added
1693
+ * via update cart meta API
1391
1694
  */
1392
1695
 
1393
1696
  /**
1394
- * @typedef SharedCartResponse
1697
+ * @typedef SharedCartResult
1395
1698
  * @property {SharedCart} [cart]
1396
- * @property {string} [error]
1699
+ * @property {string} [error] - Error details if any error occurs which includes
1700
+ * type of error, error code and error message
1397
1701
  */
1398
1702
 
1399
1703
  /**
1400
1704
  * @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]
1705
+ * @property {string} [cart_id] - The cart id of user
1706
+ * @property {Object} [pick_up_customer_details] - Customer contact details for
1707
+ * customer pickup at store
1708
+ * @property {number} [cart_value] - Total amount of cart
1709
+ * @property {string} [created_on] - Date format when cart created
1710
+ * @property {string} [user_id] - User id which is associated with cart
1711
+ * @property {string} [currency_code] - Active cart currency code
1712
+ * @property {number} [item_counts] - Article total count in cart
1408
1713
  */
1409
1714
 
1410
1715
  /**
1411
- * @typedef MultiCartResponse
1412
- * @property {boolean} [success]
1413
- * @property {CartList[]} [data]
1716
+ * @typedef MultiCartResult
1717
+ * @property {boolean} [success] - True if get list of cart successfully.
1718
+ * @property {CartList[]} [data] - List of active carts and their item's count
1414
1719
  */
1415
1720
 
1416
1721
  /**
1417
1722
  * @typedef UpdateUserCartMapping
1418
- * @property {string} user_id
1723
+ * @property {string} user_id - User Id of user for which we map with the cart
1419
1724
  */
1420
1725
 
1421
1726
  /**
1422
1727
  * @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]
1728
+ * @property {string} [gender] - User gender
1729
+ * @property {string} [modified_on] - Date format of user when user last modified
1730
+ * @property {string} [_id] - Unique Identifier of user
1731
+ * @property {string} [uid] - Unique UID of user
1732
+ * @property {string} [external_id] - Unique external id
1733
+ * @property {string} [mobile] - 10 digit Mobile number of user
1734
+ * @property {string} [last_name] - Last name of user
1735
+ * @property {string} [created_at] - Date format of user when user registered
1736
+ * @property {string} [first_name] - First name of user
1432
1737
  */
1433
1738
 
1434
1739
  /**
1435
- * @typedef UserCartMappingResponse
1436
- * @property {string} [coupon_text]
1740
+ * @typedef UserCartMappingResult
1741
+ * @property {string} [coupon_text] - Coupon text of coupon applied on cart
1437
1742
  * @property {UserInfo} [user]
1438
- * @property {string} [id]
1439
- * @property {Object} [pan_config]
1743
+ * @property {string} [id] - Unique identifier of the user cart
1744
+ * @property {Object} [pan_config] - Pan card config states at what condition
1745
+ * user should enter the pan card
1440
1746
  * @property {ShipmentPromise} [delivery_promise]
1441
- * @property {string} [comment]
1442
- * @property {CartProductInfo[]} [items]
1747
+ * @property {string} [comment] - Comment message to be added in user cart
1748
+ * @property {CartProductInfo[]} [items] - Items data list in user cart that
1749
+ * includes item id, item size, store id, available sizes and rest of the item
1750
+ * related data
1443
1751
  * @property {PaymentSelectionLock} [payment_selection_lock]
1444
- * @property {string} [delivery_charge_info]
1445
- * @property {boolean} [restrict_checkout]
1446
- * @property {string} [message]
1752
+ * @property {string} [delivery_charge_info] - Delivery charge in information
1753
+ * message on shipment
1754
+ * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
1755
+ * the checkout process
1756
+ * @property {string} [message] - Message of the get cart detail API response
1447
1757
  * @property {CartBreakup} [breakup_values]
1448
- * @property {boolean} [is_valid]
1758
+ * @property {boolean} [is_valid] - Cart validity flag determines the if the
1759
+ * response is valid or not
1449
1760
  * @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]
1761
+ * @property {string} [checkout_mode] - Checkout mode of user cart
1762
+ * @property {string} [last_modified] - Last modified timestamp of cart
1763
+ * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
1764
+ * is doing fast checkout for the cart using buy now
1765
+ * @property {string} [gstin] - GSTIN added in user cart
1766
+ * @property {Object} [custom_cart_meta] - Custom meta details added cart
1767
+ * checkout API payload
1768
+ * @property {AppliedPromotion[]} [applied_promo_details] - List of applied
1769
+ * promotions data to cart which includes promotion id, promotion name, offer
1770
+ * text, description, buy rules, discount rules and promotion type
1771
+ * @property {string} [pan_no] - Permanent Account Number of the user
1457
1772
  */
1458
1773
 
1459
1774
  /**
1460
- * @typedef PlatformAddCartRequest
1461
- * @property {string} [user_id]
1462
- * @property {boolean} [new_cart]
1463
- * @property {AddProductCart[]} [items]
1775
+ * @typedef PlatformAddCartDetails
1776
+ * @property {string} [user_id] - The user id of user, for which we need to add
1777
+ * item into cart
1778
+ * @property {boolean} [new_cart] - Field to create to new cart whille user adds
1779
+ * item to cart
1780
+ * @property {AddProductCart[]} [items] - List of items detail which need to be
1781
+ * added to cart like item id, item size, and item quantity
1464
1782
  */
1465
1783
 
1466
1784
  /**
1467
- * @typedef PlatformUpdateCartRequest
1468
- * @property {string} [user_id]
1469
- * @property {UpdateProductCart[]} [items]
1470
- * @property {string} operation
1785
+ * @typedef PlatformUpdateCartDetails
1786
+ * @property {string} [user_id] - The user id of user, for which we need to
1787
+ * update the cart
1788
+ * @property {UpdateProductCart[]} [items] - List items data that needs to be
1789
+ * updated in cart
1790
+ * @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift
1791
+ * items with updated sizes.
1792
+ * @property {string} operation - Field to determine if item to be removed from
1793
+ * cart or it needs to be updated
1471
1794
  */
1472
1795
 
1473
1796
  /**
1474
- * @typedef DeleteCartRequest
1475
- * @property {string[]} [cart_id_list]
1797
+ * @typedef DeleteCartDetails
1798
+ * @property {string[]} [cart_id_list] - List of all cart ids, which need to delete
1476
1799
  */
1477
1800
 
1478
1801
  /**
1479
- * @typedef DeleteCartDetailResponse
1802
+ * @typedef DeleteCartDetailResult
1480
1803
  * @property {boolean} [success] - True if cart is archived successfully. False
1481
1804
  * if not archived.
1482
- * @property {string} [message]
1805
+ * @property {string} [message] - Message for delete cart response
1483
1806
  */
1484
1807
 
1485
1808
  /**
1486
- * @typedef CartItemCountResponse
1809
+ * @typedef CartItemCountResult
1487
1810
  * @property {number} [user_cart_items_count] - Item count present in cart
1488
1811
  */
1489
1812
 
1490
1813
  /**
1491
1814
  * @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]
1815
+ * @property {string} [title] - Coupon Title of the coupon applied denotes name
1816
+ * of the coupon
1817
+ * @property {number} [max_discount_value] - Maximum discount value of the
1818
+ * coupon applied to cart
1819
+ * @property {string} [coupon_code] - Coupon code of the coupon applied on cart
1820
+ * @property {boolean} [is_applied] - Flag to determine where the coupon is
1821
+ * applied to cart or not
1822
+ * @property {string} [coupon_type] - Type of the coupon applied to cart
1823
+ * @property {string} [expires_on] - Message to display to user for expiry of the coupon
1824
+ * @property {number} [coupon_value] - Coupon value of the coupon applied to cart
1825
+ * @property {string} [sub_title] - Coupon subtitle of the coupon applied to
1826
+ * cart which is used to display
1827
+ * @property {number} [minimum_cart_value] - Minimum cart value of the coupon
1828
+ * applied to cart
1829
+ * @property {boolean} [is_applicable] - Flag to determine where the coupon is
1830
+ * applicable to cart or not
1831
+ * @property {string} [message] - Coupon message of the coupon applied to cart
1832
+ * @property {string} [description] - Coupon description of the coupon applied to cart
1833
+ * @property {string} [start_date] - Start date of the coupon when the coupon
1834
+ * will be live for the users to apply on cart
1835
+ * @property {string} [end_date] - End date of the coupon on which the coupon expires
1836
+ * @property {string} [coupon_applicable_message] - Message which is used to
1837
+ * display to the customer if the coupon is applied successfully
1507
1838
  */
1508
1839
 
1509
1840
  /**
1510
1841
  * @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]
1842
+ * @property {boolean} [has_next] - Denotes if next page of coupon is available
1843
+ * @property {number} [current] - Current page number
1844
+ * @property {number} [total] - Total pages of coupon availalbe
1845
+ * @property {number} [total_item_count] - Total coupons are available for the cart
1846
+ * @property {boolean} [has_previous] - Denotes if previous page of the coupon
1847
+ * is available
1516
1848
  */
1517
1849
 
1518
1850
  /**
1519
- * @typedef GetCouponResponse
1520
- * @property {Coupon[]} [available_coupon_list]
1851
+ * @typedef GetCouponResult
1852
+ * @property {Coupon[]} [available_coupon_list] - List of available coupon which
1853
+ * can be applied on cart
1521
1854
  * @property {PageCoupon} [page]
1522
1855
  */
1523
1856
 
1524
1857
  /**
1525
- * @typedef ApplyCouponRequest
1858
+ * @typedef ApplyCouponDetails
1526
1859
  * @property {string} coupon_code - Coupon code to be applied
1527
1860
  */
1528
1861
 
1529
1862
  /**
1530
1863
  * @typedef GeoLocation
1531
- * @property {number} [longitude]
1532
- * @property {number} [latitude]
1864
+ * @property {number} [longitude] - Longitude coordinate for address
1865
+ * @property {number} [latitude] - Latitude coordinate for address
1533
1866
  */
1534
1867
 
1535
1868
  /**
1536
1869
  * @typedef PlatformAddress
1537
- * @property {string} [phone]
1538
- * @property {string} [id]
1539
- * @property {string} [area_code_slug]
1540
- * @property {string} [country_code]
1870
+ * @property {string} [phone] - Phone number for address
1871
+ * @property {string} [id] - Id of the address
1872
+ * @property {string} [area_code_slug] - Area code slug for address. example
1873
+ * pincode is slug for India
1874
+ * @property {string} [country_code] - Country code of address
1541
1875
  * @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]
1876
+ * @property {string} [country] - Country of address
1877
+ * @property {string} [state] - State of the address
1878
+ * @property {boolean} [is_default_address] - Default address flag if no address
1879
+ * selected then this should be the default address selected
1880
+ * @property {string[]} [tags] - Tags of address from which it can be identified
1881
+ * @property {string} [created_by_user_id] - Created by user id of address
1882
+ * @property {string} [landmark] - Landmark of address
1883
+ * @property {string} [email] - Email address for address data
1884
+ * @property {string} [area_code] - Area code of the address
1885
+ * @property {string} [checkout_mode] - Checkout mode of address on which
1886
+ * address to be used for which checkout mode of cart
1887
+ * @property {Object} [meta] - Metadata of the address
1888
+ * @property {boolean} [is_active] - States whether address is active or not
1889
+ * @property {string} [name] - Name of person in address data to whom it belongs to
1890
+ * @property {Object} [google_map_point] - Google map point of the address
1891
+ * @property {string} [cart_id] - The cart id of user cart
1892
+ * @property {string} [city] - City of the address
1893
+ * @property {string} [sector] - Sector of the address
1558
1894
  * @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]
1895
+ * @property {string} [area] - Area description for address
1896
+ * @property {string} [user_id] - User id of address for which address is created
1897
+ * @property {string} [address_type] - Address type of address
1898
+ * @property {string} [address] - Address description for address data
1899
+ * @property {string} [country_phone_code] - Country phone code for address
1900
+ * @property {string} [country_iso_code] - Country iso code for address
1901
+ * @property {Object} [_custom_json] - Custom json of the address
1566
1902
  */
1567
1903
 
1568
1904
  /**
1569
- * @typedef PlatformGetAddressesResponse
1570
- * @property {PlatformAddress[]} [address]
1905
+ * @typedef ValidationConfig
1906
+ * @property {number} address_max_limit - The maximum number of addresses a user can have.
1907
+ * @property {number} user_address_count - The total number of addresses saved by a user.
1571
1908
  */
1572
1909
 
1573
1910
  /**
1574
- * @typedef SaveAddressResponse
1575
- * @property {string} [id]
1576
- * @property {boolean} [success]
1577
- * @property {boolean} [is_default_address]
1911
+ * @typedef PlatformGetAddressesDetails
1912
+ * @property {PlatformAddress[]} [address] - List of all address saved by customer
1913
+ * @property {ValidationConfig} [validation_config]
1578
1914
  */
1579
1915
 
1580
1916
  /**
1581
- * @typedef UpdateAddressResponse
1582
- * @property {string} [id]
1583
- * @property {boolean} [is_default_address]
1584
- * @property {boolean} [success]
1585
- * @property {boolean} [is_updated]
1917
+ * @typedef SaveAddressDetails
1918
+ * @property {string} [id] - Id of the address
1919
+ * @property {boolean} [success] - Success flag of save address Response
1920
+ * @property {boolean} [is_default_address] - Default address flag if no address
1921
+ * selected then this should be the default address selected
1586
1922
  */
1587
1923
 
1588
1924
  /**
1589
- * @typedef DeleteAddressResponse
1590
- * @property {string} [id]
1591
- * @property {boolean} [is_deleted]
1925
+ * @typedef UpdateAddressDetails
1926
+ * @property {string} [id] - ID of an address
1927
+ * @property {boolean} [is_default_address] - Default address flag if no address
1928
+ * selected then this should be the default address selected
1929
+ * @property {boolean} [success] - Success flag of update address response
1930
+ * @property {boolean} [is_updated] - Updated flag for update address operation
1931
+ * if the address updated or not
1592
1932
  */
1593
1933
 
1594
1934
  /**
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]
1935
+ * @typedef DeleteAddressResult
1936
+ * @property {string} [id] - Id of the address
1937
+ * @property {boolean} [is_deleted] - Deleted flag in delete address response
1938
+ * states whether the address was deleted or not
1601
1939
  */
1602
1940
 
1603
1941
  /**
1604
- * @typedef ShipmentArticle
1605
- * @property {string} [meta]
1606
- * @property {string} [quantity]
1607
- * @property {string} [article_id]
1942
+ * @typedef PlatformSelectCartAddress
1943
+ * @property {string} [cart_id] - Cart id of the user cart for which the select
1944
+ * address operation performed
1945
+ * @property {string} [billing_address_id] - Billing address id selected by user
1946
+ * on which shipment bill to be generated
1947
+ * @property {string} [checkout_mode] - The checkout mode in cart
1948
+ * @property {string} [id] - Address is selected by user on which shipment to be delivered
1949
+ * @property {string} [user_id] - Unique Identifier of user
1608
1950
  */
1609
1951
 
1610
1952
  /**
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]
1953
+ * @typedef ShipmentArticle
1954
+ * @property {string} [meta] - Article meta data for shipment
1955
+ * @property {string} [quantity] - Article quantity for shipment
1956
+ * @property {string} [article_id] - Article unique id for shipment
1957
+ */
1958
+
1959
+ /**
1960
+ * @typedef PlatformShipmentDetails
1961
+ * @property {number} [shipments] - Count of shipments that will be shipped
1962
+ * @property {number} [fulfillment_id] - Fulfilment id of the shipment
1963
+ * @property {CartProductInfo[]} [items] - Item details in the shipment
1964
+ * @property {Object} [dp_options] - Delivery partner options that are available
1965
+ * to deliver the shipment
1966
+ * @property {string} [shipment_type] - Shipment type of the shipment returned
1967
+ * in get shipments API like single_shipment or multiple shipment. Single
1968
+ * Shipment means 1 item in 1 shipment and vice versa in the other one
1969
+ * @property {string} [order_type] - Order type of the shipment like pickAtStore
1970
+ * or HomeDelivery
1971
+ * @property {string} [box_type] - Box type of the shipment in which the
1972
+ * shipment will be delivered
1619
1973
  * @property {ShipmentPromise} [promise]
1620
- * @property {string} [dp_id]
1621
- * @property {string} [fulfillment_type]
1622
- * @property {ShipmentArticle[]} [articles]
1974
+ * @property {string} [dp_id] - Delivery partner id of the shipment
1975
+ * @property {string} [fulfillment_type] - Fulfilment type of shipment
1976
+ * @property {ShipmentArticle[]} [articles] - List of articles in shipment
1623
1977
  */
1624
1978
 
1625
1979
  /**
1626
- * @typedef PlatformCartShipmentsResponse
1627
- * @property {string} [coupon_text]
1628
- * @property {string} [id]
1629
- * @property {Object} [pan_config]
1980
+ * @typedef PlatformCartShipmentsResult
1981
+ * @property {string} [coupon_text] - Coupon text of coupon applied on cart
1982
+ * @property {string} [id] - Cart id of the user cart
1983
+ * @property {Object} [pan_config] - Pan card config states at what condition
1984
+ * user should enter the pan card
1630
1985
  * @property {ShipmentPromise} [delivery_promise]
1631
- * @property {string} [comment]
1632
- * @property {CartProductInfo[]} [items]
1986
+ * @property {string} [comment] - Comment message added in cart
1987
+ * @property {CartProductInfo[]} [items] - List of items in cart
1633
1988
  * @property {PaymentSelectionLock} [payment_selection_lock]
1634
- * @property {string} [delivery_charge_info]
1635
- * @property {boolean} [restrict_checkout]
1636
- * @property {string} [message]
1989
+ * @property {string} [delivery_charge_info] - Delivery charge in information
1990
+ * message on shipment
1991
+ * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
1992
+ * the checkout process
1993
+ * @property {string} [message] - Response message of get shipments API
1637
1994
  * @property {CartBreakup} [breakup_values]
1638
- * @property {string} [staff_user_id]
1639
- * @property {boolean} [is_valid]
1640
- * @property {PlatformShipmentResponse[]} [shipments]
1995
+ * @property {string} [staff_user_id] - Staff employee user id if cart is
1996
+ * created by staff employee for the customer
1997
+ * @property {boolean} [is_valid] - Cart validity flag determines the if the
1998
+ * response is valid or not
1999
+ * @property {PlatformShipmentDetails[]} [shipments] - List of shipments that
2000
+ * will be shipped
1641
2001
  * @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]
2002
+ * @property {string} [checkout_mode] - Checkout mode of cart
2003
+ * @property {string} [last_modified] - Last modified timestamp of cart
2004
+ * @property {boolean} [buy_now] - Buy now flag of user cart
2005
+ * @property {string} [gstin] - GSTIN number added in cart
2006
+ * @property {AppliedPromotion[]} [applied_promo_details] - List of applied
2007
+ * promotions data to cart which includes promotion id, promotion name, offer
2008
+ * text, description, buy rules, discount rules and promotion type
2009
+ * @property {boolean} [error] - Error details if any error occurs which
2010
+ * includes type of error, error code and error message
2011
+ * @property {string} [pan_no] - Permanent Account Number of the user
2012
+ * @property {Object} [custom_cart_meta] - Custom cart meta details added in cart
1650
2013
  */
1651
2014
 
1652
2015
  /**
1653
2016
  * @typedef UpdateCartShipmentItem
1654
2017
  * @property {number} [quantity] - Quantity of product in shipment
1655
2018
  * @property {string} shipment_type - Shipment delivery type
1656
- * @property {string} article_uid - Article mongo id
2019
+ * @property {string} article_uid - Article unique id for shipment
1657
2020
  */
1658
2021
 
1659
2022
  /**
1660
- * @typedef UpdateCartShipmentRequest
1661
- * @property {UpdateCartShipmentItem[]} shipments
2023
+ * @typedef UpdateCartShipmentCreation
2024
+ * @property {UpdateCartShipmentItem[]} shipments - List of Shipments which
2025
+ * includes shipment data like shipment items, shipment promise, Shipment
2026
+ * type, shipment order type, shipment dp options etc
1662
2027
  */
1663
2028
 
1664
2029
  /**
1665
- * @typedef PlatformCartMetaRequest
1666
- * @property {string} [gstin]
2030
+ * @typedef PlatformCartMetaCreation
2031
+ * @property {string} [gstin] - GSTIN number to be added in user cart
1667
2032
  * @property {Object} [pick_up_customer_details] - Customer contact details for
1668
2033
  * customer pickup at store
1669
- * @property {string} [checkout_mode]
1670
- * @property {Object} [gift_details]
1671
- * @property {string} [pan_no]
1672
- * @property {string} [comment]
2034
+ * @property {string} [checkout_mode] - Checkout mode of user cart
2035
+ * @property {Object} [gift_details] - Gift details is open json which can
2036
+ * include gift message
2037
+ * @property {string} [pan_no] - Permanent Account Number of the user
2038
+ * @property {string} [comment] - Comment message to be added in user cart
1673
2039
  * @property {string} [staff_user_id] - Staff user id
1674
2040
  */
1675
2041
 
1676
2042
  /**
1677
- * @typedef CartMetaResponse
1678
- * @property {boolean} [is_valid]
1679
- * @property {string} [message]
2043
+ * @typedef CartMetaDetails
2044
+ * @property {boolean} [is_valid] - Whether added meta was vaild
2045
+ * @property {string} [message] - Detailed message that used to display
1680
2046
  */
1681
2047
 
1682
2048
  /**
1683
- * @typedef CartMetaMissingResponse
1684
- * @property {string[]} [errors]
2049
+ * @typedef CartMetaMissingDetails
2050
+ * @property {string[]} [errors] - Detailed errors for invalid cart meta request
1685
2051
  */
1686
2052
 
1687
2053
  /**
1688
2054
  * @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
2055
+ * @property {string} [employee_code] - Employee code of staff who does checkout
2056
+ * on behalf of customer
2057
+ * @property {string} _id - Id of staff who does checkout on behalf of customer
2058
+ * @property {string} user - User id of the employee who does checkout on behalf
2059
+ * of customer
2060
+ * @property {string} last_name - Last name of staff employee who does checkout
2061
+ * on behalf of customer
2062
+ * @property {string} first_name - First name of staff emplyee who does checkout
2063
+ * on behalf of customer
1694
2064
  */
1695
2065
 
1696
2066
  /**
1697
2067
  * @typedef CustomerDetails
1698
- * @property {string} [name]
1699
- * @property {string} [email]
1700
- * @property {string} mobile
2068
+ * @property {string} [name] - Name of customer to be added in customer detail
2069
+ * while checkout
2070
+ * @property {string} [email] - Email address of the customer to be added in
2071
+ * customer detail while checkout
2072
+ * @property {string} mobile - Mobile number of customer to be added in customer
2073
+ * detail while checkout
1701
2074
  */
1702
2075
 
1703
2076
  /**
1704
2077
  * @typedef Files
1705
- * @property {string} key
1706
- * @property {string[]} values
2078
+ * @property {string} key - Key represents name of file
2079
+ * @property {string[]} values - List of urls path
2080
+ */
2081
+
2082
+ /**
2083
+ * @typedef CartCheckoutCustomMeta
2084
+ * @property {string} key - Key name of custom meta
2085
+ * @property {string} value - Value to be added in key
2086
+ */
2087
+
2088
+ /**
2089
+ * @typedef PlatformCartCheckoutDetailCreation
2090
+ * @property {CartCheckoutCustomMeta[]} [custom_meta]
2091
+ * @property {string} [address_id]
2092
+ * @property {string} [payment_identifier]
2093
+ * @property {Object} [payment_params]
2094
+ * @property {boolean} [payment_auto_confirm]
2095
+ * @property {string} id
2096
+ * @property {boolean} [pos]
2097
+ * @property {string} [billing_address_id]
2098
+ * @property {string} [merchant_code]
2099
+ * @property {string} [aggregator]
2100
+ * @property {number} [pick_at_store_uid]
2101
+ * @property {string} [device_id]
2102
+ * @property {Object} [delivery_address]
2103
+ * @property {string} payment_mode
2104
+ * @property {string} [checkout_mode]
2105
+ * @property {CustomerDetails} [customer_details] - Customer details
2106
+ * @property {Object} [meta]
2107
+ * @property {StaffCheckout} [staff]
2108
+ * @property {string} [employee_code]
2109
+ * @property {Object} [billing_address]
2110
+ * @property {string} [callback_url]
2111
+ * @property {string} [user_id]
2112
+ * @property {Object} [extra_meta]
2113
+ * @property {string} order_type
2114
+ * @property {Files[]} [files] - List of file url
2115
+ * @property {number} [ordering_store]
2116
+ * @property {Object} [payment_extra_identifiers]
2117
+ * @property {string} [iin]
2118
+ * @property {string} [network]
2119
+ * @property {string} [type]
2120
+ * @property {string} [card_id]
1707
2121
  */
1708
2122
 
1709
2123
  /**
1710
2124
  * @typedef CheckCart
1711
- * @property {string} [coupon_text]
1712
- * @property {string} [cod_message]
1713
- * @property {string} [id]
1714
- * @property {string} [store_code]
2125
+ * @property {string} [coupon_text] - Coupon text of the applied coupon on order placed
2126
+ * @property {string} [cod_message] - Cash On Delivery message for the order placed
2127
+ * @property {string} [id] - Cart id of the user cart
2128
+ * @property {string} [store_code] - Store code from which the order placed
1715
2129
  * @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]
2130
+ * @property {string} [comment] - Comment message added in cart after order placed
2131
+ * @property {string} [user_type] - User type of the cart who places the order
2132
+ * @property {CartProductInfo[]} [items] - Items details in cart after order placed
2133
+ * @property {string} [error_message] - Error details if any error occurs which
2134
+ * includes type of error, error code and error message
2135
+ * @property {boolean} [success] - Success flag of checkout cart API response
1721
2136
  * @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]
2137
+ * @property {string} [delivery_charge_info] - Delivery charge in information
2138
+ * message on shipment
2139
+ * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
2140
+ * the checkout process
2141
+ * @property {string} [order_id] - Order id generated after placing order
2142
+ * @property {string} [message] - Message of the cart checkout API response
1726
2143
  * @property {CartBreakup} [breakup_values]
1727
- * @property {number} [cod_charges]
1728
- * @property {boolean} [is_valid]
1729
- * @property {string} [uid]
1730
- * @property {string} [checkout_mode]
2144
+ * @property {number} [cod_charges] - Cash On Delivery charges of the user cart
2145
+ * @property {boolean} [is_valid] - Valid flag fotr the checkout response if
2146
+ * order placed was valid
2147
+ * @property {string} [uid] - Cart id of user cart
2148
+ * @property {string} [checkout_mode] - Checkout mode of user cart
1731
2149
  * @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]
2150
+ * @property {string} [last_modified] - Last modified timestamp of cart
2151
+ * @property {boolean} [buy_now] - Buy now flag of user cart
2152
+ * @property {number} [delivery_charge_order_value] - Delivery charge order value
2153
+ * @property {number} [cart_id] - Cart id of the user cart for which the order placed
2154
+ * @property {Object[]} [store_emps] - Store employees data
2155
+ * @property {string} [gstin] - GSTIN number added in cart
2156
+ * @property {boolean} [cod_available] - Whether Cash On Delivery available
2157
+ * @property {number} [delivery_charges] - Delivery charges of the order placed
2158
+ * via checkout API
2159
+ * @property {Object} [custom_cart_meta] - Custom meta details added cart
2160
+ * checkout API payload
2161
+ */
2162
+
2163
+ /**
2164
+ * @typedef CartCheckoutDetails
2165
+ * @property {string} [app_intercept_url] - App intercept url which is used to
2166
+ * redirect on app after payment in confirmed/failed
2167
+ * @property {Object} [data] - Data of the user cart checkout includes cart
2168
+ * data, address, user id, order type etc
2169
+ * @property {CheckCart} [cart]
2170
+ * @property {boolean} [success] - Success flag of cart checkout API response
2171
+ * @property {string} [callback_url] - Callback url to be redirected after
2172
+ * payment received/failed
2173
+ * @property {string} [payment_confirm_url] - Payment confirm url used to
2174
+ * redirect after payment is confirmed
2175
+ * @property {string} [order_id] - Order id generated after placing order
2176
+ * @property {string} [message] - Message of the cart checkout v2 API response
1741
2177
  */
1742
2178
 
1743
2179
  /**
1744
- * @typedef CartCheckoutResponse
2180
+ * @typedef CartCheckoutResult
1745
2181
  * @property {string} [app_intercept_url]
1746
2182
  * @property {Object} [data]
1747
2183
  * @property {CheckCart} [cart]
@@ -1753,157 +2189,204 @@ const Joi = require("joi");
1753
2189
  */
1754
2190
 
1755
2191
  /**
1756
- * @typedef CartDeliveryModesResponse
2192
+ * @typedef CartDeliveryModesDetails
1757
2193
  * @property {number[]} [pickup_stores] - Store pick up available store uids
1758
2194
  * @property {string[]} [available_modes] - Available delivery modes
1759
2195
  */
1760
2196
 
1761
2197
  /**
1762
2198
  * @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]
2199
+ * @property {string} [country] - Country of address
2200
+ * @property {string} [state] - State of the address
2201
+ * @property {string} [city] - City of the address
2202
+ * @property {string} [phone] - Phone number for address
2203
+ * @property {string} [area_code] - Area code of the address
2204
+ * @property {number} [uid] - Uid of the address
2205
+ * @property {string} [area_code_slug] - Area code slug for address. example
2206
+ * pincode is slug for India
2207
+ * @property {string} [address_type] - Address type of address
2208
+ * @property {string} [area] - Area description for address
2209
+ * @property {number} [id] - Id of the address
2210
+ * @property {string} [store_manager_name] - Name of store manager
2211
+ * @property {string} [name] - Name of person in address data to whom it belongs to
2212
+ * @property {string} [store_code] - Store code from which the order placed
2213
+ * @property {string} [landmark] - Landmark of address
2214
+ * @property {string} [email] - Email address for address data
2215
+ * @property {number} [pincode] - Address pincode
2216
+ * @property {string} [address] - Address description for address data
2217
+ */
2218
+
2219
+ /**
2220
+ * @typedef StoreDetails
2221
+ * @property {PickupStoreDetail[]} [items] - List of items need to pickup from store
2222
+ */
2223
+
2224
+ /**
2225
+ * @typedef CartPaymentUpdate
2226
+ * @property {string} [address_id] - Address id of the user on which the order
2227
+ * to be delivered
2228
+ * @property {string} [payment_mode] - Payment mode from which the payment to be
2229
+ * done for the order
2230
+ * @property {string} [aggregator_name] - Aggregator name of the payment gateway
2231
+ * @property {string} [merchant_code] - Merchant code of the payment mode
2232
+ * selected to do the payment
2233
+ * @property {string} [payment_identifier] - Payment identifier of the payment
2234
+ * mode selected to do the payment
2235
+ * @property {string} [id] - Cart id of the user cart
1795
2236
  */
1796
2237
 
1797
2238
  /**
1798
2239
  * @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]
2240
+ * @property {string} [title] - Coupon Title of the coupon applied
2241
+ * @property {boolean} [next_validation_required] - Flag for coupon validation
2242
+ * required on next page or not
2243
+ * @property {boolean} [valid] - Valid flag which denotes if the applied coupon
2244
+ * is valid or not
2245
+ * @property {string} [display_message_en] - Display message for coupon validity
2246
+ * @property {string} [code] - Coupon code of the coupon applied
2247
+ * @property {number} [discount] - Coupon discount value of the coupon applied
2248
+ * @property {string} [error_en] - Error message for the selected payment mode.
1805
2249
  */
1806
2250
 
1807
2251
  /**
1808
2252
  * @typedef PaymentCouponValidate
1809
- * @property {boolean} success
1810
- * @property {string} [message]
2253
+ * @property {boolean} success - Success flag of coupon payment mode validity API response
2254
+ * @property {string} [message] - Payment mode valid message for coupon
1811
2255
  * @property {CouponValidity} [coupon_validity]
1812
2256
  */
1813
2257
 
1814
2258
  /**
1815
2259
  * @typedef PaymentMeta
1816
- * @property {string} [payment_gateway]
1817
- * @property {string} [type]
1818
- * @property {string} [payment_identifier]
1819
- * @property {string} [merchant_code]
2260
+ * @property {string} [payment_gateway] - Payment gateway used to do the payment
2261
+ * @property {string} [type] - Type of card if payment mode is card to do the payment
2262
+ * @property {string} [payment_identifier] - Payment identifier of the payment
2263
+ * mode selected to do the payment
2264
+ * @property {string} [merchant_code] - Merchant code of the payment mode
2265
+ * selected to do the payment
1820
2266
  */
1821
2267
 
1822
2268
  /**
1823
2269
  * @typedef PaymentMethod
1824
- * @property {string} mode
1825
- * @property {string} [payment]
2270
+ * @property {string} mode - Payment mode of payment method used to make payment
2271
+ * @property {string} [payment] - Payment name of payment method used to make payment
1826
2272
  * @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
2273
+ * @property {number} [amount] - Amount of the payment mode to be paid
2274
+ * @property {string} [name] - Name of the payment mode used to make payment
2275
+ * @property {Object} [payment_extra_identifiers] - Payment extra identifier for
2276
+ * the payment mode to do the payment
2277
+ */
2278
+
2279
+ /**
2280
+ * @typedef PlatformCartCheckoutDetailV2Creation
2281
+ * @property {string} [address_id] - Address id of the user on which the order
2282
+ * to be delivered
2283
+ * @property {string} [payment_identifier] - Payment identifier of the payment
2284
+ * mode selected to do the payment
2285
+ * @property {Object} [payment_params] - Payment params which includes payment
2286
+ * identifier and merchant code
2287
+ * @property {CartCheckoutCustomMeta[]} [custom_meta] - Custom meta data to be
2288
+ * added in order
2289
+ * @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
2290
+ * payment need not to be collected from user
2291
+ * @property {string} id - Cart id of the user cart
2292
+ * @property {boolean} [pos] - Filed to determine whether user is making request
2293
+ * from pos or not
2294
+ * @property {string} [billing_address_id] - Billing address id of the customer
2295
+ * on which the invoice to be generated after the order is placed
2296
+ * @property {string} [merchant_code] - Merchant code of the payment mode
2297
+ * selected to do the payment
2298
+ * @property {string} [aggregator] - Aggregator name of the payment gateway
2299
+ * @property {number} [pick_at_store_uid] - Store id where we have to pick product
2300
+ * @property {string} [device_id] - Device id
2301
+ * @property {Object} [delivery_address] - Delivery address data which includes
2302
+ * customer address, customer phone, customer email, customer pincode,
2303
+ * customer landmark and customer name
2304
+ * @property {string} [payment_mode] - Payment mode from which the payment to be
2305
+ * done for the order
2306
+ * @property {string} [checkout_mode] - Mode of checkout used in cart
2307
+ * @property {CustomerDetails} [customer_details]
2308
+ * @property {Object} [meta] - Meta data to be added in order
2309
+ * @property {PaymentMethod[]} payment_methods - Payment methods list used to
2310
+ * make the payment
1852
2311
  * @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
2312
+ * @property {string} [employee_code] - Employee code of staff who does checkout
2313
+ * on behalf of customer
2314
+ * @property {Object} [billing_address] - Billing address json which includes
2315
+ * customer address, customer phone, customer email, customer pincode,
2316
+ * customer landmark and customer name
2317
+ * @property {string} [callback_url] - Callback url after payment received/failed
2318
+ * @property {string} user_id - The user id of user cart
2319
+ * @property {Object} [extra_meta] - Extra meta to be added while checkout in order
2320
+ * @property {string} order_type - Order type of the order being placed like
2321
+ * pickAtStore or HomeDelivery
1859
2322
  * @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]
2323
+ * @property {number} [ordering_store] - Ordering store id of the store from
2324
+ * which the order is getting placed
2325
+ * @property {string} [iin] - Issuer Identification Number number of card if
2326
+ * payment mode is card to do the payment
2327
+ * @property {string} [network] - Network of card if payment mode is card to do
2328
+ * the payment
2329
+ * @property {string} [type] - Type of cart if payment mode is card to do the payment
2330
+ * @property {string} [card_id] - Saved card id if payment mode is card to do the payment
1865
2331
  */
1866
2332
 
1867
2333
  /**
1868
2334
  * @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]
2335
+ * @property {string} [address_id] - Address id of the user address selected to
2336
+ * deliver the shipment
2337
+ * @property {string} [payment_mode] - Payment mode of the payment selected to
2338
+ * do the payment
2339
+ * @property {string} [aggregator_name] - Aggregator name of the payment gateway
2340
+ * @property {string} [merchant_code] - Merchant code of the payment mode
2341
+ * selected to do the payment
2342
+ * @property {string} [payment_identifier] - Payment identifier of the payment
2343
+ * mode selected to do the payment
2344
+ * @property {string} [id] - Cart id of the user cart for which the update cart
2345
+ * payment operation performed
1875
2346
  * @property {PaymentMethod[]} [payment_methods]
1876
2347
  */
1877
2348
 
1878
2349
  /**
1879
2350
  * @typedef PriceMinMax
1880
- * @property {number} [min]
1881
- * @property {number} [max]
2351
+ * @property {number} [min] - Min price of article added in user cart
2352
+ * @property {number} [max] - Max price of article added in user cart
1882
2353
  */
1883
2354
 
1884
2355
  /**
1885
2356
  * @typedef ItemPriceDetails
1886
2357
  * @property {PriceMinMax} [marked]
1887
2358
  * @property {PriceMinMax} [effective]
1888
- * @property {string} [currency]
2359
+ * @property {string} [currency] - The currency code for price
2360
+ */
2361
+
2362
+ /**
2363
+ * @typedef ArticlePriceDetails
2364
+ * @property {number} [marked] - The Marked Price refers to the initial price of
2365
+ * the free gift article before product discount.
2366
+ * @property {number} [effective] - The Effective Price refers to the final
2367
+ * amount of the free gift article after applying the product discount.
1889
2368
  */
1890
2369
 
1891
2370
  /**
1892
2371
  * @typedef FreeGiftItems
1893
- * @property {string} [item_slug] - Item slug
1894
- * @property {string} [item_name] - Item name
2372
+ * @property {string} [item_slug] - Free gift product slug
2373
+ * @property {string} [item_name] - Free gift product name
1895
2374
  * @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
2375
+ * @property {ArticlePriceDetails} [article_price]
2376
+ * @property {string} [item_brand_name] - Free gift product brand name
2377
+ * @property {number} [item_id] - Free gift product id
2378
+ * @property {string[]} [available_sizes] - Available sizes for the free gift item.
2379
+ * @property {string} [size] - Selected size for the free gift item.
2380
+ * @property {string[]} [item_images_url] - List of free gift product images URL
1899
2381
  */
1900
2382
 
1901
2383
  /**
1902
2384
  * @typedef PromotionOffer
1903
- * @property {string} [id] - Promotion id
2385
+ * @property {string} [id] - Promotion unique identifier
1904
2386
  * @property {Object} [buy_rules] - Buy rules of promotions
1905
- * @property {string} [offer_text] - Offer title
1906
- * @property {string} [promotion_type] - Promotion type
2387
+ * @property {string} [offer_text] - Offer title of promotion that used to display
2388
+ * @property {string} [promotion_type] - Type of Promotion like percentage,
2389
+ * amount, bogo etc.
1907
2390
  * @property {string} [promotion_name] - Name of the promotion
1908
2391
  * @property {string} [promotion_group] - Group of promotion belongs to
1909
2392
  * @property {string} [valid_till] - Datetime ISOString for promotion end date
@@ -1913,36 +2396,47 @@ const Joi = require("joi");
1913
2396
  */
1914
2397
 
1915
2398
  /**
1916
- * @typedef PromotionOffersResponse
1917
- * @property {PromotionOffer[]} [available_promotions]
2399
+ * @typedef PromotionOffersDetails
2400
+ * @property {PromotionOffer[]} [available_promotions] - List of available
2401
+ * promotion for product
1918
2402
  */
1919
2403
 
1920
2404
  /**
1921
2405
  * @typedef PromotionPaymentOffer
1922
- * @property {string} [application_id] - Application id
2406
+ * @property {string} [application_id] - Application id of the sales channel
1923
2407
  * @property {Object[]} [buy_rules] - Buy rules of promotions
1924
2408
  * @property {string} [calculate_on] - Price on which promotion calculated
1925
2409
  * @property {string} [description] - Offer details including T&C
1926
2410
  * @property {Object[]} [discount_rules] - Discount rules of promotions
1927
- * @property {string} [id] - Promotion id
1928
- * @property {string} [offer_text] - Offer title
2411
+ * @property {string} [id] - Promotion unique identifier
2412
+ * @property {string} [offer_text] - Offer title of promotion that used to display
1929
2413
  * @property {string} [promotion_group] - Group of promotion belongs to
1930
- * @property {string} [promotion_type] - Promotion type
2414
+ * @property {string} [promotion_type] - Type of Promotion like bogo, amount,
2415
+ * percentage etc.
1931
2416
  * @property {string} [promotion_name] - Name of the promotion
1932
2417
  */
1933
2418
 
1934
2419
  /**
1935
- * @typedef PromotionPaymentOffersResponse
1936
- * @property {boolean} [success]
2420
+ * @typedef PromotionPaymentOffersDetails
2421
+ * @property {boolean} [success] - Indicates if operation is successful or not.
1937
2422
  * @property {PromotionPaymentOffer[]} [promotions]
1938
2423
  */
1939
2424
 
2425
+ /**
2426
+ * @typedef ValidationError
2427
+ * @property {string} message - A brief description of the error encountered.
2428
+ * @property {string} field - The field in the request that caused the error.
2429
+ */
2430
+
1940
2431
  class CartPlatformModel {
1941
2432
  /** @returns {CouponDateMeta} */
1942
2433
  static CouponDateMeta() {
1943
2434
  return Joi.object({
1944
2435
  modified_on: Joi.string().allow("").allow(null),
1945
2436
  created_on: Joi.string().allow("").allow(null),
2437
+ approved_on: Joi.string().allow("").allow(null),
2438
+ rejected_on: Joi.string().allow("").allow(null),
2439
+ reviewed_on: Joi.string().allow("").allow(null),
1946
2440
  });
1947
2441
  }
1948
2442
 
@@ -1950,7 +2444,7 @@ class CartPlatformModel {
1950
2444
  static Ownership() {
1951
2445
  return Joi.object({
1952
2446
  payable_category: Joi.string().allow("").required(),
1953
- payable_by: Joi.string().allow("").required(),
2447
+ payable_by: Joi.string().allow("").allow(null),
1954
2448
  });
1955
2449
  }
1956
2450
 
@@ -1959,6 +2453,9 @@ class CartPlatformModel {
1959
2453
  return Joi.object({
1960
2454
  created_by: Joi.string().allow("").allow(null),
1961
2455
  modified_by: Joi.string().allow("").allow(null),
2456
+ approved_by: Joi.string().allow("").allow(null),
2457
+ rejected_by: Joi.string().allow("").allow(null),
2458
+ reviewed_by: Joi.string().allow("").allow(null),
1962
2459
  });
1963
2460
  }
1964
2461
 
@@ -2032,7 +2529,7 @@ class CartPlatformModel {
2032
2529
  /** @returns {Restrictions} */
2033
2530
  static Restrictions() {
2034
2531
  return Joi.object({
2035
- payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
2532
+ payments: CartPlatformModel.PaymentModes(),
2036
2533
  user_type: Joi.string().allow(""),
2037
2534
  price_range: CartPlatformModel.PriceRange(),
2038
2535
  platforms: Joi.array().items(Joi.string().allow("")),
@@ -2066,9 +2563,10 @@ class CartPlatformModel {
2066
2563
  static CouponSchedule() {
2067
2564
  return Joi.object({
2068
2565
  end: Joi.string().allow("").allow(null),
2069
- start: Joi.string().allow(""),
2566
+ start: Joi.string().allow("").allow(null),
2070
2567
  next_schedule: Joi.array().items(Joi.any()),
2071
2568
  cron: Joi.string().allow("").allow(null),
2569
+ status: Joi.string().allow(""),
2072
2570
  duration: Joi.number().allow(null),
2073
2571
  });
2074
2572
  }
@@ -2132,11 +2630,11 @@ class CartPlatformModel {
2132
2630
  return Joi.object({
2133
2631
  currency_code: Joi.string().allow(""),
2134
2632
  auto_apply: Joi.boolean(),
2135
- type: Joi.string().allow("").required(),
2633
+ type: Joi.string().allow(""),
2136
2634
  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(),
2635
+ applicable_on: Joi.string().allow(""),
2636
+ calculate_on: Joi.string().allow(""),
2637
+ value_type: Joi.string().allow(""),
2140
2638
  scope: Joi.array().items(Joi.string().allow("")),
2141
2639
  });
2142
2640
  }
@@ -2145,21 +2643,24 @@ class CartPlatformModel {
2145
2643
  static CouponAdd() {
2146
2644
  return Joi.object({
2147
2645
  date_meta: CartPlatformModel.CouponDateMeta(),
2148
- ownership: CartPlatformModel.Ownership().required(),
2646
+ ownership: CartPlatformModel.Ownership(),
2149
2647
  author: CartPlatformModel.CouponAuthor(),
2150
2648
  state: CartPlatformModel.State(),
2151
2649
  restrictions: CartPlatformModel.Restrictions(),
2152
2650
  validation: CartPlatformModel.Validation(),
2153
2651
  action: CartPlatformModel.CouponAction(),
2652
+ coupon_type: Joi.string().allow(""),
2653
+ coupon_prefix: Joi.string().allow("").allow(null),
2654
+ coupon_counts: Joi.number(),
2154
2655
  tags: Joi.array().items(Joi.string().allow("")),
2155
2656
  _schedule: CartPlatformModel.CouponSchedule(),
2156
- rule: Joi.array().items(CartPlatformModel.Rule()).required(),
2157
- display_meta: CartPlatformModel.DisplayMeta().required(),
2657
+ rule: Joi.array().items(CartPlatformModel.Rule()),
2658
+ display_meta: CartPlatformModel.DisplayMeta(),
2158
2659
  code: Joi.string().allow("").required(),
2159
2660
  type_slug: Joi.string().allow("").required(),
2160
- identifiers: CartPlatformModel.Identifier().required(),
2161
- validity: CartPlatformModel.Validity().required(),
2162
- rule_definition: CartPlatformModel.RuleDefinition().required(),
2661
+ identifiers: CartPlatformModel.Identifier(),
2662
+ validity: CartPlatformModel.Validity(),
2663
+ rule_definition: CartPlatformModel.RuleDefinition(),
2163
2664
  _id: Joi.string().allow(""),
2164
2665
  });
2165
2666
  }
@@ -2177,8 +2678,8 @@ class CartPlatformModel {
2177
2678
  });
2178
2679
  }
2179
2680
 
2180
- /** @returns {CouponsResponse} */
2181
- static CouponsResponse() {
2681
+ /** @returns {CouponsResult} */
2682
+ static CouponsResult() {
2182
2683
  return Joi.object({
2183
2684
  items: Joi.array().items(CartPlatformModel.CouponAdd()),
2184
2685
  page: CartPlatformModel.Page(),
@@ -2193,8 +2694,8 @@ class CartPlatformModel {
2193
2694
  });
2194
2695
  }
2195
2696
 
2196
- /** @returns {OperationErrorResponse} */
2197
- static OperationErrorResponse() {
2697
+ /** @returns {OperationErrorResult} */
2698
+ static OperationErrorResult() {
2198
2699
  return Joi.object({
2199
2700
  success: Joi.boolean(),
2200
2701
  message: Joi.string().allow(""),
@@ -2206,7 +2707,7 @@ class CartPlatformModel {
2206
2707
  static CouponUpdate() {
2207
2708
  return Joi.object({
2208
2709
  date_meta: CartPlatformModel.CouponDateMeta(),
2209
- ownership: CartPlatformModel.Ownership().required(),
2710
+ ownership: CartPlatformModel.Ownership(),
2210
2711
  author: CartPlatformModel.CouponAuthor(),
2211
2712
  state: CartPlatformModel.State(),
2212
2713
  restrictions: CartPlatformModel.Restrictions(),
@@ -2214,13 +2715,17 @@ class CartPlatformModel {
2214
2715
  action: CartPlatformModel.CouponAction(),
2215
2716
  tags: Joi.array().items(Joi.string().allow("")),
2216
2717
  _schedule: CartPlatformModel.CouponSchedule(),
2217
- rule: Joi.array().items(CartPlatformModel.Rule()).required(),
2218
- display_meta: CartPlatformModel.DisplayMeta().required(),
2718
+ rule: Joi.array().items(CartPlatformModel.Rule()),
2719
+ display_meta: CartPlatformModel.DisplayMeta(),
2219
2720
  code: Joi.string().allow("").required(),
2721
+ coupon_type: Joi.string().allow(""),
2722
+ coupon_prefix: Joi.string().allow("").allow(null),
2723
+ coupon_counts: Joi.number(),
2724
+ reason: Joi.string().allow("").allow(null),
2220
2725
  type_slug: Joi.string().allow("").required(),
2221
- identifiers: CartPlatformModel.Identifier().required(),
2222
- validity: CartPlatformModel.Validity().required(),
2223
- rule_definition: CartPlatformModel.RuleDefinition().required(),
2726
+ identifiers: CartPlatformModel.Identifier(),
2727
+ validity: CartPlatformModel.Validity(),
2728
+ rule_definition: CartPlatformModel.RuleDefinition(),
2224
2729
  });
2225
2730
  }
2226
2731
 
@@ -2232,32 +2737,48 @@ class CartPlatformModel {
2232
2737
  });
2233
2738
  }
2234
2739
 
2740
+ /** @returns {CouponCreateResult} */
2741
+ static CouponCreateResult() {
2742
+ return Joi.object({
2743
+ success: Joi.boolean(),
2744
+ message: Joi.string().allow(""),
2745
+ _id: Joi.string().allow(""),
2746
+ });
2747
+ }
2748
+
2235
2749
  /** @returns {DisplayMeta1} */
2236
2750
  static DisplayMeta1() {
2237
2751
  return Joi.object({
2238
- description: Joi.string().allow(""),
2752
+ description: Joi.string().allow("").allow(null),
2239
2753
  offer_label: Joi.string().allow(""),
2240
- name: Joi.string().allow(""),
2241
- offer_text: Joi.string().allow(""),
2754
+ name: Joi.string().allow("").allow(null),
2755
+ offer_text: Joi.string().allow("").allow(null),
2242
2756
  });
2243
2757
  }
2244
2758
 
2245
2759
  /** @returns {Ownership1} */
2246
2760
  static Ownership1() {
2247
2761
  return Joi.object({
2248
- payable_category: Joi.string().allow("").required(),
2249
- payable_by: Joi.string().allow("").required(),
2762
+ payable_category: Joi.string().allow(""),
2763
+ payable_by: Joi.string().allow(""),
2250
2764
  });
2251
2765
  }
2252
2766
 
2253
2767
  /** @returns {CompareObject} */
2254
2768
  static CompareObject() {
2255
2769
  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(),
2770
+ equals: Joi.number().allow(null),
2771
+ greater_than: Joi.number().allow(null),
2772
+ less_than_equals: Joi.number().allow(null),
2773
+ less_than: Joi.number().allow(null),
2774
+ greater_than_equals: Joi.number().allow(null),
2775
+ });
2776
+ }
2777
+
2778
+ /** @returns {ItemSizeMapping} */
2779
+ static ItemSizeMapping() {
2780
+ return Joi.object({
2781
+ item_size_mapping: Joi.object().pattern(/\S/, Joi.any()),
2261
2782
  });
2262
2783
  }
2263
2784
 
@@ -2301,7 +2822,7 @@ class CartPlatformModel {
2301
2822
  discount_price: Joi.number(),
2302
2823
  apportion_discount: Joi.boolean(),
2303
2824
  partial_can_ret: Joi.boolean(),
2304
- max_usage_per_transaction: Joi.number(),
2825
+ max_usage_per_transaction: Joi.number().allow(null),
2305
2826
  min_offer_quantity: Joi.number(),
2306
2827
  code: Joi.string().allow(""),
2307
2828
  discount_amount: Joi.number(),
@@ -2316,6 +2837,7 @@ class CartPlatformModel {
2316
2837
  discount_type: Joi.string().allow("").required(),
2317
2838
  buy_condition: Joi.string().allow("").required(),
2318
2839
  item_criteria: CartPlatformModel.ItemCriteria().required(),
2840
+ meta: CartPlatformModel.ItemSizeMapping(),
2319
2841
  offer: CartPlatformModel.DiscountOffer().required(),
2320
2842
  });
2321
2843
  }
@@ -2330,7 +2852,7 @@ class CartPlatformModel {
2330
2852
  /** @returns {PromotionPaymentModes} */
2331
2853
  static PromotionPaymentModes() {
2332
2854
  return Joi.object({
2333
- type: Joi.string().allow("").required(),
2855
+ type: Joi.string().allow(""),
2334
2856
  uses: CartPlatformModel.PaymentAllowValue1(),
2335
2857
  codes: Joi.array().items(Joi.string().allow("")),
2336
2858
  });
@@ -2371,7 +2893,7 @@ class CartPlatformModel {
2371
2893
  /** @returns {Restrictions1} */
2372
2894
  static Restrictions1() {
2373
2895
  return Joi.object({
2374
- payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
2896
+ payments: CartPlatformModel.PaymentModes(),
2375
2897
  user_registered: CartPlatformModel.UserRegistered(),
2376
2898
  platforms: Joi.array().items(Joi.string().allow("")),
2377
2899
  post_order: CartPlatformModel.PostOrder1(),
@@ -2379,7 +2901,7 @@ class CartPlatformModel {
2379
2901
  order_quantity: Joi.number(),
2380
2902
  anonymous_users: Joi.boolean(),
2381
2903
  user_id: Joi.array().items(Joi.string().allow("")),
2382
- uses: CartPlatformModel.UsesRestriction1().required(),
2904
+ uses: CartPlatformModel.UsesRestriction1(),
2383
2905
  ordering_stores: Joi.array().items(Joi.number()),
2384
2906
  });
2385
2907
  }
@@ -2387,9 +2909,10 @@ class CartPlatformModel {
2387
2909
  /** @returns {PromotionSchedule} */
2388
2910
  static PromotionSchedule() {
2389
2911
  return Joi.object({
2390
- end: Joi.string().allow("").required(),
2391
- start: Joi.string().allow("").required(),
2392
- published: Joi.boolean().required(),
2912
+ end: Joi.string().allow("").allow(null),
2913
+ start: Joi.string().allow("").allow(null),
2914
+ status: Joi.string().allow(""),
2915
+ published: Joi.boolean(),
2393
2916
  next_schedule: Joi.array().items(Joi.any()),
2394
2917
  cron: Joi.string().allow("").allow(null),
2395
2918
  duration: Joi.number().allow(null),
@@ -2399,8 +2922,8 @@ class CartPlatformModel {
2399
2922
  /** @returns {PromotionAction} */
2400
2923
  static PromotionAction() {
2401
2924
  return Joi.object({
2402
- action_date: Joi.string().allow("").allow(null).required(),
2403
- action_type: Joi.string().allow("").required(),
2925
+ action_date: Joi.string().allow("").allow(null),
2926
+ action_type: Joi.string().allow(""),
2404
2927
  });
2405
2928
  }
2406
2929
 
@@ -2409,14 +2932,17 @@ class CartPlatformModel {
2409
2932
  return Joi.object({
2410
2933
  created_by: Joi.string().allow("").allow(null),
2411
2934
  modified_by: Joi.string().allow("").allow(null),
2935
+ approved_by: Joi.string().allow("").allow(null),
2936
+ rejected_by: Joi.string().allow("").allow(null),
2937
+ reviewed_by: Joi.string().allow("").allow(null),
2412
2938
  });
2413
2939
  }
2414
2940
 
2415
2941
  /** @returns {Visibility} */
2416
2942
  static Visibility() {
2417
2943
  return Joi.object({
2418
- coupon_list: Joi.boolean().required(),
2419
- pdp: Joi.boolean().required(),
2944
+ coupon_list: Joi.boolean(),
2945
+ pdp: Joi.boolean(),
2420
2946
  });
2421
2947
  }
2422
2948
 
@@ -2425,6 +2951,9 @@ class CartPlatformModel {
2425
2951
  return Joi.object({
2426
2952
  modified_on: Joi.string().allow("").allow(null),
2427
2953
  created_on: Joi.string().allow("").allow(null),
2954
+ approved_on: Joi.string().allow("").allow(null),
2955
+ rejected_on: Joi.string().allow("").allow(null),
2956
+ reviewed_on: Joi.string().allow("").allow(null),
2428
2957
  });
2429
2958
  }
2430
2959
 
@@ -2445,6 +2974,7 @@ class CartPlatformModel {
2445
2974
  .required(),
2446
2975
  restrictions: CartPlatformModel.Restrictions1(),
2447
2976
  currency: Joi.string().allow(""),
2977
+ is_processed: Joi.boolean(),
2448
2978
  code: Joi.string().allow(""),
2449
2979
  _schedule: CartPlatformModel.PromotionSchedule(),
2450
2980
  post_order_action: CartPlatformModel.PromotionAction(),
@@ -2452,18 +2982,16 @@ class CartPlatformModel {
2452
2982
  author: CartPlatformModel.PromotionAuthor(),
2453
2983
  visiblility: CartPlatformModel.Visibility(),
2454
2984
  application_id: Joi.string().allow("").required(),
2455
- buy_rules: Joi.object()
2456
- .pattern(/\S/, CartPlatformModel.ItemCriteria())
2457
- .required(),
2458
- _custom_json: Joi.any(),
2985
+ buy_rules: CartPlatformModel.ItemCriteria().required(),
2986
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2459
2987
  date_meta: CartPlatformModel.PromotionDateMeta(),
2460
2988
  _id: Joi.string().allow(""),
2461
2989
  tags: Joi.array().items(Joi.string().allow("")),
2462
2990
  });
2463
2991
  }
2464
2992
 
2465
- /** @returns {PromotionsResponse} */
2466
- static PromotionsResponse() {
2993
+ /** @returns {PromotionsResult} */
2994
+ static PromotionsResult() {
2467
2995
  return Joi.object({
2468
2996
  items: Joi.array().items(CartPlatformModel.PromotionListItem()),
2469
2997
  page: CartPlatformModel.Page(),
@@ -2479,12 +3007,10 @@ class CartPlatformModel {
2479
3007
  promo_group: Joi.string().allow("").required(),
2480
3008
  mode: Joi.string().allow("").required(),
2481
3009
  apply_all_discount: Joi.boolean(),
2482
- display_meta: CartPlatformModel.DisplayMeta1().required(),
2483
- ownership: CartPlatformModel.Ownership1().required(),
3010
+ display_meta: CartPlatformModel.DisplayMeta1(),
3011
+ ownership: CartPlatformModel.Ownership1(),
2484
3012
  promotion_type: Joi.string().allow("").required(),
2485
- discount_rules: Joi.array()
2486
- .items(CartPlatformModel.DiscountRule())
2487
- .required(),
3013
+ discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
2488
3014
  restrictions: CartPlatformModel.Restrictions1(),
2489
3015
  currency: Joi.string().allow(""),
2490
3016
  code: Joi.string().allow(""),
@@ -2494,10 +3020,38 @@ class CartPlatformModel {
2494
3020
  author: CartPlatformModel.PromotionAuthor(),
2495
3021
  visiblility: CartPlatformModel.Visibility(),
2496
3022
  application_id: Joi.string().allow("").required(),
2497
- buy_rules: Joi.object()
2498
- .pattern(/\S/, CartPlatformModel.ItemCriteria())
2499
- .required(),
2500
- _custom_json: Joi.any(),
3023
+ buy_rules: CartPlatformModel.ItemCriteria(),
3024
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3025
+ date_meta: CartPlatformModel.PromotionDateMeta(),
3026
+ tags: Joi.array().items(Joi.string().allow("")),
3027
+ });
3028
+ }
3029
+
3030
+ /** @returns {PromotionAddResult} */
3031
+ static PromotionAddResult() {
3032
+ return Joi.object({
3033
+ stackable: Joi.boolean(),
3034
+ calculate_on: Joi.string().allow(""),
3035
+ apply_exclusive: Joi.string().allow("").allow(null),
3036
+ promo_group: Joi.string().allow("").required(),
3037
+ mode: Joi.string().allow("").required(),
3038
+ is_processed: Joi.boolean(),
3039
+ apply_all_discount: Joi.boolean(),
3040
+ display_meta: CartPlatformModel.DisplayMeta1(),
3041
+ ownership: CartPlatformModel.Ownership1(),
3042
+ promotion_type: Joi.string().allow("").required(),
3043
+ discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
3044
+ restrictions: CartPlatformModel.Restrictions1(),
3045
+ currency: Joi.string().allow(""),
3046
+ code: Joi.string().allow(""),
3047
+ _schedule: CartPlatformModel.PromotionSchedule(),
3048
+ post_order_action: CartPlatformModel.PromotionAction(),
3049
+ apply_priority: Joi.number(),
3050
+ author: CartPlatformModel.PromotionAuthor(),
3051
+ visiblility: CartPlatformModel.Visibility(),
3052
+ application_id: Joi.string().allow("").required(),
3053
+ buy_rules: CartPlatformModel.ItemCriteria(),
3054
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2501
3055
  date_meta: CartPlatformModel.PromotionDateMeta(),
2502
3056
  tags: Joi.array().items(Joi.string().allow("")),
2503
3057
  });
@@ -2509,15 +3063,14 @@ class CartPlatformModel {
2509
3063
  stackable: Joi.boolean(),
2510
3064
  calculate_on: Joi.string().allow(""),
2511
3065
  apply_exclusive: Joi.string().allow("").allow(null),
3066
+ reason: Joi.string().allow("").allow(null),
2512
3067
  promo_group: Joi.string().allow("").required(),
2513
3068
  mode: Joi.string().allow("").required(),
2514
3069
  apply_all_discount: Joi.boolean(),
2515
- display_meta: CartPlatformModel.DisplayMeta1().required(),
2516
- ownership: CartPlatformModel.Ownership1().required(),
3070
+ display_meta: CartPlatformModel.DisplayMeta1(),
3071
+ ownership: CartPlatformModel.Ownership1(),
2517
3072
  promotion_type: Joi.string().allow("").required(),
2518
- discount_rules: Joi.array()
2519
- .items(CartPlatformModel.DiscountRule())
2520
- .required(),
3073
+ discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
2521
3074
  restrictions: CartPlatformModel.Restrictions1(),
2522
3075
  currency: Joi.string().allow(""),
2523
3076
  code: Joi.string().allow(""),
@@ -2527,10 +3080,39 @@ class CartPlatformModel {
2527
3080
  author: CartPlatformModel.PromotionAuthor(),
2528
3081
  visiblility: CartPlatformModel.Visibility(),
2529
3082
  application_id: Joi.string().allow("").required(),
2530
- buy_rules: Joi.object()
2531
- .pattern(/\S/, CartPlatformModel.ItemCriteria())
2532
- .required(),
2533
- _custom_json: Joi.any(),
3083
+ buy_rules: CartPlatformModel.ItemCriteria(),
3084
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3085
+ date_meta: CartPlatformModel.PromotionDateMeta(),
3086
+ tags: Joi.array().items(Joi.string().allow("")),
3087
+ });
3088
+ }
3089
+
3090
+ /** @returns {PromotionUpdateResult} */
3091
+ static PromotionUpdateResult() {
3092
+ return Joi.object({
3093
+ stackable: Joi.boolean(),
3094
+ calculate_on: Joi.string().allow(""),
3095
+ apply_exclusive: Joi.string().allow("").allow(null),
3096
+ reason: Joi.string().allow("").allow(null),
3097
+ is_processed: Joi.boolean(),
3098
+ promo_group: Joi.string().allow("").required(),
3099
+ mode: Joi.string().allow("").required(),
3100
+ apply_all_discount: Joi.boolean(),
3101
+ display_meta: CartPlatformModel.DisplayMeta1(),
3102
+ ownership: CartPlatformModel.Ownership1(),
3103
+ promotion_type: Joi.string().allow("").required(),
3104
+ discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
3105
+ restrictions: CartPlatformModel.Restrictions1(),
3106
+ currency: Joi.string().allow(""),
3107
+ code: Joi.string().allow(""),
3108
+ _schedule: CartPlatformModel.PromotionSchedule(),
3109
+ post_order_action: CartPlatformModel.PromotionAction(),
3110
+ apply_priority: Joi.number(),
3111
+ author: CartPlatformModel.PromotionAuthor(),
3112
+ visiblility: CartPlatformModel.Visibility(),
3113
+ application_id: Joi.string().allow("").required(),
3114
+ buy_rules: CartPlatformModel.ItemCriteria(),
3115
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2534
3116
  date_meta: CartPlatformModel.PromotionDateMeta(),
2535
3117
  tags: Joi.array().items(Joi.string().allow("")),
2536
3118
  });
@@ -2544,8 +3126,8 @@ class CartPlatformModel {
2544
3126
  });
2545
3127
  }
2546
3128
 
2547
- /** @returns {ActivePromosResponse} */
2548
- static ActivePromosResponse() {
3129
+ /** @returns {ActivePromosResult} */
3130
+ static ActivePromosResult() {
2549
3131
  return Joi.object({
2550
3132
  entity_slug: Joi.string().allow(""),
2551
3133
  title: Joi.string().allow(""),
@@ -2614,14 +3196,14 @@ class CartPlatformModel {
2614
3196
  type: Joi.string().allow(""),
2615
3197
  article_id: Joi.string().allow("").required(),
2616
3198
  quantity: Joi.number(),
2617
- meta: Joi.any(),
3199
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2618
3200
  });
2619
3201
  }
2620
3202
 
2621
3203
  /** @returns {PriceAdjustmentRestrictions} */
2622
3204
  static PriceAdjustmentRestrictions() {
2623
3205
  return Joi.object({
2624
- post_order: Joi.any(),
3206
+ post_order: Joi.object().pattern(/\S/, Joi.any()),
2625
3207
  });
2626
3208
  }
2627
3209
 
@@ -2647,7 +3229,7 @@ class CartPlatformModel {
2647
3229
  allowed_refund: Joi.boolean(),
2648
3230
  is_authenticated: Joi.boolean().required(),
2649
3231
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
2650
- meta: Joi.any(),
3232
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2651
3233
  cart_id: Joi.string().allow("").required(),
2652
3234
  });
2653
3235
  }
@@ -2666,20 +3248,20 @@ class CartPlatformModel {
2666
3248
  allowed_refund: Joi.boolean(),
2667
3249
  is_authenticated: Joi.boolean().required(),
2668
3250
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
2669
- meta: Joi.any(),
3251
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2670
3252
  cart_id: Joi.string().allow("").required(),
2671
3253
  });
2672
3254
  }
2673
3255
 
2674
- /** @returns {PriceAdjustmentResponse} */
2675
- static PriceAdjustmentResponse() {
3256
+ /** @returns {PriceAdjustmentResult} */
3257
+ static PriceAdjustmentResult() {
2676
3258
  return Joi.object({
2677
3259
  data: CartPlatformModel.PriceAdjustment(),
2678
3260
  });
2679
3261
  }
2680
3262
 
2681
- /** @returns {GetPriceAdjustmentResponse} */
2682
- static GetPriceAdjustmentResponse() {
3263
+ /** @returns {GetPriceAdjustmentResult} */
3264
+ static GetPriceAdjustmentResult() {
2683
3265
  return Joi.object({
2684
3266
  data: Joi.array().items(CartPlatformModel.PriceAdjustment()),
2685
3267
  });
@@ -2699,7 +3281,7 @@ class CartPlatformModel {
2699
3281
  allowed_refund: Joi.boolean(),
2700
3282
  is_authenticated: Joi.boolean().required(),
2701
3283
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
2702
- meta: Joi.any(),
3284
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2703
3285
  cart_id: Joi.string().allow("").required(),
2704
3286
  });
2705
3287
  }
@@ -2713,8 +3295,8 @@ class CartPlatformModel {
2713
3295
  });
2714
3296
  }
2715
3297
 
2716
- /** @returns {OpenapiCartDetailsRequest} */
2717
- static OpenapiCartDetailsRequest() {
3298
+ /** @returns {OpenapiCartDetailsCreation} */
3299
+ static OpenapiCartDetailsCreation() {
2718
3300
  return Joi.object({
2719
3301
  cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
2720
3302
  });
@@ -2802,7 +3384,7 @@ class CartPlatformModel {
2802
3384
  /** @returns {Tags} */
2803
3385
  static Tags() {
2804
3386
  return Joi.object({
2805
- tags: Joi.any(),
3387
+ tags: Joi.object().pattern(/\S/, Joi.any()),
2806
3388
  });
2807
3389
  }
2808
3390
 
@@ -2821,12 +3403,28 @@ class CartPlatformModel {
2821
3403
  });
2822
3404
  }
2823
3405
 
3406
+ /** @returns {ProductActionParams} */
3407
+ static ProductActionParams() {
3408
+ return Joi.object({
3409
+ slug: Joi.array().items(Joi.string().allow("")),
3410
+ });
3411
+ }
3412
+
3413
+ /** @returns {ProductActionPage} */
3414
+ static ProductActionPage() {
3415
+ return Joi.object({
3416
+ type: Joi.string().allow(""),
3417
+ params: CartPlatformModel.ProductActionParams(),
3418
+ });
3419
+ }
3420
+
2824
3421
  /** @returns {ProductAction} */
2825
3422
  static ProductAction() {
2826
3423
  return Joi.object({
2827
3424
  type: Joi.string().allow(""),
2828
3425
  url: Joi.string().allow(""),
2829
3426
  query: CartPlatformModel.ActionQuery(),
3427
+ page: CartPlatformModel.ProductActionPage(),
2830
3428
  });
2831
3429
  }
2832
3430
 
@@ -2848,12 +3446,12 @@ class CartPlatformModel {
2848
3446
  action: CartPlatformModel.ProductAction(),
2849
3447
  uid: Joi.number(),
2850
3448
  tags: Joi.array().items(Joi.string().allow("")),
2851
- _custom_json: Joi.any(),
3449
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2852
3450
  type: Joi.string().allow(""),
2853
3451
  name: Joi.string().allow(""),
2854
3452
  item_code: Joi.string().allow("").allow(null),
2855
3453
  categories: Joi.array().items(CartPlatformModel.CategoryInfo()),
2856
- attributes: Joi.any(),
3454
+ attributes: Joi.object().pattern(/\S/, Joi.any()),
2857
3455
  });
2858
3456
  }
2859
3457
 
@@ -2890,19 +3488,19 @@ class CartPlatformModel {
2890
3488
  seller_identifier: Joi.string().allow(""),
2891
3489
  quantity: Joi.number(),
2892
3490
  seller: CartPlatformModel.BaseInfo(),
2893
- cart_item_meta: Joi.any(),
2894
- parent_item_identifiers: Joi.any(),
3491
+ cart_item_meta: Joi.object().pattern(/\S/, Joi.any()),
3492
+ parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
2895
3493
  is_gift_visible: Joi.boolean(),
2896
3494
  uid: Joi.string().allow(""),
2897
- gift_card: Joi.any(),
3495
+ gift_card: Joi.object().pattern(/\S/, Joi.any()),
2898
3496
  product_group_tags: Joi.array().items(Joi.string().allow("")),
2899
- identifier: Joi.any(),
3497
+ identifier: Joi.object().pattern(/\S/, Joi.any()),
2900
3498
  mto_quantity: Joi.number(),
2901
- extra_meta: Joi.any(),
3499
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
2902
3500
  type: Joi.string().allow(""),
2903
- _custom_json: Joi.any(),
3501
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2904
3502
  price: CartPlatformModel.ArticlePriceInfo(),
2905
- meta: Joi.any(),
3503
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2906
3504
  size: Joi.string().allow(""),
2907
3505
  store: CartPlatformModel.StoreInfo(),
2908
3506
  tags: Joi.array().items(Joi.string().allow("")),
@@ -2920,9 +3518,9 @@ class CartPlatformModel {
2920
3518
  /** @returns {DiscountRulesApp} */
2921
3519
  static DiscountRulesApp() {
2922
3520
  return Joi.object({
2923
- offer: Joi.any(),
2924
- raw_offer: Joi.any(),
2925
- item_criteria: Joi.any(),
3521
+ offer: Joi.object().pattern(/\S/, Joi.any()),
3522
+ raw_offer: Joi.object().pattern(/\S/, Joi.any()),
3523
+ item_criteria: Joi.object().pattern(/\S/, Joi.any()),
2926
3524
  matched_buy_rules: Joi.array().items(Joi.string().allow("")),
2927
3525
  });
2928
3526
  }
@@ -2940,8 +3538,8 @@ class CartPlatformModel {
2940
3538
  /** @returns {BuyRules} */
2941
3539
  static BuyRules() {
2942
3540
  return Joi.object({
2943
- cart_conditions: Joi.any(),
2944
- item_criteria: Joi.any(),
3541
+ cart_conditions: Joi.object().pattern(/\S/, Joi.any()),
3542
+ item_criteria: Joi.object().pattern(/\S/, Joi.any()),
2945
3543
  });
2946
3544
  }
2947
3545
 
@@ -2963,7 +3561,7 @@ class CartPlatformModel {
2963
3561
  mrp_promotion: Joi.boolean(),
2964
3562
  promotion_group: Joi.string().allow(""),
2965
3563
  promo_id: Joi.string().allow(""),
2966
- meta: Joi.any(),
3564
+ meta: Joi.object().pattern(/\S/, Joi.any()),
2967
3565
  code: Joi.string().allow("").allow(null),
2968
3566
  });
2969
3567
  }
@@ -3073,7 +3671,7 @@ class CartPlatformModel {
3073
3671
  quantity: Joi.number(),
3074
3672
  product: CartPlatformModel.CartProduct(),
3075
3673
  product_ean_id: Joi.string().allow(""),
3076
- parent_item_identifiers: Joi.any(),
3674
+ parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
3077
3675
  is_set: Joi.boolean(),
3078
3676
  article: CartPlatformModel.ProductArticle(),
3079
3677
  promotions_applied: Joi.array().items(
@@ -3082,22 +3680,22 @@ class CartPlatformModel {
3082
3680
  delivery_promise: CartPlatformModel.ShipmentPromise(),
3083
3681
  key: Joi.string().allow(""),
3084
3682
  coupon: CartPlatformModel.CouponDetails(),
3085
- bulk_offer: Joi.any(),
3683
+ bulk_offer: Joi.object().pattern(/\S/, Joi.any()),
3086
3684
  price: CartPlatformModel.ProductPriceInfo(),
3087
3685
  coupon_message: Joi.string().allow(""),
3088
3686
  identifiers: CartPlatformModel.CartProductIdentifer().required(),
3089
3687
  message: Joi.string().allow(""),
3090
3688
  discount: Joi.string().allow(""),
3091
3689
  availability: CartPlatformModel.ProductAvailability(),
3092
- moq: Joi.any(),
3690
+ moq: Joi.object().pattern(/\S/, Joi.any()),
3093
3691
  price_per_unit: CartPlatformModel.ProductPriceInfo(),
3094
3692
  promo_meta: CartPlatformModel.PromoMeta(),
3095
- custom_order: Joi.any(),
3693
+ custom_order: Joi.object().pattern(/\S/, Joi.any()),
3096
3694
  });
3097
3695
  }
3098
3696
 
3099
- /** @returns {OpenapiCartDetailsResponse} */
3100
- static OpenapiCartDetailsResponse() {
3697
+ /** @returns {OpenapiCartDetailsResult} */
3698
+ static OpenapiCartDetailsResult() {
3101
3699
  return Joi.object({
3102
3700
  is_valid: Joi.boolean(),
3103
3701
  message: Joi.string().allow(""),
@@ -3106,12 +3704,12 @@ class CartPlatformModel {
3106
3704
  });
3107
3705
  }
3108
3706
 
3109
- /** @returns {OpenApiErrorResponse} */
3110
- static OpenApiErrorResponse() {
3707
+ /** @returns {OpenApiErrorResult} */
3708
+ static OpenApiErrorResult() {
3111
3709
  return Joi.object({
3112
3710
  success: Joi.boolean(),
3113
3711
  message: Joi.string().allow(""),
3114
- errors: Joi.any(),
3712
+ errors: Joi.object().pattern(/\S/, Joi.any()),
3115
3713
  });
3116
3714
  }
3117
3715
 
@@ -3125,7 +3723,7 @@ class CartPlatformModel {
3125
3723
  area_code: Joi.string().allow("").required(),
3126
3724
  country_iso_code: Joi.string().allow(""),
3127
3725
  country_phone_code: Joi.string().allow(""),
3128
- meta: Joi.any(),
3726
+ meta: Joi.object().pattern(/\S/, Joi.any()),
3129
3727
  address_type: Joi.string().allow(""),
3130
3728
  area: Joi.string().allow(""),
3131
3729
  area_code_slug: Joi.string().allow(""),
@@ -3138,16 +3736,16 @@ class CartPlatformModel {
3138
3736
  });
3139
3737
  }
3140
3738
 
3141
- /** @returns {OpenApiCartServiceabilityRequest} */
3142
- static OpenApiCartServiceabilityRequest() {
3739
+ /** @returns {OpenApiCartServiceabilityCreation} */
3740
+ static OpenApiCartServiceabilityCreation() {
3143
3741
  return Joi.object({
3144
3742
  cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
3145
3743
  shipping_address: CartPlatformModel.ShippingAddress().required(),
3146
3744
  });
3147
3745
  }
3148
3746
 
3149
- /** @returns {OpenApiCartServiceabilityResponse} */
3150
- static OpenApiCartServiceabilityResponse() {
3747
+ /** @returns {OpenApiCartServiceabilityResult} */
3748
+ static OpenApiCartServiceabilityResult() {
3151
3749
  return Joi.object({
3152
3750
  is_valid: Joi.boolean(),
3153
3751
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -3178,7 +3776,7 @@ class CartPlatformModel {
3178
3776
  return Joi.object({
3179
3777
  payment_id: Joi.string().allow("").allow(null),
3180
3778
  payment_gateway: Joi.string().allow("").allow(null),
3181
- extra_meta: Joi.any().allow(null),
3779
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3182
3780
  current_status: Joi.string().allow("").allow(null),
3183
3781
  order_id: Joi.string().allow("").allow(null),
3184
3782
  });
@@ -3206,7 +3804,7 @@ class CartPlatformModel {
3206
3804
  price_marked: Joi.number().required(),
3207
3805
  files: Joi.array().items(CartPlatformModel.OpenApiFiles()),
3208
3806
  meta: CartPlatformModel.CartItemMeta(),
3209
- extra_meta: Joi.any(),
3807
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
3210
3808
  product_id: Joi.number().required(),
3211
3809
  loyalty_discount: Joi.number(),
3212
3810
  discount: Joi.number().required(),
@@ -3233,7 +3831,7 @@ class CartPlatformModel {
3233
3831
  payment_methods: Joi.array()
3234
3832
  .items(CartPlatformModel.MultiTenderPaymentMethod())
3235
3833
  .required(),
3236
- employee_discount: Joi.any(),
3834
+ employee_discount: Joi.object().pattern(/\S/, Joi.any()),
3237
3835
  coupon: Joi.string().allow(""),
3238
3836
  cashback_applied: Joi.number().required(),
3239
3837
  gstin: Joi.string().allow("").allow(null),
@@ -3249,8 +3847,8 @@ class CartPlatformModel {
3249
3847
  });
3250
3848
  }
3251
3849
 
3252
- /** @returns {OpenApiCheckoutResponse} */
3253
- static OpenApiCheckoutResponse() {
3850
+ /** @returns {OpenApiCheckoutResult} */
3851
+ static OpenApiCheckoutResult() {
3254
3852
  return Joi.object({
3255
3853
  success: Joi.boolean(),
3256
3854
  message: Joi.string().allow(""),
@@ -3263,46 +3861,48 @@ class CartPlatformModel {
3263
3861
  static AbandonedCart() {
3264
3862
  return Joi.object({
3265
3863
  expire_at: Joi.string().allow("").required(),
3266
- promotion: Joi.any(),
3864
+ promotion: Joi.object().pattern(/\S/, Joi.any()),
3267
3865
  is_default: Joi.boolean().required(),
3268
3866
  comment: Joi.string().allow("").allow(null),
3269
3867
  articles: Joi.array().items(Joi.any()).required(),
3270
- coupon: Joi.any().allow(null),
3868
+ coupon: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3271
3869
  bulk_coupon_discount: Joi.number().allow(null),
3272
3870
  _id: Joi.string().allow("").required(),
3273
- fynd_credits: Joi.any(),
3871
+ fynd_credits: Joi.object().pattern(/\S/, Joi.any()),
3274
3872
  fc_index_map: Joi.array().items(Joi.number()),
3275
3873
  order_id: Joi.string().allow(""),
3276
3874
  discount: Joi.number(),
3277
- cod_charges: Joi.any(),
3278
- payments: Joi.any().allow(null),
3875
+ cod_charges: Joi.object().pattern(/\S/, Joi.any()),
3876
+ payments: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3279
3877
  payment_mode: Joi.string().allow("").allow(null),
3280
3878
  shipments: Joi.array().items(Joi.any()),
3281
- pick_up_customer_details: Joi.any().allow(null),
3879
+ pick_up_customer_details: Joi.object()
3880
+ .pattern(/\S/, Joi.any())
3881
+ .allow(null, ""),
3282
3882
  uid: Joi.number().required(),
3283
3883
  checkout_mode: Joi.string().allow(""),
3284
3884
  cart_value: Joi.number(),
3285
3885
  is_archive: Joi.boolean(),
3286
3886
  created_on: Joi.string().allow("").required(),
3287
3887
  last_modified: Joi.string().allow("").required(),
3288
- meta: Joi.any().allow(null),
3888
+ meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3289
3889
  buy_now: Joi.boolean(),
3290
3890
  is_active: Joi.boolean(),
3291
- cashback: Joi.any().required(),
3891
+ cashback: Joi.object().pattern(/\S/, Joi.any()).required(),
3292
3892
  payment_methods: Joi.array().items(Joi.any()),
3293
3893
  gstin: Joi.string().allow("").allow(null),
3294
- delivery_charges: Joi.any(),
3894
+ delivery_charges: Joi.object().pattern(/\S/, Joi.any()),
3295
3895
  merge_qty: Joi.boolean().allow(null),
3296
3896
  user_id: Joi.string().allow("").required(),
3297
3897
  app_id: Joi.string().allow(""),
3298
3898
  });
3299
3899
  }
3300
3900
 
3301
- /** @returns {AbandonedCartResponse} */
3302
- static AbandonedCartResponse() {
3901
+ /** @returns {AbandonedCartResult} */
3902
+ static AbandonedCartResult() {
3303
3903
  return Joi.object({
3304
3904
  items: Joi.array().items(CartPlatformModel.AbandonedCart()),
3305
- result: Joi.any(),
3905
+ result: Joi.object().pattern(/\S/, Joi.any()),
3306
3906
  page: CartPlatformModel.Page(),
3307
3907
  success: Joi.boolean(),
3308
3908
  message: Joi.string().allow(""),
@@ -3371,14 +3971,14 @@ class CartPlatformModel {
3371
3971
  });
3372
3972
  }
3373
3973
 
3374
- /** @returns {CartDetailResponse} */
3375
- static CartDetailResponse() {
3974
+ /** @returns {CartDetailResult} */
3975
+ static CartDetailResult() {
3376
3976
  return Joi.object({
3377
3977
  cart_id: Joi.number(),
3378
3978
  uid: Joi.string().allow(""),
3379
3979
  coupon_text: Joi.string().allow(""),
3380
3980
  id: Joi.string().allow(""),
3381
- pan_config: Joi.any(),
3981
+ pan_config: Joi.object().pattern(/\S/, Joi.any()),
3382
3982
  delivery_promise: CartPlatformModel.ShipmentPromise(),
3383
3983
  comment: Joi.string().allow(""),
3384
3984
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -3388,7 +3988,7 @@ class CartPlatformModel {
3388
3988
  coupon: CartPlatformModel.CartDetailCoupon(),
3389
3989
  restrict_checkout: Joi.boolean(),
3390
3990
  message: Joi.string().allow(""),
3391
- notification: Joi.any(),
3991
+ notification: Joi.object().pattern(/\S/, Joi.any()),
3392
3992
  staff_user_id: Joi.string().allow(""),
3393
3993
  success: Joi.boolean(),
3394
3994
  breakup_values: CartPlatformModel.CartBreakup(),
@@ -3402,7 +4002,7 @@ class CartPlatformModel {
3402
4002
  CartPlatformModel.AppliedPromotion()
3403
4003
  ),
3404
4004
  pan_no: Joi.string().allow(""),
3405
- custom_cart_meta: Joi.any(),
4005
+ custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3406
4006
  });
3407
4007
  }
3408
4008
 
@@ -3417,31 +4017,31 @@ class CartPlatformModel {
3417
4017
  ),
3418
4018
  product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
3419
4019
  article_id: Joi.string().allow(""),
3420
- article_assignment: Joi.any(),
4020
+ article_assignment: Joi.object().pattern(/\S/, Joi.any()),
3421
4021
  store_id: Joi.number(),
3422
4022
  display: Joi.string().allow(""),
3423
4023
  item_id: Joi.number(),
3424
- extra_meta: Joi.any(),
3425
- _custom_json: Joi.any(),
3426
- meta: Joi.any(),
4024
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4025
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
4026
+ meta: Joi.object().pattern(/\S/, Joi.any()),
3427
4027
  pos: Joi.boolean(),
3428
4028
  seller_identifier: Joi.string().allow(""),
3429
4029
  });
3430
4030
  }
3431
4031
 
3432
- /** @returns {AddCartRequest} */
3433
- static AddCartRequest() {
4032
+ /** @returns {AddCartCreation} */
4033
+ static AddCartCreation() {
3434
4034
  return Joi.object({
3435
4035
  new_cart: Joi.boolean(),
3436
4036
  items: Joi.array().items(CartPlatformModel.AddProductCart()),
3437
4037
  });
3438
4038
  }
3439
4039
 
3440
- /** @returns {AddCartDetailResponse} */
3441
- static AddCartDetailResponse() {
4040
+ /** @returns {AddCartDetailResult} */
4041
+ static AddCartDetailResult() {
3442
4042
  return Joi.object({
3443
4043
  success: Joi.boolean(),
3444
- cart: CartPlatformModel.CartDetailResponse(),
4044
+ cart: CartPlatformModel.CartDetailResult(),
3445
4045
  partial: Joi.boolean(),
3446
4046
  message: Joi.string().allow(""),
3447
4047
  });
@@ -3452,10 +4052,10 @@ class CartPlatformModel {
3452
4052
  return Joi.object({
3453
4053
  quantity: Joi.number(),
3454
4054
  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(),
4055
+ parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
4056
+ meta: Joi.object().pattern(/\S/, Joi.any()),
4057
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4058
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3459
4059
  item_id: Joi.number(),
3460
4060
  item_index: Joi.number(),
3461
4061
  identifiers: CartPlatformModel.CartProductIdentifer().required(),
@@ -3463,19 +4063,31 @@ class CartPlatformModel {
3463
4063
  });
3464
4064
  }
3465
4065
 
3466
- /** @returns {UpdateCartRequest} */
3467
- static UpdateCartRequest() {
4066
+ /** @returns {FreeGiftItemCreation} */
4067
+ static FreeGiftItemCreation() {
4068
+ return Joi.object({
4069
+ promotion_id: Joi.string().allow("").required(),
4070
+ item_id: Joi.string().allow("").required(),
4071
+ item_size: Joi.string().allow("").required(),
4072
+ });
4073
+ }
4074
+
4075
+ /** @returns {UpdateCartCreation} */
4076
+ static UpdateCartCreation() {
3468
4077
  return Joi.object({
3469
4078
  items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
4079
+ free_gift_items: Joi.array().items(
4080
+ CartPlatformModel.FreeGiftItemCreation()
4081
+ ),
3470
4082
  operation: Joi.string().allow("").required(),
3471
4083
  });
3472
4084
  }
3473
4085
 
3474
- /** @returns {UpdateCartDetailResponse} */
3475
- static UpdateCartDetailResponse() {
4086
+ /** @returns {UpdateCartDetailResult} */
4087
+ static UpdateCartDetailResult() {
3476
4088
  return Joi.object({
3477
4089
  success: Joi.boolean(),
3478
- cart: CartPlatformModel.CartDetailResponse(),
4090
+ cart: CartPlatformModel.CartDetailResult(),
3479
4091
  message: Joi.string().allow(""),
3480
4092
  });
3481
4093
  }
@@ -3501,7 +4113,7 @@ class CartPlatformModel {
3501
4113
  price_marked: Joi.number().required(),
3502
4114
  amount_paid: Joi.number().required(),
3503
4115
  promo_list: Joi.array().items(CartPlatformModel.OverrideCartItemPromo()),
3504
- extra_meta: Joi.any(),
4116
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
3505
4117
  item_id: Joi.number().required(),
3506
4118
  discount: Joi.number().required(),
3507
4119
  price_effective: Joi.number().required(),
@@ -3513,9 +4125,9 @@ class CartPlatformModel {
3513
4125
  return Joi.object({
3514
4126
  cart_id: Joi.string().allow("").required(),
3515
4127
  payment_mode: Joi.string().allow("").required(),
3516
- billing_address: Joi.any(),
4128
+ billing_address: Joi.object().pattern(/\S/, Joi.any()),
3517
4129
  merchant_code: Joi.string().allow("").required(),
3518
- payment_identifier: Joi.string().allow("").allow(null).required(),
4130
+ payment_identifier: Joi.string().allow("").required(),
3519
4131
  currency_code: Joi.string().allow("").required(),
3520
4132
  aggregator: Joi.string().allow("").required(),
3521
4133
  order_type: Joi.string().allow("").required(),
@@ -3524,31 +4136,31 @@ class CartPlatformModel {
3524
4136
  .items(CartPlatformModel.OverrideCartItem())
3525
4137
  .required(),
3526
4138
  ordering_store: Joi.number().allow(null),
3527
- shipping_address: Joi.any(),
4139
+ shipping_address: Joi.object().pattern(/\S/, Joi.any()),
3528
4140
  });
3529
4141
  }
3530
4142
 
3531
- /** @returns {OverrideCheckoutResponse} */
3532
- static OverrideCheckoutResponse() {
4143
+ /** @returns {OverrideCheckoutResult} */
4144
+ static OverrideCheckoutResult() {
3533
4145
  return Joi.object({
3534
- data: Joi.any().required(),
3535
- cart: Joi.any().required(),
4146
+ data: Joi.object().pattern(/\S/, Joi.any()).required(),
4147
+ cart: Joi.object().pattern(/\S/, Joi.any()).required(),
3536
4148
  success: Joi.string().allow("").required(),
3537
4149
  order_id: Joi.string().allow("").required(),
3538
4150
  message: Joi.string().allow("").required(),
3539
4151
  });
3540
4152
  }
3541
4153
 
3542
- /** @returns {GetShareCartLinkRequest} */
3543
- static GetShareCartLinkRequest() {
4154
+ /** @returns {GetShareCartLinkCreation} */
4155
+ static GetShareCartLinkCreation() {
3544
4156
  return Joi.object({
3545
4157
  id: Joi.string().allow(""),
3546
- meta: Joi.any(),
4158
+ meta: Joi.object().pattern(/\S/, Joi.any()),
3547
4159
  });
3548
4160
  }
3549
4161
 
3550
- /** @returns {GetShareCartLinkResponse} */
3551
- static GetShareCartLinkResponse() {
4162
+ /** @returns {GetShareCartLinkResult} */
4163
+ static GetShareCartLinkResult() {
3552
4164
  return Joi.object({
3553
4165
  token: Joi.string().allow(""),
3554
4166
  share_url: Joi.string().allow(""),
@@ -3558,11 +4170,11 @@ class CartPlatformModel {
3558
4170
  /** @returns {SharedCartDetails} */
3559
4171
  static SharedCartDetails() {
3560
4172
  return Joi.object({
3561
- source: Joi.any(),
3562
- user: Joi.any(),
4173
+ source: Joi.object().pattern(/\S/, Joi.any()),
4174
+ user: Joi.object().pattern(/\S/, Joi.any()),
3563
4175
  token: Joi.string().allow(""),
3564
4176
  created_on: Joi.string().allow(""),
3565
- meta: Joi.any(),
4177
+ meta: Joi.object().pattern(/\S/, Joi.any()),
3566
4178
  });
3567
4179
  }
3568
4180
 
@@ -3588,12 +4200,12 @@ class CartPlatformModel {
3588
4200
  buy_now: Joi.boolean(),
3589
4201
  cart_id: Joi.number(),
3590
4202
  gstin: Joi.string().allow(""),
3591
- custom_cart_meta: Joi.any(),
4203
+ custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3592
4204
  });
3593
4205
  }
3594
4206
 
3595
- /** @returns {SharedCartResponse} */
3596
- static SharedCartResponse() {
4207
+ /** @returns {SharedCartResult} */
4208
+ static SharedCartResult() {
3597
4209
  return Joi.object({
3598
4210
  cart: CartPlatformModel.SharedCart(),
3599
4211
  error: Joi.string().allow(""),
@@ -3604,7 +4216,7 @@ class CartPlatformModel {
3604
4216
  static CartList() {
3605
4217
  return Joi.object({
3606
4218
  cart_id: Joi.string().allow(""),
3607
- pick_up_customer_details: Joi.any(),
4219
+ pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()),
3608
4220
  cart_value: Joi.number(),
3609
4221
  created_on: Joi.string().allow(""),
3610
4222
  user_id: Joi.string().allow(""),
@@ -3613,8 +4225,8 @@ class CartPlatformModel {
3613
4225
  });
3614
4226
  }
3615
4227
 
3616
- /** @returns {MultiCartResponse} */
3617
- static MultiCartResponse() {
4228
+ /** @returns {MultiCartResult} */
4229
+ static MultiCartResult() {
3618
4230
  return Joi.object({
3619
4231
  success: Joi.boolean(),
3620
4232
  data: Joi.array().items(CartPlatformModel.CartList()),
@@ -3643,13 +4255,13 @@ class CartPlatformModel {
3643
4255
  });
3644
4256
  }
3645
4257
 
3646
- /** @returns {UserCartMappingResponse} */
3647
- static UserCartMappingResponse() {
4258
+ /** @returns {UserCartMappingResult} */
4259
+ static UserCartMappingResult() {
3648
4260
  return Joi.object({
3649
4261
  coupon_text: Joi.string().allow(""),
3650
4262
  user: CartPlatformModel.UserInfo(),
3651
4263
  id: Joi.string().allow(""),
3652
- pan_config: Joi.any(),
4264
+ pan_config: Joi.object().pattern(/\S/, Joi.any()),
3653
4265
  delivery_promise: CartPlatformModel.ShipmentPromise(),
3654
4266
  comment: Joi.string().allow(""),
3655
4267
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -3664,7 +4276,7 @@ class CartPlatformModel {
3664
4276
  last_modified: Joi.string().allow(""),
3665
4277
  buy_now: Joi.boolean(),
3666
4278
  gstin: Joi.string().allow(""),
3667
- custom_cart_meta: Joi.any(),
4279
+ custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3668
4280
  applied_promo_details: Joi.array().items(
3669
4281
  CartPlatformModel.AppliedPromotion()
3670
4282
  ),
@@ -3672,8 +4284,8 @@ class CartPlatformModel {
3672
4284
  });
3673
4285
  }
3674
4286
 
3675
- /** @returns {PlatformAddCartRequest} */
3676
- static PlatformAddCartRequest() {
4287
+ /** @returns {PlatformAddCartDetails} */
4288
+ static PlatformAddCartDetails() {
3677
4289
  return Joi.object({
3678
4290
  user_id: Joi.string().allow(""),
3679
4291
  new_cart: Joi.boolean(),
@@ -3681,32 +4293,35 @@ class CartPlatformModel {
3681
4293
  });
3682
4294
  }
3683
4295
 
3684
- /** @returns {PlatformUpdateCartRequest} */
3685
- static PlatformUpdateCartRequest() {
4296
+ /** @returns {PlatformUpdateCartDetails} */
4297
+ static PlatformUpdateCartDetails() {
3686
4298
  return Joi.object({
3687
4299
  user_id: Joi.string().allow(""),
3688
4300
  items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
4301
+ free_gift_items: Joi.array().items(
4302
+ CartPlatformModel.FreeGiftItemCreation()
4303
+ ),
3689
4304
  operation: Joi.string().allow("").required(),
3690
4305
  });
3691
4306
  }
3692
4307
 
3693
- /** @returns {DeleteCartRequest} */
3694
- static DeleteCartRequest() {
4308
+ /** @returns {DeleteCartDetails} */
4309
+ static DeleteCartDetails() {
3695
4310
  return Joi.object({
3696
4311
  cart_id_list: Joi.array().items(Joi.string().allow("")),
3697
4312
  });
3698
4313
  }
3699
4314
 
3700
- /** @returns {DeleteCartDetailResponse} */
3701
- static DeleteCartDetailResponse() {
4315
+ /** @returns {DeleteCartDetailResult} */
4316
+ static DeleteCartDetailResult() {
3702
4317
  return Joi.object({
3703
4318
  success: Joi.boolean(),
3704
4319
  message: Joi.string().allow(""),
3705
4320
  });
3706
4321
  }
3707
4322
 
3708
- /** @returns {CartItemCountResponse} */
3709
- static CartItemCountResponse() {
4323
+ /** @returns {CartItemCountResult} */
4324
+ static CartItemCountResult() {
3710
4325
  return Joi.object({
3711
4326
  user_cart_items_count: Joi.number(),
3712
4327
  });
@@ -3744,16 +4359,16 @@ class CartPlatformModel {
3744
4359
  });
3745
4360
  }
3746
4361
 
3747
- /** @returns {GetCouponResponse} */
3748
- static GetCouponResponse() {
4362
+ /** @returns {GetCouponResult} */
4363
+ static GetCouponResult() {
3749
4364
  return Joi.object({
3750
4365
  available_coupon_list: Joi.array().items(CartPlatformModel.Coupon()),
3751
4366
  page: CartPlatformModel.PageCoupon(),
3752
4367
  });
3753
4368
  }
3754
4369
 
3755
- /** @returns {ApplyCouponRequest} */
3756
- static ApplyCouponRequest() {
4370
+ /** @returns {ApplyCouponDetails} */
4371
+ static ApplyCouponDetails() {
3757
4372
  return Joi.object({
3758
4373
  coupon_code: Joi.string().allow("").required(),
3759
4374
  });
@@ -3784,10 +4399,10 @@ class CartPlatformModel {
3784
4399
  email: Joi.string().allow(""),
3785
4400
  area_code: Joi.string().allow(""),
3786
4401
  checkout_mode: Joi.string().allow(""),
3787
- meta: Joi.any(),
4402
+ meta: Joi.object().pattern(/\S/, Joi.any()),
3788
4403
  is_active: Joi.boolean(),
3789
4404
  name: Joi.string().allow(""),
3790
- google_map_point: Joi.any(),
4405
+ google_map_point: Joi.object().pattern(/\S/, Joi.any()),
3791
4406
  cart_id: Joi.string().allow(""),
3792
4407
  city: Joi.string().allow(""),
3793
4408
  sector: Joi.string().allow(""),
@@ -3798,19 +4413,28 @@ class CartPlatformModel {
3798
4413
  address: Joi.string().allow(""),
3799
4414
  country_phone_code: Joi.string().allow(""),
3800
4415
  country_iso_code: Joi.string().allow(""),
3801
- _custom_json: Joi.any(),
4416
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3802
4417
  });
3803
4418
  }
3804
4419
 
3805
- /** @returns {PlatformGetAddressesResponse} */
3806
- static PlatformGetAddressesResponse() {
4420
+ /** @returns {ValidationConfig} */
4421
+ static ValidationConfig() {
4422
+ return Joi.object({
4423
+ address_max_limit: Joi.number().required(),
4424
+ user_address_count: Joi.number().required(),
4425
+ });
4426
+ }
4427
+
4428
+ /** @returns {PlatformGetAddressesDetails} */
4429
+ static PlatformGetAddressesDetails() {
3807
4430
  return Joi.object({
3808
4431
  address: Joi.array().items(CartPlatformModel.PlatformAddress()),
4432
+ validation_config: CartPlatformModel.ValidationConfig(),
3809
4433
  });
3810
4434
  }
3811
4435
 
3812
- /** @returns {SaveAddressResponse} */
3813
- static SaveAddressResponse() {
4436
+ /** @returns {SaveAddressDetails} */
4437
+ static SaveAddressDetails() {
3814
4438
  return Joi.object({
3815
4439
  id: Joi.string().allow(""),
3816
4440
  success: Joi.boolean(),
@@ -3818,8 +4442,8 @@ class CartPlatformModel {
3818
4442
  });
3819
4443
  }
3820
4444
 
3821
- /** @returns {UpdateAddressResponse} */
3822
- static UpdateAddressResponse() {
4445
+ /** @returns {UpdateAddressDetails} */
4446
+ static UpdateAddressDetails() {
3823
4447
  return Joi.object({
3824
4448
  id: Joi.string().allow(""),
3825
4449
  is_default_address: Joi.boolean(),
@@ -3828,16 +4452,16 @@ class CartPlatformModel {
3828
4452
  });
3829
4453
  }
3830
4454
 
3831
- /** @returns {DeleteAddressResponse} */
3832
- static DeleteAddressResponse() {
4455
+ /** @returns {DeleteAddressResult} */
4456
+ static DeleteAddressResult() {
3833
4457
  return Joi.object({
3834
4458
  id: Joi.string().allow(""),
3835
4459
  is_deleted: Joi.boolean(),
3836
4460
  });
3837
4461
  }
3838
4462
 
3839
- /** @returns {PlatformSelectCartAddressRequest} */
3840
- static PlatformSelectCartAddressRequest() {
4463
+ /** @returns {PlatformSelectCartAddress} */
4464
+ static PlatformSelectCartAddress() {
3841
4465
  return Joi.object({
3842
4466
  cart_id: Joi.string().allow(""),
3843
4467
  billing_address_id: Joi.string().allow(""),
@@ -3856,13 +4480,13 @@ class CartPlatformModel {
3856
4480
  });
3857
4481
  }
3858
4482
 
3859
- /** @returns {PlatformShipmentResponse} */
3860
- static PlatformShipmentResponse() {
4483
+ /** @returns {PlatformShipmentDetails} */
4484
+ static PlatformShipmentDetails() {
3861
4485
  return Joi.object({
3862
4486
  shipments: Joi.number(),
3863
4487
  fulfillment_id: Joi.number(),
3864
4488
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
3865
- dp_options: Joi.any().allow(null),
4489
+ dp_options: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3866
4490
  shipment_type: Joi.string().allow(""),
3867
4491
  order_type: Joi.string().allow(""),
3868
4492
  box_type: Joi.string().allow("").allow(null),
@@ -3873,12 +4497,12 @@ class CartPlatformModel {
3873
4497
  });
3874
4498
  }
3875
4499
 
3876
- /** @returns {PlatformCartShipmentsResponse} */
3877
- static PlatformCartShipmentsResponse() {
4500
+ /** @returns {PlatformCartShipmentsResult} */
4501
+ static PlatformCartShipmentsResult() {
3878
4502
  return Joi.object({
3879
4503
  coupon_text: Joi.string().allow(""),
3880
4504
  id: Joi.string().allow(""),
3881
- pan_config: Joi.any(),
4505
+ pan_config: Joi.object().pattern(/\S/, Joi.any()),
3882
4506
  delivery_promise: CartPlatformModel.ShipmentPromise(),
3883
4507
  comment: Joi.string().allow(""),
3884
4508
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -3889,9 +4513,7 @@ class CartPlatformModel {
3889
4513
  breakup_values: CartPlatformModel.CartBreakup(),
3890
4514
  staff_user_id: Joi.string().allow("").allow(null),
3891
4515
  is_valid: Joi.boolean(),
3892
- shipments: Joi.array().items(
3893
- CartPlatformModel.PlatformShipmentResponse()
3894
- ),
4516
+ shipments: Joi.array().items(CartPlatformModel.PlatformShipmentDetails()),
3895
4517
  currency: CartPlatformModel.CartCurrency(),
3896
4518
  checkout_mode: Joi.string().allow(""),
3897
4519
  last_modified: Joi.string().allow(""),
@@ -3902,7 +4524,7 @@ class CartPlatformModel {
3902
4524
  ),
3903
4525
  error: Joi.boolean(),
3904
4526
  pan_no: Joi.string().allow(""),
3905
- custom_cart_meta: Joi.any(),
4527
+ custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3906
4528
  });
3907
4529
  }
3908
4530
 
@@ -3915,8 +4537,8 @@ class CartPlatformModel {
3915
4537
  });
3916
4538
  }
3917
4539
 
3918
- /** @returns {UpdateCartShipmentRequest} */
3919
- static UpdateCartShipmentRequest() {
4540
+ /** @returns {UpdateCartShipmentCreation} */
4541
+ static UpdateCartShipmentCreation() {
3920
4542
  return Joi.object({
3921
4543
  shipments: Joi.array()
3922
4544
  .items(CartPlatformModel.UpdateCartShipmentItem())
@@ -3924,29 +4546,29 @@ class CartPlatformModel {
3924
4546
  });
3925
4547
  }
3926
4548
 
3927
- /** @returns {PlatformCartMetaRequest} */
3928
- static PlatformCartMetaRequest() {
4549
+ /** @returns {PlatformCartMetaCreation} */
4550
+ static PlatformCartMetaCreation() {
3929
4551
  return Joi.object({
3930
4552
  gstin: Joi.string().allow(""),
3931
- pick_up_customer_details: Joi.any(),
4553
+ pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()),
3932
4554
  checkout_mode: Joi.string().allow(""),
3933
- gift_details: Joi.any().allow(null),
4555
+ gift_details: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3934
4556
  pan_no: Joi.string().allow(""),
3935
4557
  comment: Joi.string().allow(""),
3936
4558
  staff_user_id: Joi.string().allow("").allow(null),
3937
4559
  });
3938
4560
  }
3939
4561
 
3940
- /** @returns {CartMetaResponse} */
3941
- static CartMetaResponse() {
4562
+ /** @returns {CartMetaDetails} */
4563
+ static CartMetaDetails() {
3942
4564
  return Joi.object({
3943
4565
  is_valid: Joi.boolean(),
3944
4566
  message: Joi.string().allow(""),
3945
4567
  });
3946
4568
  }
3947
4569
 
3948
- /** @returns {CartMetaMissingResponse} */
3949
- static CartMetaMissingResponse() {
4570
+ /** @returns {CartMetaMissingDetails} */
4571
+ static CartMetaMissingDetails() {
3950
4572
  return Joi.object({
3951
4573
  errors: Joi.array().items(Joi.string().allow("")),
3952
4574
  });
@@ -3980,6 +4602,53 @@ class CartPlatformModel {
3980
4602
  });
3981
4603
  }
3982
4604
 
4605
+ /** @returns {CartCheckoutCustomMeta} */
4606
+ static CartCheckoutCustomMeta() {
4607
+ return Joi.object({
4608
+ key: Joi.string().allow("").required(),
4609
+ value: Joi.string().allow("").required(),
4610
+ });
4611
+ }
4612
+
4613
+ /** @returns {PlatformCartCheckoutDetailCreation} */
4614
+ static PlatformCartCheckoutDetailCreation() {
4615
+ return Joi.object({
4616
+ custom_meta: Joi.array().items(
4617
+ CartPlatformModel.CartCheckoutCustomMeta()
4618
+ ),
4619
+ address_id: Joi.string().allow(""),
4620
+ payment_identifier: Joi.string().allow("").allow(null),
4621
+ payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
4622
+ payment_auto_confirm: Joi.boolean(),
4623
+ id: Joi.string().allow("").required(),
4624
+ pos: Joi.boolean(),
4625
+ billing_address_id: Joi.string().allow(""),
4626
+ merchant_code: Joi.string().allow(""),
4627
+ aggregator: Joi.string().allow(""),
4628
+ pick_at_store_uid: Joi.number().allow(null),
4629
+ device_id: Joi.string().allow("").allow(null),
4630
+ delivery_address: Joi.object().pattern(/\S/, Joi.any()),
4631
+ payment_mode: Joi.string().allow("").required(),
4632
+ checkout_mode: Joi.string().allow(""),
4633
+ customer_details: CartPlatformModel.CustomerDetails(),
4634
+ meta: Joi.object().pattern(/\S/, Joi.any()),
4635
+ staff: CartPlatformModel.StaffCheckout(),
4636
+ employee_code: Joi.string().allow("").allow(null),
4637
+ billing_address: Joi.object().pattern(/\S/, Joi.any()),
4638
+ callback_url: Joi.string().allow("").allow(null),
4639
+ user_id: Joi.string().allow("").allow(null),
4640
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4641
+ order_type: Joi.string().allow("").required(),
4642
+ files: Joi.array().items(CartPlatformModel.Files()),
4643
+ ordering_store: Joi.number().allow(null),
4644
+ payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
4645
+ iin: Joi.string().allow(""),
4646
+ network: Joi.string().allow(""),
4647
+ type: Joi.string().allow(""),
4648
+ card_id: Joi.string().allow(""),
4649
+ });
4650
+ }
4651
+
3983
4652
  /** @returns {CheckCart} */
3984
4653
  static CheckCart() {
3985
4654
  return Joi.object({
@@ -4012,15 +4681,15 @@ class CartPlatformModel {
4012
4681
  gstin: Joi.string().allow(""),
4013
4682
  cod_available: Joi.boolean(),
4014
4683
  delivery_charges: Joi.number(),
4015
- custom_cart_meta: Joi.any(),
4684
+ custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
4016
4685
  });
4017
4686
  }
4018
4687
 
4019
- /** @returns {CartCheckoutResponse} */
4020
- static CartCheckoutResponse() {
4688
+ /** @returns {CartCheckoutDetails} */
4689
+ static CartCheckoutDetails() {
4021
4690
  return Joi.object({
4022
4691
  app_intercept_url: Joi.string().allow(""),
4023
- data: Joi.any(),
4692
+ data: Joi.object().pattern(/\S/, Joi.any()),
4024
4693
  cart: CartPlatformModel.CheckCart(),
4025
4694
  success: Joi.boolean(),
4026
4695
  callback_url: Joi.string().allow(""),
@@ -4030,8 +4699,22 @@ class CartPlatformModel {
4030
4699
  });
4031
4700
  }
4032
4701
 
4033
- /** @returns {CartDeliveryModesResponse} */
4034
- static CartDeliveryModesResponse() {
4702
+ /** @returns {CartCheckoutResult} */
4703
+ static CartCheckoutResult() {
4704
+ return Joi.object({
4705
+ app_intercept_url: Joi.string().allow(""),
4706
+ data: Joi.object().pattern(/\S/, Joi.any()),
4707
+ cart: CartPlatformModel.CheckCart(),
4708
+ success: Joi.boolean(),
4709
+ callback_url: Joi.string().allow(""),
4710
+ payment_confirm_url: Joi.string().allow(""),
4711
+ order_id: Joi.string().allow(""),
4712
+ message: Joi.string().allow(""),
4713
+ });
4714
+ }
4715
+
4716
+ /** @returns {CartDeliveryModesDetails} */
4717
+ static CartDeliveryModesDetails() {
4035
4718
  return Joi.object({
4036
4719
  pickup_stores: Joi.array().items(Joi.number()),
4037
4720
  available_modes: Joi.array().items(Joi.string().allow("")),
@@ -4061,15 +4744,15 @@ class CartPlatformModel {
4061
4744
  });
4062
4745
  }
4063
4746
 
4064
- /** @returns {StoreDetailsResponse} */
4065
- static StoreDetailsResponse() {
4747
+ /** @returns {StoreDetails} */
4748
+ static StoreDetails() {
4066
4749
  return Joi.object({
4067
4750
  items: Joi.array().items(CartPlatformModel.PickupStoreDetail()),
4068
4751
  });
4069
4752
  }
4070
4753
 
4071
- /** @returns {UpdateCartPaymentRequest} */
4072
- static UpdateCartPaymentRequest() {
4754
+ /** @returns {CartPaymentUpdate} */
4755
+ static CartPaymentUpdate() {
4073
4756
  return Joi.object({
4074
4757
  address_id: Joi.string().allow(""),
4075
4758
  payment_mode: Joi.string().allow(""),
@@ -4089,6 +4772,7 @@ class CartPlatformModel {
4089
4772
  display_message_en: Joi.string().allow("").allow(null),
4090
4773
  code: Joi.string().allow("").allow(null),
4091
4774
  discount: Joi.number(),
4775
+ error_en: Joi.string().allow("").allow(null),
4092
4776
  });
4093
4777
  }
4094
4778
 
@@ -4119,17 +4803,19 @@ class CartPlatformModel {
4119
4803
  payment_meta: CartPlatformModel.PaymentMeta().required(),
4120
4804
  amount: Joi.number().allow(null),
4121
4805
  name: Joi.string().allow(""),
4122
- payment_extra_identifiers: Joi.any(),
4806
+ payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
4123
4807
  });
4124
4808
  }
4125
4809
 
4126
- /** @returns {PlatformCartCheckoutDetailV2Request} */
4127
- static PlatformCartCheckoutDetailV2Request() {
4810
+ /** @returns {PlatformCartCheckoutDetailV2Creation} */
4811
+ static PlatformCartCheckoutDetailV2Creation() {
4128
4812
  return Joi.object({
4129
4813
  address_id: Joi.string().allow(""),
4130
4814
  payment_identifier: Joi.string().allow("").allow(null),
4131
- payment_params: Joi.any().allow(null),
4132
- custom_meta: Joi.any(),
4815
+ payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
4816
+ custom_meta: Joi.array().items(
4817
+ CartPlatformModel.CartCheckoutCustomMeta()
4818
+ ),
4133
4819
  payment_auto_confirm: Joi.boolean(),
4134
4820
  id: Joi.string().allow("").required(),
4135
4821
  pos: Joi.boolean(),
@@ -4138,20 +4824,20 @@ class CartPlatformModel {
4138
4824
  aggregator: Joi.string().allow(""),
4139
4825
  pick_at_store_uid: Joi.number().allow(null),
4140
4826
  device_id: Joi.string().allow("").allow(null),
4141
- delivery_address: Joi.any(),
4827
+ delivery_address: Joi.object().pattern(/\S/, Joi.any()),
4142
4828
  payment_mode: Joi.string().allow(""),
4143
4829
  checkout_mode: Joi.string().allow(""),
4144
- customer_details: Joi.any().allow(null),
4145
- meta: Joi.any(),
4830
+ customer_details: CartPlatformModel.CustomerDetails(),
4831
+ meta: Joi.object().pattern(/\S/, Joi.any()),
4146
4832
  payment_methods: Joi.array()
4147
4833
  .items(CartPlatformModel.PaymentMethod())
4148
4834
  .required(),
4149
4835
  staff: CartPlatformModel.StaffCheckout(),
4150
4836
  employee_code: Joi.string().allow("").allow(null),
4151
- billing_address: Joi.any(),
4837
+ billing_address: Joi.object().pattern(/\S/, Joi.any()),
4152
4838
  callback_url: Joi.string().allow("").allow(null),
4153
- user_id: Joi.string().allow("").allow(null).required(),
4154
- extra_meta: Joi.any(),
4839
+ user_id: Joi.string().allow("").required(),
4840
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4155
4841
  order_type: Joi.string().allow("").required(),
4156
4842
  files: Joi.array().items(CartPlatformModel.Files()),
4157
4843
  ordering_store: Joi.number().allow(null),
@@ -4192,14 +4878,25 @@ class CartPlatformModel {
4192
4878
  });
4193
4879
  }
4194
4880
 
4881
+ /** @returns {ArticlePriceDetails} */
4882
+ static ArticlePriceDetails() {
4883
+ return Joi.object({
4884
+ marked: Joi.number(),
4885
+ effective: Joi.number(),
4886
+ });
4887
+ }
4888
+
4195
4889
  /** @returns {FreeGiftItems} */
4196
4890
  static FreeGiftItems() {
4197
4891
  return Joi.object({
4198
4892
  item_slug: Joi.string().allow(""),
4199
4893
  item_name: Joi.string().allow(""),
4200
4894
  item_price_details: CartPlatformModel.ItemPriceDetails(),
4895
+ article_price: CartPlatformModel.ArticlePriceDetails(),
4201
4896
  item_brand_name: Joi.string().allow(""),
4202
4897
  item_id: Joi.number(),
4898
+ available_sizes: Joi.array().items(Joi.string().allow("")),
4899
+ size: Joi.string().allow(""),
4203
4900
  item_images_url: Joi.array().items(Joi.string().allow("")),
4204
4901
  });
4205
4902
  }
@@ -4208,7 +4905,7 @@ class CartPlatformModel {
4208
4905
  static PromotionOffer() {
4209
4906
  return Joi.object({
4210
4907
  id: Joi.string().allow(""),
4211
- buy_rules: Joi.any(),
4908
+ buy_rules: Joi.object().pattern(/\S/, Joi.any()),
4212
4909
  offer_text: Joi.string().allow(""),
4213
4910
  promotion_type: Joi.string().allow(""),
4214
4911
  promotion_name: Joi.string().allow(""),
@@ -4220,8 +4917,8 @@ class CartPlatformModel {
4220
4917
  });
4221
4918
  }
4222
4919
 
4223
- /** @returns {PromotionOffersResponse} */
4224
- static PromotionOffersResponse() {
4920
+ /** @returns {PromotionOffersDetails} */
4921
+ static PromotionOffersDetails() {
4225
4922
  return Joi.object({
4226
4923
  available_promotions: Joi.array().items(
4227
4924
  CartPlatformModel.PromotionOffer()
@@ -4245,12 +4942,20 @@ class CartPlatformModel {
4245
4942
  });
4246
4943
  }
4247
4944
 
4248
- /** @returns {PromotionPaymentOffersResponse} */
4249
- static PromotionPaymentOffersResponse() {
4945
+ /** @returns {PromotionPaymentOffersDetails} */
4946
+ static PromotionPaymentOffersDetails() {
4250
4947
  return Joi.object({
4251
4948
  success: Joi.boolean(),
4252
4949
  promotions: Joi.array().items(CartPlatformModel.PromotionPaymentOffer()),
4253
4950
  });
4254
4951
  }
4952
+
4953
+ /** @returns {ValidationError} */
4954
+ static ValidationError() {
4955
+ return Joi.object({
4956
+ message: Joi.string().allow("").required(),
4957
+ field: Joi.string().allow("").required(),
4958
+ });
4959
+ }
4255
4960
  }
4256
4961
  module.exports = CartPlatformModel;