@gofynd/fdk-client-javascript 1.0.2 → 1.0.4

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 (346) hide show
  1. package/README.md +31 -2
  2. package/index.d.ts +4 -4
  3. package/index.js +9 -10
  4. package/package.json +14 -14
  5. package/sdk/APIClient.d.ts +11 -0
  6. package/sdk/APIClient.js +35 -0
  7. package/sdk/Client.d.ts +6 -0
  8. package/sdk/Client.js +17 -0
  9. package/sdk/Config.d.ts +9 -0
  10. package/sdk/Config.js +17 -0
  11. package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
  12. package/sdk/application/Cart/CartApplicationClient.js +595 -594
  13. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  14. package/sdk/application/Cart/CartApplicationModel.js +490 -885
  15. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  16. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  17. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  18. package/sdk/application/Catalog/CatalogApplicationClient.js +1079 -1078
  19. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  20. package/sdk/application/Catalog/CatalogApplicationModel.js +683 -1249
  21. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  22. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  23. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  24. package/sdk/application/Common/CommonApplicationClient.js +43 -42
  25. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  26. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  27. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  28. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  29. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  30. package/sdk/application/Communication/CommunicationApplicationClient.js +32 -31
  31. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  32. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  33. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  34. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  36. package/sdk/application/Configuration/ConfigurationApplicationClient.js +350 -349
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  38. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  40. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  41. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  42. package/sdk/application/Content/ContentApplicationClient.js +216 -215
  43. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
  44. package/sdk/application/Content/ContentApplicationModel.js +468 -884
  45. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  46. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  48. package/sdk/application/FileStorage/FileStorageApplicationClient.js +65 -64
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  50. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  52. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  53. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  54. package/sdk/application/Lead/LeadApplicationClient.js +109 -108
  55. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  56. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  57. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  58. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  59. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +31 -22
  60. package/sdk/application/Logistic/LogisticApplicationClient.js +115 -49
  61. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  62. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  63. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  64. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -9
  65. package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
  66. package/sdk/application/Order/OrderApplicationClient.js +247 -246
  67. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  68. package/sdk/application/Order/OrderApplicationModel.js +361 -656
  69. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  70. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  71. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  72. package/sdk/application/Payment/PaymentApplicationClient.js +781 -780
  73. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  74. package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
  75. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  76. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  77. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  78. package/sdk/application/PosCart/PosCartApplicationClient.js +646 -645
  79. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
  80. package/sdk/application/PosCart/PosCartApplicationModel.js +476 -870
  81. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  82. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  83. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  84. package/sdk/application/Rewards/RewardsApplicationClient.js +122 -121
  85. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  86. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  87. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  88. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  89. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  90. package/sdk/application/Share/ShareApplicationClient.js +94 -93
  91. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  92. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  93. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  94. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  95. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  96. package/sdk/application/Theme/ThemeApplicationClient.js +38 -37
  97. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  98. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  99. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  100. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  101. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  102. package/sdk/application/User/UserApplicationClient.js +619 -618
  103. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  104. package/sdk/application/User/UserApplicationModel.js +440 -689
  105. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  106. package/sdk/application/User/UserApplicationValidator.js +89 -89
  107. package/sdk/common/AxiosHelper.js +18 -7
  108. package/sdk/constructUrl.d.ts +5 -0
  109. package/sdk/constructUrl.js +13 -0
  110. package/sdk/index.d.ts +3 -0
  111. package/sdk/index.js +5 -0
  112. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
  113. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +182 -180
  114. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  115. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +21 -21
  116. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
  117. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  118. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  119. package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +44 -43
  122. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  124. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  125. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +7 -6
  126. package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
  127. package/sdk/platform/Billing/BillingPlatformClient.js +184 -183
  128. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  129. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  130. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  131. package/sdk/platform/Billing/BillingPlatformValidator.js +26 -25
  132. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +192 -165
  133. package/sdk/platform/Cart/CartPlatformApplicationClient.js +686 -510
  134. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +14 -11
  135. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +77 -61
  136. package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
  137. package/sdk/platform/Cart/CartPlatformModel.js +676 -1206
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1558 -1556
  140. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  141. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
  142. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +688 -688
  143. package/sdk/platform/Catalog/CatalogPlatformClient.js +1556 -1559
  144. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
  145. package/sdk/platform/Catalog/CatalogPlatformModel.js +2133 -3910
  146. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
  147. package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -228
  148. package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
  149. package/sdk/platform/Common/CommonPlatformClient.js +40 -51
  150. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  151. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  152. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  153. package/sdk/platform/Common/CommonPlatformValidator.js +7 -6
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +945 -943
  156. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  157. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +88 -88
  158. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
  159. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  160. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  161. package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +217 -216
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -24
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +617 -552
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +70 -64
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
  173. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +348 -347
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  175. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  177. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +39 -38
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +524 -534
  179. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1287 -1346
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +49 -50
  181. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +153 -159
  182. package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
  183. package/sdk/platform/Content/ContentPlatformModel.js +485 -907
  184. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
  185. package/sdk/platform/Discount/DiscountPlatformClient.js +219 -218
  186. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  187. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  188. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  189. package/sdk/platform/Discount/DiscountPlatformValidator.js +30 -29
  190. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +25 -25
  191. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +83 -61
  192. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +9 -9
  194. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +53 -53
  195. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +147 -125
  196. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  197. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  198. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  199. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +12 -11
  200. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
  201. package/sdk/platform/Inventory/InventoryPlatformClient.js +231 -230
  202. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  203. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  204. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  205. package/sdk/platform/Inventory/InventoryPlatformValidator.js +29 -28
  206. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
  207. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +203 -201
  208. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  209. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +29 -29
  210. package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
  211. package/sdk/platform/Lead/LeadPlatformClient.js +215 -214
  212. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  213. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  214. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  215. package/sdk/platform/Lead/LeadPlatformValidator.js +25 -24
  216. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
  217. package/sdk/platform/Order/OrderPlatformApplicationClient.js +68 -66
  218. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  219. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +7 -7
  220. package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
  221. package/sdk/platform/Order/OrderPlatformClient.js +1046 -1033
  222. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
  223. package/sdk/platform/Order/OrderPlatformModel.js +1575 -2861
  224. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  225. package/sdk/platform/Order/OrderPlatformValidator.js +161 -160
  226. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
  227. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
  228. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
  229. package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
  230. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +58 -58
  231. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +178 -178
  232. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  233. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +24 -24
  234. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
  235. package/sdk/platform/Payment/PaymentPlatformClient.js +156 -155
  236. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  237. package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
  238. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  239. package/sdk/platform/Payment/PaymentPlatformValidator.js +22 -21
  240. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
  241. package/sdk/platform/PlatformApplicationClient.js +1584 -13899
  242. package/sdk/platform/PlatformClient.d.ts +7972 -7888
  243. package/sdk/platform/PlatformClient.js +8678 -10107
  244. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +85 -85
  245. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +299 -280
  246. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  247. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +35 -35
  248. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  249. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  250. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
  251. package/sdk/platform/Share/SharePlatformApplicationClient.js +62 -60
  252. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  253. package/sdk/platform/Share/SharePlatformApplicationValidator.js +7 -7
  254. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  255. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  256. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
  257. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +314 -312
  258. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  259. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +45 -45
  260. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  261. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  262. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
  263. package/sdk/platform/User/UserPlatformApplicationClient.js +507 -166
  264. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  265. package/sdk/platform/User/UserPlatformApplicationValidator.js +62 -24
  266. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  267. package/sdk/platform/User/UserPlatformModel.js +440 -689
  268. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
  269. package/sdk/platform/Webhook/WebhookPlatformClient.js +91 -90
  270. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  271. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  272. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  273. package/sdk/platform/Webhook/WebhookPlatformValidator.js +15 -14
  274. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  275. package/sdk/public/Configuration/ConfigurationPublicClient.js +40 -38
  276. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  277. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  278. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  279. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  280. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  281. package/sdk/public/Inventory/InventoryPublicClient.js +115 -113
  282. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  283. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  284. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  285. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  286. package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
  287. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  288. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  289. package/.github/workflows/on_create_release.yml +0 -23
  290. package/.github/workflows/on_merge_main.yml +0 -38
  291. package/.github/workflows/on_pull_request.yml +0 -35
  292. package/.prettierrc +0 -5
  293. package/documentation/application/CART.md +0 -7339
  294. package/documentation/application/CATALOG.md +0 -9597
  295. package/documentation/application/COMMON.md +0 -452
  296. package/documentation/application/COMMUNICATION.md +0 -467
  297. package/documentation/application/CONFIGURATION.md +0 -2906
  298. package/documentation/application/CONTENT.md +0 -3351
  299. package/documentation/application/FILESTORAGE.md +0 -578
  300. package/documentation/application/LEAD.md +0 -1895
  301. package/documentation/application/LOGISTIC.md +0 -765
  302. package/documentation/application/ORDER.md +0 -3432
  303. package/documentation/application/PAYMENT.md +0 -5221
  304. package/documentation/application/POSCART.md +0 -7938
  305. package/documentation/application/README.md +0 -21
  306. package/documentation/application/REWARDS.md +0 -708
  307. package/documentation/application/SHARE.md +0 -733
  308. package/documentation/application/THEME.md +0 -5800
  309. package/documentation/application/USER.md +0 -4335
  310. package/documentation/platform/ANALYTICS.md +0 -1154
  311. package/documentation/platform/AUDITTRAIL.md +0 -576
  312. package/documentation/platform/BILLING.md +0 -2400
  313. package/documentation/platform/CART.md +0 -5559
  314. package/documentation/platform/CATALOG.md +0 -23261
  315. package/documentation/platform/COMMON.md +0 -452
  316. package/documentation/platform/COMMUNICATION.md +0 -5718
  317. package/documentation/platform/COMPANYPROFILE.md +0 -2031
  318. package/documentation/platform/CONFIGURATION.md +0 -7339
  319. package/documentation/platform/CONTENT.md +0 -9098
  320. package/documentation/platform/DISCOUNT.md +0 -863
  321. package/documentation/platform/FILESTORAGE.md +0 -1081
  322. package/documentation/platform/INVENTORY.md +0 -1779
  323. package/documentation/platform/LEAD.md +0 -4740
  324. package/documentation/platform/ORDER.md +0 -8486
  325. package/documentation/platform/PARTNER.md +0 -220
  326. package/documentation/platform/PAYMENT.md +0 -3448
  327. package/documentation/platform/README.md +0 -27
  328. package/documentation/platform/REWARDS.md +0 -1083
  329. package/documentation/platform/SHARE.md +0 -606
  330. package/documentation/platform/THEME.md +0 -35729
  331. package/documentation/platform/USER.md +0 -2319
  332. package/documentation/platform/WEBHOOK.md +0 -591
  333. package/documentation/public/CONFIGURATION.md +0 -452
  334. package/documentation/public/INVENTORY.md +0 -690
  335. package/documentation/public/WEBHOOK.md +0 -352
  336. package/jest.config.d.ts +0 -4
  337. package/jest.config.js +0 -6
  338. package/tests/application/catalog.spec.js +0 -47
  339. package/tests/common/action-url.spec.js +0 -35
  340. package/tests/common/schema/action-url.json +0 -178
  341. package/tests/common/schema/url-action.json +0 -683
  342. package/tests/common/url-action.spec.js +0 -48
  343. package/tests/helpers/cookie.helper.js +0 -31
  344. package/tests/helpers/oauth.helper.js +0 -43
  345. package/tests/platform/catalog.spec.js +0 -49
  346. package/tests/public/location.spec.js +0 -39
