@gofynd/fdk-client-javascript 1.4.14 → 1.4.15-beta.10

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 (326) hide show
  1. package/README.md +2 -2
  2. package/application.d.ts +1 -2
  3. package/application.js +2 -3
  4. package/index.d.ts +1 -2
  5. package/index.js +7 -1
  6. package/package.json +2 -3
  7. package/sdk/application/ApplicationClient.d.ts +0 -2
  8. package/sdk/application/ApplicationClient.js +0 -20
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +55 -97
  10. package/sdk/application/Cart/CartApplicationClient.js +60 -1262
  11. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -162
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +148 -1313
  13. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -9
  14. package/sdk/application/Common/CommonApplicationClient.js +5 -90
  15. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
  16. package/sdk/application/Communication/CommunicationApplicationClient.js +6 -145
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -80
  18. package/sdk/application/Configuration/ConfigurationApplicationClient.js +31 -725
  19. package/sdk/application/Content/ContentApplicationClient.d.ts +63 -85
  20. package/sdk/application/Content/ContentApplicationClient.js +126 -942
  21. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -15
  22. package/sdk/application/FileStorage/FileStorageApplicationClient.js +26 -130
  23. package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -17
  24. package/sdk/application/Lead/LeadApplicationClient.js +32 -201
  25. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -62
  26. package/sdk/application/Logistic/LogisticApplicationClient.js +51 -647
  27. package/sdk/application/Order/OrderApplicationClient.d.ts +22 -56
  28. package/sdk/application/Order/OrderApplicationClient.js +86 -555
  29. package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -209
  30. package/sdk/application/Payment/PaymentApplicationClient.js +57 -2099
  31. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -26
  32. package/sdk/application/Rewards/RewardsApplicationClient.js +17 -303
  33. package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
  34. package/sdk/application/Share/ShareApplicationClient.js +34 -294
  35. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
  36. package/sdk/application/Theme/ThemeApplicationClient.js +30 -166
  37. package/sdk/application/User/UserApplicationClient.d.ts +87 -138
  38. package/sdk/application/User/UserApplicationClient.js +47 -1817
  39. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
  40. package/sdk/application/Webhook/WebhookApplicationClient.js +6 -49
  41. package/sdk/application/index.d.ts +0 -19
  42. package/sdk/application/index.js +0 -35
  43. package/sdk/common/Utility.d.ts +1 -1
  44. package/sdk/common/Utility.js +10 -7
  45. package/sdk/common/Validator.d.ts +1 -0
  46. package/sdk/common/Validator.js +20 -0
  47. package/sdk/common/utils.d.ts +0 -1
  48. package/sdk/common/utils.js +0 -14
  49. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
  50. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
  51. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +21 -116
  52. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +16 -121
  53. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
  54. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
  55. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  56. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  57. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  58. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  59. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
  60. package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
  61. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +85 -767
  62. package/sdk/partner/Logistics/LogisticsPartnerModel.js +76 -429
  63. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
  64. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +6 -120
  65. package/sdk/partner/OAuthClient.js +1 -0
  66. package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
  67. package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
  68. package/sdk/partner/Theme/ThemePartnerModel.d.ts +39 -135
  69. package/sdk/partner/Theme/ThemePartnerModel.js +38 -114
  70. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  71. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
  72. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
  73. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
  74. package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
  75. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
  76. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
  77. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
  78. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
  79. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
  80. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
  81. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  82. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  87. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  88. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  89. package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
  90. package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
  91. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
  92. package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
  94. package/sdk/platform/Cart/CartPlatformApplicationClient.js +112 -407
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -111
  96. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -106
  97. package/sdk/platform/Cart/CartPlatformModel.d.ts +1328 -4975
  98. package/sdk/platform/Cart/CartPlatformModel.js +1229 -1922
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -208
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +358 -383
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +126 -122
  102. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +68 -66
  103. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +118 -141
  104. package/sdk/platform/Catalog/CatalogPlatformClient.js +170 -193
  105. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1744 -1501
  106. package/sdk/platform/Catalog/CatalogPlatformModel.js +1211 -1383
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
  108. package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
  109. package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
  110. package/sdk/platform/Common/CommonPlatformClient.js +2 -3
  111. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  112. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  117. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
  118. package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
  121. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  125. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
  126. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
  127. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  129. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
  130. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
  131. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +138 -283
  132. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +100 -219
  133. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
  134. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
  135. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -124
  136. package/sdk/platform/Content/ContentPlatformApplicationClient.js +422 -449
  137. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -179
  138. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -168
  139. package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
  140. package/sdk/platform/Content/ContentPlatformClient.js +336 -523
  141. package/sdk/platform/Content/ContentPlatformModel.d.ts +395 -1241
  142. package/sdk/platform/Content/ContentPlatformModel.js +390 -521
  143. package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
  144. package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
  145. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
  146. package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
  147. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  148. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  149. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  150. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  151. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +39 -95
  152. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +63 -462
  153. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
  154. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
  155. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +22 -20
  156. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +24 -21
  157. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -370
  158. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +104 -313
  159. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  160. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  161. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  162. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  163. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
  164. package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
  165. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  166. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  167. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  168. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  169. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  170. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  171. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -25
  172. package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -175
  173. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +4 -52
  174. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +3 -34
  175. package/sdk/platform/Order/OrderPlatformClient.d.ts +103 -174
  176. package/sdk/platform/Order/OrderPlatformClient.js +275 -528
  177. package/sdk/platform/Order/OrderPlatformModel.d.ts +3078 -5449
  178. package/sdk/platform/Order/OrderPlatformModel.js +1659 -3501
  179. package/sdk/platform/Order/OrderPlatformValidator.d.ts +219 -234
  180. package/sdk/platform/Order/OrderPlatformValidator.js +118 -146
  181. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  182. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  183. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  184. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  185. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +106 -94
  186. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +146 -131
  187. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -64
  188. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -62
  189. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  190. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  191. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +507 -386
  192. package/sdk/platform/Payment/PaymentPlatformModel.js +376 -323
  193. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +10 -10
  194. package/sdk/platform/Payment/PaymentPlatformValidator.js +10 -10
  195. package/sdk/platform/PlatformClient.d.ts +2 -0
  196. package/sdk/platform/PlatformClient.js +4 -0
  197. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  198. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  199. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  200. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  201. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  202. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  203. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +35 -45
  204. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +38 -117
  205. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +13 -22
  206. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +12 -24
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +68 -62
  209. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +396 -620
  210. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +326 -501
  211. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +11 -11
  212. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +10 -10
  213. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
  214. package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
  215. package/sdk/platform/Share/SharePlatformModel.d.ts +5 -36
  216. package/sdk/platform/Share/SharePlatformModel.js +4 -27
  217. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  218. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
  219. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
  220. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
  221. package/sdk/platform/Theme/ThemePlatformModel.d.ts +13 -76
  222. package/sdk/platform/Theme/ThemePlatformModel.js +17 -57
  223. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  224. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  225. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  226. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  227. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  228. package/sdk/platform/User/UserPlatformModel.js +23 -23
  229. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  230. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  231. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
  232. package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
  233. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  235. package/sdk/platform/index.d.ts +1 -0
  236. package/sdk/platform/index.js +2 -0
  237. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
  238. package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -8
  239. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  240. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  241. package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
  242. package/sdk/public/Content/ContentPublicClient.js +19 -793
  243. package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
  244. package/sdk/public/Content/ContentPublicModel.js +3 -649
  245. package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
  246. package/sdk/public/Content/ContentPublicValidator.js +2 -88
  247. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  248. package/sdk/public/Partner/PartnerPublicClient.js +14 -2
  249. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  250. package/sdk/public/Webhook/WebhookPublicClient.js +13 -10
  251. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  252. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  253. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  254. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  255. package/sdk/application/Cart/CartApplicationModel.d.ts +0 -4340
  256. package/sdk/application/Cart/CartApplicationModel.js +0 -2718
  257. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -788
  258. package/sdk/application/Cart/CartApplicationValidator.js +0 -546
  259. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3909
  260. package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2667
  261. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
  262. package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
  263. package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
  264. package/sdk/application/Common/CommonApplicationModel.js +0 -308
  265. package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
  266. package/sdk/application/Common/CommonApplicationValidator.js +0 -38
  267. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
  268. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
  269. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
  270. package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
  271. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2544
  272. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1875
  273. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
  274. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
  275. package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2189
  276. package/sdk/application/Content/ContentApplicationModel.js +0 -1640
  277. package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -290
  278. package/sdk/application/Content/ContentApplicationValidator.js +0 -269
  279. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -270
  280. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -188
  281. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
  282. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
  283. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -36
  284. package/sdk/application/Finance/FinanceApplicationClient.js +0 -202
  285. package/sdk/application/Finance/FinanceApplicationModel.d.ts +0 -289
  286. package/sdk/application/Finance/FinanceApplicationModel.js +0 -208
  287. package/sdk/application/Finance/FinanceApplicationValidator.d.ts +0 -25
  288. package/sdk/application/Finance/FinanceApplicationValidator.js +0 -31
  289. package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
  290. package/sdk/application/Lead/LeadApplicationModel.js +0 -480
  291. package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
  292. package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
  293. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -2034
  294. package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1391
  295. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -299
  296. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -224
  297. package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2612
  298. package/sdk/application/Order/OrderApplicationModel.js +0 -1669
  299. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -279
  300. package/sdk/application/Order/OrderApplicationValidator.js +0 -210
  301. package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4062
  302. package/sdk/application/Payment/PaymentApplicationModel.js +0 -2632
  303. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
  304. package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
  305. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
  306. package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
  307. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
  308. package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
  309. package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
  310. package/sdk/application/Share/ShareApplicationModel.js +0 -234
  311. package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
  312. package/sdk/application/Share/ShareApplicationValidator.js +0 -91
  313. package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1744
  314. package/sdk/application/Theme/ThemeApplicationModel.js +0 -1446
  315. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -79
  316. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -65
  317. package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
  318. package/sdk/application/User/UserApplicationModel.js +0 -1382
  319. package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
  320. package/sdk/application/User/UserApplicationValidator.js +0 -573
  321. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -54
  322. package/sdk/application/Webhook/WebhookApplicationModel.js +0 -48
  323. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
  324. package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
  325. package/sdk/common/Clickstream.d.ts +0 -1
  326. package/sdk/common/Clickstream.js +0 -464
@@ -2,74 +2,65 @@ const Joi = require("joi");
2
2
 
3
3
  /**
4
4
  * @typedef CouponDateMeta
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
5
+ * @property {string} [modified_on]
6
+ * @property {string} [created_on]
10
7
  */
11
8
 
12
9
  /**
13
10
  * @typedef Ownership
14
- * @property {string} payable_category - Coupon amount payable category
15
- * @property {string} [payable_by] - Coupon amount bearable party
11
+ * @property {string} payable_category
12
+ * @property {string} payable_by
16
13
  */
17
14
 
18
15
  /**
19
16
  * @typedef CouponAuthor
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
17
+ * @property {string} [created_by]
18
+ * @property {string} [modified_by]
25
19
  */
26
20
 
27
21
  /**
28
22
  * @typedef State
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
23
+ * @property {boolean} [is_archived]
24
+ * @property {boolean} [is_display]
25
+ * @property {boolean} [is_public]
32
26
  */
33
27
 
34
28
  /**
35
29
  * @typedef PaymentAllowValue
36
- * @property {number} [max] - Maximum value need to allow for payment
30
+ * @property {number} [max]
37
31
  */
38
32
 
39
33
  /**
40
34
  * @typedef PaymentModes
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
35
+ * @property {string[]} [codes]
36
+ * @property {string[]} [iins]
37
+ * @property {string[]} [types]
38
+ * @property {string[]} [networks]
47
39
  * @property {PaymentAllowValue} [uses]
48
40
  */
49
41
 
50
42
  /**
51
43
  * @typedef PriceRange
52
- * @property {number} [max] - Max price valid for article in coupon
53
- * @property {number} [min] - Min price valid for article in coupon
44
+ * @property {number} [max]
45
+ * @property {number} [min]
54
46
  */
55
47
 
56
48
  /**
57
49
  * @typedef PostOrder
58
- * @property {boolean} [cancellation_allowed] - Cancellation allowed in coupon
59
- * @property {boolean} [return_allowed] - Return allowed in coupon
50
+ * @property {boolean} [cancellation_allowed]
51
+ * @property {boolean} [return_allowed]
60
52
  */
61
53
 
62
54
  /**
63
55
  * @typedef BulkBundleRestriction
64
- * @property {boolean} multi_store_allowed - Multi store allowed in bulk bundle
65
- * coupon or not
56
+ * @property {boolean} multi_store_allowed
66
57
  */
67
58
 
68
59
  /**
69
60
  * @typedef UsesRemaining
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
61
+ * @property {number} [user]
62
+ * @property {number} [total]
63
+ * @property {number} [app]
73
64
  */
74
65
 
75
66
  /**
@@ -80,129 +71,115 @@ const Joi = require("joi");
80
71
 
81
72
  /**
82
73
  * @typedef Restrictions
83
- * @property {PaymentModes} [payments]
74
+ * @property {Object} [payments]
84
75
  * @property {string} [user_type]
85
76
  * @property {PriceRange} [price_range]
86
- * @property {string[]} [platforms] - List of platform on which coupon allowed
87
- * like web, android
77
+ * @property {string[]} [platforms]
88
78
  * @property {PostOrder} [post_order]
89
79
  * @property {BulkBundleRestriction} [bulk_bundle]
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
80
+ * @property {number[]} [user_groups]
81
+ * @property {boolean} [coupon_allowed]
93
82
  * @property {UsesRestriction} [uses]
94
- * @property {number[]} [ordering_stores] - List of store id on which coupon allowed
83
+ * @property {number[]} [ordering_stores]
95
84
  */
96
85
 
97
86
  /**
98
87
  * @typedef Validation
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
88
+ * @property {string[]} [app_id]
89
+ * @property {boolean} [anonymous]
90
+ * @property {string} [user_registered_after]
103
91
  */
104
92
 
105
93
  /**
106
94
  * @typedef CouponAction
107
- * @property {string} [action_date] - Coupon transaction mode's date time format
108
- * @property {string} [txn_mode] - Coupon transaction mode like cash, coupon etc
95
+ * @property {string} [action_date]
96
+ * @property {string} [txn_mode]
109
97
  */
110
98
 
111
99
  /**
112
100
  * @typedef CouponSchedule
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
101
+ * @property {string} [end]
102
+ * @property {string} [start]
103
+ * @property {Object[]} [next_schedule]
104
+ * @property {string} [cron]
105
+ * @property {number} [duration]
120
106
  */
121
107
 
122
108
  /**
123
109
  * @typedef Rule
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
110
+ * @property {number} [key]
111
+ * @property {number} [value]
112
+ * @property {number} [max]
113
+ * @property {number} [discount_qty]
114
+ * @property {number} [min]
131
115
  */
132
116
 
133
117
  /**
134
118
  * @typedef DisplayMetaDict
135
- * @property {string} [title] - Coupon title which is used to display
136
- * @property {string} [subtitle] - Coupon sub title which is used to display
119
+ * @property {string} [title]
120
+ * @property {string} [subtitle]
137
121
  */
138
122
 
139
123
  /**
140
124
  * @typedef DisplayMeta
141
- * @property {string} [title] - Coupon title which is used to display
125
+ * @property {string} [title]
142
126
  * @property {DisplayMetaDict} [auto]
143
127
  * @property {DisplayMetaDict} [apply]
144
128
  * @property {DisplayMetaDict} [remove]
145
- * @property {string} [subtitle] - Coupon sub title which is used to display
146
- * @property {string} [description] - Detail about the offers in coupon
129
+ * @property {string} [subtitle]
130
+ * @property {string} [description]
147
131
  */
148
132
 
149
133
  /**
150
134
  * @typedef Identifier
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
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]
162
145
  */
163
146
 
164
147
  /**
165
148
  * @typedef Validity
166
- * @property {number} [priority] - Priority of coupon to show in list
149
+ * @property {number} [priority]
167
150
  */
168
151
 
169
152
  /**
170
153
  * @typedef RuleDefinition
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
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]
182
162
  */
183
163
 
184
164
  /**
185
165
  * @typedef CouponAdd
186
166
  * @property {CouponDateMeta} [date_meta]
187
- * @property {Ownership} [ownership]
167
+ * @property {Ownership} ownership
188
168
  * @property {CouponAuthor} [author]
189
169
  * @property {State} [state]
190
170
  * @property {Restrictions} [restrictions]
191
171
  * @property {Validation} [validation]
192
172
  * @property {CouponAction} [action]
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
173
+ * @property {string[]} [tags]
197
174
  * @property {CouponSchedule} [_schedule]
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
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
206
183
  */
207
184
 
208
185
  /**
@@ -217,46 +194,42 @@ const Joi = require("joi");
217
194
  */
218
195
 
219
196
  /**
220
- * @typedef CouponsResult
221
- * @property {CouponAdd[]} [items] - Coupons list for sales channel
197
+ * @typedef CouponsResponse
198
+ * @property {CouponAdd[]} [items]
222
199
  * @property {Page} [page]
223
200
  */
224
201
 
225
202
  /**
226
203
  * @typedef SuccessMessage
227
- * @property {boolean} [success] - Whether the request was successful (true/false).
228
- * @property {string} [message] - Response message needs to display
204
+ * @property {boolean} [success]
205
+ * @property {string} [message]
229
206
  */
230
207
 
231
208
  /**
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
209
+ * @typedef OperationErrorResponse
210
+ * @property {boolean} [success]
211
+ * @property {string} [message]
212
+ * @property {string} [error]
236
213
  */
237
214
 
238
215
  /**
239
216
  * @typedef CouponUpdate
240
217
  * @property {CouponDateMeta} [date_meta]
241
- * @property {Ownership} [ownership]
218
+ * @property {Ownership} ownership
242
219
  * @property {CouponAuthor} [author]
243
220
  * @property {State} [state]
244
221
  * @property {Restrictions} [restrictions]
245
222
  * @property {Validation} [validation]
246
223
  * @property {CouponAction} [action]
247
- * @property {string[]} [tags] - List of tags specify to platform
224
+ * @property {string[]} [tags]
248
225
  * @property {CouponSchedule} [_schedule]
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]
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
260
233
  */
261
234
 
262
235
  /**
@@ -265,149 +238,110 @@ const Joi = require("joi");
265
238
  * @property {CouponSchedule} [schedule]
266
239
  */
267
240
 
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
-
276
241
  /**
277
242
  * @typedef DisplayMeta1
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
243
+ * @property {string} [description]
244
+ * @property {string} [offer_label]
245
+ * @property {string} [name]
246
+ * @property {string} [offer_text]
282
247
  */
283
248
 
284
249
  /**
285
250
  * @typedef Ownership1
286
- * @property {string} [payable_category] - Promotion amount payable category
287
- * @property {string} [payable_by] - Promotion amount bearable party
251
+ * @property {string} payable_category
252
+ * @property {string} payable_by
288
253
  */
289
254
 
290
255
  /**
291
256
  * @typedef CompareObject
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
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]
305
262
  */
306
263
 
307
264
  /**
308
265
  * @typedef ItemCriteria
309
266
  * @property {CompareObject} [cart_quantity]
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
267
+ * @property {string[]} [available_zones]
268
+ * @property {number[]} [item_exclude_company]
269
+ * @property {number[]} [item_id]
270
+ * @property {number[]} [item_l1_category]
317
271
  * @property {CompareObject} [cart_total]
318
272
  * @property {CompareObject} [cart_unique_item_quantity]
319
273
  * @property {CompareObject} [cart_unique_item_amount]
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
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]
344
286
  * @property {string[]} [buy_rules]
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
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]
356
293
  */
357
294
 
358
295
  /**
359
296
  * @typedef DiscountOffer
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
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]
371
307
  */
372
308
 
373
309
  /**
374
310
  * @typedef DiscountRule
375
- * @property {string} discount_type - The type of discount in promotion
376
- * @property {string} buy_condition - Promotion buy rules in offer level
311
+ * @property {string} discount_type
312
+ * @property {string} buy_condition
377
313
  * @property {ItemCriteria} item_criteria
378
- * @property {ItemSizeMapping} [meta]
379
314
  * @property {DiscountOffer} offer
380
315
  */
381
316
 
382
317
  /**
383
318
  * @typedef PaymentAllowValue1
384
- * @property {number} [max] - Maximum value need to allow for payment in promotion
319
+ * @property {number} [max]
385
320
  */
386
321
 
