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

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