@gofynd/fdk-client-javascript 1.4.15-beta.2 → 1.4.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/README.md +2 -2
  2. package/application.d.ts +1 -2
  3. package/application.js +2 -3
  4. package/index.d.ts +1 -2
  5. package/index.js +7 -1
  6. package/package.json +2 -3
  7. package/sdk/application/ApplicationClient.d.ts +2 -0
  8. package/sdk/application/ApplicationClient.js +2 -18
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +75 -90
  10. package/sdk/application/Cart/CartApplicationClient.js +108 -1199
  11. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +81 -142
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +41 -1344
  13. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
  14. package/sdk/application/Common/CommonApplicationClient.js +2 -92
  15. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
  16. package/sdk/application/Communication/CommunicationApplicationClient.js +3 -148
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
  18. package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -727
  19. package/sdk/application/Content/ContentApplicationClient.d.ts +48 -111
  20. package/sdk/application/Content/ContentApplicationClient.js +43 -1065
  21. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -13
  22. package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -138
  23. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  24. package/sdk/application/Finance/FinanceApplicationClient.js +105 -0
  25. package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
  26. package/sdk/application/Lead/LeadApplicationClient.js +5 -217
  27. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +42 -39
  28. package/sdk/application/Logistic/LogisticApplicationClient.js +91 -493
  29. package/sdk/application/Order/OrderApplicationClient.d.ts +36 -46
  30. package/sdk/application/Order/OrderApplicationClient.js +52 -507
  31. package/sdk/application/Payment/PaymentApplicationClient.d.ts +103 -213
  32. package/sdk/application/Payment/PaymentApplicationClient.js +84 -2105
  33. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -29
  34. package/sdk/application/Rewards/RewardsApplicationClient.js +8 -312
  35. package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
  36. package/sdk/application/Share/ShareApplicationClient.js +7 -309
  37. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
  38. package/sdk/application/Theme/ThemeApplicationClient.js +8 -176
  39. package/sdk/application/User/UserApplicationClient.d.ts +87 -138
  40. package/sdk/application/User/UserApplicationClient.js +44 -1820
  41. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
  42. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -52
  43. package/sdk/application/index.d.ts +0 -18
  44. package/sdk/application/index.js +0 -33
  45. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
  46. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
  47. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
  48. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
  49. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
  50. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
  51. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  52. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  53. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  54. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  55. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +157 -30
  56. package/sdk/partner/Logistics/LogisticsPartnerClient.js +1177 -56
  57. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1662 -249
  58. package/sdk/partner/Logistics/LogisticsPartnerModel.js +774 -162
  59. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
  60. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +141 -12
  61. package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
  62. package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
  63. package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
  64. package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
  65. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  66. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
  67. package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
  68. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
  69. package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
  70. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
  71. package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
  72. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
  73. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
  74. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
  75. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
  76. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
  77. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
  78. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
  79. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
  80. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  81. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  82. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  83. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  84. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  85. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  86. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  87. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  88. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
  89. package/sdk/platform/Cart/CartPlatformApplicationClient.js +407 -112
  90. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
  91. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
  92. package/sdk/platform/Cart/CartPlatformModel.d.ts +5060 -1300
  93. package/sdk/platform/Cart/CartPlatformModel.js +1985 -1217
  94. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
  95. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
  96. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
  97. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
  98. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +178 -117
  99. package/sdk/platform/Catalog/CatalogPlatformClient.js +468 -172
  100. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6554 -1772
  101. package/sdk/platform/Catalog/CatalogPlatformModel.js +3264 -1690
  102. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +116 -31
  103. package/sdk/platform/Catalog/CatalogPlatformValidator.js +85 -24
  104. package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
  105. package/sdk/platform/Common/CommonPlatformClient.js +3 -2
  106. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  107. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  108. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
  109. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  111. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  112. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
  113. package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
  114. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
  115. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  120. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
  121. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  124. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
  125. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
  126. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
  127. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
  128. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  129. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  130. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +122 -191
  131. package/sdk/platform/Content/ContentPlatformApplicationClient.js +447 -831
  132. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +174 -220
  133. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +164 -199
  134. package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
  135. package/sdk/platform/Content/ContentPlatformClient.js +523 -336
  136. package/sdk/platform/Content/ContentPlatformModel.d.ts +1233 -476
  137. package/sdk/platform/Content/ContentPlatformModel.js +514 -487
  138. package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
  139. package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
  140. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
  141. package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
  142. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  143. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  144. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  145. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  146. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +94 -36
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
  148. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
  149. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
  150. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
  151. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
  152. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
  153. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
  154. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  155. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  156. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  157. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  158. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  159. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  160. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +17 -6
  161. package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
  162. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
  163. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
  164. package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
  165. package/sdk/platform/Order/OrderPlatformClient.js +424 -198
  166. package/sdk/platform/Order/OrderPlatformModel.d.ts +7747 -1342
  167. package/sdk/platform/Order/OrderPlatformModel.js +3960 -1262
  168. package/sdk/platform/Order/OrderPlatformValidator.d.ts +292 -109
  169. package/sdk/platform/Order/OrderPlatformValidator.js +145 -77
  170. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
  171. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
  172. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  173. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  174. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
  175. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
  176. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  177. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  178. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  179. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  180. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +333 -319
  181. package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
  182. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  183. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  184. package/sdk/platform/PlatformClient.d.ts +0 -2
  185. package/sdk/platform/PlatformClient.js +0 -4
  186. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  187. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  188. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  189. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  190. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  191. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +46 -36
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +132 -41
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +132 -44
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +681 -64
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +2458 -650
  199. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1266 -572
  200. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +176 -47
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -28
  202. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
  203. package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
  204. package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
  205. package/sdk/platform/Share/SharePlatformModel.js +27 -4
  206. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  207. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
  208. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
  209. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
  210. package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
  211. package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
  212. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  213. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  214. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  215. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  216. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  217. package/sdk/platform/User/UserPlatformModel.js +23 -23
  218. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
  219. package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
  220. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
  221. package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
  222. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  223. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  224. package/sdk/platform/index.d.ts +0 -1
  225. package/sdk/platform/index.js +0 -2
  226. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
  227. package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -7
  228. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  229. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  230. package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
  231. package/sdk/public/Content/ContentPublicClient.js +795 -7
  232. package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
  233. package/sdk/public/Content/ContentPublicModel.js +649 -3
  234. package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
  235. package/sdk/public/Content/ContentPublicValidator.js +88 -2
  236. package/sdk/public/Partner/PartnerPublicClient.js +4 -2
  237. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  238. package/sdk/public/Webhook/WebhookPublicClient.js +12 -10
  239. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  240. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  241. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  242. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  243. package/sdk/application/Cart/CartApplicationModel.d.ts +0 -3994
  244. package/sdk/application/Cart/CartApplicationModel.js +0 -2497
  245. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -769
  246. package/sdk/application/Cart/CartApplicationValidator.js +0 -530
  247. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3857
  248. package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2629
  249. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
  250. package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
  251. package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
  252. package/sdk/application/Common/CommonApplicationModel.js +0 -308
  253. package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
  254. package/sdk/application/Common/CommonApplicationValidator.js +0 -38
  255. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
  256. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
  257. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
  258. package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
  259. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2556
  260. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1887
  261. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
  262. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
  263. package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2133
  264. package/sdk/application/Content/ContentApplicationModel.js +0 -1589
  265. package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -284
  266. package/sdk/application/Content/ContentApplicationValidator.js +0 -264
  267. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -272
  268. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -190
  269. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
  270. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
  271. package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
  272. package/sdk/application/Lead/LeadApplicationModel.js +0 -480
  273. package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
  274. package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
  275. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -1675
  276. package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1121
  277. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -254
  278. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -190
  279. package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2296
  280. package/sdk/application/Order/OrderApplicationModel.js +0 -1471
  281. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -265
  282. package/sdk/application/Order/OrderApplicationValidator.js +0 -197
  283. package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4058
  284. package/sdk/application/Payment/PaymentApplicationModel.js +0 -2630
  285. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
  286. package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
  287. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
  288. package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
  289. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
  290. package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
  291. package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
  292. package/sdk/application/Share/ShareApplicationModel.js +0 -234
  293. package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
  294. package/sdk/application/Share/ShareApplicationValidator.js +0 -91
  295. package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1713
  296. package/sdk/application/Theme/ThemeApplicationModel.js +0 -1426
  297. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -66
  298. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -58
  299. package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
  300. package/sdk/application/User/UserApplicationModel.js +0 -1382
  301. package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
  302. package/sdk/application/User/UserApplicationValidator.js +0 -573
  303. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -52
  304. package/sdk/application/Webhook/WebhookApplicationModel.js +0 -46
  305. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
  306. package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
  307. package/sdk/common/Clickstream.d.ts +0 -1
  308. package/sdk/common/Clickstream.js +0 -464
  309. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  310. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  311. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  312. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  313. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  314. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