387
322
  /**
388
323
  * @typedef PromotionPaymentModes
389
- * @property {string} [type] - Define the type of payment
324
+ * @property {string} type
390
325
  * @property {PaymentAllowValue1} [uses]
391
- * @property {string[]} [codes] - List of codes associated with payment options
326
+ * @property {string[]} [codes]
392
327
  */
393
328
 
394
329
  /**
395
330
  * @typedef UserRegistered
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
331
+ * @property {string} [end]
332
+ * @property {string} [start]
398
333
  */
399
334
 
400
335
  /**
401
336
  * @typedef PostOrder1
402
- * @property {boolean} [cancellation_allowed] - Cancellation allowed in
403
- * promotion after order
404
- * @property {boolean} [return_allowed] - Return allowed in promotion after order
337
+ * @property {boolean} [cancellation_allowed]
338
+ * @property {boolean} [return_allowed]
405
339
  */
406
340
 
407
341
  /**
408
342
  * @typedef UsesRemaining1
409
- * @property {number} [user] - Define total promotion count per user
410
- * @property {number} [total] - Define total promotions count
343
+ * @property {number} [user]
344
+ * @property {number} [total]
411
345
  */
412
346
 
413
347
  /**
@@ -418,75 +352,62 @@ const Joi = require("joi");
418
352
 
419
353
  /**
420
354
  * @typedef Restrictions1
421
- * @property {PaymentModes} [payments]
355
+ * @property {Object} [payments]
422
356
  * @property {UserRegistered} [user_registered]
423
- * @property {string[]} [platforms] - List of platform on which promotion is
424
- * applicable like android, ios
357
+ * @property {string[]} [platforms]
425
358
  * @property {PostOrder1} [post_order]
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
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]
435
365
  */
436
366
 
437
367
  /**
438
368
  * @typedef PromotionSchedule
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
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]
447
375
  */
448
376
 
449
377
  /**
450
378
  * @typedef PromotionAction
451
- * @property {string} [action_date] - Date time format in promotion
452
- * @property {string} [action_type] - The action type of promotion
379
+ * @property {string} action_date
380
+ * @property {string} action_type
453
381
  */
454
382
 
455
383
  /**
456
384
  * @typedef PromotionAuthor
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
385
+ * @property {string} [created_by]
386
+ * @property {string} [modified_by]
462
387
  */
463
388
 
464
389
  /**
465
390
  * @typedef Visibility
466
- * @property {boolean} [coupon_list] - Flag to show promotion on Coupon list
467
- * @property {boolean} [pdp] - Flag to show promotion on PDP page
391
+ * @property {boolean} coupon_list
392
+ * @property {boolean} pdp
468
393
  */
469
394
 
470
395
  /**
471
396
  * @typedef PromotionDateMeta
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
397
+ * @property {string} [modified_on]
398
+ * @property {string} [created_on]
477
399
  */
478
400
 
479
401
  /**
480
402
  * @typedef PromotionListItem
481
403
  * @property {boolean} [stackable] - Allows more than one promotion to get
482
404
  * combined benefits
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
405
+ * @property {string} [calculate_on] - Only available for Contract pricing and
406
+ * Ladder pricing promotion type
486
407
  * @property {string} [apply_exclusive] - Doesn't allow other promotion after
487
408
  * current promotion applied on cart or article
488
409
  * @property {string} promo_group - Group into which promotion fall
489
- * @property {string} mode - Promotion mode, like coupon or promotion
410
+ * @property {string} mode - Promotion mode
490
411
  * @property {boolean} [apply_all_discount] - Prevents more than one promotion discounts
491
412
  * @property {DisplayMeta1} display_meta
492
413
  * @property {Ownership1} ownership
@@ -495,159 +416,81 @@ const Joi = require("joi");
495
416
  * promotion will be applied
496
417
  * @property {Restrictions1} [restrictions]
497
418
  * @property {string} [currency] - Currency used for promotion
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
419
+ * @property {string} [code] - Promotion code
501
420
  * @property {PromotionSchedule} [_schedule]
502
421
  * @property {PromotionAction} [post_order_action]
503
422
  * @property {number} [apply_priority] - Priority based on which promotion are
504
423
  * applied on articles
505
424
  * @property {PromotionAuthor} [author]
506
425
  * @property {Visibility} [visiblility]
507
- * @property {string} application_id - Application id in which promotion will be used
508
- * @property {ItemCriteria} buy_rules
426
+ * @property {string} application_id - App id in which promotion will be used
427
+ * @property {Object} buy_rules - Buy rules for the promotion
509
428
  * @property {Object} [_custom_json] - Custom data stored in promotion
510
429
  * @property {PromotionDateMeta} [date_meta]
511
- * @property {string} [_id] - Unique identifier of promotion
512
- * @property {string[]} [tags] - List of tags on which promotion is applicable
430
+ * @property {string} [_id] - Promotion id
431
+ * @property {string[]} [tags]
513
432
  */
514
433
 
515
434
  /**
516
- * @typedef PromotionsResult
517
- * @property {PromotionListItem[]} [items] - List of promotions
435
+ * @typedef PromotionsResponse
436
+ * @property {PromotionListItem[]} [items]
518
437
  * @property {Page} [page]
519
438
  */
520
439
 
521
440
  /**
522
441
  * @typedef PromotionAdd
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
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
570
453
  * @property {Restrictions1} [restrictions]
571
- * @property {string} [currency] - Promotion Currency code like INR
572
- * @property {string} [code] - Promotion unique code
454
+ * @property {string} [currency]
455
+ * @property {string} [code]
573
456
  * @property {PromotionSchedule} [_schedule]
574
457
  * @property {PromotionAction} [post_order_action]
575
- * @property {number} [apply_priority] - Promotion applicable priority
458
+ * @property {number} [apply_priority]
576
459
  * @property {PromotionAuthor} [author]
577
460
  * @property {Visibility} [visiblility]
578
- * @property {string} application_id - Current application id of sales channel
579
- * @property {ItemCriteria} [buy_rules]
580
- * @property {Object} [_custom_json] - Set extra properties in promotion
461
+ * @property {string} application_id
462
+ * @property {Object} buy_rules
463
+ * @property {Object} [_custom_json]
581
464
  * @property {PromotionDateMeta} [date_meta]
582
- * @property {string[]} [tags] - List of tags applicable for promotion
465
+ * @property {string[]} [tags]
583
466
  */
584
467
 
585
468
  /**
586
469
  * @typedef PromotionUpdate
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
603
- * @property {Restrictions1} [restrictions]
604
- * @property {string} [currency] - Promotion Currency code like INR
605
- * @property {string} [code] - Promotion unique code
606
- * @property {PromotionSchedule} [_schedule]
607
- * @property {PromotionAction} [post_order_action]
608
- * @property {number} [apply_priority] - Promotion applicable priority
609
- * @property {PromotionAuthor} [author]
610
- * @property {Visibility} [visiblility]
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
614
- * @property {PromotionDateMeta} [date_meta]
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
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
638
481
  * @property {Restrictions1} [restrictions]
639
- * @property {string} [currency] - Promotion Currency code like INR
640
- * @property {string} [code] - Promotion unique code
482
+ * @property {string} [currency]
483
+ * @property {string} [code]
641
484
  * @property {PromotionSchedule} [_schedule]
642
485
  * @property {PromotionAction} [post_order_action]
643
- * @property {number} [apply_priority] - Promotion applicable priority
486
+ * @property {number} [apply_priority]
644
487
  * @property {PromotionAuthor} [author]
645
488
  * @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
489
+ * @property {string} application_id
490
+ * @property {Object} buy_rules
491
+ * @property {Object} [_custom_json]
649
492
  * @property {PromotionDateMeta} [date_meta]
650
- * @property {string[]} [tags] - List of tags applicable for promotion
493
+ * @property {string[]} [tags]
651
494
  */
652
495
 
653
496
  /**
@@ -657,60 +500,56 @@ const Joi = require("joi");
657
500
  */
658
501
 
659
502
  /**
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
503
+ * @typedef ActivePromosResponse
504
+ * @property {string} [entity_slug]
505
+ * @property {string} [title] - Name of the promotion
506
+ * @property {string} [modified_on] - Coupon modification date
665
507
  * @property {string} [example] - Discount offers examples
666
508
  * @property {string} [entity_type] - Type of entity to be selected from :
667
509
  * ['coupon', 'promotion']
668
- * @property {string} [created_on] - Coupon or modification creation date
510
+ * @property {string} [created_on] - Coupon creation date
669
511
  * @property {boolean} [is_hidden] - If the promo is active or not
670
- * @property {string} [type] - Coupon or promotion type
512
+ * @property {string} [type] - Coupon type
671
513
  * @property {string} [subtitle] - Small description of the current offer
672
514
  * @property {string} [description] - The description of the offer in the form of an HTML
673
515
  */
674
516
 
675
517
  /**
676
518
  * @typedef Charges
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
519
+ * @property {number} [charges]
520
+ * @property {number} [threshold]
680
521
  */
681
522
 
682
523
  /**
683
524
  * @typedef DeliveryCharges
684
- * @property {Charges[]} [charges] - List of delivery changes information of the cart
685
- * @property {boolean} [enabled] - Enable or disable delivery charge on cart
525
+ * @property {Charges[]} [charges]
526
+ * @property {boolean} [enabled]
686
527
  */
687
528
 
688
529
  /**
689
530
  * @typedef CartMetaConfigUpdate
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
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]
695
536
  * @property {DeliveryCharges} [delivery_charges]
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
537
+ * @property {boolean} [revenue_engine_coupon]
538
+ * @property {number} [gift_pricing]
539
+ * @property {boolean} [enabled]
700
540
  */
701
541
 
702
542
  /**
703
543
  * @typedef CartMetaConfigAdd
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
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]
709
549
  * @property {DeliveryCharges} [delivery_charges]
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
550
+ * @property {boolean} [revenue_engine_coupon]
551
+ * @property {number} [gift_pricing]
552
+ * @property {boolean} [enabled]
714
553
  */
715
554
 
716
555
  /**
@@ -718,10 +557,10 @@ const Joi = require("joi");
718
557
  * @property {number} [value] - Value of price adjustment for article
719
558
  * @property {string} [code] - Code to identify price adjustment on article
720
559
  * @property {string} [type] - Type of price adjusment
721
- * @property {string} article_id - Unique identifier of article
560
+ * @property {string} article_id - Id of article
722
561
  * @property {number} [quantity] - Total quantity of the article to be
723
562
  * considered (currently used only in discount type)
724
- * @property {Object} [meta] - Meta data related to article
563
+ * @property {Object} [meta] - Meta related to article
725
564
  */
726
565
 
727
566
  /**
@@ -732,14 +571,14 @@ const Joi = require("joi");
732
571
 
733
572
  /**
734
573
  * @typedef Collection
735
- * @property {string} refund_by - Bearable party who is refunding the amount
736
- * @property {string} collected_by - The party who is collecting the amount
574
+ * @property {string} refund_by
575
+ * @property {string} collected_by
737
576
  */
738
577
 
739
578
  /**
740
579
  * @typedef PriceAdjustmentUpdate
741
580
  * @property {string} [modified_by] - The entity that modified the field
742
- * @property {number} value - The amount applied on the cart
581
+ * @property {number} value
743
582
  * @property {string} message - The message associated with the price adjustment
744
583
  * @property {string} [apply_expiry] - The date and time when the expiry should be applied
745
584
  * @property {PriceAdjustmentRestrictions} [restrictions] - Restrictions applied
@@ -748,51 +587,55 @@ const Joi = require("joi");
748
587
  * @property {boolean} article_level_distribution - Flag indicating whether the
749
588
  * distribution should is done at the article level
750
589
  * @property {Collection} collection
751
- * @property {string} type - Type of price adjusment like charge, mop, discount etc.
590
+ * @property {string} type - Type of price adjusment
752
591
  * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
753
592
  * allowed (default: False)
754
593
  * @property {boolean} is_authenticated - Flag indicating whether the user is
755
594
  * authenticated
756
595
  * @property {Article[]} article_ids - The list of article object in the price adjustment
757
- * @property {Object} [meta] - Additional information regarding price adjustment
758
- * @property {string} cart_id - Unique identifier of the cart
596
+ * @property {boolean} [auto_remove] - This field if set true will remove mop
597
+ * type price adjustment.
598
+ * @property {Object} [meta]
599
+ * @property {string} cart_id - The ID of the cart
759
600
  */
760
601
 
761
602
  /**
762
603
  * @typedef PriceAdjustment
763
- * @property {number} value - The amount applied on the cart
604
+ * @property {number} value
764
605
  * @property {string} message - The message associated with the price adjustment
765
606
  * @property {string} [apply_expiry] - The date and time when the expiry should be applied
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.
607
+ * @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
608
+ * the restrictions applied to this particular item or service, including
609
+ * whether or not cancellation and return are allowed, etc
769
610
  * @property {boolean} article_level_distribution - Flag indicating whether the
770
611
  * distribution should is done at the article level
771
- * @property {string} [id] - Unique identifier of Price adjustment
612
+ * @property {string} [id]
772
613
  * @property {Collection} collection
773
- * @property {string} type - Type of price adjusment like charge, discount, mop etc.
614
+ * @property {string} type - Type of price adjusment
774
615
  * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
775
- * allowed (default: False) expect for `charge` type
616
+ * allowed (default: False)
776
617
  * @property {boolean} is_authenticated - Flag indicating whether the user is
777
618
  * authenticated
778
619
  * @property {Article[]} article_ids - The list of article object in the price adjustment
779
- * @property {Object} [meta] - Additional information regarding price adjustment
780
- * @property {string} cart_id - Unique identifier of the cart
620
+ * @property {boolean} [auto_remove] - This field if set true will remove mop
621
+ * type price adjustment.
622
+ * @property {Object} [meta]
623
+ * @property {string} cart_id - The ID of the cart
781
624
  */
782
625
 
783
626
  /**
784
- * @typedef PriceAdjustmentResult
627
+ * @typedef PriceAdjustmentResponse
785
628
  * @property {PriceAdjustment} [data]
786
629
  */
787
630
 
788
631
  /**
789
- * @typedef GetPriceAdjustmentResult
632
+ * @typedef GetPriceAdjustmentResponse
790
633
  * @property {PriceAdjustment[]} [data]
791
634
  */
792
635
 
793
636
  /**
794
637
  * @typedef PriceAdjustmentAdd
795
- * @property {number} value - The amount applied on the cart
638
+ * @property {number} value
796
639
  * @property {string} message - The message associated with the price adjustment
797
640
  * @property {string} [apply_expiry] - The date and time when the expiry should be applied
798
641
  * @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
@@ -808,110 +651,100 @@ const Joi = require("joi");
808
651
  * @property {boolean} is_authenticated - Flag indicating whether the user is
809
652
  * authenticated
810
653
  * @property {Article[]} article_ids - The list of article object in the price adjustment
811
- * @property {Object} [meta] - Additional information regarding price adjustment
812
- * @property {string} cart_id - Unique identifier of the cart
654
+ * @property {Object} [meta]
655
+ * @property {string} cart_id - The ID of the cart
656
+ * @property {boolean} [auto_remove] - This field if set true will remove mop
657
+ * type price adjustment.
813
658
  */
814
659
 
815
660
  /**
816
661
  * @typedef CartItem
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
662
+ * @property {number} [quantity]
663
+ * @property {string} product_id
664
+ * @property {string} size
820
665
  */
821
666
 
822
667
  /**
823
- * @typedef OpenapiCartDetailsCreation
824
- * @property {CartItem[]} cart_items - List of products in cart
668
+ * @typedef OpenapiCartDetailsRequest
669
+ * @property {CartItem[]} cart_items
825
670
  */
826
671
 
827
672
  /**
828
673
  * @typedef CouponBreakup
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.
674
+ * @property {string} [title]
675
+ * @property {number} [max_discount_value]
676
+ * @property {number} [value]
677
+ * @property {boolean} [is_applied]
678
+ * @property {string} [uid]
679
+ * @property {string} [coupon_type]
680
+ * @property {string} [sub_title]
681
+ * @property {number} [coupon_value]
682
+ * @property {string} [code]
683
+ * @property {string} [type]
684
+ * @property {number} [minimum_cart_value]
685
+ * @property {string} [message]
686
+ * @property {string} [description]
847
687
  */
848
688
 
849
689
  /**
850
690
  * @typedef DisplayBreakup
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
+ * @property {string} [key]
692
+ * @property {number} [value]
693
+ * @property {string} [currency_code]
694
+ * @property {string} [currency_symbol]
695
+ * @property {string} [display]
696
+ * @property {string[]} [message]
857
697
  */
858
698
 
859
699
  /**
860
700
  * @typedef LoyaltyPoints
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
701
+ * @property {boolean} [is_applied]
702
+ * @property {number} [total]
703
+ * @property {number} [applicable]
704
+ * @property {string} [description]
866
705
  */
867
706
 
868
707
  /**
869
708
  * @typedef RawBreakup
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
709
+ * @property {number} [coupon]
710
+ * @property {number} [gst_charges]
711
+ * @property {number} [mrp_total]
712
+ * @property {number} [fynd_cash]
713
+ * @property {number} [vog]
714
+ * @property {number} [gift_card]
715
+ * @property {number} [cod_charge]
716
+ * @property {number} [total]
717
+ * @property {number} [discount]
718
+ * @property {number} [delivery_charge]
719
+ * @property {number} [you_saved]
720
+ * @property {number} [subtotal]
721
+ * @property {number} [convenience_fee]
886
722
  */
887
723
 
888
724
  /**
889
725
  * @typedef CartBreakup
890
726
  * @property {CouponBreakup} [coupon]
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
727
+ * @property {DisplayBreakup[]} [display]
894
728
  * @property {LoyaltyPoints} [loyalty_points]
895
729
  * @property {RawBreakup} [raw]
896
730
  */
897
731
 
898
732
  /**
899
733
  * @typedef ProductImage
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
734
+ * @property {string} [secure_url]
735
+ * @property {string} [url]
736
+ * @property {string} [aspect_ratio]
903
737
  */
904
738
 
905
739
  /**
906
740
  * @typedef Tags
907
- * @property {Object} [tags] - Tags is a lable or batch that is attached to a
908
- * product in cart
741
+ * @property {Object} [tags]
909
742
  */
910
743
 
911
744
  /**
912
745
  * @typedef BaseInfo
913
- * @property {number} [uid] - Unique identifier of entities like brand or seller
914
- * @property {string} [name] - Name of entities like brand or seller
746
+ * @property {number} [uid]
747
+ * @property {string} [name]
915
748
  */
916
749
 
917
750
  /**
@@ -919,62 +752,43 @@ const Joi = require("joi");
919
752
  * @property {string[]} [product_slug] - Contains list of product slug
920
753
  */
921
754
 
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
-
934
755
  /**
935
756
  * @typedef ProductAction
936
- * @property {string} [type] - Type of action
937
- * @property {string} [url] - Url of the product to render the product
757
+ * @property {string} [type]
758
+ * @property {string} [url]
938
759
  * @property {ActionQuery} [query]
939
- * @property {ProductActionPage} [page]
940
760
  */
941
761
 
942
762
  /**
943
763
  * @typedef CategoryInfo
944
- * @property {number} [uid] - Unique identifier of Product Category
945
- * @property {string} [name] - Category name of the product
764
+ * @property {number} [uid] - Product Category Id
765
+ * @property {string} [name]
946
766
  */
947
767
 
948
768
  /**
949
769
  * @typedef CartProduct
950
770
  * @property {string} [slug] - Unique product url name generated via product
951
771
  * name and other meta data
952
- * @property {ProductImage[]} [images] - Product Images urls of different types
953
- * like secure url, aspect ration url and url
772
+ * @property {ProductImage[]} [images]
954
773
  * @property {Tags} [teaser_tag]
955
774
  * @property {BaseInfo} [brand]
956
775
  * @property {ProductAction} [action]
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
776
+ * @property {number} [uid]
777
+ * @property {string[]} [tags]
778
+ * @property {Object} [_custom_json]
779
+ * @property {string} [type]
780
+ * @property {string} [name]
781
+ * @property {string} [item_code]
782
+ * @property {CategoryInfo[]} [categories]
783
+ * @property {Object} [attributes]
969
784
  */
970
785
 
971
786
  /**
972
787
  * @typedef BasePrice
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
788
+ * @property {number} [effective]
789
+ * @property {string} [currency_code]
790
+ * @property {string} [currency_symbol]
791
+ * @property {number} [marked]
978
792
  */
979
793
 
980
794
  /**
@@ -985,54 +799,43 @@ const Joi = require("joi");
985
799
 
986
800
  /**
987
801
  * @typedef StoreInfo
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
802
+ * @property {number} [uid]
803
+ * @property {string} [name]
804
+ * @property {string} [store_code]
993
805
  */
