@gofynd/fdk-client-javascript 1.1.6 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/README.md +52 -3
  2. package/index.js +0 -3
  3. package/package.json +1 -2
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +12 -3
  6. package/sdk/application/ApplicationClient.d.ts +36 -6
  7. package/sdk/application/ApplicationClient.js +30 -43
  8. package/sdk/application/ApplicationConfig.d.ts +92 -12
  9. package/sdk/application/ApplicationConfig.js +48 -14
  10. package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
  11. package/sdk/application/Cart/CartApplicationClient.js +711 -483
  12. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  13. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  14. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  15. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  16. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
  17. package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
  18. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
  19. package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
  20. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  21. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  22. package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
  23. package/sdk/application/Common/CommonApplicationClient.js +52 -33
  24. package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
  25. package/sdk/application/Common/CommonApplicationModel.js +192 -40
  26. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  27. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  28. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
  29. package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
  30. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
  31. package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
  32. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  33. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  34. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
  36. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
  38. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  40. package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
  41. package/sdk/application/Content/ContentApplicationClient.js +489 -278
  42. package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
  43. package/sdk/application/Content/ContentApplicationModel.js +737 -396
  44. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  45. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  46. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
  48. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
  50. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  52. package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
  53. package/sdk/application/Lead/LeadApplicationClient.js +188 -103
  54. package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
  55. package/sdk/application/Lead/LeadApplicationModel.js +330 -244
  56. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  57. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  58. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
  59. package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
  60. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  61. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  62. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  63. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  64. package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
  65. package/sdk/application/Order/OrderApplicationClient.js +329 -217
  66. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  67. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  68. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  69. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  70. package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
  71. package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
  72. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  73. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  74. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  75. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  76. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
  77. package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
  78. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  79. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  80. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  81. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  82. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
  83. package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
  84. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  85. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  86. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  87. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  88. package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
  89. package/sdk/application/Share/ShareApplicationClient.js +185 -97
  90. package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
  91. package/sdk/application/Share/ShareApplicationModel.js +131 -31
  92. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  93. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  94. package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
  95. package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
  96. package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
  97. package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
  98. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  99. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  100. package/sdk/application/User/UserApplicationClient.d.ts +260 -305
  101. package/sdk/application/User/UserApplicationClient.js +910 -522
  102. package/sdk/application/User/UserApplicationModel.d.ts +992 -101
  103. package/sdk/application/User/UserApplicationModel.js +699 -248
  104. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  105. package/sdk/application/User/UserApplicationValidator.js +265 -31
  106. package/sdk/common/AxiosHelper.js +7 -2
  107. package/sdk/common/FDKError.d.ts +3 -0
  108. package/sdk/common/FDKError.js +8 -0
  109. package/sdk/common/Paginator.d.ts +27 -12
  110. package/sdk/common/Paginator.js +15 -0
  111. package/sdk/common/RequestSigner.js +0 -1
  112. package/sdk/common/utils.d.ts +3 -0
  113. package/sdk/common/utils.js +29 -0
  114. package/sdk/partner/PartnerAPIClient.d.ts +16 -1
  115. package/sdk/partner/PartnerAPIClient.js +12 -2
  116. package/sdk/partner/PartnerClient.d.ts +22 -3
  117. package/sdk/partner/PartnerClient.js +20 -0
  118. package/sdk/partner/PartnerConfig.d.ts +40 -14
  119. package/sdk/partner/PartnerConfig.js +31 -6
  120. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  121. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  122. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  123. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  124. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  125. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  126. package/sdk/partner/index.d.ts +3 -1
  127. package/sdk/partner/index.js +3 -1
  128. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
  129. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
  130. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
  131. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
  132. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
  133. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
  134. package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
  135. package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
  136. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
  137. package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
  138. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
  139. package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
  140. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
  141. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
  142. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  143. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  144. package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
  145. package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
  146. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
  147. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
  148. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  149. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  150. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
  151. package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
  152. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
  153. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
  154. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
  155. package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
  156. package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
  157. package/sdk/platform/Common/CommonPlatformClient.js +50 -33
  158. package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
  159. package/sdk/platform/Common/CommonPlatformModel.js +214 -40
  160. package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
  161. package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
  162. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
  163. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
  164. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
  165. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
  166. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
  167. package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
  168. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
  169. package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
  170. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  171. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  172. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
  173. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
  174. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
  175. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
  176. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
  177. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
  178. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
  179. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
  180. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
  181. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
  182. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
  183. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
  184. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
  185. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
  186. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  187. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  188. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
  189. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
  190. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  191. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  192. package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
  193. package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
  194. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
  195. package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
  196. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
  197. package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
  198. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  199. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  200. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
  201. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
  202. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
  203. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
  204. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
  205. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
  206. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
  207. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
  208. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
  209. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
  210. package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
  211. package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
  212. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
  213. package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
  214. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
  215. package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
  216. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
  217. package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
  218. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  219. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  220. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  221. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  222. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
  223. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
  224. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  225. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  226. package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
  227. package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
  228. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
  229. package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
  230. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  231. package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
  232. package/sdk/platform/OAuthClient.js +6 -2
  233. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
  234. package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
  235. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  236. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  237. package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
  238. package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
  239. package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
  240. package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
  241. package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
  242. package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
  243. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
  244. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
  245. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
  246. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
  247. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
  248. package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
  249. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
  250. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
  251. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
  252. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
  253. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
  254. package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
  255. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
  256. package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
  257. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  258. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  259. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  260. package/sdk/platform/PlatformAPIClient.js +9 -1
  261. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  262. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  263. package/sdk/platform/PlatformClient.d.ts +31 -12581
  264. package/sdk/platform/PlatformClient.js +30 -15089
  265. package/sdk/platform/PlatformConfig.d.ts +37 -11
  266. package/sdk/platform/PlatformConfig.js +32 -6
  267. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
  268. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
  269. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  270. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  271. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
  272. package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
  276. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
  277. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
  278. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
  279. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
  280. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
  281. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  282. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  283. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
  284. package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
  285. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  286. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  287. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  288. package/sdk/platform/Share/SharePlatformModel.js +167 -19
  289. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
  290. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
  291. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
  292. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
  293. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  294. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  295. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
  296. package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
  297. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  298. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  299. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
  300. package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
  301. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
  302. package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
  303. package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
  304. package/sdk/platform/User/UserPlatformModel.js +467 -424
  305. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
  306. package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
  307. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
  308. package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
  309. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
  310. package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
  311. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
  312. package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
  313. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
  314. package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
  315. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  316. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  317. package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
  318. package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
  319. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  320. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  321. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  322. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  323. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  324. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  325. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  326. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  327. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  328. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  329. package/sdk/public/PublicAPIClient.d.ts +14 -1
  330. package/sdk/public/PublicAPIClient.js +7 -1
  331. package/sdk/public/PublicClient.d.ts +21 -3
  332. package/sdk/public/PublicClient.js +20 -0
  333. package/sdk/public/PublicConfig.d.ts +27 -6
  334. package/sdk/public/PublicConfig.js +17 -1
  335. package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
  336. package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
  337. package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
  338. package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
  339. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  340. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
  341. package/sdk/public/index.d.ts +1 -0
  342. package/sdk/public/index.js +2 -0
  343. package/sdk/application/ApplicationModels.d.ts +0 -3
  344. package/sdk/application/ApplicationModels.js +0 -20
  345. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
  346. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
  347. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
  348. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
@@ -1,6 +1,1821 @@
1
1
  const Joi = require("joi");
2
2
 