@@ -1,2497 +0,0 @@
1
- const Joi = require("joi");
2
-
3
- /**
4
- * @typedef BuyRules
5
- * @property {Object} [item_criteria] - Item criteria of promotion.
6
- * @property {Object} [cart_conditions] - Cart conditions details for promotion.
7
- */
8
-
9
- /**
10
- * @typedef DiscountRulesApp
11
- * @property {string[]} [matched_buy_rules] - Matched buy rules for promotion.
12
- * @property {Object} [raw_offer] - Raw offer details for promotion.
13
- * @property {Object} [offer] - Offer for promotion.
14
- * @property {Object} [item_criteria] - Item criteria of promotion.
15
- */
16
-
17
- /**
18
- * @typedef Ownership
19
- * @property {string} [payable_category] - Promotion amount payable category.
20
- * @property {string} [payable_by] - Promotion amount bearable party.
21
- */
22
-
23
- /**
24
- * @typedef AppliedFreeArticles
25
- * @property {FreeGiftItems} [free_gift_item_details] - Free gift items details.
26
- * @property {string} [parent_item_identifier] - Parent item identifier for free article.
27
- * @property {number} [quantity] - Quantity of free articles.
28
- * @property {string} [article_id] - IDs of free articles.
29
- */
30
-
31
- /**
32
- * @typedef AppliedPromotion
33
- * @property {string} [promo_id] - Promotion id.
34
- * @property {BuyRules[]} [buy_rules] - Buy rules for promotions.
35
- * @property {string} [offer_text] - Offer text of current promotion.
36
- * @property {string} [promotion_group] - Promotion group for the promotion.
37
- * @property {boolean} [mrp_promotion] - If applied promotion is applied on
38
- * product MRP or ESP.
39
- * @property {string} [promotion_name] - Promotion name of current promotion.
40
- * @property {number} [amount] - Per unit discount amount applied with current promotion.
41
- * @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions.
42
- * @property {Ownership} [ownership] - Ownership of promotion.
43
- * @property {number} [article_quantity] - Quantity of article on which
44
- * promotion is applicable.
45
- * @property {AppliedFreeArticles[]} [applied_free_articles] - Applied free
46
- * article for free gift item promotions.
47
- * @property {string} [promotion_type] - Promotion type of current promotion.
48
- * @property {Object} [meta] - Meta object for extra data.
49
- * @property {string} [code] - Promotion code.
50
- */
51
-
52
- /**
53
- * @typedef PaymentSelectionLock
54
- * @property {boolean} [enabled] - Denotes if default payment selection is enable.
55
- * @property {string} [default_options] - Default Selection Payment Mode.
56
- * @property {string} [payment_identifier] - Identifier for Payment Mode.
57
- */
58
-
59
- /**
60
- * @typedef PromiseFormatted
61
- * @property {string} [max] - Maximum Delivery promise formatted timestamp.
62
- * @property {string} [min] - Minimum Delivery promise formatted timestamp.
63
- */
64
-
65
- /**
66
- * @typedef PromiseISOFormat
67
- * @property {string} [max] - Max promise in ISO format.
68
- * @property {string} [min] - Min Promise in ISO format.
69
- */
70
-
71
- /**
72
- * @typedef PromiseTimestamp
73
- * @property {number} [max] - Maximum Promise for the shipment.
74
- * @property {number} [min] - Minimum delivery promise time for the shipment.
75
- */
76
-
77
- /**
78
- * @typedef ShipmentPromise
79
- * @property {PromiseFormatted} [formatted]
80
- * @property {PromiseTimestamp} [timestamp]
81
- * @property {PromiseISOFormat} [iso]
82
- */
83
-
84
- /**
85
- * @typedef BasePrice
86
- * @property {number} [effective] - Current per unit price of product after
87
- * existing deductions.
88
- * @property {string} [currency_symbol] - Currency symbol of the currncy used for price.
89
- * @property {number} [marked] - Original price of product.
90
- * @property {string} [currency_code] - Currency code for all amounts.
91
- */
92
-
93
- /**
94
- * @typedef ArticlePriceInfo
95
- * @property {BasePrice} [base]
96
- * @property {BasePrice} [converted]
97
- */
98
-
99
- /**
100
- * @typedef BaseInfo
101
- * @property {number} [uid] - Unique identifier of entities like brand or seller.
102
- * @property {string} [name] - Name of entities like brand or seller.
103
- */
104
-
105
- /**
106
- * @typedef StoreInfo
107
- * @property {string} [store_code] - A unique code or identifier for the store,
108
- * often used for internal reference.
109
- * @property {number} [uid] - Unique identifiers of the store from where product
110
- * is fulfileld.
111
- * @property {string} [name] - Store name of the store from where the product is
112
- * fulfiled .
113
- */
114
-
115
- /**
116
- * @typedef ProductArticle
117
- * @property {ArticlePriceInfo} [price]
118
- * @property {string[]} [product_group_tags] - List fot the unique identifier
119
- * for the product grouping.
120
- * @property {Object} [extra_meta] - Field to update extra meta of the article in cart.
121
- * @property {number} [quantity] - Quantity of the article added in cart.
122
- * @property {Object} [_custom_json] - Field to update custom json of the article in cart.
123
- * @property {Object} [meta] - Article meta data.
124
- * @property {string} [size] - Size of the article added in cart.
125
- * @property {number} [mto_quantity] - Quantity of the product which will
126
- * specially manufactured as not available in stock.
127
- * @property {BaseInfo} [seller]
128
- * @property {string} [seller_identifier] - List of identifiers used by sellers
129
- * for the product size.
130
- * @property {Object} [parent_item_identifiers] - Fields to determine parent
131
- * product of the product.
132
- * @property {Object} [identifier] - Unique identifier of the article.
133
- * @property {StoreInfo} [store]
134
- * @property {Object} [cart_item_meta] - Meta details of the article added from cart.
135
- * @property {string} [uid] - This unique identifier is assigned to the specific
136
- * article. This represents item x size x location.
137
- * @property {Object} [gift_card] - Gift card detail if gift card applied to the
138
- * product which indicates gift price, gift applicable flag and display
139
- * message for the gift.
140
- * @property {boolean} [is_gift_visible] - Whether the product can be purchased
141
- * as a gift. It is true if the product is available for gifting and false otherwise.
142
- * @property {string} [type] - Type of the data sent in response. Possible value
143
- * is article.
144
- * @property {string[]} [tags] - A list of article tags.
145
- */
146
-
147
- /**
148
- * @typedef CartProductIdentifer
149
- * @property {string} [identifier] - Article idenfier generated by cart.
150
- */
151
-
152
- /**
153
- * @typedef PromoMeta
154
- * @property {string} [message] - Loyalty points message denotes how much
155
- * loyalty points and applied and how much left with the user.
156
- */
157
-
158
- /**
159
- * @typedef ChargesAmount
160
- * @property {number} [value] - This is the value of amount added.
161
- * @property {string} [currency] - This is destination currency of value.
162
- */
163
-
164
- /**
165
- * @typedef Charges
166
- * @property {Object} [meta] - Meta data realted to charges price adjustment.
167
- * @property {ChargesAmount} [amount]
168
- * @property {string} [name] - Name of the charge applied.
169
- * @property {boolean} [allow_refund] - Whether refund is allowed or not for the charge.
170
- * @property {string} [code] - Code of the charge applied.
171
- * @property {string} [type] - Type of the charge applied.
172
- */
173
-
174
- /**
175
- * @typedef ProductPrice
176
- * @property {string} [currency_symbol] - Currency symbol of the price defined
177
- * for the product.
178
- * @property {number} [selling] - Selling price of the product .
179
- * @property {string} [currency_code] - Currency code of the price defined for
180
- * the product.
181
- * @property {number} [add_on] - Price before promotion and coupon amount
182
- * applied for calculation.
183
- * @property {number} [effective] - Selling price of the product .
184
- * @property {number} [marked] - Maximum price of the product .
185
- */
186
-
187
- /**
188
- * @typedef ProductPriceInfo
189
- * @property {ProductPrice} [base]
190
- * @property {ProductPrice} [converted]
191
- */
192
-
193
- /**
194
- * @typedef ProductPricePerUnit
195
- * @property {string} [currency_symbol] - Currency symbol of the price defined
196
- * for the product.
197
- * @property {number} [selling_price] - Selling price of the product .
198
- * @property {string} [currency_code] - Currency code of the price defined for
199
- * the product.
200
- * @property {number} [add_on] - Price before promotion and coupon amount
201
- * applied for calculation.
202
- * @property {number} [effective] - Selling price of the product .
203
- * @property {number} [marked] - Maximum price of the product .
204
- */
205
-
206
- /**
207
- * @typedef ProductPricePerUnitInfo
208
- * @property {ProductPricePerUnit} [base]
209
- * @property {ProductPricePerUnit} [converted]
210
- */
211
-
212
- /**
213
- * @typedef ProductAvailabilitySize
214
- * @property {string} [display] - Display size of the product.
215
- * @property {string} [value] - Actual value of the size.
216
- * @property {boolean} [is_available] - Available flag for the size of the
217
- * product if that is available.
218
- */
219
-
220
- /**
221
- * @typedef ProductAvailability
222
- * @property {boolean} [out_of_stock] - Denotes if the product is available in stock.
223
- * @property {boolean} [deliverable] - Deliverable flag denotes if the product
224
- * is deliverable or not.
225
- * @property {ProductAvailabilitySize[]} [available_sizes] - Product sizes availability.
226
- * @property {boolean} [is_valid] - Valid flag for the product if the product
227
- * added in cart is valid to place the order.
228
- * @property {number} [other_store_quantity] - Quantity of the product available
229
- * on other store.
230
- * @property {string[]} [sizes] - All sizes of the product.
231
- */
232
-
233
- /**
234
- * @typedef ActionQuery
235
- * @property {string[]} [product_slug] - Contains list of product slug.
236
- */
237
-
238
- /**
239
- * @typedef ProductAction
240
- * @property {ActionQuery} [query]
241
- * @property {string} [url] - Url of the product to render the product .
242
- * @property {string} [type] - Type of action.
243
- */
244
-
245
- /**
246
- * @typedef Tags
247
- * @property {Object} [tags] - Tags is a lable or batch that is attached to a
248
- * product in cart.
249
- */
250
-
251
- /**
252
- * @typedef ProductImage
253
- * @property {string} [secure_url] - Secured url of the product image.
254
- * @property {string} [aspect_ratio] - Aspect ratio of the product image.
255
- * @property {string} [url] - Bucket link url for product image.
256
- */
257
-
258
- /**
259
- * @typedef CategoryInfo
260
- * @property {number} [uid] - Product Category Id.
261
- * @property {string} [name] - Category name of the product .
262
- */
263
-
264
- /**
265
- * @typedef CartProduct
266
- * @property {Object} [_custom_json] - Field to add custom json of the product in cart.
267
- * @property {BaseInfo} [brand]
268
- * @property {ProductAction} [action]
269
- * @property {Tags} [teaser_tag]
270
- * @property {string} [slug] - Unique product url name generated via product
271
- * name and other meta data.
272
- * @property {ProductImage[]} [images] - Product Images urls of different types
273
- * like secure url, aspect ration url and url.
274
- * @property {number} [uid] - Unique identifier of the product in cart.
275
- * @property {string} [name] - Product name of the product in cart which is
276
- * defined on platform.
277
- * @property {string} [item_code] - Product code of the product while defining
278
- * product on platform.
279
- * @property {CategoryInfo[]} [categories] - Product category information which
280
- * incldes category name and category id.
281
- * @property {string[]} [tags] - Products tags that are added to each product to
282
- * identify the set of products.
283
- * @property {string} [type] - Type of product in cart.
284
- * @property {Object} [attributes] - Product attributes defined on platform.
285
- */
286
-
287
- /**
288
- * @typedef CouponDetails
289
- * @property {number} [discount_single_quantity] - Discout amount applied from
290
- * coupon for single quantity of the product.
291
- * @property {string} [code] - Coupon code of the coupon applied.
292
- * @property {number} [discount_total_quantity] - Total discount earned from
293
- * coupon applied to cart.
294
- */
295
-
296
- /**
297
- * @typedef CartProductInfo
298
- * @property {ProductArticle} [article]
299
- * @property {Object} [moq] - An Integer indication the Minimum Order Quantity
300
- * of a product, e.g. 100.
301
- * @property {CartProductIdentifer} identifiers
302
- * @property {PromoMeta} [promo_meta]
303
- * @property {ProductPriceInfo} [price]
304
- * @property {number} [quantity] - Quantity of the product added in cart.
305
- * @property {Charges[]} [charges] - Charges information which denotes types of
306
- * charges and amount of charge applied to that product in cart.
307
- * @property {string} [discount] - Discount amount of the product in cart.
308
- * @property {ProductAvailability} [availability]
309
- * @property {ShipmentPromise} [delivery_promise]
310
- * @property {CartProduct} [product]
311
- * @property {string} [product_ean_id] - European Article Number of the product
312
- * (limited upto 50 EAN identifier in a single request).
313
- * @property {Object} [bulk_offer] - Bulk offer information for the product
314
- * which denotes if any bulk offer is applied to the product in cart.
315
- * @property {Object} [parent_item_identifiers] - Parent item information of the
316
- * product which identifies the parent of the product in cart.
317
- * @property {CouponDetails} [coupon]
318
- * @property {Object} [custom_order] - Whether MTO (Make to Order) is enabled or not.
319
- * @property {string} [coupon_message] - Message for the coupon denotes which
320
- * coupon is applied and empty if not applied.
321
- * @property {string} [key] - The attribute key associated with the size.
322
- * @property {string} [message] - Product level message which denotes error
323
- * information to display over the product in cart.
324
- * @property {boolean} [is_set] - Whether or not the product is a set of items.
325
- * @property {ProductPricePerUnitInfo} [price_per_unit]
326
- * @property {AppliedPromotion[]} [promotions_applied] - List of applicable
327
- * promotion for the product in cart.
328
- */
329
-
330
- /**
331
- * @typedef DisplayBreakup
332
- * @property {string} [currency_symbol] - Currency symbol for the price.
333
- * @property {string} [key] - Key of the price like total_mrp, total, subtotal etc.
334
- * @property {string} [display] - Display key field that to be shown against the value.
335
- * @property {string[]} [message] - List of message at price level to be displayed.
336
- * @property {string} [currency_code] - Currency code for the price .
337
- * @property {number} [value] - Numeric value of the price.
338
- * @property {number} [preset] - Value for the price which is set from platform
339
- * if applicable.
340
- */
341
-
342
- /**
343
- * @typedef RawBreakup
344
- * @property {number} [vog] - Total value of goods after all discount, coupons
345
- * and promotion applied of all products in cart.
346
- * @property {number} [subtotal] - Selling price amount of all products in cart.
347
- * @property {number} [fynd_cash] - Loyalty points applied on cart.
348
- * @property {number} [discount] - Discount amount recieved on cart.
349
- * @property {number} [convenience_fee] - Convenience fee amount applied to cart.
350
- * @property {number} [delivery_charge] - Delivery charge applied to cart.
351
- * @property {number} [gst_charges] - GST charges applied on cart.
352
- * @property {number} [mrp_total] - Maximum price total amount of all products in cart.
353
- * @property {number} [mop_total] - Total of payment modes by which payment is
354
- * going to be done.
355
- * @property {number} [total_charge] - Total amount of charges applied on cart.
356
- * @property {number} [coupon] - Coupon amount applied to cart.
357
- * @property {number} [total] - Total payable amount by the customer.
358
- * @property {number} [gift_card] - Gift cart amount applied on cart.
359
- * @property {number} [you_saved] - Total amount will be saved if customer
360
- * places the order.
361
- * @property {number} [cod_charge] - Cod charge value applied to cart. This is
362
- * applied when user select payment mode as COD.
363
- */
364
-
365
- /**
366
- * @typedef CouponBreakup
367
- * @property {number} [coupon_value] - Value of the coupon applied to cart.
368
- * @property {string} [title] - Coupon Title of the coupon applied denotes name
369
- * of the coupon.
370
- * @property {string} [sub_title] - Coupon subtitle of the coupon applied to
371
- * cart which is used to display.
372
- * @property {number} [minimum_cart_value] - Minumum cart value of cart after
373
- * which the coupon can be applied.
374
- * @property {string} [message] - Coupon message of the coupon applied to cart.
375
- * @property {string} [coupon_type] - Type of the coupon applied to cart.
376
- * @property {string} [uid] - Unique identifier of the coupon applied to cart.
377
- * @property {number} [value] - Coupon value of the coupon applied to cart.
378
- * @property {number} [max_discount_value] - Maximum discount value of the
379
- * coupon applied to cart.
380
- * @property {boolean} [is_applied] - Applied flag which denotes if any coupon
381
- * is applied to cart.
382
- * @property {string} [description] - Coupon description of the coupon applied to cart.
383
- * @property {string} [code] - Coupon code of the coupon applied.
384
- * @property {string} [type] - Type of the coupon applied to cart.
385
- */
386
-
387
- /**
388
- * @typedef LoyaltyPoints
389
- * @property {number} [total] - Total loyalty points available with user.
390
- * @property {string} [description] - Description for loyalty points.
391
- * @property {number} [applicable] - Whether the loyalty points are applicable
392
- * for the cart .
393
- * @property {boolean} [is_applied] - Whether the loyalty points are applied on the cart .
394
- */
395
-
396
- /**
397
- * @typedef CartBreakup
398
- * @property {DisplayBreakup[]} [display] - List of breakup data which is used
399
- * to display the breakup to the customer like MRP total, Discount, Sub total,
400
- * coupon value, promotion value and final total.
401
- * @property {RawBreakup} [raw]
402
- * @property {CouponBreakup} [coupon]
403
- * @property {LoyaltyPoints} [loyalty_points]
404
- */
405
-
406
- /**
407
- * @typedef CartCurrency
408
- * @property {string} [code] - Currency code defined by ISO 4217:2015.
409
- * @property {string} [symbol] - Currency symbol for currency of user cart prices.
410
- */
411
-
412
- /**
413
- * @typedef CartDetailCoupon
414
- * @property {number} [cashback_amount] - Fields denotes cashback amount applied to cart.
415
- * @property {string} [cashback_message_primary] - Primary cashback message for
416
- * coupon applied to cart.
417
- * @property {string} [cashback_message_secondary] - Secondary cashback message
418
- * for coupon applied to cart.
419
- * @property {string} [coupon_code] - Coupon code to be applied to cart.
420
- * @property {string} [coupon_description] - Coupon description of the coupon
421
- * applied to cart.
422
- * @property {string} [coupon_id] - Unique identifier of the coupon applied to cart.
423
- * @property {string} [coupon_subtitle] - Coupon subtitle of the coupon applied to cart.
424
- * @property {string} [coupon_title] - Coupon Title of the coupon applied.
425
- * @property {string} [coupon_type] - Type of the coupon applied to cart.
426
- * @property {number} [coupon_value] - Value of the coupon applied to cart.
427
- * @property {number} [discount] - Total discount earned from coupon applied to cart.
428
- * @property {boolean} [is_applied] - Flag to determine where the coupon is
429
- * applied to cart or not.
430
- * @property {boolean} [is_valid] - Determine where the coupon applied to cart is valid.
431
- * @property {number} [maximum_discount_value] - Maximum discount value of the
432
- * coupon applied to cart.
433
- * @property {string} [message] - Coupon message of the coupon applied to cart.
434
- * @property {number} [minimum_cart_value] - Minimum cart value of the coupon
435
- * applied to cart.
436
- */
437
-
438
- /**
439
- * @typedef ChargesThreshold
440
- * @property {number} [charges] - Charges amount to be applied on cart.
441
- * @property {number} [threshold] - Threshold of cart value on which the charge
442
- * should be applied .
443
- */
444
-
445
- /**
446
- * @typedef DeliveryChargesConfig
447
- * @property {boolean} [enabled] - Delivery charge enabled for the cart or not.
448
- * @property {ChargesThreshold[]} [charges] - Charges applicable based on threshold.
449
- */
450
-
451
- /**
452
- * @typedef CartCommonConfig
453
- * @property {DeliveryChargesConfig} [delivery_charges_config]
454
- */
455
-
456
- /**
457
- * @typedef CartDetailResponse
458
- * @property {number} [cart_id] - Unique identifier of the user cart.
459
- * @property {string} [uid] - Unique identifier of the user cart.
460
- * @property {AppliedPromotion[]} [applied_promo_details] - List of applied
461
- * promotions data to cart which includes promotion id, promotion name, offer
462
- * text, description, buy rules, discount rules and promotion type.
463
- * @property {string} [checkout_mode] - Checkout mode of user cart.
464
- * @property {string} [pan_no] - Permanent Account Number of the user.
465
- * @property {boolean} [is_valid] - Cart validity flag determines the if the
466
- * response is valid or not.
467
- * @property {string} [id] - Unique identifier of the user cart.
468
- * @property {PaymentSelectionLock} [payment_selection_lock]
469
- * @property {ShipmentPromise} [delivery_promise]
470
- * @property {string} [comment] - Comment message to be added in user cart.
471
- * @property {CartProductInfo[]} [items] - Items data list in user cart that
472
- * includes item id, item size, store id, available sizes and rest of the item
473
- * related data.
474
- * @property {string} [delivery_charge_info] - Delivery charge in information
475
- * message on shipment .
476
- * @property {CartCommonConfig} [common_config]
477
- * @property {CartDetailCoupon} [coupon]
478
- * @property {string} [message] - Message of the get cart detail API response.
479
- * @property {Object} [notification] - Notification object which denotes
480
- * notification data for user cart.
481
- * @property {string} [staff_user_id] - Staff employee user id if cart is
482
- * created by staff employee for the customer.
483
- * @property {boolean} [success] - Success flag of get cart detail API response.
484
- * @property {string} [gstin] - GSTIN added in user cart.
485
- * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
486
- * the checkout process.
487
- * @property {string} [last_modified] - Last modified timestamp of cart.
488
- * @property {CartBreakup} [breakup_values]
489
- * @property {CartCurrency} [currency]
490
- * @property {string} [coupon_text] - Coupon text of coupon applied on cart.
491
- * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
492
- * is doing fast checkout for the cart using buy now.
493
- * @property {Object} [pan_config] - Pan card config states at what condition
494
- * user should enter the pan card.
495
- * @property {Object} [custom_cart_meta] - Custom meta details added cart
496
- * checkout API payload .
497
- */
498
-
499
- /**
500
- * @typedef AddProductCart
501
- * @property {Object} [article_assignment] - Field to determine how article
502
- * assignment should happen by article assignment level and strategy.
503
- * @property {string[]} [product_group_tags] - Field to specify the product
504
- * groups of the product that the user is trying to add in cart.
505
- * @property {Object} [extra_meta] - Extra meta data to be added at article
506
- * level while add items to cart.
507
- * @property {number} [quantity] - Field to specify the product quantity that
508
- * user wants to buy.
509
- * @property {Object} [_custom_json] - Field to add custom json at article level
510
- * while add items to cart .
511
- * @property {string} [item_size] - Field to determine size of the product.
512
- * @property {number} [store_id] - Unique identifier of the store selected by
513
- * the user from which user want to buy a product.
514
- * @property {string} [display] - Display field at article level .
515
- * @property {string} [article_id] - Unique identifier of an article .
516
- * @property {Object[]} [parent_item_identifiers] - Fields to determine parent
517
- * product of the product.
518
- * @property {number} [seller_id] - Unique idetifier of the seller selected by
519
- * the user from which user want to buy a product .
520
- * @property {boolean} [pos] - Filed to determine whether user is making request
521
- * from pos or not.
522
- * @property {number} [item_id] - Unique identifier to identify product.
523
- * @property {Object} [meta] - Field to add meta data at article level.
524
- * @property {string} [seller_identifier] - Add items using seller identifier
525
- * for store os.
526
- */
527
-
528
- /**
529
- * @typedef AddCartRequest
530
- * @property {AddProductCart[]} [items] - List of items detail which need to be
531
- * added to cart like item id, item size, and item quantity.
532
- * @property {boolean} [new_cart] - Field to create to new cart whille user adds
533
- * item to cart.
534
- */
535
-
536
- /**
537
- * @typedef AddCartDetailResponse
538
- * @property {string} [message] - Message of add to cart API response.
539
- * @property {boolean} [partial] - When adding multiple items check if all
540
- * added. True if only few are added.
541
- * @property {CartDetailResponse} [cart]
542
- * @property {boolean} [success] - True if all items are added successfully.
543
- * False if partially added or not added.
544
- */
545
-
546
- /**
547
- * @typedef UpdateProductCart
548
- * @property {Object} [extra_meta] - Field to update extra meta of the product in cart.
549
- * @property {Object} [_custom_json] - Field to update custom json of the product in cart.
550
- * @property {number} [quantity] - Field to update the quantity of the item in cart.
551
- * @property {string} [item_size] - Field to update the size of the product in cart.
552
- * @property {number} [item_index] - Item index determines on which index the
553
- * product falls to be updated.
554
- * @property {CartProductIdentifer} identifiers
555
- * @property {string} [article_id] - Article id of the product in cart.
556
- * @property {Object} [parent_item_identifiers] - Field to update parent product
557
- * of the item in cart.
558
- * @property {number} [item_id] - Item id of the product that needs to be updated.
559
- * @property {Object} [meta] - Field to update meta of the item in cart.
560
- */
561
-
562
- /**
563
- * @typedef UpdateCartRequest
564
- * @property {UpdateProductCart[]} [items] - List items data that needs to be
565
- * updated in cart.
566
- * @property {string} operation - Field to determine if item to be removed from
567
- * cart or it needs to be updated.
568
- */
569
-
570
- /**
571
- * @typedef UpdateCartDetailResponse
572
- * @property {string} [message] - Message of update cart API response.
573
- * @property {CartDetailResponse} [cart]
574
- * @property {boolean} [success] - True if all items are added successfully.
575
- * False if partially added or not added.
576
- */
577
-
578
- /**
579
- * @typedef DeleteCartDetailResponse
580
- * @property {string} [message] - Message for delete cart response.
581
- * @property {boolean} [success] - True if cart is archived successfully. False
582
- * if not archived.
583
- */
584
-
585
- /**
586
- * @typedef CartItemCountResponse
587
- * @property {number} [user_cart_items_count] - Item count present in cart.
588
- */
589
-
590
- /**
591
- * @typedef PageCoupon
592
- * @property {number} [total_item_count] - Total coupons are available for the cart.
593
- * @property {boolean} [has_next] - Denotes if next page of coupon is available.
594
- * @property {number} [total] - Total pages of coupon availalbe.
595
- * @property {number} [current] - Current page number.
596
- * @property {boolean} [has_previous] - Denotes if previous page of the coupon
597
- * is available.
598
- */
599
-
600
- /**
601
- * @typedef Coupon
602
- * @property {number} [coupon_amount] - The amount based on cart value.
603
- * @property {number} [coupon_value] - Coupon value of the coupon applied to cart.
604
- * @property {string} [title] - Coupon Title of the coupon applied denotes name
605
- * of the coupon.
606
- * @property {number} [minimum_cart_value] - Minimum cart value of the coupon
607
- * applied to cart.
608
- * @property {string} [sub_title] - Coupon subtitle of the coupon applied to
609
- * cart which is used to display.
610
- * @property {string} [expires_on] - Message to display to user for expiry of the coupon .
611
- * @property {string} [message] - Coupon message of the coupon applied to cart.
612
- * @property {string} [coupon_type] - Type of the coupon applied to cart.
613
- * @property {number} [max_discount_value] - Maximum discount value of the
614
- * coupon applied to cart.
615
- * @property {string} [coupon_code] - Coupon code of the coupon applied on cart.
616
- * @property {boolean} [is_applicable] - Flag to determine where the coupon is
617
- * applicable to cart or not.
618
- * @property {string} [description] - Coupon description of the coupon applied to cart.
619
- * @property {boolean} [is_applied] - Flag to determine where the coupon is
620
- * applied to cart or not.
621
- * @property {string} [start_date] - Start date of the coupon when the coupon
622
- * will be live for the users to apply on cart.
623
- * @property {string} [end_date] - End date of the coupon on which the coupon expires.
624
- * @property {string} [coupon_applicable_message] - Message which is used to
625
- * display to the customer if the coupon is applied successfully.
626
- * @property {string} [offer_text] - Offer text of the coupon which highligts
627
- * coupon offer defined while creating coupon .
628
- * @property {boolean} [is_bank_offer] - Bank offer flag for the coupon if the
629
- * coupon is applicable for only if payment done by bank or mode specified in coupon.
630
- */
631
-
632
- /**
633
- * @typedef GetCouponResponse
634
- * @property {PageCoupon} [page]
635
- * @property {Coupon[]} [available_coupon_list] - List of available coupon which
636
- * can be applied on cart.
637
- */
638
-
639
- /**
640
- * @typedef ApplyCouponRequest
641
- * @property {string} coupon_code - Coupon code to be applied.
642
- */
643
-
644
- /**
645
- * @typedef OfferPrice
646
- * @property {string} [currency_symbol] - Currency symbol for currency.
647
- * @property {number} [bulk_effective] - Discounted per unit price for current
648
- * offer object.
649
- * @property {string} [currency_code] - The currency code for an offer price is
650
- * the three-letter code that corresponds to the currency in which the offer
651
- * price is denominated.
652
- * @property {number} [effective] - The "effective price" is the actual price
653
- * paid by the consumer after accounting for product discounts. It represents
654
- * the true cost of a product or service after all adjustments have been made.
655
- * @property {number} [marked] - The price at which the product is sold to the
656
- * end consumer, typically the original price before discounts.
657
- */
658
-
659
- /**
660
- * @typedef OfferItem
661
- * @property {OfferPrice} [price]
662
- * @property {number} [margin] - Percentage value of discount.
663
- * @property {number} [quantity] - Quantity on which offer is applicable.
664
- * @property {boolean} [best] - Is true for best offer from all offers present
665
- * for all sellers.
666
- * @property {number} [total] - Total price of offer quantity with discount.
667
- * @property {boolean} [auto_applied] - Whether offer discount is auto applied in cart.
668
- * @property {string} [type] - Type of the offer.
669
- */
670
-
671
- /**
672
- * @typedef OfferSeller
673
- * @property {number} [uid] - Unique identifier for a seller.
674
- * @property {string} [name] - Name of a seller.
675
- */
676
-
677
- /**
678
- * @typedef BulkPriceOffer
679
- * @property {OfferItem[]} [offers] - Offers is the list of Offer item, which
680
- * consists of margin percentage, price, quantity, offer type and offer price.
681
- * @property {OfferSeller} [seller]
682
- */
683
-
684
- /**
685
- * @typedef BulkPriceResponse
686
- * @property {BulkPriceOffer[]} [data] - Actual data to be in response consist
687
- * of offers from multiple seller.
688
- */
689
-
690
- /**
691
- * @typedef RewardPointRequest
692
- * @property {boolean} points - Points to be applied for cart.
693
- */
694
-
695
- /**
696
- * @typedef GeoLocation
697
- * @property {number} [latitude] - Latitude coordinate for address.
698
- * @property {number} [longitude] - Longitude coordinate for address.
699
- */
700
-
701
- /**
702
- * @typedef Address
703
- * @property {string} [country_iso_code] - Country iso code for address.
704
- * @property {string} [area] - Area description for address.
705
- * @property {string} [phone] - Phone number for address.
706
- * @property {string} [country_phone_code] - Country phone code for address.
707
- * @property {string} [checkout_mode] - Checkout mode of address on which
708
- * address to be used for which checkout mode of cart.
709
- * @property {string} [address] - Address description for address data.
710
- * @property {string} [area_code_slug] - Area code slug for address. example
711
- * pincode is slug for India.
712
- * @property {GeoLocation} [geo_location]
713
- * @property {string} [id] - Id of the address.
714
- * @property {Object} [_custom_json] - Custom json of the address.
715
- * @property {string} [city] - City of the address.
716
- * @property {string} [sector] - Sector of the address.
717
- * @property {string} [state_code] - State code for address.
718
- * @property {string} [created_by_user_id] - Created by user id of address.
719
- * @property {string} [landmark] - Landmark of address.
720
- * @property {string} [user_id] - User id of address for which address is created.
721
- * @property {string} [name] - Name of person in address data to whom it belongs to.
722
- * @property {Object} [google_map_point] - Google map point of the address.
723
- * @property {boolean} [is_active] - States whether address is active or not.
724
- * @property {string[]} [tags] - Tags of address from which it can be identified.
725
- * @property {string} [country_code] - Country code of address.
726
- * @property {string} [address_type] - Address type of address.
727
- * @property {string} [country] - Country of address.
728
- * @property {boolean} [is_default_address] - Default address flag if no address
729
- * selected then this should be the default address selected.
730
- * @property {string} [area_code] - Area code of the address.
731
- * @property {string} [email] - Email address for address data.
732
- * @property {string} [state] - State of the address.
733
- * @property {Object} [meta] - Metadata of the address.
734
- */
735
-
736
- /**
737
- * @typedef GetAddressesResponse
738
- * @property {boolean} [pii_masking] - Personally Identifiable Information
739
- * masking flag to denote if the user data in address is masked or not.
740
- * @property {Address[]} [address] - Address description for address data.
741
- */
742
-
743
- /**
744
- * @typedef SaveAddressResponse
745
- * @property {string} [id] - Id of the address.
746
- * @property {boolean} [success] - Success flag of save address Response.
747
- * @property {boolean} [is_default_address] - Default address flag if no address
748
- * selected then this should be the default address selected.
749
- */
750
-
751
- /**
752
- * @typedef UpdateAddressResponse
753
- * @property {boolean} [is_updated] - Updated flag for update address operation
754
- * if the address updated or not.
755
- * @property {string} [id] - ID of an address.
756
- * @property {boolean} [success] - Success flag of update address response.
757
- * @property {boolean} [is_default_address] - Default address flag if no address
758
- * selected then this should be the default address selected.
759
- */
760
-
761
- /**
762
- * @typedef DeleteAddressResponse
763
- * @property {string} [id] - Id of the address.
764
- * @property {boolean} [is_deleted] - Deleted flag in delete address response
765
- * states whether the address was deleted or not.
766
- */
767
-
768
- /**
769
- * @typedef SelectCartAddressRequest
770
- * @property {string} [id] - Address is selected by user on which shipment to be
771
- * delivered.
772
- * @property {string} [billing_address_id] - Billing address id selected by user
773
- * on which shipment bill to be generated.
774
- * @property {string} [cart_id] - Cart id of the user cart for which the select
775
- * address operation performed.
776
- */
777
-
778
- /**
779
- * @typedef UpdateCartPaymentRequest
780
- * @property {string} [id] - Cart id of the user cart for which the update cart
781
- * payment operation performed.
782
- * @property {string} [payment_identifier] - Payment identifier of the payment
783
- * mode selected to do the payment.
784
- * @property {string} [address_id] - Address id of the user address selected to
785
- * deliver the shipment.
786
- * @property {string} [merchant_code] - Merchant code of the payment mode
787
- * selected to do the payment.
788
- * @property {string} [aggregator_name] - Aggregator name of the payment gateway.
789
- * @property {string} [payment_mode] - Payment mode of the payment selected to
790
- * do the payment.
791
- */
792
-
793
- /**
794
- * @typedef CouponValidity
795
- * @property {string} [title] - Coupon Title of the coupon applied.
796
- * @property {number} [discount] - Coupon discount value of the coupon applied.
797
- * @property {boolean} [next_validation_required] - Flag for coupon validation
798
- * required on next page or not.
799
- * @property {boolean} [valid] - Valid flag which denotes if the applied coupon
800
- * is valid or not.
801
- * @property {string} [display_message_en] - Display message for coupon validity.
802
- * @property {string} [code] - Coupon code of the coupon applied.
803
- */
804
-
805
- /**
806
- * @typedef PaymentCouponValidate
807
- * @property {string} [message] - Payment mode valid message for coupon.
808
- * @property {CouponValidity} [coupon_validity]
809
- * @property {boolean} success - Success flag of coupon payment mode validity
810
- * API response.
811
- */
812
-
813
- /**
814
- * @typedef ShipmentResponse
815
- * @property {number} [shipments] - Count of shipments that will be shipped.
816
- * @property {ShipmentPromise} [promise]
817
- * @property {string} [order_type] - Order type of the shipment like pickAtStore
818
- * or HomeDelivery.
819
- * @property {string} [box_type] - Box type of the shipment in which the
820
- * shipment will be delivered.
821
- * @property {string} [shipment_type] - Shipment type of the shipment returned
822
- * in get shipments API like single_shipment or multiple shipment. Single
823
- * Shipment means 1 item in 1 shipment and vice versa in the other one.
824
- * @property {Object} [dp_options] - Delivery partner options that are available
825
- * to deliver the shipment.
826
- * @property {string} [dp_id] - Delivery partner id of the shipment.
827
- * @property {CartProductInfo[]} [items] - Item details in the shipment.
828
- * @property {string} [fulfillment_type] - Fulfilment type of shipment.
829
- * @property {number} [fulfillment_id] - Fulfilment id of the shipment.
830
- */
831
-
832
- /**
833
- * @typedef CartShipmentsResponse
834
- * @property {string} [delivery_charge_info] - Delivery charge in information
835
- * message on shipment.
836
- * @property {string} [checkout_mode] - Checkout mode of cart.
837
- * @property {string} [message] - Response message of get shipments API.
838
- * @property {string} [gstin] - GSTIN number added in cart.
839
- * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
840
- * the checkout process.
841
- * @property {string} [last_modified] - Last modified timestamp of cart.
842
- * @property {number} [cart_id] - Cart id of the user cart.
843
- * @property {boolean} [is_valid] - Cart validity flag determines the if the
844
- * response is valid or not.
845
- * @property {CartBreakup} [breakup_values]
846
- * @property {CartCurrency} [currency]
847
- * @property {string} [id] - Cart id of the user cart.
848
- * @property {ShipmentResponse[]} [shipments] - List of Shipments which includes
849
- * shipment data like shipment items, shipment promise, Shipment type,
850
- * shipment order type, shipment dp options etc.
851
- * @property {PaymentSelectionLock} [payment_selection_lock]
852
- * @property {string} [coupon_text] - Coupon text of coupon applied on cart.
853
- * @property {ShipmentPromise} [delivery_promise]
854
- * @property {boolean} [error] - Error details if any error occurs which
855
- * includes type of error, error code and error message.
856
- * @property {string} [comment] - Comment message added in cart.
857
- * @property {boolean} [buy_now] - Buy now flag of user cart.
858
- * @property {string} [uid] - Cart id of the user cart.
859
- * @property {Object} [custom_cart_meta] - Custom meta details added cart
860
- * checkout API payload.
861
- */
862
-
863
- /**
864
- * @typedef CustomerDetails
865
- * @property {string} [email] - Email address of the customer to be added in
866
- * customer detail while checkout.
867
- * @property {string} mobile - Mobile number of customer to be added in customer
868
- * detail while checkout.
869
- * @property {string} [name] - Name of customer to be added in customer detail
870
- * while checkout.
871
- */
872
-
873
- /**
874
- * @typedef StaffCheckout
875
- * @property {string} [employee_code] - Employee code of staff who does checkout
876
- * on behalf of customer.
877
- * @property {string} user - User id of the employee who does checkout on behalf
878
- * of customer.
879
- * @property {string} last_name - Last name of staff employee who does checkout
880
- * on behalf of customer.
881
- * @property {string} first_name - First name of staff emplyee who does checkout
882
- * on behalf of customer.
883
- * @property {string} _id - Id of staff who does checkout on behalf of customer.
884
- */
885
-
886
- /**
887
- * @typedef CheckCart
888
- * @property {string} [checkout_mode] - Checkout mode of user cart.
889
- * @property {string} [user_type] - User type of the cart who places the order.
890
- * @property {string} [cod_message] - Cash On Delivery message for the order placed.
891
- * @property {number} [cart_id] - Cart id of the user cart for which the order placed.
892
- * @property {boolean} [is_valid] - Valid flag fotr the checkout response if
893
- * order placed was valid.
894
- * @property {number} [delivery_charges] - Delivery charges of the order placed
895
- * via checkout API.
896
- * @property {string} [id] - Cart id of the user cart.
897
- * @property {PaymentSelectionLock} [payment_selection_lock]
898
- * @property {string} [error_message] - Error details if any error occurs which
899
- * includes type of error, error code and error message.
900
- * @property {ShipmentPromise} [delivery_promise]
901
- * @property {string} [comment] - Comment message added in cart after order placed.
902
- * @property {CartProductInfo[]} [items] - Items details in cart after order placed.
903
- * @property {string} [uid] - Cart id of user cart.
904
- * @property {number} [delivery_charge_order_value] - Delivery charge order value.
905
- * @property {string} [delivery_charge_info] - Delivery charge in information
906
- * message on shipment.
907
- * @property {boolean} [cod_available] - Whether Cash On Delivery available.
908
- * @property {boolean} [success] - Success flag of checkout cart API response.
909
- * @property {string} [store_code] - Store code from which the order placed.
910
- * @property {string} [message] - Message of the cart checkout API response.
911
- * @property {string} [gstin] - GSTIN number added in cart.
912
- * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
913
- * the checkout process.
914
- * @property {string} [last_modified] - Last modified timestamp of cart.
915
- * @property {string} [order_id] - Order id generated after placing order.
916
- * @property {CartBreakup} [breakup_values]
917
- * @property {CartCurrency} [currency]
918
- * @property {Object[]} [store_emps] - Store employees data.
919
- * @property {string} [coupon_text] - Coupon text of the applied coupon on order placed.
920
- * @property {boolean} [buy_now] - Buy now flag of user cart.
921
- * @property {number} [cod_charges] - Cash On Delivery charges of the user cart.
922
- * @property {Object} [custom_cart_meta] - Meta data for customCart of user.
923
- */
924
-
925
- /**
926
- * @typedef CartCheckoutResponse
927
- * @property {string} [payment_confirm_url] - Payment confirm url used to
928
- * redirect after payment is confirmed.
929
- * @property {string} [app_intercept_url] - App intercept url which is used to
930
- * redirect on app after payment in confirmed/failed.
931
- * @property {boolean} [success] - Success flag of cart checkout API response.
932
- * @property {string} [callback_url] - Callback url to be redirected after
933
- * payment received/failed.
934
- * @property {string} [message] - Message of the cart checkout v2 API response.
935
- * @property {Object} [data] - Data of the user cart checkout includes cart
936
- * data, address, user id, order type etc.
937
- * @property {string} [order_id] - Order id generated after placing order.
938
- * @property {CheckCart} [cart]
939
- */
940
-
941
- /**
942
- * @typedef GiftDetail
943
- * @property {boolean} [is_gift_applied] - Is gift applied flag which determines
944
- * if this is a gift oder not.
945
- * @property {string} [gift_message] - Gift message for the one while receive
946
- * the delivery of the order with this message.
947
- */
948
-
949
- /**
950
- * @typedef ArticleGiftDetail
951
- * @property {GiftDetail} [article_id]
952
- */
953
-
954
- /**
955
- * @typedef CartMetaRequest
956
- * @property {Object} [delivery_slots] - Delivery slots details includes article
957
- * level time slot when the shipment can be delivered.
958
- * @property {ArticleGiftDetail} [gift_details]
959
- * @property {Object} [pick_up_customer_details] - Customer contact details for
960
- * customer pickup at store.
961
- * @property {string} [checkout_mode] - Checkout mode of user cart.
962
- * @property {string} [comment] - Comment message to be added in user cart.
963
- * @property {string} [gstin] - GSTIN number to be added in user cart.
964
- * @property {Object} [custom_cart_meta] - Custom cart meta json to be added in
965
- * order meta which can be further received in cart API response and order
966
- * meta in order detail API or webhook.
967
- */
968
-
969
- /**
970
- * @typedef CartMetaResponse
971
- * @property {string} [message] - Detailed message.
972
- * @property {boolean} [is_valid] - Whether added meta was vaild.
973
- */
974
-
975
- /**
976
- * @typedef CartMetaMissingResponse
977
- * @property {string[]} [errors] - Detailed errors for invalid cart meta request.
978
- */
979
-
980
- /**
981
- * @typedef GetShareCartLinkRequest
982
- * @property {string} [id] - Cart id of user cart for generating cart sharing token.
983
- * @property {Object} [meta] - Staff, Ordering store or any other data. This
984
- * data will be used to generate link as well as sent as shared details.
985
- */
986
-
987
- /**
988
- * @typedef GetShareCartLinkResponse
989
- * @property {string} [token] - Short url unique id of the cart which is opted
990
- * to share with other user.
991
- * @property {string} [share_url] - Short shareable final url which can populate
992
- * shared cart items in one's cart or replaced one's cart with shared cart items.
993
- */
994
-
995
- /**
996
- * @typedef SharedCartDetails
997
- * @property {string} [token] - Short link id of the user cart that needs to be shared.
998
- * @property {Object} [user] - User details of who generated share link.
999
- * @property {string} [created_on] - Created on timestamp of user cart.
1000
- * @property {Object} [source] - Share link device and other source information.
1001
- * @property {Object} [meta] - Meta data sent while generating share cart link.
1002
- */
1003
-
1004
- /**
1005
- * @typedef SharedCart
1006
- * @property {string} [checkout_mode] - Checkout mode of address on which
1007
- * address to be used for which checkout mode of cart.
1008
- * @property {number} [cart_id] - Cart id of user cart for generating cart sharing token.
1009
- * @property {boolean} [is_valid] - Valid flag for get shared cart detail API.
1010
- * @property {string} [id] - Cart id of shared cart.
1011
- * @property {PaymentSelectionLock} [payment_selection_lock]
1012
- * @property {ShipmentPromise} [delivery_promise]
1013
- * @property {string} [comment] - Comment message added in user cart.
1014
- * @property {CartProductInfo[]} [items] - Items data list in user cart that
1015
- * includes item id, item size, store id, available sizes and rest of the item
1016
- * related data.
1017
- * @property {string} [uid] - Cart id of the user cart.
1018
- * @property {string} [delivery_charge_info] - Delivery charge info message of
1019
- * the user cart.
1020
- * @property {string} [message] - Message of the get shared cart API response.
1021
- * @property {string} [gstin] - GSTIN added in user cart.
1022
- * @property {SharedCartDetails} [shared_cart_details]
1023
- * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
1024
- * the checkout process.
1025
- * @property {string} [last_modified] - Last modified timestamp of user cart.
1026
- * @property {CartBreakup} [breakup_values]
1027
- * @property {CartCurrency} [currency]
1028
- * @property {string} [coupon_text] - Coupon text of the applied coupon on user cart.
1029
- * @property {boolean} [buy_now] - Buy now flag of user cart.
1030
- * @property {Object} [custom_cart_meta] - Custom cart meta of user cart added
1031
- * via update cart meta API.
1032
- */
1033
-
1034
- /**
1035
- * @typedef SharedCartResponse
1036
- * @property {string} [error] - Error details if any error occurs which includes
1037
- * type of error, error code and error message.
1038
- * @property {SharedCart} [cart]
1039
- */
1040
-
1041
- /**
1042
- * @typedef PriceMinMax
1043
- * @property {number} [min] - Min price of article added in user cart.
1044
- * @property {number} [max] - Max price of article added in user cart.
1045
- */
1046
-
1047
- /**
1048
- * @typedef ItemPriceDetails
1049
- * @property {PriceMinMax} [marked]
1050
- * @property {PriceMinMax} [effective]
1051
- * @property {string} [currency] - Currency of the article added in cart.
1052
- */
1053
-
1054
- /**
1055
- * @typedef FreeGiftItems
1056
- * @property {string} [item_slug] - Slug for an item.
1057
- * @property {string} [item_name] - Name of the free gift item received via free
1058
- * gift promotion.
1059
- * @property {ItemPriceDetails} [item_price_details]
1060
- * @property {string} [item_brand_name] - Item brand name of the free gift item
1061
- * promotion applied on cart.
1062
- * @property {number} [item_id] - Item id of the free gift item.
1063
- * @property {string[]} [item_images_url] - Images URLs for free gift items.
1064
- */
1065
-
1066
- /**
1067
- * @typedef PromotionOffer
1068
- * @property {string} [id] - Promotion id of the promotion which is available on product.
1069
- * @property {Object} [buy_rules] - Buy rules of promotion which is available on product.
1070
- * @property {string} [offer_text] - Offer title of the promotion which is
1071
- * available on product.
1072
- * @property {string} [promotion_type] - Promotion type of the promotion which
1073
- * is availalbe on product.
1074
- * @property {string} [promotion_name] - Name of the promotion which is
1075
- * available on product.
1076
- * @property {string} [promotion_group] - Group of the promotion which is
1077
- * available on product.
1078
- * @property {string} [valid_till] - Datetime ISO String for promotion end date
1079
- * which is available on product.
1080
- * @property {Object[]} [discount_rules] - Discount rules of promotions which is
1081
- * avaiable on product.
1082
- * @property {FreeGiftItems[]} [free_gift_items] - Details of free gift items
1083
- * which included item id, brand name, item name, item slug, item price and
1084
- * item image url.
1085
- * @property {string} [description] - Offer details including T&C of the
1086
- * promotion which is avaiable on product.
1087
- */
1088
-
1089
- /**
1090
- * @typedef PromotionOffersResponse
1091
- * @property {PromotionOffer[]} [available_promotions] - Available promotion
1092
- * details which are available on product which includes promotion data like
1093
- * promotion id, promotion name, buy rules, discount rules validity dates etc.
1094
- */
1095
-
1096
- /**
1097
- * @typedef PromotionPaymentOffer
1098
- * @property {string} [application_id] - Application id on which the promotion
1099
- * was created.
1100
- * @property {Object[]} [buy_rules] - Buy rules of promotions which denotes if
1101
- * the rules matches than only promotion is applicable.
1102
- * @property {string} [calculate_on] - Article Price on which promotion
1103
- * calculated like effective price or marked price.
1104
- * @property {string} [description] - Offer details including T&C of the
1105
- * promotion which is avaiable on cart.
1106
- * @property {Object[]} [discount_rules] - Discount rules of promotions which is
1107
- * avaiable on cart.
1108
- * @property {string} [id] - Promotion id of the promotion which is available on cart.
1109
- * @property {string} [offer_text] - Offer title of the promotion which is
1110
- * available on cart.
1111
- * @property {string} [promotion_group] - Group promotion which is available on cart.
1112
- * @property {string} [promotion_type] - Promotion type of the promotion which
1113
- * is availalbe on cart.
1114
- * @property {string} [promotion_name] - Name of the promotion which is available on cart.
1115
- */
1116
-
1117
- /**
1118
- * @typedef PromotionPaymentOffersResponse
1119
- * @property {boolean} [success] - Success flag of get payment offers API response.
1120
- * @property {PromotionPaymentOffer[]} [promotions] - List of promotions data
1121
- * which are applicable on cart/product.
1122
- */
1123
-
1124
- /**
1125
- * @typedef OperationErrorResponse
1126
- * @property {string} [message] - Message of get payment offer API response.
1127
- * @property {boolean} [success] - Success flag of get payment offer API response.
1128
- */
1129
-
1130
- /**
1131
- * @typedef LadderPrice
1132
- * @property {string} [currency_symbol] - Currency symbol for currency of ladder
1133
- * price product.
1134
- * @property {number} [offer_price] - Discounted per unit price for current offer object.
1135
- * @property {string} [currency_code] - Currency code for all amounts.
1136
- * @property {number} [effective] - Current per unit price of product after
1137
- * existing deductions.
1138
- * @property {number} [marked] - Original price of product.
1139
- */
1140
-
1141
- /**
1142
- * @typedef LadderOfferItem
1143
- * @property {LadderPrice} [price]
1144
- * @property {number} [margin] - Percentage value of discount.
1145
- * @property {number} [max_quantity] - Minimum quantity upto which offer is
1146
- * applicable. If not present that offer is applicable on all quantities.
1147
- * @property {number} [min_quantity] - Minimum quantity from which offer is applicable.
1148
- * @property {string} [type] - Offer type of the ladder promotion.
1149
- */
1150
-
1151
- /**
1152
- * @typedef LadderPriceOffer
1153
- * @property {string} [id] - ID of the promotion.
1154
- * @property {Object} [buy_rules] - Buy rules of ladder price promotion
1155
- * applicable on product.
1156
- * @property {string} [calculate_on] - If this ladder offer is to be calculated
1157
- * on MRP or ESP price.
1158
- * @property {string} [offer_text] - Offer title of ladder price promotion
1159
- * applicable on product.
1160
- * @property {string} [promotion_group] - Group of ladder price promotion
1161
- * applicable on product.
1162
- * @property {string} [valid_till] - Datetime ISO String for promotion end date.
1163
- * @property {Object[]} [discount_rules] - Discount rules of ladder price
1164
- * promotion applicable on product.
1165
- * @property {LadderOfferItem[]} [offer_prices] - Offer prices for ladder price
1166
- * promotion applicable on product.
1167
- * @property {FreeGiftItems[]} [free_gift_items] - Details of free gift items list.
1168
- * @property {string} [description] - Offer details including T&C of ladder
1169
- * price promotion applicable on product.
1170
- */
1171
-
1172
- /**
1173
- * @typedef CurrencyInfo
1174
- * @property {string} [code] - Currency code of ladder price promotion.
1175
- * @property {string} [symbol] - Currency symbol for currency of ladder price product.
1176
- */
1177
-
1178
- /**
1179
- * @typedef LadderPriceOffers
1180
- * @property {LadderPriceOffer[]} [available_offers] - Available ladder
1181
- * promotions offers list.
1182
- * @property {CurrencyInfo} [currency]
1183
- */
1184
-
1185
- /**
1186
- * @typedef PaymentMeta
1187
- * @property {string} [merchant_code] - Merchant code of the payment mode
1188
- * selected to do the payment.
1189
- * @property {string} [type] - Type of card if payment mode is card to do the payment.
1190
- * @property {string} [payment_gateway] - Payment gateway used to do the payment.
1191
- * @property {string} [payment_identifier] - Payment identifier of the payment
1192
- * mode selected to do the payment.
1193
- */
1194
-
1195
- /**
1196
- * @typedef PaymentMethod
1197
- * @property {PaymentMeta} payment_meta
1198
- * @property {string} mode - Payment mode of payment method used to make payment.
1199
- * @property {string} [payment] - Payment name of payment method used to make payment.
1200
- * @property {number} [amount] - Amount of the payment mode to be paid.
1201
- * @property {string} [name] - Name of the payment mode used to make payment.
1202
- * @property {Object} [payment_extra_identifiers] - Payment extra identifier for
1203
- * the payment mode to do the payment.
1204
- */
1205
-
1206
- /**
1207
- * @typedef CartCheckoutDetailV2Request
1208
- * @property {Object} [custom_meta] - Custom meta data to be added in order.
1209
- * @property {Object} [customer_details] - Customer details to be added in order.
1210
- * @property {string} [merchant_code] - Merchant code of the payment mode
1211
- * selected to do the payment.
1212
- * @property {string} [cart_id] - Cart id of the user cart.
1213
- * @property {string} [id] - Cart id of the user cart.
1214
- * @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
1215
- * payment need not to be collected from user.
1216
- * @property {PaymentMethod[]} payment_methods - Payment methods list used to
1217
- * make the payment.
1218
- * @property {string} payment_mode - Payment mode of the payment selected to do
1219
- * the payment.
1220
- * @property {string} [aggregator] - Aggregator of payment mode to do the payment.
1221
- * @property {string} [address_id] - Address id of the user where the order to
1222
- * be delivered.
1223
- * @property {string} [callback_url] - Callback url after payment received/failed.
1224
- * @property {Object} [delivery_address] - Delivery address data which includes
1225
- * customer address, customer phone, customer email, customer pincode,
1226
- * customer landmark and customer name.
1227
- * @property {StaffCheckout} [staff]
1228
- * @property {string} [order_type] - Order type of the order being placed like
1229
- * pickAtStore or HomeDelivery.
1230
- * @property {number} [ordering_store] - Ordering store id of the store from
1231
- * which the order is getting placed.
1232
- * @property {Object} [extra_meta] - Extra meta to be added while checkout in order.
1233
- * @property {string} [payment_identifier] - Payment identifier of the payment
1234
- * mode selected to do the payment.
1235
- * @property {Object} [billing_address] - Billing address json which includes
1236
- * customer address, customer phone, customer email, customer pincode,
1237
- * customer landmark and customer name.
1238
- * @property {Object} [payment_params] - Payment params which includes payment
1239
- * identifier and merchant code.
1240
- * @property {string} [billing_address_id] - Billing address id selected by user
1241
- * on which shipment bill to be generated.
1242
- * @property {Object} [meta] - Meta data sent while checkout v2.
1243
- * @property {string} [iin] - Issuer Identification Number' number of card if
1244
- * payment mode is card to do the payment.
1245
- * @property {string} [network] - Network of card if payment mode is card to do
1246
- * the payment.
1247
- * @property {string} [type] - Type of cart if payment mode is card to do the payment.
1248
- * @property {string} [card_id] - Saved card id if payment mode is card to do the payment.
1249
- */
1250
-
1251
- class CartApplicationModel {
1252
- /** @returns {BuyRules} */
1253
- static BuyRules() {
1254
- return Joi.object({
1255
- item_criteria: Joi.any(),
1256
- cart_conditions: Joi.any(),
1257
- });
1258
- }
1259
-
1260
- /** @returns {DiscountRulesApp} */
1261
- static DiscountRulesApp() {
1262
- return Joi.object({
1263
- matched_buy_rules: Joi.array().items(Joi.string().allow("")),
1264
- raw_offer: Joi.any(),
1265
- offer: Joi.any(),
1266
- item_criteria: Joi.any(),
1267
- });
1268
- }
1269
-
1270
- /** @returns {Ownership} */
1271
- static Ownership() {
1272
- return Joi.object({
1273
- payable_category: Joi.string().allow(""),
1274
- payable_by: Joi.string().allow(""),
1275
- });
1276
- }
1277
-
1278
- /** @returns {AppliedFreeArticles} */
1279
- static AppliedFreeArticles() {
1280
- return Joi.object({
1281
- free_gift_item_details: CartApplicationModel.FreeGiftItems(),
1282
- parent_item_identifier: Joi.string().allow(""),
1283
- quantity: Joi.number(),
1284
- article_id: Joi.string().allow(""),
1285
- });
1286
- }
1287
-
1288
- /** @returns {AppliedPromotion} */
1289
- static AppliedPromotion() {
1290
- return Joi.object({
1291
- promo_id: Joi.string().allow(""),
1292
- buy_rules: Joi.array().items(CartApplicationModel.BuyRules()),
1293
- offer_text: Joi.string().allow(""),
1294
- promotion_group: Joi.string().allow(""),
1295
- mrp_promotion: Joi.boolean(),
1296
- promotion_name: Joi.string().allow(""),
1297
- amount: Joi.number(),
1298
- discount_rules: Joi.array().items(
1299
- CartApplicationModel.DiscountRulesApp()
1300
- ),
1301
- ownership: CartApplicationModel.Ownership(),
1302
- article_quantity: Joi.number(),
1303
- applied_free_articles: Joi.array().items(
1304
- CartApplicationModel.AppliedFreeArticles()
1305
- ),
1306
- promotion_type: Joi.string().allow(""),
1307
- meta: Joi.any(),
1308
- code: Joi.string().allow("").allow(null),
1309
- });
1310
- }
1311
-
1312
- /** @returns {PaymentSelectionLock} */
1313
- static PaymentSelectionLock() {
1314
- return Joi.object({
1315
- enabled: Joi.boolean(),
1316
- default_options: Joi.string().allow(""),
1317
- payment_identifier: Joi.string().allow(""),
1318
- });
1319
- }
1320
-
1321
- /** @returns {PromiseFormatted} */
1322
- static PromiseFormatted() {
1323
- return Joi.object({
1324
- max: Joi.string().allow(""),
1325
- min: Joi.string().allow(""),
1326
- });
1327
- }
1328
-
1329
- /** @returns {PromiseISOFormat} */
1330
- static PromiseISOFormat() {
1331
- return Joi.object({
1332
- max: Joi.string().allow(""),
1333
- min: Joi.string().allow(""),
1334
- });
1335
- }
1336
-
1337
- /** @returns {PromiseTimestamp} */
1338
- static PromiseTimestamp() {
1339
- return Joi.object({
1340
- max: Joi.number(),
1341
- min: Joi.number(),
1342
- });
1343
- }
1344
-
1345
- /** @returns {ShipmentPromise} */
1346
- static ShipmentPromise() {
1347
- return Joi.object({
1348
- formatted: CartApplicationModel.PromiseFormatted(),
1349
- timestamp: CartApplicationModel.PromiseTimestamp(),
1350
- iso: CartApplicationModel.PromiseISOFormat(),
1351
- });
1352
- }
1353
-
1354
- /** @returns {BasePrice} */
1355
- static BasePrice() {
1356
- return Joi.object({
1357
- effective: Joi.number(),
1358
- currency_symbol: Joi.string().allow(""),
1359
- marked: Joi.number(),
1360
- currency_code: Joi.string().allow(""),
1361
- });
1362
- }
1363
-
1364
- /** @returns {ArticlePriceInfo} */
1365
- static ArticlePriceInfo() {
1366
- return Joi.object({
1367
- base: CartApplicationModel.BasePrice(),
1368
- converted: CartApplicationModel.BasePrice(),
1369
- });
1370
- }
1371
-
1372
- /** @returns {BaseInfo} */
1373
- static BaseInfo() {
1374
- return Joi.object({
1375
- uid: Joi.number(),
1376
- name: Joi.string().allow(""),
1377
- });
1378
- }
1379
-
1380
- /** @returns {StoreInfo} */
1381
- static StoreInfo() {
1382
- return Joi.object({
1383
- store_code: Joi.string().allow(""),
1384
- uid: Joi.number(),
1385
- name: Joi.string().allow(""),
1386
- });
1387
- }
1388
-
1389
- /** @returns {ProductArticle} */
1390
- static ProductArticle() {
1391
- return Joi.object({
1392
- price: CartApplicationModel.ArticlePriceInfo(),
1393
- product_group_tags: Joi.array().items(Joi.string().allow("")),
1394
- extra_meta: Joi.any(),
1395
- quantity: Joi.number(),
1396
- _custom_json: Joi.any(),
1397
- meta: Joi.any(),
1398
- size: Joi.string().allow(""),
1399
- mto_quantity: Joi.number(),
1400
- seller: CartApplicationModel.BaseInfo(),
1401
- seller_identifier: Joi.string().allow(""),
1402
- parent_item_identifiers: Joi.any(),
1403
- identifier: Joi.any(),
1404
- store: CartApplicationModel.StoreInfo(),
1405
- cart_item_meta: Joi.any(),
1406
- uid: Joi.string().allow(""),
1407
- gift_card: Joi.any(),
1408
- is_gift_visible: Joi.boolean(),
1409
- type: Joi.string().allow(""),
1410
- tags: Joi.array().items(Joi.string().allow("")),
1411
- });
1412
- }
1413
-
1414
- /** @returns {CartProductIdentifer} */
1415
- static CartProductIdentifer() {
1416
- return Joi.object({
1417
- identifier: Joi.string().allow(""),
1418
- });
1419
- }
1420
-
1421
- /** @returns {PromoMeta} */
1422
- static PromoMeta() {
1423
- return Joi.object({
1424
- message: Joi.string().allow(""),
1425
- });
1426
- }
1427
-
1428
- /** @returns {ChargesAmount} */
1429
- static ChargesAmount() {
1430
- return Joi.object({
1431
- value: Joi.number(),
1432
- currency: Joi.string().allow(""),
1433
- });
1434
- }
1435
-
1436
- /** @returns {Charges} */
1437
- static Charges() {
1438
- return Joi.object({
1439
- meta: Joi.any(),
1440
- amount: CartApplicationModel.ChargesAmount(),
1441
- name: Joi.string().allow(""),
1442
- allow_refund: Joi.boolean(),
1443
- code: Joi.string().allow(""),
1444
- type: Joi.string().allow(""),
1445
- });
1446
- }
1447
-
1448
- /** @returns {ProductPrice} */
1449
- static ProductPrice() {
1450
- return Joi.object({
1451
- currency_symbol: Joi.string().allow(""),
1452
- selling: Joi.number(),
1453
- currency_code: Joi.string().allow(""),
1454
- add_on: Joi.number(),
1455
- effective: Joi.number(),
1456
- marked: Joi.number(),
1457
- });
1458
- }
1459
-
1460
- /** @returns {ProductPriceInfo} */
1461
- static ProductPriceInfo() {
1462
- return Joi.object({
1463
- base: CartApplicationModel.ProductPrice(),
1464
- converted: CartApplicationModel.ProductPrice(),
1465
- });
1466
- }
1467
-
1468
- /** @returns {ProductPricePerUnit} */
1469
- static ProductPricePerUnit() {
1470
- return Joi.object({
1471
- currency_symbol: Joi.string().allow(""),
1472
- selling_price: Joi.number(),
1473
- currency_code: Joi.string().allow(""),
1474
- add_on: Joi.number(),
1475
- effective: Joi.number(),
1476
- marked: Joi.number(),
1477
- });
1478
- }
1479
-
1480
- /** @returns {ProductPricePerUnitInfo} */
1481
- static ProductPricePerUnitInfo() {
1482
- return Joi.object({
1483
- base: CartApplicationModel.ProductPricePerUnit(),
1484
- converted: CartApplicationModel.ProductPricePerUnit(),
1485
- });
1486
- }
1487
-
1488
- /** @returns {ProductAvailabilitySize} */
1489
- static ProductAvailabilitySize() {
1490
- return Joi.object({
1491
- display: Joi.string().allow(""),
1492
- value: Joi.string().allow(""),
1493
- is_available: Joi.boolean(),
1494
- });
1495
- }
1496
-
1497
- /** @returns {ProductAvailability} */
1498
- static ProductAvailability() {
1499
- return Joi.object({
1500
- out_of_stock: Joi.boolean(),
1501
- deliverable: Joi.boolean(),
1502
- available_sizes: Joi.array().items(
1503
- CartApplicationModel.ProductAvailabilitySize()
1504
- ),
1505
- is_valid: Joi.boolean(),
1506
- other_store_quantity: Joi.number(),
1507
- sizes: Joi.array().items(Joi.string().allow("")),
1508
- });
1509
- }
1510
-
1511
- /** @returns {ActionQuery} */
1512
- static ActionQuery() {
1513
- return Joi.object({
1514
- product_slug: Joi.array().items(Joi.string().allow("")),
1515
- });
1516
- }
1517
-
1518
- /** @returns {ProductAction} */
1519
- static ProductAction() {
1520
- return Joi.object({
1521
- query: CartApplicationModel.ActionQuery(),
1522
- url: Joi.string().allow(""),
1523
- type: Joi.string().allow(""),
1524
- });
1525
- }
1526
-
1527
- /** @returns {Tags} */
1528
- static Tags() {
1529
- return Joi.object({
1530
- tags: Joi.any(),
1531
- });
1532
- }
1533
-
1534
- /** @returns {ProductImage} */
1535
- static ProductImage() {
1536
- return Joi.object({
1537
- secure_url: Joi.string().allow(""),
1538
- aspect_ratio: Joi.string().allow(""),
1539
- url: Joi.string().allow(""),
1540
- });
1541
- }
1542
-
1543
- /** @returns {CategoryInfo} */
1544
- static CategoryInfo() {
1545
- return Joi.object({
1546
- uid: Joi.number(),
1547
- name: Joi.string().allow(""),
1548
- });
1549
- }
1550
-
1551
- /** @returns {CartProduct} */
1552
- static CartProduct() {
1553
- return Joi.object({
1554
- _custom_json: Joi.any(),
1555
- brand: CartApplicationModel.BaseInfo(),
1556
- action: CartApplicationModel.ProductAction(),
1557
- teaser_tag: CartApplicationModel.Tags(),
1558
- slug: Joi.string().allow(""),
1559
- images: Joi.array().items(CartApplicationModel.ProductImage()),
1560
- uid: Joi.number(),
1561
- name: Joi.string().allow(""),
1562
- item_code: Joi.string().allow("").allow(null),
1563
- categories: Joi.array().items(CartApplicationModel.CategoryInfo()),
1564
- tags: Joi.array().items(Joi.string().allow("")),
1565
- type: Joi.string().allow(""),
1566
- attributes: Joi.any(),
1567
- });
1568
- }
1569
-
1570
- /** @returns {CouponDetails} */
1571
- static CouponDetails() {
1572
- return Joi.object({
1573
- discount_single_quantity: Joi.number(),
1574
- code: Joi.string().allow(""),
1575
- discount_total_quantity: Joi.number(),
1576
- });
1577
- }
1578
-
1579
- /** @returns {CartProductInfo} */
1580
- static CartProductInfo() {
1581
- return Joi.object({
1582
- article: CartApplicationModel.ProductArticle(),
1583
- moq: Joi.any(),
1584
- identifiers: CartApplicationModel.CartProductIdentifer().required(),
1585
- promo_meta: CartApplicationModel.PromoMeta(),
1586
- price: CartApplicationModel.ProductPriceInfo(),
1587
- quantity: Joi.number(),
1588
- charges: Joi.array().items(CartApplicationModel.Charges()),
1589
- discount: Joi.string().allow(""),
1590
- availability: CartApplicationModel.ProductAvailability(),
1591
- delivery_promise: CartApplicationModel.ShipmentPromise(),
1592
- product: CartApplicationModel.CartProduct(),
1593
- product_ean_id: Joi.string().allow(""),
1594
- bulk_offer: Joi.any(),
1595
- parent_item_identifiers: Joi.any(),
1596
- coupon: CartApplicationModel.CouponDetails(),
1597
- custom_order: Joi.any(),
1598
- coupon_message: Joi.string().allow(""),
1599
- key: Joi.string().allow(""),
1600
- message: Joi.string().allow(""),
1601
- is_set: Joi.boolean(),
1602
- price_per_unit: CartApplicationModel.ProductPricePerUnitInfo(),
1603
- promotions_applied: Joi.array().items(
1604
- CartApplicationModel.AppliedPromotion()
1605
- ),
1606
- });
1607
- }
1608
-
1609
- /** @returns {DisplayBreakup} */
1610
- static DisplayBreakup() {
1611
- return Joi.object({
1612
- currency_symbol: Joi.string().allow(""),
1613
- key: Joi.string().allow(""),
1614
- display: Joi.string().allow(""),
1615
- message: Joi.array().items(Joi.string().allow("")),
1616
- currency_code: Joi.string().allow(""),
1617
- value: Joi.number(),
1618
- preset: Joi.number(),
1619
- });
1620
- }
1621
-
1622
- /** @returns {RawBreakup} */
1623
- static RawBreakup() {
1624
- return Joi.object({
1625
- vog: Joi.number(),
1626
- subtotal: Joi.number(),
1627
- fynd_cash: Joi.number(),
1628
- discount: Joi.number(),
1629
- convenience_fee: Joi.number(),
1630
- delivery_charge: Joi.number(),
1631
- gst_charges: Joi.number(),
1632
- mrp_total: Joi.number(),
1633
- mop_total: Joi.number(),
1634
- total_charge: Joi.number(),
1635
- coupon: Joi.number(),
1636
- total: Joi.number(),
1637
- gift_card: Joi.number(),
1638
- you_saved: Joi.number(),
1639
- cod_charge: Joi.number(),
1640
- });
1641
- }
1642
-
1643
- /** @returns {CouponBreakup} */
1644
- static CouponBreakup() {
1645
- return Joi.object({
1646
- coupon_value: Joi.number(),
1647
- title: Joi.string().allow("").allow(null),
1648
- sub_title: Joi.string().allow("").allow(null),
1649
- minimum_cart_value: Joi.number(),
1650
- message: Joi.string().allow(""),
1651
- coupon_type: Joi.string().allow("").allow(null),
1652
- uid: Joi.string().allow(""),
1653
- value: Joi.number(),
1654
- max_discount_value: Joi.number(),
1655
- is_applied: Joi.boolean(),
1656
- description: Joi.string().allow("").allow(null),
1657
- code: Joi.string().allow(""),
1658
- type: Joi.string().allow(""),
1659
- });
1660
- }
1661
-
1662
- /** @returns {LoyaltyPoints} */
1663
- static LoyaltyPoints() {
1664
- return Joi.object({
1665
- total: Joi.number(),
1666
- description: Joi.string().allow(""),
1667
- applicable: Joi.number(),
1668
- is_applied: Joi.boolean(),
1669
- });
1670
- }
1671
-
1672
- /** @returns {CartBreakup} */
1673
- static CartBreakup() {
1674
- return Joi.object({
1675
- display: Joi.array().items(CartApplicationModel.DisplayBreakup()),
1676
- raw: CartApplicationModel.RawBreakup(),
1677
- coupon: CartApplicationModel.CouponBreakup(),
1678
- loyalty_points: CartApplicationModel.LoyaltyPoints(),
1679
- });
1680
- }
1681
-
1682
- /** @returns {CartCurrency} */
1683
- static CartCurrency() {
1684
- return Joi.object({
1685
- code: Joi.string().allow(""),
1686
- symbol: Joi.string().allow(""),
1687
- });
1688
- }
1689
-
1690
- /** @returns {CartDetailCoupon} */
1691
- static CartDetailCoupon() {
1692
- return Joi.object({
1693
- cashback_amount: Joi.number(),
1694
- cashback_message_primary: Joi.string().allow(""),
1695
- cashback_message_secondary: Joi.string().allow(""),
1696
- coupon_code: Joi.string().allow(""),
1697
- coupon_description: Joi.string().allow(""),
1698
- coupon_id: Joi.string().allow(""),
1699
- coupon_subtitle: Joi.string().allow(""),
1700
- coupon_title: Joi.string().allow(""),
1701
- coupon_type: Joi.string().allow(""),
1702
- coupon_value: Joi.number(),
1703
- discount: Joi.number(),
1704
- is_applied: Joi.boolean(),
1705
- is_valid: Joi.boolean(),
1706
- maximum_discount_value: Joi.number(),
1707
- message: Joi.string().allow(""),
1708
- minimum_cart_value: Joi.number(),
1709
- });
1710
- }
1711
-
1712
- /** @returns {ChargesThreshold} */
1713
- static ChargesThreshold() {
1714
- return Joi.object({
1715
- charges: Joi.number(),
1716
- threshold: Joi.number(),
1717
- });
1718
- }
1719
-
1720
- /** @returns {DeliveryChargesConfig} */
1721
- static DeliveryChargesConfig() {
1722
- return Joi.object({
1723
- enabled: Joi.boolean(),
1724
- charges: Joi.array().items(CartApplicationModel.ChargesThreshold()),
1725
- });
1726
- }
1727
-
1728
- /** @returns {CartCommonConfig} */
1729
- static CartCommonConfig() {
1730
- return Joi.object({
1731
- delivery_charges_config: CartApplicationModel.DeliveryChargesConfig(),
1732
- });
1733
- }
1734
-
1735
- /** @returns {CartDetailResponse} */
1736
- static CartDetailResponse() {
1737
- return Joi.object({
1738
- cart_id: Joi.number(),
1739
- uid: Joi.string().allow(""),
1740
- applied_promo_details: Joi.array().items(
1741
- CartApplicationModel.AppliedPromotion()
1742
- ),
1743
- checkout_mode: Joi.string().allow(""),
1744
- pan_no: Joi.string().allow(""),
1745
- is_valid: Joi.boolean(),
1746
- id: Joi.string().allow(""),
1747
- payment_selection_lock: CartApplicationModel.PaymentSelectionLock(),
1748
- delivery_promise: CartApplicationModel.ShipmentPromise(),
1749
- comment: Joi.string().allow(""),
1750
- items: Joi.array().items(CartApplicationModel.CartProductInfo()),
1751
- delivery_charge_info: Joi.string().allow(""),
1752
- common_config: CartApplicationModel.CartCommonConfig(),
1753
- coupon: CartApplicationModel.CartDetailCoupon(),
1754
- message: Joi.string().allow(""),
1755
- notification: Joi.any(),
1756
- staff_user_id: Joi.string().allow(""),
1757
- success: Joi.boolean(),
1758
- gstin: Joi.string().allow(""),
1759
- restrict_checkout: Joi.boolean(),
1760
- last_modified: Joi.string().allow(""),
1761
- breakup_values: CartApplicationModel.CartBreakup(),
1762
- currency: CartApplicationModel.CartCurrency(),
1763
- coupon_text: Joi.string().allow(""),
1764
- buy_now: Joi.boolean(),
1765
- pan_config: Joi.any(),
1766
- custom_cart_meta: Joi.any(),
1767
- });
1768
- }
1769
-
1770
- /** @returns {AddProductCart} */
1771
- static AddProductCart() {
1772
- return Joi.object({
1773
- article_assignment: Joi.any(),
1774
- product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
1775
- extra_meta: Joi.any(),
1776
- quantity: Joi.number(),
1777
- _custom_json: Joi.any(),
1778
- item_size: Joi.string().allow(""),
1779
- store_id: Joi.number(),
1780
- display: Joi.string().allow(""),
1781
- article_id: Joi.string().allow(""),
1782
- parent_item_identifiers: Joi.array().items(
1783
- Joi.object().pattern(/\S/, Joi.string().allow(""))
1784
- ),
1785
- seller_id: Joi.number(),
1786
- pos: Joi.boolean(),
1787
- item_id: Joi.number(),
1788
- meta: Joi.any(),
1789
- seller_identifier: Joi.string().allow(""),
1790
- });
1791
- }
1792
-
1793
- /** @returns {AddCartRequest} */
1794
- static AddCartRequest() {
1795
- return Joi.object({
1796
- items: Joi.array().items(CartApplicationModel.AddProductCart()),
1797
- new_cart: Joi.boolean(),
1798
- });
1799
- }
1800
-
1801
- /** @returns {AddCartDetailResponse} */
1802
- static AddCartDetailResponse() {
1803
- return Joi.object({
1804
- message: Joi.string().allow(""),
1805
- partial: Joi.boolean(),
1806
- cart: CartApplicationModel.CartDetailResponse(),
1807
- success: Joi.boolean(),
1808
- });
1809
- }
1810
-
1811
- /** @returns {UpdateProductCart} */
1812
- static UpdateProductCart() {
1813
- return Joi.object({
1814
- extra_meta: Joi.any(),
1815
- _custom_json: Joi.any(),
1816
- quantity: Joi.number(),
1817
- item_size: Joi.string().allow(""),
1818
- item_index: Joi.number(),
1819
- identifiers: CartApplicationModel.CartProductIdentifer().required(),
1820
- article_id: Joi.string().allow(""),
1821
- parent_item_identifiers: Joi.any(),
1822
- item_id: Joi.number(),
1823
- meta: Joi.any(),
1824
- });
1825
- }
1826
-
1827
- /** @returns {UpdateCartRequest} */
1828
- static UpdateCartRequest() {
1829
- return Joi.object({
1830
- items: Joi.array().items(CartApplicationModel.UpdateProductCart()),
1831
- operation: Joi.string().allow("").required(),
1832
- });
1833
- }
1834
-
1835
- /** @returns {UpdateCartDetailResponse} */
1836
- static UpdateCartDetailResponse() {
1837
- return Joi.object({
1838
- message: Joi.string().allow(""),
1839
- cart: CartApplicationModel.CartDetailResponse(),
1840
- success: Joi.boolean(),
1841
- });
1842
- }
1843
-
1844
- /** @returns {DeleteCartDetailResponse} */
1845
- static DeleteCartDetailResponse() {
1846
- return Joi.object({
1847
- message: Joi.string().allow(""),
1848
- success: Joi.boolean(),
1849
- });
1850
- }
1851
-
1852
- /** @returns {CartItemCountResponse} */
1853
- static CartItemCountResponse() {
1854
- return Joi.object({
1855
- user_cart_items_count: Joi.number(),
1856
- });
1857
- }
1858
-
1859
- /** @returns {PageCoupon} */
1860
- static PageCoupon() {
1861
- return Joi.object({
1862
- total_item_count: Joi.number(),
1863
- has_next: Joi.boolean(),
1864
- total: Joi.number(),
1865
- current: Joi.number(),
1866
- has_previous: Joi.boolean(),
1867
- });
1868
- }
1869
-
1870
- /** @returns {Coupon} */
1871
- static Coupon() {
1872
- return Joi.object({
1873
- coupon_amount: Joi.number(),
1874
- coupon_value: Joi.number(),
1875
- title: Joi.string().allow(""),
1876
- minimum_cart_value: Joi.number(),
1877
- sub_title: Joi.string().allow(""),
1878
- expires_on: Joi.string().allow(""),
1879
- message: Joi.string().allow(""),
1880
- coupon_type: Joi.string().allow("").allow(null),
1881
- max_discount_value: Joi.number(),
1882
- coupon_code: Joi.string().allow(""),
1883
- is_applicable: Joi.boolean(),
1884
- description: Joi.string().allow("").allow(null),
1885
- is_applied: Joi.boolean(),
1886
- start_date: Joi.string().allow("").allow(null),
1887
- end_date: Joi.string().allow("").allow(null),
1888
- coupon_applicable_message: Joi.string().allow(""),
1889
- offer_text: Joi.string().allow(""),
1890
- is_bank_offer: Joi.boolean(),
1891
- });
1892
- }
1893
-
1894
- /** @returns {GetCouponResponse} */
1895
- static GetCouponResponse() {
1896
- return Joi.object({
1897
- page: CartApplicationModel.PageCoupon(),
1898
- available_coupon_list: Joi.array().items(CartApplicationModel.Coupon()),
1899
- });
1900
- }
1901
-
1902
- /** @returns {ApplyCouponRequest} */
1903
- static ApplyCouponRequest() {
1904
- return Joi.object({
1905
- coupon_code: Joi.string().allow("").required(),
1906
- });
1907
- }
1908
-
1909
- /** @returns {OfferPrice} */
1910
- static OfferPrice() {
1911
- return Joi.object({
1912
- currency_symbol: Joi.string().allow(""),
1913
- bulk_effective: Joi.number(),
1914
- currency_code: Joi.string().allow(""),
1915
- effective: Joi.number(),
1916
- marked: Joi.number(),
1917
- });
1918
- }
1919
-
1920
- /** @returns {OfferItem} */
1921
- static OfferItem() {
1922
- return Joi.object({
1923
- price: CartApplicationModel.OfferPrice(),
1924
- margin: Joi.number(),
1925
- quantity: Joi.number(),
1926
- best: Joi.boolean(),
1927
- total: Joi.number(),
1928
- auto_applied: Joi.boolean(),
1929
- type: Joi.string().allow(""),
1930
- });
1931
- }
1932
-
1933
- /** @returns {OfferSeller} */
1934
- static OfferSeller() {
1935
- return Joi.object({
1936
- uid: Joi.number(),
1937
- name: Joi.string().allow(""),
1938
- });
1939
- }
1940
-
1941
- /** @returns {BulkPriceOffer} */
1942
- static BulkPriceOffer() {
1943
- return Joi.object({
1944
- offers: Joi.array().items(CartApplicationModel.OfferItem()),
1945
- seller: CartApplicationModel.OfferSeller(),
1946
- });
1947
- }
1948
-
1949
- /** @returns {BulkPriceResponse} */
1950
- static BulkPriceResponse() {
1951
- return Joi.object({
1952
- data: Joi.array().items(CartApplicationModel.BulkPriceOffer()),
1953
- });
1954
- }
1955
-
1956
- /** @returns {RewardPointRequest} */
1957
- static RewardPointRequest() {
1958
- return Joi.object({
1959
- points: Joi.boolean().required(),
1960
- });
1961
- }
1962
-
1963
- /** @returns {GeoLocation} */
1964
- static GeoLocation() {
1965
- return Joi.object({
1966
- latitude: Joi.number(),
1967
- longitude: Joi.number(),
1968
- });
1969
- }
1970
-
1971
- /** @returns {Address} */
1972
- static Address() {
1973
- return Joi.object({
1974
- country_iso_code: Joi.string().allow(""),
1975
- area: Joi.string().allow(""),
1976
- phone: Joi.string().allow(""),
1977
- country_phone_code: Joi.string().allow(""),
1978
- checkout_mode: Joi.string().allow(""),
1979
- address: Joi.string().allow(""),
1980
- area_code_slug: Joi.string().allow(""),
1981
- geo_location: CartApplicationModel.GeoLocation(),
1982
- id: Joi.string().allow(""),
1983
- _custom_json: Joi.any(),
1984
- city: Joi.string().allow(""),
1985
- sector: Joi.string().allow(""),
1986
- state_code: Joi.string().allow(""),
1987
- created_by_user_id: Joi.string().allow(""),
1988
- landmark: Joi.string().allow(""),
1989
- user_id: Joi.string().allow(""),
1990
- name: Joi.string().allow(""),
1991
- google_map_point: Joi.any(),
1992
- is_active: Joi.boolean(),
1993
- tags: Joi.array().items(Joi.string().allow("")),
1994
- country_code: Joi.string().allow(""),
1995
- address_type: Joi.string().allow(""),
1996
- country: Joi.string().allow(""),
1997
- is_default_address: Joi.boolean(),
1998
- area_code: Joi.string().allow(""),
1999
- email: Joi.string().allow(""),
2000
- state: Joi.string().allow(""),
2001
- meta: Joi.any(),
2002
- });
2003
- }
2004
-
2005
- /** @returns {GetAddressesResponse} */
2006
- static GetAddressesResponse() {
2007
- return Joi.object({
2008
- pii_masking: Joi.boolean(),
2009
- address: Joi.array().items(CartApplicationModel.Address()),
2010
- });
2011
- }
2012
-
2013
- /** @returns {SaveAddressResponse} */
2014
- static SaveAddressResponse() {
2015
- return Joi.object({
2016
- id: Joi.string().allow(""),
2017
- success: Joi.boolean(),
2018
- is_default_address: Joi.boolean(),
2019
- });
2020
- }
2021
-
2022
- /** @returns {UpdateAddressResponse} */
2023
- static UpdateAddressResponse() {
2024
- return Joi.object({
2025
- is_updated: Joi.boolean(),
2026
- id: Joi.string().allow(""),
2027
- success: Joi.boolean(),
2028
- is_default_address: Joi.boolean(),
2029
- });
2030
- }
2031
-
2032
- /** @returns {DeleteAddressResponse} */
2033
- static DeleteAddressResponse() {
2034
- return Joi.object({
2035
- id: Joi.string().allow(""),
2036
- is_deleted: Joi.boolean(),
2037
- });
2038
- }
2039
-
2040
- /** @returns {SelectCartAddressRequest} */
2041
- static SelectCartAddressRequest() {
2042
- return Joi.object({
2043
- id: Joi.string().allow(""),
2044
- billing_address_id: Joi.string().allow(""),
2045
- cart_id: Joi.string().allow(""),
2046
- });
2047
- }
2048
-
2049
- /** @returns {UpdateCartPaymentRequest} */
2050
- static UpdateCartPaymentRequest() {
2051
- return Joi.object({
2052
- id: Joi.string().allow(""),
2053
- payment_identifier: Joi.string().allow("").allow(null),
2054
- address_id: Joi.string().allow(""),
2055
- merchant_code: Joi.string().allow(""),
2056
- aggregator_name: Joi.string().allow(""),
2057
- payment_mode: Joi.string().allow(""),
2058
- });
2059
- }
2060
-
2061
- /** @returns {CouponValidity} */
2062
- static CouponValidity() {
2063
- return Joi.object({
2064
- title: Joi.string().allow(""),
2065
- discount: Joi.number(),
2066
- next_validation_required: Joi.boolean().allow(null),
2067
- valid: Joi.boolean(),
2068
- display_message_en: Joi.string().allow("").allow(null),
2069
- code: Joi.string().allow("").allow(null),
2070
- });
2071
- }
2072
-
2073
- /** @returns {PaymentCouponValidate} */
2074
- static PaymentCouponValidate() {
2075
- return Joi.object({
2076
- message: Joi.string().allow(""),
2077
- coupon_validity: CartApplicationModel.CouponValidity(),
2078
- success: Joi.boolean().required(),
2079
- });
2080
- }
2081
-
2082
- /** @returns {ShipmentResponse} */
2083
- static ShipmentResponse() {
2084
- return Joi.object({
2085
- shipments: Joi.number(),
2086
- promise: CartApplicationModel.ShipmentPromise(),
2087
- order_type: Joi.string().allow(""),
2088
- box_type: Joi.string().allow("").allow(null),
2089
- shipment_type: Joi.string().allow(""),
2090
- dp_options: Joi.any().allow(null),
2091
- dp_id: Joi.string().allow("").allow(null),
2092
- items: Joi.array().items(CartApplicationModel.CartProductInfo()),
2093
- fulfillment_type: Joi.string().allow(""),
2094
- fulfillment_id: Joi.number(),
2095
- });
2096
- }
2097
-
2098
- /** @returns {CartShipmentsResponse} */
2099
- static CartShipmentsResponse() {
2100
- return Joi.object({
2101
- delivery_charge_info: Joi.string().allow(""),
2102
- checkout_mode: Joi.string().allow(""),
2103
- message: Joi.string().allow(""),
2104
- gstin: Joi.string().allow(""),
2105
- restrict_checkout: Joi.boolean(),
2106
- last_modified: Joi.string().allow(""),
2107
- cart_id: Joi.number(),
2108
- is_valid: Joi.boolean(),
2109
- breakup_values: CartApplicationModel.CartBreakup(),
2110
- currency: CartApplicationModel.CartCurrency(),
2111
- id: Joi.string().allow(""),
2112
- shipments: Joi.array().items(CartApplicationModel.ShipmentResponse()),
2113
- payment_selection_lock: CartApplicationModel.PaymentSelectionLock(),
2114
- coupon_text: Joi.string().allow(""),
2115
- delivery_promise: CartApplicationModel.ShipmentPromise(),
2116
- error: Joi.boolean(),
2117
- comment: Joi.string().allow(""),
2118
- buy_now: Joi.boolean(),
2119
- uid: Joi.string().allow(""),
2120
- custom_cart_meta: Joi.any(),
2121
- });
2122
- }
2123
-
2124
- /** @returns {CustomerDetails} */
2125
- static CustomerDetails() {
2126
- return Joi.object({
2127
- email: Joi.string().allow(""),
2128
- mobile: Joi.string().allow("").required(),
2129
- name: Joi.string().allow(""),
2130
- });
2131
- }
2132
-
2133
- /** @returns {StaffCheckout} */
2134
- static StaffCheckout() {
2135
- return Joi.object({
2136
- employee_code: Joi.string().allow(""),
2137
- user: Joi.string().allow("").required(),
2138
- last_name: Joi.string().allow("").required(),
2139
- first_name: Joi.string().allow("").required(),
2140
- _id: Joi.string().allow("").required(),
2141
- });
2142
- }
2143
-
2144
- /** @returns {CheckCart} */
2145
- static CheckCart() {
2146
- return Joi.object({
2147
- checkout_mode: Joi.string().allow(""),
2148
- user_type: Joi.string().allow(""),
2149
- cod_message: Joi.string().allow(""),
2150
- cart_id: Joi.number(),
2151
- is_valid: Joi.boolean(),
2152
- delivery_charges: Joi.number(),
2153
- id: Joi.string().allow(""),
2154
- payment_selection_lock: CartApplicationModel.PaymentSelectionLock(),
2155
- error_message: Joi.string().allow(""),
2156
- delivery_promise: CartApplicationModel.ShipmentPromise(),
2157
- comment: Joi.string().allow(""),
2158
- items: Joi.array().items(CartApplicationModel.CartProductInfo()),
2159
- uid: Joi.string().allow(""),
2160
- delivery_charge_order_value: Joi.number(),
2161
- delivery_charge_info: Joi.string().allow(""),
2162
- cod_available: Joi.boolean(),
2163
- success: Joi.boolean(),
2164
- store_code: Joi.string().allow(""),
2165
- message: Joi.string().allow(""),
2166
- gstin: Joi.string().allow(""),
2167
- restrict_checkout: Joi.boolean(),
2168
- last_modified: Joi.string().allow(""),
2169
- order_id: Joi.string().allow(""),
2170
- breakup_values: CartApplicationModel.CartBreakup(),
2171
- currency: CartApplicationModel.CartCurrency(),
2172
- store_emps: Joi.array().items(Joi.any()),
2173
- coupon_text: Joi.string().allow(""),
2174
- buy_now: Joi.boolean(),
2175
- cod_charges: Joi.number(),
2176
- custom_cart_meta: Joi.any(),
2177
- });
2178
- }
2179
-
2180
- /** @returns {CartCheckoutResponse} */
2181
- static CartCheckoutResponse() {
2182
- return Joi.object({
2183
- payment_confirm_url: Joi.string().allow(""),
2184
- app_intercept_url: Joi.string().allow(""),
2185
- success: Joi.boolean(),
2186
- callback_url: Joi.string().allow(""),
2187
- message: Joi.string().allow(""),
2188
- data: Joi.any(),
2189
- order_id: Joi.string().allow(""),
2190
- cart: CartApplicationModel.CheckCart(),
2191
- });
2192
- }
2193
-
2194
- /** @returns {GiftDetail} */
2195
- static GiftDetail() {
2196
- return Joi.object({
2197
- is_gift_applied: Joi.boolean(),
2198
- gift_message: Joi.string().allow(""),
2199
- });
2200
- }
2201
-
2202
- /** @returns {ArticleGiftDetail} */
2203
- static ArticleGiftDetail() {
2204
- return Joi.object({
2205
- article_id: CartApplicationModel.GiftDetail(),
2206
- });
2207
- }
2208
-
2209
- /** @returns {CartMetaRequest} */
2210
- static CartMetaRequest() {
2211
- return Joi.object({
2212
- delivery_slots: Joi.any(),
2213
- gift_details: CartApplicationModel.ArticleGiftDetail(),
2214
- pick_up_customer_details: Joi.any(),
2215
- checkout_mode: Joi.string().allow(""),
2216
- comment: Joi.string().allow(""),
2217
- gstin: Joi.string().allow(""),
2218
- custom_cart_meta: Joi.any(),
2219
- });
2220
- }
2221
-
2222
- /** @returns {CartMetaResponse} */
2223
- static CartMetaResponse() {
2224
- return Joi.object({
2225
- message: Joi.string().allow(""),
2226
- is_valid: Joi.boolean(),
2227
- });
2228
- }
2229
-
2230
- /** @returns {CartMetaMissingResponse} */
2231
- static CartMetaMissingResponse() {
2232
- return Joi.object({
2233
- errors: Joi.array().items(Joi.string().allow("")),
2234
- });
2235
- }
2236
-
2237
- /** @returns {GetShareCartLinkRequest} */
2238
- static GetShareCartLinkRequest() {
2239
- return Joi.object({
2240
- id: Joi.string().allow(""),
2241
- meta: Joi.any(),
2242
- });
2243
- }
2244
-
2245
- /** @returns {GetShareCartLinkResponse} */
2246
- static GetShareCartLinkResponse() {
2247
- return Joi.object({
2248
- token: Joi.string().allow(""),
2249
- share_url: Joi.string().allow(""),
2250
- });
2251
- }
2252
-
2253
- /** @returns {SharedCartDetails} */
2254
- static SharedCartDetails() {
2255
- return Joi.object({
2256
- token: Joi.string().allow(""),
2257
- user: Joi.any(),
2258
- created_on: Joi.string().allow(""),
2259
- source: Joi.any(),
2260
- meta: Joi.any(),
2261
- });
2262
- }
2263
-
2264
- /** @returns {SharedCart} */
2265
- static SharedCart() {
2266
- return Joi.object({
2267
- checkout_mode: Joi.string().allow(""),
2268
- cart_id: Joi.number(),
2269
- is_valid: Joi.boolean(),
2270
- id: Joi.string().allow(""),
2271
- payment_selection_lock: CartApplicationModel.PaymentSelectionLock(),
2272
- delivery_promise: CartApplicationModel.ShipmentPromise(),
2273
- comment: Joi.string().allow(""),
2274
- items: Joi.array().items(CartApplicationModel.CartProductInfo()),
2275
- uid: Joi.string().allow(""),
2276
- delivery_charge_info: Joi.string().allow(""),
2277
- message: Joi.string().allow(""),
2278
- gstin: Joi.string().allow(""),
2279
- shared_cart_details: CartApplicationModel.SharedCartDetails(),
2280
- restrict_checkout: Joi.boolean(),
2281
- last_modified: Joi.string().allow(""),
2282
- breakup_values: CartApplicationModel.CartBreakup(),
2283
- currency: CartApplicationModel.CartCurrency(),
2284
- coupon_text: Joi.string().allow(""),
2285
- buy_now: Joi.boolean(),
2286
- custom_cart_meta: Joi.any(),
2287
- });
2288
- }
2289
-
2290
- /** @returns {SharedCartResponse} */
2291
- static SharedCartResponse() {
2292
- return Joi.object({
2293
- error: Joi.string().allow(""),
2294
- cart: CartApplicationModel.SharedCart(),
2295
- });
2296
- }
2297
-
2298
- /** @returns {PriceMinMax} */
2299
- static PriceMinMax() {
2300
- return Joi.object({
2301
- min: Joi.number(),
2302
- max: Joi.number(),
2303
- });
2304
- }
2305
-
2306
- /** @returns {ItemPriceDetails} */
2307
- static ItemPriceDetails() {
2308
- return Joi.object({
2309
- marked: CartApplicationModel.PriceMinMax(),
2310
- effective: CartApplicationModel.PriceMinMax(),
2311
- currency: Joi.string().allow(""),
2312
- });
2313
- }
2314
-
2315
- /** @returns {FreeGiftItems} */
2316
- static FreeGiftItems() {
2317
- return Joi.object({
2318
- item_slug: Joi.string().allow(""),
2319
- item_name: Joi.string().allow(""),
2320
- item_price_details: CartApplicationModel.ItemPriceDetails(),
2321
- item_brand_name: Joi.string().allow(""),
2322
- item_id: Joi.number(),
2323
- item_images_url: Joi.array().items(Joi.string().allow("")),
2324
- });
2325
- }
2326
-
2327
- /** @returns {PromotionOffer} */
2328
- static PromotionOffer() {
2329
- return Joi.object({
2330
- id: Joi.string().allow(""),
2331
- buy_rules: Joi.any(),
2332
- offer_text: Joi.string().allow(""),
2333
- promotion_type: Joi.string().allow(""),
2334
- promotion_name: Joi.string().allow(""),
2335
- promotion_group: Joi.string().allow(""),
2336
- valid_till: Joi.string().allow(""),
2337
- discount_rules: Joi.array().items(Joi.any()),
2338
- free_gift_items: Joi.array().items(CartApplicationModel.FreeGiftItems()),
2339
- description: Joi.string().allow(""),
2340
- });
2341
- }
2342
-
2343
- /** @returns {PromotionOffersResponse} */
2344
- static PromotionOffersResponse() {
2345
- return Joi.object({
2346
- available_promotions: Joi.array().items(
2347
- CartApplicationModel.PromotionOffer()
2348
- ),
2349
- });
2350
- }
2351
-
2352
- /** @returns {PromotionPaymentOffer} */
2353
- static PromotionPaymentOffer() {
2354
- return Joi.object({
2355
- application_id: Joi.string().allow(""),
2356
- buy_rules: Joi.array().items(Joi.any()),
2357
- calculate_on: Joi.string().allow(""),
2358
- description: Joi.string().allow(""),
2359
- discount_rules: Joi.array().items(Joi.any()),
2360
- id: Joi.string().allow(""),
2361
- offer_text: Joi.string().allow(""),
2362
- promotion_group: Joi.string().allow(""),
2363
- promotion_type: Joi.string().allow(""),
2364
- promotion_name: Joi.string().allow(""),
2365
- });
2366
- }
2367
-
2368
- /** @returns {PromotionPaymentOffersResponse} */
2369
- static PromotionPaymentOffersResponse() {
2370
- return Joi.object({
2371
- success: Joi.boolean(),
2372
- promotions: Joi.array().items(
2373
- CartApplicationModel.PromotionPaymentOffer()
2374
- ),
2375
- });
2376
- }
2377
-
2378
- /** @returns {OperationErrorResponse} */
2379
- static OperationErrorResponse() {
2380
- return Joi.object({
2381
- message: Joi.string().allow(""),
2382
- success: Joi.boolean(),
2383
- });
2384
- }
2385
-
2386
- /** @returns {LadderPrice} */
2387
- static LadderPrice() {
2388
- return Joi.object({
2389
- currency_symbol: Joi.string().allow(""),
2390
- offer_price: Joi.number(),
2391
- currency_code: Joi.string().allow(""),
2392
- effective: Joi.number(),
2393
- marked: Joi.number(),
2394
- });
2395
- }
2396
-
2397
- /** @returns {LadderOfferItem} */
2398
- static LadderOfferItem() {
2399
- return Joi.object({
2400
- price: CartApplicationModel.LadderPrice(),
2401
- margin: Joi.number(),
2402
- max_quantity: Joi.number(),
2403
- min_quantity: Joi.number(),
2404
- type: Joi.string().allow(""),
2405
- });
2406
- }
2407
-
2408
- /** @returns {LadderPriceOffer} */
2409
- static LadderPriceOffer() {
2410
- return Joi.object({
2411
- id: Joi.string().allow(""),
2412
- buy_rules: Joi.any(),
2413
- calculate_on: Joi.string().allow(""),
2414
- offer_text: Joi.string().allow(""),
2415
- promotion_group: Joi.string().allow(""),
2416
- valid_till: Joi.string().allow(""),
2417
- discount_rules: Joi.array().items(Joi.any()),
2418
- offer_prices: Joi.array().items(CartApplicationModel.LadderOfferItem()),
2419
- free_gift_items: Joi.array().items(CartApplicationModel.FreeGiftItems()),
2420
- description: Joi.string().allow(""),
2421
- });
2422
- }
2423
-
2424
- /** @returns {CurrencyInfo} */
2425
- static CurrencyInfo() {
2426
- return Joi.object({
2427
- code: Joi.string().allow(""),
2428
- symbol: Joi.string().allow(""),
2429
- });
2430
- }
2431
-
2432
- /** @returns {LadderPriceOffers} */
2433
- static LadderPriceOffers() {
2434
- return Joi.object({
2435
- available_offers: Joi.array().items(
2436
- CartApplicationModel.LadderPriceOffer()
2437
- ),
2438
- currency: CartApplicationModel.CurrencyInfo(),
2439
- });
2440
- }
2441
-
2442
- /** @returns {PaymentMeta} */
2443
- static PaymentMeta() {
2444
- return Joi.object({
2445
- merchant_code: Joi.string().allow(""),
2446
- type: Joi.string().allow(""),
2447
- payment_gateway: Joi.string().allow(""),
2448
- payment_identifier: Joi.string().allow("").allow(null),
2449
- });
2450
- }
2451
-
2452
- /** @returns {PaymentMethod} */
2453
- static PaymentMethod() {
2454
- return Joi.object({
2455
- payment_meta: CartApplicationModel.PaymentMeta().required(),
2456
- mode: Joi.string().allow("").required(),
2457
- payment: Joi.string().allow(""),
2458
- amount: Joi.number().allow(null),
2459
- name: Joi.string().allow(""),
2460
- payment_extra_identifiers: Joi.any(),
2461
- });
2462
- }
2463
-
2464
- /** @returns {CartCheckoutDetailV2Request} */
2465
- static CartCheckoutDetailV2Request() {
2466
- return Joi.object({
2467
- custom_meta: Joi.any(),
2468
- customer_details: Joi.any().allow(null),
2469
- merchant_code: Joi.string().allow(""),
2470
- cart_id: Joi.string().allow(""),
2471
- id: Joi.string().allow("").allow(null),
2472
- payment_auto_confirm: Joi.boolean(),
2473
- payment_methods: Joi.array()
2474
- .items(CartApplicationModel.PaymentMethod())
2475
- .required(),
2476
- payment_mode: Joi.string().allow("").required(),
2477
- aggregator: Joi.string().allow(""),
2478
- address_id: Joi.string().allow(""),
2479
- callback_url: Joi.string().allow("").allow(null),
2480
- delivery_address: Joi.any(),
2481
- staff: CartApplicationModel.StaffCheckout(),
2482
- order_type: Joi.string().allow(""),
2483
- ordering_store: Joi.number().allow(null),
2484
- extra_meta: Joi.any(),
2485
- payment_identifier: Joi.string().allow("").allow(null),
2486
- billing_address: Joi.any(),
2487
- payment_params: Joi.any().allow(null),
2488
- billing_address_id: Joi.string().allow(""),
2489
- meta: Joi.any(),
2490
- iin: Joi.string().allow(""),
2491
- network: Joi.string().allow(""),
2492
- type: Joi.string().allow(""),
2493
- card_id: Joi.string().allow(""),
2494
- });
2495
- }
2496
- }
2497
- module.exports = CartApplicationModel;