994
806
 
995
807
  /**
996
808
  * @typedef ProductArticle
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
809
+ * @property {string} [seller_identifier]
810
+ * @property {number} [quantity]
1000
811
  * @property {BaseInfo} [seller]
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
812
+ * @property {Object} [cart_item_meta]
813
+ * @property {Object} [parent_item_identifiers]
814
+ * @property {boolean} [is_gift_visible]
815
+ * @property {string} [uid]
816
+ * @property {Object} [gift_card]
817
+ * @property {string[]} [product_group_tags]
818
+ * @property {Object} [identifier]
819
+ * @property {number} [mto_quantity]
820
+ * @property {Object} [extra_meta]
821
+ * @property {string} [type]
822
+ * @property {Object} [_custom_json]
1020
823
  * @property {ArticlePriceInfo} [price]
1021
- * @property {Object} [meta] - Meta data of article in cart
1022
- * @property {string} [size] - Size of the article added in cart
824
+ * @property {Object} [meta]
825
+ * @property {string} [size]
1023
826
  * @property {StoreInfo} [store]
1024
827
  * @property {string[]} [tags] - A list of article tags
1025
828
  */
1026
829
 
1027
830
  /**
1028
831
  * @typedef Ownership2
1029
- * @property {string} [payable_category] - Promotion amount payable category
1030
- * @property {string} [payable_by] - Promotion amount bearable party
832
+ * @property {string} [payable_category] - Promo amount payable category
833
+ * @property {string} [payable_by] - Promo amount bearable party
1031
834
  */
1032
835
 
1033
836
  /**
1034
837
  * @typedef DiscountRulesApp
1035
- * @property {Object} [offer] - Offer detail for promotion
838
+ * @property {Object} [offer] - Offer for promotion
1036
839
  * @property {Object} [raw_offer] - Raw offer details for promotion
1037
840
  * @property {Object} [item_criteria] - Item criteria of promotion
1038
841
  * @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
@@ -1041,10 +844,9 @@ const Joi = require("joi");
1041
844
  /**
1042
845
  * @typedef AppliedFreeArticles
1043
846
  * @property {string} [parent_item_identifier] - Parent item identifier for free article
1044
- * @property {number} [quantity] - Free article quantity in promotion
1045
- * @property {string} [article_id] - Unique identifier of free article
847
+ * @property {number} [quantity] - Free article quantity
848
+ * @property {string} [article_id] - Free article id
1046
849
  * @property {FreeGiftItems} [free_gift_item_details] - Free gift items details
1047
- * in promotion
1048
850
  */
1049
851
 
1050
852
  /**
@@ -1066,19 +868,21 @@ const Joi = require("joi");
1066
868
  * @property {BuyRules[]} [buy_rules] - Buy rules for promotions
1067
869
  * @property {string} [offer_text] - Offer text of current promotion
1068
870
  * @property {number} [amount] - Per unit discount amount applied with current promotion
871
+ * @property {string} [float_amount] - Per unit discount amount with decimal
872
+ * values applied with current promotion.
1069
873
  * @property {string} [promotion_type] - Promotion type of current promotion
1070
874
  * @property {boolean} [mrp_promotion] - If applied promotion is applied on
1071
875
  * product MRP or ESP
1072
876
  * @property {string} [promotion_group] - Promotion group for the promotion
1073
- * @property {string} [promo_id] - Promotion unique identifier
877
+ * @property {string} [promo_id] - Promotion id
1074
878
  * @property {Object} [meta] - Meta object for extra data
1075
- * @property {string} [code] - Promotion unique code
879
+ * @property {string} [code] - Promotion code
1076
880
  */
1077
881
 
1078
882
  /**
1079
883
  * @typedef PromiseFormatted
1080
- * @property {string} [max] - Maximum Delivery promise formatted timestamp
1081
- * @property {string} [min] - Minimum Delivery promise formatted timestamp
884
+ * @property {string} [max]
885
+ * @property {string} [min]
1082
886
  */
1083
887
 
1084
888
  /**
@@ -1089,8 +893,8 @@ const Joi = require("joi");
1089
893
 
1090
894
  /**
1091
895
  * @typedef PromiseTimestamp
1092
- * @property {number} [max] - Maximum Promise for the shipment
1093
- * @property {number} [min] - Minimum delivery promise time for the shipment
896
+ * @property {number} [max]
897
+ * @property {number} [min]
1094
898
  */
1095
899
 
1096
900
  /**
@@ -1102,23 +906,19 @@ const Joi = require("joi");
1102
906
 
1103
907
  /**
1104
908
  * @typedef CouponDetails
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
909
+ * @property {number} [discount_total_quantity]
910
+ * @property {number} [discount_single_quantity]
911
+ * @property {string} [code]
1110
912
  */
1111
913
 
1112
914
  /**
1113
915
  * @typedef ProductPrice
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
916
+ * @property {number} [marked]
917
+ * @property {number} [add_on]
918
+ * @property {string} [currency_code]
919
+ * @property {string} [currency_symbol]
920
+ * @property {number} [effective]
921
+ * @property {number} [selling]
1122
922
  */
1123
923
 
1124
924
  /**
@@ -1134,259 +934,226 @@ const Joi = require("joi");
1134
934
 
1135
935
  /**
1136
936
  * @typedef ProductAvailabilitySize
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
937
+ * @property {string} [display]
938
+ * @property {string} [value]
939
+ * @property {boolean} [is_available]
1141
940
  */
1142
941
 
1143
942
  /**
1144
943
  * @typedef ProductAvailability
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
944
+ * @property {boolean} [is_valid]
945
+ * @property {number} [other_store_quantity]
946
+ * @property {boolean} [deliverable]
947
+ * @property {ProductAvailabilitySize[]} [available_sizes]
948
+ * @property {boolean} [out_of_stock]
949
+ * @property {string[]} [sizes]
1154
950
  */
1155
951
 
1156
952
  /**
1157
953
  * @typedef PromoMeta
1158
- * @property {string} [message] - Loyalty points message denotes how much
1159
- * loyalty points and applied and how much left with the user
954
+ * @property {string} [message]
1160
955
  */
1161
956
 
1162
957
  /**
1163
958
  * @typedef CartProductInfo
1164
- * @property {number} [quantity] - Quantity of the product added in cart
959
+ * @property {number} [quantity]
1165
960
  * @property {CartProduct} [product]
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
961
+ * @property {string} [product_ean_id]
962
+ * @property {Object} [parent_item_identifiers]
963
+ * @property {boolean} [is_set]
1171
964
  * @property {ProductArticle} [article]
1172
- * @property {AppliedPromotion[]} [promotions_applied] - List of applicable
1173
- * promotion for the product in cart
965
+ * @property {AppliedPromotion[]} [promotions_applied]
1174
966
  * @property {ShipmentPromise} [delivery_promise]
1175
- * @property {string} [key] - The attribute key associated with the size
967
+ * @property {string} [key]
1176
968
  * @property {CouponDetails} [coupon]
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
969
+ * @property {Object} [bulk_offer]
1179
970
  * @property {ProductPriceInfo} [price]
1180
- * @property {string} [coupon_message] - Message for the coupon denotes which
1181
- * coupon is applied and empty if not applied
971
+ * @property {string} [coupon_message]
1182
972
  * @property {CartProductIdentifer} identifiers
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
973
+ * @property {string} [message]
974
+ * @property {string} [discount]
1186
975
  * @property {ProductAvailability} [availability]
1187
- * @property {Object} [moq] - An Integer indication the Minimum Order Quantity
1188
- * of a product, e.g. 100.
976
+ * @property {Object} [moq]
1189
977
  * @property {ProductPriceInfo} [price_per_unit]
1190
978
  * @property {PromoMeta} [promo_meta]
1191
- * @property {Object} [custom_order] - Whether MTO (Make to Order) is enabled or not.
979
+ * @property {Object} [custom_order]
1192
980
  */
1193
981
 
1194
982
  /**
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
983
+ * @typedef OpenapiCartDetailsResponse
984
+ * @property {boolean} [is_valid]
985
+ * @property {string} [message]
1199
986
  * @property {CartBreakup} [breakup_values]
1200
- * @property {CartProductInfo[]} [items] - Items details in cart
987
+ * @property {CartProductInfo[]} [items]
1201
988
  */
1202
989
 
1203
990
  /**
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
991
+ * @typedef OpenApiErrorResponse
992
+ * @property {boolean} [success]
993
+ * @property {string} [message]
1207
994
  * @property {Object} [errors] - Contains field name which has error as key and
1208
995
  * error message as value
1209
996
  */
1210
997
 
1211
998
  /**
1212
999
  * @typedef ShippingAddress
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
1000
+ * @property {string} [country]
1001
+ * @property {string} [state]
1002
+ * @property {string} [city]
1003
+ * @property {number} [phone]
1004
+ * @property {string} area_code
1005
+ * @property {string} [country_iso_code]
1006
+ * @property {string} [country_phone_code]
1007
+ * @property {Object} [meta]
1008
+ * @property {string} [address_type]
1009
+ * @property {string} [area]
1010
+ * @property {string} [area_code_slug]
1011
+ * @property {string} [name]
1012
+ * @property {string} [landmark]
1013
+ * @property {string} [email]
1014
+ * @property {string} [country_code]
1015
+ * @property {number} [pincode]
1016
+ * @property {string} [address]
1017
+ */
1018
+
1019
+ /**
1020
+ * @typedef OpenApiCartServiceabilityRequest
1021
+ * @property {CartItem[]} cart_items
1236
1022
  * @property {ShippingAddress} shipping_address
1237
1023
  */
1238
1024
 
1239
1025
  /**
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
1026
+ * @typedef OpenApiCartServiceabilityResponse
1027
+ * @property {boolean} [is_valid]
1028
+ * @property {CartProductInfo[]} [items]
1246
1029
  * @property {ShipmentPromise} [delivery_promise]
1247
- * @property {string} [message] - Message of the cart detail API response
1030
+ * @property {string} [message]
1248
1031
  * @property {CartBreakup} [breakup_values]
1249
1032
  */
1250
1033
 
1251
1034
  /**
1252
1035
  * @typedef OpenApiFiles
1253
- * @property {string} key - Key represents name of file
1254
- * @property {string[]} values - List of urls path
1036
+ * @property {string} key
1037
+ * @property {string[]} values
1255
1038
  */
1256
1039
 
1257
1040
  /**
1258
1041
  * @typedef CartItemMeta
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
1042
+ * @property {boolean} [primary_item]
1043
+ * @property {string} [group_id]
1261
1044
  */
1262
1045
 
1263
1046
  /**
1264
1047
  * @typedef MultiTenderPaymentMeta
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
1048
+ * @property {string} [payment_id]
1049
+ * @property {string} [payment_gateway]
1050
+ * @property {Object} [extra_meta]
1051
+ * @property {string} [current_status]
1052
+ * @property {string} [order_id]
1271
1053
  */
1272
1054
 
1273
1055
  /**
1274
1056
  * @typedef MultiTenderPaymentMethod
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
1057
+ * @property {string} mode
1058
+ * @property {number} amount - Payment amount
1277
1059
  * @property {MultiTenderPaymentMeta} [meta]
1278
- * @property {string} [name] - Name of the payment mode used to make payment
1060
+ * @property {string} [name] - Payment mode name
1279
1061
  */
1280
1062
 
1281
1063
  /**
1282
1064
  * @typedef OpenApiOrderItem
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
+ * @property {number} cashback_applied
1066
+ * @property {number} [quantity]
1067
+ * @property {string} size
1068
+ * @property {number} coupon_effective_discount
1069
+ * @property {number} amount_paid
1070
+ * @property {number} delivery_charges
1071
+ * @property {number} price_marked
1072
+ * @property {OpenApiFiles[]} [files]
1292
1073
  * @property {CartItemMeta} [meta]
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
+ * @property {Object} [extra_meta]
1075
+ * @property {number} product_id
1076
+ * @property {number} [loyalty_discount]
1077
+ * @property {number} discount
1078
+ * @property {number} price_effective
1079
+ * @property {MultiTenderPaymentMethod[]} payment_methods
1080
+ * @property {number} [employee_discount]
1081
+ * @property {number} cod_charges
1304
1082
  */
1305
1083
 
1306
1084
  /**
1307
1085
  * @typedef OpenApiPlatformCheckoutReq
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
1086
+ * @property {string} [payment_mode]
1087
+ * @property {number} cart_value
1088
+ * @property {OpenApiOrderItem[]} cart_items
1312
1089
  * @property {ShippingAddress} [shipping_address]
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
1090
+ * @property {number} [loyalty_discount]
1091
+ * @property {string} [comment]
1092
+ * @property {MultiTenderPaymentMethod[]} payment_methods
1093
+ * @property {Object} [employee_discount]
1094
+ * @property {string} [coupon]
1095
+ * @property {number} cashback_applied
1096
+ * @property {string} [gstin]
1321
1097
  * @property {ShippingAddress} billing_address
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
+ * @property {string} coupon_code
1099
+ * @property {number} coupon_value
1100
+ * @property {number} delivery_charges
1101
+ * @property {string} [affiliate_order_id]
1102
+ * @property {string} [currency_code]
1103
+ * @property {string} [order_id]
1104
+ * @property {OpenApiFiles[]} [files]
1105
+ * @property {number} cod_charges
1331
1106
  */
1332
1107
 
1333
1108
  /**
1334
- * @typedef OpenApiCheckoutResult
1335
- * @property {boolean} [success] - The request success is defined
1336
- * @property {string} [message] - Message of the api response
1109
+ * @typedef OpenApiCheckoutResponse
1110
+ * @property {boolean} [success]
1111
+ * @property {string} [message]
1337
1112
  * @property {string} [order_ref_id] - Order id sent in request
1338
1113
  * @property {string} order_id - Fynd order id
1339
1114
  */
1340
1115
 
1341
1116
  /**
1342
1117
  * @typedef AbandonedCart
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
1118
+ * @property {string} expire_at
1119
+ * @property {Object} [promotion]
1120
+ * @property {boolean} is_default
1121
+ * @property {string} [comment]
1122
+ * @property {Object[]} articles
1123
+ * @property {Object} [coupon]
1124
+ * @property {number} [bulk_coupon_discount]
1125
+ * @property {string} _id
1126
+ * @property {Object} [fynd_credits]
1127
+ * @property {number[]} [fc_index_map]
1128
+ * @property {string} [order_id]
1129
+ * @property {number} [discount]
1130
+ * @property {Object} [cod_charges]
1131
+ * @property {Object} [payments]
1132
+ * @property {string} [payment_mode]
1133
+ * @property {Object[]} [shipments]
1134
+ * @property {Object} [pick_up_customer_details]
1135
+ * @property {number} uid
1136
+ * @property {string} [checkout_mode]
1137
+ * @property {number} [cart_value]
1138
+ * @property {boolean} [is_archive]
1139
+ * @property {string} created_on
1140
+ * @property {string} last_modified
1141
+ * @property {Object} [meta]
1142
+ * @property {boolean} [buy_now]
1143
+ * @property {boolean} [is_active]
1144
+ * @property {Object} cashback
1145
+ * @property {Object[]} [payment_methods]
1146
+ * @property {string} [gstin]
1147
+ * @property {Object} [delivery_charges]
1148
+ * @property {boolean} [merge_qty]
1149
+ * @property {string} user_id
1150
+ * @property {string} [app_id]
1151
+ */
1152
+
1153
+ /**
1154
+ * @typedef AbandonedCartResponse
1155
+ * @property {AbandonedCart[]} [items]
1156
+ * @property {Object} [result]
1390
1157
  * @property {Page} [page]
1391
1158
  * @property {boolean} [success] - The request success is defined
1392
1159
  * @property {string} [message] - Message of the response
@@ -1394,54 +1161,47 @@ const Joi = require("joi");
1394
1161
 
1395
1162
  /**
1396
1163
  * @typedef PaymentSelectionLock
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
1164
+ * @property {string} [payment_identifier]
1165
+ * @property {string} [default_options]
1166
+ * @property {boolean} [enabled]
1400
1167
  */
1401
1168
 
1402
1169
  /**
1403
1170
  * @typedef CartCurrency
1404
1171
  * @property {string} [code] - Currency code defined by ISO 4217:2015
1405
- * @property {string} [symbol] - Currency symbol for currency of user cart prices
1172
+ * @property {string} [symbol]
1406
1173
  */
1407
1174
 
1408
1175
  /**
1409
1176
  * @typedef CartDetailCoupon
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
1177
+ * @property {number} [cashback_amount]
1178
+ * @property {string} [cashback_message_primary]
1179
+ * @property {string} [cashback_message_secondary]
1180
+ * @property {string} [coupon_code]
1181
+ * @property {string} [coupon_description]
1182
+ * @property {string} [coupon_id]
1183
+ * @property {string} [coupon_subtitle]
1184
+ * @property {string} [coupon_title]
1185
+ * @property {string} [coupon_type]
1186
+ * @property {number} [coupon_value]
1187
+ * @property {number} [discount]
1188
+ * @property {boolean} [is_applied]
1189
+ * @property {boolean} [is_valid]
1190
+ * @property {number} [maximum_discount_value]
1191
+ * @property {string} [message]
1192
+ * @property {number} [minimum_cart_value]
1432
1193
  */
1433
1194
 
1434
1195
  /**
1435
1196
  * @typedef ChargesThreshold
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
1197
+ * @property {number} [charges]
1198
+ * @property {number} [threshold]
1439
1199
  */
1440
1200
 
1441
1201
  /**
1442
1202
  * @typedef DeliveryChargesConfig
1443
- * @property {boolean} [enabled] - Delivery charge enabled for the cart or not
1444
- * @property {ChargesThreshold[]} [charges] - Charges applicable based on threshold
1203
+ * @property {boolean} [enabled]
1204
+ * @property {ChargesThreshold[]} [charges]
1445
1205
  */
1446
1206
 
1447
1207
  /**
@@ -1450,734 +1210,546 @@ const Joi = require("joi");
1450
1210
  */
1451
1211
 
1452
1212
  /**
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
1213
+ * @typedef CartDetailResponse
1214
+ * @property {number} [cart_id]
1215
+ * @property {string} [uid]
1216
+ * @property {string} [coupon_text]
1217
+ * @property {string} [id]
1218
+ * @property {Object} [pan_config]
1460
1219
  * @property {ShipmentPromise} [delivery_promise]
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
1220
+ * @property {string} [comment]
1221
+ * @property {CartProductInfo[]} [items]
1465
1222
  * @property {PaymentSelectionLock} [payment_selection_lock]
1466
- * @property {string} [delivery_charge_info] - Delivery charge in information
1467
- * message on shipment
1223
+ * @property {string} [delivery_charge_info]
1468
1224
  * @property {CartCommonConfig} [common_config]
1469
1225
  * @property {CartDetailCoupon} [coupon]
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
1226
+ * @property {boolean} [restrict_checkout]
1227
+ * @property {string} [message]
1228
+ * @property {Object} [notification]
1229
+ * @property {string} [staff_user_id]
1230
+ * @property {boolean} [success]
1478
1231
  * @property {CartBreakup} [breakup_values]
1479
- * @property {boolean} [is_valid] - Cart validity flag determines the if the
1480
- * response is valid or not
1232
+ * @property {boolean} [is_valid]
1481
1233
  * @property {CartCurrency} [currency]
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
1234
+ * @property {string} [checkout_mode]
1235
+ * @property {string} [last_modified]
1236
+ * @property {boolean} [buy_now]
1237
+ * @property {string} [gstin]
1238
+ * @property {AppliedPromotion[]} [applied_promo_details]
1239
+ * @property {string} [pan_no]
1240
+ * @property {Object} [custom_cart_meta]
1493
1241
  */
1494
1242
 
1495
1243
  /**
1496
1244
  * @typedef AddProductCart
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
1245
+ * @property {number} [quantity]
1246
+ * @property {string} [item_size]
1247
+ * @property {number} [seller_id]
1248
+ * @property {Object[]} [parent_item_identifiers]
1249
+ * @property {string[]} [product_group_tags]
1250
+ * @property {string} [article_id]
1251
+ * @property {Object} [article_assignment]
1252
+ * @property {number} [store_id]
1253
+ * @property {string} [display]
1254
+ * @property {number} [item_id]
1255
+ * @property {Object} [extra_meta]
1256
+ * @property {Object} [_custom_json]
1257
+ * @property {Object} [meta]
1258
+ * @property {boolean} [pos]
1520
1259
  * @property {string} [seller_identifier] - Add items using seller identifier for store os
1521
1260
  */
1522
1261
 