3
- class CartModel {
3
+ /**
4
+ * @typedef AbandonedCart
5
+ * @property {string} _id
6
+ * @property {string} [app_id]
7
+ * @property {Object[]} articles
8
+ * @property {number} [bulk_coupon_discount]
9
+ * @property {boolean} [buy_now]
10
+ * @property {number} [cart_value]
11
+ * @property {Object} cashback
12
+ * @property {string} [checkout_mode]
13
+ * @property {Object} [cod_charges]
14
+ * @property {string} [comment]
15
+ * @property {Object} [coupon]
16
+ * @property {string} created_on
17
+ * @property {Object} [delivery_charges]
18
+ * @property {number} [discount]
19
+ * @property {string} expire_at
20
+ * @property {number[]} [fc_index_map]
21
+ * @property {Object} [fynd_credits]
22
+ * @property {string} [gstin]
23
+ * @property {boolean} [is_active]
24
+ * @property {boolean} [is_archive]
25
+ * @property {boolean} is_default
26
+ * @property {string} last_modified
27
+ * @property {boolean} [merge_qty]
28
+ * @property {Object} [meta]
29
+ * @property {string} [order_id]
30
+ * @property {Object[]} [payment_methods]
31
+ * @property {string} [payment_mode]
32
+ * @property {Object} [payments]
33
+ * @property {Object} [pick_up_customer_details]
34
+ * @property {Object} [promotion]
35
+ * @property {Object[]} [shipments]
36
+ * @property {number} uid
37
+ * @property {string} user_id
38
+ */
39
+
40
+ /**
41
+ * @typedef AbandonedCartResponse
42
+ * @property {AbandonedCart[]} [items]
43
+ * @property {string} [message] - Message of the response
44
+ * @property {Page} [page]
45
+ * @property {Object} [result]
46
+ * @property {boolean} [success] - The request success is defined
47
+ */
48
+
49
+ /**
50
+ * @typedef ActionQuery
51
+ * @property {string[]} [product_slug] - Contains list of product slug
52
+ */
53
+
54
+ /**
55
+ * @typedef ActivePromosResponse
56
+ * @property {string} [created_on] - Coupon creation date
57
+ * @property {string} [description] - The description of the offer in the form of an HTML
58
+ * @property {string} [entity_slug]
59
+ * @property {string} [entity_type] - Type of entity to be selected from :
60
+ * ['coupon', 'promotion']
61
+ * @property {string} [example] - Discount offers examples
62
+ * @property {boolean} [is_hidden] - If the promo is active or not
63
+ * @property {string} [modified_on] - Coupon modification date
64
+ * @property {string} [subtitle] - Small description of the current offer
65
+ * @property {string} [title] - Name of the promotion
66
+ * @property {string} [type] - Coupon type
67
+ */
68
+
69
+ /**
70
+ * @typedef AddCartDetailResponse
71
+ * @property {CartDetailResponse} [cart]
72
+ * @property {string} [message]
73
+ * @property {boolean} [partial] - When adding multiple items check if all
74
+ * added. True if only few are added.
75
+ * @property {boolean} [success] - True if all items are added successfully.
76
+ * False if partially added or not added.
77
+ */
78
+
79
+ /**
80
+ * @typedef AddCartRequest
81
+ * @property {AddProductCart[]} [items]
82
+ * @property {boolean} [new_cart]
83
+ */
84
+
85
+ /**
86
+ * @typedef AddProductCart
87
+ * @property {Object} [_custom_json]
88
+ * @property {Object} [article_assignment]
89
+ * @property {string} [article_id]
90
+ * @property {string} [display]
91
+ * @property {Object} [extra_meta]
92
+ * @property {number} [item_id]
93
+ * @property {string} [item_size]
94
+ * @property {Object} [meta]
95
+ * @property {Object[]} [parent_item_identifiers]
96
+ * @property {boolean} [pos]
97
+ * @property {string[]} [product_group_tags]
98
+ * @property {number} [quantity]
99
+ * @property {number} [seller_id]
100
+ * @property {number} [store_id]
101
+ */
102
+
103
+ /**
104
+ * @typedef AppliedFreeArticles
105
+ * @property {string} [article_id] - Free article id
106
+ * @property {FreeGiftItem} [free_gift_item_details] - Free gift items details
107
+ * @property {string} [parent_item_identifier] - Parent item identifier for free article
108
+ * @property {number} [quantity] - Free article quantity
109
+ */
110
+
111
+ /**
112
+ * @typedef AppliedPromotion
113
+ * @property {number} [amount] - Per unit discount amount applied with current promotion
114
+ * @property {AppliedFreeArticles[]} [applied_free_articles] - Applied free
115
+ * article for free gift item promotions
116
+ * @property {number} [article_quantity] - Quantity of article on which
117
+ * promotion is applicable
118
+ * @property {BuyRules[]} [buy_rules] - Buy rules for promotions
119
+ * @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions
120
+ * @property {boolean} [mrp_promotion] - If applied promotion is applied on
121
+ * product MRP or ESP
122
+ * @property {string} [offer_text] - Offer text of current promotion
123
+ * @property {Ownership2} [ownership] - Ownership of promotion
124
+ * @property {string} [promo_id] - Promotion id
125
+ * @property {string} [promotion_group] - Promotion group for the promotion
126
+ * @property {string} [promotion_name] - Promotion name of current promotion
127
+ * @property {string} [promotion_type] - Promotion type of current promotion
128
+ */
129
+
130
+ /**
131
+ * @typedef ApplyCouponRequest
132
+ * @property {string} coupon_code - Coupon code to be applied
133
+ */
134
+
135
+ /**
136
+ * @typedef Article
137
+ * @property {string} article_id - Id of article
138
+ * @property {string} [code] - Code to identify price adjustment on article
139
+ * @property {Object} [meta] - Meta related to article
140
+ * @property {number} [quantity] - Total quantity of the article to be
141
+ * considered (currently used only in discount type)
142
+ * @property {string} [type] - Type of price adjusment
143
+ * @property {number} [value] - Value of price adjustment for article
144
+ */
145
+
146
+ /**
147
+ * @typedef ArticlePriceInfo
148
+ * @property {BasePrice} [base]
149
+ * @property {BasePrice} [converted]
150
+ */
151
+
152
+ /**
153
+ * @typedef BaseInfo
154
+ * @property {string} [name]
155
+ * @property {number} [uid]
156
+ */
157
+
158
+ /**
159
+ * @typedef BasePrice
160
+ * @property {string} [currency_code]
161
+ * @property {string} [currency_symbol]
162
+ * @property {number} [effective]
163
+ * @property {number} [marked]
164
+ */
165
+
166
+ /**
167
+ * @typedef BulkBundleRestriction
168
+ * @property {boolean} multi_store_allowed
169
+ */
170
+
171
+ /**
172
+ * @typedef BuyRules
173
+ * @property {Object} [cart_conditions] - Cart conditions details for promotion
174
+ * @property {Object} [item_criteria] - Item criteria of promotion
175
+ */
176
+
177
+ /**
178
+ * @typedef CartBreakup
179
+ * @property {CouponBreakup} [coupon]
180
+ * @property {DisplayBreakup[]} [display]
181
+ * @property {LoyaltyPoints} [loyalty_points]
182
+ * @property {RawBreakup} [raw]
183
+ */
184
+
185
+ /**
186
+ * @typedef CartCheckoutCustomMeta
187
+ * @property {string} key
188
+ * @property {string} value
189
+ */
190
+
191
+ /**
192
+ * @typedef CartCheckoutResponse
193
+ * @property {string} [app_intercept_url]
194
+ * @property {string} [callback_url]
195
+ * @property {CheckCart} [cart]
196
+ * @property {Object} [data]
197
+ * @property {string} [message]
198
+ * @property {string} [order_id]
199
+ * @property {string} [payment_confirm_url]
200
+ * @property {boolean} [success]
201
+ */
202
+
203
+ /**
204
+ * @typedef CartCurrency
205
+ * @property {string} [code] - Currency code defined by ISO 4217:2015
206
+ * @property {string} [symbol]
207
+ */
208
+
209
+ /**
210
+ * @typedef CartDeliveryModesResponse
211
+ * @property {string[]} [available_modes] - Available delivery modes
212
+ * @property {number[]} [pickup_stores] - Store pick up available store uids
213
+ */
214
+
215
+ /**
216
+ * @typedef CartDetailResponse
217
+ * @property {AppliedPromotion[]} [applied_promo_details]
218
+ * @property {CartBreakup} [breakup_values]
219
+ * @property {boolean} [buy_now]
220
+ * @property {string} [checkout_mode]
221
+ * @property {string} [comment]
222
+ * @property {string} [coupon_text]
223
+ * @property {CartCurrency} [currency]
224
+ * @property {string} [delivery_charge_info]
225
+ * @property {ShipmentPromise} [delivery_promise]
226
+ * @property {string} [gstin]
227
+ * @property {string} [id]
228
+ * @property {boolean} [is_valid]
229
+ * @property {CartProductInfo[]} [items]
230
+ * @property {string} [last_modified]
231
+ * @property {string} [message]
232
+ * @property {Object} [pan_config]
233
+ * @property {string} [pan_no]
234
+ * @property {PaymentSelectionLock} [payment_selection_lock]
235
+ * @property {boolean} [restrict_checkout]
236
+ */
237
+
238
+ /**
239
+ * @typedef CartItem
240
+ * @property {string} product_id
241
+ * @property {number} [quantity]
242
+ * @property {string} size
243
+ */
244
+
245
+ /**
246
+ * @typedef CartItemCountResponse
247
+ * @property {number} [user_cart_items_count] - Item count present in cart
248
+ */
249
+
250
+ /**
251
+ * @typedef CartItemMeta
252
+ * @property {string} [group_id]
253
+ * @property {boolean} [primary_item]
254
+ */
255
+
256
+ /**
257
+ * @typedef CartList
258
+ * @property {string} [cart_id]
259
+ * @property {number} [cart_value]
260
+ * @property {string} [created_on]
261
+ * @property {number} [item_counts]
262
+ * @property {Object} [pick_up_customer_details]
263
+ * @property {string} [user_id]
264
+ */
265
+
266
+ /**
267
+ * @typedef CartMetaConfigAdd
268
+ * @property {boolean} [bulk_coupons]
269
+ * @property {DeliveryCharges} [delivery_charges]
270
+ * @property {boolean} [enabled]
271
+ * @property {string} [gift_display_text]
272
+ * @property {number} [gift_pricing]
273
+ * @property {number} [max_cart_items]
274
+ * @property {number} [min_cart_value]
275
+ * @property {boolean} [revenue_engine_coupon]
276
+ */
277
+
278
+ /**
279
+ * @typedef CartMetaConfigUpdate
280
+ * @property {boolean} [bulk_coupons]
281
+ * @property {DeliveryCharges} [delivery_charges]
282
+ * @property {boolean} [enabled]
283
+ * @property {string} [gift_display_text]
284
+ * @property {number} [gift_pricing]
285
+ * @property {number} [max_cart_items]
286
+ * @property {number} [min_cart_value]
287
+ * @property {boolean} [revenue_engine_coupon]
288
+ */
289
+
290
+ /**
291
+ * @typedef CartMetaMissingResponse
292
+ * @property {string[]} [errors]
293
+ */
294
+
295
+ /**
296
+ * @typedef CartMetaResponse
297
+ * @property {boolean} [is_valid]
298
+ * @property {string} [message]
299
+ */
300
+
301
+ /**
302
+ * @typedef CartProduct
303
+ * @property {Object} [_custom_json]
304
+ * @property {ProductAction} [action]
305
+ * @property {BaseInfo} [brand]
306
+ * @property {CategoryInfo[]} [categories]
307
+ * @property {ProductImage[]} [images]
308
+ * @property {string} [item_code]
309
+ * @property {string} [name]
310
+ * @property {string} [slug] - Unique product url name generated via product
311
+ * name and other meta data
312
+ * @property {string[]} [tags]
313
+ * @property {Tags} [teaser_tag]
314
+ * @property {string} [type]
315
+ * @property {number} [uid]
316
+ */
317
+
318
+ /**
319
+ * @typedef CartProductIdentifer
320
+ * @property {string} [identifier] - Article idenfier generated by cart
321
+ */
322
+
323
+ /**
324
+ * @typedef CartProductInfo
325
+ * @property {ProductArticle} [article]
326
+ * @property {ProductAvailability} [availability]
327
+ * @property {Object} [bulk_offer]
328
+ * @property {CouponDetails} [coupon]
329
+ * @property {string} [coupon_message]
330
+ * @property {Object} [custom_order]
331
+ * @property {ShipmentPromise} [delivery_promise]
332
+ * @property {string} [discount]
333
+ * @property {CartProductIdentifer} identifiers
334
+ * @property {boolean} [is_set]
335
+ * @property {string} [key]
336
+ * @property {string} [message]
337
+ * @property {Object} [moq]
338
+ * @property {Object} [parent_item_identifiers]
339
+ * @property {ProductPriceInfo} [price]
340
+ * @property {ProductPriceInfo} [price_per_unit]
341
+ * @property {CartProduct} [product]
342
+ * @property {PromoMeta} [promo_meta]
343
+ * @property {AppliedPromotion[]} [promotions_applied]
344
+ * @property {number} [quantity]
345
+ */
346
+
347
+ /**
348
+ * @typedef CategoryInfo
349
+ * @property {string} [name]
350
+ * @property {number} [uid] - Product Category Id
351
+ */
352
+
353
+ /**
354
+ * @typedef Charges
355
+ * @property {number} [charges]
356
+ * @property {number} [threshold]
357
+ */
358
+
359
+ /**
360
+ * @typedef CheckCart
361
+ * @property {CartBreakup} [breakup_values]
362
+ * @property {boolean} [buy_now]
363
+ * @property {number} [cart_id]
364
+ * @property {string} [checkout_mode]
365
+ * @property {boolean} [cod_available]
366
+ * @property {number} [cod_charges]
367
+ * @property {string} [cod_message]
368
+ * @property {string} [comment]
369
+ * @property {string} [coupon_text]
370
+ * @property {CartCurrency} [currency]
371
+ * @property {string} [delivery_charge_info]
372
+ * @property {number} [delivery_charge_order_value]
373
+ * @property {number} [delivery_charges]
374
+ * @property {ShipmentPromise} [delivery_promise]
375
+ * @property {string} [error_message]
376
+ * @property {string} [gstin]
377
+ * @property {string} [id]
378
+ * @property {boolean} [is_valid]
379
+ * @property {CartProductInfo[]} [items]
380
+ * @property {string} [last_modified]
381
+ * @property {string} [message]
382
+ * @property {string} [order_id]
383
+ * @property {PaymentSelectionLock} [payment_selection_lock]
384
+ * @property {boolean} [restrict_checkout]
385
+ * @property {string} [store_code]
386
+ * @property {Object[]} [store_emps]
387
+ * @property {boolean} [success]
388
+ * @property {string} [uid]
389
+ * @property {string} [user_type]
390
+ */
391
+
392
+ /**
393
+ * @typedef Collection
394
+ * @property {string} collected_by
395
+ * @property {string} refund_by
396
+ */
397
+
398
+ /**
399
+ * @typedef CompareObject
400
+ * @property {number} [equals]
401
+ * @property {number} [greater_than]
402
+ * @property {number} [greater_than_equals]
403
+ * @property {number} [less_than]
404
+ * @property {number} [less_than_equals]
405
+ */
406
+
407
+ /**
408
+ * @typedef Coupon
409
+ * @property {string} [coupon_code]
410
+ * @property {string} [coupon_type]
411
+ * @property {number} [coupon_value]
412
+ * @property {string} [description]
413
+ * @property {string} [expires_on]
414
+ * @property {boolean} [is_applicable]
415
+ * @property {boolean} [is_applied]
416
+ * @property {number} [max_discount_value]
417
+ * @property {string} [message]
418
+ * @property {number} [minimum_cart_value]
419
+ * @property {string} [sub_title]
420
+ * @property {string} [title]
421
+ */
422
+
423
+ /**
424
+ * @typedef CouponAction
425
+ * @property {string} [action_date]
426
+ * @property {string} [txn_mode]
427
+ */
428
+
429
+ /**
430
+ * @typedef CouponAdd
431
+ * @property {CouponSchedule} [_schedule]
432
+ * @property {CouponAction} [action]
433
+ * @property {CouponAuthor} [author]
434
+ * @property {string} code
435
+ * @property {CouponDateMeta} [date_meta]
436
+ * @property {DisplayMeta} display_meta
437
+ * @property {Identifier} identifiers
438
+ * @property {Ownership} ownership
439
+ * @property {Restrictions} [restrictions]
440
+ * @property {Rule[]} rule
441
+ * @property {RuleDefinition} rule_definition
442
+ * @property {State} [state]
443
+ * @property {string[]} [tags]
444
+ * @property {string} type_slug
445
+ * @property {Validation} [validation]
446
+ * @property {Validity} validity
447
+ */
448
+
449
+ /**
450
+ * @typedef CouponAuthor
451
+ * @property {string} [created_by]
452
+ * @property {string} [modified_by]
453
+ */
454
+
455
+ /**
456
+ * @typedef CouponBreakup
457
+ * @property {string} [code]
458
+ * @property {string} [coupon_type]
459
+ * @property {number} [coupon_value]
460
+ * @property {string} [description]
461
+ * @property {boolean} [is_applied]
462
+ * @property {number} [max_discount_value]
463
+ * @property {string} [message]
464
+ * @property {number} [minimum_cart_value]
465
+ * @property {string} [sub_title]
466
+ * @property {string} [title]
467
+ * @property {string} [type]
468
+ * @property {string} [uid]
469
+ * @property {number} [value]
470
+ */
471
+
472
+ /**
473
+ * @typedef CouponDateMeta
474
+ * @property {string} [created_on]
475
+ * @property {string} [modified_on]
476
+ */
477
+
478
+ /**
479
+ * @typedef CouponDetails
480
+ * @property {string} [code]
481
+ * @property {number} [discount_single_quantity]
482
+ * @property {number} [discount_total_quantity]
483
+ */
484
+
485
+ /**
486
+ * @typedef CouponPartialUpdate
487
+ * @property {boolean} [archive] - Send true to unpublish coupon
488
+ * @property {CouponSchedule} [schedule]
489
+ */
490
+
491
+ /**
492
+ * @typedef CouponSchedule
493
+ * @property {string} [cron]
494
+ * @property {number} [duration]
495
+ * @property {string} [end]
496
+ * @property {Object[]} [next_schedule]
497
+ * @property {string} [start]
498
+ */
499
+
500
+ /**
501
+ * @typedef CouponsResponse
502
+ * @property {CouponAdd} [items]
503
+ * @property {Page} [page]
504
+ */
505
+
506
+ /**
507
+ * @typedef CouponUpdate
508
+ * @property {CouponSchedule} [_schedule]
509
+ * @property {CouponAction} [action]
510
+ * @property {CouponAuthor} [author]
511
+ * @property {string} code
512
+ * @property {CouponDateMeta} [date_meta]
513
+ * @property {DisplayMeta} display_meta
514
+ * @property {Identifier} identifiers
515
+ * @property {Ownership} ownership
516
+ * @property {Restrictions} [restrictions]
517
+ * @property {Rule[]} rule
518
+ * @property {RuleDefinition} rule_definition
519
+ * @property {State} [state]
520
+ * @property {string[]} [tags]
521
+ * @property {string} type_slug
522
+ * @property {Validation} [validation]
523
+ * @property {Validity} validity
524
+ */
525
+
526
+ /**
527
+ * @typedef CouponValidity
528
+ * @property {string} [code]
529
+ * @property {number} [discount]
530
+ * @property {string} [display_message_en]
531
+ * @property {boolean} [next_validation_required]
532
+ * @property {string} [title]
533
+ * @property {boolean} [valid]
534
+ */
535
+
536
+ /**
537
+ * @typedef CustomerDetails
538
+ * @property {string} [email]
539
+ * @property {string} mobile
540
+ * @property {string} [name]
541
+ */
542
+
543
+ /**
544
+ * @typedef DeleteAddressResponse
545
+ * @property {string} [id]
546
+ * @property {boolean} [is_deleted]
547
+ */
548
+
549
+ /**
550
+ * @typedef DeleteCartDetailResponse
551
+ * @property {string} [message]
552
+ * @property {boolean} [success] - True if cart is archived successfully. False
553
+ * if not archived.
554
+ */
555
+
556
+ /**
557
+ * @typedef DeleteCartRequest
558
+ * @property {string[]} [cart_id_list]
559
+ */
560
+
561
+ /**
562
+ * @typedef DeliveryCharges
563
+ * @property {Charges[]} [charges]
564
+ * @property {boolean} [enabled]
565
+ */
566
+
567
+ /**
568
+ * @typedef DiscountOffer
569
+ * @property {boolean} [apportion_discount]
570
+ * @property {string} [code]
571
+ * @property {number} [discount_amount]
572
+ * @property {number} [discount_percentage]
573
+ * @property {number} [discount_price]
574
+ * @property {number} [max_discount_amount]
575
+ * @property {number} [max_offer_quantity]
576
+ * @property {number} [max_usage_per_transaction]
577
+ * @property {number} [min_offer_quantity]
578
+ * @property {boolean} [partial_can_ret]
579
+ */
580
+
581
+ /**
582
+ * @typedef DiscountRule
583
+ * @property {string} buy_condition
584
+ * @property {string} discount_type
585
+ * @property {ItemCriteria} item_criteria
586
+ * @property {DiscountOffer} offer
587
+ */
588
+
589
+ /**
590
+ * @typedef DiscountRulesApp
591
+ * @property {Object} [item_criteria] - Item criteria of promotion
592
+ * @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
593
+ * @property {Object} [offer] - Offer for promotion
594
+ * @property {Object} [raw_offer] - Raw offer details for promotion
595
+ */
596
+
597
+ /**
598
+ * @typedef DisplayBreakup
599
+ * @property {string} [currency_code]
600
+ * @property {string} [currency_symbol]
601
+ * @property {string} [display]
602
+ * @property {string} [key]
603
+ * @property {string[]} [message]
604
+ * @property {number} [value]
605
+ */
606
+
607
+ /**
608
+ * @typedef DisplayMeta
609
+ * @property {DisplayMetaDict} [apply]
610
+ * @property {DisplayMetaDict} [auto]
611
+ * @property {string} [description]
612
+ * @property {DisplayMetaDict} [remove]
613
+ * @property {string} [subtitle]
614
+ * @property {string} [title]
615
+ */
616
+
617
+ /**
618
+ * @typedef DisplayMeta1
619
+ * @property {string} [description]
620
+ * @property {string} [name]
621
+ * @property {string} [offer_label]
622
+ * @property {string} [offer_text]
623
+ */
624
+
625
+ /**
626
+ * @typedef DisplayMetaDict
627
+ * @property {string} [subtitle]
628
+ * @property {string} [title]
629
+ */
630
+
631
+ /**
632
+ * @typedef Files
633
+ * @property {string} key
634
+ * @property {string[]} values
635
+ */
636
+
637
+ /**
638
+ * @typedef FreeGiftItem
639
+ * @property {string} [item_brand_name] - Item brand name
640
+ * @property {number} [item_id] - Item id
641
+ * @property {string[]} [item_images_url] - Item images URL
642
+ * @property {string} [item_name] - Item name
643
+ * @property {Object} [item_price_details] - Item price details
644
+ * @property {string} [item_slug] - Item slug
645
+ */
646
+
647
+ /**
648
+ * @typedef GeoLocation
649
+ * @property {number} [latitude]
650
+ * @property {number} [longitude]
651
+ */
652
+
653
+ /**
654
+ * @typedef GetCouponResponse
655
+ * @property {Coupon[]} [available_coupon_list]
656
+ * @property {PageCoupon} [page]
657
+ */
658
+
659
+ /**
660
+ * @typedef GetShareCartLinkRequest
661
+ * @property {string} [id] - Cart uid for generating sharing
662
+ * @property {Object} [meta] - Staff, Ordering store or any other data. This
663
+ * data will be used to generate link as well as sent as shared details.
664
+ */
665
+
666
+ /**
667
+ * @typedef GetShareCartLinkResponse
668
+ * @property {string} [share_url] - Short shareable final url
669
+ * @property {string} [token] - Short url unique id
670
+ */
671
+
672
+ /**
673
+ * @typedef Identifier
674
+ * @property {string[]} [article_id]
675
+ * @property {number[]} [brand_id]
676
+ * @property {number[]} [category_id]
677
+ * @property {string[]} [collection_id]
678
+ * @property {number[]} [company_id]
679
+ * @property {string[]} [email_domain]
680
+ * @property {number[]} [exclude_brand_id]
681
+ * @property {number[]} [item_id]
682
+ * @property {number[]} [store_id]
683
+ * @property {string[]} [user_id]
684
+ */
685
+
686
+ /**
687
+ * @typedef ItemCriteria
688
+ * @property {boolean} [all_items]
689
+ * @property {string[]} [available_zones]
690
+ * @property {string[]} [buy_rules]
691
+ * @property {CompareObject} [cart_quantity]
692
+ * @property {CompareObject} [cart_total]
693
+ * @property {CompareObject} [cart_unique_item_amount]
694
+ * @property {CompareObject} [cart_unique_item_quantity]
695
+ * @property {number[]} [item_brand]
696
+ * @property {number[]} [item_category]
697
+ * @property {number[]} [item_company]
698
+ * @property {number[]} [item_department]
699
+ * @property {number[]} [item_exclude_brand]
700
+ * @property {number[]} [item_exclude_category]
701
+ * @property {number[]} [item_exclude_company]
702
+ * @property {number[]} [item_exclude_department]
703
+ * @property {number[]} [item_exclude_id]
704
+ * @property {number[]} [item_exclude_l1_category]
705
+ * @property {number[]} [item_exclude_l2_category]
706
+ * @property {string[]} [item_exclude_sku]
707
+ * @property {number[]} [item_exclude_store]
708
+ * @property {number[]} [item_id]
709
+ * @property {number[]} [item_l1_category]
710
+ * @property {number[]} [item_l2_category]
711
+ * @property {string[]} [item_size]
712
+ * @property {string[]} [item_sku]
713
+ * @property {number[]} [item_store]
714
+ * @property {string[]} [item_tags]
715
+ */
716
+
717
+ /**
718
+ * @typedef LoyaltyPoints
719
+ * @property {number} [applicable]
720
+ * @property {string} [description]
721
+ * @property {boolean} [is_applied]
722
+ * @property {number} [total]
723
+ */
724
+
725
+ /**
726
+ * @typedef MultiCartResponse
727
+ * @property {CartList[]} [data]
728
+ * @property {boolean} [success]
729
+ */
730
+
731
+ /**
732
+ * @typedef MultiTenderPaymentMeta
733
+ * @property {string} [current_status]
734
+ * @property {Object} [extra_meta]
735
+ * @property {string} [order_id]
736
+ * @property {string} [payment_gateway]
737
+ * @property {string} [payment_id]
738
+ */
739
+
740
+ /**
741
+ * @typedef MultiTenderPaymentMethod
742
+ * @property {number} amount - Payment amount
743
+ * @property {MultiTenderPaymentMeta} [meta]
744
+ * @property {string} mode
745
+ * @property {string} [name] - Payment mode name
746
+ */
747
+
748
+ /**
749
+ * @typedef OpenapiCartDetailsRequest
750
+ * @property {CartItem[]} cart_items
751
+ */
752
+
753
+ /**
754
+ * @typedef OpenapiCartDetailsResponse
755
+ * @property {CartBreakup} [breakup_values]
756
+ * @property {boolean} [is_valid]
757
+ * @property {CartProductInfo[]} [items]
758
+ * @property {string} [message]
759
+ */
760
+
761
+ /**
762
+ * @typedef OpenApiCartServiceabilityRequest
763
+ * @property {CartItem[]} cart_items
764
+ * @property {ShippingAddress} shipping_address
765
+ */
766
+
767
+ /**
768
+ * @typedef OpenApiCartServiceabilityResponse
769
+ * @property {CartBreakup} [breakup_values]
770
+ * @property {ShipmentPromise} [delivery_promise]
771
+ * @property {boolean} [is_valid]
772
+ * @property {CartProductInfo[]} [items]
773
+ * @property {string} [message]
774
+ */
775
+
776
+ /**
777
+ * @typedef OpenApiCheckoutResponse
778
+ * @property {string} [message]
779
+ * @property {string} order_id - Fynd order id
780
+ * @property {string} [order_ref_id] - Order id sent in request
781
+ * @property {boolean} [success]
782
+ */
783
+
784
+ /**
785
+ * @typedef OpenApiErrorResponse
786
+ * @property {Object} [errors] - Contains field name which has error as key and
787
+ * error message as value
788
+ * @property {string} [message]
789
+ * @property {boolean} [success]
790
+ */
791
+
792
+ /**
793
+ * @typedef OpenApiFiles
794
+ * @property {string} key
795
+ * @property {string[]} values
796
+ */
797
+
798
+ /**
799
+ * @typedef OpenApiOrderItem
800
+ * @property {number} amount_paid
801
+ * @property {number} cashback_applied
802
+ * @property {number} cod_charges
803
+ * @property {number} coupon_effective_discount
804
+ * @property {number} delivery_charges
805
+ * @property {number} discount
806
+ * @property {number} [employee_discount]
807
+ * @property {Object} [extra_meta]
808
+ * @property {OpenApiFiles[]} [files]
809
+ * @property {number} [loyalty_discount]
810
+ * @property {CartItemMeta} [meta]
811
+ * @property {MultiTenderPaymentMethod[]} payment_methods
812
+ * @property {number} price_effective
813
+ * @property {number} price_marked
814
+ * @property {number} product_id
815
+ * @property {number} [quantity]
816
+ * @property {string} size
817
+ */
818
+
819
+ /**
820
+ * @typedef OpenApiPlatformCheckoutReq
821
+ * @property {string} [affiliate_order_id]
822
+ * @property {ShippingAddress} billing_address
823
+ * @property {OpenApiOrderItem[]} cart_items
824
+ * @property {number} cart_value
825
+ * @property {number} cashback_applied
826
+ * @property {number} cod_charges
827
+ * @property {string} [comment]
828
+ * @property {string} [coupon]
829
+ * @property {string} coupon_code
830
+ * @property {number} coupon_value
831
+ * @property {string} [currency_code]
832
+ * @property {number} delivery_charges
833
+ * @property {Object} [employee_discount]
834
+ * @property {OpenApiFiles[]} [files]
835
+ * @property {string} [gstin]
836
+ * @property {number} [loyalty_discount]
837
+ * @property {string} [order_id]
838
+ * @property {MultiTenderPaymentMethod[]} payment_methods
839
+ * @property {string} [payment_mode]
840
+ * @property {ShippingAddress} [shipping_address]
841
+ */
842
+
843
+ /**
844
+ * @typedef OperationErrorResponse
845
+ * @property {string} [message]
846
+ * @property {boolean} [success]
847
+ */
848
+
849
+ /**
850
+ * @typedef OverrideCartItem
851
+ * @property {number} amount_paid
852
+ * @property {number} discount
853
+ * @property {Object} [extra_meta]
854
+ * @property {number} item_id
855
+ * @property {number} price_effective
856
+ * @property {number} price_marked
857
+ * @property {OverrideCartItemPromo[]} [promo_list]
858
+ * @property {number} [quantity]
859
+ * @property {string} [seller_identifier]
860
+ * @property {string} size
861
+ */
862
+
863
+ /**
864
+ * @typedef OverrideCartItemPromo
865
+ * @property {Object[]} [item_list]
866
+ * @property {string} promo_amount
867
+ * @property {string} [promo_desc]
868
+ * @property {string} promo_id
869
+ * @property {string} [rwrd_tndr]
870
+ */
871
+
872
+ /**
873
+ * @typedef OverrideCheckoutReq
874
+ * @property {string} aggregator
875
+ * @property {Object} [billing_address]
876
+ * @property {string} cart_id
877
+ * @property {OverrideCartItem[]} cart_items
878
+ * @property {string} currency_code
879
+ * @property {string} merchant_code
880
+ * @property {string} order_type
881
+ * @property {number} [ordering_store]
882
+ * @property {string} payment_identifier
883
+ * @property {string} payment_mode
884
+ * @property {Object} [shipping_address]
885
+ */
886
+
887
+ /**
888
+ * @typedef OverrideCheckoutResponse
889
+ * @property {Object} cart
890
+ * @property {Object} data
891
+ * @property {string} message
892
+ * @property {string} order_id
893
+ * @property {string} success
894
+ */
895
+
896
+ /**
897
+ * @typedef Ownership
898
+ * @property {string} payable_by
899
+ * @property {string} payable_category
900
+ */
901
+
902
+ /**
903
+ * @typedef Ownership1
904
+ * @property {string} payable_by
905
+ * @property {string} payable_category
906
+ */
907
+
908
+ /**
909
+ * @typedef Ownership2
910
+ * @property {string} [payable_by] - Promo amount bearable party
911
+ * @property {string} [payable_category] - Promo amount payable category
912
+ */
913
+
914
+ /**
915
+ * @typedef Page
916
+ * @property {number} [current]
917
+ * @property {boolean} [has_next]
918
+ * @property {boolean} [has_previous]
919
+ * @property {number} [item_total]
920
+ * @property {string} [next_id]
921
+ * @property {number} [size]
922
+ * @property {string} type
923
+ */
924
+
925
+ /**
926
+ * @typedef PageCoupon
927
+ * @property {number} [current]
928
+ * @property {boolean} [has_next]
929
+ * @property {boolean} [has_previous]
930
+ * @property {number} [total]
931
+ * @property {number} [total_item_count]
932
+ */
933
+
934
+ /**
935
+ * @typedef PaymentAllowValue
936
+ * @property {number} [max]
937
+ */
938
+
939
+ /**
940
+ * @typedef PaymentAllowValue1
941
+ * @property {number} [max]
942
+ */
943
+
944
+ /**
945
+ * @typedef PaymentCouponValidate
946
+ * @property {CouponValidity} [coupon_validity]
947
+ * @property {string} [message]
948
+ * @property {boolean} success
949
+ */
950
+
951
+ /**
952
+ * @typedef PaymentMeta
953
+ * @property {string} [merchant_code]
954
+ * @property {string} [payment_gateway]
955
+ * @property {string} [payment_identifier]
956
+ * @property {string} [type]
957
+ */
958
+
959
+ /**
960
+ * @typedef PaymentMethod
961
+ * @property {number} [amount]
962
+ * @property {string} mode
963
+ * @property {string} [name]
964
+ * @property {string} [payment]
965
+ * @property {PaymentMeta} payment_meta
966
+ */
967
+
968
+ /**
969
+ * @typedef PaymentModes
970
+ * @property {string[]} [codes]
971
+ * @property {string[]} [iins]
972
+ * @property {string[]} [networks]
973
+ * @property {string[]} [types]
974
+ * @property {PaymentAllowValue} [uses]
975
+ */
976
+
977
+ /**
978
+ * @typedef PaymentSelectionLock
979
+ * @property {string} [default_options]
980
+ * @property {boolean} [enabled]
981
+ * @property {string} [payment_identifier]
982
+ */
983
+
984
+ /**
985
+ * @typedef PickupStoreDetail
986
+ * @property {string} [address]
987
+ * @property {string} [address_type]
988
+ * @property {string} [area]
989
+ * @property {string} [area_code]
990
+ * @property {string} [area_code_slug]
991
+ * @property {string} [city]
992
+ * @property {string} [country]
993
+ * @property {string} [email]
994
+ * @property {number} [id]
995
+ * @property {string} [landmark]
996
+ * @property {string} [name]
997
+ * @property {string} [phone]
998
+ * @property {number} [pincode]
999
+ * @property {string} [state]
1000
+ * @property {string} [store_code]
1001
+ * @property {number} [uid]
1002
+ */
1003
+
1004
+ /**
1005
+ * @typedef PlatformAddCartRequest
1006
+ * @property {AddProductCart[]} [items]
1007
+ * @property {boolean} [new_cart]
1008
+ * @property {string} [user_id]
1009
+ */
1010
+
1011
+ /**
1012
+ * @typedef PlatformAddress
1013
+ * @property {string} [address]
1014
+ * @property {string} [address_type]
1015
+ * @property {string} [area]
1016
+ * @property {string} [area_code]
1017
+ * @property {string} [area_code_slug]
1018
+ * @property {string} [cart_id]
1019
+ * @property {string} [checkout_mode]
1020
+ * @property {string} [city]
1021
+ * @property {string} [country]
1022
+ * @property {string} [country_code]
1023
+ * @property {string} [created_by_user_id]
1024
+ * @property {string} [email]
1025
+ * @property {GeoLocation} [geo_location]
1026
+ * @property {Object} [google_map_point]
1027
+ * @property {string} [id]
1028
+ * @property {boolean} [is_active]
1029
+ * @property {boolean} [is_default_address]
1030
+ * @property {string} [landmark]
1031
+ * @property {Object} [meta]
1032
+ * @property {string} [name]
1033
+ * @property {string} [phone]
1034
+ * @property {string} [state]
1035
+ * @property {string[]} [tags]
1036
+ * @property {string} [user_id]
1037
+ */
1038
+
1039
+ /**
1040
+ * @typedef PlatformCartCheckoutDetailRequest
1041
+ * @property {string} [address_id]
1042
+ * @property {string} [aggregator]
1043
+ * @property {Object} [billing_address]
1044
+ * @property {string} [billing_address_id]
1045
+ * @property {string} [callback_url]
1046
+ * @property {string} [checkout_mode]
1047
+ * @property {CartCheckoutCustomMeta[]} [custom_meta]
1048
+ * @property {Object} [customer_details] - Customer details
1049
+ * @property {Object} [delivery_address]
1050
+ * @property {string} [device_id]
1051
+ * @property {string} [employee_code]
1052
+ * @property {Object} [extra_meta]
1053
+ * @property {Files[]} [files] - List of file url
1054
+ * @property {string} id
1055
+ * @property {string} [merchant_code]
1056
+ * @property {Object} [meta]
1057
+ * @property {string} order_type
1058
+ * @property {number} [ordering_store]
1059
+ * @property {boolean} [payment_auto_confirm]
1060
+ * @property {string} [payment_identifier]
1061
+ * @property {string} payment_mode
1062
+ * @property {Object} [payment_params]
1063
+ * @property {number} [pick_at_store_uid]
1064
+ * @property {boolean} [pos]
1065
+ * @property {StaffCheckout} [staff]
1066
+ * @property {string} user_id
1067
+ */
1068
+
1069
+ /**
1070
+ * @typedef PlatformCartCheckoutDetailV2Request
1071
+ * @property {string} [address_id]
1072
+ * @property {string} [aggregator]
1073
+ * @property {Object} [billing_address]
1074
+ * @property {string} [billing_address_id]
1075
+ * @property {string} [callback_url]
1076
+ * @property {string} [checkout_mode]
1077
+ * @property {Object} [custom_meta]
1078
+ * @property {Object} [customer_details] - Customer details
1079
+ * @property {Object} [delivery_address]
1080
+ * @property {string} [device_id]
1081
+ * @property {string} [employee_code]
1082
+ * @property {Object} [extra_meta]
1083
+ * @property {Files[]} [files] - List of file url
1084
+ * @property {string} id
1085
+ * @property {string} [merchant_code]
1086
+ * @property {Object} [meta]
1087
+ * @property {string} order_type
1088
+ * @property {number} [ordering_store]
1089
+ * @property {boolean} [payment_auto_confirm]
1090
+ * @property {string} [payment_identifier]
1091
+ * @property {PaymentMethod[]} payment_methods
1092
+ * @property {string} [payment_mode]
1093
+ * @property {Object} [payment_params]
1094
+ * @property {number} [pick_at_store_uid]
1095
+ * @property {boolean} [pos]
1096
+ * @property {StaffCheckout} [staff]
1097
+ * @property {string} user_id
1098
+ */
1099
+
1100
+ /**
1101
+ * @typedef PlatformCartMetaRequest
1102
+ * @property {string} [checkout_mode]
1103
+ * @property {string} [comment]
1104
+ * @property {Object} [gift_details]
1105
+ * @property {string} [gstin]
1106
+ * @property {string} [pan_no]
1107
+ * @property {Object} [pick_up_customer_details] - Customer contact details for
1108
+ * customer pickup at store
1109
+ * @property {string} [staff_user_id] - Staff user id
1110
+ */
1111
+
1112
+ /**
1113
+ * @typedef PlatformCartShipmentsResponse
1114
+ * @property {AppliedPromotion[]} [applied_promo_details]
1115
+ * @property {CartBreakup} [breakup_values]
1116
+ * @property {boolean} [buy_now]
1117
+ * @property {string} [checkout_mode]
1118
+ * @property {string} [comment]
1119
+ * @property {string} [coupon_text]
1120
+ * @property {CartCurrency} [currency]
1121
+ * @property {string} [delivery_charge_info]
1122
+ * @property {ShipmentPromise} [delivery_promise]
1123
+ * @property {boolean} [error]
1124
+ * @property {string} [gstin]
1125
+ * @property {string} [id]
1126
+ * @property {boolean} [is_valid]
1127
+ * @property {CartProductInfo[]} [items]
1128
+ * @property {string} [last_modified]
1129
+ * @property {string} [message]
1130
+ * @property {Object} [pan_config]
1131
+ * @property {string} [pan_no]
1132
+ * @property {PaymentSelectionLock} [payment_selection_lock]
1133
+ * @property {boolean} [restrict_checkout]
1134
+ * @property {PlatformShipmentResponse[]} [shipments]
1135
+ * @property {string} [staff_user_id]
1136
+ */
1137
+
1138
+ /**
1139
+ * @typedef PlatformGetAddressesResponse
1140
+ * @property {PlatformAddress[]} [address]
1141
+ */
1142
+
1143
+ /**
1144
+ * @typedef PlatformSelectCartAddressRequest
1145
+ * @property {string} [billing_address_id]
1146
+ * @property {string} [cart_id]
1147
+ * @property {string} [checkout_mode]
1148
+ * @property {string} [id]
1149
+ * @property {string} [user_id]
1150
+ */
1151
+
1152
+ /**
1153
+ * @typedef PlatformShipmentResponse
1154
+ * @property {ShipmentArticle[]} [articles]
1155
+ * @property {string} [box_type]
1156
+ * @property {string} [dp_id]
1157
+ * @property {Object} [dp_options]
1158
+ * @property {number} [fulfillment_id]
1159
+ * @property {string} [fulfillment_type]
1160
+ * @property {CartProductInfo[]} [items]
1161
+ * @property {string} [order_type]
1162
+ * @property {ShipmentPromise} [promise]
1163
+ * @property {string} [shipment_type]
1164
+ * @property {number} [shipments]
1165
+ */
1166
+
1167
+ /**
1168
+ * @typedef PlatformUpdateCartRequest
1169
+ * @property {UpdateProductCart[]} [items]
1170
+ * @property {string} operation
1171
+ * @property {string} [user_id]
1172
+ */
1173
+
1174
+ /**
1175
+ * @typedef PostOrder
1176
+ * @property {boolean} [cancellation_allowed]
1177
+ * @property {boolean} [return_allowed]
1178
+ */
1179
+
1180
+ /**
1181
+ * @typedef PostOrder1
1182
+ * @property {boolean} [cancellation_allowed]
1183
+ * @property {boolean} [return_allowed]
1184
+ */
1185
+
1186
+ /**
1187
+ * @typedef PriceAdjustment
1188
+ * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
1189
+ * allowed (default: False)
1190
+ * @property {string} [apply_expiry] - The date and time when the expiry should be applied
1191
+ * @property {Article[]} article_ids - The list of article object in the price adjustment
1192
+ * @property {boolean} article_level_distribution - Flag indicating whether the
1193
+ * distribution should is done at the article level
1194
+ * @property {string} cart_id - The ID of the cart
1195
+ * @property {Collection} collection
1196
+ * @property {string} [id]
1197
+ * @property {boolean} is_authenticated - Flag indicating whether the user is
1198
+ * authenticated
1199
+ * @property {string} message - The message associated with the price adjustment
1200
+ * @property {Object} [meta]
1201
+ * @property {string} type - Type of price adjusment
1202
+ * @property {number} value
1203
+ */
1204
+
1205
+ /**
1206
+ * @typedef PriceAdjustmentAdd
1207
+ * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
1208
+ * allowed (default: False)
1209
+ * @property {string} [apply_expiry] - The date and time when the expiry should be applied
1210
+ * @property {Article[]} article_ids - The list of article object in the price adjustment
1211
+ * @property {boolean} article_level_distribution - Flag indicating whether the
1212
+ * distribution should is done at the article level
1213
+ * @property {string} cart_id - The ID of the cart
1214
+ * @property {Collection} collection
1215
+ * @property {string} [created_by] - The entity that created the field
1216
+ * @property {boolean} is_authenticated - Flag indicating whether the user is
1217
+ * authenticated
1218
+ * @property {string} message - The message associated with the price adjustment
1219
+ * @property {Object} [meta]
1220
+ * @property {string} type - Type of price adjusment
1221
+ * @property {number} value
1222
+ */
1223
+
1224
+ /**
1225
+ * @typedef PriceAdjustmentResponse
1226
+ * @property {PriceAdjustment} [data]
1227
+ */
1228
+
1229
+ /**
1230
+ * @typedef PriceAdjustmentUpdate
1231
+ * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
1232
+ * allowed (default: False)
1233
+ * @property {string} [apply_expiry] - The date and time when the expiry should be applied
1234
+ * @property {Article[]} article_ids - The list of article object in the price adjustment
1235
+ * @property {boolean} article_level_distribution - Flag indicating whether the
1236
+ * distribution should is done at the article level
1237
+ * @property {string} cart_id - The ID of the cart
1238
+ * @property {Collection} collection
1239
+ * @property {boolean} is_authenticated - Flag indicating whether the user is
1240
+ * authenticated
1241
+ * @property {string} message - The message associated with the price adjustment
1242
+ * @property {Object} [meta]
1243
+ * @property {string} [modified_by] - The entity that modified the field
1244
+ * @property {string} type - Type of price adjusment
1245
+ * @property {number} value
1246
+ */
1247
+
1248
+ /**
1249
+ * @typedef PriceRange
1250
+ * @property {number} [max]
1251
+ * @property {number} [min]
1252
+ */
1253
+
1254
+ /**
1255
+ * @typedef ProductAction
1256
+ * @property {ActionQuery} [query]
1257
+ * @property {string} [type]
1258
+ * @property {string} [url]
1259
+ */
1260
+
1261
+ /**
1262
+ * @typedef ProductArticle
1263
+ * @property {Object} [_custom_json]
1264
+ * @property {Object} [cart_item_meta]
1265
+ * @property {Object} [extra_meta]
1266
+ * @property {Object} [gift_card]
1267
+ * @property {Object} [identifier]
1268
+ * @property {boolean} [is_gift_visible]
1269
+ * @property {Object} [meta]
1270
+ * @property {number} [mto_quantity]
1271
+ * @property {Object} [parent_item_identifiers]
1272
+ * @property {ArticlePriceInfo} [price]
1273
+ * @property {string[]} [product_group_tags]
1274
+ * @property {number} [quantity]
1275
+ * @property {BaseInfo} [seller]
1276
+ * @property {string} [seller_identifier]
1277
+ * @property {string} [size]
1278
+ * @property {StoreInfo} [store]
1279
+ * @property {string} [type]
1280
+ * @property {string} [uid]
1281
+ */
1282
+
1283
+ /**
1284
+ * @typedef ProductAvailability
1285
+ * @property {ProductAvailabilitySize[]} [available_sizes]
1286
+ * @property {boolean} [deliverable]
1287
+ * @property {boolean} [is_valid]
1288
+ * @property {number} [other_store_quantity]
1289
+ * @property {boolean} [out_of_stock]
1290
+ * @property {string[]} [sizes]
1291
+ */
1292
+
1293
+ /**
1294
+ * @typedef ProductAvailabilitySize
1295
+ * @property {string} [display]
1296
+ * @property {boolean} [is_available]
1297
+ * @property {string} [value]
1298
+ */
1299
+
1300
+ /**
1301
+ * @typedef ProductImage
1302
+ * @property {string} [aspect_ratio]
1303
+ * @property {string} [secure_url]
1304
+ * @property {string} [url]
1305
+ */
1306
+
1307
+ /**
1308
+ * @typedef ProductPrice
1309
+ * @property {number} [add_on]
1310
+ * @property {string} [currency_code]
1311
+ * @property {string} [currency_symbol]
1312
+ * @property {number} [effective]
1313
+ * @property {number} [marked]
1314
+ * @property {number} [selling]
1315
+ */
1316
+
1317
+ /**
1318
+ * @typedef ProductPriceInfo
1319
+ * @property {ProductPrice} [base]
1320
+ * @property {ProductPrice} [converted]
1321
+ */
1322
+
1323
+ /**
1324
+ * @typedef PromiseFormatted
1325
+ * @property {string} [max]
1326
+ * @property {string} [min]
1327
+ */
1328
+
1329
+ /**
1330
+ * @typedef PromiseTimestamp
1331
+ * @property {number} [max]
1332
+ * @property {number} [min]
1333
+ */
1334
+
1335
+ /**
1336
+ * @typedef PromoMeta
1337
+ * @property {string} [message]
1338
+ */
1339
+
1340
+ /**
1341
+ * @typedef PromotionAction
1342
+ * @property {string} action_date
1343
+ * @property {string} action_type
1344
+ */
1345
+
1346
+ /**
1347
+ * @typedef PromotionAdd
1348
+ * @property {Object} [_custom_json]
1349
+ * @property {PromotionSchedule} [_schedule]
1350
+ * @property {string} application_id
1351
+ * @property {boolean} [apply_all_discount]
1352
+ * @property {string} [apply_exclusive]
1353
+ * @property {number} [apply_priority]
1354
+ * @property {PromotionAuthor} [author]
1355
+ * @property {Object} buy_rules
1356
+ * @property {string} [calculate_on] - Only available for Contract pricing and
1357
+ * Ladder pricing promotion type
1358
+ * @property {string} [code]
1359
+ * @property {string} [currency]
1360
+ * @property {PromotionDateMeta} [date_meta]
1361
+ * @property {DiscountRule[]} discount_rules
1362
+ * @property {DisplayMeta1} display_meta
1363
+ * @property {string} mode
1364
+ * @property {Ownership1} ownership
1365
+ * @property {PromotionAction} [post_order_action]
1366
+ * @property {string} promo_group
1367
+ * @property {string} promotion_type
1368
+ * @property {Restrictions1} [restrictions]
1369
+ * @property {boolean} [stackable]
1370
+ * @property {Visibility} [visiblility]
1371
+ */
1372
+
1373
+ /**
1374
+ * @typedef PromotionAuthor
1375
+ * @property {string} [created_by]
1376
+ * @property {string} [modified_by]
1377
+ */
1378
+
1379
+ /**
1380
+ * @typedef PromotionDateMeta
1381
+ * @property {string} [created_on]
1382
+ * @property {string} [modified_on]
1383
+ */
1384
+
1385
+ /**
1386
+ * @typedef PromotionListItem
1387
+ * @property {Object} [_custom_json] - Custom data stored in promotion
1388
+ * @property {string} [_id] - Promotion id
1389
+ * @property {PromotionSchedule} [_schedule]
1390
+ * @property {string} application_id - App id in which promotion will be used
1391
+ * @property {boolean} [apply_all_discount] - Prevents more than one promotion discounts
1392
+ * @property {string} [apply_exclusive] - Doesn't allow other promotion after
1393
+ * current promotion applied on cart or article
1394
+ * @property {number} [apply_priority] - Priority based on which promotion are
1395
+ * applied on articles
1396
+ * @property {PromotionAuthor} [author]
1397
+ * @property {Object} buy_rules - Buy rules for the promotion
1398
+ * @property {string} [calculate_on] - Only available for Contract pricing and
1399
+ * Ladder pricing promotion type
1400
+ * @property {string} [code] - Promotion code
1401
+ * @property {string} [currency] - Currency used for promotion
1402
+ * @property {PromotionDateMeta} [date_meta]
1403
+ * @property {DiscountRule[]} discount_rules - Discount rules based on which
1404
+ * promotion will be applied
1405
+ * @property {DisplayMeta1} display_meta
1406
+ * @property {string} mode - Promotion mode
1407
+ * @property {Ownership1} ownership
1408
+ * @property {PromotionAction} [post_order_action]
1409
+ * @property {string} promo_group - Group into which promotion fall
1410
+ * @property {string} promotion_type - Type of the promotion
1411
+ * @property {Restrictions1} [restrictions]
1412
+ * @property {boolean} [stackable] - Allows more than one promotion to get
1413
+ * combined benefits
1414
+ * @property {Visibility} [visiblility]
1415
+ */
1416
+
1417
+ /**
1418
+ * @typedef PromotionPartialUpdate
1419
+ * @property {boolean} [archive] - Send true to unpublish promotion
1420
+ * @property {PromotionSchedule} [schedule]
1421
+ */
1422
+
1423
+ /**
1424
+ * @typedef PromotionPaymentModes
1425
+ * @property {string[]} [codes]
1426
+ * @property {string} type
1427
+ * @property {PaymentAllowValue1} [uses]
1428
+ */
1429
+
1430
+ /**
1431
+ * @typedef PromotionSchedule
1432
+ * @property {string} [cron]
1433
+ * @property {number} [duration]
1434
+ * @property {string} end
1435
+ * @property {Object[]} [next_schedule]
1436
+ * @property {boolean} published
1437
+ * @property {string} start
1438
+ */
1439
+
1440
+ /**
1441
+ * @typedef PromotionsResponse
1442
+ * @property {PromotionListItem[]} [items]
1443
+ * @property {Page} [page]
1444
+ */
1445
+
1446
+ /**
1447
+ * @typedef PromotionUpdate
1448
+ * @property {Object} [_custom_json]
1449
+ * @property {PromotionSchedule} [_schedule]
1450
+ * @property {string} application_id
1451
+ * @property {boolean} [apply_all_discount]
1452
+ * @property {string} [apply_exclusive]
1453
+ * @property {number} [apply_priority]
1454
+ * @property {PromotionAuthor} [author]
1455
+ * @property {Object} buy_rules
1456
+ * @property {string} [calculate_on] - Only available for Contract pricing and
1457
+ * Ladder pricing promotion type
1458
+ * @property {string} [code]
1459
+ * @property {string} [currency]
1460
+ * @property {PromotionDateMeta} [date_meta]
1461
+ * @property {DiscountRule[]} discount_rules
1462
+ * @property {DisplayMeta1} display_meta
1463
+ * @property {string} mode
1464
+ * @property {Ownership1} ownership
1465
+ * @property {PromotionAction} [post_order_action]
1466
+ * @property {string} promo_group
1467
+ * @property {string} promotion_type
1468
+ * @property {Restrictions1} [restrictions]
1469
+ * @property {boolean} [stackable]
1470
+ * @property {Visibility} [visiblility]
1471
+ */
1472
+
1473
+ /**
1474
+ * @typedef RawBreakup
1475
+ * @property {number} [cod_charge]
1476
+ * @property {number} [convenience_fee]
1477
+ * @property {number} [coupon]
1478
+ * @property {number} [delivery_charge]
1479
+ * @property {number} [discount]
1480
+ * @property {number} [fynd_cash]
1481
+ * @property {number} [gift_card]
1482
+ * @property {number} [gst_charges]
1483
+ * @property {number} [mrp_total]
1484
+ * @property {number} [subtotal]
1485
+ * @property {number} [total]
1486
+ * @property {number} [vog]
1487
+ * @property {number} [you_saved]
1488
+ */
1489
+
1490
+ /**
1491
+ * @typedef Restrictions
1492
+ * @property {BulkBundleRestriction} [bulk_bundle]
1493
+ * @property {boolean} [coupon_allowed]
1494
+ * @property {number[]} [ordering_stores]
1495
+ * @property {Object} [payments]
1496
+ * @property {string[]} [platforms]
1497
+ * @property {PostOrder} [post_order]
1498
+ * @property {PriceRange} [price_range]
1499
+ * @property {number[]} [user_groups]
1500
+ * @property {string} [user_type]
1501
+ * @property {UsesRestriction} [uses]
1502
+ */
1503
+
1504
+ /**
1505
+ * @typedef Restrictions1
1506
+ * @property {boolean} [anonymous_users]
1507
+ * @property {number} [order_quantity]
1508
+ * @property {number[]} [ordering_stores]
1509
+ * @property {PromotionPaymentModes[]} [payments]
1510
+ * @property {string[]} [platforms]
1511
+ * @property {PostOrder1} [post_order]
1512
+ * @property {number[]} [user_groups]
1513
+ * @property {string[]} [user_id]
1514
+ * @property {Object} [user_registered]
1515
+ * @property {UsesRestriction1} uses
1516
+ */
1517
+
1518
+ /**
1519
+ * @typedef Rule
1520
+ * @property {number} [discount_qty]
1521
+ * @property {number} [key]
1522
+ * @property {number} [max]
1523
+ * @property {number} [min]
1524
+ * @property {number} [value]
1525
+ */
1526
+
1527
+ /**
1528
+ * @typedef RuleDefinition
1529
+ * @property {string} applicable_on
1530
+ * @property {boolean} [auto_apply]
1531
+ * @property {string} calculate_on
1532
+ * @property {string} [currency_code]
1533
+ * @property {boolean} [is_exact]
1534
+ * @property {string[]} [scope]
1535
+ * @property {string} type
1536
+ * @property {string} value_type
1537
+ */
1538
+
1539
+ /**
1540
+ * @typedef SaveAddressResponse
1541
+ * @property {string} [id]
1542
+ * @property {boolean} [is_default_address]
1543
+ * @property {boolean} [success]
1544
+ */
1545
+
1546
+ /**
1547
+ * @typedef SharedCart
1548
+ * @property {CartBreakup} [breakup_values]
1549
+ * @property {boolean} [buy_now]
1550
+ * @property {number} [cart_id]
1551
+ * @property {string} [checkout_mode]
1552
+ * @property {string} [comment]
1553
+ * @property {string} [coupon_text]
1554
+ * @property {CartCurrency} [currency]
1555
+ * @property {string} [delivery_charge_info]
1556
+ * @property {ShipmentPromise} [delivery_promise]
1557
+ * @property {string} [gstin]
1558
+ * @property {string} [id]
1559
+ * @property {boolean} [is_valid]
1560
+ * @property {CartProductInfo[]} [items]
1561
+ * @property {string} [last_modified]
1562
+ * @property {string} [message]
1563
+ * @property {PaymentSelectionLock} [payment_selection_lock]
1564
+ * @property {boolean} [restrict_checkout]
1565
+ * @property {SharedCartDetails} [shared_cart_details]
1566
+ * @property {string} [uid]
1567
+ */
1568
+
1569
+ /**
1570
+ * @typedef SharedCartDetails
1571
+ * @property {string} [created_on]
1572
+ * @property {Object} [meta] - Meta data sent while generating share cart link
1573
+ * @property {Object} [source] - Share link device and other source information
1574
+ * @property {string} [token] - Short link id
1575
+ * @property {Object} [user] - User details of who generated share link
1576
+ */
1577
+
1578
+ /**
1579
+ * @typedef SharedCartResponse
1580
+ * @property {SharedCart} [cart]
1581
+ * @property {string} [error]
1582
+ */
1583
+
1584
+ /**
1585
+ * @typedef ShipmentArticle
1586
+ * @property {string} [article_id]
1587
+ * @property {string} [meta]
1588
+ * @property {string} [quantity]
1589
+ */
1590
+
1591
+ /**
1592
+ * @typedef ShipmentPromise
1593
+ * @property {PromiseFormatted} [formatted]
1594
+ * @property {PromiseTimestamp} [timestamp]
1595
+ */
1596
+
1597
+ /**
1598
+ * @typedef ShippingAddress
1599
+ * @property {string} [address]
1600
+ * @property {string} [address_type]
1601
+ * @property {string} [area]
1602
+ * @property {string} area_code
1603
+ * @property {string} [area_code_slug]
1604
+ * @property {string} [city]
1605
+ * @property {string} [country]
1606
+ * @property {string} [country_code]
1607
+ * @property {string} [country_iso_code]
1608
+ * @property {string} [country_phone_code]
1609
+ * @property {string} [email]
1610
+ * @property {string} [landmark]
1611
+ * @property {Object} [meta]
1612
+ * @property {string} [name]
1613
+ * @property {number} [phone]
1614
+ * @property {number} [pincode]
1615
+ * @property {string} [state]
1616
+ */
1617
+
1618
+ /**
1619
+ * @typedef StaffCheckout
1620
+ * @property {string} _id
1621
+ * @property {string} [employee_code]
1622
+ * @property {string} first_name
1623
+ * @property {string} last_name
1624
+ * @property {string} user
1625
+ */
1626
+
1627
+ /**
1628
+ * @typedef State
1629
+ * @property {boolean} [is_archived]
1630
+ * @property {boolean} [is_display]
1631
+ * @property {boolean} [is_public]
1632
+ */
1633
+
1634
+ /**
1635
+ * @typedef StoreDetailsResponse
1636
+ * @property {PickupStoreDetail[]} [items]
1637
+ */
1638
+
1639
+ /**
1640
+ * @typedef StoreInfo
1641
+ * @property {string} [name]
1642
+ * @property {string} [store_code]
1643
+ * @property {number} [uid]
1644
+ */
1645
+
1646
+ /**
1647
+ * @typedef SuccessMessage
1648
+ * @property {string} [message]
1649
+ * @property {boolean} [success]
1650
+ */
1651
+
1652
+ /**
1653
+ * @typedef Tags
1654
+ * @property {Object} [tags]
1655
+ */
1656
+
1657
+ /**
1658
+ * @typedef UpdateAddressResponse
1659
+ * @property {string} [id]
1660
+ * @property {boolean} [is_default_address]
1661
+ * @property {boolean} [is_updated]
1662
+ * @property {boolean} [success]
1663
+ */
1664
+
1665
+ /**
1666
+ * @typedef UpdateCartDetailResponse
1667
+ * @property {CartDetailResponse} [cart]
1668
+ * @property {string} [message]
1669
+ * @property {boolean} [success] - True if all items are added successfully.
1670
+ * False if partially added or not added.
1671
+ */
1672
+
1673
+ /**
1674
+ * @typedef UpdateCartPaymentRequest
1675
+ * @property {string} [address_id]
1676
+ * @property {string} [aggregator_name]
1677
+ * @property {string} [id]
1678
+ * @property {string} [merchant_code]
1679
+ * @property {string} [payment_identifier]
1680
+ * @property {string} [payment_mode]
1681
+ */
1682
+
1683
+ /**
1684
+ * @typedef UpdateCartPaymentRequestV2
1685
+ * @property {string} [address_id]
1686
+ * @property {string} [aggregator_name]
1687
+ * @property {string} [id]
1688
+ * @property {string} [merchant_code]
1689
+ * @property {string} [payment_identifier]
1690
+ * @property {PaymentMethod[]} [payment_methods]
1691
+ * @property {string} [payment_mode]
1692
+ */
1693
+
1694
+ /**
1695
+ * @typedef UpdateCartRequest
1696
+ * @property {UpdateProductCart[]} [items]
1697
+ * @property {string} operation
1698
+ */
1699
+
1700
+ /**
1701
+ * @typedef UpdateCartShipmentItem
1702
+ * @property {string} article_uid - Article mongo id
1703
+ * @property {number} [quantity] - Quantity of product in shipment
1704
+ * @property {string} shipment_type - Shipment delivery type
1705
+ */
1706
+
1707
+ /**
1708
+ * @typedef UpdateCartShipmentRequest
1709
+ * @property {UpdateCartShipmentItem[]} shipments
1710
+ */
1711
+
1712
+ /**
1713
+ * @typedef UpdateProductCart
1714
+ * @property {Object} [_custom_json]
1715
+ * @property {string} [article_id]
1716
+ * @property {Object} [extra_meta]
1717
+ * @property {CartProductIdentifer} identifiers
1718
+ * @property {number} [item_id]
1719
+ * @property {number} [item_index]
1720
+ * @property {string} [item_size]
1721
+ * @property {Object} [meta]
1722
+ * @property {Object} [parent_item_identifiers]
1723
+ * @property {number} [quantity]
1724
+ */
1725
+
1726
+ /**
1727
+ * @typedef UpdateUserCartMapping
1728
+ * @property {string} user_id
1729
+ */
1730
+
1731
+ /**
1732
+ * @typedef UserCartMappingResponse
1733
+ * @property {AppliedPromotion[]} [applied_promo_details]
1734
+ * @property {CartBreakup} [breakup_values]
1735
+ * @property {boolean} [buy_now]
1736
+ * @property {string} [checkout_mode]
1737
+ * @property {string} [comment]
1738
+ * @property {string} [coupon_text]
1739
+ * @property {CartCurrency} [currency]
1740
+ * @property {string} [delivery_charge_info]
1741
+ * @property {ShipmentPromise} [delivery_promise]
1742
+ * @property {string} [gstin]
1743
+ * @property {string} [id]
1744
+ * @property {boolean} [is_valid]
1745
+ * @property {CartProductInfo[]} [items]
1746
+ * @property {string} [last_modified]
1747
+ * @property {string} [message]
1748
+ * @property {Object} [pan_config]
1749
+ * @property {string} [pan_no]
1750
+ * @property {PaymentSelectionLock} [payment_selection_lock]
1751
+ * @property {boolean} [restrict_checkout]
1752
+ * @property {UserInfo} [user]
1753
+ */
1754
+
1755
+ /**
1756
+ * @typedef UserInfo
1757
+ * @property {string} [_id]
1758
+ * @property {string} [created_at]
1759
+ * @property {string} [external_id]
1760
+ * @property {string} [first_name]
1761
+ * @property {string} [gender]
1762
+ * @property {string} [last_name]
1763
+ * @property {string} [mobile]
1764
+ * @property {string} [modified_on]
1765
+ * @property {string} [uid]
1766
+ */
1767
+
1768
+ /**
1769
+ * @typedef UserRegistered
1770
+ * @property {string} [end]
1771
+ * @property {string} [start]
1772
+ */
1773
+
1774
+ /**
1775
+ * @typedef UsesRemaining
1776
+ * @property {number} [app]
1777
+ * @property {number} [total]
1778
+ * @property {number} [user]
1779
+ */
1780
+
1781
+ /**
1782
+ * @typedef UsesRemaining1
1783
+ * @property {number} [total]
1784
+ * @property {number} [user]
1785
+ */
1786
+
1787
+ /**
1788
+ * @typedef UsesRestriction
1789
+ * @property {UsesRemaining} [maximum]
1790
+ * @property {UsesRemaining} [remaining]
1791
+ */
1792
+
1793
+ /**
1794
+ * @typedef UsesRestriction1
1795
+ * @property {UsesRemaining1} [maximum]
1796
+ * @property {UsesRemaining1} [remaining]
1797
+ */
1798
+
1799
+ /**
1800
+ * @typedef Validation
1801
+ * @property {boolean} [anonymous]
1802
+ * @property {string[]} [app_id]
1803
+ * @property {string} [user_registered_after]
1804
+ */
1805
+
1806
+ /**
1807
+ * @typedef Validity
1808
+ * @property {number} [priority]
1809
+ */
1810
+
1811
+ /**
1812
+ * @typedef Visibility
1813
+ * @property {boolean} coupon_list
1814
+ * @property {boolean} pdp
1815
+ */
1816
+
1817
+ class CartPlatformModel {
1818
+ /** @returns {AbandonedCart} */
4
1819
  static AbandonedCart() {
5
1820
  return Joi.object({
6
1821
  _id: Joi.string().allow("").required(),
@@ -38,20 +1853,26 @@ class CartModel {
38
1853
  user_id: Joi.string().allow("").required(),
39
1854
  });
40
1855
  }
1856
+
1857
+ /** @returns {AbandonedCartResponse} */
41
1858
  static AbandonedCartResponse() {
42
1859
  return Joi.object({
43
- items: Joi.array().items(CartModel.AbandonedCart()),
1860
+ items: Joi.array().items(CartPlatformModel.AbandonedCart()),
44
1861
  message: Joi.string().allow(""),
45
- page: CartModel.Page(),
1862
+ page: CartPlatformModel.Page(),
46
1863
  result: Joi.any(),
47
1864
  success: Joi.boolean(),
48
1865
  });
49
1866
  }
1867
+
1868
+ /** @returns {ActionQuery} */
50
1869
  static ActionQuery() {
51
1870
  return Joi.object({
52
1871
  product_slug: Joi.array().items(Joi.string().allow("")),
53
1872
  });
54
1873
  }
1874
+
1875
+ /** @returns {ActivePromosResponse} */
55
1876
  static ActivePromosResponse() {
56
1877
  return Joi.object({
57
1878
  created_on: Joi.string().allow(""),
@@ -66,20 +1887,26 @@ class CartModel {
66
1887
  type: Joi.string().allow(""),
67
1888
  });
68
1889
  }
1890
+
1891
+ /** @returns {AddCartDetailResponse} */
69
1892
  static AddCartDetailResponse() {
70
1893
  return Joi.object({
71
- cart: CartModel.CartDetailResponse(),
1894
+ cart: CartPlatformModel.CartDetailResponse(),
72
1895
  message: Joi.string().allow(""),
73
1896
  partial: Joi.boolean(),
74
1897
  success: Joi.boolean(),
75
1898
  });
76
1899
  }
1900
+
1901
+ /** @returns {AddCartRequest} */
77
1902
  static AddCartRequest() {
78
1903
  return Joi.object({
79
- items: Joi.array().items(CartModel.AddProductCart()),
1904
+ items: Joi.array().items(CartPlatformModel.AddProductCart()),
80
1905
  new_cart: Joi.boolean(),
81
1906
  });
82
1907
  }
1908
+
1909
+ /** @returns {AddProductCart} */
83
1910
  static AddProductCart() {
84
1911
  return Joi.object({
85
1912
  _custom_json: Joi.any(),
@@ -100,56 +1927,73 @@ class CartModel {
100
1927
  store_id: Joi.number(),
101
1928
  });
102
1929
  }
1930
+
1931
+ /** @returns {AppliedFreeArticles} */
103
1932
  static AppliedFreeArticles() {
104
1933
  return Joi.object({
105
1934
  article_id: Joi.string().allow(""),
106
- free_gift_item_details: CartModel.FreeGiftItem(),
1935
+ free_gift_item_details: CartPlatformModel.FreeGiftItem(),
107
1936
  parent_item_identifier: Joi.string().allow(""),
108
1937
  quantity: Joi.number(),
109
1938
  });
110
1939
  }
1940
+
1941
+ /** @returns {AppliedPromotion} */
111
1942
  static AppliedPromotion() {
112
1943
  return Joi.object({
113
1944
  amount: Joi.number(),
114
- applied_free_articles: Joi.array().items(CartModel.AppliedFreeArticles()),
1945
+ applied_free_articles: Joi.array().items(
1946
+ CartPlatformModel.AppliedFreeArticles()
1947
+ ),
115
1948
  article_quantity: Joi.number(),
116
- buy_rules: Joi.array().items(CartModel.BuyRules()),
117
- discount_rules: Joi.array().items(CartModel.DiscountRulesApp()),
1949
+ buy_rules: Joi.array().items(CartPlatformModel.BuyRules()),
1950
+ discount_rules: Joi.array().items(CartPlatformModel.DiscountRulesApp()),
118
1951
  mrp_promotion: Joi.boolean(),
119
1952
  offer_text: Joi.string().allow(""),
120
- ownership: CartModel.Ownership2(),
1953
+ ownership: CartPlatformModel.Ownership2(),
121
1954
  promo_id: Joi.string().allow(""),
122
1955
  promotion_group: Joi.string().allow(""),
123
1956
  promotion_name: Joi.string().allow(""),
124
1957
  promotion_type: Joi.string().allow(""),
125
1958
  });
126
1959
  }
1960
+
1961
+ /** @returns {ApplyCouponRequest} */
127
1962
  static ApplyCouponRequest() {
128
1963
  return Joi.object({
129
1964
  coupon_code: Joi.string().allow("").required(),
130
1965
  });
131
1966
  }
1967
+
1968
+ /** @returns {Article} */
132
1969
  static Article() {
133
1970
  return Joi.object({
134
1971
  article_id: Joi.string().allow("").required(),
135
1972
  code: Joi.string().allow(""),
136
1973
  meta: Joi.any(),
1974
+ quantity: Joi.number(),
137
1975
  type: Joi.string().allow(""),
138
1976
  value: Joi.number(),
139
1977
  });
140
1978
  }
1979
+
1980
+ /** @returns {ArticlePriceInfo} */
141
1981
  static ArticlePriceInfo() {
142
1982
  return Joi.object({
143
- base: CartModel.BasePrice(),
144
- converted: CartModel.BasePrice(),
1983
+ base: CartPlatformModel.BasePrice(),
1984
+ converted: CartPlatformModel.BasePrice(),
145
1985
  });
146
1986
  }
1987
+
1988
+ /** @returns {BaseInfo} */
147
1989
  static BaseInfo() {
148
1990
  return Joi.object({
149
1991
  name: Joi.string().allow(""),
150
1992
  uid: Joi.number(),
151
1993
  });
152
1994
  }
1995
+
1996
+ /** @returns {BasePrice} */
153
1997
  static BasePrice() {
154
1998
  return Joi.object({
155
1999
  currency_code: Joi.string().allow(""),
@@ -158,30 +2002,46 @@ class CartModel {
158
2002
  marked: Joi.number(),
159
2003
  });
160
2004
  }
2005
+
2006
+ /** @returns {BulkBundleRestriction} */
161
2007
  static BulkBundleRestriction() {
162
2008
  return Joi.object({
163
2009
  multi_store_allowed: Joi.boolean().required(),
164
2010
  });
165
2011
  }
2012
+
2013
+ /** @returns {BuyRules} */
166
2014
  static BuyRules() {
167
2015
  return Joi.object({
168
2016
  cart_conditions: Joi.any(),
169
2017
  item_criteria: Joi.any(),
170
2018
  });
171
2019
  }
2020
+
2021
+ /** @returns {CartBreakup} */
172
2022
  static CartBreakup() {
173
2023
  return Joi.object({
174
- coupon: CartModel.CouponBreakup(),
175
- display: Joi.array().items(CartModel.DisplayBreakup()),
176
- loyalty_points: CartModel.LoyaltyPoints(),
177
- raw: CartModel.RawBreakup(),
2024
+ coupon: CartPlatformModel.CouponBreakup(),
2025
+ display: Joi.array().items(CartPlatformModel.DisplayBreakup()),
2026
+ loyalty_points: CartPlatformModel.LoyaltyPoints(),
2027
+ raw: CartPlatformModel.RawBreakup(),
2028
+ });
2029
+ }
2030
+
2031
+ /** @returns {CartCheckoutCustomMeta} */
2032
+ static CartCheckoutCustomMeta() {
2033
+ return Joi.object({
2034
+ key: Joi.string().allow("").required(),
2035
+ value: Joi.string().allow("").required(),
178
2036
  });
179
2037
  }
2038
+
2039
+ /** @returns {CartCheckoutResponse} */
180
2040
  static CartCheckoutResponse() {
181
2041
  return Joi.object({
182
2042
  app_intercept_url: Joi.string().allow(""),
183
2043
  callback_url: Joi.string().allow(""),
184
- cart: CartModel.CheckCart(),
2044
+ cart: CartPlatformModel.CheckCart(),
185
2045
  data: Joi.any(),
186
2046
  message: Joi.string().allow(""),
187
2047
  order_id: Joi.string().allow(""),
@@ -189,41 +2049,51 @@ class CartModel {
189
2049
  success: Joi.boolean(),
190
2050
  });
191
2051
  }
2052
+
2053
+ /** @returns {CartCurrency} */
192
2054
  static CartCurrency() {
193
2055
  return Joi.object({
194
2056
  code: Joi.string().allow(""),
195
2057
  symbol: Joi.string().allow(""),
196
2058
  });
197
2059
  }
2060
+
2061
+ /** @returns {CartDeliveryModesResponse} */
198
2062
  static CartDeliveryModesResponse() {
199
2063
  return Joi.object({
200
2064
  available_modes: Joi.array().items(Joi.string().allow("")),
201
2065
  pickup_stores: Joi.array().items(Joi.number()),
202
2066
  });
203
2067
  }
2068
+
2069
+ /** @returns {CartDetailResponse} */
204
2070
  static CartDetailResponse() {
205
2071
  return Joi.object({
206
- applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
207
- breakup_values: CartModel.CartBreakup(),
2072
+ applied_promo_details: Joi.array().items(
2073
+ CartPlatformModel.AppliedPromotion()
2074
+ ),
2075
+ breakup_values: CartPlatformModel.CartBreakup(),
208
2076
  buy_now: Joi.boolean(),
209
2077
  checkout_mode: Joi.string().allow(""),
210
2078
  comment: Joi.string().allow(""),
211
2079
  coupon_text: Joi.string().allow(""),
212
- currency: CartModel.CartCurrency(),
2080
+ currency: CartPlatformModel.CartCurrency(),
213
2081
  delivery_charge_info: Joi.string().allow(""),
214
- delivery_promise: CartModel.ShipmentPromise(),
2082
+ delivery_promise: CartPlatformModel.ShipmentPromise(),
215
2083
  gstin: Joi.string().allow(""),
216
2084
  id: Joi.string().allow(""),
217
2085
  is_valid: Joi.boolean(),
218
- items: Joi.array().items(CartModel.CartProductInfo()),
2086
+ items: Joi.array().items(CartPlatformModel.CartProductInfo()),
219
2087
  last_modified: Joi.string().allow(""),
220
2088
  message: Joi.string().allow(""),
221
2089
  pan_config: Joi.any(),
222
2090
  pan_no: Joi.string().allow(""),
223
- payment_selection_lock: CartModel.PaymentSelectionLock(),
2091
+ payment_selection_lock: CartPlatformModel.PaymentSelectionLock(),
224
2092
  restrict_checkout: Joi.boolean(),
225
2093
  });
226
2094
  }
2095
+
2096
+ /** @returns {CartItem} */
227
2097
  static CartItem() {
228
2098
  return Joi.object({
229
2099
  product_id: Joi.string().allow("").required(),
@@ -231,17 +2101,23 @@ class CartModel {
231
2101
  size: Joi.string().allow("").required(),
232
2102
  });
233
2103
  }
2104
+
2105
+ /** @returns {CartItemCountResponse} */
234
2106
  static CartItemCountResponse() {
235
2107
  return Joi.object({
236
2108
  user_cart_items_count: Joi.number(),
237
2109
  });
238
2110
  }
2111
+
2112
+ /** @returns {CartItemMeta} */
239
2113
  static CartItemMeta() {
240
2114
  return Joi.object({
241
2115
  group_id: Joi.string().allow(""),
242
2116
  primary_item: Joi.boolean(),
243
2117
  });
244
2118
  }
2119
+
2120
+ /** @returns {CartList} */
245
2121
  static CartList() {
246
2122
  return Joi.object({
247
2123
  cart_id: Joi.string().allow(""),
@@ -252,10 +2128,12 @@ class CartModel {
252
2128
  user_id: Joi.string().allow(""),
253
2129
  });
254
2130
  }
2131
+
2132
+ /** @returns {CartMetaConfigAdd} */
255
2133
  static CartMetaConfigAdd() {
256
2134
  return Joi.object({
257
2135
  bulk_coupons: Joi.boolean(),
258
- delivery_charges: CartModel.DeliveryCharges(),
2136
+ delivery_charges: CartPlatformModel.DeliveryCharges(),
259
2137
  enabled: Joi.boolean(),
260
2138
  gift_display_text: Joi.string().allow(""),
261
2139
  gift_pricing: Joi.number(),
@@ -264,10 +2142,12 @@ class CartModel {
264
2142
  revenue_engine_coupon: Joi.boolean(),
265
2143
  });
266
2144
  }
2145
+
2146
+ /** @returns {CartMetaConfigUpdate} */
267
2147
  static CartMetaConfigUpdate() {
268
2148
  return Joi.object({
269
2149
  bulk_coupons: Joi.boolean(),
270
- delivery_charges: CartModel.DeliveryCharges(),
2150
+ delivery_charges: CartPlatformModel.DeliveryCharges(),
271
2151
  enabled: Joi.boolean(),
272
2152
  gift_display_text: Joi.string().allow(""),
273
2153
  gift_pricing: Joi.number(),
@@ -276,77 +2156,95 @@ class CartModel {
276
2156
  revenue_engine_coupon: Joi.boolean(),
277
2157
  });
278
2158
  }
2159
+
2160
+ /** @returns {CartMetaMissingResponse} */
279
2161
  static CartMetaMissingResponse() {
280
2162
  return Joi.object({
281
2163
  errors: Joi.array().items(Joi.string().allow("")),
282
2164
  });
283
2165
  }
2166
+
2167
+ /** @returns {CartMetaResponse} */
284
2168
  static CartMetaResponse() {
285
2169
  return Joi.object({
286
2170
  is_valid: Joi.boolean(),
287
2171
  message: Joi.string().allow(""),
288
2172
  });
289
2173
  }
2174
+
2175
+ /** @returns {CartProduct} */
290
2176
  static CartProduct() {
291
2177
  return Joi.object({
292
2178
  _custom_json: Joi.any(),
293
- action: CartModel.ProductAction(),
294
- brand: CartModel.BaseInfo(),
295
- categories: Joi.array().items(CartModel.CategoryInfo()),
296
- images: Joi.array().items(CartModel.ProductImage()),
2179
+ action: CartPlatformModel.ProductAction(),
2180
+ brand: CartPlatformModel.BaseInfo(),
2181
+ categories: Joi.array().items(CartPlatformModel.CategoryInfo()),
2182
+ images: Joi.array().items(CartPlatformModel.ProductImage()),
297
2183
  item_code: Joi.string().allow("").allow(null),
298
2184
  name: Joi.string().allow(""),
299
2185
  slug: Joi.string().allow(""),
300
2186
  tags: Joi.array().items(Joi.string().allow("")),
301
- teaser_tag: CartModel.Tags(),
2187
+ teaser_tag: CartPlatformModel.Tags(),
302
2188
  type: Joi.string().allow(""),
303
2189
  uid: Joi.number(),
304
2190
  });
305
2191
  }
2192
+
2193
+ /** @returns {CartProductIdentifer} */
306
2194
  static CartProductIdentifer() {
307
2195
  return Joi.object({
308
2196
  identifier: Joi.string().allow(""),
309
2197
  });
310
2198
  }
2199
+
2200
+ /** @returns {CartProductInfo} */
311
2201
  static CartProductInfo() {
312
2202
  return Joi.object({
313
- article: CartModel.ProductArticle(),
314
- availability: CartModel.ProductAvailability(),
2203
+ article: CartPlatformModel.ProductArticle(),
2204
+ availability: CartPlatformModel.ProductAvailability(),
315
2205
  bulk_offer: Joi.any(),
316
- coupon: CartModel.CouponDetails(),
2206
+ coupon: CartPlatformModel.CouponDetails(),
317
2207
  coupon_message: Joi.string().allow(""),
318
2208
  custom_order: Joi.any(),
319
- delivery_promise: CartModel.ShipmentPromise(),
2209
+ delivery_promise: CartPlatformModel.ShipmentPromise(),
320
2210
  discount: Joi.string().allow(""),
321
- identifiers: CartModel.CartProductIdentifer().required(),
2211
+ identifiers: CartPlatformModel.CartProductIdentifer().required(),
322
2212
  is_set: Joi.boolean(),
323
2213
  key: Joi.string().allow(""),
324
2214
  message: Joi.string().allow(""),
325
2215
  moq: Joi.any(),
326
2216
  parent_item_identifiers: Joi.any(),
327
- price: CartModel.ProductPriceInfo(),
328
- price_per_unit: CartModel.ProductPriceInfo(),
329
- product: CartModel.CartProduct(),
330
- promo_meta: CartModel.PromoMeta(),
331
- promotions_applied: Joi.array().items(CartModel.AppliedPromotion()),
2217
+ price: CartPlatformModel.ProductPriceInfo(),
2218
+ price_per_unit: CartPlatformModel.ProductPriceInfo(),
2219
+ product: CartPlatformModel.CartProduct(),
2220
+ promo_meta: CartPlatformModel.PromoMeta(),
2221
+ promotions_applied: Joi.array().items(
2222
+ CartPlatformModel.AppliedPromotion()
2223
+ ),
332
2224
  quantity: Joi.number(),
333
2225
  });
334
2226
  }
2227
+
2228
+ /** @returns {CategoryInfo} */
335
2229
  static CategoryInfo() {
336
2230
  return Joi.object({
337
2231
  name: Joi.string().allow(""),
338
2232
  uid: Joi.number(),
339
2233
  });
340
2234
  }
2235
+
2236
+ /** @returns {Charges} */
341
2237
  static Charges() {
342
2238
  return Joi.object({
343
2239
  charges: Joi.number(),
344
2240
  threshold: Joi.number(),
345
2241
  });
346
2242
  }
2243
+
2244
+ /** @returns {CheckCart} */
347
2245
  static CheckCart() {
348
2246
  return Joi.object({
349
- breakup_values: CartModel.CartBreakup(),
2247
+ breakup_values: CartPlatformModel.CartBreakup(),
350
2248
  buy_now: Joi.boolean(),
351
2249
  cart_id: Joi.number(),
352
2250
  checkout_mode: Joi.string().allow(""),
@@ -355,20 +2253,20 @@ class CartModel {
355
2253
  cod_message: Joi.string().allow(""),
356
2254
  comment: Joi.string().allow(""),
357
2255
  coupon_text: Joi.string().allow(""),
358
- currency: CartModel.CartCurrency(),
2256
+ currency: CartPlatformModel.CartCurrency(),
359
2257
  delivery_charge_info: Joi.string().allow(""),
360
2258
  delivery_charge_order_value: Joi.number(),
361
2259
  delivery_charges: Joi.number(),
362
- delivery_promise: CartModel.ShipmentPromise(),
2260
+ delivery_promise: CartPlatformModel.ShipmentPromise(),
363
2261
  error_message: Joi.string().allow(""),
364
2262
  gstin: Joi.string().allow(""),
365
2263
  id: Joi.string().allow(""),
366
2264
  is_valid: Joi.boolean(),
367
- items: Joi.array().items(CartModel.CartProductInfo()),
2265
+ items: Joi.array().items(CartPlatformModel.CartProductInfo()),
368
2266
  last_modified: Joi.string().allow(""),
369
2267
  message: Joi.string().allow(""),
370
2268
  order_id: Joi.string().allow(""),
371
- payment_selection_lock: CartModel.PaymentSelectionLock(),
2269
+ payment_selection_lock: CartPlatformModel.PaymentSelectionLock(),
372
2270
  restrict_checkout: Joi.boolean(),
373
2271
  store_code: Joi.string().allow(""),
374
2272
  store_emps: Joi.array().items(Joi.any()),
@@ -377,12 +2275,16 @@ class CartModel {
377
2275
  user_type: Joi.string().allow(""),
378
2276
  });
379
2277
  }
2278
+
2279
+ /** @returns {Collection} */
380
2280
  static Collection() {
381
2281
  return Joi.object({
382
2282
  collected_by: Joi.string().allow("").required(),
383
2283
  refund_by: Joi.string().allow("").required(),
384
2284
  });
385
2285
  }
2286
+
2287
+ /** @returns {CompareObject} */
386
2288
  static CompareObject() {
387
2289
  return Joi.object({
388
2290
  equals: Joi.number(),
@@ -392,6 +2294,8 @@ class CartModel {
392
2294
  less_than_equals: Joi.number(),
393
2295
  });
394
2296
  }
2297
+
2298
+ /** @returns {Coupon} */
395
2299
  static Coupon() {
396
2300
  return Joi.object({
397
2301
  coupon_code: Joi.string().allow(""),
@@ -408,38 +2312,46 @@ class CartModel {
408
2312
  title: Joi.string().allow(""),
409
2313
  });
410
2314
  }
2315
+
2316
+ /** @returns {CouponAction} */
411
2317
  static CouponAction() {
412
2318
  return Joi.object({
413
2319
  action_date: Joi.string().allow("").allow(null),
414
2320
  txn_mode: Joi.string().allow(""),
415
2321
  });
416
2322
  }
2323
+
2324
+ /** @returns {CouponAdd} */
417
2325
  static CouponAdd() {
418
2326
  return Joi.object({
419
- _schedule: CartModel.CouponSchedule(),
420
- action: CartModel.CouponAction(),
421
- author: CartModel.CouponAuthor(),
2327
+ _schedule: CartPlatformModel.CouponSchedule(),
2328
+ action: CartPlatformModel.CouponAction(),
2329
+ author: CartPlatformModel.CouponAuthor(),
422
2330
  code: Joi.string().allow("").required(),
423
- date_meta: CartModel.CouponDateMeta(),
424
- display_meta: CartModel.DisplayMeta().required(),
425
- identifiers: CartModel.Identifier().required(),
426
- ownership: CartModel.Ownership().required(),
427
- restrictions: CartModel.Restrictions(),
428
- rule: Joi.array().items(CartModel.Rule()).required(),
429
- rule_definition: CartModel.RuleDefinition().required(),
430
- state: CartModel.State(),
2331
+ date_meta: CartPlatformModel.CouponDateMeta(),
2332
+ display_meta: CartPlatformModel.DisplayMeta().required(),
2333
+ identifiers: CartPlatformModel.Identifier().required(),
2334
+ ownership: CartPlatformModel.Ownership().required(),
2335
+ restrictions: CartPlatformModel.Restrictions(),
2336
+ rule: Joi.array().items(CartPlatformModel.Rule()).required(),
2337
+ rule_definition: CartPlatformModel.RuleDefinition().required(),
2338
+ state: CartPlatformModel.State(),
431
2339
  tags: Joi.array().items(Joi.string().allow("")),
432
2340
  type_slug: Joi.string().allow("").required(),
433
- validation: CartModel.Validation(),
434
- validity: CartModel.Validity().required(),
2341
+ validation: CartPlatformModel.Validation(),
2342
+ validity: CartPlatformModel.Validity().required(),
435
2343
  });
436
2344
  }
2345
+
2346
+ /** @returns {CouponAuthor} */
437
2347
  static CouponAuthor() {
438
2348
  return Joi.object({
439
2349
  created_by: Joi.string().allow("").allow(null),
440
2350
  modified_by: Joi.string().allow("").allow(null),
441
2351
  });
442
2352
  }
2353
+
2354
+ /** @returns {CouponBreakup} */
443
2355
  static CouponBreakup() {
444
2356
  return Joi.object({
445
2357
  code: Joi.string().allow(""),
@@ -457,12 +2369,16 @@ class CartModel {
457
2369
  value: Joi.number(),
458
2370
  });
459
2371
  }
2372
+
2373
+ /** @returns {CouponDateMeta} */
460
2374
  static CouponDateMeta() {
461
2375
  return Joi.object({
462
2376
  created_on: Joi.string().allow("").allow(null),
463
2377
  modified_on: Joi.string().allow("").allow(null),
464
2378
  });
465
2379
  }
2380
+
2381
+ /** @returns {CouponDetails} */
466
2382
  static CouponDetails() {
467
2383
  return Joi.object({
468
2384
  code: Joi.string().allow(""),
@@ -470,12 +2386,16 @@ class CartModel {
470
2386
  discount_total_quantity: Joi.number(),
471
2387
  });
472
2388
  }
2389
+
2390
+ /** @returns {CouponPartialUpdate} */
473
2391
  static CouponPartialUpdate() {
474
2392
  return Joi.object({
475
2393
  archive: Joi.boolean(),
476
- schedule: CartModel.CouponSchedule(),
2394
+ schedule: CartPlatformModel.CouponSchedule(),
477
2395
  });
478
2396
  }
2397
+
2398
+ /** @returns {CouponSchedule} */
479
2399
  static CouponSchedule() {
480
2400
  return Joi.object({
481
2401
  cron: Joi.string().allow("").allow(null),
@@ -485,32 +2405,38 @@ class CartModel {
485
2405
  start: Joi.string().allow(""),
486
2406
  });
487
2407
  }
2408
+
2409
+ /** @returns {CouponsResponse} */
488
2410
  static CouponsResponse() {
489
2411
  return Joi.object({
490
- items: CartModel.CouponAdd(),
491
- page: CartModel.Page(),
2412
+ items: CartPlatformModel.CouponAdd(),
2413
+ page: CartPlatformModel.Page(),
492
2414
  });
493
2415
  }
2416
+
2417
+ /** @returns {CouponUpdate} */
494
2418
  static CouponUpdate() {
495
2419
  return Joi.object({
496
- _schedule: CartModel.CouponSchedule(),
497
- action: CartModel.CouponAction(),
498
- author: CartModel.CouponAuthor(),
2420
+ _schedule: CartPlatformModel.CouponSchedule(),
2421
+ action: CartPlatformModel.CouponAction(),
2422
+ author: CartPlatformModel.CouponAuthor(),
499
2423
  code: Joi.string().allow("").required(),
500
- date_meta: CartModel.CouponDateMeta(),
501
- display_meta: CartModel.DisplayMeta().required(),
502
- identifiers: CartModel.Identifier().required(),
503
- ownership: CartModel.Ownership().required(),
504
- restrictions: CartModel.Restrictions(),
505
- rule: Joi.array().items(CartModel.Rule()).required(),
506
- rule_definition: CartModel.RuleDefinition().required(),
507
- state: CartModel.State(),
2424
+ date_meta: CartPlatformModel.CouponDateMeta(),
2425
+ display_meta: CartPlatformModel.DisplayMeta().required(),
2426
+ identifiers: CartPlatformModel.Identifier().required(),
2427
+ ownership: CartPlatformModel.Ownership().required(),
2428
+ restrictions: CartPlatformModel.Restrictions(),
2429
+ rule: Joi.array().items(CartPlatformModel.Rule()).required(),
2430
+ rule_definition: CartPlatformModel.RuleDefinition().required(),
2431
+ state: CartPlatformModel.State(),
508
2432
  tags: Joi.array().items(Joi.string().allow("")),
509
2433
  type_slug: Joi.string().allow("").required(),
510
- validation: CartModel.Validation(),
511
- validity: CartModel.Validity().required(),
2434
+ validation: CartPlatformModel.Validation(),
2435
+ validity: CartPlatformModel.Validity().required(),
512
2436
  });
513
2437
  }
2438
+
2439
+ /** @returns {CouponValidity} */
514
2440
  static CouponValidity() {
515
2441
  return Joi.object({
516
2442
  code: Joi.string().allow("").allow(null),
@@ -521,29 +2447,48 @@ class CartModel {
521
2447
  valid: Joi.boolean(),
522
2448
  });
523
2449
  }
2450
+
2451
+ /** @returns {CustomerDetails} */
2452
+ static CustomerDetails() {
2453
+ return Joi.object({
2454
+ email: Joi.string().allow("").allow(null),
2455
+ mobile: Joi.string().allow("").required(),
2456
+ name: Joi.string().allow(""),
2457
+ });
2458
+ }
2459
+
2460
+ /** @returns {DeleteAddressResponse} */
524
2461
  static DeleteAddressResponse() {
525
2462
  return Joi.object({
526
2463
  id: Joi.string().allow(""),
527
2464
  is_deleted: Joi.boolean(),
528
2465
  });
529
2466
  }
2467
+
2468
+ /** @returns {DeleteCartDetailResponse} */
530
2469
  static DeleteCartDetailResponse() {
531
2470
  return Joi.object({
532
2471
  message: Joi.string().allow(""),
533
2472
  success: Joi.boolean(),
534
2473
  });
535
2474
  }
2475
+
2476
+ /** @returns {DeleteCartRequest} */
536
2477
  static DeleteCartRequest() {
537
2478
  return Joi.object({
538
2479
  cart_id_list: Joi.array().items(Joi.string().allow("")),
539
2480
  });
540
2481
  }
2482
+
2483
+ /** @returns {DeliveryCharges} */
541
2484
  static DeliveryCharges() {
542
2485
  return Joi.object({
543
- charges: Joi.array().items(CartModel.Charges()),
2486
+ charges: Joi.array().items(CartPlatformModel.Charges()),
544
2487
  enabled: Joi.boolean(),
545
2488
  });
546
2489
  }
2490
+
2491
+ /** @returns {DiscountOffer} */
547
2492
  static DiscountOffer() {
548
2493
  return Joi.object({
549
2494
  apportion_discount: Joi.boolean(),
@@ -558,14 +2503,18 @@ class CartModel {
558
2503
  partial_can_ret: Joi.boolean(),
559
2504
  });
560
2505
  }
2506
+
2507
+ /** @returns {DiscountRule} */
561
2508
  static DiscountRule() {
562
2509
  return Joi.object({
563
2510
  buy_condition: Joi.string().allow("").required(),
564
2511
  discount_type: Joi.string().allow("").required(),
565
- item_criteria: CartModel.ItemCriteria().required(),
566
- offer: CartModel.DiscountOffer().required(),
2512
+ item_criteria: CartPlatformModel.ItemCriteria().required(),
2513
+ offer: CartPlatformModel.DiscountOffer().required(),
567
2514
  });
568
2515
  }
2516
+
2517
+ /** @returns {DiscountRulesApp} */
569
2518
  static DiscountRulesApp() {
570
2519
  return Joi.object({
571
2520
  item_criteria: Joi.any(),
@@ -574,6 +2523,8 @@ class CartModel {
574
2523
  raw_offer: Joi.any(),
575
2524
  });
576
2525
  }
2526
+
2527
+ /** @returns {DisplayBreakup} */
577
2528
  static DisplayBreakup() {
578
2529
  return Joi.object({
579
2530
  currency_code: Joi.string().allow(""),
@@ -584,16 +2535,20 @@ class CartModel {
584
2535
  value: Joi.number(),
585
2536
  });
586
2537
  }
2538
+
2539
+ /** @returns {DisplayMeta} */
587
2540
  static DisplayMeta() {
588
2541
  return Joi.object({
589
- apply: CartModel.DisplayMetaDict(),
590
- auto: CartModel.DisplayMetaDict(),
2542
+ apply: CartPlatformModel.DisplayMetaDict(),
2543
+ auto: CartPlatformModel.DisplayMetaDict(),
591
2544
  description: Joi.string().allow(""),
592
- remove: CartModel.DisplayMetaDict(),
2545
+ remove: CartPlatformModel.DisplayMetaDict(),
593
2546
  subtitle: Joi.string().allow(""),
594
2547
  title: Joi.string().allow(""),
595
2548
  });
596
2549
  }
2550
+
2551
+ /** @returns {DisplayMeta1} */
597
2552
  static DisplayMeta1() {
598
2553
  return Joi.object({
599
2554
  description: Joi.string().allow(""),
@@ -602,18 +2557,24 @@ class CartModel {
602
2557
  offer_text: Joi.string().allow(""),
603
2558
  });
604
2559
  }
2560
+
2561
+ /** @returns {DisplayMetaDict} */
605
2562
  static DisplayMetaDict() {
606
2563
  return Joi.object({
607
2564
  subtitle: Joi.string().allow(""),
608
2565
  title: Joi.string().allow(""),
609
2566
  });
610
2567
  }
2568
+
2569
+ /** @returns {Files} */
611
2570
  static Files() {
612
2571
  return Joi.object({
613
2572
  key: Joi.string().allow("").required(),
614
2573
  values: Joi.array().items(Joi.string().allow("")).required(),
615
2574
  });
616
2575
  }
2576
+
2577
+ /** @returns {FreeGiftItem} */
617
2578
  static FreeGiftItem() {
618
2579
  return Joi.object({
619
2580
  item_brand_name: Joi.string().allow(""),
@@ -624,30 +2585,40 @@ class CartModel {
624
2585
  item_slug: Joi.string().allow(""),
625
2586
  });
626
2587
  }
2588
+
2589
+ /** @returns {GeoLocation} */
627
2590
  static GeoLocation() {
628
2591
  return Joi.object({
629
2592
  latitude: Joi.number(),
630
2593
  longitude: Joi.number(),
631
2594
  });
632
2595
  }
2596
+
2597
+ /** @returns {GetCouponResponse} */
633
2598
  static GetCouponResponse() {
634
2599
  return Joi.object({
635
- available_coupon_list: Joi.array().items(CartModel.Coupon()),
636
- page: CartModel.PageCoupon(),
2600
+ available_coupon_list: Joi.array().items(CartPlatformModel.Coupon()),
2601
+ page: CartPlatformModel.PageCoupon(),
637
2602
  });
638
2603
  }
2604
+
2605
+ /** @returns {GetShareCartLinkRequest} */
639
2606
  static GetShareCartLinkRequest() {
640
2607
  return Joi.object({
641
2608
  id: Joi.string().allow(""),
642
2609
  meta: Joi.any(),
643
2610
  });
644
2611
  }
2612
+
2613
+ /** @returns {GetShareCartLinkResponse} */
645
2614
  static GetShareCartLinkResponse() {
646
2615
  return Joi.object({
647
2616
  share_url: Joi.string().allow(""),
648
2617
  token: Joi.string().allow(""),
649
2618
  });
650
2619
  }
2620
+
2621
+ /** @returns {Identifier} */
651
2622
  static Identifier() {
652
2623
  return Joi.object({
653
2624
  article_id: Joi.array().items(Joi.string().allow("")),
@@ -662,15 +2633,17 @@ class CartModel {
662
2633
  user_id: Joi.array().items(Joi.string().allow("")),
663
2634
  });
664
2635
  }
2636
+
2637
+ /** @returns {ItemCriteria} */
665
2638
  static ItemCriteria() {
666
2639
  return Joi.object({
667
2640
  all_items: Joi.boolean(),
668
2641
  available_zones: Joi.array().items(Joi.string().allow("")),
669
2642
  buy_rules: Joi.array().items(Joi.string().allow("")),
670
- cart_quantity: CartModel.CompareObject(),
671
- cart_total: CartModel.CompareObject(),
672
- cart_unique_item_amount: CartModel.CompareObject(),
673
- cart_unique_item_quantity: CartModel.CompareObject(),
2643
+ cart_quantity: CartPlatformModel.CompareObject(),
2644
+ cart_total: CartPlatformModel.CompareObject(),
2645
+ cart_unique_item_amount: CartPlatformModel.CompareObject(),
2646
+ cart_unique_item_quantity: CartPlatformModel.CompareObject(),
674
2647
  item_brand: Joi.array().items(Joi.number()),
675
2648
  item_category: Joi.array().items(Joi.number()),
676
2649
  item_company: Joi.array().items(Joi.number()),
@@ -693,6 +2666,8 @@ class CartModel {
693
2666
  item_tags: Joi.array().items(Joi.string().allow("")),
694
2667
  });
695
2668
  }
2669
+
2670
+ /** @returns {LoyaltyPoints} */
696
2671
  static LoyaltyPoints() {
697
2672
  return Joi.object({
698
2673
  applicable: Joi.number(),
@@ -701,12 +2676,16 @@ class CartModel {
701
2676
  total: Joi.number(),
702
2677
  });
703
2678
  }
2679
+
2680
+ /** @returns {MultiCartResponse} */
704
2681
  static MultiCartResponse() {
705
2682
  return Joi.object({
706
- data: Joi.array().items(CartModel.CartList()),
2683
+ data: Joi.array().items(CartPlatformModel.CartList()),
707
2684
  success: Joi.boolean(),
708
2685
  });
709
2686
  }
2687
+
2688
+ /** @returns {MultiTenderPaymentMeta} */
710
2689
  static MultiTenderPaymentMeta() {
711
2690
  return Joi.object({
712
2691
  current_status: Joi.string().allow("").allow(null),
@@ -716,42 +2695,54 @@ class CartModel {
716
2695
  payment_id: Joi.string().allow("").allow(null),
717
2696
  });
718
2697
  }
2698
+
2699
+ /** @returns {MultiTenderPaymentMethod} */
719
2700
  static MultiTenderPaymentMethod() {
720
2701
  return Joi.object({
721
2702
  amount: Joi.number().required(),
722
- meta: CartModel.MultiTenderPaymentMeta(),
2703
+ meta: CartPlatformModel.MultiTenderPaymentMeta(),
723
2704
  mode: Joi.string().allow("").required(),
724
2705
  name: Joi.string().allow(""),
725
2706
  });
726
2707
  }
2708
+
2709
+ /** @returns {OpenapiCartDetailsRequest} */
727
2710
  static OpenapiCartDetailsRequest() {
728
2711
  return Joi.object({
729
- cart_items: Joi.array().items(CartModel.CartItem()).required(),
2712
+ cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
730
2713
  });
731
2714
  }
2715
+
2716
+ /** @returns {OpenapiCartDetailsResponse} */
732
2717
  static OpenapiCartDetailsResponse() {
733
2718
  return Joi.object({
734
- breakup_values: CartModel.CartBreakup(),
2719
+ breakup_values: CartPlatformModel.CartBreakup(),
735
2720
  is_valid: Joi.boolean(),
736
- items: Joi.array().items(CartModel.CartProductInfo()),
2721
+ items: Joi.array().items(CartPlatformModel.CartProductInfo()),
737
2722
  message: Joi.string().allow(""),
738
2723
  });
739
2724
  }
2725
+
2726
+ /** @returns {OpenApiCartServiceabilityRequest} */
740
2727
  static OpenApiCartServiceabilityRequest() {
741
2728
  return Joi.object({
742
- cart_items: Joi.array().items(CartModel.CartItem()).required(),
743
- shipping_address: CartModel.ShippingAddress().required(),
2729
+ cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
2730
+ shipping_address: CartPlatformModel.ShippingAddress().required(),
744
2731
  });
745
2732
  }
2733
+
2734
+ /** @returns {OpenApiCartServiceabilityResponse} */
746
2735
  static OpenApiCartServiceabilityResponse() {
747
2736
  return Joi.object({
748
- breakup_values: CartModel.CartBreakup(),
749
- delivery_promise: CartModel.ShipmentPromise(),
2737
+ breakup_values: CartPlatformModel.CartBreakup(),
2738
+ delivery_promise: CartPlatformModel.ShipmentPromise(),
750
2739
  is_valid: Joi.boolean(),
751
- items: Joi.array().items(CartModel.CartProductInfo()),
2740
+ items: Joi.array().items(CartPlatformModel.CartProductInfo()),
752
2741
  message: Joi.string().allow(""),
753
2742
  });
754
2743
  }
2744
+
2745
+ /** @returns {OpenApiCheckoutResponse} */
755
2746
  static OpenApiCheckoutResponse() {
756
2747
  return Joi.object({
757
2748
  message: Joi.string().allow(""),
@@ -760,6 +2751,8 @@ class CartModel {
760
2751
  success: Joi.boolean(),
761
2752
  });
762
2753
  }
2754
+
2755
+ /** @returns {OpenApiErrorResponse} */
763
2756
  static OpenApiErrorResponse() {
764
2757
  return Joi.object({
765
2758
  errors: Joi.any(),
@@ -767,12 +2760,16 @@ class CartModel {
767
2760
  success: Joi.boolean(),
768
2761
  });
769
2762
  }
2763
+
2764
+ /** @returns {OpenApiFiles} */
770
2765
  static OpenApiFiles() {
771
2766
  return Joi.object({
772
2767
  key: Joi.string().allow("").required(),
773
2768
  values: Joi.array().items(Joi.string().allow("")).required(),
774
2769
  });
775
2770
  }
2771
+
2772
+ /** @returns {OpenApiOrderItem} */
776
2773
  static OpenApiOrderItem() {
777
2774
  return Joi.object({
778
2775
  amount_paid: Joi.number().required(),
@@ -783,11 +2780,11 @@ class CartModel {
783
2780
  discount: Joi.number().required(),
784
2781
  employee_discount: Joi.number(),
785
2782
  extra_meta: Joi.any(),
786
- files: Joi.array().items(CartModel.OpenApiFiles()),
2783
+ files: Joi.array().items(CartPlatformModel.OpenApiFiles()),
787
2784
  loyalty_discount: Joi.number(),
788
- meta: CartModel.CartItemMeta(),
2785
+ meta: CartPlatformModel.CartItemMeta(),
789
2786
  payment_methods: Joi.array()
790
- .items(CartModel.MultiTenderPaymentMethod())
2787
+ .items(CartPlatformModel.MultiTenderPaymentMethod())
791
2788
  .required(),
792
2789
  price_effective: Joi.number().required(),
793
2790
  price_marked: Joi.number().required(),
@@ -796,11 +2793,15 @@ class CartModel {
796
2793
  size: Joi.string().allow("").required(),
797
2794
  });
798
2795
  }
2796
+
2797
+ /** @returns {OpenApiPlatformCheckoutReq} */
799
2798
  static OpenApiPlatformCheckoutReq() {
800
2799
  return Joi.object({
801
2800
  affiliate_order_id: Joi.string().allow(""),
802
- billing_address: CartModel.ShippingAddress().required(),
803
- cart_items: Joi.array().items(CartModel.OpenApiOrderItem()).required(),
2801
+ billing_address: CartPlatformModel.ShippingAddress().required(),
2802
+ cart_items: Joi.array()
2803
+ .items(CartPlatformModel.OpenApiOrderItem())
2804
+ .required(),
804
2805
  cart_value: Joi.number().required(),
805
2806
  cashback_applied: Joi.number().required(),
806
2807
  cod_charges: Joi.number().required(),
@@ -811,23 +2812,27 @@ class CartModel {
811
2812
  currency_code: Joi.string().allow(""),
812
2813
  delivery_charges: Joi.number().required(),
813
2814
  employee_discount: Joi.any(),
814
- files: Joi.array().items(CartModel.OpenApiFiles()),
2815
+ files: Joi.array().items(CartPlatformModel.OpenApiFiles()),
815
2816
  gstin: Joi.string().allow("").allow(null),
816
2817
  loyalty_discount: Joi.number(),
817
2818
  order_id: Joi.string().allow(""),
818
2819
  payment_methods: Joi.array()
819
- .items(CartModel.MultiTenderPaymentMethod())
2820
+ .items(CartPlatformModel.MultiTenderPaymentMethod())
820
2821
  .required(),
821
2822
  payment_mode: Joi.string().allow(""),
822
- shipping_address: CartModel.ShippingAddress(),
2823
+ shipping_address: CartPlatformModel.ShippingAddress(),
823
2824
  });
824
2825
  }
2826
+
2827
+ /** @returns {OperationErrorResponse} */
825
2828
  static OperationErrorResponse() {
826
2829
  return Joi.object({
827
2830
  message: Joi.string().allow(""),
828
2831
  success: Joi.boolean(),
829
2832
  });
830
2833
  }
2834
+
2835
+ /** @returns {OverrideCartItem} */
831
2836
  static OverrideCartItem() {
832
2837
  return Joi.object({
833
2838
  amount_paid: Joi.number().required(),
@@ -836,12 +2841,14 @@ class CartModel {
836
2841
  item_id: Joi.number().required(),
837
2842
  price_effective: Joi.number().required(),
838
2843
  price_marked: Joi.number().required(),
839
- promo_list: Joi.array().items(CartModel.OverrideCartItemPromo()),
2844
+ promo_list: Joi.array().items(CartPlatformModel.OverrideCartItemPromo()),
840
2845
  quantity: Joi.number(),
841
2846
  seller_identifier: Joi.string().allow(""),
842
2847
  size: Joi.string().allow("").required(),
843
2848
  });
844
2849
  }
2850
+
2851
+ /** @returns {OverrideCartItemPromo} */
845
2852
  static OverrideCartItemPromo() {
846
2853
  return Joi.object({
847
2854
  item_list: Joi.array().items(Joi.any().allow(null)),
@@ -851,12 +2858,16 @@ class CartModel {
851
2858
  rwrd_tndr: Joi.string().allow(""),
852
2859
  });
853
2860
  }
2861
+
2862
+ /** @returns {OverrideCheckoutReq} */
854
2863
  static OverrideCheckoutReq() {
855
2864
  return Joi.object({
856
2865
  aggregator: Joi.string().allow("").required(),
857
2866
  billing_address: Joi.any(),
858
2867
  cart_id: Joi.string().allow("").required(),
859
- cart_items: Joi.array().items(CartModel.OverrideCartItem()).required(),
2868
+ cart_items: Joi.array()
2869
+ .items(CartPlatformModel.OverrideCartItem())
2870
+ .required(),
860
2871
  currency_code: Joi.string().allow("").required(),
861
2872
  merchant_code: Joi.string().allow("").required(),
862
2873
  order_type: Joi.string().allow("").required(),
@@ -866,6 +2877,8 @@ class CartModel {
866
2877
  shipping_address: Joi.any(),
867
2878
  });
868
2879
  }
2880
+
2881
+ /** @returns {OverrideCheckoutResponse} */
869
2882
  static OverrideCheckoutResponse() {
870
2883
  return Joi.object({
871
2884
  cart: Joi.any().required(),
@@ -875,24 +2888,32 @@ class CartModel {
875
2888
  success: Joi.string().allow("").required(),
876
2889
  });
877
2890
  }
2891
+
2892
+ /** @returns {Ownership} */
878
2893
  static Ownership() {
879
2894
  return Joi.object({
880
2895
  payable_by: Joi.string().allow("").required(),
881
2896
  payable_category: Joi.string().allow("").required(),
882
2897
  });
883
2898
  }
2899
+
2900
+ /** @returns {Ownership1} */
884
2901
  static Ownership1() {
885
2902
  return Joi.object({
886
2903
  payable_by: Joi.string().allow("").required(),
887
2904
  payable_category: Joi.string().allow("").required(),
888
2905
  });
889
2906
  }
2907
+
2908
+ /** @returns {Ownership2} */
890
2909
  static Ownership2() {
891
2910
  return Joi.object({
892
2911
  payable_by: Joi.string().allow(""),
893
2912
  payable_category: Joi.string().allow(""),
894
2913
  });
895
2914
  }
2915
+
2916
+ /** @returns {Page} */
896
2917
  static Page() {
897
2918
  return Joi.object({
898
2919
  current: Joi.number(),
@@ -904,6 +2925,8 @@ class CartModel {
904
2925
  type: Joi.string().allow("").required(),
905
2926
  });
906
2927
  }
2928
+
2929
+ /** @returns {PageCoupon} */
907
2930
  static PageCoupon() {
908
2931
  return Joi.object({
909
2932
  current: Joi.number(),
@@ -913,23 +2936,31 @@ class CartModel {
913
2936
  total_item_count: Joi.number(),
914
2937
  });
915
2938
  }
2939
+
2940
+ /** @returns {PaymentAllowValue} */
916
2941
  static PaymentAllowValue() {
917
2942
  return Joi.object({
918
2943
  max: Joi.number(),
919
2944
  });
920
2945
  }
2946
+
2947
+ /** @returns {PaymentAllowValue1} */
921
2948
  static PaymentAllowValue1() {
922
2949
  return Joi.object({
923
2950
  max: Joi.number(),
924
2951
  });
925
2952
  }
2953
+
2954
+ /** @returns {PaymentCouponValidate} */
926
2955
  static PaymentCouponValidate() {
927
2956
  return Joi.object({
928
- coupon_validity: CartModel.CouponValidity(),
2957
+ coupon_validity: CartPlatformModel.CouponValidity(),
929
2958
  message: Joi.string().allow(""),
930
2959
  success: Joi.boolean().required(),
931
2960
  });
932
2961
  }
2962
+
2963
+ /** @returns {PaymentMeta} */
933
2964
  static PaymentMeta() {
934
2965
  return Joi.object({
935
2966
  merchant_code: Joi.string().allow(""),
@@ -938,24 +2969,30 @@ class CartModel {
938
2969
  type: Joi.string().allow(""),
939
2970
  });
940
2971
  }
2972
+
2973
+ /** @returns {PaymentMethod} */
941
2974
  static PaymentMethod() {
942
2975
  return Joi.object({
943
2976
  amount: Joi.number().allow(null),
944
2977
  mode: Joi.string().allow("").required(),
945
2978
  name: Joi.string().allow(""),
946
2979
  payment: Joi.string().allow(""),
947
- payment_meta: CartModel.PaymentMeta().required(),
2980
+ payment_meta: CartPlatformModel.PaymentMeta().required(),
948
2981
  });
949
2982
  }
2983
+
2984
+ /** @returns {PaymentModes} */
950
2985
  static PaymentModes() {
951
2986
  return Joi.object({
952
2987
  codes: Joi.array().items(Joi.string().allow("")),
953
2988
  iins: Joi.array().items(Joi.string().allow("")),
954
2989
  networks: Joi.array().items(Joi.string().allow("")),
955
2990
  types: Joi.array().items(Joi.string().allow("")),
956
- uses: CartModel.PaymentAllowValue(),
2991
+ uses: CartPlatformModel.PaymentAllowValue(),
957
2992
  });
958
2993
  }
2994
+
2995
+ /** @returns {PaymentSelectionLock} */
959
2996
  static PaymentSelectionLock() {
960
2997
  return Joi.object({
961
2998
  default_options: Joi.string().allow(""),
@@ -963,6 +3000,8 @@ class CartModel {
963
3000
  payment_identifier: Joi.string().allow(""),
964
3001
  });
965
3002
  }
3003
+
3004
+ /** @returns {PickupStoreDetail} */
966
3005
  static PickupStoreDetail() {
967
3006
  return Joi.object({
968
3007
  address: Joi.string().allow(""),
@@ -983,13 +3022,17 @@ class CartModel {
983
3022
  uid: Joi.number(),
984
3023
  });
985
3024
  }
3025
+
3026
+ /** @returns {PlatformAddCartRequest} */
986
3027
  static PlatformAddCartRequest() {
987
3028
  return Joi.object({
988
- items: Joi.array().items(CartModel.AddProductCart()),
3029
+ items: Joi.array().items(CartPlatformModel.AddProductCart()),
989
3030
  new_cart: Joi.boolean(),
990
3031
  user_id: Joi.string().allow(""),
991
3032
  });
992
3033
  }
3034
+
3035
+ /** @returns {PlatformAddress} */
993
3036
  static PlatformAddress() {
994
3037
  return Joi.object({
995
3038
  address: Joi.string().allow(""),
@@ -1004,7 +3047,7 @@ class CartModel {
1004
3047
  country_code: Joi.string().allow(""),
1005
3048
  created_by_user_id: Joi.string().allow(""),
1006
3049
  email: Joi.string().allow(""),
1007
- geo_location: CartModel.GeoLocation(),
3050
+ geo_location: CartPlatformModel.GeoLocation(),
1008
3051
  google_map_point: Joi.any(),
1009
3052
  id: Joi.string().allow(""),
1010
3053
  is_active: Joi.boolean(),
@@ -1018,6 +3061,8 @@ class CartModel {
1018
3061
  user_id: Joi.string().allow(""),
1019
3062
  });
1020
3063
  }
3064
+
3065
+ /** @returns {PlatformCartCheckoutDetailRequest} */
1021
3066
  static PlatformCartCheckoutDetailRequest() {
1022
3067
  return Joi.object({
1023
3068
  address_id: Joi.string().allow(""),
@@ -1026,11 +3071,15 @@ class CartModel {
1026
3071
  billing_address_id: Joi.string().allow(""),
1027
3072
  callback_url: Joi.string().allow("").allow(null),
1028
3073
  checkout_mode: Joi.string().allow(""),
3074
+ custom_meta: Joi.array().items(
3075
+ CartPlatformModel.CartCheckoutCustomMeta()
3076
+ ),
3077
+ customer_details: Joi.any().allow(null),
1029
3078
  delivery_address: Joi.any(),
1030
3079
  device_id: Joi.string().allow("").allow(null),
1031
3080
  employee_code: Joi.string().allow("").allow(null),
1032
3081
  extra_meta: Joi.any(),
1033
- files: Joi.array().items(CartModel.Files()),
3082
+ files: Joi.array().items(CartPlatformModel.Files()),
1034
3083
  id: Joi.string().allow("").required(),
1035
3084
  merchant_code: Joi.string().allow(""),
1036
3085
  meta: Joi.any(),
@@ -1042,10 +3091,12 @@ class CartModel {
1042
3091
  payment_params: Joi.any().allow(null),
1043
3092
  pick_at_store_uid: Joi.number().allow(null),
1044
3093
  pos: Joi.boolean(),
1045
- staff: CartModel.StaffCheckout(),
1046
- user_id: Joi.string().allow("").required(),
3094
+ staff: CartPlatformModel.StaffCheckout(),
3095
+ user_id: Joi.string().allow("").allow(null).required(),
1047
3096
  });
1048
3097
  }
3098
+
3099
+ /** @returns {PlatformCartCheckoutDetailV2Request} */
1049
3100
  static PlatformCartCheckoutDetailV2Request() {
1050
3101
  return Joi.object({
1051
3102
  address_id: Joi.string().allow(""),
@@ -1055,11 +3106,12 @@ class CartModel {
1055
3106
  callback_url: Joi.string().allow("").allow(null),
1056
3107
  checkout_mode: Joi.string().allow(""),
1057
3108
  custom_meta: Joi.any(),
3109
+ customer_details: Joi.any().allow(null),
1058
3110
  delivery_address: Joi.any(),
1059
3111
  device_id: Joi.string().allow("").allow(null),
1060
3112
  employee_code: Joi.string().allow("").allow(null),
1061
3113
  extra_meta: Joi.any(),
1062
- files: Joi.array().items(CartModel.Files()),
3114
+ files: Joi.array().items(CartPlatformModel.Files()),
1063
3115
  id: Joi.string().allow("").required(),
1064
3116
  merchant_code: Joi.string().allow(""),
1065
3117
  meta: Joi.any(),
@@ -1067,15 +3119,19 @@ class CartModel {
1067
3119
  ordering_store: Joi.number().allow(null),
1068
3120
  payment_auto_confirm: Joi.boolean(),
1069
3121
  payment_identifier: Joi.string().allow("").allow(null),
1070
- payment_methods: Joi.array().items(CartModel.PaymentMethod()).required(),
3122
+ payment_methods: Joi.array()
3123
+ .items(CartPlatformModel.PaymentMethod())
3124
+ .required(),
1071
3125
  payment_mode: Joi.string().allow(""),
1072
3126
  payment_params: Joi.any().allow(null),
1073
3127
  pick_at_store_uid: Joi.number().allow(null),
1074
3128
  pos: Joi.boolean(),
1075
- staff: CartModel.StaffCheckout(),
1076
- user_id: Joi.string().allow("").required(),
3129
+ staff: CartPlatformModel.StaffCheckout(),
3130
+ user_id: Joi.string().allow("").allow(null).required(),
1077
3131
  });
1078
3132
  }
3133
+
3134
+ /** @returns {PlatformCartMetaRequest} */
1079
3135
  static PlatformCartMetaRequest() {
1080
3136
  return Joi.object({
1081
3137
  checkout_mode: Joi.string().allow(""),
@@ -1087,37 +3143,47 @@ class CartModel {
1087
3143
  staff_user_id: Joi.string().allow("").allow(null),
1088
3144
  });
1089
3145
  }
3146
+
3147
+ /** @returns {PlatformCartShipmentsResponse} */
1090
3148
  static PlatformCartShipmentsResponse() {
1091
3149
  return Joi.object({
1092
- applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
1093
- breakup_values: CartModel.CartBreakup(),
3150
+ applied_promo_details: Joi.array().items(
3151
+ CartPlatformModel.AppliedPromotion()
3152
+ ),
3153
+ breakup_values: CartPlatformModel.CartBreakup(),
1094
3154
  buy_now: Joi.boolean(),
1095
3155
  checkout_mode: Joi.string().allow(""),
1096
3156
  comment: Joi.string().allow(""),
1097
3157
  coupon_text: Joi.string().allow(""),
1098
- currency: CartModel.CartCurrency(),
3158
+ currency: CartPlatformModel.CartCurrency(),
1099
3159
  delivery_charge_info: Joi.string().allow(""),
1100
- delivery_promise: CartModel.ShipmentPromise(),
3160
+ delivery_promise: CartPlatformModel.ShipmentPromise(),
1101
3161
  error: Joi.boolean(),
1102
3162
  gstin: Joi.string().allow(""),
1103
3163
  id: Joi.string().allow(""),
1104
3164
  is_valid: Joi.boolean(),
1105
- items: Joi.array().items(CartModel.CartProductInfo()),
3165
+ items: Joi.array().items(CartPlatformModel.CartProductInfo()),
1106
3166
  last_modified: Joi.string().allow(""),
1107
3167
  message: Joi.string().allow(""),
1108
3168
  pan_config: Joi.any(),
1109
3169
  pan_no: Joi.string().allow(""),
1110
- payment_selection_lock: CartModel.PaymentSelectionLock(),
3170
+ payment_selection_lock: CartPlatformModel.PaymentSelectionLock(),
1111
3171
  restrict_checkout: Joi.boolean(),
1112
- shipments: Joi.array().items(CartModel.PlatformShipmentResponse()),
3172
+ shipments: Joi.array().items(
3173
+ CartPlatformModel.PlatformShipmentResponse()
3174
+ ),
1113
3175
  staff_user_id: Joi.string().allow("").allow(null),
1114
3176
  });
1115
3177
  }
3178
+
3179
+ /** @returns {PlatformGetAddressesResponse} */
1116
3180
  static PlatformGetAddressesResponse() {
1117
3181
  return Joi.object({
1118
- address: Joi.array().items(CartModel.PlatformAddress()),
3182
+ address: Joi.array().items(CartPlatformModel.PlatformAddress()),
1119
3183
  });
1120
3184
  }
3185
+
3186
+ /** @returns {PlatformSelectCartAddressRequest} */
1121
3187
  static PlatformSelectCartAddressRequest() {
1122
3188
  return Joi.object({
1123
3189
  billing_address_id: Joi.string().allow(""),
@@ -1127,49 +3193,58 @@ class CartModel {
1127
3193
  user_id: Joi.string().allow(""),
1128
3194
  });
1129
3195
  }
3196
+
3197
+ /** @returns {PlatformShipmentResponse} */
1130
3198
  static PlatformShipmentResponse() {
1131
3199
  return Joi.object({
1132
- articles: Joi.array().items(CartModel.ShipmentArticle()),
3200
+ articles: Joi.array().items(CartPlatformModel.ShipmentArticle()),
1133
3201
  box_type: Joi.string().allow("").allow(null),
1134
3202
  dp_id: Joi.string().allow("").allow(null),
1135
3203
  dp_options: Joi.any().allow(null),
1136
3204
  fulfillment_id: Joi.number(),
1137
3205
  fulfillment_type: Joi.string().allow(""),
1138
- items: Joi.array().items(CartModel.CartProductInfo()),
3206
+ items: Joi.array().items(CartPlatformModel.CartProductInfo()),
1139
3207
  order_type: Joi.string().allow(""),
1140
- promise: CartModel.ShipmentPromise(),
3208
+ promise: CartPlatformModel.ShipmentPromise(),
1141
3209
  shipment_type: Joi.string().allow(""),
1142
3210
  shipments: Joi.number(),
1143
3211
  });
1144
3212
  }
3213
+
3214
+ /** @returns {PlatformUpdateCartRequest} */
1145
3215
  static PlatformUpdateCartRequest() {
1146
3216
  return Joi.object({
1147
- items: Joi.array().items(CartModel.UpdateProductCart()),
3217
+ items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
1148
3218
  operation: Joi.string().allow("").required(),
1149
3219
  user_id: Joi.string().allow(""),
1150
3220
  });
1151
3221
  }
3222
+
3223
+ /** @returns {PostOrder} */
1152
3224
  static PostOrder() {
1153
3225
  return Joi.object({
1154
3226
  cancellation_allowed: Joi.boolean(),
1155
3227
  return_allowed: Joi.boolean(),
1156
3228
  });
1157
3229
  }
3230
+
3231
+ /** @returns {PostOrder1} */
1158
3232
  static PostOrder1() {
1159
3233
  return Joi.object({
1160
3234
  cancellation_allowed: Joi.boolean(),
1161
3235
  return_allowed: Joi.boolean(),
1162
3236
  });
1163
3237
  }
3238
+
3239
+ /** @returns {PriceAdjustment} */
1164
3240
  static PriceAdjustment() {
1165
3241
  return Joi.object({
1166
3242
  allowed_refund: Joi.boolean(),
1167
3243
  apply_expiry: Joi.string().allow(""),
1168
- article_ids: Joi.array().items(CartModel.Article()).required(),
3244
+ article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
1169
3245
  article_level_distribution: Joi.boolean().required(),
1170
3246
  cart_id: Joi.string().allow("").required(),
1171
- cart_value: Joi.number(),
1172
- collection: CartModel.Collection().required(),
3247
+ collection: CartPlatformModel.Collection().required(),
1173
3248
  id: Joi.string().allow(""),
1174
3249
  is_authenticated: Joi.boolean().required(),
1175
3250
  message: Joi.string().allow("").required(),
@@ -1178,15 +3253,16 @@ class CartModel {
1178
3253
  value: Joi.number().required(),
1179
3254
  });
1180
3255
  }
3256
+
3257
+ /** @returns {PriceAdjustmentAdd} */
1181
3258
  static PriceAdjustmentAdd() {
1182
3259
  return Joi.object({
1183
3260
  allowed_refund: Joi.boolean(),
1184
3261
  apply_expiry: Joi.string().allow(""),
1185
- article_ids: Joi.array().items(CartModel.Article()).required(),
3262
+ article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
1186
3263
  article_level_distribution: Joi.boolean().required(),
1187
3264
  cart_id: Joi.string().allow("").required(),
1188
- cart_value: Joi.number(),
1189
- collection: CartModel.Collection().required(),
3265
+ collection: CartPlatformModel.Collection().required(),
1190
3266
  created_by: Joi.string().allow(""),
1191
3267
  is_authenticated: Joi.boolean().required(),
1192
3268
  message: Joi.string().allow("").required(),
@@ -1195,20 +3271,23 @@ class CartModel {
1195
3271
  value: Joi.number().required(),
1196
3272
  });
1197
3273
  }
3274
+
3275
+ /** @returns {PriceAdjustmentResponse} */
1198
3276
  static PriceAdjustmentResponse() {
1199
3277
  return Joi.object({
1200
- data: CartModel.PriceAdjustment(),
3278
+ data: CartPlatformModel.PriceAdjustment(),
1201
3279
  });
1202
3280
  }
3281
+
3282
+ /** @returns {PriceAdjustmentUpdate} */
1203
3283
  static PriceAdjustmentUpdate() {
1204
3284
  return Joi.object({
1205
3285
  allowed_refund: Joi.boolean(),
1206
3286
  apply_expiry: Joi.string().allow(""),
1207
- article_ids: Joi.array().items(CartModel.Article()).required(),
3287
+ article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
1208
3288
  article_level_distribution: Joi.boolean().required(),
1209
3289
  cart_id: Joi.string().allow("").required(),
1210
- cart_value: Joi.number(),
1211
- collection: CartModel.Collection().required(),
3290
+ collection: CartPlatformModel.Collection().required(),
1212
3291
  is_authenticated: Joi.boolean().required(),
1213
3292
  message: Joi.string().allow("").required(),
1214
3293
  meta: Joi.any(),
@@ -1217,19 +3296,25 @@ class CartModel {
1217
3296
  value: Joi.number().required(),
1218
3297
  });
1219
3298
  }
3299
+
3300
+ /** @returns {PriceRange} */
1220
3301
  static PriceRange() {
1221
3302
  return Joi.object({
1222
3303
  max: Joi.number(),
1223
3304
  min: Joi.number(),
1224
3305
  });
1225
3306
  }
3307
+
3308
+ /** @returns {ProductAction} */
1226
3309
  static ProductAction() {
1227
3310
  return Joi.object({
1228
- query: CartModel.ActionQuery(),
3311
+ query: CartPlatformModel.ActionQuery(),
1229
3312
  type: Joi.string().allow(""),
1230
3313
  url: Joi.string().allow(""),
1231
3314
  });
1232
3315
  }
3316
+
3317
+ /** @returns {ProductArticle} */
1233
3318
  static ProductArticle() {
1234
3319
  return Joi.object({
1235
3320
  _custom_json: Joi.any(),
@@ -1241,20 +3326,24 @@ class CartModel {
1241
3326
  meta: Joi.any(),
1242
3327
  mto_quantity: Joi.number(),
1243
3328
  parent_item_identifiers: Joi.any(),
1244
- price: CartModel.ArticlePriceInfo(),
3329
+ price: CartPlatformModel.ArticlePriceInfo(),
1245
3330
  product_group_tags: Joi.array().items(Joi.string().allow("")),
1246
3331
  quantity: Joi.number(),
1247
- seller: CartModel.BaseInfo(),
3332
+ seller: CartPlatformModel.BaseInfo(),
1248
3333
  seller_identifier: Joi.string().allow(""),
1249
3334
  size: Joi.string().allow(""),
1250
- store: CartModel.StoreInfo(),
3335
+ store: CartPlatformModel.StoreInfo(),
1251
3336
  type: Joi.string().allow(""),
1252
3337
  uid: Joi.string().allow(""),
1253
3338
  });
1254
3339
  }
3340
+
3341
+ /** @returns {ProductAvailability} */
1255
3342
  static ProductAvailability() {
1256
3343
  return Joi.object({
1257
- available_sizes: Joi.array().items(CartModel.ProductAvailabilitySize()),
3344
+ available_sizes: Joi.array().items(
3345
+ CartPlatformModel.ProductAvailabilitySize()
3346
+ ),
1258
3347
  deliverable: Joi.boolean(),
1259
3348
  is_valid: Joi.boolean(),
1260
3349
  other_store_quantity: Joi.number(),
@@ -1262,6 +3351,8 @@ class CartModel {
1262
3351
  sizes: Joi.array().items(Joi.string().allow("")),
1263
3352
  });
1264
3353
  }
3354
+
3355
+ /** @returns {ProductAvailabilitySize} */
1265
3356
  static ProductAvailabilitySize() {
1266
3357
  return Joi.object({
1267
3358
  display: Joi.string().allow(""),
@@ -1269,6 +3360,8 @@ class CartModel {
1269
3360
  value: Joi.string().allow(""),
1270
3361
  });
1271
3362
  }
3363
+
3364
+ /** @returns {ProductImage} */
1272
3365
  static ProductImage() {
1273
3366
  return Joi.object({
1274
3367
  aspect_ratio: Joi.string().allow(""),
@@ -1276,6 +3369,8 @@ class CartModel {
1276
3369
  url: Joi.string().allow(""),
1277
3370
  });
1278
3371
  }
3372
+
3373
+ /** @returns {ProductPrice} */
1279
3374
  static ProductPrice() {
1280
3375
  return Joi.object({
1281
3376
  add_on: Joi.number(),
@@ -1286,116 +3381,145 @@ class CartModel {
1286
3381
  selling: Joi.number(),
1287
3382
  });
1288
3383
  }
3384
+
3385
+ /** @returns {ProductPriceInfo} */
1289
3386
  static ProductPriceInfo() {
1290
3387
  return Joi.object({
1291
- base: CartModel.ProductPrice(),
1292
- converted: CartModel.ProductPrice(),
3388
+ base: CartPlatformModel.ProductPrice(),
3389
+ converted: CartPlatformModel.ProductPrice(),
1293
3390
  });
1294
3391
  }
3392
+
3393
+ /** @returns {PromiseFormatted} */
1295
3394
  static PromiseFormatted() {
1296
3395
  return Joi.object({
1297
3396
  max: Joi.string().allow(""),
1298
3397
  min: Joi.string().allow(""),
1299
3398
  });
1300
3399
  }
3400
+
3401
+ /** @returns {PromiseTimestamp} */
1301
3402
  static PromiseTimestamp() {
1302
3403
  return Joi.object({
1303
3404
  max: Joi.number(),
1304
3405
  min: Joi.number(),
1305
3406
  });
1306
3407
  }
3408
+
3409
+ /** @returns {PromoMeta} */
1307
3410
  static PromoMeta() {
1308
3411
  return Joi.object({
1309
3412
  message: Joi.string().allow(""),
1310
3413
  });
1311
3414
  }
3415
+
3416
+ /** @returns {PromotionAction} */
1312
3417
  static PromotionAction() {
1313
3418
  return Joi.object({
1314
3419
  action_date: Joi.string().allow("").allow(null).required(),
1315
3420
  action_type: Joi.string().allow("").required(),
1316
3421
  });
1317
3422
  }
3423
+
3424
+ /** @returns {PromotionAdd} */
1318
3425
  static PromotionAdd() {
1319
3426
  return Joi.object({
1320
3427
  _custom_json: Joi.any(),
1321
- _schedule: CartModel.PromotionSchedule(),
3428
+ _schedule: CartPlatformModel.PromotionSchedule(),
1322
3429
  application_id: Joi.string().allow("").required(),
1323
3430
  apply_all_discount: Joi.boolean(),
1324
3431
  apply_exclusive: Joi.string().allow("").allow(null),
1325
3432
  apply_priority: Joi.number(),
1326
- author: CartModel.PromotionAuthor(),
3433
+ author: CartPlatformModel.PromotionAuthor(),
1327
3434
  buy_rules: Joi.object()
1328
- .pattern(/\S/, CartModel.ItemCriteria())
3435
+ .pattern(/\S/, CartPlatformModel.ItemCriteria())
1329
3436
  .required(),
1330
3437
  calculate_on: Joi.string().allow(""),
1331
3438
  code: Joi.string().allow(""),
1332
3439
  currency: Joi.string().allow(""),
1333
- date_meta: CartModel.PromotionDateMeta(),
1334
- discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
1335
- display_meta: CartModel.DisplayMeta1().required(),
3440
+ date_meta: CartPlatformModel.PromotionDateMeta(),
3441
+ discount_rules: Joi.array()
3442
+ .items(CartPlatformModel.DiscountRule())
3443
+ .required(),
3444
+ display_meta: CartPlatformModel.DisplayMeta1().required(),
1336
3445
  mode: Joi.string().allow("").required(),
1337
- ownership: CartModel.Ownership1().required(),
1338
- post_order_action: CartModel.PromotionAction(),
3446
+ ownership: CartPlatformModel.Ownership1().required(),
3447
+ post_order_action: CartPlatformModel.PromotionAction(),
1339
3448
  promo_group: Joi.string().allow("").required(),
1340
3449
  promotion_type: Joi.string().allow("").required(),
1341
- restrictions: CartModel.Restrictions1(),
3450
+ restrictions: CartPlatformModel.Restrictions1(),
1342
3451
  stackable: Joi.boolean(),
1343
- visiblility: CartModel.Visibility(),
3452
+ visiblility: CartPlatformModel.Visibility(),
1344
3453
  });
1345
3454
  }
3455
+
3456
+ /** @returns {PromotionAuthor} */
1346
3457
  static PromotionAuthor() {
1347
3458
  return Joi.object({
1348
3459
  created_by: Joi.string().allow("").allow(null),
1349
3460
  modified_by: Joi.string().allow("").allow(null),
1350
3461
  });
1351
3462
  }
3463
+
3464
+ /** @returns {PromotionDateMeta} */
1352
3465
  static PromotionDateMeta() {
1353
3466
  return Joi.object({
1354
3467
  created_on: Joi.string().allow("").allow(null),
1355
3468
  modified_on: Joi.string().allow("").allow(null),
1356
3469
  });
1357
3470
  }
3471
+
3472
+ /** @returns {PromotionListItem} */
1358
3473
  static PromotionListItem() {
1359
3474
  return Joi.object({
1360
3475
  _custom_json: Joi.any(),
1361
- _schedule: CartModel.PromotionSchedule(),
3476
+ _id: Joi.string().allow(""),
3477
+ _schedule: CartPlatformModel.PromotionSchedule(),
1362
3478
  application_id: Joi.string().allow("").required(),
1363
3479
  apply_all_discount: Joi.boolean(),
1364
3480
  apply_exclusive: Joi.string().allow("").allow(null),
1365
3481
  apply_priority: Joi.number(),
1366
- author: CartModel.PromotionAuthor(),
3482
+ author: CartPlatformModel.PromotionAuthor(),
1367
3483
  buy_rules: Joi.object()
1368
- .pattern(/\S/, CartModel.ItemCriteria())
3484
+ .pattern(/\S/, CartPlatformModel.ItemCriteria())
1369
3485
  .required(),
1370
3486
  calculate_on: Joi.string().allow(""),
1371
3487
  code: Joi.string().allow(""),
1372
3488
  currency: Joi.string().allow(""),
1373
- date_meta: CartModel.PromotionDateMeta(),
1374
- discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
1375
- display_meta: CartModel.DisplayMeta1().required(),
3489
+ date_meta: CartPlatformModel.PromotionDateMeta(),
3490
+ discount_rules: Joi.array()
3491
+ .items(CartPlatformModel.DiscountRule())
3492
+ .required(),
3493
+ display_meta: CartPlatformModel.DisplayMeta1().required(),
1376
3494
  mode: Joi.string().allow("").required(),
1377
- ownership: CartModel.Ownership1().required(),
1378
- post_order_action: CartModel.PromotionAction(),
3495
+ ownership: CartPlatformModel.Ownership1().required(),
3496
+ post_order_action: CartPlatformModel.PromotionAction(),
1379
3497
  promo_group: Joi.string().allow("").required(),
1380
3498
  promotion_type: Joi.string().allow("").required(),
1381
- restrictions: CartModel.Restrictions1(),
3499
+ restrictions: CartPlatformModel.Restrictions1(),
1382
3500
  stackable: Joi.boolean(),
1383
- visiblility: CartModel.Visibility(),
3501
+ visiblility: CartPlatformModel.Visibility(),
1384
3502
  });
1385
3503
  }
3504
+
3505
+ /** @returns {PromotionPartialUpdate} */
1386
3506
  static PromotionPartialUpdate() {
1387
3507
  return Joi.object({
1388
3508
  archive: Joi.boolean(),
1389
- schedule: CartModel.PromotionSchedule(),
3509
+ schedule: CartPlatformModel.PromotionSchedule(),
1390
3510
  });
1391
3511
  }
3512
+
3513
+ /** @returns {PromotionPaymentModes} */
1392
3514
  static PromotionPaymentModes() {
1393
3515
  return Joi.object({
1394
3516
  codes: Joi.array().items(Joi.string().allow("")),
1395
3517
  type: Joi.string().allow("").required(),
1396
- uses: CartModel.PaymentAllowValue1(),
3518
+ uses: CartPlatformModel.PaymentAllowValue1(),
1397
3519
  });
1398
3520
  }
3521
+
3522
+ /** @returns {PromotionSchedule} */
1399
3523
  static PromotionSchedule() {
1400
3524
  return Joi.object({
1401
3525
  cron: Joi.string().allow("").allow(null),
@@ -1406,40 +3530,48 @@ class CartModel {
1406
3530
  start: Joi.string().allow("").required(),
1407
3531
  });
1408
3532
  }
3533
+
3534
+ /** @returns {PromotionsResponse} */
1409
3535
  static PromotionsResponse() {
1410
3536
  return Joi.object({
1411
- items: Joi.array().items(CartModel.PromotionListItem()),
1412
- page: CartModel.Page(),
3537
+ items: Joi.array().items(CartPlatformModel.PromotionListItem()),
3538
+ page: CartPlatformModel.Page(),
1413
3539
  });
1414
3540
  }
3541
+
3542
+ /** @returns {PromotionUpdate} */
1415
3543
  static PromotionUpdate() {
1416
3544
  return Joi.object({
1417
3545
  _custom_json: Joi.any(),
1418
- _schedule: CartModel.PromotionSchedule(),
3546
+ _schedule: CartPlatformModel.PromotionSchedule(),
1419
3547
  application_id: Joi.string().allow("").required(),
1420
3548
  apply_all_discount: Joi.boolean(),
1421
3549
  apply_exclusive: Joi.string().allow("").allow(null),
1422
3550
  apply_priority: Joi.number(),
1423
- author: CartModel.PromotionAuthor(),
3551
+ author: CartPlatformModel.PromotionAuthor(),
1424
3552
  buy_rules: Joi.object()
1425
- .pattern(/\S/, CartModel.ItemCriteria())
3553
+ .pattern(/\S/, CartPlatformModel.ItemCriteria())
1426
3554
  .required(),
1427
3555
  calculate_on: Joi.string().allow(""),
1428
3556
  code: Joi.string().allow(""),
1429
3557
  currency: Joi.string().allow(""),
1430
- date_meta: CartModel.PromotionDateMeta(),
1431
- discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
1432
- display_meta: CartModel.DisplayMeta1().required(),
3558
+ date_meta: CartPlatformModel.PromotionDateMeta(),
3559
+ discount_rules: Joi.array()
3560
+ .items(CartPlatformModel.DiscountRule())
3561
+ .required(),
3562
+ display_meta: CartPlatformModel.DisplayMeta1().required(),
1433
3563
  mode: Joi.string().allow("").required(),
1434
- ownership: CartModel.Ownership1().required(),
1435
- post_order_action: CartModel.PromotionAction(),
3564
+ ownership: CartPlatformModel.Ownership1().required(),
3565
+ post_order_action: CartPlatformModel.PromotionAction(),
1436
3566
  promo_group: Joi.string().allow("").required(),
1437
3567
  promotion_type: Joi.string().allow("").required(),
1438
- restrictions: CartModel.Restrictions1(),
3568
+ restrictions: CartPlatformModel.Restrictions1(),
1439
3569
  stackable: Joi.boolean(),
1440
- visiblility: CartModel.Visibility(),
3570
+ visiblility: CartPlatformModel.Visibility(),
1441
3571
  });
1442
3572
  }
3573
+
3574
+ /** @returns {RawBreakup} */
1443
3575
  static RawBreakup() {
1444
3576
  return Joi.object({
1445
3577
  cod_charge: Joi.number(),
@@ -1457,34 +3589,40 @@ class CartModel {
1457
3589
  you_saved: Joi.number(),
1458
3590
  });
1459
3591
  }
3592
+
3593
+ /** @returns {Restrictions} */
1460
3594
  static Restrictions() {
1461
3595
  return Joi.object({
1462
- bulk_bundle: CartModel.BulkBundleRestriction(),
3596
+ bulk_bundle: CartPlatformModel.BulkBundleRestriction(),
1463
3597
  coupon_allowed: Joi.boolean(),
1464
3598
  ordering_stores: Joi.array().items(Joi.number()),
1465
- payments: Joi.object().pattern(/\S/, CartModel.PaymentModes()),
3599
+ payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
1466
3600
  platforms: Joi.array().items(Joi.string().allow("")),
1467
- post_order: CartModel.PostOrder(),
1468
- price_range: CartModel.PriceRange(),
3601
+ post_order: CartPlatformModel.PostOrder(),
3602
+ price_range: CartPlatformModel.PriceRange(),
1469
3603
  user_groups: Joi.array().items(Joi.number()),
1470
3604
  user_type: Joi.string().allow(""),
1471
- uses: CartModel.UsesRestriction(),
3605
+ uses: CartPlatformModel.UsesRestriction(),
1472
3606
  });
1473
3607
  }
3608
+
3609
+ /** @returns {Restrictions1} */
1474
3610
  static Restrictions1() {
1475
3611
  return Joi.object({
1476
3612
  anonymous_users: Joi.boolean(),
1477
3613
  order_quantity: Joi.number(),
1478
3614
  ordering_stores: Joi.array().items(Joi.number()),
1479
- payments: Joi.array().items(CartModel.PromotionPaymentModes()),
3615
+ payments: Joi.array().items(CartPlatformModel.PromotionPaymentModes()),
1480
3616
  platforms: Joi.array().items(Joi.string().allow("")),
1481
- post_order: CartModel.PostOrder1(),
3617
+ post_order: CartPlatformModel.PostOrder1(),
1482
3618
  user_groups: Joi.array().items(Joi.number()),
1483
3619
  user_id: Joi.array().items(Joi.string().allow("")),
1484
- user_registered: CartModel.UserRegistered(),
1485
- uses: CartModel.UsesRestriction1().required(),
3620
+ user_registered: Joi.any().allow(null),
3621
+ uses: CartPlatformModel.UsesRestriction1().required(),
1486
3622
  });
1487
3623
  }
3624
+
3625
+ /** @returns {Rule} */
1488
3626
  static Rule() {
1489
3627
  return Joi.object({
1490
3628
  discount_qty: Joi.number(),
@@ -1494,6 +3632,8 @@ class CartModel {
1494
3632
  value: Joi.number(),
1495
3633
  });
1496
3634
  }
3635
+
3636
+ /** @returns {RuleDefinition} */
1497
3637
  static RuleDefinition() {
1498
3638
  return Joi.object({
1499
3639
  applicable_on: Joi.string().allow("").required(),
@@ -1506,6 +3646,8 @@ class CartModel {
1506
3646
  value_type: Joi.string().allow("").required(),
1507
3647
  });
1508
3648
  }
3649
+
3650
+ /** @returns {SaveAddressResponse} */
1509
3651
  static SaveAddressResponse() {
1510
3652
  return Joi.object({
1511
3653
  id: Joi.string().allow(""),
@@ -1513,29 +3655,33 @@ class CartModel {
1513
3655
  success: Joi.boolean(),
1514
3656
  });
1515
3657
  }
3658
+
3659
+ /** @returns {SharedCart} */
1516
3660
  static SharedCart() {
1517
3661
  return Joi.object({
1518
- breakup_values: CartModel.CartBreakup(),
3662
+ breakup_values: CartPlatformModel.CartBreakup(),
1519
3663
  buy_now: Joi.boolean(),
1520
3664
  cart_id: Joi.number(),
1521
3665
  checkout_mode: Joi.string().allow(""),
1522
3666
  comment: Joi.string().allow(""),
1523
3667
  coupon_text: Joi.string().allow(""),
1524
- currency: CartModel.CartCurrency(),
3668
+ currency: CartPlatformModel.CartCurrency(),
1525
3669
  delivery_charge_info: Joi.string().allow(""),
1526
- delivery_promise: CartModel.ShipmentPromise(),
3670
+ delivery_promise: CartPlatformModel.ShipmentPromise(),
1527
3671
  gstin: Joi.string().allow(""),
1528
3672
  id: Joi.string().allow(""),
1529
3673
  is_valid: Joi.boolean(),
1530
- items: Joi.array().items(CartModel.CartProductInfo()),
3674
+ items: Joi.array().items(CartPlatformModel.CartProductInfo()),
1531
3675
  last_modified: Joi.string().allow(""),
1532
3676
  message: Joi.string().allow(""),
1533
- payment_selection_lock: CartModel.PaymentSelectionLock(),
3677
+ payment_selection_lock: CartPlatformModel.PaymentSelectionLock(),
1534
3678
  restrict_checkout: Joi.boolean(),
1535
- shared_cart_details: CartModel.SharedCartDetails(),
3679
+ shared_cart_details: CartPlatformModel.SharedCartDetails(),
1536
3680
  uid: Joi.string().allow(""),
1537
3681
  });
1538
3682
  }
3683
+
3684
+ /** @returns {SharedCartDetails} */
1539
3685
  static SharedCartDetails() {
1540
3686
  return Joi.object({
1541
3687
  created_on: Joi.string().allow(""),
@@ -1545,12 +3691,16 @@ class CartModel {
1545
3691
  user: Joi.any(),
1546
3692
  });
1547
3693
  }
3694
+
3695
+ /** @returns {SharedCartResponse} */
1548
3696
  static SharedCartResponse() {
1549
3697
  return Joi.object({
1550
- cart: CartModel.SharedCart(),
3698
+ cart: CartPlatformModel.SharedCart(),
1551
3699
  error: Joi.string().allow(""),
1552
3700
  });
1553
3701
  }
3702
+
3703
+ /** @returns {ShipmentArticle} */
1554
3704
  static ShipmentArticle() {
1555
3705
  return Joi.object({
1556
3706
  article_id: Joi.string().allow(""),
@@ -1558,12 +3708,16 @@ class CartModel {
1558
3708
  quantity: Joi.string().allow(""),
1559
3709
  });
1560
3710
  }
3711
+
3712
+ /** @returns {ShipmentPromise} */
1561
3713
  static ShipmentPromise() {
1562
3714
  return Joi.object({
1563
- formatted: CartModel.PromiseFormatted(),
1564
- timestamp: CartModel.PromiseTimestamp(),
3715
+ formatted: CartPlatformModel.PromiseFormatted(),
3716
+ timestamp: CartPlatformModel.PromiseTimestamp(),
1565
3717
  });
1566
3718
  }
3719
+
3720
+ /** @returns {ShippingAddress} */
1567
3721
  static ShippingAddress() {
1568
3722
  return Joi.object({
1569
3723
  address: Joi.string().allow(""),
@@ -1585,6 +3739,8 @@ class CartModel {
1585
3739
  state: Joi.string().allow("").allow(null),
1586
3740
  });
1587
3741
  }
3742
+
3743
+ /** @returns {StaffCheckout} */
1588
3744
  static StaffCheckout() {
1589
3745
  return Joi.object({
1590
3746
  _id: Joi.string().allow("").required(),
@@ -1594,6 +3750,8 @@ class CartModel {
1594
3750
  user: Joi.string().allow("").required(),
1595
3751
  });
1596
3752
  }
3753
+
3754
+ /** @returns {State} */
1597
3755
  static State() {
1598
3756
  return Joi.object({
1599
3757
  is_archived: Joi.boolean(),
@@ -1601,11 +3759,15 @@ class CartModel {
1601
3759
  is_public: Joi.boolean(),
1602
3760
  });
1603
3761
  }
3762
+
3763
+ /** @returns {StoreDetailsResponse} */
1604
3764
  static StoreDetailsResponse() {
1605
3765
  return Joi.object({
1606
- items: Joi.array().items(CartModel.PickupStoreDetail()),
3766
+ items: Joi.array().items(CartPlatformModel.PickupStoreDetail()),
1607
3767
  });
1608
3768
  }
3769
+
3770
+ /** @returns {StoreInfo} */
1609
3771
  static StoreInfo() {
1610
3772
  return Joi.object({
1611
3773
  name: Joi.string().allow(""),
@@ -1613,17 +3775,23 @@ class CartModel {
1613
3775
  uid: Joi.number(),
1614
3776
  });
1615
3777
  }
3778
+
3779
+ /** @returns {SuccessMessage} */
1616
3780
  static SuccessMessage() {
1617
3781
  return Joi.object({
1618
3782
  message: Joi.string().allow(""),
1619
3783
  success: Joi.boolean(),
1620
3784
  });
1621
3785
  }
3786
+
3787
+ /** @returns {Tags} */
1622
3788
  static Tags() {
1623
3789
  return Joi.object({
1624
3790
  tags: Joi.any(),
1625
3791
  });
1626
3792
  }
3793
+
3794
+ /** @returns {UpdateAddressResponse} */
1627
3795
  static UpdateAddressResponse() {
1628
3796
  return Joi.object({
1629
3797
  id: Joi.string().allow(""),
@@ -1632,13 +3800,17 @@ class CartModel {
1632
3800
  success: Joi.boolean(),
1633
3801
  });
1634
3802
  }
3803
+
3804
+ /** @returns {UpdateCartDetailResponse} */
1635
3805
  static UpdateCartDetailResponse() {
1636
3806
  return Joi.object({
1637
- cart: CartModel.CartDetailResponse(),
3807
+ cart: CartPlatformModel.CartDetailResponse(),
1638
3808
  message: Joi.string().allow(""),
1639
3809
  success: Joi.boolean(),
1640
3810
  });
1641
3811
  }
3812
+
3813
+ /** @returns {UpdateCartPaymentRequest} */
1642
3814
  static UpdateCartPaymentRequest() {
1643
3815
  return Joi.object({
1644
3816
  address_id: Joi.string().allow(""),
@@ -1649,6 +3821,8 @@ class CartModel {
1649
3821
  payment_mode: Joi.string().allow(""),
1650
3822
  });
1651
3823
  }
3824
+
3825
+ /** @returns {UpdateCartPaymentRequestV2} */
1652
3826
  static UpdateCartPaymentRequestV2() {
1653
3827
  return Joi.object({
1654
3828
  address_id: Joi.string().allow(""),
@@ -1656,16 +3830,20 @@ class CartModel {
1656
3830
  id: Joi.string().allow(""),
1657
3831
  merchant_code: Joi.string().allow(""),
1658
3832
  payment_identifier: Joi.string().allow("").allow(null),
1659
- payment_methods: Joi.array().items(CartModel.PaymentMethod()),
3833
+ payment_methods: Joi.array().items(CartPlatformModel.PaymentMethod()),
1660
3834
  payment_mode: Joi.string().allow(""),
1661
3835
  });
1662
3836
  }
3837
+
3838
+ /** @returns {UpdateCartRequest} */
1663
3839
  static UpdateCartRequest() {
1664
3840
  return Joi.object({
1665
- items: Joi.array().items(CartModel.UpdateProductCart()),
3841
+ items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
1666
3842
  operation: Joi.string().allow("").required(),
1667
3843
  });
1668
3844
  }
3845
+
3846
+ /** @returns {UpdateCartShipmentItem} */
1669
3847
  static UpdateCartShipmentItem() {
1670
3848
  return Joi.object({
1671
3849
  article_uid: Joi.string().allow("").required(),
@@ -1673,19 +3851,23 @@ class CartModel {
1673
3851
  shipment_type: Joi.string().allow("").required(),
1674
3852
  });
1675
3853
  }
3854
+
3855
+ /** @returns {UpdateCartShipmentRequest} */
1676
3856
  static UpdateCartShipmentRequest() {
1677
3857
  return Joi.object({
1678
3858
  shipments: Joi.array()
1679
- .items(CartModel.UpdateCartShipmentItem())
3859
+ .items(CartPlatformModel.UpdateCartShipmentItem())
1680
3860
  .required(),
1681
3861
  });
1682
3862
  }
3863
+
3864
+ /** @returns {UpdateProductCart} */
1683
3865
  static UpdateProductCart() {
1684
3866
  return Joi.object({
1685
3867
  _custom_json: Joi.any(),
1686
3868
  article_id: Joi.string().allow(""),
1687
3869
  extra_meta: Joi.any(),
1688
- identifiers: CartModel.CartProductIdentifer().required(),
3870
+ identifiers: CartPlatformModel.CartProductIdentifer().required(),
1689
3871
  item_id: Joi.number(),
1690
3872
  item_index: Joi.number(),
1691
3873
  item_size: Joi.string().allow(""),
@@ -1694,35 +3876,43 @@ class CartModel {
1694
3876
  quantity: Joi.number(),
1695
3877
  });
1696
3878
  }
3879
+
3880
+ /** @returns {UpdateUserCartMapping} */
1697
3881
  static UpdateUserCartMapping() {
1698
3882
  return Joi.object({
1699
3883
  user_id: Joi.string().allow("").required(),
1700
3884
  });
1701
3885
  }
3886
+
3887
+ /** @returns {UserCartMappingResponse} */
1702
3888
  static UserCartMappingResponse() {
1703
3889
  return Joi.object({
1704
- applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
1705
- breakup_values: CartModel.CartBreakup(),
3890
+ applied_promo_details: Joi.array().items(
3891
+ CartPlatformModel.AppliedPromotion()
3892
+ ),
3893
+ breakup_values: CartPlatformModel.CartBreakup(),
1706
3894
  buy_now: Joi.boolean(),
1707
3895
  checkout_mode: Joi.string().allow(""),
1708
3896
  comment: Joi.string().allow(""),
1709
3897
  coupon_text: Joi.string().allow(""),
1710
- currency: CartModel.CartCurrency(),
3898
+ currency: CartPlatformModel.CartCurrency(),
1711
3899
  delivery_charge_info: Joi.string().allow(""),
1712
- delivery_promise: CartModel.ShipmentPromise(),
3900
+ delivery_promise: CartPlatformModel.ShipmentPromise(),
1713
3901
  gstin: Joi.string().allow(""),
1714
3902
  id: Joi.string().allow(""),
1715
3903
  is_valid: Joi.boolean(),
1716
- items: Joi.array().items(CartModel.CartProductInfo()),
3904
+ items: Joi.array().items(CartPlatformModel.CartProductInfo()),
1717
3905
  last_modified: Joi.string().allow(""),
1718
3906
  message: Joi.string().allow(""),
1719
3907
  pan_config: Joi.any(),
1720
3908
  pan_no: Joi.string().allow(""),
1721
- payment_selection_lock: CartModel.PaymentSelectionLock(),
3909
+ payment_selection_lock: CartPlatformModel.PaymentSelectionLock(),
1722
3910
  restrict_checkout: Joi.boolean(),
1723
- user: CartModel.UserInfo(),
3911
+ user: CartPlatformModel.UserInfo(),
1724
3912
  });
1725
3913
  }
3914
+
3915
+ /** @returns {UserInfo} */
1726
3916
  static UserInfo() {
1727
3917
  return Joi.object({
1728
3918
  _id: Joi.string().allow(""),
@@ -1736,12 +3926,16 @@ class CartModel {
1736
3926
  uid: Joi.string().allow(""),
1737
3927
  });
1738
3928
  }
3929
+
3930
+ /** @returns {UserRegistered} */
1739
3931
  static UserRegistered() {
1740
3932
  return Joi.object({
1741
3933
  end: Joi.string().allow("").allow(null),
1742
3934
  start: Joi.string().allow("").allow(null),
1743
3935
  });
1744
3936
  }
3937
+
3938
+ /** @returns {UsesRemaining} */
1745
3939
  static UsesRemaining() {
1746
3940
  return Joi.object({
1747
3941
  app: Joi.number(),
@@ -1749,24 +3943,32 @@ class CartModel {
1749
3943
  user: Joi.number(),
1750
3944
  });
1751
3945
  }
3946
+
3947
+ /** @returns {UsesRemaining1} */
1752
3948
  static UsesRemaining1() {
1753
3949
  return Joi.object({
1754
3950
  total: Joi.number(),
1755
3951
  user: Joi.number(),
1756
3952
  });
1757
3953
  }
3954
+
3955
+ /** @returns {UsesRestriction} */
1758
3956
  static UsesRestriction() {
1759
3957
  return Joi.object({
1760
- maximum: CartModel.UsesRemaining(),
1761
- remaining: CartModel.UsesRemaining(),
3958
+ maximum: CartPlatformModel.UsesRemaining(),
3959
+ remaining: CartPlatformModel.UsesRemaining(),
1762
3960
  });
1763
3961
  }
3962
+
3963
+ /** @returns {UsesRestriction1} */
1764
3964
  static UsesRestriction1() {
1765
3965
  return Joi.object({
1766
- maximum: CartModel.UsesRemaining1(),
1767
- remaining: CartModel.UsesRemaining1(),
3966
+ maximum: CartPlatformModel.UsesRemaining1(),
3967
+ remaining: CartPlatformModel.UsesRemaining1(),
1768
3968
  });
1769
3969
  }
3970
+
3971
+ /** @returns {Validation} */
1770
3972
  static Validation() {
1771
3973
  return Joi.object({
1772
3974
  anonymous: Joi.boolean(),
@@ -1774,11 +3976,15 @@ class CartModel {
1774
3976
  user_registered_after: Joi.string().allow("").allow(null),
1775
3977
  });
1776
3978
  }
3979
+
3980
+ /** @returns {Validity} */
1777
3981
  static Validity() {
1778
3982
  return Joi.object({
1779
3983
  priority: Joi.number(),
1780
3984
  });
1781
3985
  }
3986
+
3987
+ /** @returns {Visibility} */
1782
3988
  static Visibility() {
1783
3989
  return Joi.object({
1784
3990
  coupon_list: Joi.boolean().required(),
@@ -1786,4 +3992,4 @@ class CartModel {
1786
3992
  });
1787
3993
  }
1788
3994
  }
1789
- module.exports = CartModel;
3995
+ module.exports = CartPlatformModel;