@@ -1,1515 +1,985 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  class CartModel {
4
- static Page() {
4
+ static AbandonedCart() {
5
5
  return Joi.object({
6
- item_total: Joi.number(),
7
-
8
- next_id: Joi.string().allow(""),
9
-
10
- has_previous: Joi.boolean(),
11
-
12
- has_next: Joi.boolean(),
13
-
14
- current: Joi.number(),
15
-
16
- type: Joi.string().allow("").required(),
17
-
18
- size: Joi.number(),
6
+ _id: Joi.string().allow("").required(),
7
+ app_id: Joi.string().allow(""),
8
+ articles: Joi.array().items(Joi.any()).required(),
9
+ bulk_coupon_discount: Joi.number().allow(null),
10
+ buy_now: Joi.boolean(),
11
+ cart_value: Joi.number(),
12
+ cashback: Joi.any().required(),
13
+ checkout_mode: Joi.string().allow(""),
14
+ cod_charges: Joi.any(),
15
+ comment: Joi.string().allow("").allow(null),
16
+ coupon: Joi.any().allow(null),
17
+ created_on: Joi.string().allow("").required(),
18
+ delivery_charges: Joi.any(),
19
+ discount: Joi.number(),
20
+ expire_at: Joi.string().allow("").required(),
21
+ fc_index_map: Joi.array().items(Joi.number()),
22
+ fynd_credits: Joi.any(),
23
+ gstin: Joi.string().allow("").allow(null),
24
+ is_active: Joi.boolean(),
25
+ is_archive: Joi.boolean(),
26
+ is_default: Joi.boolean().required(),
27
+ last_modified: Joi.string().allow("").required(),
28
+ merge_qty: Joi.boolean().allow(null),
29
+ meta: Joi.any().allow(null),
30
+ order_id: Joi.string().allow(""),
31
+ payment_methods: Joi.array().items(Joi.any()),
32
+ payment_mode: Joi.string().allow("").allow(null),
33
+ payments: Joi.any().allow(null),
34
+ pick_up_customer_details: Joi.any().allow(null),
35
+ promotion: Joi.any(),
36
+ shipments: Joi.array().items(Joi.any()),
37
+ uid: Joi.number().required(),
38
+ user_id: Joi.string().allow("").required(),
19
39
  });
20
40
  }
21
-
22
- static Validation() {
41
+ static AbandonedCartResponse() {
23
42
  return Joi.object({
24
- user_registered_after: Joi.string().allow("").allow(null),
25
-
26
- anonymous: Joi.boolean(),
27
-
28
- app_id: Joi.array().items(Joi.string().allow("")),
43
+ items: Joi.array().items(CartModel.AbandonedCart()),
44
+ message: Joi.string().allow(""),
45
+ page: CartModel.Page(),
46
+ result: Joi.any(),
47
+ success: Joi.boolean(),
29
48
  });
30
49
  }
31
-
32
- static RuleDefinition() {
50
+ static ActionQuery() {
33
51
  return Joi.object({
34
- type: Joi.string().allow("").required(),
35
-
36
- currency_code: Joi.string().allow(""),
37
-
38
- scope: Joi.array().items(Joi.string().allow("")),
39
-
40
- calculate_on: Joi.string().allow("").required(),
41
-
42
- is_exact: Joi.boolean(),
43
-
44
- auto_apply: Joi.boolean(),
45
-
46
- value_type: Joi.string().allow("").required(),
47
-
48
- applicable_on: Joi.string().allow("").required(),
52
+ product_slug: Joi.array().items(Joi.string().allow("")),
49
53
  });
50
54
  }
51
-
52
- static State() {
55
+ static AddCartDetailResponse() {
53
56
  return Joi.object({
54
- is_display: Joi.boolean(),
55
-
56
- is_public: Joi.boolean(),
57
-
58
- is_archived: Joi.boolean(),
57
+ cart: CartModel.CartDetailResponse(),
58
+ message: Joi.string().allow(""),
59
+ partial: Joi.boolean(),
60
+ success: Joi.boolean(),
59
61
  });
60
62
  }
61
-
62
- static CouponAuthor() {
63
+ static AddCartRequest() {
63
64
  return Joi.object({
64
- created_by: Joi.string().allow("").allow(null),
65
-
66
- modified_by: Joi.string().allow("").allow(null),
65
+ items: Joi.array().items(CartModel.AddProductCart()),
67
66
  });
68
67
  }
69
-
70
- static Validity() {
68
+ static AddProductCart() {
71
69
  return Joi.object({
72
- priority: Joi.number(),
70
+ _custom_json: Joi.any(),
71
+ article_assignment: Joi.any(),
72
+ article_id: Joi.string().allow(""),
73
+ display: Joi.string().allow(""),
74
+ extra_meta: Joi.any(),
75
+ item_id: Joi.number(),
76
+ item_size: Joi.string().allow(""),
77
+ parent_item_identifiers: Joi.array().items(
78
+ Joi.object().pattern(/\S/, Joi.string().allow(""))
79
+ ),
80
+ pos: Joi.boolean(),
81
+ product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
82
+ quantity: Joi.number(),
83
+ seller_id: Joi.number(),
84
+ store_id: Joi.number(),
73
85
  });
74
86
  }
75
-
76
- static CouponDateMeta() {
87
+ static AppliedPromotion() {
77
88
  return Joi.object({
78
- modified_on: Joi.string().allow("").allow(null),
79
-
80
- created_on: Joi.string().allow("").allow(null),
89
+ amount: Joi.number(),
90
+ article_quantity: Joi.number(),
91
+ mrp_promotion: Joi.boolean(),
92
+ offer_text: Joi.string().allow(""),
93
+ ownership: CartModel.Ownership2(),
94
+ promo_id: Joi.string().allow(""),
95
+ promotion_type: Joi.string().allow(""),
81
96
  });
82
97
  }
83
-
84
- static PaymentAllowValue() {
98
+ static ArticlePriceInfo() {
85
99
  return Joi.object({
86
- max: Joi.number(),
100
+ base: CartModel.BasePrice(),
101
+ converted: CartModel.BasePrice(),
87
102
  });
88
103
  }
89
-
90
- static PaymentModes() {
104
+ static BaseInfo() {
91
105
  return Joi.object({
92
- uses: CartModel.PaymentAllowValue(),
93
-
94
- codes: Joi.array().items(Joi.string().allow("")),
95
-
96
- networks: Joi.array().items(Joi.string().allow("")),
97
-
98
- types: Joi.array().items(Joi.string().allow("")),
106
+ name: Joi.string().allow(""),
107
+ uid: Joi.number(),
108
+ });
109
+ }
110
+ static BasePrice() {
111
+ return Joi.object({
112
+ currency_code: Joi.string().allow(""),
113
+ currency_symbol: Joi.string().allow(""),
114
+ effective: Joi.number(),
115
+ marked: Joi.number(),
99
116
  });
100
117
  }
101
-
102
118
  static BulkBundleRestriction() {
103
119
  return Joi.object({
104
120
  multi_store_allowed: Joi.boolean().required(),
105
121
  });
106
122
  }
107
-
108
- static UsesRemaining() {
123
+ static CartBreakup() {
109
124
  return Joi.object({
110
- total: Joi.number(),
111
-
112
- user: Joi.number(),
113
-
114
- app: Joi.number(),
125
+ coupon: CartModel.CouponBreakup(),
126
+ display: Joi.array().items(CartModel.DisplayBreakup()),
127
+ loyalty_points: CartModel.LoyaltyPoints(),
128
+ raw: CartModel.RawBreakup(),
115
129
  });
116
130
  }
117
-
118
- static UsesRestriction() {
131
+ static CartCurrency() {
119
132
  return Joi.object({
120
- maximum: CartModel.UsesRemaining(),
121
-
122
- remaining: CartModel.UsesRemaining(),
133
+ code: Joi.string().allow(""),
134
+ symbol: Joi.string().allow(""),
123
135
  });
124
136
  }
125
-
126
- static PostOrder() {
137
+ static CartDetailResponse() {
127
138
  return Joi.object({
128
- return_allowed: Joi.boolean(),
129
-
130
- cancellation_allowed: Joi.boolean(),
139
+ applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
140
+ breakup_values: CartModel.CartBreakup(),
141
+ buy_now: Joi.boolean(),
142
+ checkout_mode: Joi.string().allow(""),
143
+ comment: Joi.string().allow(""),
144
+ coupon_text: Joi.string().allow(""),
145
+ currency: CartModel.CartCurrency(),
146
+ delivery_charge_info: Joi.string().allow(""),
147
+ delivery_promise: CartModel.ShipmentPromise(),
148
+ gstin: Joi.string().allow(""),
149
+ id: Joi.string().allow(""),
150
+ is_valid: Joi.boolean(),
151
+ items: Joi.array().items(CartModel.CartProductInfo()),
152
+ last_modified: Joi.string().allow(""),
153
+ message: Joi.string().allow(""),
154
+ payment_selection_lock: CartModel.PaymentSelectionLock(),
155
+ restrict_checkout: Joi.boolean(),
131
156
  });
132
157
  }
133
-
134
- static PriceRange() {
158
+ static CartItem() {
135
159
  return Joi.object({
136
- min: Joi.number(),
137
-
138
- max: Joi.number(),
160
+ product_id: Joi.string().allow("").required(),
161
+ quantity: Joi.number(),
162
+ size: Joi.string().allow("").required(),
139
163
  });
140
164
  }
141
-
142
- static Restrictions() {
165
+ static CartItemMeta() {
143
166
  return Joi.object({
144
- payments: Joi.object().pattern(/\S/, this.PaymentModes()),
145
-
146
- bulk_bundle: CartModel.BulkBundleRestriction(),
147
-
148
- uses: CartModel.UsesRestriction(),
149
-
150
- platforms: Joi.array().items(Joi.string().allow("")),
151
-
152
- post_order: CartModel.PostOrder(),
153
-
154
- coupon_allowed: Joi.boolean(),
155
-
156
- ordering_stores: Joi.array().items(Joi.number()),
157
-
158
- user_groups: Joi.array().items(Joi.number()),
159
-
160
- price_range: CartModel.PriceRange(),
167
+ group_id: Joi.string().allow(""),
168
+ primary_item: Joi.boolean(),
161
169
  });
162
170
  }
163
-
164
- static CouponAction() {
171
+ static CartProduct() {
165
172
  return Joi.object({
166
- action_date: Joi.string().allow("").allow(null),
167
-
168
- txn_mode: Joi.string().allow(""),
173
+ action: CartModel.ProductAction(),
174
+ brand: CartModel.BaseInfo(),
175
+ categories: Joi.array().items(CartModel.CategoryInfo()),
176
+ images: Joi.array().items(CartModel.ProductImage()),
177
+ name: Joi.string().allow(""),
178
+ slug: Joi.string().allow(""),
179
+ type: Joi.string().allow(""),
180
+ uid: Joi.number(),
169
181
  });
170
182
  }
171
-
172
- static CouponSchedule() {
183
+ static CartProductIdentifer() {
173
184
  return Joi.object({
174
- cron: Joi.string().allow("").allow(null),
175
-
176
- start: Joi.string().allow(""),
177
-
178
- end: Joi.string().allow("").allow(null),
179
-
180
- duration: Joi.number().allow(null),
181
-
182
- next_schedule: Joi.array().items(Joi.any()),
185
+ identifier: Joi.string().allow(""),
183
186
  });
184
187
  }
185
-
186
- static Rule() {
187
- return Joi.object({
188
- value: Joi.number(),
189
-
190
- key: Joi.number(),
191
-
192
- max: Joi.number(),
193
-
194
- min: Joi.number(),
195
-
196
- discount_qty: Joi.number(),
197
- });
198
- }
199
-
200
- static Ownership() {
188
+ static CartProductInfo() {
201
189
  return Joi.object({
202
- payable_by: Joi.string().allow("").required(),
203
-
204
- payable_category: Joi.string().allow("").required(),
190
+ article: CartModel.ProductArticle(),
191
+ availability: CartModel.ProductAvailability(),
192
+ bulk_offer: Joi.any(),
193
+ coupon_message: Joi.string().allow(""),
194
+ delivery_promise: CartModel.ShipmentPromise(),
195
+ discount: Joi.string().allow(""),
196
+ identifiers: CartModel.CartProductIdentifer().required(),
197
+ is_set: Joi.boolean(),
198
+ key: Joi.string().allow(""),
199
+ message: Joi.string().allow(""),
200
+ moq: Joi.any(),
201
+ parent_item_identifiers: Joi.any(),
202
+ price: CartModel.ProductPriceInfo(),
203
+ price_per_unit: CartModel.ProductPriceInfo(),
204
+ product: CartModel.CartProduct(),
205
+ promo_meta: CartModel.PromoMeta(),
206
+ promotions_applied: Joi.array().items(CartModel.AppliedPromotion()),
207
+ quantity: Joi.number(),
205
208
  });
206
209
  }
207
-
208
- static DisplayMetaDict() {
210
+ static CategoryInfo() {
209
211
  return Joi.object({
210
- subtitle: Joi.string().allow(""),
211
-
212
- title: Joi.string().allow(""),
212
+ name: Joi.string().allow(""),
213
+ uid: Joi.number(),
213
214
  });
214
215
  }
215
-
216
- static DisplayMeta() {
216
+ static CompareObject() {
217
217
  return Joi.object({
218
- apply: CartModel.DisplayMetaDict(),
219
-
220
- auto: CartModel.DisplayMetaDict(),
221
-
222
- remove: CartModel.DisplayMetaDict(),
223
-
224
- title: Joi.string().allow(""),
225
-
226
- description: Joi.string().allow(""),
227
-
228
- subtitle: Joi.string().allow(""),
218
+ equals: Joi.number(),
219
+ greater_than: Joi.number(),
220
+ greater_than_equals: Joi.number(),
221
+ less_than: Joi.number(),
222
+ less_than_equals: Joi.number(),
229
223
  });
230
224
  }
231
-
232
- static Identifier() {
225
+ static CouponAction() {
233
226
  return Joi.object({
234
- exclude_brand_id: Joi.array().items(Joi.number()),
235
-
236
- item_id: Joi.array().items(Joi.number()),
237
-
238
- brand_id: Joi.array().items(Joi.number()),
239
-
240
- user_id: Joi.array().items(Joi.string().allow("")),
241
-
242
- category_id: Joi.array().items(Joi.number()),
243
-
244
- company_id: Joi.array().items(Joi.number()),
245
-
246
- article_id: Joi.array().items(Joi.string().allow("")),
247
-
248
- store_id: Joi.array().items(Joi.number()),
249
-
250
- collection_id: Joi.array().items(Joi.string().allow("")),
227
+ action_date: Joi.string().allow("").allow(null),
228
+ txn_mode: Joi.string().allow(""),
251
229
  });
252
230
  }
253
-
254
231
  static CouponAdd() {
255
232
  return Joi.object({
256
- validation: CartModel.Validation(),
257
-
258
- rule_definition: CartModel.RuleDefinition().required(),
259
-
260
- state: CartModel.State(),
261
-
262
- tags: Joi.array().items(Joi.string().allow("")),
263
-
264
- code: Joi.string().allow("").required(),
265
-
233
+ _schedule: CartModel.CouponSchedule(),
234
+ action: CartModel.CouponAction(),
266
235
  author: CartModel.CouponAuthor(),
267
-
268
- validity: CartModel.Validity().required(),
269
-
236
+ code: Joi.string().allow("").required(),
270
237
  date_meta: CartModel.CouponDateMeta(),
271
-
238
+ display_meta: CartModel.DisplayMeta().required(),
239
+ identifiers: CartModel.Identifier().required(),
240
+ ownership: CartModel.Ownership().required(),
272
241
  restrictions: CartModel.Restrictions(),
273
-
274
- action: CartModel.CouponAction(),
275
-
276
- _schedule: CartModel.CouponSchedule(),
277
-
278
242
  rule: Joi.array().items(CartModel.Rule()).required(),
279
-
280
- ownership: CartModel.Ownership().required(),
281
-
282
- display_meta: CartModel.DisplayMeta().required(),
283
-
243
+ rule_definition: CartModel.RuleDefinition().required(),
244
+ state: CartModel.State(),
245
+ tags: Joi.array().items(Joi.string().allow("")),
284
246
  type_slug: Joi.string().allow("").required(),
285
-
286
- identifiers: CartModel.Identifier().required(),
247
+ validation: CartModel.Validation(),
248
+ validity: CartModel.Validity().required(),
287
249
  });
288
250
  }
289
-
290
- static CouponsResponse() {
251
+ static CouponAuthor() {
291
252
  return Joi.object({
292
- page: CartModel.Page(),
293
-
294
- items: CartModel.CouponAdd(),
253
+ created_by: Joi.string().allow("").allow(null),
254
+ modified_by: Joi.string().allow("").allow(null),
295
255
  });
296
256
  }
297
-
298
- static SuccessMessage() {
257
+ static CouponBreakup() {
299
258
  return Joi.object({
259
+ code: Joi.string().allow(""),
260
+ is_applied: Joi.boolean(),
300
261
  message: Joi.string().allow(""),
301
-
302
- success: Joi.boolean(),
262
+ type: Joi.string().allow(""),
263
+ uid: Joi.string().allow(""),
264
+ value: Joi.number(),
303
265
  });
304
266
  }
305
-
306
- static OperationErrorResponse() {
267
+ static CouponDateMeta() {
307
268
  return Joi.object({
308
- message: Joi.string().allow(""),
309
-
310
- success: Joi.boolean(),
269
+ created_on: Joi.string().allow("").allow(null),
270
+ modified_on: Joi.string().allow("").allow(null),
271
+ });
272
+ }
273
+ static CouponPartialUpdate() {
274
+ return Joi.object({
275
+ archive: Joi.boolean(),
276
+ schedule: CartModel.CouponSchedule(),
277
+ });
278
+ }
279
+ static CouponSchedule() {
280
+ return Joi.object({
281
+ cron: Joi.string().allow("").allow(null),
282
+ duration: Joi.number().allow(null),
283
+ end: Joi.string().allow("").allow(null),
284
+ next_schedule: Joi.array().items(Joi.any()),
285
+ start: Joi.string().allow(""),
286
+ });
287
+ }
288
+ static CouponsResponse() {
289
+ return Joi.object({
290
+ items: CartModel.CouponAdd(),
291
+ page: CartModel.Page(),
311
292
  });
312
293
  }
313
-
314
294
  static CouponUpdate() {
315
295
  return Joi.object({
316
- validation: CartModel.Validation(),
317
-
318
- rule_definition: CartModel.RuleDefinition().required(),
319
-
320
- state: CartModel.State(),
321
-
322
- tags: Joi.array().items(Joi.string().allow("")),
323
-
324
- code: Joi.string().allow("").required(),
325
-
296
+ _schedule: CartModel.CouponSchedule(),
297
+ action: CartModel.CouponAction(),
326
298
  author: CartModel.CouponAuthor(),
327
-
328
- validity: CartModel.Validity().required(),
329
-
299
+ code: Joi.string().allow("").required(),
330
300
  date_meta: CartModel.CouponDateMeta(),
331
-
301
+ display_meta: CartModel.DisplayMeta().required(),
302
+ identifiers: CartModel.Identifier().required(),
303
+ ownership: CartModel.Ownership().required(),
332
304
  restrictions: CartModel.Restrictions(),
333
-
334
- action: CartModel.CouponAction(),
335
-
336
- _schedule: CartModel.CouponSchedule(),
337
-
338
305
  rule: Joi.array().items(CartModel.Rule()).required(),
339
-
340
- ownership: CartModel.Ownership().required(),
341
-
342
- display_meta: CartModel.DisplayMeta().required(),
343
-
306
+ rule_definition: CartModel.RuleDefinition().required(),
307
+ state: CartModel.State(),
308
+ tags: Joi.array().items(Joi.string().allow("")),
344
309
  type_slug: Joi.string().allow("").required(),
345
-
346
- identifiers: CartModel.Identifier().required(),
310
+ validation: CartModel.Validation(),
311
+ validity: CartModel.Validity().required(),
347
312
  });
348
313
  }
349
-
350
- static CouponPartialUpdate() {
314
+ static DiscountOffer() {
351
315
  return Joi.object({
352
- archive: Joi.boolean(),
353
-
354
- schedule: CartModel.CouponSchedule(),
316
+ code: Joi.string().allow(""),
317
+ discount_amount: Joi.number(),
318
+ discount_percentage: Joi.number(),
319
+ discount_price: Joi.number(),
320
+ max_discount_amount: Joi.number(),
321
+ max_offer_quantity: Joi.number(),
322
+ min_offer_quantity: Joi.number(),
355
323
  });
356
324
  }
357
-
358
- static CompareObject() {
325
+ static DiscountRule() {
359
326
  return Joi.object({
360
- greater_than: Joi.number(),
361
-
362
- less_than_equals: Joi.number(),
363
-
364
- equals: Joi.number(),
365
-
366
- less_than: Joi.number(),
367
-
368
- greater_than_equals: Joi.number(),
327
+ buy_condition: Joi.string().allow("").required(),
328
+ discount_type: Joi.string().allow("").required(),
329
+ item_criteria: CartModel.ItemCriteria().required(),
330
+ offer: CartModel.DiscountOffer().required(),
369
331
  });
370
332
  }
371
-
372
- static ItemCriteria() {
333
+ static DisplayBreakup() {
373
334
  return Joi.object({
374
- buy_rules: Joi.array().items(Joi.string().allow("")),
375
-
376
- item_exclude_brand: Joi.array().items(Joi.number()),
377
-
378
- item_exclude_category: Joi.array().items(Joi.number()),
379
-
380
- item_category: Joi.array().items(Joi.number()),
381
-
382
- item_exclude_sku: Joi.array().items(Joi.string().allow("")),
383
-
384
- all_items: Joi.boolean(),
385
-
386
- item_id: Joi.array().items(Joi.number()),
387
-
388
- item_store: Joi.array().items(Joi.number()),
389
-
390
- cart_quantity: CartModel.CompareObject(),
391
-
392
- cart_total: CartModel.CompareObject(),
393
-
394
- item_brand: Joi.array().items(Joi.number()),
395
-
396
- item_company: Joi.array().items(Joi.number()),
397
-
398
- item_sku: Joi.array().items(Joi.string().allow("")),
399
-
400
- item_exclude_store: Joi.array().items(Joi.number()),
401
-
402
- item_exclude_company: Joi.array().items(Joi.number()),
403
-
404
- item_size: Joi.array().items(Joi.string().allow("")),
335
+ currency_code: Joi.string().allow(""),
336
+ currency_symbol: Joi.string().allow(""),
337
+ display: Joi.string().allow(""),
338
+ key: Joi.string().allow(""),
339
+ message: Joi.array().items(Joi.string().allow("")),
340
+ value: Joi.number(),
405
341
  });
406
342
  }
407
-
408
- static Ownership1() {
343
+ static DisplayMeta() {
409
344
  return Joi.object({
410
- payable_by: Joi.string().allow("").required(),
411
-
412
- payable_category: Joi.string().allow("").required(),
345
+ apply: CartModel.DisplayMetaDict(),
346
+ auto: CartModel.DisplayMetaDict(),
347
+ description: Joi.string().allow(""),
348
+ remove: CartModel.DisplayMetaDict(),
349
+ subtitle: Joi.string().allow(""),
350
+ title: Joi.string().allow(""),
413
351
  });
414
352
  }
415
-
416
- static PromotionAction() {
353
+ static DisplayMeta1() {
417
354
  return Joi.object({
418
- action_type: Joi.string().allow("").required(),
419
-
420
- action_date: Joi.string().allow("").allow(null).required(),
355
+ description: Joi.string().allow(""),
356
+ name: Joi.string().allow(""),
357
+ offer_text: Joi.string().allow(""),
421
358
  });
422
359
  }
423
-
424
- static PromotionAuthor() {
360
+ static DisplayMetaDict() {
425
361
  return Joi.object({
426
- created_by: Joi.string().allow("").allow(null),
427
-
428
- modified_by: Joi.string().allow("").allow(null),
362
+ subtitle: Joi.string().allow(""),
363
+ title: Joi.string().allow(""),
429
364
  });
430
365
  }
431
-
432
- static PaymentAllowValue1() {
366
+ static Identifier() {
433
367
  return Joi.object({
434
- max: Joi.number(),
368
+ article_id: Joi.array().items(Joi.string().allow("")),
369
+ brand_id: Joi.array().items(Joi.number()),
370
+ category_id: Joi.array().items(Joi.number()),
371
+ collection_id: Joi.array().items(Joi.string().allow("")),
372
+ company_id: Joi.array().items(Joi.number()),
373
+ exclude_brand_id: Joi.array().items(Joi.number()),
374
+ item_id: Joi.array().items(Joi.number()),
375
+ store_id: Joi.array().items(Joi.number()),
376
+ user_id: Joi.array().items(Joi.string().allow("")),
435
377
  });
436
378
  }
437
-
438
- static PromotionPaymentModes() {
379
+ static ItemCriteria() {
439
380
  return Joi.object({
440
- uses: CartModel.PaymentAllowValue1(),
441
-
442
- type: Joi.string().allow("").required(),
443
-
444
- codes: Joi.array().items(Joi.string().allow("")),
381
+ all_items: Joi.boolean(),
382
+ buy_rules: Joi.array().items(Joi.string().allow("")),
383
+ cart_quantity: CartModel.CompareObject(),
384
+ cart_total: CartModel.CompareObject(),
385
+ item_brand: Joi.array().items(Joi.number()),
386
+ item_category: Joi.array().items(Joi.number()),
387
+ item_company: Joi.array().items(Joi.number()),
388
+ item_exclude_brand: Joi.array().items(Joi.number()),
389
+ item_exclude_category: Joi.array().items(Joi.number()),
390
+ item_exclude_company: Joi.array().items(Joi.number()),
391
+ item_exclude_sku: Joi.array().items(Joi.string().allow("")),
392
+ item_exclude_store: Joi.array().items(Joi.number()),
393
+ item_id: Joi.array().items(Joi.number()),
394
+ item_size: Joi.array().items(Joi.string().allow("")),
395
+ item_sku: Joi.array().items(Joi.string().allow("")),
396
+ item_store: Joi.array().items(Joi.number()),
445
397
  });
446
398
  }
447
-
448
- static UsesRemaining1() {
399
+ static LoyaltyPoints() {
449
400
  return Joi.object({
401
+ applicable: Joi.number(),
402
+ description: Joi.string().allow(""),
403
+ is_applied: Joi.boolean(),
450
404
  total: Joi.number(),
451
-
452
- user: Joi.number(),
453
405
  });
454
406
  }
455
-
456
- static UsesRestriction1() {
407
+ static MultiTenderPaymentMeta() {
457
408
  return Joi.object({
458
- maximum: CartModel.UsesRemaining1(),
459
-
460
- remaining: CartModel.UsesRemaining1(),
409
+ current_status: Joi.string().allow("").allow(null),
410
+ extra_meta: Joi.any().allow(null),
411
+ order_id: Joi.string().allow("").allow(null),
412
+ payment_gateway: Joi.string().allow("").allow(null),
413
+ payment_id: Joi.string().allow("").allow(null),
461
414
  });
462
415
  }
463
-
464
- static UserRegistered() {
416
+ static MultiTenderPaymentMethod() {
465
417
  return Joi.object({
466
- start: Joi.string().allow("").allow(null),
467
-
468
- end: Joi.string().allow("").allow(null),
418
+ amount: Joi.number().required(),
419
+ meta: CartModel.MultiTenderPaymentMeta(),
420
+ mode: Joi.string().allow("").required(),
421
+ name: Joi.string().allow(""),
469
422
  });
470
423
  }
471
-
472
- static PostOrder1() {
424
+ static OpenapiCartDetailsRequest() {
473
425
  return Joi.object({
474
- return_allowed: Joi.boolean(),
475
-
476
- cancellation_allowed: Joi.boolean(),
426
+ cart_items: Joi.array().items(CartModel.CartItem()).required(),
477
427
  });
478
428
  }
479
-
480
- static Restrictions1() {
429
+ static OpenapiCartDetailsResponse() {
481
430
  return Joi.object({
482
- payments: Joi.array().items(CartModel.PromotionPaymentModes()),
483
-
484
- uses: CartModel.UsesRestriction1().required(),
485
-
486
- platforms: Joi.array().items(Joi.string().allow("")),
487
-
488
- user_id: Joi.array().items(Joi.string().allow("")),
489
-
490
- user_registered: CartModel.UserRegistered(),
491
-
492
- order_quantity: Joi.number(),
493
-
494
- post_order: CartModel.PostOrder1(),
495
-
496
- user_groups: Joi.array().items(Joi.number()),
497
-
498
- anonymous_users: Joi.boolean(),
431
+ breakup_values: CartModel.CartBreakup(),
432
+ is_valid: Joi.boolean(),
433
+ items: Joi.array().items(CartModel.CartProductInfo()),
434
+ message: Joi.string().allow(""),
499
435
  });
500
436
  }
501
-
502
- static DiscountOffer() {
437
+ static OpenApiCartServiceabilityRequest() {
503
438
  return Joi.object({
504
- discount_price: Joi.number(),
505
-
506
- min_offer_quantity: Joi.number(),
507
-
508
- discount_percentage: Joi.number(),
509
-
510
- code: Joi.string().allow(""),
511
-
512
- max_discount_amount: Joi.number(),
513
-
514
- max_offer_quantity: Joi.number(),
515
-
516
- discount_amount: Joi.number(),
439
+ cart_items: Joi.array().items(CartModel.CartItem()).required(),
440
+ shipping_address: CartModel.ShippingAddress().required(),
517
441
  });
518
442
  }
519
-
520
- static DiscountRule() {
443
+ static OpenApiCartServiceabilityResponse() {
521
444
  return Joi.object({
522
- buy_condition: Joi.string().allow("").required(),
523
-
524
- item_criteria: CartModel.ItemCriteria().required(),
525
-
526
- discount_type: Joi.string().allow("").required(),
527
-
528
- offer: CartModel.DiscountOffer().required(),
445
+ breakup_values: CartModel.CartBreakup(),
446
+ delivery_promise: CartModel.ShipmentPromise(),
447
+ is_valid: Joi.boolean(),
448
+ items: Joi.array().items(CartModel.CartProductInfo()),
449
+ message: Joi.string().allow(""),
529
450
  });
530
451
  }
531
-
532
- static PromotionDateMeta() {
452
+ static OpenApiCheckoutResponse() {
533
453
  return Joi.object({
534
- modified_on: Joi.string().allow("").allow(null),
535
-
536
- created_on: Joi.string().allow("").allow(null),
454
+ message: Joi.string().allow(""),
455
+ order_id: Joi.string().allow("").required(),
456
+ order_ref_id: Joi.string().allow(""),
457
+ success: Joi.boolean(),
537
458
  });
538
459
  }
539
-
540
- static Visibility() {
460
+ static OpenApiErrorResponse() {
541
461
  return Joi.object({
542
- coupon_list: Joi.boolean().required(),
543
-
544
- pdp: Joi.boolean().required(),
462
+ errors: Joi.any(),
463
+ message: Joi.string().allow(""),
464
+ success: Joi.boolean(),
545
465
  });
546
466
  }
547
-
548
- static PromotionSchedule() {
467
+ static OpenApiFiles() {
549
468
  return Joi.object({
550
- cron: Joi.string().allow("").allow(null),
551
-
552
- start: Joi.string().allow("").required(),
553
-
554
- end: Joi.string().allow("").allow(null),
555
-
556
- duration: Joi.number().allow(null),
557
-
558
- next_schedule: Joi.array().items(Joi.any()),
559
-
560
- published: Joi.boolean().required(),
469
+ key: Joi.string().allow("").required(),
470
+ values: Joi.array().items(Joi.string().allow("")).required(),
561
471
  });
562
472
  }
563
-
564
- static DisplayMeta1() {
473
+ static OpenApiOrderItem() {
565
474
  return Joi.object({
566
- offer_text: Joi.string().allow(""),
567
-
568
- description: Joi.string().allow(""),
569
-
570
- name: Joi.string().allow(""),
475
+ amount_paid: Joi.number().required(),
476
+ cashback_applied: Joi.number().required(),
477
+ cod_charges: Joi.number().required(),
478
+ coupon_effective_discount: Joi.number().required(),
479
+ delivery_charges: Joi.number().required(),
480
+ discount: Joi.number().required(),
481
+ employee_discount: Joi.number(),
482
+ extra_meta: Joi.any(),
483
+ files: Joi.array().items(CartModel.OpenApiFiles()),
484
+ loyalty_discount: Joi.number(),
485
+ meta: CartModel.CartItemMeta(),
486
+ payment_methods: Joi.array()
487
+ .items(CartModel.MultiTenderPaymentMethod())
488
+ .required(),
489
+ price_effective: Joi.number().required(),
490
+ price_marked: Joi.number().required(),
491
+ product_id: Joi.number().required(),
492
+ quantity: Joi.number(),
493
+ size: Joi.string().allow("").required(),
571
494
  });
572
495
  }
573
-
574
- static PromotionListItem() {
496
+ static OpenApiPlatformCheckoutReq() {
575
497
  return Joi.object({
576
- buy_rules: Joi.object().pattern(/\S/, this.ItemCriteria()).required(),
577
-
578
- _custom_json: Joi.any(),
579
-
580
- ownership: CartModel.Ownership1().required(),
581
-
582
- apply_priority: Joi.number(),
583
-
584
- post_order_action: CartModel.PromotionAction(),
585
-
586
- promotion_type: Joi.string().allow("").required(),
587
-
588
- apply_all_discount: Joi.boolean(),
589
-
590
- application_id: Joi.string().allow("").required(),
591
-
592
- currency: Joi.string().allow(""),
593
-
594
- author: CartModel.PromotionAuthor(),
595
-
596
- restrictions: CartModel.Restrictions1(),
597
-
598
- discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
599
-
600
- mode: Joi.string().allow("").required(),
601
-
602
- apply_exclusive: Joi.string().allow("").allow(null),
603
-
604
- date_meta: CartModel.PromotionDateMeta(),
605
-
606
- stackable: Joi.boolean(),
607
-
608
- promo_group: Joi.string().allow("").required(),
609
-
610
- code: Joi.string().allow(""),
611
-
612
- visiblility: CartModel.Visibility(),
613
-
614
- _schedule: CartModel.PromotionSchedule(),
615
-
616
- display_meta: CartModel.DisplayMeta1().required(),
498
+ affiliate_order_id: Joi.string().allow(""),
499
+ billing_address: CartModel.ShippingAddress().required(),
500
+ cart_items: Joi.array().items(CartModel.OpenApiOrderItem()).required(),
501
+ cart_value: Joi.number().required(),
502
+ cashback_applied: Joi.number().required(),
503
+ cod_charges: Joi.number().required(),
504
+ comment: Joi.string().allow("").allow(null),
505
+ coupon: Joi.string().allow(""),
506
+ coupon_code: Joi.string().allow("").required(),
507
+ coupon_value: Joi.number().required(),
508
+ currency_code: Joi.string().allow(""),
509
+ delivery_charges: Joi.number().required(),
510
+ employee_discount: Joi.any(),
511
+ files: Joi.array().items(CartModel.OpenApiFiles()),
512
+ gstin: Joi.string().allow("").allow(null),
513
+ loyalty_discount: Joi.number(),
514
+ order_id: Joi.string().allow(""),
515
+ payment_methods: Joi.array()
516
+ .items(CartModel.MultiTenderPaymentMethod())
517
+ .required(),
518
+ payment_mode: Joi.string().allow(""),
519
+ shipping_address: CartModel.ShippingAddress(),
617
520
  });
618
521
  }
619
-
620
- static PromotionsResponse() {
522
+ static OperationErrorResponse() {
621
523
  return Joi.object({
622
- page: CartModel.Page(),
623
-
624
- items: CartModel.PromotionListItem(),
524
+ message: Joi.string().allow(""),
525
+ success: Joi.boolean(),
625
526
  });
626
527
  }
627
-
628
- static PromotionAdd() {
528
+ static Ownership() {
629
529
  return Joi.object({
630
- buy_rules: Joi.object().pattern(/\S/, this.ItemCriteria()).required(),
631
-
632
- _custom_json: Joi.any(),
633
-
634
- ownership: CartModel.Ownership1().required(),
635
-
636
- apply_priority: Joi.number(),
637
-
638
- post_order_action: CartModel.PromotionAction(),
639
-
640
- promotion_type: Joi.string().allow("").required(),
641
-
642
- apply_all_discount: Joi.boolean(),
643
-
644
- application_id: Joi.string().allow("").required(),
645
-
646
- currency: Joi.string().allow(""),
647
-
648
- author: CartModel.PromotionAuthor(),
649
-
650
- restrictions: CartModel.Restrictions1(),
651
-
652
- discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
653
-
654
- mode: Joi.string().allow("").required(),
655
-
656
- apply_exclusive: Joi.string().allow("").allow(null),
657
-
658
- date_meta: CartModel.PromotionDateMeta(),
659
-
660
- stackable: Joi.boolean(),
661
-
662
- promo_group: Joi.string().allow("").required(),
663
-
664
- code: Joi.string().allow(""),
665
-
666
- visiblility: CartModel.Visibility(),
667
-
668
- _schedule: CartModel.PromotionSchedule(),
669
-
670
- display_meta: CartModel.DisplayMeta1().required(),
530
+ payable_by: Joi.string().allow("").required(),
531
+ payable_category: Joi.string().allow("").required(),
671
532
  });
672
533
  }
673
-
674
- static PromotionUpdate() {
534
+ static Ownership1() {
675
535
  return Joi.object({
676
- buy_rules: Joi.object().pattern(/\S/, this.ItemCriteria()).required(),
677
-
678
- _custom_json: Joi.any(),
679
-
680
- ownership: CartModel.Ownership1().required(),
681
-
682
- apply_priority: Joi.number(),
683
-
684
- post_order_action: CartModel.PromotionAction(),
685
-
686
- promotion_type: Joi.string().allow("").required(),
687
-
688
- apply_all_discount: Joi.boolean(),
689
-
690
- application_id: Joi.string().allow("").required(),
691
-
692
- currency: Joi.string().allow(""),
693
-
694
- author: CartModel.PromotionAuthor(),
695
-
696
- restrictions: CartModel.Restrictions1(),
697
-
698
- discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
699
-
700
- mode: Joi.string().allow("").required(),
701
-
702
- apply_exclusive: Joi.string().allow("").allow(null),
703
-
704
- date_meta: CartModel.PromotionDateMeta(),
705
-
706
- stackable: Joi.boolean(),
707
-
708
- promo_group: Joi.string().allow("").required(),
709
-
710
- code: Joi.string().allow(""),
711
-
712
- visiblility: CartModel.Visibility(),
713
-
714
- _schedule: CartModel.PromotionSchedule(),
715
-
716
- display_meta: CartModel.DisplayMeta1().required(),
536
+ payable_by: Joi.string().allow("").required(),
537
+ payable_category: Joi.string().allow("").required(),
717
538
  });
718
539
  }
719
-
720
- static PromotionPartialUpdate() {
540
+ static Ownership2() {
721
541
  return Joi.object({
722
- archive: Joi.boolean(),
723
-
724
- schedule: CartModel.PromotionSchedule(),
542
+ payable_by: Joi.string().allow(""),
543
+ payable_category: Joi.string().allow(""),
725
544
  });
726
545
  }
727
-
728
- static CartItem() {
546
+ static Page() {
729
547
  return Joi.object({
730
- size: Joi.string().allow("").required(),
731
-
732
- product_id: Joi.string().allow("").required(),
733
-
734
- quantity: Joi.number(),
548
+ current: Joi.number(),
549
+ has_next: Joi.boolean(),
550
+ has_previous: Joi.boolean(),
551
+ item_total: Joi.number(),
552
+ next_id: Joi.string().allow(""),
553
+ size: Joi.number(),
554
+ type: Joi.string().allow("").required(),
735
555
  });
736
556
  }
737
-
738
- static OpenapiCartDetailsRequest() {
557
+ static PaymentAllowValue() {
739
558
  return Joi.object({
740
- cart_items: CartModel.CartItem(),
559
+ max: Joi.number(),
741
560
  });
742
561
  }
743
-
744
- static ProductImage() {
562
+ static PaymentAllowValue1() {
745
563
  return Joi.object({
746
- secure_url: Joi.string().allow(""),
747
-
748
- aspect_ratio: Joi.string().allow(""),
749
-
750
- url: Joi.string().allow(""),
564
+ max: Joi.number(),
751
565
  });
752
566
  }
753
-
754
- static ActionQuery() {
567
+ static PaymentModes() {
755
568
  return Joi.object({
756
- product_slug: Joi.array().items(Joi.string().allow("")),
569
+ codes: Joi.array().items(Joi.string().allow("")),
570
+ networks: Joi.array().items(Joi.string().allow("")),
571
+ types: Joi.array().items(Joi.string().allow("")),
572
+ uses: CartModel.PaymentAllowValue(),
757
573
  });
758
574
  }
759
-
760
- static ProductAction() {
575
+ static PaymentSelectionLock() {
761
576
  return Joi.object({
762
- query: CartModel.ActionQuery(),
763
-
764
- type: Joi.string().allow(""),
765
-
766
- url: Joi.string().allow(""),
577
+ default_options: Joi.string().allow(""),
578
+ enabled: Joi.boolean(),
579
+ payment_identifier: Joi.string().allow(""),
767
580
  });
768
581
  }
769
-
770
- static CategoryInfo() {
582
+ static PostOrder() {
771
583
  return Joi.object({
772
- uid: Joi.number(),
773
-
774
- name: Joi.string().allow(""),
584
+ cancellation_allowed: Joi.boolean(),
585
+ return_allowed: Joi.boolean(),
775
586
  });
776
587
  }
777
-
778
- static BaseInfo() {
588
+ static PostOrder1() {
779
589
  return Joi.object({
780
- uid: Joi.number(),
781
-
782
- name: Joi.string().allow(""),
590
+ cancellation_allowed: Joi.boolean(),
591
+ return_allowed: Joi.boolean(),
783
592
  });
784
593
  }
785
-
786
- static CartProduct() {
594
+ static PriceRange() {
787
595
  return Joi.object({
788
- images: Joi.array().items(CartModel.ProductImage()),
789
-
790
- name: Joi.string().allow(""),
791
-
792
- type: Joi.string().allow(""),
793
-
794
- uid: Joi.number(),
795
-
796
- action: CartModel.ProductAction(),
797
-
798
- categories: Joi.array().items(CartModel.CategoryInfo()),
799
-
800
- brand: CartModel.BaseInfo(),
801
-
802
- slug: Joi.string().allow(""),
596
+ max: Joi.number(),
597
+ min: Joi.number(),
803
598
  });
804
599
  }
805
-
806
- static BasePrice() {
600
+ static ProductAction() {
807
601
  return Joi.object({
808
- currency_code: Joi.string().allow(""),
809
-
810
- marked: Joi.number(),
811
-
812
- effective: Joi.number(),
813
-
814
- currency_symbol: Joi.string().allow(""),
602
+ query: CartModel.ActionQuery(),
603
+ type: Joi.string().allow(""),
604
+ url: Joi.string().allow(""),
815
605
  });
816
606
  }
817
-
818
- static ArticlePriceInfo() {
607
+ static ProductArticle() {
819
608
  return Joi.object({
820
- converted: CartModel.BasePrice(),
821
-
822
- base: CartModel.BasePrice(),
823
- });
824
- }
825
-
826
- static ProductArticle() {
827
- return Joi.object({
828
- size: Joi.string().allow(""),
829
-
830
- parent_item_identifiers: Joi.any(),
831
-
832
- product_group_tags: Joi.array().items(Joi.string().allow("")),
833
-
834
609
  _custom_json: Joi.any(),
835
-
836
- type: Joi.string().allow(""),
837
-
838
- store: CartModel.BaseInfo(),
839
-
840
610
  extra_meta: Joi.any(),
841
-
842
- uid: Joi.string().allow(""),
843
-
611
+ parent_item_identifiers: Joi.any(),
844
612
  price: CartModel.ArticlePriceInfo(),
845
-
846
- seller: CartModel.BaseInfo(),
847
-
613
+ product_group_tags: Joi.array().items(Joi.string().allow("")),
848
614
  quantity: Joi.number(),
615
+ seller: CartModel.BaseInfo(),
616
+ size: Joi.string().allow(""),
617
+ store: CartModel.BaseInfo(),
618
+ type: Joi.string().allow(""),
619
+ uid: Joi.string().allow(""),
849
620
  });
850
621
  }
851
-
852
622
  static ProductAvailability() {
853
623
  return Joi.object({
624
+ available_sizes: Joi.array().items(CartModel.ProductAvailabilitySize()),
854
625
  deliverable: Joi.boolean(),
855
-
856
- other_store_quantity: Joi.number(),
857
-
858
- sizes: Joi.array().items(Joi.string().allow("")),
859
-
860
626
  is_valid: Joi.boolean(),
861
-
627
+ other_store_quantity: Joi.number(),
862
628
  out_of_stock: Joi.boolean(),
629
+ sizes: Joi.array().items(Joi.string().allow("")),
863
630
  });
864
631
  }
865
-
866
- static PromoMeta() {
867
- return Joi.object({
868
- message: Joi.string().allow(""),
869
- });
870
- }
871
-
872
- static Ownership2() {
632
+ static ProductAvailabilitySize() {
873
633
  return Joi.object({
874
- payable_by: Joi.string().allow(""),
875
-
876
- payable_category: Joi.string().allow(""),
634
+ display: Joi.string().allow(""),
635
+ is_available: Joi.boolean(),
636
+ value: Joi.string().allow(""),
877
637
  });
878
638
  }
879
-
880
- static AppliedPromotion() {
639
+ static ProductImage() {
881
640
  return Joi.object({
882
- amount: Joi.number(),
883
-
884
- offer_text: Joi.string().allow(""),
885
-
886
- promotion_type: Joi.string().allow(""),
887
-
888
- ownership: CartModel.Ownership2(),
889
-
890
- article_quantity: Joi.number(),
891
-
892
- mrp_promotion: Joi.boolean(),
893
-
894
- promo_id: Joi.string().allow(""),
641
+ aspect_ratio: Joi.string().allow(""),
642
+ secure_url: Joi.string().allow(""),
643
+ url: Joi.string().allow(""),
895
644
  });
896
645
  }
897
-
898
646
  static ProductPrice() {
899
647
  return Joi.object({
900
- selling: Joi.number(),
901
-
902
- currency_code: Joi.string().allow(""),
903
-
904
648
  add_on: Joi.number(),
905
-
649
+ currency_code: Joi.string().allow(""),
906
650
  currency_symbol: Joi.string().allow(""),
907
-
908
- marked: Joi.number(),
909
-
910
651
  effective: Joi.number(),
652
+ marked: Joi.number(),
653
+ selling: Joi.number(),
911
654
  });
912
655
  }
913
-
914
656
  static ProductPriceInfo() {
915
657
  return Joi.object({
916
- converted: CartModel.ProductPrice(),
917
-
918
658
  base: CartModel.ProductPrice(),
659
+ converted: CartModel.ProductPrice(),
919
660
  });
920
661
  }
921
-
922
- static CartProductIdentifer() {
923
- return Joi.object({
924
- identifier: Joi.string().allow(""),
925
- });
926
- }
927
-
928
- static CartProductInfo() {
662
+ static PromiseFormatted() {
929
663
  return Joi.object({
930
- parent_item_identifiers: Joi.any(),
931
-
932
- product: CartModel.CartProduct(),
933
-
934
- article: CartModel.ProductArticle(),
935
-
936
- bulk_offer: Joi.any(),
937
-
938
- availability: CartModel.ProductAvailability(),
939
-
940
- coupon_message: Joi.string().allow(""),
941
-
942
- promo_meta: CartModel.PromoMeta(),
943
-
944
- key: Joi.string().allow(""),
945
-
946
- is_set: Joi.boolean(),
947
-
948
- discount: Joi.string().allow(""),
949
-
950
- promotions_applied: Joi.array().items(CartModel.AppliedPromotion()),
951
-
952
- price: CartModel.ProductPriceInfo(),
953
-
954
- message: Joi.string().allow(""),
955
-
956
- price_per_unit: CartModel.ProductPriceInfo(),
957
-
958
- quantity: Joi.number(),
959
-
960
- identifiers: CartModel.CartProductIdentifer().required(),
664
+ max: Joi.string().allow(""),
665
+ min: Joi.string().allow(""),
961
666
  });
962
667
  }
963
-
964
- static LoyaltyPoints() {
668
+ static PromiseTimestamp() {
965
669
  return Joi.object({
966
- total: Joi.number(),
967
-
968
- description: Joi.string().allow(""),
969
-
970
- applicable: Joi.number(),
971
-
972
- is_applied: Joi.boolean(),
670
+ max: Joi.number(),
671
+ min: Joi.number(),
973
672
  });
974
673
  }
975
-
976
- static RawBreakup() {
674
+ static PromoMeta() {
977
675
  return Joi.object({
978
- coupon: Joi.number(),
979
-
980
- total: Joi.number(),
981
-
982
- delivery_charge: Joi.number(),
983
-
984
- mrp_total: Joi.number(),
985
-
986
- convenience_fee: Joi.number(),
987
-
988
- discount: Joi.number(),
989
-
990
- you_saved: Joi.number(),
991
-
992
- vog: Joi.number(),
993
-
994
- gst_charges: Joi.number(),
995
-
996
- cod_charge: Joi.number(),
997
-
998
- fynd_cash: Joi.number(),
999
-
1000
- subtotal: Joi.number(),
676
+ message: Joi.string().allow(""),
1001
677
  });
1002
678
  }
1003
-
1004
- static DisplayBreakup() {
679
+ static PromotionAction() {
1005
680
  return Joi.object({
1006
- value: Joi.number(),
1007
-
1008
- display: Joi.string().allow(""),
1009
-
1010
- currency_code: Joi.string().allow(""),
1011
-
1012
- key: Joi.string().allow(""),
1013
-
1014
- message: Joi.array().items(Joi.string().allow("")),
1015
-
1016
- currency_symbol: Joi.string().allow(""),
681
+ action_date: Joi.string().allow("").allow(null).required(),
682
+ action_type: Joi.string().allow("").required(),
1017
683
  });
1018
684
  }
1019
-
1020
- static CouponBreakup() {
685
+ static PromotionAdd() {
1021
686
  return Joi.object({
1022
- value: Joi.number(),
1023
-
1024
- type: Joi.string().allow(""),
1025
-
687
+ _custom_json: Joi.any(),
688
+ _schedule: CartModel.PromotionSchedule(),
689
+ application_id: Joi.string().allow("").required(),
690
+ apply_all_discount: Joi.boolean(),
691
+ apply_exclusive: Joi.string().allow("").allow(null),
692
+ apply_priority: Joi.number(),
693
+ author: CartModel.PromotionAuthor(),
694
+ buy_rules: Joi.object()
695
+ .pattern(/\S/, CartModel.ItemCriteria())
696
+ .required(),
1026
697
  code: Joi.string().allow(""),
1027
-
1028
- uid: Joi.string().allow(""),
1029
-
1030
- message: Joi.string().allow(""),
1031
-
1032
- is_applied: Joi.boolean(),
1033
- });
1034
- }
1035
-
1036
- static CartBreakup() {
1037
- return Joi.object({
1038
- loyalty_points: CartModel.LoyaltyPoints(),
1039
-
1040
- raw: CartModel.RawBreakup(),
1041
-
1042
- display: Joi.array().items(CartModel.DisplayBreakup()),
1043
-
1044
- coupon: CartModel.CouponBreakup(),
698
+ currency: Joi.string().allow(""),
699
+ date_meta: CartModel.PromotionDateMeta(),
700
+ discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
701
+ display_meta: CartModel.DisplayMeta1().required(),
702
+ mode: Joi.string().allow("").required(),
703
+ ownership: CartModel.Ownership1().required(),
704
+ post_order_action: CartModel.PromotionAction(),
705
+ promo_group: Joi.string().allow("").required(),
706
+ promotion_type: Joi.string().allow("").required(),
707
+ restrictions: CartModel.Restrictions1(),
708
+ stackable: Joi.boolean(),
709
+ visiblility: CartModel.Visibility(),
1045
710
  });
1046
711
  }
1047
-
1048
- static OpenapiCartDetailsResponse() {
712
+ static PromotionAuthor() {
1049
713
  return Joi.object({
1050
- is_valid: Joi.boolean(),
1051
-
1052
- message: Joi.string().allow(""),
1053
-
1054
- items: Joi.array().items(CartModel.CartProductInfo()),
1055
-
1056
- breakup_values: CartModel.CartBreakup(),
714
+ created_by: Joi.string().allow("").allow(null),
715
+ modified_by: Joi.string().allow("").allow(null),
1057
716
  });
1058
717
  }
1059
-
1060
- static OpenApiErrorResponse() {
718
+ static PromotionDateMeta() {
1061
719
  return Joi.object({
1062
- message: Joi.string().allow(""),
1063
-
1064
- success: Joi.boolean(),
1065
-
1066
- errors: Joi.any(),
720
+ created_on: Joi.string().allow("").allow(null),
721
+ modified_on: Joi.string().allow("").allow(null),
1067
722
  });
1068
723
  }
1069
-
1070
- static ShippingAddress() {
724
+ static PromotionListItem() {
1071
725
  return Joi.object({
1072
- address_type: Joi.string().allow(""),
1073
-
1074
- phone: Joi.number(),
1075
-
1076
- name: Joi.string().allow(""),
1077
-
1078
- address: Joi.string().allow(""),
1079
-
1080
- pincode: Joi.number(),
1081
-
1082
- landmark: Joi.string().allow(""),
1083
-
1084
- area_code: Joi.string().allow("").required(),
1085
-
1086
- state: Joi.string().allow("").allow(null),
1087
-
1088
- country: Joi.string().allow("").allow(null),
1089
-
1090
- country_code: Joi.string().allow(""),
1091
-
1092
- area_code_slug: Joi.string().allow(""),
1093
-
1094
- meta: Joi.any(),
1095
-
1096
- area: Joi.string().allow(""),
1097
-
1098
- email: Joi.string().allow(""),
1099
-
1100
- city: Joi.string().allow("").allow(null),
1101
- });
1102
- }
1103
-
1104
- static OpenApiCartServiceabilityRequest() {
1105
- return Joi.object({
1106
- cart_items: CartModel.CartItem(),
1107
-
1108
- shipping_address: CartModel.ShippingAddress().required(),
1109
- });
1110
- }
1111
-
1112
- static PromiseFormatted() {
1113
- return Joi.object({
1114
- min: Joi.string().allow(""),
1115
-
1116
- max: Joi.string().allow(""),
1117
- });
1118
- }
1119
-
1120
- static PromiseTimestamp() {
1121
- return Joi.object({
1122
- min: Joi.number(),
1123
-
1124
- max: Joi.number(),
1125
- });
1126
- }
1127
-
1128
- static ShipmentPromise() {
1129
- return Joi.object({
1130
- formatted: CartModel.PromiseFormatted(),
1131
-
1132
- timestamp: CartModel.PromiseTimestamp(),
1133
- });
1134
- }
1135
-
1136
- static OpenApiCartServiceabilityResponse() {
1137
- return Joi.object({
1138
- breakup_values: CartModel.CartBreakup(),
1139
-
1140
- items: Joi.array().items(CartModel.CartProductInfo()),
1141
-
1142
- message: Joi.string().allow(""),
1143
-
1144
- delivery_promise: CartModel.ShipmentPromise(),
1145
-
1146
- is_valid: Joi.boolean(),
1147
- });
1148
- }
1149
-
1150
- static MultiTenderPaymentMeta() {
1151
- return Joi.object({
1152
- order_id: Joi.string().allow("").allow(null),
1153
-
1154
- payment_id: Joi.string().allow("").allow(null),
1155
-
1156
- extra_meta: Joi.any().allow(null),
1157
-
1158
- payment_gateway: Joi.string().allow("").allow(null),
1159
-
1160
- current_status: Joi.string().allow("").allow(null),
1161
- });
1162
- }
1163
-
1164
- static MultiTenderPaymentMethod() {
1165
- return Joi.object({
1166
- amount: Joi.number().required(),
1167
-
726
+ _custom_json: Joi.any(),
727
+ _schedule: CartModel.PromotionSchedule(),
728
+ application_id: Joi.string().allow("").required(),
729
+ apply_all_discount: Joi.boolean(),
730
+ apply_exclusive: Joi.string().allow("").allow(null),
731
+ apply_priority: Joi.number(),
732
+ author: CartModel.PromotionAuthor(),
733
+ buy_rules: Joi.object()
734
+ .pattern(/\S/, CartModel.ItemCriteria())
735
+ .required(),
736
+ code: Joi.string().allow(""),
737
+ currency: Joi.string().allow(""),
738
+ date_meta: CartModel.PromotionDateMeta(),
739
+ discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
740
+ display_meta: CartModel.DisplayMeta1().required(),
1168
741
  mode: Joi.string().allow("").required(),
1169
-
1170
- name: Joi.string().allow(""),
1171
-
1172
- meta: CartModel.MultiTenderPaymentMeta(),
1173
- });
1174
- }
1175
-
1176
- static OpenApiFiles() {
1177
- return Joi.object({
1178
- key: Joi.string().allow("").required(),
1179
-
1180
- values: Joi.array().items(Joi.string().allow("")).required(),
742
+ ownership: CartModel.Ownership1().required(),
743
+ post_order_action: CartModel.PromotionAction(),
744
+ promo_group: Joi.string().allow("").required(),
745
+ promotion_type: Joi.string().allow("").required(),
746
+ restrictions: CartModel.Restrictions1(),
747
+ stackable: Joi.boolean(),
748
+ visiblility: CartModel.Visibility(),
1181
749
  });
1182
750
  }
1183
-
1184
- static CartItemMeta() {
751
+ static PromotionPartialUpdate() {
1185
752
  return Joi.object({
1186
- primary_item: Joi.boolean(),
1187
-
1188
- group_id: Joi.string().allow(""),
753
+ archive: Joi.boolean(),
754
+ schedule: CartModel.PromotionSchedule(),
1189
755
  });
1190
756
  }
1191
-
1192
- static OpenApiOrderItem() {
757
+ static PromotionPaymentModes() {
1193
758
  return Joi.object({
1194
- amount_paid: Joi.number().required(),
1195
-
1196
- extra_meta: Joi.any(),
1197
-
1198
- loyalty_discount: Joi.number(),
1199
-
1200
- payment_methods: Joi.array()
1201
- .items(CartModel.MultiTenderPaymentMethod())
1202
- .required(),
1203
-
1204
- product_id: Joi.number().required(),
1205
-
1206
- delivery_charges: Joi.number().required(),
1207
-
1208
- discount: Joi.number().required(),
1209
-
1210
- price_marked: Joi.number().required(),
1211
-
1212
- employee_discount: Joi.number(),
1213
-
1214
- files: Joi.array().items(CartModel.OpenApiFiles()),
1215
-
1216
- cashback_applied: Joi.number().required(),
1217
-
1218
- cod_charges: Joi.number().required(),
1219
-
1220
- meta: CartModel.CartItemMeta(),
1221
-
1222
- price_effective: Joi.number().required(),
1223
-
1224
- coupon_effective_discount: Joi.number().required(),
1225
-
1226
- quantity: Joi.number(),
1227
-
1228
- size: Joi.string().allow("").required(),
759
+ codes: Joi.array().items(Joi.string().allow("")),
760
+ type: Joi.string().allow("").required(),
761
+ uses: CartModel.PaymentAllowValue1(),
1229
762
  });
1230
763
  }
1231
-
1232
- static OpenApiPlatformCheckoutReq() {
764
+ static PromotionSchedule() {
1233
765
  return Joi.object({
1234
- order_id: Joi.string().allow(""),
1235
-
1236
- currency_code: Joi.string().allow(""),
1237
-
1238
- cart_items: Joi.array().items(CartModel.OpenApiOrderItem()).required(),
1239
-
1240
- delivery_charges: Joi.number().required(),
1241
-
1242
- files: Joi.array().items(CartModel.OpenApiFiles()),
1243
-
1244
- comment: Joi.string().allow("").allow(null),
1245
-
1246
- coupon: Joi.string().allow(""),
1247
-
1248
- coupon_value: Joi.number().required(),
1249
-
1250
- affiliate_order_id: Joi.string().allow(""),
1251
-
1252
- payment_mode: Joi.string().allow(""),
1253
-
1254
- cart_value: Joi.number().required(),
1255
-
1256
- payment_methods: Joi.array()
1257
- .items(CartModel.MultiTenderPaymentMethod())
1258
- .required(),
1259
-
1260
- loyalty_discount: Joi.number(),
1261
-
1262
- billing_address: CartModel.ShippingAddress().required(),
1263
-
1264
- employee_discount: Joi.any(),
1265
-
1266
- cashback_applied: Joi.number().required(),
1267
-
1268
- cod_charges: Joi.number().required(),
1269
-
1270
- coupon_code: Joi.string().allow("").required(),
1271
-
1272
- shipping_address: CartModel.ShippingAddress(),
1273
-
1274
- gstin: Joi.string().allow("").allow(null),
766
+ cron: Joi.string().allow("").allow(null),
767
+ duration: Joi.number().allow(null),
768
+ end: Joi.string().allow("").allow(null),
769
+ next_schedule: Joi.array().items(Joi.any()),
770
+ published: Joi.boolean().required(),
771
+ start: Joi.string().allow("").required(),
1275
772
  });
1276
773
  }
1277
-
1278
- static OpenApiCheckoutResponse() {
774
+ static PromotionsResponse() {
1279
775
  return Joi.object({
1280
- order_ref_id: Joi.string().allow(""),
1281
-
1282
- message: Joi.string().allow(""),
1283
-
1284
- success: Joi.boolean(),
1285
-
1286
- order_id: Joi.string().allow("").required(),
776
+ items: CartModel.PromotionListItem(),
777
+ page: CartModel.Page(),
1287
778
  });
1288
779
  }
1289
-
1290
- static AbandonedCart() {
780
+ static PromotionUpdate() {
1291
781
  return Joi.object({
1292
- buy_now: Joi.boolean(),
1293
-
1294
- uid: Joi.number().required(),
1295
-
1296
- created_on: Joi.string().allow("").required(),
1297
-
1298
- articles: Joi.array().items(Joi.any()).required(),
1299
-
1300
- coupon: Joi.any().allow(null),
1301
-
1302
- promotion: Joi.any(),
1303
-
1304
- payment_methods: Joi.array().items(Joi.any()),
1305
-
1306
- fynd_credits: Joi.any(),
1307
-
1308
- app_id: Joi.string().allow(""),
1309
-
1310
- checkout_mode: Joi.string().allow(""),
1311
-
1312
- order_id: Joi.string().allow(""),
1313
-
1314
- payments: Joi.any().allow(null),
1315
-
1316
- merge_qty: Joi.boolean().allow(null),
1317
-
1318
- delivery_charges: Joi.any(),
1319
-
1320
- bulk_coupon_discount: Joi.number().allow(null),
1321
-
1322
- is_archive: Joi.boolean(),
1323
-
1324
- comment: Joi.string().allow("").allow(null),
1325
-
1326
- pick_up_customer_details: Joi.any().allow(null),
1327
-
1328
- _id: Joi.string().allow("").required(),
1329
-
1330
- is_active: Joi.boolean(),
1331
-
1332
- payment_mode: Joi.string().allow("").allow(null),
1333
-
1334
- last_modified: Joi.string().allow("").required(),
1335
-
1336
- cart_value: Joi.number(),
1337
-
1338
- is_default: Joi.boolean().required(),
1339
-
1340
- discount: Joi.number(),
1341
-
1342
- user_id: Joi.string().allow("").required(),
1343
-
1344
- cashback: Joi.any().required(),
1345
-
1346
- fc_index_map: Joi.array().items(Joi.number()),
1347
-
1348
- shipments: Joi.array().items(Joi.any()),
1349
-
1350
- cod_charges: Joi.any(),
1351
-
1352
- expire_at: Joi.string().allow("").required(),
1353
-
1354
- meta: Joi.any().allow(null),
1355
-
1356
- gstin: Joi.string().allow("").allow(null),
782
+ _custom_json: Joi.any(),
783
+ _schedule: CartModel.PromotionSchedule(),
784
+ application_id: Joi.string().allow("").required(),
785
+ apply_all_discount: Joi.boolean(),
786
+ apply_exclusive: Joi.string().allow("").allow(null),
787
+ apply_priority: Joi.number(),
788
+ author: CartModel.PromotionAuthor(),
789
+ buy_rules: Joi.object()
790
+ .pattern(/\S/, CartModel.ItemCriteria())
791
+ .required(),
792
+ code: Joi.string().allow(""),
793
+ currency: Joi.string().allow(""),
794
+ date_meta: CartModel.PromotionDateMeta(),
795
+ discount_rules: Joi.array().items(CartModel.DiscountRule()).required(),
796
+ display_meta: CartModel.DisplayMeta1().required(),
797
+ mode: Joi.string().allow("").required(),
798
+ ownership: CartModel.Ownership1().required(),
799
+ post_order_action: CartModel.PromotionAction(),
800
+ promo_group: Joi.string().allow("").required(),
801
+ promotion_type: Joi.string().allow("").required(),
802
+ restrictions: CartModel.Restrictions1(),
803
+ stackable: Joi.boolean(),
804
+ visiblility: CartModel.Visibility(),
1357
805
  });
1358
806
  }
1359
-
1360
- static AbandonedCartResponse() {
807
+ static RawBreakup() {
1361
808
  return Joi.object({
1362
- page: CartModel.Page(),
1363
-
1364
- items: Joi.array().items(CartModel.AbandonedCart()),
1365
-
1366
- message: Joi.string().allow(""),
1367
-
1368
- success: Joi.boolean(),
1369
-
1370
- result: Joi.any(),
809
+ cod_charge: Joi.number(),
810
+ convenience_fee: Joi.number(),
811
+ coupon: Joi.number(),
812
+ delivery_charge: Joi.number(),
813
+ discount: Joi.number(),
814
+ fynd_cash: Joi.number(),
815
+ gst_charges: Joi.number(),
816
+ mrp_total: Joi.number(),
817
+ subtotal: Joi.number(),
818
+ total: Joi.number(),
819
+ vog: Joi.number(),
820
+ you_saved: Joi.number(),
1371
821
  });
1372
822
  }
1373
-
1374
- static CartCurrency() {
823
+ static Restrictions() {
1375
824
  return Joi.object({
1376
- code: Joi.string().allow(""),
1377
-
1378
- symbol: Joi.string().allow(""),
825
+ bulk_bundle: CartModel.BulkBundleRestriction(),
826
+ coupon_allowed: Joi.boolean(),
827
+ ordering_stores: Joi.array().items(Joi.number()),
828
+ payments: Joi.object().pattern(/\S/, CartModel.PaymentModes()),
829
+ platforms: Joi.array().items(Joi.string().allow("")),
830
+ post_order: CartModel.PostOrder(),
831
+ price_range: CartModel.PriceRange(),
832
+ user_groups: Joi.array().items(Joi.number()),
833
+ uses: CartModel.UsesRestriction(),
1379
834
  });
1380
835
  }
1381
-
1382
- static PaymentSelectionLock() {
836
+ static Restrictions1() {
1383
837
  return Joi.object({
1384
- default_options: Joi.string().allow(""),
1385
-
1386
- payment_identifier: Joi.string().allow(""),
1387
-
1388
- enabled: Joi.boolean(),
838
+ anonymous_users: Joi.boolean(),
839
+ order_quantity: Joi.number(),
840
+ payments: Joi.array().items(CartModel.PromotionPaymentModes()),
841
+ platforms: Joi.array().items(Joi.string().allow("")),
842
+ post_order: CartModel.PostOrder1(),
843
+ user_groups: Joi.array().items(Joi.number()),
844
+ user_id: Joi.array().items(Joi.string().allow("")),
845
+ user_registered: CartModel.UserRegistered(),
846
+ uses: CartModel.UsesRestriction1().required(),
1389
847
  });
1390
848
  }
1391
-
1392
- static CartDetailResponse() {
849
+ static Rule() {
1393
850
  return Joi.object({
1394
- coupon_text: Joi.string().allow(""),
1395
-
1396
- checkout_mode: Joi.string().allow(""),
1397
-
1398
- last_modified: Joi.string().allow(""),
1399
-
1400
- breakup_values: CartModel.CartBreakup(),
1401
-
1402
- buy_now: Joi.boolean(),
1403
-
1404
- items: Joi.array().items(CartModel.CartProductInfo()),
1405
-
1406
- message: Joi.string().allow(""),
1407
-
1408
- delivery_charge_info: Joi.string().allow(""),
1409
-
1410
- restrict_checkout: Joi.boolean(),
1411
-
1412
- comment: Joi.string().allow(""),
1413
-
1414
- delivery_promise: CartModel.ShipmentPromise(),
1415
-
1416
- currency: CartModel.CartCurrency(),
1417
-
1418
- is_valid: Joi.boolean(),
1419
-
1420
- payment_selection_lock: CartModel.PaymentSelectionLock(),
1421
-
1422
- gstin: Joi.string().allow(""),
1423
-
1424
- id: Joi.string().allow(""),
851
+ discount_qty: Joi.number(),
852
+ key: Joi.number(),
853
+ max: Joi.number(),
854
+ min: Joi.number(),
855
+ value: Joi.number(),
1425
856
  });
1426
857
  }
1427
-
1428
- static AddProductCart() {
858
+ static RuleDefinition() {
1429
859
  return Joi.object({
1430
- parent_item_identifiers: Joi.any(),
1431
-
1432
- product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
1433
-
1434
- _custom_json: Joi.any(),
1435
-
1436
- display: Joi.string().allow(""),
1437
-
1438
- extra_meta: Joi.any(),
1439
-
1440
- item_id: Joi.number(),
1441
-
1442
- article_assignment: Joi.any(),
1443
-
1444
- store_id: Joi.number(),
1445
-
1446
- seller_id: Joi.number(),
1447
-
1448
- article_id: Joi.string().allow(""),
1449
-
1450
- pos: Joi.boolean(),
1451
-
1452
- quantity: Joi.number(),
1453
-
1454
- item_size: Joi.string().allow(""),
860
+ applicable_on: Joi.string().allow("").required(),
861
+ auto_apply: Joi.boolean(),
862
+ calculate_on: Joi.string().allow("").required(),
863
+ currency_code: Joi.string().allow(""),
864
+ is_exact: Joi.boolean(),
865
+ scope: Joi.array().items(Joi.string().allow("")),
866
+ type: Joi.string().allow("").required(),
867
+ value_type: Joi.string().allow("").required(),
1455
868
  });
1456
869
  }
1457
-
1458
- static AddCartRequest() {
870
+ static ShipmentPromise() {
1459
871
  return Joi.object({
1460
- items: Joi.array().items(CartModel.AddProductCart()),
872
+ formatted: CartModel.PromiseFormatted(),
873
+ timestamp: CartModel.PromiseTimestamp(),
1461
874
  });
1462
875
  }
1463
-
1464
- static AddCartDetailResponse() {
876
+ static ShippingAddress() {
877
+ return Joi.object({
878
+ address: Joi.string().allow(""),
879
+ address_type: Joi.string().allow(""),
880
+ area: Joi.string().allow(""),
881
+ area_code: Joi.string().allow("").required(),
882
+ area_code_slug: Joi.string().allow(""),
883
+ city: Joi.string().allow("").allow(null),
884
+ country: Joi.string().allow("").allow(null),
885
+ country_code: Joi.string().allow(""),
886
+ country_iso_code: Joi.string().allow(""),
887
+ country_phone_code: Joi.string().allow(""),
888
+ email: Joi.string().allow(""),
889
+ landmark: Joi.string().allow(""),
890
+ meta: Joi.any(),
891
+ name: Joi.string().allow(""),
892
+ phone: Joi.number(),
893
+ pincode: Joi.number(),
894
+ state: Joi.string().allow("").allow(null),
895
+ });
896
+ }
897
+ static State() {
898
+ return Joi.object({
899
+ is_archived: Joi.boolean(),
900
+ is_display: Joi.boolean(),
901
+ is_public: Joi.boolean(),
902
+ });
903
+ }
904
+ static SuccessMessage() {
1465
905
  return Joi.object({
1466
906
  message: Joi.string().allow(""),
1467
-
907
+ success: Joi.boolean(),
908
+ });
909
+ }
910
+ static UpdateCartDetailResponse() {
911
+ return Joi.object({
1468
912
  cart: CartModel.CartDetailResponse(),
1469
-
913
+ message: Joi.string().allow(""),
1470
914
  success: Joi.boolean(),
1471
-
1472
- partial: Joi.boolean(),
1473
915
  });
1474
916
  }
1475
-
917
+ static UpdateCartRequest() {
918
+ return Joi.object({
919
+ items: Joi.array().items(CartModel.UpdateProductCart()),
920
+ operation: Joi.string().allow("").required(),
921
+ });
922
+ }
1476
923
  static UpdateProductCart() {
1477
924
  return Joi.object({
1478
- parent_item_identifiers: Joi.any(),
1479
-
1480
925
  _custom_json: Joi.any(),
1481
-
926
+ article_id: Joi.string().allow(""),
1482
927
  extra_meta: Joi.any(),
1483
-
928
+ identifiers: CartModel.CartProductIdentifer().required(),
1484
929
  item_id: Joi.number(),
1485
-
1486
930
  item_index: Joi.number(),
1487
-
1488
- article_id: Joi.string().allow(""),
1489
-
1490
- quantity: Joi.number(),
1491
-
1492
931
  item_size: Joi.string().allow(""),
1493
-
1494
- identifiers: CartModel.CartProductIdentifer().required(),
932
+ parent_item_identifiers: Joi.any(),
933
+ quantity: Joi.number(),
1495
934
  });
1496
935
  }
1497
-
1498
- static UpdateCartRequest() {
936
+ static UserRegistered() {
1499
937
  return Joi.object({
1500
- operation: Joi.string().allow("").required(),
1501
-
1502
- items: Joi.array().items(CartModel.UpdateProductCart()),
938
+ end: Joi.string().allow("").allow(null),
939
+ start: Joi.string().allow("").allow(null),
1503
940
  });
1504
941
  }
1505
-
1506
- static UpdateCartDetailResponse() {
942
+ static UsesRemaining() {
1507
943
  return Joi.object({
1508
- message: Joi.string().allow(""),
1509
-
1510
- cart: CartModel.CartDetailResponse(),
1511
-
1512
- success: Joi.boolean(),
944
+ app: Joi.number(),
945
+ total: Joi.number(),
946
+ user: Joi.number(),
947
+ });
948
+ }
949
+ static UsesRemaining1() {
950
+ return Joi.object({
951
+ total: Joi.number(),
952
+ user: Joi.number(),
953
+ });
954
+ }
955
+ static UsesRestriction() {
956
+ return Joi.object({
957
+ maximum: CartModel.UsesRemaining(),
958
+ remaining: CartModel.UsesRemaining(),
959
+ });
960
+ }
961
+ static UsesRestriction1() {
962
+ return Joi.object({
963
+ maximum: CartModel.UsesRemaining1(),
964
+ remaining: CartModel.UsesRemaining1(),
965
+ });
966
+ }
967
+ static Validation() {
968
+ return Joi.object({
969
+ anonymous: Joi.boolean(),
970
+ app_id: Joi.array().items(Joi.string().allow("")),
971
+ user_registered_after: Joi.string().allow("").allow(null),
972
+ });
973
+ }
974
+ static Validity() {
975
+ return Joi.object({
976
+ priority: Joi.number(),
977
+ });
978
+ }
979
+ static Visibility() {
980
+ return Joi.object({
981
+ coupon_list: Joi.boolean().required(),
982
+ pdp: Joi.boolean().required(),
1513
983
  });
1514
984
  }
1515
985
  }