1523
1262
  /**
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
1263
+ * @typedef AddCartRequest
1264
+ * @property {boolean} [new_cart]
1265
+ * @property {AddProductCart[]} [items]
1529
1266
  */
1530
1267
 
1531
1268
  /**
1532
- * @typedef AddCartDetailResult
1269
+ * @typedef AddCartDetailResponse
1533
1270
  * @property {boolean} [success] - True if all items are added successfully.
1534
1271
  * False if partially added or not added.
1535
- * @property {CartDetailResult} [cart]
1272
+ * @property {CartDetailResponse} [cart]
1536
1273
  * @property {boolean} [partial] - When adding multiple items check if all
1537
1274
  * added. True if only few are added.
1538
- * @property {string} [message] - Message of add cart API response
1275
+ * @property {string} [message]
1539
1276
  */
1540
1277
 
1541
1278
  /**
1542
1279
  * @typedef UpdateProductCart
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
+ * @property {number} [quantity]
1281
+ * @property {string} [item_size]
1282
+ * @property {Object} [parent_item_identifiers]
1283
+ * @property {Object} [meta]
1284
+ * @property {Object} [extra_meta]
1285
+ * @property {Object} [_custom_json]
1286
+ * @property {number} [item_id]
1287
+ * @property {number} [item_index]
1553
1288
  * @property {CartProductIdentifer} identifiers
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.
1289
+ * @property {string} [article_id]
1562
1290
  */
1563
1291
 
1564
1292
  /**
1565
- * @typedef UpdateCartCreation
1293
+ * @typedef UpdateCartRequest
1566
1294
  * @property {UpdateProductCart[]} [items]
1567
- * @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift
1568
- * items with updated sizes.
1569
- * @property {string} operation - Cart opertaion type
1295
+ * @property {string} operation
1570
1296
  */
1571
1297
 
1572
1298
  /**
1573
- * @typedef UpdateCartDetailResult
1299
+ * @typedef UpdateCartDetailResponse
1574
1300
  * @property {boolean} [success] - True if all items are added successfully.
1575
1301
  * False if partially added or not added.
1576
- * @property {CartDetailResult} [cart]
1577
- * @property {string} [message] - Message of update cart API response
1302
+ * @property {CartDetailResponse} [cart]
1303
+ * @property {string} [message]
1578
1304
  */
1579
1305
 
1580
1306
  /**
1581
1307
  * @typedef OverrideCartItemPromo
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
1308
+ * @property {string} promo_id
1309
+ * @property {string} promo_amount
1310
+ * @property {string} [promo_desc]
1585
1311
  * @property {string} [rwrd_tndr]
1586
- * @property {Object[]} [item_list] - List of items
1587
- * @property {string} [parent_promo_id] - Parent promotion unique identifier
1312
+ * @property {Object[]} [item_list]
1313
+ * @property {string} [parent_promo_id]
1588
1314
  */
1589
1315
 
1590
1316
  /**
1591
1317
  * @typedef OverrideCartItem
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
1318
+ * @property {string} [seller_identifier]
1319
+ * @property {number} [quantity]
1320
+ * @property {string} size
1321
+ * @property {number} price_marked
1322
+ * @property {number} amount_paid
1323
+ * @property {OverrideCartItemPromo[]} [promo_list]
1324
+ * @property {Object} [extra_meta]
1325
+ * @property {number} item_id
1326
+ * @property {number} discount
1327
+ * @property {number} price_effective
1603
1328
  */
1604
1329
 
1605
1330
  /**
1606
1331
  * @typedef OverrideCheckoutReq
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
1332
+ * @property {string} cart_id
1333
+ * @property {string} payment_mode
1334
+ * @property {Object} [billing_address]
1335
+ * @property {string} merchant_code
1336
+ * @property {string} payment_identifier
1337
+ * @property {string} currency_code
1338
+ * @property {string} aggregator
1339
+ * @property {string} order_type
1340
+ * @property {string} [callback_url]
1341
+ * @property {OverrideCartItem[]} cart_items
1342
+ * @property {number} [ordering_store]
1343
+ * @property {Object} [shipping_address]
1344
+ */
1345
+
1346
+ /**
1347
+ * @typedef OverrideCheckoutResponse
1348
+ * @property {Object} data
1349
+ * @property {Object} cart
1350
+ * @property {string} success
1351
+ * @property {string} order_id
1352
+ * @property {string} message
1353
+ */
1354
+
1355
+ /**
1356
+ * @typedef GetShareCartLinkRequest
1644
1357
  * @property {string} [id] - Cart uid for generating sharing
1645
1358
  * @property {Object} [meta] - Staff, Ordering store or any other data. This
1646
1359
  * data will be used to generate link as well as sent as shared details.
1647
1360
  */
1648
1361
 
1649
1362
  /**
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
1363
+ * @typedef GetShareCartLinkResponse
1364
+ * @property {string} [token] - Short url unique id
1365
+ * @property {string} [share_url] - Short shareable final url
1655
1366
  */
1656
1367
 
1657
1368
  /**
1658
1369
  * @typedef SharedCartDetails
1659
1370
  * @property {Object} [source] - Share link device and other source information
1660
1371
  * @property {Object} [user] - User details of who generated share link
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
1372
+ * @property {string} [token] - Short link id
1373
+ * @property {string} [created_on]
1663
1374
  * @property {Object} [meta] - Meta data sent while generating share cart link
1664
1375
  */
1665
1376
 
1666
1377
  /**
1667
1378
  * @typedef SharedCart
1668
- * @property {string} [coupon_text] - Coupon text of the applied coupon on user cart
1669
- * @property {string} [id] - Cart id of shared cart
1379
+ * @property {string} [coupon_text]
1380
+ * @property {string} [id]
1670
1381
  * @property {ShipmentPromise} [delivery_promise]
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
1382
+ * @property {string} [comment]
1383
+ * @property {CartProductInfo[]} [items]
1675
1384
  * @property {SharedCartDetails} [shared_cart_details]
1676
1385
  * @property {PaymentSelectionLock} [payment_selection_lock]
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
1386
+ * @property {string} [delivery_charge_info]
1387
+ * @property {boolean} [restrict_checkout]
1388
+ * @property {string} [message]
1682
1389
  * @property {CartBreakup} [breakup_values]
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
1390
+ * @property {boolean} [is_valid]
1391
+ * @property {string} [uid]
1392
+ * @property {string} [checkout_mode]
1687
1393
  * @property {CartCurrency} [currency]
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
1394
+ * @property {string} [last_modified]
1395
+ * @property {boolean} [buy_now]
1396
+ * @property {number} [cart_id]
1397
+ * @property {string} [gstin]
1398
+ * @property {Object} [custom_cart_meta]
1694
1399
  */
1695
1400
 
1696
1401
  /**
1697
- * @typedef SharedCartResult
1402
+ * @typedef SharedCartResponse
1698
1403
  * @property {SharedCart} [cart]
1699
- * @property {string} [error] - Error details if any error occurs which includes
1700
- * type of error, error code and error message
1404
+ * @property {string} [error]
1701
1405
  */
1702
1406
 
1703
1407
  /**
1704
1408
  * @typedef CartList
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
1409
+ * @property {string} [cart_id]
1410
+ * @property {Object} [pick_up_customer_details]
1411
+ * @property {number} [cart_value]
1412
+ * @property {string} [created_on]
1413
+ * @property {string} [user_id]
1414
+ * @property {string} [currency_code]
1415
+ * @property {number} [item_counts]
1713
1416
  */
1714
1417
 
1715
1418
  /**
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
1419
+ * @typedef MultiCartResponse
1420
+ * @property {boolean} [success]
1421
+ * @property {CartList[]} [data]
1719
1422
  */
1720
1423
 
1721
1424
  /**
1722
1425
  * @typedef UpdateUserCartMapping
1723
- * @property {string} user_id - User Id of user for which we map with the cart
1426
+ * @property {string} user_id
1724
1427
  */
1725
1428
 
1726
1429
  /**
1727
1430
  * @typedef UserInfo
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
1431
+ * @property {string} [gender]
1432
+ * @property {string} [modified_on]
1433
+ * @property {string} [_id]
1434
+ * @property {string} [uid]
1435
+ * @property {string} [external_id]
1436
+ * @property {string} [mobile]
1437
+ * @property {string} [last_name]
1438
+ * @property {string} [created_at]
1439
+ * @property {string} [first_name]
1737
1440
  */
1738
1441
 
1739
1442
  /**
1740
- * @typedef UserCartMappingResult
1741
- * @property {string} [coupon_text] - Coupon text of coupon applied on cart
1443
+ * @typedef UserCartMappingResponse
1444
+ * @property {string} [coupon_text]
1742
1445
  * @property {UserInfo} [user]
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
1446
+ * @property {string} [id]
1447
+ * @property {Object} [pan_config]
1746
1448
  * @property {ShipmentPromise} [delivery_promise]
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
1449
+ * @property {string} [comment]
1450
+ * @property {CartProductInfo[]} [items]
1751
1451
  * @property {PaymentSelectionLock} [payment_selection_lock]
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
1452
+ * @property {string} [delivery_charge_info]
1453
+ * @property {boolean} [restrict_checkout]
1454
+ * @property {string} [message]
1757
1455
  * @property {CartBreakup} [breakup_values]
1758
- * @property {boolean} [is_valid] - Cart validity flag determines the if the
1759
- * response is valid or not
1456
+ * @property {boolean} [is_valid]
1760
1457
  * @property {CartCurrency} [currency]
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
1458
+ * @property {string} [checkout_mode]
1459
+ * @property {string} [last_modified]
1460
+ * @property {boolean} [buy_now]
1461
+ * @property {string} [gstin]
1462
+ * @property {Object} [custom_cart_meta]
1463
+ * @property {AppliedPromotion[]} [applied_promo_details]
1464
+ * @property {string} [pan_no]
1772
1465
  */
1773
1466
 
1774
1467
  /**
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
1468
+ * @typedef PlatformAddCartRequest
1469
+ * @property {string} [user_id]
1470
+ * @property {boolean} [new_cart]
1471
+ * @property {AddProductCart[]} [items]
1782
1472
  */
1783
1473
 
1784
1474
  /**
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
1475
+ * @typedef PlatformUpdateCartRequest
1476
+ * @property {string} [user_id]
1477
+ * @property {UpdateProductCart[]} [items]
1478
+ * @property {string} operation
1794
1479
  */
1795
1480
 
1796
1481
  /**
1797
- * @typedef DeleteCartDetails
1798
- * @property {string[]} [cart_id_list] - List of all cart ids, which need to delete
1482
+ * @typedef DeleteCartRequest
1483
+ * @property {string[]} [cart_id_list]
1799
1484
  */
1800
1485
 
1801
1486
  /**
1802
- * @typedef DeleteCartDetailResult
1487
+ * @typedef DeleteCartDetailResponse
1803
1488
  * @property {boolean} [success] - True if cart is archived successfully. False
1804
1489
  * if not archived.
1805
- * @property {string} [message] - Message for delete cart response
1490
+ * @property {string} [message]
1806
1491
  */
1807
1492
 
1808
1493
  /**
1809
- * @typedef CartItemCountResult
1494
+ * @typedef CartItemCountResponse
1810
1495
  * @property {number} [user_cart_items_count] - Item count present in cart
1811
1496
  */
1812
1497
 
1813
1498
  /**
1814
1499
  * @typedef Coupon
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
1500
+ * @property {string} [title]
1501
+ * @property {number} [max_discount_value]
1502
+ * @property {string} [coupon_code]
1503
+ * @property {boolean} [is_applied]
1504
+ * @property {string} [coupon_type]
1505
+ * @property {string} [expires_on]
1506
+ * @property {number} [coupon_value]
1507
+ * @property {string} [sub_title]
1508
+ * @property {number} [minimum_cart_value]
1509
+ * @property {boolean} [is_applicable]
1510
+ * @property {string} [message]
1511
+ * @property {string} [description]
1512
+ * @property {string} [start_date]
1513
+ * @property {string} [end_date]
1514
+ * @property {string} [coupon_applicable_message]
1838
1515
  */
1839
1516
 
1840
1517
  /**
1841
1518
  * @typedef PageCoupon
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
1519
+ * @property {boolean} [has_next]
1520
+ * @property {number} [current]
1521
+ * @property {number} [total]
1522
+ * @property {number} [total_item_count]
1523
+ * @property {boolean} [has_previous]
1848
1524
  */
1849
1525
 
1850
1526
  /**
1851
- * @typedef GetCouponResult
1852
- * @property {Coupon[]} [available_coupon_list] - List of available coupon which
1853
- * can be applied on cart
1527
+ * @typedef GetCouponResponse
1528
+ * @property {Coupon[]} [available_coupon_list]
1854
1529
  * @property {PageCoupon} [page]
1855
1530
  */
1856
1531
 
1857
1532
  /**
1858
- * @typedef ApplyCouponDetails
1533
+ * @typedef ApplyCouponRequest
1859
1534
  * @property {string} coupon_code - Coupon code to be applied
1860
1535
  */
1861
1536
 
1862
1537
  /**
1863
1538
  * @typedef GeoLocation
1864
- * @property {number} [longitude] - Longitude coordinate for address
1865
- * @property {number} [latitude] - Latitude coordinate for address
1539
+ * @property {number} [longitude]
1540
+ * @property {number} [latitude]
1866
1541
  */
1867
1542
 
1868
1543
  /**
1869
1544
  * @typedef PlatformAddress
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
1545
+ * @property {string} [phone]
1546
+ * @property {string} [id]
1547
+ * @property {string} [area_code_slug]
1548
+ * @property {string} [country_code]
1875
1549
  * @property {GeoLocation} [geo_location]
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
1550
+ * @property {string} [country]
1551
+ * @property {string} [state]
1552
+ * @property {boolean} [is_default_address]
1553
+ * @property {string[]} [tags]
1554
+ * @property {string} [created_by_user_id]
1555
+ * @property {string} [landmark]
1556
+ * @property {string} [email]
1557
+ * @property {string} [area_code]
1558
+ * @property {string} [checkout_mode]
1559
+ * @property {Object} [meta]
1560
+ * @property {boolean} [is_active]
1561
+ * @property {string} [name]
1562
+ * @property {Object} [google_map_point]
1563
+ * @property {string} [cart_id]
1564
+ * @property {string} [city]
1565
+ * @property {string} [sector]
1894
1566
  * @property {string} [state_code] - State code for international address
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
1567
+ * @property {string} [area]
1568
+ * @property {string} [user_id]
1569
+ * @property {string} [address_type]
1570
+ * @property {string} [address]
1571
+ * @property {string} [country_phone_code]
1572
+ * @property {string} [country_iso_code]
1573
+ * @property {Object} [_custom_json]
1902
1574
  */
1903
1575
 
1904
1576
  /**
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.
1577
+ * @typedef PlatformGetAddressesResponse
1578
+ * @property {PlatformAddress[]} [address]
1908
1579
  */
1909
1580
 
1910
1581
  /**
1911
- * @typedef PlatformGetAddressesDetails
1912
- * @property {PlatformAddress[]} [address] - List of all address saved by customer
1913
- * @property {ValidationConfig} [validation_config]
1582
+ * @typedef SaveAddressResponse
1583
+ * @property {string} [id]
1584
+ * @property {boolean} [success]
1585
+ * @property {boolean} [is_default_address]
1914
1586
  */
1915
1587
 
1916
1588
  /**
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
1589
+ * @typedef UpdateAddressResponse
1590
+ * @property {string} [id]
1591
+ * @property {boolean} [is_default_address]
1592
+ * @property {boolean} [success]
1593
+ * @property {boolean} [is_updated]
1922
1594
  */
1923
1595
 
1924
1596
  /**
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
1597
+ * @typedef DeleteAddressResponse
1598
+ * @property {string} [id]
1599
+ * @property {boolean} [is_deleted]
1932
1600
  */
1933
1601
 
1934
1602
  /**
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
1603
+ * @typedef PlatformSelectCartAddressRequest
1604
+ * @property {string} [cart_id]
1605
+ * @property {string} [billing_address_id]
1606
+ * @property {string} [checkout_mode]
1607
+ * @property {string} [id]
1608
+ * @property {string} [user_id]
1939
1609
  */
1940
1610
 
1941
1611
  /**
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
1612
+ * @typedef ShipmentArticle
1613
+ * @property {string} [meta]
1614
+ * @property {string} [quantity]
1615
+ * @property {string} [article_id]
1950
1616
  */
1951
1617
 
1952
1618
  /**
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
+ * @typedef PlatformShipmentResponse
1620
+ * @property {number} [shipments]
1621
+ * @property {number} [fulfillment_id]
1622
+ * @property {CartProductInfo[]} [items]
1623
+ * @property {Object} [dp_options]
1624
+ * @property {string} [shipment_type]
1625
+ * @property {string} [order_type]
1626
+ * @property {string} [box_type]
1973
1627
  * @property {ShipmentPromise} [promise]
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
1628
+ * @property {string} [dp_id]
1629
+ * @property {string} [fulfillment_type]
1630
+ * @property {ShipmentArticle[]} [articles]
1977
1631
  */
1978
1632
 
1979
1633
  /**
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
1634
+ * @typedef PlatformCartShipmentsResponse
1635
+ * @property {string} [coupon_text]
1636
+ * @property {string} [id]
1637
+ * @property {Object} [pan_config]
1985
1638
  * @property {ShipmentPromise} [delivery_promise]
1986
- * @property {string} [comment] - Comment message added in cart
1987
- * @property {CartProductInfo[]} [items] - List of items in cart
1639
+ * @property {string} [comment]
1640
+ * @property {CartProductInfo[]} [items]
1988
1641
  * @property {PaymentSelectionLock} [payment_selection_lock]
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
1642
+ * @property {string} [delivery_charge_info]
1643
+ * @property {boolean} [restrict_checkout]
1644
+ * @property {string} [message]
1994
1645
  * @property {CartBreakup} [breakup_values]
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
1646
+ * @property {string} [staff_user_id]
1647
+ * @property {boolean} [is_valid]
1648
+ * @property {PlatformShipmentResponse[]} [shipments]
2001
1649
  * @property {CartCurrency} [currency]
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
+ * @property {string} [checkout_mode]
1651
+ * @property {string} [last_modified]
1652
+ * @property {boolean} [buy_now]
1653
+ * @property {string} [gstin]
1654
+ * @property {AppliedPromotion[]} [applied_promo_details]
1655
+ * @property {boolean} [error]
1656
+ * @property {string} [pan_no]
1657
+ * @property {Object} [custom_cart_meta]
2013
1658
  */
2014
1659
 
2015
1660
  /**
2016
1661
  * @typedef UpdateCartShipmentItem
2017
1662
  * @property {number} [quantity] - Quantity of product in shipment
2018
1663
  * @property {string} shipment_type - Shipment delivery type
2019
- * @property {string} article_uid - Article unique id for shipment
1664
+ * @property {string} article_uid - Article mongo id
2020
1665
  */
2021
1666
 
2022
1667
  /**
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
1668
+ * @typedef UpdateCartShipmentRequest
1669
+ * @property {UpdateCartShipmentItem[]} shipments
2027
1670
  */
2028
1671
 
2029
1672
  /**
2030
- * @typedef PlatformCartMetaCreation
2031
- * @property {string} [gstin] - GSTIN number to be added in user cart
1673
+ * @typedef PlatformCartMetaRequest
1674
+ * @property {string} [gstin]
2032
1675
  * @property {Object} [pick_up_customer_details] - Customer contact details for
2033
1676
  * customer pickup at store
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
1677
+ * @property {string} [checkout_mode]
1678
+ * @property {Object} [gift_details]
1679
+ * @property {string} [pan_no]
1680
+ * @property {string} [comment]
2039
1681
  * @property {string} [staff_user_id] - Staff user id
2040
1682
  */
2041
1683
 
2042
1684
  /**
2043
- * @typedef CartMetaDetails
2044
- * @property {boolean} [is_valid] - Whether added meta was vaild
2045
- * @property {string} [message] - Detailed message that used to display
1685
+ * @typedef CartMetaResponse
1686
+ * @property {boolean} [is_valid]
1687
+ * @property {string} [message]
2046
1688
  */
2047
1689
 
2048
1690
  /**
2049
- * @typedef CartMetaMissingDetails
2050
- * @property {string[]} [errors] - Detailed errors for invalid cart meta request
1691
+ * @typedef CartMetaMissingResponse
1692
+ * @property {string[]} [errors]
2051
1693
  */
2052
1694
 
2053
1695
  /**
2054
1696
  * @typedef StaffCheckout
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
1697
+ * @property {string} [employee_code]
1698
+ * @property {string} _id
1699
+ * @property {string} user
1700
+ * @property {string} last_name
1701
+ * @property {string} first_name
2064
1702
  */
2065
1703
 
2066
1704
  /**
2067
1705
  * @typedef CustomerDetails
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
1706
+ * @property {string} [name]
1707
+ * @property {string} [email]
1708
+ * @property {string} mobile
2074
1709
  */
2075
1710
 
2076
1711
  /**
2077
1712
  * @typedef Files
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]
1713
+ * @property {string} key
1714
+ * @property {string[]} values
2121
1715
  */
2122
1716
 
2123
1717
  /**
2124
1718
  * @typedef CheckCart
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
1719
+ * @property {string} [coupon_text]
1720
+ * @property {string} [cod_message]
1721
+ * @property {string} [id]
1722
+ * @property {string} [store_code]
2129
1723
  * @property {ShipmentPromise} [delivery_promise]
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
1724
+ * @property {string} [comment]
1725
+ * @property {string} [user_type]
1726
+ * @property {CartProductInfo[]} [items]
1727
+ * @property {string} [error_message]
1728
+ * @property {boolean} [success]
2136
1729
  * @property {PaymentSelectionLock} [payment_selection_lock]
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
1730
+ * @property {string} [delivery_charge_info]
1731
+ * @property {boolean} [restrict_checkout]
1732
+ * @property {string} [order_id]
1733
+ * @property {string} [message]
2143
1734
  * @property {CartBreakup} [breakup_values]
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
1735
+ * @property {number} [cod_charges]
1736
+ * @property {boolean} [is_valid]
1737
+ * @property {string} [uid]
1738
+ * @property {string} [checkout_mode]
2149
1739
  * @property {CartCurrency} [currency]
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
1740
+ * @property {string} [last_modified]
1741
+ * @property {boolean} [buy_now]
1742
+ * @property {number} [delivery_charge_order_value]
1743
+ * @property {number} [cart_id]
1744
+ * @property {Object[]} [store_emps]
1745
+ * @property {string} [gstin]
1746
+ * @property {boolean} [cod_available]
1747
+ * @property {number} [delivery_charges]
1748
+ * @property {Object} [custom_cart_meta]
2177
1749
  */
2178
1750
 
2179
1751
  /**
2180
- * @typedef CartCheckoutResult
1752
+ * @typedef CartCheckoutResponse
2181
1753
  * @property {string} [app_intercept_url]
2182
1754
  * @property {Object} [data]
2183
1755
  * @property {CheckCart} [cart]
@@ -2189,204 +1761,157 @@ const Joi = require("joi");
2189
1761
  */
2190
1762
 
2191
1763
  /**
2192
- * @typedef CartDeliveryModesDetails
1764
+ * @typedef CartDeliveryModesResponse
2193
1765
  * @property {number[]} [pickup_stores] - Store pick up available store uids
2194
1766
  * @property {string[]} [available_modes] - Available delivery modes
2195
1767
  */
2196
1768
 
2197
1769
  /**
2198
1770
  * @typedef PickupStoreDetail
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
1771
+ * @property {string} [country]
1772
+ * @property {string} [state]
1773
+ * @property {string} [city]
1774
+ * @property {string} [phone]
1775
+ * @property {string} [area_code]
1776
+ * @property {number} [uid]
1777
+ * @property {string} [area_code_slug]
1778
+ * @property {string} [address_type]
1779
+ * @property {string} [area]
1780
+ * @property {number} [id]
1781
+ * @property {string} [store_manager_name]
1782
+ * @property {string} [name]
1783
+ * @property {string} [store_code]
1784
+ * @property {string} [landmark]
1785
+ * @property {string} [email]
1786
+ * @property {number} [pincode]
1787
+ * @property {string} [address]
1788
+ */
1789
+
1790
+ /**
1791
+ * @typedef StoreDetailsResponse
1792
+ * @property {PickupStoreDetail[]} [items]
1793
+ */
1794
+
1795
+ /**
1796
+ * @typedef UpdateCartPaymentRequest
1797
+ * @property {string} [address_id]
1798
+ * @property {string} [payment_mode]
1799
+ * @property {string} [aggregator_name]
1800
+ * @property {string} [merchant_code]
1801
+ * @property {string} [payment_identifier]
1802
+ * @property {string} [id]
2236
1803
  */
2237
1804
 
2238
1805
  /**
2239
1806
  * @typedef CouponValidity
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.
1807
+ * @property {string} [title]
1808
+ * @property {boolean} [next_validation_required]
1809
+ * @property {boolean} [valid]
1810
+ * @property {string} [display_message_en]
1811
+ * @property {string} [code]
1812
+ * @property {number} [discount]
2249
1813
  */
2250
1814
 
2251
1815
  /**
2252
1816
  * @typedef PaymentCouponValidate
2253
- * @property {boolean} success - Success flag of coupon payment mode validity API response
2254
- * @property {string} [message] - Payment mode valid message for coupon
1817
+ * @property {boolean} success
1818
+ * @property {string} [message]
2255
1819
  * @property {CouponValidity} [coupon_validity]
2256
1820
  */
2257
1821
 
2258
1822
  /**
2259
1823
  * @typedef PaymentMeta
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
1824
+ * @property {string} [payment_gateway]
1825
+ * @property {string} [type]
1826
+ * @property {string} [payment_identifier]
1827
+ * @property {string} [merchant_code]
2266
1828
  */
2267
1829
 
2268
1830
  /**
2269
1831
  * @typedef PaymentMethod
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
1832
+ * @property {string} mode
1833
+ * @property {string} [payment]
2272
1834
  * @property {PaymentMeta} payment_meta
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
1835
+ * @property {number} [amount]
1836
+ * @property {string} [name]
1837
+ * @property {Object} [payment_extra_identifiers]
1838
+ */
1839
+
1840
+ /**
1841
+ * @typedef PlatformCartCheckoutDetailV2Request
1842
+ * @property {string} [address_id]
1843
+ * @property {string} [payment_identifier]
1844
+ * @property {Object} [payment_params]
1845
+ * @property {Object} [custom_meta]
1846
+ * @property {boolean} [payment_auto_confirm]
1847
+ * @property {string} id
1848
+ * @property {boolean} [pos]
1849
+ * @property {string} [billing_address_id]
1850
+ * @property {string} [merchant_code]
1851
+ * @property {string} [aggregator]
1852
+ * @property {number} [pick_at_store_uid]
1853
+ * @property {string} [device_id]
1854
+ * @property {Object} [delivery_address]
1855
+ * @property {string} [payment_mode]
1856
+ * @property {string} [checkout_mode]
1857
+ * @property {Object} [customer_details] - Customer details
1858
+ * @property {Object} [meta]
1859
+ * @property {PaymentMethod[]} payment_methods
2311
1860
  * @property {StaffCheckout} [staff]
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
1861
+ * @property {string} [employee_code]
1862
+ * @property {Object} [billing_address]
1863
+ * @property {string} [callback_url]
1864
+ * @property {string} user_id
1865
+ * @property {Object} [extra_meta]
1866
+ * @property {string} order_type
2322
1867
  * @property {Files[]} [files] - List of file url
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
1868
+ * @property {number} [ordering_store]
1869
+ * @property {string} [iin]
1870
+ * @property {string} [network]
1871
+ * @property {string} [type]
1872
+ * @property {string} [card_id]
2331
1873
  */
2332
1874
 
2333
1875
  /**
2334
1876
  * @typedef UpdateCartPaymentRequestV2
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
1877
+ * @property {string} [address_id]
1878
+ * @property {string} [payment_mode]
1879
+ * @property {string} [aggregator_name]
1880
+ * @property {string} [merchant_code]
1881
+ * @property {string} [payment_identifier]
1882
+ * @property {string} [id]
2346
1883
  * @property {PaymentMethod[]} [payment_methods]
2347
1884
  */
2348
1885
 
2349
1886
  /**
2350
1887
  * @typedef PriceMinMax
2351
- * @property {number} [min] - Min price of article added in user cart
2352
- * @property {number} [max] - Max price of article added in user cart
1888
+ * @property {number} [min]
1889
+ * @property {number} [max]
2353
1890
  */
2354
1891
 
2355
1892
  /**
2356
1893
  * @typedef ItemPriceDetails
2357
1894
  * @property {PriceMinMax} [marked]
2358
1895
  * @property {PriceMinMax} [effective]
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.
1896
+ * @property {string} [currency]
2368
1897
  */
2369
1898
 
2370
1899
  /**
2371
1900
  * @typedef FreeGiftItems
2372
- * @property {string} [item_slug] - Free gift product slug
2373
- * @property {string} [item_name] - Free gift product name
1901
+ * @property {string} [item_slug] - Item slug
1902
+ * @property {string} [item_name] - Item name
2374
1903
  * @property {ItemPriceDetails} [item_price_details]
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
1904
+ * @property {string} [item_brand_name] - Item brand name
1905
+ * @property {number} [item_id] - Item id
1906
+ * @property {string[]} [item_images_url] - Item images URL
2381
1907
  */
2382
1908
 
2383
1909
  /**
2384
1910
  * @typedef PromotionOffer
2385
- * @property {string} [id] - Promotion unique identifier
1911
+ * @property {string} [id] - Promotion id
2386
1912
  * @property {Object} [buy_rules] - Buy rules of promotions
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.
1913
+ * @property {string} [offer_text] - Offer title
1914
+ * @property {string} [promotion_type] - Promotion type
2390
1915
  * @property {string} [promotion_name] - Name of the promotion
2391
1916
  * @property {string} [promotion_group] - Group of promotion belongs to
2392
1917
  * @property {string} [valid_till] - Datetime ISOString for promotion end date
@@ -2396,47 +1921,36 @@ const Joi = require("joi");
2396
1921
  */
2397
1922
 
2398
1923
  /**
2399
- * @typedef PromotionOffersDetails
2400
- * @property {PromotionOffer[]} [available_promotions] - List of available
2401
- * promotion for product
1924
+ * @typedef PromotionOffersResponse
1925
+ * @property {PromotionOffer[]} [available_promotions]
2402
1926
  */
2403
1927
 
2404
1928
  /**
2405
1929
  * @typedef PromotionPaymentOffer
2406
- * @property {string} [application_id] - Application id of the sales channel
1930
+ * @property {string} [application_id] - Application id
2407
1931
  * @property {Object[]} [buy_rules] - Buy rules of promotions
2408
1932
  * @property {string} [calculate_on] - Price on which promotion calculated
2409
1933
  * @property {string} [description] - Offer details including T&C
2410
1934
  * @property {Object[]} [discount_rules] - Discount rules of promotions
2411
- * @property {string} [id] - Promotion unique identifier
2412
- * @property {string} [offer_text] - Offer title of promotion that used to display
1935
+ * @property {string} [id] - Promotion id
1936
+ * @property {string} [offer_text] - Offer title
2413
1937
  * @property {string} [promotion_group] - Group of promotion belongs to
2414
- * @property {string} [promotion_type] - Type of Promotion like bogo, amount,
2415
- * percentage etc.
1938
+ * @property {string} [promotion_type] - Promotion type
2416
1939
  * @property {string} [promotion_name] - Name of the promotion
2417
1940
  */
2418
1941
 
2419
1942
  /**
2420
- * @typedef PromotionPaymentOffersDetails
2421
- * @property {boolean} [success] - Indicates if operation is successful or not.
1943
+ * @typedef PromotionPaymentOffersResponse
1944
+ * @property {boolean} [success]
2422
1945
  * @property {PromotionPaymentOffer[]} [promotions]
2423
1946
  */
2424
1947
 
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
-
2431
1948
  class CartPlatformModel {
2432
1949
  /** @returns {CouponDateMeta} */
2433
1950
  static CouponDateMeta() {
2434
1951
  return Joi.object({
2435
1952
  modified_on: Joi.string().allow("").allow(null),
2436
1953
  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),
2440
1954
  });
2441
1955
  }
2442
1956
 
@@ -2444,7 +1958,7 @@ class CartPlatformModel {
2444
1958
  static Ownership() {
2445
1959
  return Joi.object({
2446
1960
  payable_category: Joi.string().allow("").required(),
2447
- payable_by: Joi.string().allow("").allow(null),
1961
+ payable_by: Joi.string().allow("").required(),
2448
1962
  });
2449
1963
  }
2450
1964
 
@@ -2453,9 +1967,6 @@ class CartPlatformModel {
2453
1967
  return Joi.object({
2454
1968
  created_by: Joi.string().allow("").allow(null),
2455
1969
  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),
2459
1970
  });
2460
1971
  }
2461
1972
 
@@ -2529,7 +2040,7 @@ class CartPlatformModel {
2529
2040
  /** @returns {Restrictions} */
2530
2041
  static Restrictions() {
2531
2042
  return Joi.object({
2532
- payments: CartPlatformModel.PaymentModes(),
2043
+ payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
2533
2044
  user_type: Joi.string().allow(""),
2534
2045
  price_range: CartPlatformModel.PriceRange(),
2535
2046
  platforms: Joi.array().items(Joi.string().allow("")),
@@ -2563,10 +2074,9 @@ class CartPlatformModel {
2563
2074
  static CouponSchedule() {
2564
2075
  return Joi.object({
2565
2076
  end: Joi.string().allow("").allow(null),
2566
- start: Joi.string().allow("").allow(null),
2077
+ start: Joi.string().allow(""),
2567
2078
  next_schedule: Joi.array().items(Joi.any()),
2568
2079
  cron: Joi.string().allow("").allow(null),
2569
- status: Joi.string().allow(""),
2570
2080
  duration: Joi.number().allow(null),
2571
2081
  });
2572
2082
  }
@@ -2630,11 +2140,11 @@ class CartPlatformModel {
2630
2140
  return Joi.object({
2631
2141
  currency_code: Joi.string().allow(""),
2632
2142
  auto_apply: Joi.boolean(),
2633
- type: Joi.string().allow(""),
2143
+ type: Joi.string().allow("").required(),
2634
2144
  is_exact: Joi.boolean(),
2635
- applicable_on: Joi.string().allow(""),
2636
- calculate_on: Joi.string().allow(""),
2637
- value_type: Joi.string().allow(""),
2145
+ applicable_on: Joi.string().allow("").required(),
2146
+ calculate_on: Joi.string().allow("").required(),
2147
+ value_type: Joi.string().allow("").required(),
2638
2148
  scope: Joi.array().items(Joi.string().allow("")),
2639
2149
  });
2640
2150
  }
@@ -2643,24 +2153,21 @@ class CartPlatformModel {
2643
2153
  static CouponAdd() {
2644
2154
  return Joi.object({
2645
2155
  date_meta: CartPlatformModel.CouponDateMeta(),
2646
- ownership: CartPlatformModel.Ownership(),
2156
+ ownership: CartPlatformModel.Ownership().required(),
2647
2157
  author: CartPlatformModel.CouponAuthor(),
2648
2158
  state: CartPlatformModel.State(),
2649
2159
  restrictions: CartPlatformModel.Restrictions(),
2650
2160
  validation: CartPlatformModel.Validation(),
2651
2161
  action: CartPlatformModel.CouponAction(),
2652
- coupon_type: Joi.string().allow(""),
2653
- coupon_prefix: Joi.string().allow("").allow(null),
2654
- coupon_counts: Joi.number(),
2655
2162
  tags: Joi.array().items(Joi.string().allow("")),
2656
2163
  _schedule: CartPlatformModel.CouponSchedule(),
2657
- rule: Joi.array().items(CartPlatformModel.Rule()),
2658
- display_meta: CartPlatformModel.DisplayMeta(),
2164
+ rule: Joi.array().items(CartPlatformModel.Rule()).required(),
2165
+ display_meta: CartPlatformModel.DisplayMeta().required(),
2659
2166
  code: Joi.string().allow("").required(),
2660
2167
  type_slug: Joi.string().allow("").required(),
2661
- identifiers: CartPlatformModel.Identifier(),
2662
- validity: CartPlatformModel.Validity(),
2663
- rule_definition: CartPlatformModel.RuleDefinition(),
2168
+ identifiers: CartPlatformModel.Identifier().required(),
2169
+ validity: CartPlatformModel.Validity().required(),
2170
+ rule_definition: CartPlatformModel.RuleDefinition().required(),
2664
2171
  _id: Joi.string().allow(""),
2665
2172
  });
2666
2173
  }
@@ -2678,8 +2185,8 @@ class CartPlatformModel {
2678
2185
  });
2679
2186
  }
2680
2187
 
2681
- /** @returns {CouponsResult} */
2682
- static CouponsResult() {
2188
+ /** @returns {CouponsResponse} */
2189
+ static CouponsResponse() {
2683
2190
  return Joi.object({
2684
2191
  items: Joi.array().items(CartPlatformModel.CouponAdd()),
2685
2192
  page: CartPlatformModel.Page(),
@@ -2694,8 +2201,8 @@ class CartPlatformModel {
2694
2201
  });
2695
2202
  }
2696
2203
 
2697
- /** @returns {OperationErrorResult} */
2698
- static OperationErrorResult() {
2204
+ /** @returns {OperationErrorResponse} */
2205
+ static OperationErrorResponse() {
2699
2206
  return Joi.object({
2700
2207
  success: Joi.boolean(),
2701
2208
  message: Joi.string().allow(""),
@@ -2707,7 +2214,7 @@ class CartPlatformModel {
2707
2214
  static CouponUpdate() {
2708
2215
  return Joi.object({
2709
2216
  date_meta: CartPlatformModel.CouponDateMeta(),
2710
- ownership: CartPlatformModel.Ownership(),
2217
+ ownership: CartPlatformModel.Ownership().required(),
2711
2218
  author: CartPlatformModel.CouponAuthor(),
2712
2219
  state: CartPlatformModel.State(),
2713
2220
  restrictions: CartPlatformModel.Restrictions(),
@@ -2715,17 +2222,13 @@ class CartPlatformModel {
2715
2222
  action: CartPlatformModel.CouponAction(),
2716
2223
  tags: Joi.array().items(Joi.string().allow("")),
2717
2224
  _schedule: CartPlatformModel.CouponSchedule(),
2718
- rule: Joi.array().items(CartPlatformModel.Rule()),
2719
- display_meta: CartPlatformModel.DisplayMeta(),
2225
+ rule: Joi.array().items(CartPlatformModel.Rule()).required(),
2226
+ display_meta: CartPlatformModel.DisplayMeta().required(),
2720
2227
  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),
2725
2228
  type_slug: Joi.string().allow("").required(),
2726
- identifiers: CartPlatformModel.Identifier(),
2727
- validity: CartPlatformModel.Validity(),
2728
- rule_definition: CartPlatformModel.RuleDefinition(),
2229
+ identifiers: CartPlatformModel.Identifier().required(),
2230
+ validity: CartPlatformModel.Validity().required(),
2231
+ rule_definition: CartPlatformModel.RuleDefinition().required(),
2729
2232
  });
2730
2233
  }
2731
2234
 
@@ -2737,48 +2240,32 @@ class CartPlatformModel {
2737
2240
  });
2738
2241
  }
2739
2242
 
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
-
2749
2243
  /** @returns {DisplayMeta1} */
2750
2244
  static DisplayMeta1() {
2751
2245
  return Joi.object({
2752
- description: Joi.string().allow("").allow(null),
2246
+ description: Joi.string().allow(""),
2753
2247
  offer_label: Joi.string().allow(""),
2754
- name: Joi.string().allow("").allow(null),
2755
- offer_text: Joi.string().allow("").allow(null),
2248
+ name: Joi.string().allow(""),
2249
+ offer_text: Joi.string().allow(""),
2756
2250
  });
2757
2251
  }
2758
2252
 
2759
2253
  /** @returns {Ownership1} */
2760
2254
  static Ownership1() {
2761
2255
  return Joi.object({
2762
- payable_category: Joi.string().allow(""),
2763
- payable_by: Joi.string().allow(""),
2256
+ payable_category: Joi.string().allow("").required(),
2257
+ payable_by: Joi.string().allow("").required(),
2764
2258
  });
2765
2259
  }
2766
2260
 
2767
2261
  /** @returns {CompareObject} */
2768
2262
  static CompareObject() {
2769
2263
  return Joi.object({
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()),
2264
+ equals: Joi.number(),
2265
+ greater_than: Joi.number(),
2266
+ less_than_equals: Joi.number(),
2267
+ less_than: Joi.number(),
2268
+ greater_than_equals: Joi.number(),
2782
2269
  });
2783
2270
  }
2784
2271
 
@@ -2822,7 +2309,7 @@ class CartPlatformModel {
2822
2309
  discount_price: Joi.number(),
2823
2310
  apportion_discount: Joi.boolean(),
2824
2311
  partial_can_ret: Joi.boolean(),
2825
- max_usage_per_transaction: Joi.number().allow(null),
2312
+ max_usage_per_transaction: Joi.number(),
2826
2313
  min_offer_quantity: Joi.number(),
2827
2314
  code: Joi.string().allow(""),
2828
2315
  discount_amount: Joi.number(),
@@ -2837,7 +2324,6 @@ class CartPlatformModel {
2837
2324
  discount_type: Joi.string().allow("").required(),
2838
2325
  buy_condition: Joi.string().allow("").required(),
2839
2326
  item_criteria: CartPlatformModel.ItemCriteria().required(),
2840
- meta: CartPlatformModel.ItemSizeMapping(),
2841
2327
  offer: CartPlatformModel.DiscountOffer().required(),
2842
2328
  });
2843
2329
  }
@@ -2852,7 +2338,7 @@ class CartPlatformModel {
2852
2338
  /** @returns {PromotionPaymentModes} */
2853
2339
  static PromotionPaymentModes() {
2854
2340
  return Joi.object({
2855
- type: Joi.string().allow(""),
2341
+ type: Joi.string().allow("").required(),
2856
2342
  uses: CartPlatformModel.PaymentAllowValue1(),
2857
2343
  codes: Joi.array().items(Joi.string().allow("")),
2858
2344
  });
@@ -2893,7 +2379,7 @@ class CartPlatformModel {
2893
2379
  /** @returns {Restrictions1} */
2894
2380
  static Restrictions1() {
2895
2381
  return Joi.object({
2896
- payments: CartPlatformModel.PaymentModes(),
2382
+ payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
2897
2383
  user_registered: CartPlatformModel.UserRegistered(),
2898
2384
  platforms: Joi.array().items(Joi.string().allow("")),
2899
2385
  post_order: CartPlatformModel.PostOrder1(),
@@ -2901,7 +2387,7 @@ class CartPlatformModel {
2901
2387
  order_quantity: Joi.number(),
2902
2388
  anonymous_users: Joi.boolean(),
2903
2389
  user_id: Joi.array().items(Joi.string().allow("")),
2904
- uses: CartPlatformModel.UsesRestriction1(),
2390
+ uses: CartPlatformModel.UsesRestriction1().required(),
2905
2391
  ordering_stores: Joi.array().items(Joi.number()),
2906
2392
  });
2907
2393
  }
@@ -2909,10 +2395,9 @@ class CartPlatformModel {
2909
2395
  /** @returns {PromotionSchedule} */
2910
2396
  static PromotionSchedule() {
2911
2397
  return Joi.object({
2912
- end: Joi.string().allow("").allow(null),
2913
- start: Joi.string().allow("").allow(null),
2914
- status: Joi.string().allow(""),
2915
- published: Joi.boolean(),
2398
+ end: Joi.string().allow("").required(),
2399
+ start: Joi.string().allow("").required(),
2400
+ published: Joi.boolean().required(),
2916
2401
  next_schedule: Joi.array().items(Joi.any()),
2917
2402
  cron: Joi.string().allow("").allow(null),
2918
2403
  duration: Joi.number().allow(null),
@@ -2922,8 +2407,8 @@ class CartPlatformModel {
2922
2407
  /** @returns {PromotionAction} */
2923
2408
  static PromotionAction() {
2924
2409
  return Joi.object({
2925
- action_date: Joi.string().allow("").allow(null),
2926
- action_type: Joi.string().allow(""),
2410
+ action_date: Joi.string().allow("").allow(null).required(),
2411
+ action_type: Joi.string().allow("").required(),
2927
2412
  });
2928
2413
  }
2929
2414
 
@@ -2932,17 +2417,14 @@ class CartPlatformModel {
2932
2417
  return Joi.object({
2933
2418
  created_by: Joi.string().allow("").allow(null),
2934
2419
  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),
2938
2420
  });
2939
2421
  }
2940
2422
 
2941
2423
  /** @returns {Visibility} */
2942
2424
  static Visibility() {
2943
2425
  return Joi.object({
2944
- coupon_list: Joi.boolean(),
2945
- pdp: Joi.boolean(),
2426
+ coupon_list: Joi.boolean().required(),
2427
+ pdp: Joi.boolean().required(),
2946
2428
  });
2947
2429
  }
2948
2430
 
@@ -2951,9 +2433,6 @@ class CartPlatformModel {
2951
2433
  return Joi.object({
2952
2434
  modified_on: Joi.string().allow("").allow(null),
2953
2435
  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),
2957
2436
  });
2958
2437
  }
2959
2438
 
@@ -2974,7 +2453,6 @@ class CartPlatformModel {
2974
2453
  .required(),
2975
2454
  restrictions: CartPlatformModel.Restrictions1(),
2976
2455
  currency: Joi.string().allow(""),
2977
- is_processed: Joi.boolean(),
2978
2456
  code: Joi.string().allow(""),
2979
2457
  _schedule: CartPlatformModel.PromotionSchedule(),
2980
2458
  post_order_action: CartPlatformModel.PromotionAction(),
@@ -2982,16 +2460,18 @@ class CartPlatformModel {
2982
2460
  author: CartPlatformModel.PromotionAuthor(),
2983
2461
  visiblility: CartPlatformModel.Visibility(),
2984
2462
  application_id: Joi.string().allow("").required(),
2985
- buy_rules: CartPlatformModel.ItemCriteria().required(),
2986
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2463
+ buy_rules: Joi.object()
2464
+ .pattern(/\S/, CartPlatformModel.ItemCriteria())
2465
+ .required(),
2466
+ _custom_json: Joi.any(),
2987
2467
  date_meta: CartPlatformModel.PromotionDateMeta(),
2988
2468
  _id: Joi.string().allow(""),
2989
2469
  tags: Joi.array().items(Joi.string().allow("")),
2990
2470
  });
2991
2471
  }
2992
2472
 
2993
- /** @returns {PromotionsResult} */
2994
- static PromotionsResult() {
2473
+ /** @returns {PromotionsResponse} */
2474
+ static PromotionsResponse() {
2995
2475
  return Joi.object({
2996
2476
  items: Joi.array().items(CartPlatformModel.PromotionListItem()),
2997
2477
  page: CartPlatformModel.Page(),
@@ -3007,40 +2487,12 @@ class CartPlatformModel {
3007
2487
  promo_group: Joi.string().allow("").required(),
3008
2488
  mode: Joi.string().allow("").required(),
3009
2489
  apply_all_discount: Joi.boolean(),
3010
- display_meta: CartPlatformModel.DisplayMeta1(),
3011
- ownership: CartPlatformModel.Ownership1(),
3012
- promotion_type: Joi.string().allow("").required(),
3013
- discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
3014
- restrictions: CartPlatformModel.Restrictions1(),
3015
- currency: Joi.string().allow(""),
3016
- code: Joi.string().allow(""),
3017
- _schedule: CartPlatformModel.PromotionSchedule(),
3018
- post_order_action: CartPlatformModel.PromotionAction(),
3019
- apply_priority: Joi.number(),
3020
- author: CartPlatformModel.PromotionAuthor(),
3021
- visiblility: CartPlatformModel.Visibility(),
3022
- application_id: Joi.string().allow("").required(),
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(),
2490
+ display_meta: CartPlatformModel.DisplayMeta1().required(),
2491
+ ownership: CartPlatformModel.Ownership1().required(),
3042
2492
  promotion_type: Joi.string().allow("").required(),
3043
- discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
2493
+ discount_rules: Joi.array()
2494
+ .items(CartPlatformModel.DiscountRule())
2495
+ .required(),
3044
2496
  restrictions: CartPlatformModel.Restrictions1(),
3045
2497
  currency: Joi.string().allow(""),
3046
2498
  code: Joi.string().allow(""),
@@ -3050,8 +2502,10 @@ class CartPlatformModel {
3050
2502
  author: CartPlatformModel.PromotionAuthor(),
3051
2503
  visiblility: CartPlatformModel.Visibility(),
3052
2504
  application_id: Joi.string().allow("").required(),
3053
- buy_rules: CartPlatformModel.ItemCriteria(),
3054
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2505
+ buy_rules: Joi.object()
2506
+ .pattern(/\S/, CartPlatformModel.ItemCriteria())
2507
+ .required(),
2508
+ _custom_json: Joi.any(),
3055
2509
  date_meta: CartPlatformModel.PromotionDateMeta(),
3056
2510
  tags: Joi.array().items(Joi.string().allow("")),
3057
2511
  });
@@ -3063,45 +2517,15 @@ class CartPlatformModel {
3063
2517
  stackable: Joi.boolean(),
3064
2518
  calculate_on: Joi.string().allow(""),
3065
2519
  apply_exclusive: Joi.string().allow("").allow(null),
3066
- reason: Joi.string().allow("").allow(null),
3067
- promo_group: Joi.string().allow("").required(),
3068
- mode: Joi.string().allow("").required(),
3069
- apply_all_discount: Joi.boolean(),
3070
- display_meta: CartPlatformModel.DisplayMeta1(),
3071
- ownership: CartPlatformModel.Ownership1(),
3072
- promotion_type: Joi.string().allow("").required(),
3073
- discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
3074
- restrictions: CartPlatformModel.Restrictions1(),
3075
- currency: Joi.string().allow(""),
3076
- code: Joi.string().allow(""),
3077
- _schedule: CartPlatformModel.PromotionSchedule(),
3078
- post_order_action: CartPlatformModel.PromotionAction(),
3079
- apply_priority: Joi.number(),
3080
- author: CartPlatformModel.PromotionAuthor(),
3081
- visiblility: CartPlatformModel.Visibility(),
3082
- application_id: Joi.string().allow("").required(),
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
2520
  promo_group: Joi.string().allow("").required(),
3099
2521
  mode: Joi.string().allow("").required(),
3100
2522
  apply_all_discount: Joi.boolean(),
3101
- display_meta: CartPlatformModel.DisplayMeta1(),
3102
- ownership: CartPlatformModel.Ownership1(),
2523
+ display_meta: CartPlatformModel.DisplayMeta1().required(),
2524
+ ownership: CartPlatformModel.Ownership1().required(),
3103
2525
  promotion_type: Joi.string().allow("").required(),
3104
- discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
2526
+ discount_rules: Joi.array()
2527
+ .items(CartPlatformModel.DiscountRule())
2528
+ .required(),
3105
2529
  restrictions: CartPlatformModel.Restrictions1(),
3106
2530
  currency: Joi.string().allow(""),
3107
2531
  code: Joi.string().allow(""),
@@ -3111,8 +2535,10 @@ class CartPlatformModel {
3111
2535
  author: CartPlatformModel.PromotionAuthor(),
3112
2536
  visiblility: CartPlatformModel.Visibility(),
3113
2537
  application_id: Joi.string().allow("").required(),
3114
- buy_rules: CartPlatformModel.ItemCriteria(),
3115
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2538
+ buy_rules: Joi.object()
2539
+ .pattern(/\S/, CartPlatformModel.ItemCriteria())
2540
+ .required(),
2541
+ _custom_json: Joi.any(),
3116
2542
  date_meta: CartPlatformModel.PromotionDateMeta(),
3117
2543
  tags: Joi.array().items(Joi.string().allow("")),
3118
2544
  });
@@ -3126,8 +2552,8 @@ class CartPlatformModel {
3126
2552
  });
3127
2553
  }
3128
2554
 
3129
- /** @returns {ActivePromosResult} */
3130
- static ActivePromosResult() {
2555
+ /** @returns {ActivePromosResponse} */
2556
+ static ActivePromosResponse() {
3131
2557
  return Joi.object({
3132
2558
  entity_slug: Joi.string().allow(""),
3133
2559
  title: Joi.string().allow(""),
@@ -3196,14 +2622,14 @@ class CartPlatformModel {
3196
2622
  type: Joi.string().allow(""),
3197
2623
  article_id: Joi.string().allow("").required(),
3198
2624
  quantity: Joi.number(),
3199
- meta: Joi.object().pattern(/\S/, Joi.any()),
2625
+ meta: Joi.any(),
3200
2626
  });
3201
2627
  }
3202
2628
 
3203
2629
  /** @returns {PriceAdjustmentRestrictions} */
3204
2630
  static PriceAdjustmentRestrictions() {
3205
2631
  return Joi.object({
3206
- post_order: Joi.object().pattern(/\S/, Joi.any()),
2632
+ post_order: Joi.any(),
3207
2633
  });
3208
2634
  }
3209
2635
 
@@ -3229,7 +2655,8 @@ class CartPlatformModel {
3229
2655
  allowed_refund: Joi.boolean(),
3230
2656
  is_authenticated: Joi.boolean().required(),
3231
2657
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
3232
- meta: Joi.object().pattern(/\S/, Joi.any()),
2658
+ auto_remove: Joi.boolean(),
2659
+ meta: Joi.any(),
3233
2660
  cart_id: Joi.string().allow("").required(),
3234
2661
  });
3235
2662
  }
@@ -3248,20 +2675,21 @@ class CartPlatformModel {
3248
2675
  allowed_refund: Joi.boolean(),
3249
2676
  is_authenticated: Joi.boolean().required(),
3250
2677
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
3251
- meta: Joi.object().pattern(/\S/, Joi.any()),
2678
+ auto_remove: Joi.boolean(),
2679
+ meta: Joi.any(),
3252
2680
  cart_id: Joi.string().allow("").required(),
3253
2681
  });
3254
2682
  }
3255
2683
 
3256
- /** @returns {PriceAdjustmentResult} */
3257
- static PriceAdjustmentResult() {
2684
+ /** @returns {PriceAdjustmentResponse} */
2685
+ static PriceAdjustmentResponse() {
3258
2686
  return Joi.object({
3259
2687
  data: CartPlatformModel.PriceAdjustment(),
3260
2688
  });
3261
2689
  }
3262
2690
 
3263
- /** @returns {GetPriceAdjustmentResult} */
3264
- static GetPriceAdjustmentResult() {
2691
+ /** @returns {GetPriceAdjustmentResponse} */
2692
+ static GetPriceAdjustmentResponse() {
3265
2693
  return Joi.object({
3266
2694
  data: Joi.array().items(CartPlatformModel.PriceAdjustment()),
3267
2695
  });
@@ -3281,8 +2709,9 @@ class CartPlatformModel {
3281
2709
  allowed_refund: Joi.boolean(),
3282
2710
  is_authenticated: Joi.boolean().required(),
3283
2711
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
3284
- meta: Joi.object().pattern(/\S/, Joi.any()),
2712
+ meta: Joi.any(),
3285
2713
  cart_id: Joi.string().allow("").required(),
2714
+ auto_remove: Joi.boolean(),
3286
2715
  });
3287
2716
  }
3288
2717
 
@@ -3295,8 +2724,8 @@ class CartPlatformModel {
3295
2724
  });
3296
2725
  }
3297
2726
 
3298
- /** @returns {OpenapiCartDetailsCreation} */
3299
- static OpenapiCartDetailsCreation() {
2727
+ /** @returns {OpenapiCartDetailsRequest} */
2728
+ static OpenapiCartDetailsRequest() {
3300
2729
  return Joi.object({
3301
2730
  cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
3302
2731
  });
@@ -3384,7 +2813,7 @@ class CartPlatformModel {
3384
2813
  /** @returns {Tags} */
3385
2814
  static Tags() {
3386
2815
  return Joi.object({
3387
- tags: Joi.object().pattern(/\S/, Joi.any()),
2816
+ tags: Joi.any(),
3388
2817
  });
3389
2818
  }
3390
2819
 
@@ -3403,28 +2832,12 @@ class CartPlatformModel {
3403
2832
  });
3404
2833
  }
3405
2834
 
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
-
3421
2835
  /** @returns {ProductAction} */
3422
2836
  static ProductAction() {
3423
2837
  return Joi.object({
3424
2838
  type: Joi.string().allow(""),
3425
2839
  url: Joi.string().allow(""),
3426
2840
  query: CartPlatformModel.ActionQuery(),
3427
- page: CartPlatformModel.ProductActionPage(),
3428
2841
  });
3429
2842
  }
3430
2843
 
@@ -3446,12 +2859,12 @@ class CartPlatformModel {
3446
2859
  action: CartPlatformModel.ProductAction(),
3447
2860
  uid: Joi.number(),
3448
2861
  tags: Joi.array().items(Joi.string().allow("")),
3449
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2862
+ _custom_json: Joi.any(),
3450
2863
  type: Joi.string().allow(""),
3451
2864
  name: Joi.string().allow(""),
3452
2865
  item_code: Joi.string().allow("").allow(null),
3453
2866
  categories: Joi.array().items(CartPlatformModel.CategoryInfo()),
3454
- attributes: Joi.object().pattern(/\S/, Joi.any()),
2867
+ attributes: Joi.any(),
3455
2868
  });
3456
2869
  }
3457
2870
 
@@ -3488,19 +2901,19 @@ class CartPlatformModel {
3488
2901
  seller_identifier: Joi.string().allow(""),
3489
2902
  quantity: Joi.number(),
3490
2903
  seller: CartPlatformModel.BaseInfo(),
3491
- cart_item_meta: Joi.object().pattern(/\S/, Joi.any()),
3492
- parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
2904
+ cart_item_meta: Joi.any(),
2905
+ parent_item_identifiers: Joi.any(),
3493
2906
  is_gift_visible: Joi.boolean(),
3494
2907
  uid: Joi.string().allow(""),
3495
- gift_card: Joi.object().pattern(/\S/, Joi.any()),
2908
+ gift_card: Joi.any(),
3496
2909
  product_group_tags: Joi.array().items(Joi.string().allow("")),
3497
- identifier: Joi.object().pattern(/\S/, Joi.any()),
2910
+ identifier: Joi.any(),
3498
2911
  mto_quantity: Joi.number(),
3499
- extra_meta: Joi.object().pattern(/\S/, Joi.any()),
2912
+ extra_meta: Joi.any(),
3500
2913
  type: Joi.string().allow(""),
3501
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2914
+ _custom_json: Joi.any(),
3502
2915
  price: CartPlatformModel.ArticlePriceInfo(),
3503
- meta: Joi.object().pattern(/\S/, Joi.any()),
2916
+ meta: Joi.any(),
3504
2917
  size: Joi.string().allow(""),
3505
2918
  store: CartPlatformModel.StoreInfo(),
3506
2919
  tags: Joi.array().items(Joi.string().allow("")),
@@ -3518,9 +2931,9 @@ class CartPlatformModel {
3518
2931
  /** @returns {DiscountRulesApp} */
3519
2932
  static DiscountRulesApp() {
3520
2933
  return Joi.object({
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()),
2934
+ offer: Joi.any(),
2935
+ raw_offer: Joi.any(),
2936
+ item_criteria: Joi.any(),
3524
2937
  matched_buy_rules: Joi.array().items(Joi.string().allow("")),
3525
2938
  });
3526
2939
  }
@@ -3538,8 +2951,8 @@ class CartPlatformModel {
3538
2951
  /** @returns {BuyRules} */
3539
2952
  static BuyRules() {
3540
2953
  return Joi.object({
3541
- cart_conditions: Joi.object().pattern(/\S/, Joi.any()),
3542
- item_criteria: Joi.object().pattern(/\S/, Joi.any()),
2954
+ cart_conditions: Joi.any(),
2955
+ item_criteria: Joi.any(),
3543
2956
  });
3544
2957
  }
3545
2958
 
@@ -3557,11 +2970,12 @@ class CartPlatformModel {
3557
2970
  buy_rules: Joi.array().items(CartPlatformModel.BuyRules()),
3558
2971
  offer_text: Joi.string().allow(""),
3559
2972
  amount: Joi.number(),
2973
+ float_amount: Joi.string().allow(""),
3560
2974
  promotion_type: Joi.string().allow(""),
3561
2975
  mrp_promotion: Joi.boolean(),
3562
2976
  promotion_group: Joi.string().allow(""),
3563
2977
  promo_id: Joi.string().allow(""),
3564
- meta: Joi.object().pattern(/\S/, Joi.any()),
2978
+ meta: Joi.any(),
3565
2979
  code: Joi.string().allow("").allow(null),
3566
2980
  });
3567
2981
  }
@@ -3671,7 +3085,7 @@ class CartPlatformModel {
3671
3085
  quantity: Joi.number(),
3672
3086
  product: CartPlatformModel.CartProduct(),
3673
3087
  product_ean_id: Joi.string().allow(""),
3674
- parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
3088
+ parent_item_identifiers: Joi.any(),
3675
3089
  is_set: Joi.boolean(),
3676
3090
  article: CartPlatformModel.ProductArticle(),
3677
3091
  promotions_applied: Joi.array().items(
@@ -3680,22 +3094,22 @@ class CartPlatformModel {
3680
3094
  delivery_promise: CartPlatformModel.ShipmentPromise(),
3681
3095
  key: Joi.string().allow(""),
3682
3096
  coupon: CartPlatformModel.CouponDetails(),
3683
- bulk_offer: Joi.object().pattern(/\S/, Joi.any()),
3097
+ bulk_offer: Joi.any(),
3684
3098
  price: CartPlatformModel.ProductPriceInfo(),
3685
3099
  coupon_message: Joi.string().allow(""),
3686
3100
  identifiers: CartPlatformModel.CartProductIdentifer().required(),
3687
3101
  message: Joi.string().allow(""),
3688
3102
  discount: Joi.string().allow(""),
3689
3103
  availability: CartPlatformModel.ProductAvailability(),
3690
- moq: Joi.object().pattern(/\S/, Joi.any()),
3104
+ moq: Joi.any(),
3691
3105
  price_per_unit: CartPlatformModel.ProductPriceInfo(),
3692
3106
  promo_meta: CartPlatformModel.PromoMeta(),
3693
- custom_order: Joi.object().pattern(/\S/, Joi.any()),
3107
+ custom_order: Joi.any(),
3694
3108
  });
3695
3109
  }
3696
3110
 
3697
- /** @returns {OpenapiCartDetailsResult} */
3698
- static OpenapiCartDetailsResult() {
3111
+ /** @returns {OpenapiCartDetailsResponse} */
3112
+ static OpenapiCartDetailsResponse() {
3699
3113
  return Joi.object({
3700
3114
  is_valid: Joi.boolean(),
3701
3115
  message: Joi.string().allow(""),
@@ -3704,12 +3118,12 @@ class CartPlatformModel {
3704
3118
  });
3705
3119
  }
3706
3120
 
3707
- /** @returns {OpenApiErrorResult} */
3708
- static OpenApiErrorResult() {
3121
+ /** @returns {OpenApiErrorResponse} */
3122
+ static OpenApiErrorResponse() {
3709
3123
  return Joi.object({
3710
3124
  success: Joi.boolean(),
3711
3125
  message: Joi.string().allow(""),
3712
- errors: Joi.object().pattern(/\S/, Joi.any()),
3126
+ errors: Joi.any(),
3713
3127
  });
3714
3128
  }
3715
3129
 
@@ -3723,7 +3137,7 @@ class CartPlatformModel {
3723
3137
  area_code: Joi.string().allow("").required(),
3724
3138
  country_iso_code: Joi.string().allow(""),
3725
3139
  country_phone_code: Joi.string().allow(""),
3726
- meta: Joi.object().pattern(/\S/, Joi.any()),
3140
+ meta: Joi.any(),
3727
3141
  address_type: Joi.string().allow(""),
3728
3142
  area: Joi.string().allow(""),
3729
3143
  area_code_slug: Joi.string().allow(""),
@@ -3736,16 +3150,16 @@ class CartPlatformModel {
3736
3150
  });
3737
3151
  }
3738
3152
 
3739
- /** @returns {OpenApiCartServiceabilityCreation} */
3740
- static OpenApiCartServiceabilityCreation() {
3153
+ /** @returns {OpenApiCartServiceabilityRequest} */
3154
+ static OpenApiCartServiceabilityRequest() {
3741
3155
  return Joi.object({
3742
3156
  cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
3743
3157
  shipping_address: CartPlatformModel.ShippingAddress().required(),
3744
3158
  });
3745
3159
  }
3746
3160
 
3747
- /** @returns {OpenApiCartServiceabilityResult} */
3748
- static OpenApiCartServiceabilityResult() {
3161
+ /** @returns {OpenApiCartServiceabilityResponse} */
3162
+ static OpenApiCartServiceabilityResponse() {
3749
3163
  return Joi.object({
3750
3164
  is_valid: Joi.boolean(),
3751
3165
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -3776,7 +3190,7 @@ class CartPlatformModel {
3776
3190
  return Joi.object({
3777
3191
  payment_id: Joi.string().allow("").allow(null),
3778
3192
  payment_gateway: Joi.string().allow("").allow(null),
3779
- extra_meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3193
+ extra_meta: Joi.any().allow(null),
3780
3194
  current_status: Joi.string().allow("").allow(null),
3781
3195
  order_id: Joi.string().allow("").allow(null),
3782
3196
  });
@@ -3804,7 +3218,7 @@ class CartPlatformModel {
3804
3218
  price_marked: Joi.number().required(),
3805
3219
  files: Joi.array().items(CartPlatformModel.OpenApiFiles()),
3806
3220
  meta: CartPlatformModel.CartItemMeta(),
3807
- extra_meta: Joi.object().pattern(/\S/, Joi.any()),
3221
+ extra_meta: Joi.any(),
3808
3222
  product_id: Joi.number().required(),
3809
3223
  loyalty_discount: Joi.number(),
3810
3224
  discount: Joi.number().required(),
@@ -3831,7 +3245,7 @@ class CartPlatformModel {
3831
3245
  payment_methods: Joi.array()
3832
3246
  .items(CartPlatformModel.MultiTenderPaymentMethod())
3833
3247
  .required(),
3834
- employee_discount: Joi.object().pattern(/\S/, Joi.any()),
3248
+ employee_discount: Joi.any(),
3835
3249
  coupon: Joi.string().allow(""),
3836
3250
  cashback_applied: Joi.number().required(),
3837
3251
  gstin: Joi.string().allow("").allow(null),
@@ -3847,8 +3261,8 @@ class CartPlatformModel {
3847
3261
  });
3848
3262
  }
3849
3263
 
3850
- /** @returns {OpenApiCheckoutResult} */
3851
- static OpenApiCheckoutResult() {
3264
+ /** @returns {OpenApiCheckoutResponse} */
3265
+ static OpenApiCheckoutResponse() {
3852
3266
  return Joi.object({
3853
3267
  success: Joi.boolean(),
3854
3268
  message: Joi.string().allow(""),
@@ -3861,48 +3275,46 @@ class CartPlatformModel {
3861
3275
  static AbandonedCart() {
3862
3276
  return Joi.object({
3863
3277
  expire_at: Joi.string().allow("").required(),
3864
- promotion: Joi.object().pattern(/\S/, Joi.any()),
3278
+ promotion: Joi.any(),
3865
3279
  is_default: Joi.boolean().required(),
3866
3280
  comment: Joi.string().allow("").allow(null),
3867
3281
  articles: Joi.array().items(Joi.any()).required(),
3868
- coupon: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3282
+ coupon: Joi.any().allow(null),
3869
3283
  bulk_coupon_discount: Joi.number().allow(null),
3870
3284
  _id: Joi.string().allow("").required(),
3871
- fynd_credits: Joi.object().pattern(/\S/, Joi.any()),
3285
+ fynd_credits: Joi.any(),
3872
3286
  fc_index_map: Joi.array().items(Joi.number()),
3873
3287
  order_id: Joi.string().allow(""),
3874
3288
  discount: Joi.number(),
3875
- cod_charges: Joi.object().pattern(/\S/, Joi.any()),
3876
- payments: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3289
+ cod_charges: Joi.any(),
3290
+ payments: Joi.any().allow(null),
3877
3291
  payment_mode: Joi.string().allow("").allow(null),
3878
3292
  shipments: Joi.array().items(Joi.any()),
3879
- pick_up_customer_details: Joi.object()
3880
- .pattern(/\S/, Joi.any())
3881
- .allow(null, ""),
3293
+ pick_up_customer_details: Joi.any().allow(null),
3882
3294
  uid: Joi.number().required(),
3883
3295
  checkout_mode: Joi.string().allow(""),
3884
3296
  cart_value: Joi.number(),
3885
3297
  is_archive: Joi.boolean(),
3886
3298
  created_on: Joi.string().allow("").required(),
3887
3299
  last_modified: Joi.string().allow("").required(),
3888
- meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3300
+ meta: Joi.any().allow(null),
3889
3301
  buy_now: Joi.boolean(),
3890
3302
  is_active: Joi.boolean(),
3891
- cashback: Joi.object().pattern(/\S/, Joi.any()).required(),
3303
+ cashback: Joi.any().required(),
3892
3304
  payment_methods: Joi.array().items(Joi.any()),
3893
3305
  gstin: Joi.string().allow("").allow(null),
3894
- delivery_charges: Joi.object().pattern(/\S/, Joi.any()),
3306
+ delivery_charges: Joi.any(),
3895
3307
  merge_qty: Joi.boolean().allow(null),
3896
3308
  user_id: Joi.string().allow("").required(),
3897
3309
  app_id: Joi.string().allow(""),
3898
3310
  });
3899
3311
  }
3900
3312
 
3901
- /** @returns {AbandonedCartResult} */
3902
- static AbandonedCartResult() {
3313
+ /** @returns {AbandonedCartResponse} */
3314
+ static AbandonedCartResponse() {
3903
3315
  return Joi.object({
3904
3316
  items: Joi.array().items(CartPlatformModel.AbandonedCart()),
3905
- result: Joi.object().pattern(/\S/, Joi.any()),
3317
+ result: Joi.any(),
3906
3318
  page: CartPlatformModel.Page(),
3907
3319
  success: Joi.boolean(),
3908
3320
  message: Joi.string().allow(""),
@@ -3971,14 +3383,14 @@ class CartPlatformModel {
3971
3383
  });
3972
3384
  }
3973
3385
 
3974
- /** @returns {CartDetailResult} */
3975
- static CartDetailResult() {
3386
+ /** @returns {CartDetailResponse} */
3387
+ static CartDetailResponse() {
3976
3388
  return Joi.object({
3977
3389
  cart_id: Joi.number(),
3978
3390
  uid: Joi.string().allow(""),
3979
3391
  coupon_text: Joi.string().allow(""),
3980
3392
  id: Joi.string().allow(""),
3981
- pan_config: Joi.object().pattern(/\S/, Joi.any()),
3393
+ pan_config: Joi.any(),
3982
3394
  delivery_promise: CartPlatformModel.ShipmentPromise(),
3983
3395
  comment: Joi.string().allow(""),
3984
3396
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -3988,7 +3400,7 @@ class CartPlatformModel {
3988
3400
  coupon: CartPlatformModel.CartDetailCoupon(),
3989
3401
  restrict_checkout: Joi.boolean(),
3990
3402
  message: Joi.string().allow(""),
3991
- notification: Joi.object().pattern(/\S/, Joi.any()),
3403
+ notification: Joi.any(),
3992
3404
  staff_user_id: Joi.string().allow(""),
3993
3405
  success: Joi.boolean(),
3994
3406
  breakup_values: CartPlatformModel.CartBreakup(),
@@ -4002,7 +3414,7 @@ class CartPlatformModel {
4002
3414
  CartPlatformModel.AppliedPromotion()
4003
3415
  ),
4004
3416
  pan_no: Joi.string().allow(""),
4005
- custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3417
+ custom_cart_meta: Joi.any(),
4006
3418
  });
4007
3419
  }
4008
3420
 
@@ -4017,31 +3429,31 @@ class CartPlatformModel {
4017
3429
  ),
4018
3430
  product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
4019
3431
  article_id: Joi.string().allow(""),
4020
- article_assignment: Joi.object().pattern(/\S/, Joi.any()),
3432
+ article_assignment: Joi.any(),
4021
3433
  store_id: Joi.number(),
4022
3434
  display: Joi.string().allow(""),
4023
3435
  item_id: Joi.number(),
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()),
3436
+ extra_meta: Joi.any(),
3437
+ _custom_json: Joi.any(),
3438
+ meta: Joi.any(),
4027
3439
  pos: Joi.boolean(),
4028
3440
  seller_identifier: Joi.string().allow(""),
4029
3441
  });
4030
3442
  }
4031
3443
 
4032
- /** @returns {AddCartCreation} */
4033
- static AddCartCreation() {
3444
+ /** @returns {AddCartRequest} */
3445
+ static AddCartRequest() {
4034
3446
  return Joi.object({
4035
3447
  new_cart: Joi.boolean(),
4036
3448
  items: Joi.array().items(CartPlatformModel.AddProductCart()),
4037
3449
  });
4038
3450
  }
4039
3451
 
4040
- /** @returns {AddCartDetailResult} */
4041
- static AddCartDetailResult() {
3452
+ /** @returns {AddCartDetailResponse} */
3453
+ static AddCartDetailResponse() {
4042
3454
  return Joi.object({
4043
3455
  success: Joi.boolean(),
4044
- cart: CartPlatformModel.CartDetailResult(),
3456
+ cart: CartPlatformModel.CartDetailResponse(),
4045
3457
  partial: Joi.boolean(),
4046
3458
  message: Joi.string().allow(""),
4047
3459
  });
@@ -4052,10 +3464,10 @@ class CartPlatformModel {
4052
3464
  return Joi.object({
4053
3465
  quantity: Joi.number(),
4054
3466
  item_size: Joi.string().allow(""),
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()),
3467
+ parent_item_identifiers: Joi.any(),
3468
+ meta: Joi.any(),
3469
+ extra_meta: Joi.any(),
3470
+ _custom_json: Joi.any(),
4059
3471
  item_id: Joi.number(),
4060
3472
  item_index: Joi.number(),
4061
3473
  identifiers: CartPlatformModel.CartProductIdentifer().required(),
@@ -4063,31 +3475,19 @@ class CartPlatformModel {
4063
3475
  });
4064
3476
  }
4065
3477
 
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() {
3478
+ /** @returns {UpdateCartRequest} */
3479
+ static UpdateCartRequest() {
4077
3480
  return Joi.object({
4078
3481
  items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
4079
- free_gift_items: Joi.array().items(
4080
- CartPlatformModel.FreeGiftItemCreation()
4081
- ),
4082
3482
  operation: Joi.string().allow("").required(),
4083
3483
  });
4084
3484
  }
4085
3485
 
4086
- /** @returns {UpdateCartDetailResult} */
4087
- static UpdateCartDetailResult() {
3486
+ /** @returns {UpdateCartDetailResponse} */
3487
+ static UpdateCartDetailResponse() {
4088
3488
  return Joi.object({
4089
3489
  success: Joi.boolean(),
4090
- cart: CartPlatformModel.CartDetailResult(),
3490
+ cart: CartPlatformModel.CartDetailResponse(),
4091
3491
  message: Joi.string().allow(""),
4092
3492
  });
4093
3493
  }
@@ -4113,7 +3513,7 @@ class CartPlatformModel {
4113
3513
  price_marked: Joi.number().required(),
4114
3514
  amount_paid: Joi.number().required(),
4115
3515
  promo_list: Joi.array().items(CartPlatformModel.OverrideCartItemPromo()),
4116
- extra_meta: Joi.object().pattern(/\S/, Joi.any()),
3516
+ extra_meta: Joi.any(),
4117
3517
  item_id: Joi.number().required(),
4118
3518
  discount: Joi.number().required(),
4119
3519
  price_effective: Joi.number().required(),
@@ -4125,9 +3525,9 @@ class CartPlatformModel {
4125
3525
  return Joi.object({
4126
3526
  cart_id: Joi.string().allow("").required(),
4127
3527
  payment_mode: Joi.string().allow("").required(),
4128
- billing_address: Joi.object().pattern(/\S/, Joi.any()),
3528
+ billing_address: Joi.any(),
4129
3529
  merchant_code: Joi.string().allow("").required(),
4130
- payment_identifier: Joi.string().allow("").required(),
3530
+ payment_identifier: Joi.string().allow("").allow(null).required(),
4131
3531
  currency_code: Joi.string().allow("").required(),
4132
3532
  aggregator: Joi.string().allow("").required(),
4133
3533
  order_type: Joi.string().allow("").required(),
@@ -4136,31 +3536,31 @@ class CartPlatformModel {
4136
3536
  .items(CartPlatformModel.OverrideCartItem())
4137
3537
  .required(),
4138
3538
  ordering_store: Joi.number().allow(null),
4139
- shipping_address: Joi.object().pattern(/\S/, Joi.any()),
3539
+ shipping_address: Joi.any(),
4140
3540
  });
4141
3541
  }
4142
3542
 
4143
- /** @returns {OverrideCheckoutResult} */
4144
- static OverrideCheckoutResult() {
3543
+ /** @returns {OverrideCheckoutResponse} */
3544
+ static OverrideCheckoutResponse() {
4145
3545
  return Joi.object({
4146
- data: Joi.object().pattern(/\S/, Joi.any()).required(),
4147
- cart: Joi.object().pattern(/\S/, Joi.any()).required(),
3546
+ data: Joi.any().required(),
3547
+ cart: Joi.any().required(),
4148
3548
  success: Joi.string().allow("").required(),
4149
3549
  order_id: Joi.string().allow("").required(),
4150
3550
  message: Joi.string().allow("").required(),
4151
3551
  });
4152
3552
  }
4153
3553
 
4154
- /** @returns {GetShareCartLinkCreation} */
4155
- static GetShareCartLinkCreation() {
3554
+ /** @returns {GetShareCartLinkRequest} */
3555
+ static GetShareCartLinkRequest() {
4156
3556
  return Joi.object({
4157
3557
  id: Joi.string().allow(""),
4158
- meta: Joi.object().pattern(/\S/, Joi.any()),
3558
+ meta: Joi.any(),
4159
3559
  });
4160
3560
  }
4161
3561
 
4162
- /** @returns {GetShareCartLinkResult} */
4163
- static GetShareCartLinkResult() {
3562
+ /** @returns {GetShareCartLinkResponse} */
3563
+ static GetShareCartLinkResponse() {
4164
3564
  return Joi.object({
4165
3565
  token: Joi.string().allow(""),
4166
3566
  share_url: Joi.string().allow(""),
@@ -4170,11 +3570,11 @@ class CartPlatformModel {
4170
3570
  /** @returns {SharedCartDetails} */
4171
3571
  static SharedCartDetails() {
4172
3572
  return Joi.object({
4173
- source: Joi.object().pattern(/\S/, Joi.any()),
4174
- user: Joi.object().pattern(/\S/, Joi.any()),
3573
+ source: Joi.any(),
3574
+ user: Joi.any(),
4175
3575
  token: Joi.string().allow(""),
4176
3576
  created_on: Joi.string().allow(""),
4177
- meta: Joi.object().pattern(/\S/, Joi.any()),
3577
+ meta: Joi.any(),
4178
3578
  });
4179
3579
  }
4180
3580
 
@@ -4200,12 +3600,12 @@ class CartPlatformModel {
4200
3600
  buy_now: Joi.boolean(),
4201
3601
  cart_id: Joi.number(),
4202
3602
  gstin: Joi.string().allow(""),
4203
- custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3603
+ custom_cart_meta: Joi.any(),
4204
3604
  });
4205
3605
  }
4206
3606
 
4207
- /** @returns {SharedCartResult} */
4208
- static SharedCartResult() {
3607
+ /** @returns {SharedCartResponse} */
3608
+ static SharedCartResponse() {
4209
3609
  return Joi.object({
4210
3610
  cart: CartPlatformModel.SharedCart(),
4211
3611
  error: Joi.string().allow(""),
@@ -4216,7 +3616,7 @@ class CartPlatformModel {
4216
3616
  static CartList() {
4217
3617
  return Joi.object({
4218
3618
  cart_id: Joi.string().allow(""),
4219
- pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()),
3619
+ pick_up_customer_details: Joi.any(),
4220
3620
  cart_value: Joi.number(),
4221
3621
  created_on: Joi.string().allow(""),
4222
3622
  user_id: Joi.string().allow(""),
@@ -4225,8 +3625,8 @@ class CartPlatformModel {
4225
3625
  });
4226
3626
  }
4227
3627
 
4228
- /** @returns {MultiCartResult} */
4229
- static MultiCartResult() {
3628
+ /** @returns {MultiCartResponse} */
3629
+ static MultiCartResponse() {
4230
3630
  return Joi.object({
4231
3631
  success: Joi.boolean(),
4232
3632
  data: Joi.array().items(CartPlatformModel.CartList()),
@@ -4255,13 +3655,13 @@ class CartPlatformModel {
4255
3655
  });
4256
3656
  }
4257
3657
 
4258
- /** @returns {UserCartMappingResult} */
4259
- static UserCartMappingResult() {
3658
+ /** @returns {UserCartMappingResponse} */
3659
+ static UserCartMappingResponse() {
4260
3660
  return Joi.object({
4261
3661
  coupon_text: Joi.string().allow(""),
4262
3662
  user: CartPlatformModel.UserInfo(),
4263
3663
  id: Joi.string().allow(""),
4264
- pan_config: Joi.object().pattern(/\S/, Joi.any()),
3664
+ pan_config: Joi.any(),
4265
3665
  delivery_promise: CartPlatformModel.ShipmentPromise(),
4266
3666
  comment: Joi.string().allow(""),
4267
3667
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -4276,7 +3676,7 @@ class CartPlatformModel {
4276
3676
  last_modified: Joi.string().allow(""),
4277
3677
  buy_now: Joi.boolean(),
4278
3678
  gstin: Joi.string().allow(""),
4279
- custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3679
+ custom_cart_meta: Joi.any(),
4280
3680
  applied_promo_details: Joi.array().items(
4281
3681
  CartPlatformModel.AppliedPromotion()
4282
3682
  ),
@@ -4284,8 +3684,8 @@ class CartPlatformModel {
4284
3684
  });
4285
3685
  }
4286
3686
 
4287
- /** @returns {PlatformAddCartDetails} */
4288
- static PlatformAddCartDetails() {
3687
+ /** @returns {PlatformAddCartRequest} */
3688
+ static PlatformAddCartRequest() {
4289
3689
  return Joi.object({
4290
3690
  user_id: Joi.string().allow(""),
4291
3691
  new_cart: Joi.boolean(),
@@ -4293,35 +3693,32 @@ class CartPlatformModel {
4293
3693
  });
4294
3694
  }
4295
3695
 
4296
- /** @returns {PlatformUpdateCartDetails} */
4297
- static PlatformUpdateCartDetails() {
3696
+ /** @returns {PlatformUpdateCartRequest} */
3697
+ static PlatformUpdateCartRequest() {
4298
3698
  return Joi.object({
4299
3699
  user_id: Joi.string().allow(""),
4300
3700
  items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
4301
- free_gift_items: Joi.array().items(
4302
- CartPlatformModel.FreeGiftItemCreation()
4303
- ),
4304
3701
  operation: Joi.string().allow("").required(),
4305
3702
  });
4306
3703
  }
4307
3704
 
4308
- /** @returns {DeleteCartDetails} */
4309
- static DeleteCartDetails() {
3705
+ /** @returns {DeleteCartRequest} */
3706
+ static DeleteCartRequest() {
4310
3707
  return Joi.object({
4311
3708
  cart_id_list: Joi.array().items(Joi.string().allow("")),
4312
3709
  });
4313
3710
  }
4314
3711
 
4315
- /** @returns {DeleteCartDetailResult} */
4316
- static DeleteCartDetailResult() {
3712
+ /** @returns {DeleteCartDetailResponse} */
3713
+ static DeleteCartDetailResponse() {
4317
3714
  return Joi.object({
4318
3715
  success: Joi.boolean(),
4319
3716
  message: Joi.string().allow(""),
4320
3717
  });
4321
3718
  }
4322
3719
 
4323
- /** @returns {CartItemCountResult} */
4324
- static CartItemCountResult() {
3720
+ /** @returns {CartItemCountResponse} */
3721
+ static CartItemCountResponse() {
4325
3722
  return Joi.object({
4326
3723
  user_cart_items_count: Joi.number(),
4327
3724
  });
@@ -4359,16 +3756,16 @@ class CartPlatformModel {
4359
3756
  });
4360
3757
  }
4361
3758
 
4362
- /** @returns {GetCouponResult} */
4363
- static GetCouponResult() {
3759
+ /** @returns {GetCouponResponse} */
3760
+ static GetCouponResponse() {
4364
3761
  return Joi.object({
4365
3762
  available_coupon_list: Joi.array().items(CartPlatformModel.Coupon()),
4366
3763
  page: CartPlatformModel.PageCoupon(),
4367
3764
  });
4368
3765
  }
4369
3766
 
4370
- /** @returns {ApplyCouponDetails} */
4371
- static ApplyCouponDetails() {
3767
+ /** @returns {ApplyCouponRequest} */
3768
+ static ApplyCouponRequest() {
4372
3769
  return Joi.object({
4373
3770
  coupon_code: Joi.string().allow("").required(),
4374
3771
  });
@@ -4399,10 +3796,10 @@ class CartPlatformModel {
4399
3796
  email: Joi.string().allow(""),
4400
3797
  area_code: Joi.string().allow(""),
4401
3798
  checkout_mode: Joi.string().allow(""),
4402
- meta: Joi.object().pattern(/\S/, Joi.any()),
3799
+ meta: Joi.any(),
4403
3800
  is_active: Joi.boolean(),
4404
3801
  name: Joi.string().allow(""),
4405
- google_map_point: Joi.object().pattern(/\S/, Joi.any()),
3802
+ google_map_point: Joi.any(),
4406
3803
  cart_id: Joi.string().allow(""),
4407
3804
  city: Joi.string().allow(""),
4408
3805
  sector: Joi.string().allow(""),
@@ -4413,28 +3810,19 @@ class CartPlatformModel {
4413
3810
  address: Joi.string().allow(""),
4414
3811
  country_phone_code: Joi.string().allow(""),
4415
3812
  country_iso_code: Joi.string().allow(""),
4416
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3813
+ _custom_json: Joi.any(),
4417
3814
  });
4418
3815
  }
4419
3816
 
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() {
3817
+ /** @returns {PlatformGetAddressesResponse} */
3818
+ static PlatformGetAddressesResponse() {
4430
3819
  return Joi.object({
4431
3820
  address: Joi.array().items(CartPlatformModel.PlatformAddress()),
4432
- validation_config: CartPlatformModel.ValidationConfig(),
4433
3821
  });
4434
3822
  }
4435
3823
 
4436
- /** @returns {SaveAddressDetails} */
4437
- static SaveAddressDetails() {
3824
+ /** @returns {SaveAddressResponse} */
3825
+ static SaveAddressResponse() {
4438
3826
  return Joi.object({
4439
3827
  id: Joi.string().allow(""),
4440
3828
  success: Joi.boolean(),
@@ -4442,8 +3830,8 @@ class CartPlatformModel {
4442
3830
  });
4443
3831
  }
4444
3832
 
4445
- /** @returns {UpdateAddressDetails} */
4446
- static UpdateAddressDetails() {
3833
+ /** @returns {UpdateAddressResponse} */
3834
+ static UpdateAddressResponse() {
4447
3835
  return Joi.object({
4448
3836
  id: Joi.string().allow(""),
4449
3837
  is_default_address: Joi.boolean(),
@@ -4452,16 +3840,16 @@ class CartPlatformModel {
4452
3840
  });
4453
3841
  }
4454
3842
 
4455
- /** @returns {DeleteAddressResult} */
4456
- static DeleteAddressResult() {
3843
+ /** @returns {DeleteAddressResponse} */
3844
+ static DeleteAddressResponse() {
4457
3845
  return Joi.object({
4458
3846
  id: Joi.string().allow(""),
4459
3847
  is_deleted: Joi.boolean(),
4460
3848
  });
4461
3849
  }
4462
3850
 
4463
- /** @returns {PlatformSelectCartAddress} */
4464
- static PlatformSelectCartAddress() {
3851
+ /** @returns {PlatformSelectCartAddressRequest} */
3852
+ static PlatformSelectCartAddressRequest() {
4465
3853
  return Joi.object({
4466
3854
  cart_id: Joi.string().allow(""),
4467
3855
  billing_address_id: Joi.string().allow(""),
@@ -4480,13 +3868,13 @@ class CartPlatformModel {
4480
3868
  });
4481
3869
  }
4482
3870
 
4483
- /** @returns {PlatformShipmentDetails} */
4484
- static PlatformShipmentDetails() {
3871
+ /** @returns {PlatformShipmentResponse} */
3872
+ static PlatformShipmentResponse() {
4485
3873
  return Joi.object({
4486
3874
  shipments: Joi.number(),
4487
3875
  fulfillment_id: Joi.number(),
4488
3876
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
4489
- dp_options: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3877
+ dp_options: Joi.any().allow(null),
4490
3878
  shipment_type: Joi.string().allow(""),
4491
3879
  order_type: Joi.string().allow(""),
4492
3880
  box_type: Joi.string().allow("").allow(null),
@@ -4497,12 +3885,12 @@ class CartPlatformModel {
4497
3885
  });
4498
3886
  }
4499
3887
 
4500
- /** @returns {PlatformCartShipmentsResult} */
4501
- static PlatformCartShipmentsResult() {
3888
+ /** @returns {PlatformCartShipmentsResponse} */
3889
+ static PlatformCartShipmentsResponse() {
4502
3890
  return Joi.object({
4503
3891
  coupon_text: Joi.string().allow(""),
4504
3892
  id: Joi.string().allow(""),
4505
- pan_config: Joi.object().pattern(/\S/, Joi.any()),
3893
+ pan_config: Joi.any(),
4506
3894
  delivery_promise: CartPlatformModel.ShipmentPromise(),
4507
3895
  comment: Joi.string().allow(""),
4508
3896
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -4513,7 +3901,9 @@ class CartPlatformModel {
4513
3901
  breakup_values: CartPlatformModel.CartBreakup(),
4514
3902
  staff_user_id: Joi.string().allow("").allow(null),
4515
3903
  is_valid: Joi.boolean(),
4516
- shipments: Joi.array().items(CartPlatformModel.PlatformShipmentDetails()),
3904
+ shipments: Joi.array().items(
3905
+ CartPlatformModel.PlatformShipmentResponse()
3906
+ ),
4517
3907
  currency: CartPlatformModel.CartCurrency(),
4518
3908
  checkout_mode: Joi.string().allow(""),
4519
3909
  last_modified: Joi.string().allow(""),
@@ -4524,7 +3914,7 @@ class CartPlatformModel {
4524
3914
  ),
4525
3915
  error: Joi.boolean(),
4526
3916
  pan_no: Joi.string().allow(""),
4527
- custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3917
+ custom_cart_meta: Joi.any(),
4528
3918
  });
4529
3919
  }
4530
3920
 
@@ -4537,8 +3927,8 @@ class CartPlatformModel {
4537
3927
  });
4538
3928
  }
4539
3929
 
4540
- /** @returns {UpdateCartShipmentCreation} */
4541
- static UpdateCartShipmentCreation() {
3930
+ /** @returns {UpdateCartShipmentRequest} */
3931
+ static UpdateCartShipmentRequest() {
4542
3932
  return Joi.object({
4543
3933
  shipments: Joi.array()
4544
3934
  .items(CartPlatformModel.UpdateCartShipmentItem())
@@ -4546,29 +3936,29 @@ class CartPlatformModel {
4546
3936
  });
4547
3937
  }
4548
3938
 
4549
- /** @returns {PlatformCartMetaCreation} */
4550
- static PlatformCartMetaCreation() {
3939
+ /** @returns {PlatformCartMetaRequest} */
3940
+ static PlatformCartMetaRequest() {
4551
3941
  return Joi.object({
4552
3942
  gstin: Joi.string().allow(""),
4553
- pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()),
3943
+ pick_up_customer_details: Joi.any(),
4554
3944
  checkout_mode: Joi.string().allow(""),
4555
- gift_details: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3945
+ gift_details: Joi.any().allow(null),
4556
3946
  pan_no: Joi.string().allow(""),
4557
3947
  comment: Joi.string().allow(""),
4558
3948
  staff_user_id: Joi.string().allow("").allow(null),
4559
3949
  });
4560
3950
  }
4561
3951
 
4562
- /** @returns {CartMetaDetails} */
4563
- static CartMetaDetails() {
3952
+ /** @returns {CartMetaResponse} */
3953
+ static CartMetaResponse() {
4564
3954
  return Joi.object({
4565
3955
  is_valid: Joi.boolean(),
4566
3956
  message: Joi.string().allow(""),
4567
3957
  });
4568
3958
  }
4569
3959
 
4570
- /** @returns {CartMetaMissingDetails} */
4571
- static CartMetaMissingDetails() {
3960
+ /** @returns {CartMetaMissingResponse} */
3961
+ static CartMetaMissingResponse() {
4572
3962
  return Joi.object({
4573
3963
  errors: Joi.array().items(Joi.string().allow("")),
4574
3964
  });
@@ -4602,53 +3992,6 @@ class CartPlatformModel {
4602
3992
  });
4603
3993
  }
4604
3994
 
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
-
4652
3995
  /** @returns {CheckCart} */
4653
3996
  static CheckCart() {
4654
3997
  return Joi.object({
@@ -4681,15 +4024,15 @@ class CartPlatformModel {
4681
4024
  gstin: Joi.string().allow(""),
4682
4025
  cod_available: Joi.boolean(),
4683
4026
  delivery_charges: Joi.number(),
4684
- custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
4027
+ custom_cart_meta: Joi.any(),
4685
4028
  });
4686
4029
  }
4687
4030
 
4688
- /** @returns {CartCheckoutDetails} */
4689
- static CartCheckoutDetails() {
4031
+ /** @returns {CartCheckoutResponse} */
4032
+ static CartCheckoutResponse() {
4690
4033
  return Joi.object({
4691
4034
  app_intercept_url: Joi.string().allow(""),
4692
- data: Joi.object().pattern(/\S/, Joi.any()),
4035
+ data: Joi.any(),
4693
4036
  cart: CartPlatformModel.CheckCart(),
4694
4037
  success: Joi.boolean(),
4695
4038
  callback_url: Joi.string().allow(""),
@@ -4699,22 +4042,8 @@ class CartPlatformModel {
4699
4042
  });
4700
4043
  }
4701
4044
 
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() {
4045
+ /** @returns {CartDeliveryModesResponse} */
4046
+ static CartDeliveryModesResponse() {
4718
4047
  return Joi.object({
4719
4048
  pickup_stores: Joi.array().items(Joi.number()),
4720
4049
  available_modes: Joi.array().items(Joi.string().allow("")),
@@ -4744,15 +4073,15 @@ class CartPlatformModel {
4744
4073
  });
4745
4074
  }
4746
4075
 
4747
- /** @returns {StoreDetails} */
4748
- static StoreDetails() {
4076
+ /** @returns {StoreDetailsResponse} */
4077
+ static StoreDetailsResponse() {
4749
4078
  return Joi.object({
4750
4079
  items: Joi.array().items(CartPlatformModel.PickupStoreDetail()),
4751
4080
  });
4752
4081
  }
4753
4082
 
4754
- /** @returns {CartPaymentUpdate} */
4755
- static CartPaymentUpdate() {
4083
+ /** @returns {UpdateCartPaymentRequest} */
4084
+ static UpdateCartPaymentRequest() {
4756
4085
  return Joi.object({
4757
4086
  address_id: Joi.string().allow(""),
4758
4087
  payment_mode: Joi.string().allow(""),
@@ -4772,7 +4101,6 @@ class CartPlatformModel {
4772
4101
  display_message_en: Joi.string().allow("").allow(null),
4773
4102
  code: Joi.string().allow("").allow(null),
4774
4103
  discount: Joi.number(),
4775
- error_en: Joi.string().allow("").allow(null),
4776
4104
  });
4777
4105
  }
4778
4106
 
@@ -4803,19 +4131,17 @@ class CartPlatformModel {
4803
4131
  payment_meta: CartPlatformModel.PaymentMeta().required(),
4804
4132
  amount: Joi.number().allow(null),
4805
4133
  name: Joi.string().allow(""),
4806
- payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
4134
+ payment_extra_identifiers: Joi.any(),
4807
4135
  });
4808
4136
  }
4809
4137
 
4810
- /** @returns {PlatformCartCheckoutDetailV2Creation} */
4811
- static PlatformCartCheckoutDetailV2Creation() {
4138
+ /** @returns {PlatformCartCheckoutDetailV2Request} */
4139
+ static PlatformCartCheckoutDetailV2Request() {
4812
4140
  return Joi.object({
4813
4141
  address_id: Joi.string().allow(""),
4814
4142
  payment_identifier: Joi.string().allow("").allow(null),
4815
- payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
4816
- custom_meta: Joi.array().items(
4817
- CartPlatformModel.CartCheckoutCustomMeta()
4818
- ),
4143
+ payment_params: Joi.any().allow(null),
4144
+ custom_meta: Joi.any(),
4819
4145
  payment_auto_confirm: Joi.boolean(),
4820
4146
  id: Joi.string().allow("").required(),
4821
4147
  pos: Joi.boolean(),
@@ -4824,20 +4150,20 @@ class CartPlatformModel {
4824
4150
  aggregator: Joi.string().allow(""),
4825
4151
  pick_at_store_uid: Joi.number().allow(null),
4826
4152
  device_id: Joi.string().allow("").allow(null),
4827
- delivery_address: Joi.object().pattern(/\S/, Joi.any()),
4153
+ delivery_address: Joi.any(),
4828
4154
  payment_mode: Joi.string().allow(""),
4829
4155
  checkout_mode: Joi.string().allow(""),
4830
- customer_details: CartPlatformModel.CustomerDetails(),
4831
- meta: Joi.object().pattern(/\S/, Joi.any()),
4156
+ customer_details: Joi.any().allow(null),
4157
+ meta: Joi.any(),
4832
4158
  payment_methods: Joi.array()
4833
4159
  .items(CartPlatformModel.PaymentMethod())
4834
4160
  .required(),
4835
4161
  staff: CartPlatformModel.StaffCheckout(),
4836
4162
  employee_code: Joi.string().allow("").allow(null),
4837
- billing_address: Joi.object().pattern(/\S/, Joi.any()),
4163
+ billing_address: Joi.any(),
4838
4164
  callback_url: Joi.string().allow("").allow(null),
4839
- user_id: Joi.string().allow("").required(),
4840
- extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4165
+ user_id: Joi.string().allow("").allow(null).required(),
4166
+ extra_meta: Joi.any(),
4841
4167
  order_type: Joi.string().allow("").required(),
4842
4168
  files: Joi.array().items(CartPlatformModel.Files()),
4843
4169
  ordering_store: Joi.number().allow(null),
@@ -4878,25 +4204,14 @@ class CartPlatformModel {
4878
4204
  });
4879
4205
  }
4880
4206
 
4881
- /** @returns {ArticlePriceDetails} */
4882
- static ArticlePriceDetails() {
4883
- return Joi.object({
4884
- marked: Joi.number(),
4885
- effective: Joi.number(),
4886
- });
4887
- }
4888
-
4889
4207
  /** @returns {FreeGiftItems} */
4890
4208
  static FreeGiftItems() {
4891
4209
  return Joi.object({
4892
4210
  item_slug: Joi.string().allow(""),
4893
4211
  item_name: Joi.string().allow(""),
4894
4212
  item_price_details: CartPlatformModel.ItemPriceDetails(),
4895
- article_price: CartPlatformModel.ArticlePriceDetails(),
4896
4213
  item_brand_name: Joi.string().allow(""),
4897
4214
  item_id: Joi.number(),
4898
- available_sizes: Joi.array().items(Joi.string().allow("")),
4899
- size: Joi.string().allow(""),
4900
4215
  item_images_url: Joi.array().items(Joi.string().allow("")),
4901
4216
  });
4902
4217
  }
@@ -4905,7 +4220,7 @@ class CartPlatformModel {
4905
4220
  static PromotionOffer() {
4906
4221
  return Joi.object({
4907
4222
  id: Joi.string().allow(""),
4908
- buy_rules: Joi.object().pattern(/\S/, Joi.any()),
4223
+ buy_rules: Joi.any(),
4909
4224
  offer_text: Joi.string().allow(""),
4910
4225
  promotion_type: Joi.string().allow(""),
4911
4226
  promotion_name: Joi.string().allow(""),
@@ -4917,8 +4232,8 @@ class CartPlatformModel {
4917
4232
  });
4918
4233
  }
4919
4234
 
4920
- /** @returns {PromotionOffersDetails} */
4921
- static PromotionOffersDetails() {
4235
+ /** @returns {PromotionOffersResponse} */
4236
+ static PromotionOffersResponse() {
4922
4237
  return Joi.object({
4923
4238
  available_promotions: Joi.array().items(
4924
4239
  CartPlatformModel.PromotionOffer()
@@ -4942,20 +4257,12 @@ class CartPlatformModel {
4942
4257
  });
4943
4258
  }
4944
4259
 
4945
- /** @returns {PromotionPaymentOffersDetails} */
4946
- static PromotionPaymentOffersDetails() {
4260
+ /** @returns {PromotionPaymentOffersResponse} */
4261
+ static PromotionPaymentOffersResponse() {
4947
4262
  return Joi.object({
4948
4263
  success: Joi.boolean(),
4949
4264
  promotions: Joi.array().items(CartPlatformModel.PromotionPaymentOffer()),
4950
4265
  });
4951
4266
  }
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
- }
4960
4267
  }
4961
4268
  module.exports = CartPlatformModel;