@gofynd/fdk-client-javascript 1.4.16-beta.3 → 1.4.16-beta.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 (242) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +48 -68
  6. package/sdk/application/Cart/CartApplicationClient.js +27 -117
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +58 -59
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +29 -30
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
  10. package/sdk/application/Common/CommonApplicationClient.js +1 -1
  11. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
  12. package/sdk/application/Configuration/ConfigurationApplicationClient.js +10 -10
  13. package/sdk/application/Content/ContentApplicationClient.d.ts +30 -51
  14. package/sdk/application/Content/ContentApplicationClient.js +56 -161
  15. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -9
  16. package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -7
  17. package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
  18. package/sdk/application/Lead/LeadApplicationClient.js +1 -1
  19. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +15 -35
  20. package/sdk/application/Logistic/LogisticApplicationClient.js +8 -101
  21. package/sdk/application/Order/OrderApplicationClient.d.ts +12 -22
  22. package/sdk/application/Order/OrderApplicationClient.js +8 -56
  23. package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
  24. package/sdk/application/Payment/PaymentApplicationClient.js +46 -46
  25. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  26. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
  27. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  28. package/sdk/application/Theme/ThemeApplicationClient.js +2 -4
  29. package/sdk/application/User/UserApplicationClient.d.ts +10 -10
  30. package/sdk/application/User/UserApplicationClient.js +6 -6
  31. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  32. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
  33. package/sdk/common/Utility.js +6 -3
  34. package/sdk/common/utils.d.ts +0 -1
  35. package/sdk/common/utils.js +0 -14
  36. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
  37. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
  38. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +21 -116
  39. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +16 -121
  40. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
  41. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
  42. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  43. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  44. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  45. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  46. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
  47. package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
  48. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +167 -1200
  49. package/sdk/partner/Logistics/LogisticsPartnerModel.js +160 -571
  50. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
  51. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -121
  52. package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
  53. package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
  54. package/sdk/partner/Theme/ThemePartnerModel.d.ts +37 -96
  55. package/sdk/partner/Theme/ThemePartnerModel.js +36 -90
  56. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  57. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
  58. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
  59. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
  60. package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
  61. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
  62. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
  63. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
  64. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
  65. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
  66. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
  67. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  68. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  69. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
  70. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
  71. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  72. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  73. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  74. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  75. package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
  76. package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
  77. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
  78. package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
  79. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
  80. package/sdk/platform/Cart/CartPlatformApplicationClient.js +115 -419
  81. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -121
  82. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -109
  83. package/sdk/platform/Cart/CartPlatformModel.d.ts +1294 -5068
  84. package/sdk/platform/Cart/CartPlatformModel.js +1217 -1992
  85. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -209
  86. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +400 -457
  87. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +142 -185
  88. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +78 -96
  89. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +117 -154
  90. package/sdk/platform/Catalog/CatalogPlatformClient.js +172 -292
  91. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1647 -6389
  92. package/sdk/platform/Catalog/CatalogPlatformModel.js +1681 -3222
  93. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -72
  94. package/sdk/platform/Catalog/CatalogPlatformValidator.js +24 -50
  95. package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
  96. package/sdk/platform/Common/CommonPlatformClient.js +2 -3
  97. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  98. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  99. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
  100. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
  101. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  102. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  103. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
  104. package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
  105. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
  106. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
  107. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  108. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
  109. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  110. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  111. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
  112. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
  113. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  114. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  115. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
  116. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
  117. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +131 -283
  118. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +97 -219
  119. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
  120. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
  121. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -204
  122. package/sdk/platform/Content/ContentPlatformApplicationClient.js +475 -1073
  123. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -253
  124. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -256
  125. package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
  126. package/sdk/platform/Content/ContentPlatformClient.js +336 -523
  127. package/sdk/platform/Content/ContentPlatformModel.d.ts +403 -1375
  128. package/sdk/platform/Content/ContentPlatformModel.js +394 -631
  129. package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
  130. package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
  131. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
  132. package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
  133. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  134. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  135. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  136. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  137. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +39 -95
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +63 -462
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
  141. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +22 -20
  142. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +24 -21
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -370
  144. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +104 -313
  145. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  146. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  147. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  148. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  149. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
  150. package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
  151. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  152. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  153. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  154. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  155. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  156. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  157. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -17
  158. package/sdk/platform/Order/OrderPlatformApplicationClient.js +7 -85
  159. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +24 -95
  160. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +19 -39
  161. package/sdk/platform/Order/OrderPlatformClient.d.ts +96 -153
  162. package/sdk/platform/Order/OrderPlatformClient.js +198 -416
  163. package/sdk/platform/Order/OrderPlatformModel.d.ts +1286 -7619
  164. package/sdk/platform/Order/OrderPlatformModel.js +1265 -3922
  165. package/sdk/platform/Order/OrderPlatformValidator.d.ts +109 -270
  166. package/sdk/platform/Order/OrderPlatformValidator.js +77 -135
  167. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  168. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  169. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  170. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  171. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +105 -93
  172. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +141 -129
  173. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  174. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  175. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  176. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  177. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +319 -333
  178. package/sdk/platform/Payment/PaymentPlatformModel.js +278 -288
  179. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  180. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  181. package/sdk/platform/PlatformClient.d.ts +2 -0
  182. package/sdk/platform/PlatformClient.js +4 -0
  183. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  184. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  185. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  186. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  187. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  188. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +36 -46
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +41 -132
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -46
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +14 -34
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +68 -62
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +612 -1845
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +554 -886
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +49 -45
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -28
  199. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +5 -5
  200. package/sdk/platform/Share/SharePlatformApplicationClient.js +9 -9
  201. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -3
  202. package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
  203. package/sdk/platform/Share/SharePlatformModel.d.ts +7 -46
  204. package/sdk/platform/Share/SharePlatformModel.js +6 -31
  205. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  206. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
  207. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
  208. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
  209. package/sdk/platform/Theme/ThemePlatformModel.d.ts +11 -37
  210. package/sdk/platform/Theme/ThemePlatformModel.js +15 -33
  211. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  212. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  213. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  214. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  215. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  216. package/sdk/platform/User/UserPlatformModel.js +23 -23
  217. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  218. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  219. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
  220. package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
  221. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  222. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  223. package/sdk/platform/index.d.ts +1 -0
  224. package/sdk/platform/index.js +2 -0
  225. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
  226. package/sdk/public/Configuration/ConfigurationPublicClient.js +5 -6
  227. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  228. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  229. package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
  230. package/sdk/public/Content/ContentPublicClient.js +6 -810
  231. package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
  232. package/sdk/public/Content/ContentPublicModel.js +3 -649
  233. package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
  234. package/sdk/public/Content/ContentPublicValidator.js +2 -88
  235. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  236. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  237. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  238. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  239. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  240. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  241. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
  242. package/sdk/application/Finance/FinanceApplicationClient.js +0 -111
@@ -2,74 +2,65 @@ const Joi = require("joi");
2
2
 
3
3
  /**
4
4
  * @typedef CouponDateMeta
5
- * @property {string} [modified_on] - Date time format when the coupon last modified
6
- * @property {string} [created_on] - Date time format when the coupon created
7
- * @property {string} [approved_on] - Date time format when the coupon approved
8
- * @property {string} [rejected_on] - Date time format when the coupon rejected
9
- * @property {string} [reviewed_on] - Date time format when the coupon reviewed
5
+ * @property {string} [modified_on]
6
+ * @property {string} [created_on]
10
7
  */
11
8
 
12
9
  /**
13
10
  * @typedef Ownership
14
- * @property {string} payable_category - Coupon amount payable category
15
- * @property {string} [payable_by] - Coupon amount bearable party
11
+ * @property {string} payable_category
12
+ * @property {string} payable_by
16
13
  */
17
14
 
18
15
  /**
19
16
  * @typedef CouponAuthor
20
- * @property {string} [created_by] - The user id of user, who has created the coupon
21
- * @property {string} [modified_by] - The user id of user, who has modified the coupon
22
- * @property {string} [approved_by] - The user id of user, who has approved the coupon
23
- * @property {string} [rejected_by] - The user id of user, who has rejected the coupon
24
- * @property {string} [reviewed_by] - The user id of user, who has reviewed the coupon
17
+ * @property {string} [created_by]
18
+ * @property {string} [modified_by]
25
19
  */
26
20
 
27
21
  /**
28
22
  * @typedef State
29
- * @property {boolean} [is_archived] - Publish or unpublish the coupon
30
- * @property {boolean} [is_display] - Coupon needs to display or not
31
- * @property {boolean} [is_public] - Coupon is publicaly available or not
23
+ * @property {boolean} [is_archived]
24
+ * @property {boolean} [is_display]
25
+ * @property {boolean} [is_public]
32
26
  */
33
27
 
34
28
  /**
35
29
  * @typedef PaymentAllowValue
36
- * @property {number} [max] - Maximum value need to allow for payment
30
+ * @property {number} [max]
37
31
  */
38
32
 
39
33
  /**
40
34
  * @typedef PaymentModes
41
- * @property {string[]} [codes] - Identifier used by payment gateway for a given
42
- * payment mode, e.g. NB_ICIC, PAYTM
43
- * @property {string[]} [iins] - Debit/Credit card prefix (first 6 digit)
44
- * @property {string[]} [types] - Card type, e.g. Credit, Debit
45
- * @property {string[]} [networks] - Credit/Debit card issuer, e.g. VISA,
46
- * MASTERCARD, RUPAY
35
+ * @property {string[]} [codes]
36
+ * @property {string[]} [iins]
37
+ * @property {string[]} [types]
38
+ * @property {string[]} [networks]
47
39
  * @property {PaymentAllowValue} [uses]
48
40
  */
49
41
 
50
42
  /**
51
43
  * @typedef PriceRange
52
- * @property {number} [max] - Max price valid for article in coupon
53
- * @property {number} [min] - Min price valid for article in coupon
44
+ * @property {number} [max]
45
+ * @property {number} [min]
54
46
  */
55
47
 
56
48
  /**
57
49
  * @typedef PostOrder
58
- * @property {boolean} [cancellation_allowed] - Cancellation allowed in coupon
59
- * @property {boolean} [return_allowed] - Return allowed in coupon
50
+ * @property {boolean} [cancellation_allowed]
51
+ * @property {boolean} [return_allowed]
60
52
  */
61
53
 
62
54
  /**
63
55
  * @typedef BulkBundleRestriction
64
- * @property {boolean} multi_store_allowed - Multi store allowed in bulk bundle
65
- * coupon or not
56
+ * @property {boolean} multi_store_allowed
66
57
  */
67
58
 
68
59
  /**
69
60
  * @typedef UsesRemaining
70
- * @property {number} [user] - Define total coupon count per user
71
- * @property {number} [total] - Define total coupon counts
72
- * @property {number} [app] - Define coupon counts associated with application id
61
+ * @property {number} [user]
62
+ * @property {number} [total]
63
+ * @property {number} [app]
73
64
  */
74
65
 
75
66
  /**
@@ -80,131 +71,115 @@ const Joi = require("joi");
80
71
 
81
72
  /**
82
73
  * @typedef Restrictions
83
- * @property {PaymentModes} [payments]
74
+ * @property {Object} [payments]
84
75
  * @property {string} [user_type]
85
76
  * @property {PriceRange} [price_range]
86
- * @property {string[]} [platforms] - List of platform on which coupon allowed
87
- * like web, android
77
+ * @property {string[]} [platforms]
88
78
  * @property {PostOrder} [post_order]
89
79
  * @property {BulkBundleRestriction} [bulk_bundle]
90
- * @property {number[]} [user_groups] - List of user group on which coupon allowed
91
- * @property {boolean} [coupon_allowed] - Allow applying normal coupon if bulk
92
- * coupon is applied
80
+ * @property {number[]} [user_groups]
81
+ * @property {boolean} [coupon_allowed]
93
82
  * @property {UsesRestriction} [uses]
94
- * @property {number[]} [ordering_stores] - List of store id on which coupon allowed
83
+ * @property {number[]} [ordering_stores]
95
84
  */
96
85
 
97
86
  /**
98
87
  * @typedef Validation
99
- * @property {string[]} [app_id] - List of sales channel's application id
100
- * @property {boolean} [anonymous] - Coupon applicable for guest user or not
101
- * @property {string} [user_registered_after] - Coupon applicable for user which
102
- * is registered after Date Format
88
+ * @property {string[]} [app_id]
89
+ * @property {boolean} [anonymous]
90
+ * @property {string} [user_registered_after]
103
91
  */
104
92
 
105
93
  /**
106
94
  * @typedef CouponAction
107
- * @property {string} [action_date] - Coupon transaction mode's date time format
108
- * @property {string} [txn_mode] - Coupon transaction mode like cash, coupon etc
95
+ * @property {string} [action_date]
96
+ * @property {string} [txn_mode]
109
97
  */
110
98
 
111
99
  /**
112
100
  * @typedef CouponSchedule
113
- * @property {string} [end] - The end date of coupon
114
- * @property {string} [start] - The start date of coupon
115
- * @property {Object[]} [next_schedule] - List of date time, which we will
116
- * schedule the promotion
117
- * @property {string} [cron] - Schedule the cron to run your job periodically
118
- * @property {string} [status] - Coupon status like draft, review
119
- * @property {number} [duration] - Time in minutes for execution
101
+ * @property {string} [end]
102
+ * @property {string} [start]
103
+ * @property {Object[]} [next_schedule]
104
+ * @property {string} [cron]
105
+ * @property {number} [duration]
120
106
  */
121
107
 
122
108
  /**
123
109
  * @typedef Rule
124
- * @property {number} [key] - Key defines the number of product should be buy
125
- * for applicability of cart
126
- * @property {number} [value] - Value defines discount percentage in coupon
127
- * @property {number} [max] - Max defines maximum number of discount amount in coupon
128
- * @property {number} [discount_qty] - Discount_qty defines free quantity as
129
- * discount in coupon
130
- * @property {number} [min] - Min defines minimum number of discount amount in coupon
110
+ * @property {number} [key]
111
+ * @property {number} [value]
112
+ * @property {number} [max]
113
+ * @property {number} [discount_qty]
114
+ * @property {number} [min]
131
115
  */
132
116
 
133
117
  /**
134
118
  * @typedef DisplayMetaDict
135
- * @property {string} [title] - Coupon title which is used to display
136
- * @property {string} [subtitle] - Coupon sub title which is used to display
119
+ * @property {string} [title]
120
+ * @property {string} [subtitle]
137
121
  */
138
122
 
139
123
  /**
140
124
  * @typedef DisplayMeta
141
- * @property {string} [title] - Coupon title which is used to display
125
+ * @property {string} [title]
142
126
  * @property {DisplayMetaDict} [auto]
143
127
  * @property {DisplayMetaDict} [apply]
144
128
  * @property {DisplayMetaDict} [remove]
145
- * @property {string} [subtitle] - Coupon sub title which is used to display
146
- * @property {string} [description] - Detail about the offers in coupon
129
+ * @property {string} [subtitle]
130
+ * @property {string} [description]
147
131
  */
148
132
 
149
133
  /**
150
134
  * @typedef Identifier
151
- * @property {number[]} [brand_id] - List of brand id available for coupon
152
- * @property {string[]} [email_domain] - List of email domain available for coupon
153
- * @property {number[]} [company_id] - List of company id available for coupon
154
- * @property {number[]} [store_id] - List of store id available for coupon
155
- * @property {string[]} [collection_id] - List of collection id available for coupon
156
- * @property {number[]} [item_id] - List of item id available for coupon
157
- * @property {string[]} [user_id] - List of user id available for coupon
158
- * @property {number[]} [category_id] - List of category id available for coupon
159
- * @property {string[]} [article_id] - List of article id available for coupon
160
- * @property {number[]} [exclude_brand_id] - List of brand id should not be
161
- * available for coupon
135
+ * @property {number[]} [brand_id]
136
+ * @property {string[]} [email_domain]
137
+ * @property {number[]} [company_id]
138
+ * @property {number[]} [store_id]
139
+ * @property {string[]} [collection_id]
140
+ * @property {number[]} [item_id]
141
+ * @property {string[]} [user_id]
142
+ * @property {number[]} [category_id]
143
+ * @property {string[]} [article_id]
144
+ * @property {number[]} [exclude_brand_id]
162
145
  */
163
146
 
164
147
  /**
165
148
  * @typedef Validity
166
- * @property {number} [priority] - Priority of coupon to show in list
149
+ * @property {number} [priority]
167
150
  */
168
151
 
169
152
  /**
170
153
  * @typedef RuleDefinition
171
- * @property {string} [currency_code] - Currency code like INR
172
- * @property {boolean} [auto_apply] - Coupon should be auto apply or not
173
- * @property {string} [type] - Type of coupon like absolute, percentage etc.
174
- * @property {boolean} [is_exact] - Flag is true then use coupon applicable
175
- * articles for calculation
176
- * @property {string} [applicable_on] - Coupon will be applicable on either
177
- * amount or quantity
178
- * @property {string} [calculate_on] - Article Price on which coupon calculated
179
- * like effective price or marked price
180
- * @property {string} [value_type] - Define the type of coupon value
181
- * @property {string[]} [scope] - List of item level rule applicable for coupon
154
+ * @property {string} [currency_code]
155
+ * @property {boolean} [auto_apply]
156
+ * @property {string} type
157
+ * @property {boolean} [is_exact]
158
+ * @property {string} applicable_on
159
+ * @property {string} calculate_on
160
+ * @property {string} value_type
161
+ * @property {string[]} [scope]
182
162
  */
183
163
 
184
164
  /**
185
165
  * @typedef CouponAdd
186
166
  * @property {CouponDateMeta} [date_meta]
187
- * @property {Ownership} [ownership]
167
+ * @property {Ownership} ownership
188
168
  * @property {CouponAuthor} [author]
189
169
  * @property {State} [state]
190
170
  * @property {Restrictions} [restrictions]
191
171
  * @property {Validation} [validation]
192
172
  * @property {CouponAction} [action]
193
- * @property {string} [coupon_type] - The type of coupon like bulk or single
194
- * @property {string} [coupon_prefix] - Bulk coupon code prefix string
195
- * @property {number} [coupon_counts] - Counts of bulk coupon
196
- * @property {string[]} [tags] - List of tags specify to platform
173
+ * @property {string[]} [tags]
197
174
  * @property {CouponSchedule} [_schedule]
198
- * @property {Rule[]} [rule]
199
- * @property {DisplayMeta} [display_meta]
200
- * @property {string} code - Unique code of coupon
201
- * @property {string} type_slug - The type slug of coupon discount
202
- * @property {Identifier} [identifiers]
203
- * @property {Validity} [validity]
204
- * @property {RuleDefinition} [rule_definition]
205
- * @property {string} [_id] - Unique identifier of coupon
206
- * @property {boolean} [is_archived] - Indicates if the coupon is in archived
207
- * state or not.
175
+ * @property {Rule[]} rule
176
+ * @property {DisplayMeta} display_meta
177
+ * @property {string} code
178
+ * @property {string} type_slug
179
+ * @property {Identifier} identifiers
180
+ * @property {Validity} validity
181
+ * @property {RuleDefinition} rule_definition
182
+ * @property {string} [_id] - Coupon id
208
183
  */
209
184
 
210
185
  /**
@@ -219,46 +194,42 @@ const Joi = require("joi");
219
194
  */
220
195
 
221
196
  /**
222
- * @typedef CouponsResult
223
- * @property {CouponAdd[]} [items] - Coupons list for sales channel
197
+ * @typedef CouponsResponse
198
+ * @property {CouponAdd[]} [items]
224
199
  * @property {Page} [page]
225
200
  */
226
201
 
227
202
  /**
228
203
  * @typedef SuccessMessage
229
- * @property {boolean} [success] - Whether the request was successful (true/false).
230
- * @property {string} [message] - Response message needs to display
204
+ * @property {boolean} [success]
205
+ * @property {string} [message]
231
206
  */
232
207
 
233
208
  /**
234
- * @typedef OperationErrorResult
235
- * @property {boolean} [success] - Whether the request was successful (true/false).
236
- * @property {string} [message] - Response message needs to display
237
- * @property {string} [error] - Response error message in detail
209
+ * @typedef OperationErrorResponse
210
+ * @property {boolean} [success]
211
+ * @property {string} [message]
212
+ * @property {string} [error]
238
213
  */
239
214
 
240
215
  /**
241
216
  * @typedef CouponUpdate
242
217
  * @property {CouponDateMeta} [date_meta]
243
- * @property {Ownership} [ownership]
218
+ * @property {Ownership} ownership
244
219
  * @property {CouponAuthor} [author]
245
220
  * @property {State} [state]
246
221
  * @property {Restrictions} [restrictions]
247
222
  * @property {Validation} [validation]
248
223
  * @property {CouponAction} [action]
249
- * @property {string[]} [tags] - List of tags specify to platform
224
+ * @property {string[]} [tags]
250
225
  * @property {CouponSchedule} [_schedule]
251
- * @property {Rule[]} [rule]
252
- * @property {DisplayMeta} [display_meta]
253
- * @property {string} code - Unique code that is used to apply coupon
254
- * @property {string} [coupon_type] - The type of coupon like bulk or single
255
- * @property {string} [coupon_prefix] - Bulk coupon code prefix string
256
- * @property {number} [coupon_counts] - Counts of culk coupon
257
- * @property {string} [reason] - Coupon rejection reason added by reviewer
258
- * @property {string} type_slug - The type slug of coupon discount
259
- * @property {Identifier} [identifiers]
260
- * @property {Validity} [validity]
261
- * @property {RuleDefinition} [rule_definition]
226
+ * @property {Rule[]} rule
227
+ * @property {DisplayMeta} display_meta
228
+ * @property {string} code
229
+ * @property {string} type_slug
230
+ * @property {Identifier} identifiers
231
+ * @property {Validity} validity
232
+ * @property {RuleDefinition} rule_definition
262
233
  */
263
234
 
264
235
  /**
@@ -267,150 +238,110 @@ const Joi = require("joi");
267
238
  * @property {CouponSchedule} [schedule]
268
239
  */
269
240
 
270
- /**
271
- * @typedef CouponCreateResult
272
- * @property {boolean} [success] - Whether the request was successful (true/false)
273
- * @property {string} [message] - Create coupon response message that can shown
274
- * to creator user
275
- * @property {string} [_id] - Unique identifier for coupon created
276
- */
277
-
278
241
  /**
279
242
  * @typedef DisplayMeta1
280
- * @property {string} [description] - Define details about the offer in promotion
281
- * @property {string} [offer_label] - Offer label of promotion that needs to display
282
- * @property {string} [name] - Name of promotion that needs to display
283
- * @property {string} [offer_text] - Promotion offer text used to display
243
+ * @property {string} [description]
244
+ * @property {string} [offer_label]
245
+ * @property {string} [name]
246
+ * @property {string} [offer_text]
284
247
  */
285
248
 
286
249
  /**
287
250
  * @typedef Ownership1
288
- * @property {string} [payable_category] - Promotion amount payable category
289
- * @property {string} [payable_by] - Promotion amount bearable party
251
+ * @property {string} payable_category
252
+ * @property {string} payable_by
290
253
  */
291
254
 
292
255
  /**
293
256
  * @typedef CompareObject
294
- * @property {number} [equals] - Nummeric value must be equal to cart level rules
295
- * @property {number} [greater_than] - Nummeric value must be greater than cart
296
- * level rules
297
- * @property {number} [less_than_equals] - Nummeric value must be less than or
298
- * equal to cart level rules
299
- * @property {number} [less_than] - Nummeric value must be less than cart level rules
300
- * @property {number} [greater_than_equals] - Nummeric value must be greater
301
- * than or equal to cart level rules
302
- */
303
-
304
- /**
305
- * @typedef ItemSizeMapping
306
- * @property {Object} [item_size_mapping] - Item size mapping in promotion
257
+ * @property {number} [equals]
258
+ * @property {number} [greater_than]
259
+ * @property {number} [less_than_equals]
260
+ * @property {number} [less_than]
261
+ * @property {number} [greater_than_equals]
307
262
  */
308
263
 
309
264
  /**
310
265
  * @typedef ItemCriteria
311
266
  * @property {CompareObject} [cart_quantity]
312
- * @property {string[]} [available_zones] - List of all zones on which promotion
313
- * is applicable
314
- * @property {number[]} [item_exclude_company] - List of all company id on which
315
- * promotion is not applicable
316
- * @property {number[]} [item_id] - List of all item ids on which promotion is applicable
317
- * @property {number[]} [item_l1_category] - List of all L1 category on which
318
- * promotion is applicable
267
+ * @property {string[]} [available_zones]
268
+ * @property {number[]} [item_exclude_company]
269
+ * @property {number[]} [item_id]
270
+ * @property {number[]} [item_l1_category]
319
271
  * @property {CompareObject} [cart_total]
320
272
  * @property {CompareObject} [cart_unique_item_quantity]
321
273
  * @property {CompareObject} [cart_unique_item_amount]
322
- * @property {number[]} [item_exclude_id] - List of all item ids on which
323
- * promotion is not applicable
324
- * @property {boolean} [all_items] - Boolean flag set true to applicable the
325
- * promotion for all products
326
- * @property {number[]} [item_exclude_l1_category] - List of all item ids on
327
- * which promotion is not applicable
328
- * @property {string[]} [item_size] - List of all item sizes on which promotion
329
- * is applicable
330
- * @property {number[]} [item_store] - List of all item store ids on which
331
- * promotion is applicable
332
- * @property {string[]} [item_exclude_sku] - List of all item sku on which
333
- * promotion is not applicable
334
- * @property {number[]} [item_department] - List of all departments ids on which
335
- * promotion is applicable
336
- * @property {number[]} [item_exclude_store] - List of all item store ids on
337
- * which promotion is not applicable
338
- * @property {number[]} [item_brand] - List of all brand ids on which promotion
339
- * is applicable
340
- * @property {number[]} [item_exclude_department] - List of all department ids
341
- * on which promotion is not applicable
342
- * @property {number[]} [item_exclude_category] - List of all L3 category on
343
- * which promotion is not applicable
344
- * @property {number[]} [item_category] - List of all L3 category on which
345
- * promotion is applicable
274
+ * @property {number[]} [item_exclude_id]
275
+ * @property {boolean} [all_items]
276
+ * @property {number[]} [item_exclude_l1_category]
277
+ * @property {string[]} [item_size]
278
+ * @property {number[]} [item_store]
279
+ * @property {string[]} [item_exclude_sku]
280
+ * @property {number[]} [item_department]
281
+ * @property {number[]} [item_exclude_store]
282
+ * @property {number[]} [item_brand]
283
+ * @property {number[]} [item_exclude_department]
284
+ * @property {number[]} [item_exclude_category]
285
+ * @property {number[]} [item_category]
346
286
  * @property {string[]} [buy_rules]
347
- * @property {number[]} [item_exclude_brand] - List of all brand ids on which
348
- * promotion is not applicable
349
- * @property {number[]} [item_l2_category] - List of all L2 category on which
350
- * promotion is applicable
351
- * @property {number[]} [item_company] - List of all company ids on which
352
- * promotion is applicable
353
- * @property {string[]} [item_tags] - List of all product tags on which
354
- * promotion is applicable
355
- * @property {number[]} [item_exclude_l2_category] - List of all L2 category on
356
- * which promotion is not applicable
357
- * @property {string[]} [item_sku] - List of all item sku on which promotion is applicable
358
- * @property {string[]} [item_exclude_product_tags]
287
+ * @property {number[]} [item_exclude_brand]
288
+ * @property {number[]} [item_l2_category]
289
+ * @property {number[]} [item_company]
290
+ * @property {string[]} [item_tags]
291
+ * @property {number[]} [item_exclude_l2_category]
292
+ * @property {string[]} [item_sku]
359
293
  */
360
294
 
361
295
  /**
362
296
  * @typedef DiscountOffer
363
- * @property {number} [max_discount_amount] - Maximum discount amount in promotion
364
- * @property {number} [discount_price] - Discount price in promotion
365
- * @property {boolean} [apportion_discount] - Flag to distribute discount for each article
366
- * @property {boolean} [partial_can_ret] - Flag indicated return the product partially
367
- * @property {number} [max_usage_per_transaction] - Maximum usage per
368
- * transaction in promotion
369
- * @property {number} [min_offer_quantity] - Minimum quantity of offer in promotion
370
- * @property {string} [code] - Unique code of promotion
371
- * @property {number} [discount_amount] - Discount amount in promotion
372
- * @property {number} [discount_percentage] - Discount percentage in promotion
373
- * @property {number} [max_offer_quantity] - Maximum quantity of product in promotion
297
+ * @property {number} [max_discount_amount]
298
+ * @property {number} [discount_price]
299
+ * @property {boolean} [apportion_discount]
300
+ * @property {boolean} [partial_can_ret]
301
+ * @property {number} [max_usage_per_transaction]
302
+ * @property {number} [min_offer_quantity]
303
+ * @property {string} [code]
304
+ * @property {number} [discount_amount]
305
+ * @property {number} [discount_percentage]
306
+ * @property {number} [max_offer_quantity]
374
307
  */
375
308
 
376
309
  /**
377
310
  * @typedef DiscountRule
378
- * @property {string} discount_type - The type of discount in promotion
379
- * @property {string} buy_condition - Promotion buy rules in offer level
311
+ * @property {string} discount_type
312
+ * @property {string} buy_condition
380
313
  * @property {ItemCriteria} item_criteria
381
- * @property {ItemSizeMapping} [meta]
382
314
  * @property {DiscountOffer} offer
383
315
  */
384
316
 
385
317
  /**
386
318
  * @typedef PaymentAllowValue1
387
- * @property {number} [max] - Maximum value need to allow for payment in promotion
319
+ * @property {number} [max]
388
320
  */
389
321
 
390
322
  /**
391
323
  * @typedef PromotionPaymentModes
392
- * @property {string} [type] - Define the type of payment
324
+ * @property {string} type
393
325
  * @property {PaymentAllowValue1} [uses]
394
- * @property {string[]} [codes] - List of codes associated with payment options
326
+ * @property {string[]} [codes]
395
327
  */
396
328
 
397
329
  /**
398
330
  * @typedef UserRegistered
399
- * @property {string} [end] - End date time format till the user is registerd
400
- * @property {string} [start] - Start date time format when user is registerd
331
+ * @property {string} [end]
332
+ * @property {string} [start]
401
333
  */
402
334
 
403
335
  /**
404
336
  * @typedef PostOrder1
405
- * @property {boolean} [cancellation_allowed] - Cancellation allowed in
406
- * promotion after order
407
- * @property {boolean} [return_allowed] - Return allowed in promotion after order
337
+ * @property {boolean} [cancellation_allowed]
338
+ * @property {boolean} [return_allowed]
408
339
  */
409
340
 
410
341
  /**
411
342
  * @typedef UsesRemaining1
412
- * @property {number} [user] - Define total promotion count per user
413
- * @property {number} [total] - Define total promotions count
343
+ * @property {number} [user]
344
+ * @property {number} [total]
414
345
  */
415
346
 
416
347
  /**
@@ -421,75 +352,62 @@ const Joi = require("joi");
421
352
 
422
353
  /**
423
354
  * @typedef Restrictions1
424
- * @property {PaymentModes} [payments]
355
+ * @property {Object} [payments]
425
356
  * @property {UserRegistered} [user_registered]
426
- * @property {string[]} [platforms] - List of platform on which promotion is
427
- * applicable like android, ios
357
+ * @property {string[]} [platforms]
428
358
  * @property {PostOrder1} [post_order]
429
- * @property {number[]} [user_groups] - List of user groups on which promotion
430
- * is applicable
431
- * @property {number} [order_quantity] - Prmomotion max order count
432
- * @property {boolean} [anonymous_users] - Set true, if promotion is applicable
433
- * for guest user
434
- * @property {string[]} [user_id] - List of user id on which promotion is applicable
435
- * @property {UsesRestriction1} [uses]
436
- * @property {number[]} [ordering_stores] - List of store id on which promotion
437
- * is applicable
359
+ * @property {number[]} [user_groups]
360
+ * @property {number} [order_quantity]
361
+ * @property {boolean} [anonymous_users]
362
+ * @property {string[]} [user_id]
363
+ * @property {UsesRestriction1} uses
364
+ * @property {number[]} [ordering_stores]
438
365
  */
439
366
 
440
367
  /**
441
368
  * @typedef PromotionSchedule
442
- * @property {string} [end] - Then end date of promotion till valid
443
- * @property {string} [start] - Then start date of promotion is valid
444
- * @property {string} [status] - Promotion status like draft, review
445
- * @property {boolean} [published] - The status of promotion is published or not
446
- * @property {Object[]} [next_schedule] - List of date time, which we will
447
- * schedule the promotion
448
- * @property {string} [cron] - Schedule the cron to run your job periodically
449
- * @property {number} [duration] - Time in minutes for execution
369
+ * @property {string} end
370
+ * @property {string} start
371
+ * @property {boolean} published
372
+ * @property {Object[]} [next_schedule]
373
+ * @property {string} [cron]
374
+ * @property {number} [duration]
450
375
  */
451
376
 
452
377
  /**
453
378
  * @typedef PromotionAction
454
- * @property {string} [action_date] - Date time format in promotion
455
- * @property {string} [action_type] - The action type of promotion
379
+ * @property {string} action_date
380
+ * @property {string} action_type
456
381
  */
457
382
 
458
383
  /**
459
384
  * @typedef PromotionAuthor
460
- * @property {string} [created_by] - The user id of user, who has created the promotion
461
- * @property {string} [modified_by] - The user id of user, who has modified the promotion
462
- * @property {string} [approved_by] - The user id of user, who has approved the promotion
463
- * @property {string} [rejected_by] - The user id of user, who has rejected the promotion
464
- * @property {string} [reviewed_by] - The user id of user, who has reviewed the promotion
385
+ * @property {string} [created_by]
386
+ * @property {string} [modified_by]
465
387
  */
466
388
 
467
389
  /**
468
390
  * @typedef Visibility
469
- * @property {boolean} [coupon_list] - Flag to show promotion on Coupon list
470
- * @property {boolean} [pdp] - Flag to show promotion on PDP page
391
+ * @property {boolean} coupon_list
392
+ * @property {boolean} pdp
471
393
  */
472
394
 
473
395
  /**
474
396
  * @typedef PromotionDateMeta
475
- * @property {string} [modified_on] - Date time format when the promotion last modified
476
- * @property {string} [created_on] - Date time format when the promotion created
477
- * @property {string} [approved_on] - Date time format when the promotion approved
478
- * @property {string} [rejected_on] - Date time format when the promotion rejected
479
- * @property {string} [reviewed_on] - Date time format when the promotion reviewed
397
+ * @property {string} [modified_on]
398
+ * @property {string} [created_on]
480
399
  */
481
400
 
482
401
  /**
483
402
  * @typedef PromotionListItem
484
403
  * @property {boolean} [stackable] - Allows more than one promotion to get
485
404
  * combined benefits
486
- * @property {string} [calculate_on] - Article Price on which promotion
487
- * calculated like effective price or marked price. Only available for
488
- * Contract pricing and Ladder pricing promotion type
405
+ * @property {string} [calculate_on] - Only available for Contract pricing and
406
+ * Ladder pricing promotion type
489
407
  * @property {string} [apply_exclusive] - Doesn't allow other promotion after
490
408
  * current promotion applied on cart or article
491
409
  * @property {string} promo_group - Group into which promotion fall
492
- * @property {string} mode - Promotion mode, like coupon or promotion
410
+ * @property {string} mode - Promotion mode
493
411
  * @property {boolean} [apply_all_discount] - Prevents more than one promotion discounts
494
412
  * @property {DisplayMeta1} display_meta
495
413
  * @property {Ownership1} ownership
@@ -498,166 +416,81 @@ const Joi = require("joi");
498
416
  * promotion will be applied
499
417
  * @property {Restrictions1} [restrictions]
500
418
  * @property {string} [currency] - Currency used for promotion
501
- * @property {boolean} [is_processed] - Flag to verify if promotion is ready to
502
- * be applied on cart and ready to update promotion
503
- * @property {string} [code] - Unique code of promotion
419
+ * @property {string} [code] - Promotion code
504
420
  * @property {PromotionSchedule} [_schedule]
505
421
  * @property {PromotionAction} [post_order_action]
506
422
  * @property {number} [apply_priority] - Priority based on which promotion are
507
423
  * applied on articles
508
424
  * @property {PromotionAuthor} [author]
509
425
  * @property {Visibility} [visiblility]
510
- * @property {string} application_id - Application id in which promotion will be used
511
- * @property {ItemCriteria} buy_rules
426
+ * @property {string} application_id - App id in which promotion will be used
427
+ * @property {Object} buy_rules - Buy rules for the promotion
512
428
  * @property {Object} [_custom_json] - Custom data stored in promotion
513
429
  * @property {PromotionDateMeta} [date_meta]
514
- * @property {string} [_id] - Unique identifier of promotion
515
- * @property {string[]} [tags] - List of tags on which promotion is applicable
516
- * @property {boolean} [is_archived] - Indicates if the promotion is in archived
517
- * state or not.
430
+ * @property {string} [_id] - Promotion id
431
+ * @property {string[]} [tags]
518
432
  */
519
433
 
520
434
  /**
521
- * @typedef PromotionsResult
522
- * @property {PromotionListItem[]} [items] - List of promotions
435
+ * @typedef PromotionsResponse
436
+ * @property {PromotionListItem[]} [items]
523
437
  * @property {Page} [page]
524
438
  */
525
439
 
526
440
  /**
527
441
  * @typedef PromotionAdd
528
- * @property {boolean} [stackable] - Boolean value set true to apply other promotions also
529
- * @property {string} [calculate_on] - Article Price on which promotion
530
- * calculated like effective price or marked price. Only available for
531
- * Contract pricing and Ladder pricing promotion type
532
- * @property {string} [apply_exclusive] - Promotion should apply on either
533
- * article or cart.
534
- * @property {string} promo_group - The type of promotion group
535
- * @property {string} mode - Promotion mode, like coupon or promotion
536
- * @property {boolean} [apply_all_discount] - True means to apply all discount offers
537
- * @property {DisplayMeta1} [display_meta]
538
- * @property {Ownership1} [ownership]
539
- * @property {string} promotion_type - Type of promotion
540
- * @property {DiscountRule[]} [discount_rules] - List of discount offers and
541
- * their applicable conditions
542
- * @property {Restrictions1} [restrictions]
543
- * @property {string} [currency] - Promotion Currency code like INR
544
- * @property {string} [code] - Promotion unique code
545
- * @property {PromotionSchedule} [_schedule]
546
- * @property {PromotionAction} [post_order_action]
547
- * @property {number} [apply_priority] - Promotion applicable priority
548
- * @property {PromotionAuthor} [author]
549
- * @property {Visibility} [visiblility]
550
- * @property {string} application_id - Current application id of sales channel
551
- * @property {ItemCriteria} [buy_rules]
552
- * @property {Object} [_custom_json] - Set extra properties in promotion
553
- * @property {PromotionDateMeta} [date_meta]
554
- * @property {string[]} [tags] - List of tags applicable for promotion
555
- * @property {string} [_id] - Unique Identifier for promotion.
556
- */
557
-
558
- /**
559
- * @typedef PromotionAddResult
560
- * @property {boolean} [stackable] - Boolean value set true to apply other promotions also
561
- * @property {string} [calculate_on] - Article Price on which promotion
562
- * calculated like effective price or marked price. Only available for
563
- * Contract pricing and Ladder pricing promotion type
564
- * @property {string} [apply_exclusive] - Promotion should apply on either
565
- * article or cart.
566
- * @property {string} promo_group - The type of promotion group
567
- * @property {string} mode - Promotion mode, like coupon or promotion
568
- * @property {boolean} [is_processed] - Flag to verify if promotion is ready to
569
- * be applied on cart and ready to update promotion
570
- * @property {boolean} [apply_all_discount] - True means to apply all discount offers
571
- * @property {DisplayMeta1} [display_meta]
572
- * @property {Ownership1} [ownership]
573
- * @property {string} promotion_type - Type of promotion
574
- * @property {DiscountRule[]} [discount_rules] - List of discount offers and
575
- * their applicable conditions
442
+ * @property {boolean} [stackable]
443
+ * @property {string} [calculate_on] - Only available for Contract pricing and
444
+ * Ladder pricing promotion type
445
+ * @property {string} [apply_exclusive]
446
+ * @property {string} promo_group
447
+ * @property {string} mode
448
+ * @property {boolean} [apply_all_discount]
449
+ * @property {DisplayMeta1} display_meta
450
+ * @property {Ownership1} ownership
451
+ * @property {string} promotion_type
452
+ * @property {DiscountRule[]} discount_rules
576
453
  * @property {Restrictions1} [restrictions]
577
- * @property {string} [currency] - Promotion Currency code like INR
578
- * @property {string} [code] - Promotion unique code
454
+ * @property {string} [currency]
455
+ * @property {string} [code]
579
456
  * @property {PromotionSchedule} [_schedule]
580
457
  * @property {PromotionAction} [post_order_action]
581
- * @property {number} [apply_priority] - Promotion applicable priority
458
+ * @property {number} [apply_priority]
582
459
  * @property {PromotionAuthor} [author]
583
460
  * @property {Visibility} [visiblility]
584
- * @property {string} application_id - Current application id of sales channel
585
- * @property {ItemCriteria} [buy_rules]
586
- * @property {Object} [_custom_json] - Set extra properties in promotion
461
+ * @property {string} application_id
462
+ * @property {Object} buy_rules
463
+ * @property {Object} [_custom_json]
587
464
  * @property {PromotionDateMeta} [date_meta]
588
- * @property {string[]} [tags] - List of tags applicable for promotion
589
- * @property {boolean} [is_archived] - Indicates if the promotion is in archived
590
- * state or not.
465
+ * @property {string[]} [tags]
591
466
  */
592
467
 
593
468
  /**
594
469
  * @typedef PromotionUpdate
595
- * @property {boolean} [stackable] - Set true to apply other promotions in cart
596
- * @property {string} [calculate_on] - Article Price on which promotion
597
- * calculated like effective price or marked price. Only available for
598
- * Contract pricing and Ladder pricing promotion type
599
- * @property {string} [apply_exclusive] - Promotion should apply on either
600
- * article or cart.
601
- * @property {string} [reason] - Promotion rejection reason added by reviewer
602
- * @property {string} promo_group - The type of promotion group
603
- * @property {string} mode - Promotion mode
604
- * @property {boolean} [apply_all_discount] - True means to apply all discount offers
605
- * @property {DisplayMeta1} [display_meta]
606
- * @property {Ownership1} [ownership]
607
- * @property {string} promotion_type - The Promotion type like amount, bogo and
608
- * percentage etc.
609
- * @property {DiscountRule[]} [discount_rules] - List of discount offers and
610
- * their applicable conditions
611
- * @property {Restrictions1} [restrictions]
612
- * @property {string} [currency] - Promotion Currency code like INR
613
- * @property {string} [code] - Promotion unique code
614
- * @property {PromotionSchedule} [_schedule]
615
- * @property {PromotionAction} [post_order_action]
616
- * @property {number} [apply_priority] - Promotion applicable priority
617
- * @property {PromotionAuthor} [author]
618
- * @property {Visibility} [visiblility]
619
- * @property {string} application_id - Current application id of sales channel
620
- * @property {ItemCriteria} [buy_rules]
621
- * @property {Object} [_custom_json] - Set extra properties in promotion
622
- * @property {PromotionDateMeta} [date_meta]
623
- * @property {string[]} [tags] - List of tags applicable for promotion
624
- */
625
-
626
- /**
627
- * @typedef PromotionUpdateResult
628
- * @property {boolean} [stackable] - Set true to apply other promotions in cart
629
- * @property {string} [calculate_on] - Article Price on which promotion
630
- * calculated like effective price or marked price. Only available for
631
- * Contract pricing and Ladder pricing promotion type
632
- * @property {string} [apply_exclusive] - Promotion should apply on either
633
- * article or cart.
634
- * @property {string} [reason] - Promotion rejection reason added by reviewer
635
- * @property {boolean} [is_processed] - Flag to verify if promotion is ready to
636
- * be applied on cart and ready to update promotion
637
- * @property {string} promo_group - The type of promotion group
638
- * @property {string} mode - Promotion mode
639
- * @property {boolean} [apply_all_discount] - True means to apply all discount offers
640
- * @property {DisplayMeta1} [display_meta]
641
- * @property {Ownership1} [ownership]
642
- * @property {string} promotion_type - The Promotion type like amount, bogo and
643
- * percentage etc.
644
- * @property {DiscountRule[]} [discount_rules] - List of discount offers and
645
- * their applicable conditions
470
+ * @property {boolean} [stackable]
471
+ * @property {string} [calculate_on] - Only available for Contract pricing and
472
+ * Ladder pricing promotion type
473
+ * @property {string} [apply_exclusive]
474
+ * @property {string} promo_group
475
+ * @property {string} mode
476
+ * @property {boolean} [apply_all_discount]
477
+ * @property {DisplayMeta1} display_meta
478
+ * @property {Ownership1} ownership
479
+ * @property {string} promotion_type
480
+ * @property {DiscountRule[]} discount_rules
646
481
  * @property {Restrictions1} [restrictions]
647
- * @property {string} [currency] - Promotion Currency code like INR
648
- * @property {string} [code] - Promotion unique code
482
+ * @property {string} [currency]
483
+ * @property {string} [code]
649
484
  * @property {PromotionSchedule} [_schedule]
650
485
  * @property {PromotionAction} [post_order_action]
651
- * @property {number} [apply_priority] - Promotion applicable priority
486
+ * @property {number} [apply_priority]
652
487
  * @property {PromotionAuthor} [author]
653
488
  * @property {Visibility} [visiblility]
654
- * @property {string} application_id - Current application id of sales channel
655
- * @property {ItemCriteria} [buy_rules]
656
- * @property {Object} [_custom_json] - Set extra properties in promotion
489
+ * @property {string} application_id
490
+ * @property {Object} buy_rules
491
+ * @property {Object} [_custom_json]
657
492
  * @property {PromotionDateMeta} [date_meta]
658
- * @property {string[]} [tags] - List of tags applicable for promotion
659
- * @property {boolean} [is_archived] - Indicates if the promotion is in archived
660
- * state or not.
493
+ * @property {string[]} [tags]
661
494
  */
662
495
 
663
496
  /**
@@ -667,60 +500,56 @@ const Joi = require("joi");
667
500
  */
668
501
 
669
502
  /**
670
- * @typedef ActivePromosResult
671
- * @property {string} [entity_slug] - A short, human-readable, URL-friendly
672
- * identifier of Promotion or coupon
673
- * @property {string} [title] - Name of the promotion or coupon
674
- * @property {string} [modified_on] - Coupon or promotion modification date
503
+ * @typedef ActivePromosResponse
504
+ * @property {string} [entity_slug]
505
+ * @property {string} [title] - Name of the promotion
506
+ * @property {string} [modified_on] - Coupon modification date
675
507
  * @property {string} [example] - Discount offers examples
676
508
  * @property {string} [entity_type] - Type of entity to be selected from :
677
509
  * ['coupon', 'promotion']
678
- * @property {string} [created_on] - Coupon or modification creation date
510
+ * @property {string} [created_on] - Coupon creation date
679
511
  * @property {boolean} [is_hidden] - If the promo is active or not
680
- * @property {string} [type] - Coupon or promotion type
512
+ * @property {string} [type] - Coupon type
681
513
  * @property {string} [subtitle] - Small description of the current offer
682
514
  * @property {string} [description] - The description of the offer in the form of an HTML
683
515
  */
684
516
 
685
517
  /**
686
518
  * @typedef Charges
687
- * @property {number} [charges] - Delivery chanrges applied on the product of cart
688
- * @property {number} [threshold] - Threshold of cart value on which the charge
689
- * should be applied
519
+ * @property {number} [charges]
520
+ * @property {number} [threshold]
690
521
  */
691
522
 
692
523
  /**
693
524
  * @typedef DeliveryCharges
694
- * @property {Charges[]} [charges] - List of delivery changes information of the cart
695
- * @property {boolean} [enabled] - Enable or disable delivery charge on cart
525
+ * @property {Charges[]} [charges]
526
+ * @property {boolean} [enabled]
696
527
  */
697
528
 
698
529
  /**
699
530
  * @typedef CartMetaConfigUpdate
700
- * @property {number} [min_cart_value] - Minimum order value to checkout
701
- * @property {number} [max_cart_value] - Maximum order value to checkout
702
- * @property {boolean} [bulk_coupons] - Indicates bulk coupon applicable for cart
703
- * @property {number} [max_cart_items] - Maximum cart items to checkout
704
- * @property {string} [gift_display_text] - Free gift charges text to show
531
+ * @property {number} [min_cart_value]
532
+ * @property {number} [max_cart_value]
533
+ * @property {boolean} [bulk_coupons]
534
+ * @property {number} [max_cart_items]
535
+ * @property {string} [gift_display_text]
705
536
  * @property {DeliveryCharges} [delivery_charges]
706
- * @property {boolean} [revenue_engine_coupon] - It define credit coupon
707
- * applicable for cart
708
- * @property {number} [gift_pricing] - Free gift charges per product
709
- * @property {boolean} [enabled] - Enabled flag for cart configuration
537
+ * @property {boolean} [revenue_engine_coupon]
538
+ * @property {number} [gift_pricing]
539
+ * @property {boolean} [enabled]
710
540
  */
711
541
 
712
542
  /**
713
543
  * @typedef CartMetaConfigAdd
714
- * @property {number} [min_cart_value] - Minimum order value to checkout
715
- * @property {number} [max_cart_value] - Maximum order value to checkout
716
- * @property {boolean} [bulk_coupons] - Indicates bulk coupon applicable for cart
717
- * @property {number} [max_cart_items] - Maximum cart items to checkout
718
- * @property {string} [gift_display_text] - Free gift charges text to show
544
+ * @property {number} [min_cart_value]
545
+ * @property {number} [max_cart_value]
546
+ * @property {boolean} [bulk_coupons]
547
+ * @property {number} [max_cart_items]
548
+ * @property {string} [gift_display_text]
719
549
  * @property {DeliveryCharges} [delivery_charges]
720
- * @property {boolean} [revenue_engine_coupon] - It define credit coupon
721
- * applicable for cart
722
- * @property {number} [gift_pricing] - Free gift charges per product
723
- * @property {boolean} [enabled] - Enabled flag for cart configuration
550
+ * @property {boolean} [revenue_engine_coupon]
551
+ * @property {number} [gift_pricing]
552
+ * @property {boolean} [enabled]
724
553
  */
725
554
 
726
555
  /**
@@ -728,10 +557,10 @@ const Joi = require("joi");
728
557
  * @property {number} [value] - Value of price adjustment for article
729
558
  * @property {string} [code] - Code to identify price adjustment on article
730
559
  * @property {string} [type] - Type of price adjusment
731
- * @property {string} article_id - Unique identifier of article
560
+ * @property {string} article_id - Id of article
732
561
  * @property {number} [quantity] - Total quantity of the article to be
733
562
  * considered (currently used only in discount type)
734
- * @property {Object} [meta] - Meta data related to article
563
+ * @property {Object} [meta] - Meta related to article
735
564
  */
736
565
 
737
566
  /**
@@ -742,14 +571,14 @@ const Joi = require("joi");
742
571
 
743
572
  /**
744
573
  * @typedef Collection
745
- * @property {string} refund_by - Bearable party who is refunding the amount
746
- * @property {string} collected_by - The party who is collecting the amount
574
+ * @property {string} refund_by
575
+ * @property {string} collected_by
747
576
  */
748
577
 
749
578
  /**
750
579
  * @typedef PriceAdjustmentUpdate
751
580
  * @property {string} [modified_by] - The entity that modified the field
752
- * @property {number} value - The amount applied on the cart
581
+ * @property {number} value
753
582
  * @property {string} message - The message associated with the price adjustment
754
583
  * @property {string} [apply_expiry] - The date and time when the expiry should be applied
755
584
  * @property {PriceAdjustmentRestrictions} [restrictions] - Restrictions applied
@@ -758,7 +587,7 @@ const Joi = require("joi");
758
587
  * @property {boolean} article_level_distribution - Flag indicating whether the
759
588
  * distribution should is done at the article level
760
589
  * @property {Collection} collection
761
- * @property {string} type - Type of price adjusment like charge, mop, discount etc.
590
+ * @property {string} type - Type of price adjusment
762
591
  * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
763
592
  * allowed (default: False)
764
593
  * @property {boolean} is_authenticated - Flag indicating whether the user is
@@ -766,49 +595,47 @@ const Joi = require("joi");
766
595
  * @property {Article[]} article_ids - The list of article object in the price adjustment
767
596
  * @property {boolean} [auto_remove] - This field if set true will remove mop
768
597
  * type price adjustment.
769
- * @property {Object} [meta] - Additional information regarding price adjustment
770
- * @property {string} cart_id - Unique identifier of the cart
771
- * @property {DistributionLogic} [distribution_logic]
598
+ * @property {Object} [meta]
599
+ * @property {string} cart_id - The ID of the cart
772
600
  */
773
601
 
774
602
  /**
775
603
  * @typedef PriceAdjustment
776
- * @property {number} value - The amount applied on the cart
604
+ * @property {number} value
777
605
  * @property {string} message - The message associated with the price adjustment
778
606
  * @property {string} [apply_expiry] - The date and time when the expiry should be applied
779
- * @property {PriceAdjustmentRestrictions} [restrictions] - This field specifies
780
- * the restrictions for this item or service, such as whether cancellation and
781
- * return are permitted, except for `charge` type.
607
+ * @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
608
+ * the restrictions applied to this particular item or service, including
609
+ * whether or not cancellation and return are allowed, etc
782
610
  * @property {boolean} article_level_distribution - Flag indicating whether the
783
611
  * distribution should is done at the article level
784
- * @property {string} [id] - Unique identifier of Price adjustment
612
+ * @property {string} [id]
785
613
  * @property {Collection} collection
786
- * @property {string} type - Type of price adjusment like charge, discount, mop etc.
614
+ * @property {string} type - Type of price adjusment
787
615
  * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
788
- * allowed (default: False) expect for `charge` type
616
+ * allowed (default: False)
789
617
  * @property {boolean} is_authenticated - Flag indicating whether the user is
790
618
  * authenticated
791
619
  * @property {Article[]} article_ids - The list of article object in the price adjustment
792
620
  * @property {boolean} [auto_remove] - This field if set true will remove mop
793
621
  * type price adjustment.
794
- * @property {Object} [meta] - Additional information regarding price adjustment
795
- * @property {string} cart_id - Unique identifier of the cart
796
- * @property {DistributionLogic} [distribution_logic]
622
+ * @property {Object} [meta]
623
+ * @property {string} cart_id - The ID of the cart
797
624
  */
798
625
 
799
626
  /**
800
- * @typedef PriceAdjustmentResult
627
+ * @typedef PriceAdjustmentResponse
801
628
  * @property {PriceAdjustment} [data]
802
629
  */
803
630
 
804
631
  /**
805
- * @typedef GetPriceAdjustmentResult
632
+ * @typedef GetPriceAdjustmentResponse
806
633
  * @property {PriceAdjustment[]} [data]
807
634
  */
808
635
 
809
636
  /**
810
637
  * @typedef PriceAdjustmentAdd
811
- * @property {number} value - The amount applied on the cart
638
+ * @property {number} value
812
639
  * @property {string} message - The message associated with the price adjustment
813
640
  * @property {string} [apply_expiry] - The date and time when the expiry should be applied
814
641
  * @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
@@ -824,134 +651,100 @@ const Joi = require("joi");
824
651
  * @property {boolean} is_authenticated - Flag indicating whether the user is
825
652
  * authenticated
826
653
  * @property {Article[]} article_ids - The list of article object in the price adjustment
827
- * @property {Object} [meta] - Additional information regarding price adjustment
828
- * @property {string} cart_id - Unique identifier of the cart
654
+ * @property {Object} [meta]
655
+ * @property {string} cart_id - The ID of the cart
829
656
  * @property {boolean} [auto_remove] - This field if set true will remove mop
830
657
  * type price adjustment.
831
- * @property {DistributionLogic} [distribution_logic]
832
- */
833
-
834
- /**
835
- * @typedef DistributionRule
836
- * @property {Object} [conditions] - This field defines the distribution conditions
837
- */
838
-
839
- /**
840
- * @typedef Distribution
841
- * @property {string} [type] - This field defines the distribution type allowed
842
- * values('multi', 'single')
843
- * @property {string} [logic] - This field defines the distribution logic
844
- * allowed values('apportion', 'weighted', 'equally')
845
- * @property {DistributionRule} [rule]
846
- */
847
-
848
- /**
849
- * @typedef DistributionLogic
850
- * @property {string} [distribution_level] - This field defines the distribution
851
- * level, currently allowed distribution level is (shipment)
852
- * @property {Distribution} [distribution]
853
658
  */
854
659
 
855
660
  /**
856
661
  * @typedef CartItem
857
- * @property {number} [quantity] - Quantity of product in cart
858
- * @property {string} product_id - Unique identifier of product in cart
859
- * @property {string} size - Size of product in cart
662
+ * @property {number} [quantity]
663
+ * @property {string} product_id
664
+ * @property {string} size
860
665
  */
861
666
 
862
667
  /**
863
- * @typedef OpenapiCartDetailsCreation
864
- * @property {CartItem[]} cart_items - List of products in cart
668
+ * @typedef OpenapiCartDetailsRequest
669
+ * @property {CartItem[]} cart_items
865
670
  */
866
671
 
867
672
  /**
868
673
  * @typedef CouponBreakup
869
- * @property {string} [title] - Coupon Title of the coupon applied denotes name
870
- * of the coupon
871
- * @property {number} [max_discount_value] - Maximum discount value of the
872
- * coupon applied to cart
873
- * @property {number} [value] - Coupon value of the coupon applied to cart
874
- * @property {boolean} [is_applied] - Applied flag which denotes if any coupon
875
- * is applied to cart
876
- * @property {string} [uid] - Unique identifier of the coupon applied to cart
877
- * @property {string} [coupon_type] - Type of the coupon applied to cart
878
- * @property {string} [sub_title] - Coupon subtitle of the coupon applied to
879
- * cart which is used to display
880
- * @property {number} [coupon_value] - Value of the coupon applied to cart
881
- * @property {string} [code] - Coupon code of the coupon applied
882
- * @property {string} [type] - Type of the coupon applied to cart
883
- * @property {number} [minimum_cart_value] - Minimum cart value of the coupon
884
- * applied to cart
885
- * @property {string} [message] - Coupon message of the coupon applied to cart
886
- * @property {string} [description] - Coupon description of the coupon applied to cart.
674
+ * @property {string} [title]
675
+ * @property {number} [max_discount_value]
676
+ * @property {number} [value]
677
+ * @property {boolean} [is_applied]
678
+ * @property {string} [uid]
679
+ * @property {string} [coupon_type]
680
+ * @property {string} [sub_title]
681
+ * @property {number} [coupon_value]
682
+ * @property {string} [code]
683
+ * @property {string} [type]
684
+ * @property {number} [minimum_cart_value]
685
+ * @property {string} [message]
686
+ * @property {string} [description]
887
687
  */
888
688
 
889
689
  /**
890
690
  * @typedef DisplayBreakup
891
- * @property {string} [key] - Key of the price like total_mrp, total, subtotal etc
892
- * @property {number} [value] - Numeric value for the price
893
- * @property {string} [currency_code] - Currency code for the price
894
- * @property {string} [currency_symbol] - Currency symbol for the price
895
- * @property {string} [display] - Display key field that to be shown against the value
896
- * @property {string[]} [message] - List of message at price level to be displayed
691
+ * @property {string} [key]
692
+ * @property {number} [value]
693
+ * @property {string} [currency_code]
694
+ * @property {string} [currency_symbol]
695
+ * @property {string} [display]
696
+ * @property {string[]} [message]
897
697
  */
898
698
 
899
699
  /**
900
700
  * @typedef LoyaltyPoints
901
- * @property {boolean} [is_applied] - Whether the loyalty points are applied on the cart
902
- * @property {number} [total] - Total loyalty points available with user
903
- * @property {number} [applicable] - Whether the loyalty points are applicable
904
- * for the cart
905
- * @property {string} [description] - Description for loyalty points
701
+ * @property {boolean} [is_applied]
702
+ * @property {number} [total]
703
+ * @property {number} [applicable]
704
+ * @property {string} [description]
906
705
  */
907
706
 
908
707
  /**
909
708
  * @typedef RawBreakup
910
- * @property {number} [coupon] - Coupon amount applied to cart
911
- * @property {number} [gst_charges] - GST charges applied on cart
912
- * @property {number} [mrp_total] - Maximum price total amount of all products in cart
913
- * @property {number} [fynd_cash] - Loyalty points applied on cart
914
- * @property {number} [vog] - Total value of goods after all discount, coupons
915
- * and promotion applied of all products in cart
916
- * @property {number} [gift_card] - Gift cart amount applied on cart
917
- * @property {number} [cod_charge] - Cod charge value applied to cart. This is
918
- * applied when user select payment mode as COD
919
- * @property {number} [total] - Total payable amount by the customer
920
- * @property {number} [discount] - Discount amount recieved on cart
921
- * @property {number} [delivery_charge] - Delivery charge applied to cart
922
- * @property {number} [you_saved] - Total amount will be saved if customer
923
- * places the order
924
- * @property {number} [subtotal] - Selling price amount of all products in cart
925
- * @property {number} [convenience_fee] - Convenience fee amount applied to cart
709
+ * @property {number} [coupon]
710
+ * @property {number} [gst_charges]
711
+ * @property {number} [mrp_total]
712
+ * @property {number} [fynd_cash]
713
+ * @property {number} [vog]
714
+ * @property {number} [gift_card]
715
+ * @property {number} [cod_charge]
716
+ * @property {number} [total]
717
+ * @property {number} [discount]
718
+ * @property {number} [delivery_charge]
719
+ * @property {number} [you_saved]
720
+ * @property {number} [subtotal]
721
+ * @property {number} [convenience_fee]
926
722
  */
927
723
 
928
724
  /**
929
725
  * @typedef CartBreakup
930
726
  * @property {CouponBreakup} [coupon]
931
- * @property {DisplayBreakup[]} [display] - List of breakup data which is used
932
- * to display the breakup to the customer like MRP total, Discount, Sub total,
933
- * coupon value, promotion value and final total
727
+ * @property {DisplayBreakup[]} [display]
934
728
  * @property {LoyaltyPoints} [loyalty_points]
935
729
  * @property {RawBreakup} [raw]
936
730
  */
937
731
 
938
732
  /**
939
733
  * @typedef ProductImage
940
- * @property {string} [secure_url] - Secured url of the product image
941
- * @property {string} [url] - Bucket link url for product image
942
- * @property {string} [aspect_ratio] - Aspect ratio of the product image
734
+ * @property {string} [secure_url]
735
+ * @property {string} [url]
736
+ * @property {string} [aspect_ratio]
943
737
  */
944
738
 
945
739
  /**
946
740
  * @typedef Tags
947
- * @property {Object} [tags] - Tags is a lable or batch that is attached to a
948
- * product in cart
741
+ * @property {Object} [tags]
949
742
  */
950
743
 
951
744
  /**
952
745
  * @typedef BaseInfo
953
- * @property {number} [uid] - Unique identifier of entities like brand or seller
954
- * @property {string} [name] - Name of entities like brand or seller
746
+ * @property {number} [uid]
747
+ * @property {string} [name]
955
748
  */
956
749
 
957
750
  /**
@@ -959,62 +752,43 @@ const Joi = require("joi");
959
752
  * @property {string[]} [product_slug] - Contains list of product slug
960
753
  */
961
754
 
962
- /**
963
- * @typedef ProductActionParams
964
- * @property {string[]} [slug] - Unique product url name generated via product
965
- * name and other meta data.
966
- */
967
-
968
- /**
969
- * @typedef ProductActionPage
970
- * @property {string} [type] - Entity of page to be redirected on click
971
- * @property {ProductActionParams} [params]
972
- */
973
-
974
755
  /**
975
756
  * @typedef ProductAction
976
- * @property {string} [type] - Type of action
977
- * @property {string} [url] - Url of the product to render the product
757
+ * @property {string} [type]
758
+ * @property {string} [url]
978
759
  * @property {ActionQuery} [query]
979
- * @property {ProductActionPage} [page]
980
760
  */
981
761
 
982
762
  /**
983
763
  * @typedef CategoryInfo
984
- * @property {number} [uid] - Unique identifier of Product Category
985
- * @property {string} [name] - Category name of the product
764
+ * @property {number} [uid] - Product Category Id
765
+ * @property {string} [name]
986
766
  */
987
767
 
988
768
  /**
989
769
  * @typedef CartProduct
990
770
  * @property {string} [slug] - Unique product url name generated via product
991
771
  * name and other meta data
992
- * @property {ProductImage[]} [images] - Product Images urls of different types
993
- * like secure url, aspect ration url and url
772
+ * @property {ProductImage[]} [images]
994
773
  * @property {Tags} [teaser_tag]
995
774
  * @property {BaseInfo} [brand]
996
775
  * @property {ProductAction} [action]
997
- * @property {number} [uid] - Unique identifier of the product in cart
998
- * @property {string[]} [tags] - Products tags that are added to each product to
999
- * identify the set of products
1000
- * @property {Object} [_custom_json] - Field to add custom json of the product in cart
1001
- * @property {string} [type] - Type of product in cart
1002
- * @property {string} [name] - Product name of the product in cart which is
1003
- * defined on platform
1004
- * @property {string} [item_code] - Product code of the product while defining
1005
- * product on platform
1006
- * @property {CategoryInfo[]} [categories] - Product category information which
1007
- * incldes category name and category id
1008
- * @property {Object} [attributes] - Product attributes defined on platform
776
+ * @property {number} [uid]
777
+ * @property {string[]} [tags]
778
+ * @property {Object} [_custom_json]
779
+ * @property {string} [type]
780
+ * @property {string} [name]
781
+ * @property {string} [item_code]
782
+ * @property {CategoryInfo[]} [categories]
783
+ * @property {Object} [attributes]
1009
784
  */
1010
785
 
1011
786
  /**
1012
787
  * @typedef BasePrice
1013
- * @property {number} [effective] - Current per unit price of product after
1014
- * existing deductions
1015
- * @property {string} [currency_code] - Currency code for all amounts
1016
- * @property {string} [currency_symbol] - Currency symbol of the currncy used for price
1017
- * @property {number} [marked] - Original price of product
788
+ * @property {number} [effective]
789
+ * @property {string} [currency_code]
790
+ * @property {string} [currency_symbol]
791
+ * @property {number} [marked]
1018
792
  */
1019
793
 
1020
794
  /**
@@ -1025,54 +799,43 @@ const Joi = require("joi");
1025
799
 
1026
800
  /**
1027
801
  * @typedef StoreInfo
1028
- * @property {number} [uid] - Unique identifiers of the store from where product
1029
- * is fulfileld
1030
- * @property {string} [name] - Store name of the store from where the product is fulfiled
1031
- * @property {string} [store_code] - A unique code or identifier for the store,
1032
- * often used for internal reference
802
+ * @property {number} [uid]
803
+ * @property {string} [name]
804
+ * @property {string} [store_code]
1033
805
  */
1034
806
 
1035
807
  /**
1036
808
  * @typedef ProductArticle
1037
- * @property {string} [seller_identifier] - List of identifiers used by sellers
1038
- * for the product size.
1039
- * @property {number} [quantity] - Quantity of the article added in cart
809
+ * @property {string} [seller_identifier]
810
+ * @property {number} [quantity]
1040
811
  * @property {BaseInfo} [seller]
1041
- * @property {Object} [cart_item_meta] - Meta details of the article added from cart
1042
- * @property {Object} [parent_item_identifiers] - Fields to determine parent
1043
- * product of the product
1044
- * @property {boolean} [is_gift_visible] - Whether the product can be purchased
1045
- * as a gift. It is true if the product is available for gifting and false otherwise.
1046
- * @property {string} [uid] - This unique identifier is assigned to the specific
1047
- * article. This represents item x size x location.
1048
- * @property {Object} [gift_card] - Gift card detail if gift card applied to the
1049
- * product which indicates gift price, gift applicable flag and display
1050
- * message for the gift
1051
- * @property {string[]} [product_group_tags] - List fot the unique identifier
1052
- * for the product grouping.
1053
- * @property {Object} [identifier] - Unique identifier of the article
1054
- * @property {number} [mto_quantity] - Quantity of the product which will
1055
- * specially manufactured as not available in stock
1056
- * @property {Object} [extra_meta] - Field to update extra meta of the article in cart
1057
- * @property {string} [type] - Type of the data sent in response. Possible value
1058
- * is article
1059
- * @property {Object} [_custom_json] - Field to update custom json of the article in cart
812
+ * @property {Object} [cart_item_meta]
813
+ * @property {Object} [parent_item_identifiers]
814
+ * @property {boolean} [is_gift_visible]
815
+ * @property {string} [uid]
816
+ * @property {Object} [gift_card]
817
+ * @property {string[]} [product_group_tags]
818
+ * @property {Object} [identifier]
819
+ * @property {number} [mto_quantity]
820
+ * @property {Object} [extra_meta]
821
+ * @property {string} [type]
822
+ * @property {Object} [_custom_json]
1060
823
  * @property {ArticlePriceInfo} [price]
1061
- * @property {Object} [meta] - Meta data of article in cart
1062
- * @property {string} [size] - Size of the article added in cart
824
+ * @property {Object} [meta]
825
+ * @property {string} [size]
1063
826
  * @property {StoreInfo} [store]
1064
827
  * @property {string[]} [tags] - A list of article tags
1065
828
  */
1066
829
 
1067
830
  /**
1068
831
  * @typedef Ownership2
1069
- * @property {string} [payable_category] - Promotion amount payable category
1070
- * @property {string} [payable_by] - Promotion amount bearable party
832
+ * @property {string} [payable_category] - Promo amount payable category
833
+ * @property {string} [payable_by] - Promo amount bearable party
1071
834
  */
1072
835
 
1073
836
  /**
1074
837
  * @typedef DiscountRulesApp
1075
- * @property {Object} [offer] - Offer detail for promotion
838
+ * @property {Object} [offer] - Offer for promotion
1076
839
  * @property {Object} [raw_offer] - Raw offer details for promotion
1077
840
  * @property {Object} [item_criteria] - Item criteria of promotion
1078
841
  * @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
@@ -1081,10 +844,9 @@ const Joi = require("joi");
1081
844
  /**
1082
845
  * @typedef AppliedFreeArticles
1083
846
  * @property {string} [parent_item_identifier] - Parent item identifier for free article
1084
- * @property {number} [quantity] - Free article quantity in promotion
1085
- * @property {string} [article_id] - Unique identifier of free article
847
+ * @property {number} [quantity] - Free article quantity
848
+ * @property {string} [article_id] - Free article id
1086
849
  * @property {FreeGiftItems} [free_gift_item_details] - Free gift items details
1087
- * in promotion
1088
850
  */
1089
851
 
1090
852
  /**
@@ -1112,15 +874,15 @@ const Joi = require("joi");
1112
874
  * @property {boolean} [mrp_promotion] - If applied promotion is applied on
1113
875
  * product MRP or ESP
1114
876
  * @property {string} [promotion_group] - Promotion group for the promotion
1115
- * @property {string} [promo_id] - Promotion unique identifier
877
+ * @property {string} [promo_id] - Promotion id
1116
878
  * @property {Object} [meta] - Meta object for extra data
1117
- * @property {string} [code] - Promotion unique code
879
+ * @property {string} [code] - Promotion code
1118
880
  */
1119
881
 
1120
882
  /**
1121
883
  * @typedef PromiseFormatted
1122
- * @property {string} [max] - Maximum Delivery promise formatted timestamp
1123
- * @property {string} [min] - Minimum Delivery promise formatted timestamp
884
+ * @property {string} [max]
885
+ * @property {string} [min]
1124
886
  */
1125
887
 
1126
888
  /**
@@ -1131,8 +893,8 @@ const Joi = require("joi");
1131
893
 
1132
894
  /**
1133
895
  * @typedef PromiseTimestamp
1134
- * @property {number} [max] - Maximum Promise for the shipment
1135
- * @property {number} [min] - Minimum delivery promise time for the shipment
896
+ * @property {number} [max]
897
+ * @property {number} [min]
1136
898
  */
1137
899
 
1138
900
  /**
@@ -1144,23 +906,19 @@ const Joi = require("joi");
1144
906
 
1145
907
  /**
1146
908
  * @typedef CouponDetails
1147
- * @property {number} [discount_total_quantity] - Total discount earned from
1148
- * coupon applied to cart
1149
- * @property {number} [discount_single_quantity] - Discout amount applied from
1150
- * coupon for single quantity of the product
1151
- * @property {string} [code] - Coupon code of the coupon applied
909
+ * @property {number} [discount_total_quantity]
910
+ * @property {number} [discount_single_quantity]
911
+ * @property {string} [code]
1152
912
  */
1153
913
 
1154
914
  /**
1155
915
  * @typedef ProductPrice
1156
- * @property {number} [marked] - Maximum price of the product
1157
- * @property {number} [add_on] - Price before promotion and coupon amount
1158
- * applied for calculation
1159
- * @property {string} [currency_code] - Currency code of the price defined for the product
1160
- * @property {string} [currency_symbol] - Currency symbol of the price defined
1161
- * for the product
1162
- * @property {number} [effective] - Selling price of the product
1163
- * @property {number} [selling] - Selling price of the product
916
+ * @property {number} [marked]
917
+ * @property {number} [add_on]
918
+ * @property {string} [currency_code]
919
+ * @property {string} [currency_symbol]
920
+ * @property {number} [effective]
921
+ * @property {number} [selling]
1164
922
  */
1165
923
 
1166
924
  /**
@@ -1176,259 +934,226 @@ const Joi = require("joi");
1176
934
 
1177
935
  /**
1178
936
  * @typedef ProductAvailabilitySize
1179
- * @property {string} [display] - Display size of the product
1180
- * @property {string} [value] - Actual value of the size
1181
- * @property {boolean} [is_available] - Available flag for the size of the
1182
- * product if that is available
937
+ * @property {string} [display]
938
+ * @property {string} [value]
939
+ * @property {boolean} [is_available]
1183
940
  */
1184
941
 
1185
942
  /**
1186
943
  * @typedef ProductAvailability
1187
- * @property {boolean} [is_valid] - Valid flag for the product if the product
1188
- * added in cart is valid to place the order
1189
- * @property {number} [other_store_quantity] - Quantity of the product available
1190
- * on other store
1191
- * @property {boolean} [deliverable] - Deliverable flag denotes if the product
1192
- * is deliverable or not
1193
- * @property {ProductAvailabilitySize[]} [available_sizes] - Product sizes availability
1194
- * @property {boolean} [out_of_stock] - Denotes if the product is available in stock
1195
- * @property {string[]} [sizes] - All sizes of the product
944
+ * @property {boolean} [is_valid]
945
+ * @property {number} [other_store_quantity]
946
+ * @property {boolean} [deliverable]
947
+ * @property {ProductAvailabilitySize[]} [available_sizes]
948
+ * @property {boolean} [out_of_stock]
949
+ * @property {string[]} [sizes]
1196
950
  */
1197
951
 
1198
952
  /**
1199
953
  * @typedef PromoMeta
1200
- * @property {string} [message] - Loyalty points message denotes how much
1201
- * loyalty points and applied and how much left with the user
954
+ * @property {string} [message]
1202
955
  */
1203
956
 
1204
957
  /**
1205
958
  * @typedef CartProductInfo
1206
- * @property {number} [quantity] - Quantity of the product added in cart
959
+ * @property {number} [quantity]
1207
960
  * @property {CartProduct} [product]
1208
- * @property {string} [product_ean_id] - European Article Number of the product
1209
- * (limited upto 50 EAN identifier in a single request)
1210
- * @property {Object} [parent_item_identifiers] - Parent item information of the
1211
- * product which identifies the parent of the product in cart
1212
- * @property {boolean} [is_set] - Whether or not the product is a set of items
961
+ * @property {string} [product_ean_id]
962
+ * @property {Object} [parent_item_identifiers]
963
+ * @property {boolean} [is_set]
1213
964
  * @property {ProductArticle} [article]
1214
- * @property {AppliedPromotion[]} [promotions_applied] - List of applicable
1215
- * promotion for the product in cart
965
+ * @property {AppliedPromotion[]} [promotions_applied]
1216
966
  * @property {ShipmentPromise} [delivery_promise]
1217
- * @property {string} [key] - The attribute key associated with the size
967
+ * @property {string} [key]
1218
968
  * @property {CouponDetails} [coupon]
1219
- * @property {Object} [bulk_offer] - Bulk offer information for the product
1220
- * which denotes if any bulk offer is applied to the product in cart
969
+ * @property {Object} [bulk_offer]
1221
970
  * @property {ProductPriceInfo} [price]
1222
- * @property {string} [coupon_message] - Message for the coupon denotes which
1223
- * coupon is applied and empty if not applied
971
+ * @property {string} [coupon_message]
1224
972
  * @property {CartProductIdentifer} identifiers
1225
- * @property {string} [message] - Product level message which denotes error
1226
- * information to display over the product in cart
1227
- * @property {string} [discount] - Discount amount of the product in cart
973
+ * @property {string} [message]
974
+ * @property {string} [discount]
1228
975
  * @property {ProductAvailability} [availability]
1229
- * @property {Object} [moq] - An Integer indication the Minimum Order Quantity
1230
- * of a product, e.g. 100.
976
+ * @property {Object} [moq]
1231
977
  * @property {ProductPriceInfo} [price_per_unit]
1232
978
  * @property {PromoMeta} [promo_meta]
1233
- * @property {Object} [custom_order] - Whether MTO (Make to Order) is enabled or not.
979
+ * @property {Object} [custom_order]
1234
980
  */
1235
981
 
1236
982
  /**
1237
- * @typedef OpenapiCartDetailsResult
1238
- * @property {boolean} [is_valid] - Cart validity flag determines the if the
1239
- * response is valid or not
1240
- * @property {string} [message] - Message of the cart Open API cart detail response
983
+ * @typedef OpenapiCartDetailsResponse
984
+ * @property {boolean} [is_valid]
985
+ * @property {string} [message]
1241
986
  * @property {CartBreakup} [breakup_values]
1242
- * @property {CartProductInfo[]} [items] - Items details in cart
987
+ * @property {CartProductInfo[]} [items]
1243
988
  */
1244
989
 
1245
990
  /**
1246
- * @typedef OpenApiErrorResult
1247
- * @property {boolean} [success] - Success flag for cart detail open api response
1248
- * @property {string} [message] - Error message of the Open API cart detail response
991
+ * @typedef OpenApiErrorResponse
992
+ * @property {boolean} [success]
993
+ * @property {string} [message]
1249
994
  * @property {Object} [errors] - Contains field name which has error as key and
1250
995
  * error message as value
1251
996
  */
1252
997
 
1253
998
  /**
1254
999
  * @typedef ShippingAddress
1255
- * @property {string} [country] - Country of address
1256
- * @property {string} [state] - State of the address
1257
- * @property {string} [city] - City of the address
1258
- * @property {number} [phone] - Phone number for address
1259
- * @property {string} area_code - Area code of the address
1260
- * @property {string} [country_iso_code] - Country iso code for address
1261
- * @property {string} [country_phone_code] - Country phone code for address
1262
- * @property {Object} [meta] - Metadata of the address
1263
- * @property {string} [address_type] - Address type of address
1264
- * @property {string} [area] - Area description for address
1265
- * @property {string} [area_code_slug] - Area code slug for address. example
1266
- * pincode is slug for India
1267
- * @property {string} [name] - Name of person in address data to whom it belongs to
1268
- * @property {string} [landmark] - Landmark of address
1269
- * @property {string} [email] - Email address for address data
1270
- * @property {string} [country_code] - Country code of address
1271
- * @property {number} [pincode] - Pincode for address data
1272
- * @property {string} [address] - Address description for address data
1273
- */
1274
-
1275
- /**
1276
- * @typedef OpenApiCartServiceabilityCreation
1277
- * @property {CartItem[]} cart_items - List of items in open api cart response
1000
+ * @property {string} [country]
1001
+ * @property {string} [state]
1002
+ * @property {string} [city]
1003
+ * @property {number} [phone]
1004
+ * @property {string} area_code
1005
+ * @property {string} [country_iso_code]
1006
+ * @property {string} [country_phone_code]
1007
+ * @property {Object} [meta]
1008
+ * @property {string} [address_type]
1009
+ * @property {string} [area]
1010
+ * @property {string} [area_code_slug]
1011
+ * @property {string} [name]
1012
+ * @property {string} [landmark]
1013
+ * @property {string} [email]
1014
+ * @property {string} [country_code]
1015
+ * @property {number} [pincode]
1016
+ * @property {string} [address]
1017
+ */
1018
+
1019
+ /**
1020
+ * @typedef OpenApiCartServiceabilityRequest
1021
+ * @property {CartItem[]} cart_items
1278
1022
  * @property {ShippingAddress} shipping_address
1279
1023
  */
1280
1024
 
1281
1025
  /**
1282
- * @typedef OpenApiCartServiceabilityResult
1283
- * @property {boolean} [is_valid] - Cart validity flag determines the if the
1284
- * response is valid or not
1285
- * @property {CartProductInfo[]} [items] - Items data list in user cart that
1286
- * includes item id, item size, store id, available sizes and rest of the item
1287
- * related data
1026
+ * @typedef OpenApiCartServiceabilityResponse
1027
+ * @property {boolean} [is_valid]
1028
+ * @property {CartProductInfo[]} [items]
1288
1029
  * @property {ShipmentPromise} [delivery_promise]
1289
- * @property {string} [message] - Message of the cart detail API response
1030
+ * @property {string} [message]
1290
1031
  * @property {CartBreakup} [breakup_values]
1291
1032
  */
1292
1033
 
1293
1034
  /**
1294
1035
  * @typedef OpenApiFiles
1295
- * @property {string} key - Key represents name of file
1296
- * @property {string[]} values - List of urls path
1036
+ * @property {string} key
1037
+ * @property {string[]} values
1297
1038
  */
1298
1039
 
1299
1040
  /**
1300
1041
  * @typedef CartItemMeta
1301
- * @property {boolean} [primary_item] - Flags indicates item is primary or not
1302
- * @property {string} [group_id] - Fields to determine group id of the product
1042
+ * @property {boolean} [primary_item]
1043
+ * @property {string} [group_id]
1303
1044
  */
1304
1045
 
1305
1046
  /**
1306
1047
  * @typedef MultiTenderPaymentMeta
1307
- * @property {string} [payment_id] - Payment gateway identifier
1308
- * @property {string} [payment_gateway] - Payment gateway used to do the payment
1309
- * @property {Object} [extra_meta] - Payment extra meta for the payment mode to
1310
- * do the payment
1311
- * @property {string} [current_status] - Current status of the payment
1312
- * @property {string} [order_id] - Payment gateway order id
1048
+ * @property {string} [payment_id]
1049
+ * @property {string} [payment_gateway]
1050
+ * @property {Object} [extra_meta]
1051
+ * @property {string} [current_status]
1052
+ * @property {string} [order_id]
1313
1053
  */
1314
1054
 
1315
1055
  /**
1316
1056
  * @typedef MultiTenderPaymentMethod
1317
- * @property {string} mode - Payment mode of payment method used to make payment
1318
- * @property {number} amount - Amount of the payment mode to be paid
1057
+ * @property {string} mode
1058
+ * @property {number} amount - Payment amount
1319
1059
  * @property {MultiTenderPaymentMeta} [meta]
1320
- * @property {string} [name] - Name of the payment mode used to make payment
1060
+ * @property {string} [name] - Payment mode name
1321
1061
  */
1322
1062
 
1323
1063
  /**
1324
1064
  * @typedef OpenApiOrderItem
1325
- * @property {number} cashback_applied - Cashback applied on user cart
1326
- * @property {number} [quantity] - Article quantity in user cart
1327
- * @property {string} size - Size of the article added in cart
1328
- * @property {number} coupon_effective_discount - Coupon discount applied on
1329
- * article in user cart
1330
- * @property {number} amount_paid - Amount needs to paid for article in cart
1331
- * @property {number} delivery_charges - Delivery charges applied on article in cart
1332
- * @property {number} price_marked - Original price of product
1333
- * @property {OpenApiFiles[]} [files] - List of file url
1065
+ * @property {number} cashback_applied
1066
+ * @property {number} [quantity]
1067
+ * @property {string} size
1068
+ * @property {number} coupon_effective_discount
1069
+ * @property {number} amount_paid
1070
+ * @property {number} delivery_charges
1071
+ * @property {number} price_marked
1072
+ * @property {OpenApiFiles[]} [files]
1334
1073
  * @property {CartItemMeta} [meta]
1335
- * @property {Object} [extra_meta] - Extra meta of the article in cart
1336
- * @property {number} product_id - Product id associated with article in cart
1337
- * @property {number} [loyalty_discount] - Loyalty points applied on cart
1338
- * @property {number} discount - Discount value applied on article in cart
1339
- * @property {number} price_effective - Current per unit price of product after
1340
- * existing deductions
1341
- * @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list
1342
- * used to make the payment
1343
- * @property {number} [employee_discount] - Employee discount value applied on
1344
- * article in cart
1345
- * @property {number} cod_charges - Cash On Delivery charges applied on article in cart
1074
+ * @property {Object} [extra_meta]
1075
+ * @property {number} product_id
1076
+ * @property {number} [loyalty_discount]
1077
+ * @property {number} discount
1078
+ * @property {number} price_effective
1079
+ * @property {MultiTenderPaymentMethod[]} payment_methods
1080
+ * @property {number} [employee_discount]
1081
+ * @property {number} cod_charges
1346
1082
  */
1347
1083
 
1348
1084
  /**
1349
1085
  * @typedef OpenApiPlatformCheckoutReq
1350
- * @property {string} [payment_mode] - Payment mode from which the payment to be
1351
- * done for the order
1352
- * @property {number} cart_value - Total amount of user cart
1353
- * @property {OpenApiOrderItem[]} cart_items - List of items in user cart
1086
+ * @property {string} [payment_mode]
1087
+ * @property {number} cart_value
1088
+ * @property {OpenApiOrderItem[]} cart_items
1354
1089
  * @property {ShippingAddress} [shipping_address]
1355
- * @property {number} [loyalty_discount] - Loyalty points applied on cart
1356
- * @property {string} [comment] - Comment message added in cart after order placed
1357
- * @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list
1358
- * used to make the payment
1359
- * @property {Object} [employee_discount] - Employee discount value applied on user cart
1360
- * @property {string} [coupon] - Coupon text of coupon applied on user cart
1361
- * @property {number} cashback_applied - Cashback applied on user cart
1362
- * @property {string} [gstin] - GSTIN number added in cart
1090
+ * @property {number} [loyalty_discount]
1091
+ * @property {string} [comment]
1092
+ * @property {MultiTenderPaymentMethod[]} payment_methods
1093
+ * @property {Object} [employee_discount]
1094
+ * @property {string} [coupon]
1095
+ * @property {number} cashback_applied
1096
+ * @property {string} [gstin]
1363
1097
  * @property {ShippingAddress} billing_address
1364
- * @property {string} coupon_code - Coupon code to be applied to cart
1365
- * @property {number} coupon_value - Value of the coupon applied to cart
1366
- * @property {number} delivery_charges - Delivery charges of the order placed
1367
- * via checkout API
1368
- * @property {string} [affiliate_order_id] - Order id generated after placing order
1369
- * @property {string} [currency_code] - Currency code for the price
1370
- * @property {string} [order_id] - Order id generated after placing order
1371
- * @property {OpenApiFiles[]} [files] - List of file url
1372
- * @property {number} cod_charges - Cash On Delivery charges of the user cart
1098
+ * @property {string} coupon_code
1099
+ * @property {number} coupon_value
1100
+ * @property {number} delivery_charges
1101
+ * @property {string} [affiliate_order_id]
1102
+ * @property {string} [currency_code]
1103
+ * @property {string} [order_id]
1104
+ * @property {OpenApiFiles[]} [files]
1105
+ * @property {number} cod_charges
1373
1106
  */
1374
1107
 
1375
1108
  /**
1376
- * @typedef OpenApiCheckoutResult
1377
- * @property {boolean} [success] - The request success is defined
1378
- * @property {string} [message] - Message of the api response
1109
+ * @typedef OpenApiCheckoutResponse
1110
+ * @property {boolean} [success]
1111
+ * @property {string} [message]
1379
1112
  * @property {string} [order_ref_id] - Order id sent in request
1380
1113
  * @property {string} order_id - Fynd order id
1381
1114
  */
1382
1115
 
1383
1116
  /**
1384
1117
  * @typedef AbandonedCart
1385
- * @property {string} expire_at - Expire details of user cart
1386
- * @property {Object} [promotion] - Promotion object details like amount, mode,
1387
- * currency and list of promotions in user cart
1388
- * @property {boolean} is_default - User cart default status
1389
- * @property {string} [comment] - Comment message to be added in user cart
1390
- * @property {Object[]} articles - List of articles in user cart
1391
- * @property {Object} [coupon] - Coupon data of user cart which denotes if
1392
- * coupon is applied, coupon code, coupon amount, coupon title and coupon message
1393
- * @property {number} [bulk_coupon_discount] - Total bulk discount amount
1394
- * applied in user cart
1395
- * @property {string} _id - Unique identifier of the user cart
1396
- * @property {Object} [fynd_credits] - Fynd credit points applied in user cart
1397
- * @property {number[]} [fc_index_map] - Flat article index in user cart
1398
- * @property {string} [order_id] - Order id generated in user cart
1399
- * @property {number} [discount] - Discount amount of the product in cart
1400
- * @property {Object} [cod_charges] - Cash On Delivery charges of the user cart
1401
- * @property {Object} [payments] - Payment object selected in user cart
1402
- * @property {string} [payment_mode] - Payment mode of the payment selected to
1403
- * do the payment
1404
- * @property {Object[]} [shipments] - Shipment details for the items in a cart,
1405
- * specific to the selected address.
1406
- * @property {Object} [pick_up_customer_details] - Customer contact details for
1407
- * customer pickup at store
1408
- * @property {number} uid - Unique Identifier of user cart
1409
- * @property {string} [checkout_mode] - Checkout mode of user cart
1410
- * @property {number} [cart_value] - Total amount of user cart
1411
- * @property {boolean} [is_archive] - Flag to indicate cart is archived or not
1412
- * @property {string} created_on - Date time format when user cart created
1413
- * @property {string} last_modified - Date time format when user cart last modified
1414
- * @property {Object} [meta] - Extra meta data of user cart
1415
- * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
1416
- * is doing fast checkout for the cart using buy now
1417
- * @property {boolean} [is_active] - Flag indicates user cart is active or not
1418
- * @property {Object} cashback - Cart level cashback data which denotes cashback
1419
- * amount and cashback message
1420
- * @property {Object[]} [payment_methods] - Payment methods list used to make the payment
1421
- * @property {string} [gstin] - GSTIN added in user cart
1422
- * @property {Object} [delivery_charges] - Delivery charges of user cart
1423
- * @property {boolean} [merge_qty] - Flag indicates cart has merged article or not
1424
- * @property {string} user_id - User Id of user cart
1425
- * @property {string} [app_id] - Application id of user cart
1426
- */
1427
-
1428
- /**
1429
- * @typedef AbandonedCartResult
1430
- * @property {AbandonedCart[]} [items] - List of items in abandon cart
1431
- * @property {Object} [result] - Define the list of items with updated status
1118
+ * @property {string} expire_at
1119
+ * @property {Object} [promotion]
1120
+ * @property {boolean} is_default
1121
+ * @property {string} [comment]
1122
+ * @property {Object[]} articles
1123
+ * @property {Object} [coupon]
1124
+ * @property {number} [bulk_coupon_discount]
1125
+ * @property {string} _id
1126
+ * @property {Object} [fynd_credits]
1127
+ * @property {number[]} [fc_index_map]
1128
+ * @property {string} [order_id]
1129
+ * @property {number} [discount]
1130
+ * @property {Object} [cod_charges]
1131
+ * @property {Object} [payments]
1132
+ * @property {string} [payment_mode]
1133
+ * @property {Object[]} [shipments]
1134
+ * @property {Object} [pick_up_customer_details]
1135
+ * @property {number} uid
1136
+ * @property {string} [checkout_mode]
1137
+ * @property {number} [cart_value]
1138
+ * @property {boolean} [is_archive]
1139
+ * @property {string} created_on
1140
+ * @property {string} last_modified
1141
+ * @property {Object} [meta]
1142
+ * @property {boolean} [buy_now]
1143
+ * @property {boolean} [is_active]
1144
+ * @property {Object} cashback
1145
+ * @property {Object[]} [payment_methods]
1146
+ * @property {string} [gstin]
1147
+ * @property {Object} [delivery_charges]
1148
+ * @property {boolean} [merge_qty]
1149
+ * @property {string} user_id
1150
+ * @property {string} [app_id]
1151
+ */
1152
+
1153
+ /**
1154
+ * @typedef AbandonedCartResponse
1155
+ * @property {AbandonedCart[]} [items]
1156
+ * @property {Object} [result]
1432
1157
  * @property {Page} [page]
1433
1158
  * @property {boolean} [success] - The request success is defined
1434
1159
  * @property {string} [message] - Message of the response
@@ -1436,54 +1161,47 @@ const Joi = require("joi");
1436
1161
 
1437
1162
  /**
1438
1163
  * @typedef PaymentSelectionLock
1439
- * @property {string} [payment_identifier] - Identifier for Payment Mode
1440
- * @property {string} [default_options] - Default Selection Payment Mode
1441
- * @property {boolean} [enabled] - Denotes if default payment selection is enable
1164
+ * @property {string} [payment_identifier]
1165
+ * @property {string} [default_options]
1166
+ * @property {boolean} [enabled]
1442
1167
  */
1443
1168
 
1444
1169
  /**
1445
1170
  * @typedef CartCurrency
1446
1171
  * @property {string} [code] - Currency code defined by ISO 4217:2015
1447
- * @property {string} [symbol] - Currency symbol for currency of user cart prices
1172
+ * @property {string} [symbol]
1448
1173
  */
1449
1174
 
1450
1175
  /**
1451
1176
  * @typedef CartDetailCoupon
1452
- * @property {number} [cashback_amount] - Fields denotes cashback amount applied to cart
1453
- * @property {string} [cashback_message_primary] - Primary cashback message for
1454
- * coupon applied to cart
1455
- * @property {string} [cashback_message_secondary] - Secondary cashback message
1456
- * for coupon applied to cart
1457
- * @property {string} [coupon_code] - Coupon code to be applied to cart
1458
- * @property {string} [coupon_description] - Coupon description of the coupon
1459
- * applied to cart
1460
- * @property {string} [coupon_id] - Unique identifier of the coupon applied to cart
1461
- * @property {string} [coupon_subtitle] - Coupon subtitle of the coupon applied to cart
1462
- * @property {string} [coupon_title] - Coupon title of the coupon applied
1463
- * @property {string} [coupon_type] - Type of the coupon applied to cart
1464
- * @property {number} [coupon_value] - Value of the coupon applied to cart
1465
- * @property {number} [discount] - Total discount earned from coupon applied to cart
1466
- * @property {boolean} [is_applied] - Flag to determine where the coupon is
1467
- * applied to cart or not
1468
- * @property {boolean} [is_valid] - Determine where the coupon applied to cart is valid
1469
- * @property {number} [maximum_discount_value] - Maximum discount value of the
1470
- * coupon applied to cart
1471
- * @property {string} [message] - Coupon message of the coupon applied to cart
1472
- * @property {number} [minimum_cart_value] - Minimum cart value of the coupon
1473
- * applied to cart
1177
+ * @property {number} [cashback_amount]
1178
+ * @property {string} [cashback_message_primary]
1179
+ * @property {string} [cashback_message_secondary]
1180
+ * @property {string} [coupon_code]
1181
+ * @property {string} [coupon_description]
1182
+ * @property {string} [coupon_id]
1183
+ * @property {string} [coupon_subtitle]
1184
+ * @property {string} [coupon_title]
1185
+ * @property {string} [coupon_type]
1186
+ * @property {number} [coupon_value]
1187
+ * @property {number} [discount]
1188
+ * @property {boolean} [is_applied]
1189
+ * @property {boolean} [is_valid]
1190
+ * @property {number} [maximum_discount_value]
1191
+ * @property {string} [message]
1192
+ * @property {number} [minimum_cart_value]
1474
1193
  */
1475
1194
 
1476
1195
  /**
1477
1196
  * @typedef ChargesThreshold
1478
- * @property {number} [charges] - Charges amount to be applied on cart
1479
- * @property {number} [threshold] - Threshold of cart value on which the charge
1480
- * should be applied
1197
+ * @property {number} [charges]
1198
+ * @property {number} [threshold]
1481
1199
  */
1482
1200
 
1483
1201
  /**
1484
1202
  * @typedef DeliveryChargesConfig
1485
- * @property {boolean} [enabled] - Delivery charge enabled for the cart or not
1486
- * @property {ChargesThreshold[]} [charges] - Charges applicable based on threshold
1203
+ * @property {boolean} [enabled]
1204
+ * @property {ChargesThreshold[]} [charges]
1487
1205
  */
1488
1206
 
1489
1207
  /**
@@ -1492,734 +1210,546 @@ const Joi = require("joi");
1492
1210
  */
1493
1211
 
1494
1212
  /**
1495
- * @typedef CartDetailResult
1496
- * @property {number} [cart_id] - Unique identifier of the user cart
1497
- * @property {string} [uid] - Unique identifier of the user cart
1498
- * @property {string} [coupon_text] - Coupon text of coupon applied on cart
1499
- * @property {string} [id] - Unique identifier of the user cart
1500
- * @property {Object} [pan_config] - Pan card config states at what condition
1501
- * user should enter the pan card
1213
+ * @typedef CartDetailResponse
1214
+ * @property {number} [cart_id]
1215
+ * @property {string} [uid]
1216
+ * @property {string} [coupon_text]
1217
+ * @property {string} [id]
1218
+ * @property {Object} [pan_config]
1502
1219
  * @property {ShipmentPromise} [delivery_promise]
1503
- * @property {string} [comment] - Comment message to be added in user cart
1504
- * @property {CartProductInfo[]} [items] - Items data list in user cart that
1505
- * includes item id, item size, store id, available sizes and rest of the item
1506
- * related data
1220
+ * @property {string} [comment]
1221
+ * @property {CartProductInfo[]} [items]
1507
1222
  * @property {PaymentSelectionLock} [payment_selection_lock]
1508
- * @property {string} [delivery_charge_info] - Delivery charge in information
1509
- * message on shipment
1223
+ * @property {string} [delivery_charge_info]
1510
1224
  * @property {CartCommonConfig} [common_config]
1511
1225
  * @property {CartDetailCoupon} [coupon]
1512
- * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
1513
- * the checkout process
1514
- * @property {string} [message] - Message of the cart detail API response
1515
- * @property {Object} [notification] - Notification object which denotes
1516
- * notification data for user cart
1517
- * @property {string} [staff_user_id] - Staff employee user id if cart is
1518
- * created by staff employee for the customer
1519
- * @property {boolean} [success] - Success flag of get cart detail API response
1226
+ * @property {boolean} [restrict_checkout]
1227
+ * @property {string} [message]
1228
+ * @property {Object} [notification]
1229
+ * @property {string} [staff_user_id]
1230
+ * @property {boolean} [success]
1520
1231
  * @property {CartBreakup} [breakup_values]
1521
- * @property {boolean} [is_valid] - Cart validity flag determines the if the
1522
- * response is valid or not
1232
+ * @property {boolean} [is_valid]
1523
1233
  * @property {CartCurrency} [currency]
1524
- * @property {string} [checkout_mode] - Checkout mode of user cart
1525
- * @property {string} [last_modified] - Last modified timestamp of cart
1526
- * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
1527
- * is doing fast checkout for the cart using buy now
1528
- * @property {string} [gstin] - GSTIN added in user cart
1529
- * @property {AppliedPromotion[]} [applied_promo_details] - List of applied
1530
- * promotions data to cart which includes promotion id, promotion name, offer
1531
- * text, description, buy rules, discount rules and promotion type
1532
- * @property {string} [pan_no] - Permanent Account Number of the user
1533
- * @property {Object} [custom_cart_meta] - Custom meta details added cart
1534
- * checkout API payload
1234
+ * @property {string} [checkout_mode]
1235
+ * @property {string} [last_modified]
1236
+ * @property {boolean} [buy_now]
1237
+ * @property {string} [gstin]
1238
+ * @property {AppliedPromotion[]} [applied_promo_details]
1239
+ * @property {string} [pan_no]
1240
+ * @property {Object} [custom_cart_meta]
1535
1241
  */
1536
1242
 
1537
1243
  /**
1538
1244
  * @typedef AddProductCart
1539
- * @property {number} [quantity] - Field to specify the product quantity that
1540
- * user wants to buy
1541
- * @property {string} [item_size] - Field to determine size of the product
1542
- * @property {number} [seller_id] - Unique identifier of the seller selected by
1543
- * the user from which user want to buy a product
1544
- * @property {Object[]} [parent_item_identifiers] - Fields to determine parent
1545
- * product of the product
1546
- * @property {string[]} [product_group_tags] - Field to specify the product
1547
- * groups of the product that the user is trying to add in cart
1548
- * @property {string} [article_id] - Unique identifier of an article
1549
- * @property {Object} [article_assignment] - Field to determine how article
1550
- * assignment should happen by article assignment level and strategy
1551
- * @property {number} [store_id] - Unique identifier of the store selected by
1552
- * the user from which user want to buy a product
1553
- * @property {string} [display] - Display field at article level
1554
- * @property {number} [item_id] - Unique identifier to identify product
1555
- * @property {Object} [extra_meta] - Extra meta data to be added at article
1556
- * level while add items to cart
1557
- * @property {Object} [_custom_json] - Field to add custom json at article level
1558
- * while add items to cart
1559
- * @property {Object} [meta] - Field to add meta data at article level
1560
- * @property {boolean} [pos] - Filed to determine whether user is making request
1561
- * from pos or not
1245
+ * @property {number} [quantity]
1246
+ * @property {string} [item_size]
1247
+ * @property {number} [seller_id]
1248
+ * @property {Object[]} [parent_item_identifiers]
1249
+ * @property {string[]} [product_group_tags]
1250
+ * @property {string} [article_id]
1251
+ * @property {Object} [article_assignment]
1252
+ * @property {number} [store_id]
1253
+ * @property {string} [display]
1254
+ * @property {number} [item_id]
1255
+ * @property {Object} [extra_meta]
1256
+ * @property {Object} [_custom_json]
1257
+ * @property {Object} [meta]
1258
+ * @property {boolean} [pos]
1562
1259
  * @property {string} [seller_identifier] - Add items using seller identifier for store os
1563
1260
  */
1564
1261
 
1565
1262
  /**
1566
- * @typedef AddCartCreation
1567
- * @property {boolean} [new_cart] - Field to create to new cart whille user adds
1568
- * item to cart
1569
- * @property {AddProductCart[]} [items] - List of items detail which need to be
1570
- * added to cart like item id, item size, and item quantity
1263
+ * @typedef AddCartRequest
1264
+ * @property {boolean} [new_cart]
1265
+ * @property {AddProductCart[]} [items]
1571
1266
  */
1572
1267
 
1573
1268
  /**
1574
- * @typedef AddCartDetailResult
1269
+ * @typedef AddCartDetailResponse
1575
1270
  * @property {boolean} [success] - True if all items are added successfully.
1576
1271
  * False if partially added or not added.
1577
- * @property {CartDetailResult} [cart]
1272
+ * @property {CartDetailResponse} [cart]
1578
1273
  * @property {boolean} [partial] - When adding multiple items check if all
1579
1274
  * added. True if only few are added.
1580
- * @property {string} [message] - Message of add cart API response
1275
+ * @property {string} [message]
1581
1276
  */
1582
1277
 
1583
1278
  /**
1584
1279
  * @typedef UpdateProductCart
1585
- * @property {number} [quantity] - Field to update the quantity of the item in cart
1586
- * @property {string} [item_size] - Field to update the size of the product in cart
1587
- * @property {Object} [parent_item_identifiers] - Field to update parent product
1588
- * of the item in cart
1589
- * @property {Object} [meta] - Field to update meta of the item in cart
1590
- * @property {Object} [extra_meta] - Field to update extra meta of the product in cart
1591
- * @property {Object} [_custom_json] - Field to update custom json of the product in cart
1592
- * @property {number} [item_id] - Item id of the product that needs to be updated
1593
- * @property {number} [item_index] - Item index determines on which index the
1594
- * product falls to be updated
1280
+ * @property {number} [quantity]
1281
+ * @property {string} [item_size]
1282
+ * @property {Object} [parent_item_identifiers]
1283
+ * @property {Object} [meta]
1284
+ * @property {Object} [extra_meta]
1285
+ * @property {Object} [_custom_json]
1286
+ * @property {number} [item_id]
1287
+ * @property {number} [item_index]
1595
1288
  * @property {CartProductIdentifer} identifiers
1596
- * @property {string} [article_id] - Article id of the product in cart
1289
+ * @property {string} [article_id]
1597
1290
  */
1598
1291
 
1599
1292
  /**
1600
- * @typedef FreeGiftItemCreation
1601
- * @property {string} promotion_id - Unique identifier of the free gift promotion.
1602
- * @property {string} item_id - Unique identifier of the selected free gift item.
1603
- * @property {string} item_size - Size of the selected free gift item.
1604
- */
1605
-
1606
- /**
1607
- * @typedef UpdateCartCreation
1293
+ * @typedef UpdateCartRequest
1608
1294
  * @property {UpdateProductCart[]} [items]
1609
- * @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift
1610
- * items with updated sizes.
1611
- * @property {string} operation - Cart opertaion type
1295
+ * @property {string} operation
1612
1296
  */
1613
1297
 
1614
1298
  /**
1615
- * @typedef UpdateCartDetailResult
1299
+ * @typedef UpdateCartDetailResponse
1616
1300
  * @property {boolean} [success] - True if all items are added successfully.
1617
1301
  * False if partially added or not added.
1618
- * @property {CartDetailResult} [cart]
1619
- * @property {string} [message] - Message of update cart API response
1302
+ * @property {CartDetailResponse} [cart]
1303
+ * @property {string} [message]
1620
1304
  */
1621
1305
 
1622
1306
  /**
1623
1307
  * @typedef OverrideCartItemPromo
1624
- * @property {string} promo_id - Promotion id applied on product
1625
- * @property {string} promo_amount - Promotion amount applied on product
1626
- * @property {string} [promo_desc] - Promotion description applied on product
1308
+ * @property {string} promo_id
1309
+ * @property {string} promo_amount
1310
+ * @property {string} [promo_desc]
1627
1311
  * @property {string} [rwrd_tndr]
1628
- * @property {Object[]} [item_list] - List of items
1629
- * @property {string} [parent_promo_id] - Parent promotion unique identifier
1312
+ * @property {Object[]} [item_list]
1313
+ * @property {string} [parent_promo_id]
1630
1314
  */
1631
1315
 
1632
1316
  /**
1633
1317
  * @typedef OverrideCartItem
1634
- * @property {string} [seller_identifier] - Seller identifiers of the product size.
1635
- * @property {number} [quantity] - Item quantity, which you have added into cart
1636
- * @property {string} size - Item size, which you have added into cart
1637
- * @property {number} price_marked - Original price of product
1638
- * @property {number} amount_paid - Amount needs to paid for item
1639
- * @property {OverrideCartItemPromo[]} [promo_list] - List of promotion applied on item
1640
- * @property {Object} [extra_meta] - Extra meta to be added while checkout in order
1641
- * @property {number} item_id - Item unique id in user cart
1642
- * @property {number} discount - Discount amount applied on item
1643
- * @property {number} price_effective - Current per unit price of product after
1644
- * existing deductions
1318
+ * @property {string} [seller_identifier]
1319
+ * @property {number} [quantity]
1320
+ * @property {string} size
1321
+ * @property {number} price_marked
1322
+ * @property {number} amount_paid
1323
+ * @property {OverrideCartItemPromo[]} [promo_list]
1324
+ * @property {Object} [extra_meta]
1325
+ * @property {number} item_id
1326
+ * @property {number} discount
1327
+ * @property {number} price_effective
1645
1328
  */
1646
1329
 
1647
1330
  /**
1648
1331
  * @typedef OverrideCheckoutReq
1649
- * @property {string} cart_id - The cart id of user cart
1650
- * @property {string} payment_mode - Payment mode from which the payment to be
1651
- * done for the order
1652
- * @property {Object} [billing_address] - Billing address json which includes
1653
- * customer address, customer phone, customer email, customer pincode,
1654
- * customer landmark and customer name
1655
- * @property {string} merchant_code - Merchant code of the payment mode selected
1656
- * to do the payment
1657
- * @property {string} payment_identifier - Payment identifier of the payment
1658
- * mode selected to do the payment
1659
- * @property {string} currency_code - Currency code for the price
1660
- * @property {string} aggregator - Aggregator name of the payment gateway
1661
- * @property {string} order_type - Order type of the order being placed like
1662
- * pickAtStore or HomeDelivery
1663
- * @property {string} [callback_url] - Callback url to be redirected after
1664
- * payment received/failed
1665
- * @property {OverrideCartItem[]} cart_items - List of items which includes
1666
- * their size, id, discount and promo details
1667
- * @property {number} [ordering_store] - Ordering store id of the store from
1668
- * which the order is getting placed
1669
- * @property {Object} [shipping_address] - Shipping address json which includes
1670
- * name, area, address, phone, area_code, state, country, country code and email
1671
- */
1672
-
1673
- /**
1674
- * @typedef OverrideCheckoutResult
1675
- * @property {Object} data - Data of the user cart checkout includes cart data,
1676
- * address, user id, order type etc
1677
- * @property {Object} cart - Cart details in API response which included cart
1678
- * id, items in cart, promise, order type, breakup values etc.
1679
- * @property {string} success - Success flag of cart override checkout API response
1680
- * @property {string} order_id - Order id generated after placing order
1681
- * @property {string} message - Message of the cart override checkout API response
1682
- */
1683
-
1684
- /**
1685
- * @typedef GetShareCartLinkCreation
1332
+ * @property {string} cart_id
1333
+ * @property {string} payment_mode
1334
+ * @property {Object} [billing_address]
1335
+ * @property {string} merchant_code
1336
+ * @property {string} payment_identifier
1337
+ * @property {string} currency_code
1338
+ * @property {string} aggregator
1339
+ * @property {string} order_type
1340
+ * @property {string} [callback_url]
1341
+ * @property {OverrideCartItem[]} cart_items
1342
+ * @property {number} [ordering_store]
1343
+ * @property {Object} [shipping_address]
1344
+ */
1345
+
1346
+ /**
1347
+ * @typedef OverrideCheckoutResponse
1348
+ * @property {Object} data
1349
+ * @property {Object} cart
1350
+ * @property {string} success
1351
+ * @property {string} order_id
1352
+ * @property {string} message
1353
+ */
1354
+
1355
+ /**
1356
+ * @typedef GetShareCartLinkRequest
1686
1357
  * @property {string} [id] - Cart uid for generating sharing
1687
1358
  * @property {Object} [meta] - Staff, Ordering store or any other data. This
1688
1359
  * data will be used to generate link as well as sent as shared details.
1689
1360
  */
1690
1361
 
1691
1362
  /**
1692
- * @typedef GetShareCartLinkResult
1693
- * @property {string} [token] - Short url unique id of the cart which is opted
1694
- * to share with other user
1695
- * @property {string} [share_url] - Short shareable final url which can populate
1696
- * shared cart items in one's cart or replaced one's cart with shared cart items
1363
+ * @typedef GetShareCartLinkResponse
1364
+ * @property {string} [token] - Short url unique id
1365
+ * @property {string} [share_url] - Short shareable final url
1697
1366
  */
1698
1367
 
1699
1368
  /**
1700
1369
  * @typedef SharedCartDetails
1701
1370
  * @property {Object} [source] - Share link device and other source information
1702
1371
  * @property {Object} [user] - User details of who generated share link
1703
- * @property {string} [token] - Short link id of the user cart that needs to be shared
1704
- * @property {string} [created_on] - Created on timestamp of user cart
1372
+ * @property {string} [token] - Short link id
1373
+ * @property {string} [created_on]
1705
1374
  * @property {Object} [meta] - Meta data sent while generating share cart link
1706
1375
  */
1707
1376
 
1708
1377
  /**
1709
1378
  * @typedef SharedCart
1710
- * @property {string} [coupon_text] - Coupon text of the applied coupon on user cart
1711
- * @property {string} [id] - Cart id of shared cart
1379
+ * @property {string} [coupon_text]
1380
+ * @property {string} [id]
1712
1381
  * @property {ShipmentPromise} [delivery_promise]
1713
- * @property {string} [comment] - Comment message added in user cart
1714
- * @property {CartProductInfo[]} [items] - Items data list in user cart that
1715
- * includes item id, item size, store id, available sizes and rest of the item
1716
- * related data
1382
+ * @property {string} [comment]
1383
+ * @property {CartProductInfo[]} [items]
1717
1384
  * @property {SharedCartDetails} [shared_cart_details]
1718
1385
  * @property {PaymentSelectionLock} [payment_selection_lock]
1719
- * @property {string} [delivery_charge_info] - Delivery charge info message of
1720
- * the user cart
1721
- * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
1722
- * the checkout process
1723
- * @property {string} [message] - Message of the get shared cart API response
1386
+ * @property {string} [delivery_charge_info]
1387
+ * @property {boolean} [restrict_checkout]
1388
+ * @property {string} [message]
1724
1389
  * @property {CartBreakup} [breakup_values]
1725
- * @property {boolean} [is_valid] - Valid flag for get shared cart detail API
1726
- * @property {string} [uid] - Cart id of the user cart
1727
- * @property {string} [checkout_mode] - Checkout mode of address on which
1728
- * address to be used for which checkout mode of cart
1390
+ * @property {boolean} [is_valid]
1391
+ * @property {string} [uid]
1392
+ * @property {string} [checkout_mode]
1729
1393
  * @property {CartCurrency} [currency]
1730
- * @property {string} [last_modified] - Last modified timestamp of user cart
1731
- * @property {boolean} [buy_now] - Buy now flag of user cart
1732
- * @property {number} [cart_id] - Cart id of user cart for generating cart sharing token
1733
- * @property {string} [gstin] - GSTIN added in user cart
1734
- * @property {Object} [custom_cart_meta] - Custom cart meta of user cart added
1735
- * via update cart meta API
1394
+ * @property {string} [last_modified]
1395
+ * @property {boolean} [buy_now]
1396
+ * @property {number} [cart_id]
1397
+ * @property {string} [gstin]
1398
+ * @property {Object} [custom_cart_meta]
1736
1399
  */
1737
1400
 
1738
1401
  /**
1739
- * @typedef SharedCartResult
1402
+ * @typedef SharedCartResponse
1740
1403
  * @property {SharedCart} [cart]
1741
- * @property {string} [error] - Error details if any error occurs which includes
1742
- * type of error, error code and error message
1404
+ * @property {string} [error]
1743
1405
  */
1744
1406
 
1745
1407
  /**
1746
1408
  * @typedef CartList
1747
- * @property {string} [cart_id] - The cart id of user
1748
- * @property {Object} [pick_up_customer_details] - Customer contact details for
1749
- * customer pickup at store
1750
- * @property {number} [cart_value] - Total amount of cart
1751
- * @property {string} [created_on] - Date format when cart created
1752
- * @property {string} [user_id] - User id which is associated with cart
1753
- * @property {string} [currency_code] - Active cart currency code
1754
- * @property {number} [item_counts] - Article total count in cart
1409
+ * @property {string} [cart_id]
1410
+ * @property {Object} [pick_up_customer_details]
1411
+ * @property {number} [cart_value]
1412
+ * @property {string} [created_on]
1413
+ * @property {string} [user_id]
1414
+ * @property {string} [currency_code]
1415
+ * @property {number} [item_counts]
1755
1416
  */
1756
1417
 
1757
1418
  /**
1758
- * @typedef MultiCartResult
1759
- * @property {boolean} [success] - True if get list of cart successfully.
1760
- * @property {CartList[]} [data] - List of active carts and their item's count
1419
+ * @typedef MultiCartResponse
1420
+ * @property {boolean} [success]
1421
+ * @property {CartList[]} [data]
1761
1422
  */
1762
1423
 
1763
1424
  /**
1764
1425
  * @typedef UpdateUserCartMapping
1765
- * @property {string} user_id - User Id of user for which we map with the cart
1426
+ * @property {string} user_id
1766
1427
  */
1767
1428
 
1768
1429
  /**
1769
1430
  * @typedef UserInfo
1770
- * @property {string} [gender] - User gender
1771
- * @property {string} [modified_on] - Date format of user when user last modified
1772
- * @property {string} [_id] - Unique Identifier of user
1773
- * @property {string} [uid] - Unique UID of user
1774
- * @property {string} [external_id] - Unique external id
1775
- * @property {string} [mobile] - 10 digit Mobile number of user
1776
- * @property {string} [last_name] - Last name of user
1777
- * @property {string} [created_at] - Date format of user when user registered
1778
- * @property {string} [first_name] - First name of user
1431
+ * @property {string} [gender]
1432
+ * @property {string} [modified_on]
1433
+ * @property {string} [_id]
1434
+ * @property {string} [uid]
1435
+ * @property {string} [external_id]
1436
+ * @property {string} [mobile]
1437
+ * @property {string} [last_name]
1438
+ * @property {string} [created_at]
1439
+ * @property {string} [first_name]
1779
1440
  */
1780
1441
 
1781
1442
  /**
1782
- * @typedef UserCartMappingResult
1783
- * @property {string} [coupon_text] - Coupon text of coupon applied on cart
1443
+ * @typedef UserCartMappingResponse
1444
+ * @property {string} [coupon_text]
1784
1445
  * @property {UserInfo} [user]
1785
- * @property {string} [id] - Unique identifier of the user cart
1786
- * @property {Object} [pan_config] - Pan card config states at what condition
1787
- * user should enter the pan card
1446
+ * @property {string} [id]
1447
+ * @property {Object} [pan_config]
1788
1448
  * @property {ShipmentPromise} [delivery_promise]
1789
- * @property {string} [comment] - Comment message to be added in user cart
1790
- * @property {CartProductInfo[]} [items] - Items data list in user cart that
1791
- * includes item id, item size, store id, available sizes and rest of the item
1792
- * related data
1449
+ * @property {string} [comment]
1450
+ * @property {CartProductInfo[]} [items]
1793
1451
  * @property {PaymentSelectionLock} [payment_selection_lock]
1794
- * @property {string} [delivery_charge_info] - Delivery charge in information
1795
- * message on shipment
1796
- * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
1797
- * the checkout process
1798
- * @property {string} [message] - Message of the get cart detail API response
1452
+ * @property {string} [delivery_charge_info]
1453
+ * @property {boolean} [restrict_checkout]
1454
+ * @property {string} [message]
1799
1455
  * @property {CartBreakup} [breakup_values]
1800
- * @property {boolean} [is_valid] - Cart validity flag determines the if the
1801
- * response is valid or not
1456
+ * @property {boolean} [is_valid]
1802
1457
  * @property {CartCurrency} [currency]
1803
- * @property {string} [checkout_mode] - Checkout mode of user cart
1804
- * @property {string} [last_modified] - Last modified timestamp of cart
1805
- * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user
1806
- * is doing fast checkout for the cart using buy now
1807
- * @property {string} [gstin] - GSTIN added in user cart
1808
- * @property {Object} [custom_cart_meta] - Custom meta details added cart
1809
- * checkout API payload
1810
- * @property {AppliedPromotion[]} [applied_promo_details] - List of applied
1811
- * promotions data to cart which includes promotion id, promotion name, offer
1812
- * text, description, buy rules, discount rules and promotion type
1813
- * @property {string} [pan_no] - Permanent Account Number of the user
1458
+ * @property {string} [checkout_mode]
1459
+ * @property {string} [last_modified]
1460
+ * @property {boolean} [buy_now]
1461
+ * @property {string} [gstin]
1462
+ * @property {Object} [custom_cart_meta]
1463
+ * @property {AppliedPromotion[]} [applied_promo_details]
1464
+ * @property {string} [pan_no]
1814
1465
  */
1815
1466
 
1816
1467
  /**
1817
- * @typedef PlatformAddCartDetails
1818
- * @property {string} [user_id] - The user id of user, for which we need to add
1819
- * item into cart
1820
- * @property {boolean} [new_cart] - Field to create to new cart whille user adds
1821
- * item to cart
1822
- * @property {AddProductCart[]} [items] - List of items detail which need to be
1823
- * added to cart like item id, item size, and item quantity
1468
+ * @typedef PlatformAddCartRequest
1469
+ * @property {string} [user_id]
1470
+ * @property {boolean} [new_cart]
1471
+ * @property {AddProductCart[]} [items]
1824
1472
  */
1825
1473
 
1826
1474
  /**
1827
- * @typedef PlatformUpdateCartDetails
1828
- * @property {string} [user_id] - The user id of user, for which we need to
1829
- * update the cart
1830
- * @property {UpdateProductCart[]} [items] - List items data that needs to be
1831
- * updated in cart
1832
- * @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift
1833
- * items with updated sizes.
1834
- * @property {string} operation - Field to determine if item to be removed from
1835
- * cart or it needs to be updated
1475
+ * @typedef PlatformUpdateCartRequest
1476
+ * @property {string} [user_id]
1477
+ * @property {UpdateProductCart[]} [items]
1478
+ * @property {string} operation
1836
1479
  */
1837
1480
 
1838
1481
  /**
1839
- * @typedef DeleteCartDetails
1840
- * @property {string[]} [cart_id_list] - List of all cart ids, which need to delete
1482
+ * @typedef DeleteCartRequest
1483
+ * @property {string[]} [cart_id_list]
1841
1484
  */
1842
1485
 
1843
1486
  /**
1844
- * @typedef DeleteCartDetailResult
1487
+ * @typedef DeleteCartDetailResponse
1845
1488
  * @property {boolean} [success] - True if cart is archived successfully. False
1846
1489
  * if not archived.
1847
- * @property {string} [message] - Message for delete cart response
1490
+ * @property {string} [message]
1848
1491
  */
1849
1492
 
1850
1493
  /**
1851
- * @typedef CartItemCountResult
1494
+ * @typedef CartItemCountResponse
1852
1495
  * @property {number} [user_cart_items_count] - Item count present in cart
1853
1496
  */
1854
1497
 
1855
1498
  /**
1856
1499
  * @typedef Coupon
1857
- * @property {string} [title] - Coupon Title of the coupon applied denotes name
1858
- * of the coupon
1859
- * @property {number} [max_discount_value] - Maximum discount value of the
1860
- * coupon applied to cart
1861
- * @property {string} [coupon_code] - Coupon code of the coupon applied on cart
1862
- * @property {boolean} [is_applied] - Flag to determine where the coupon is
1863
- * applied to cart or not
1864
- * @property {string} [coupon_type] - Type of the coupon applied to cart
1865
- * @property {string} [expires_on] - Message to display to user for expiry of the coupon
1866
- * @property {number} [coupon_value] - Coupon value of the coupon applied to cart
1867
- * @property {string} [sub_title] - Coupon subtitle of the coupon applied to
1868
- * cart which is used to display
1869
- * @property {number} [minimum_cart_value] - Minimum cart value of the coupon
1870
- * applied to cart
1871
- * @property {boolean} [is_applicable] - Flag to determine where the coupon is
1872
- * applicable to cart or not
1873
- * @property {string} [message] - Coupon message of the coupon applied to cart
1874
- * @property {string} [description] - Coupon description of the coupon applied to cart
1875
- * @property {string} [start_date] - Start date of the coupon when the coupon
1876
- * will be live for the users to apply on cart
1877
- * @property {string} [end_date] - End date of the coupon on which the coupon expires
1878
- * @property {string} [coupon_applicable_message] - Message which is used to
1879
- * display to the customer if the coupon is applied successfully
1500
+ * @property {string} [title]
1501
+ * @property {number} [max_discount_value]
1502
+ * @property {string} [coupon_code]
1503
+ * @property {boolean} [is_applied]
1504
+ * @property {string} [coupon_type]
1505
+ * @property {string} [expires_on]
1506
+ * @property {number} [coupon_value]
1507
+ * @property {string} [sub_title]
1508
+ * @property {number} [minimum_cart_value]
1509
+ * @property {boolean} [is_applicable]
1510
+ * @property {string} [message]
1511
+ * @property {string} [description]
1512
+ * @property {string} [start_date]
1513
+ * @property {string} [end_date]
1514
+ * @property {string} [coupon_applicable_message]
1880
1515
  */
1881
1516
 
1882
1517
  /**
1883
1518
  * @typedef PageCoupon
1884
- * @property {boolean} [has_next] - Denotes if next page of coupon is available
1885
- * @property {number} [current] - Current page number
1886
- * @property {number} [total] - Total pages of coupon availalbe
1887
- * @property {number} [total_item_count] - Total coupons are available for the cart
1888
- * @property {boolean} [has_previous] - Denotes if previous page of the coupon
1889
- * is available
1519
+ * @property {boolean} [has_next]
1520
+ * @property {number} [current]
1521
+ * @property {number} [total]
1522
+ * @property {number} [total_item_count]
1523
+ * @property {boolean} [has_previous]
1890
1524
  */
1891
1525
 
1892
1526
  /**
1893
- * @typedef GetCouponResult
1894
- * @property {Coupon[]} [available_coupon_list] - List of available coupon which
1895
- * can be applied on cart
1527
+ * @typedef GetCouponResponse
1528
+ * @property {Coupon[]} [available_coupon_list]
1896
1529
  * @property {PageCoupon} [page]
1897
1530
  */
1898
1531
 
1899
1532
  /**
1900
- * @typedef ApplyCouponDetails
1533
+ * @typedef ApplyCouponRequest
1901
1534
  * @property {string} coupon_code - Coupon code to be applied
1902
1535
  */
1903
1536
 
1904
1537
  /**
1905
1538
  * @typedef GeoLocation
1906
- * @property {number} [longitude] - Longitude coordinate for address
1907
- * @property {number} [latitude] - Latitude coordinate for address
1539
+ * @property {number} [longitude]
1540
+ * @property {number} [latitude]
1908
1541
  */
1909
1542
 
1910
1543
  /**
1911
1544
  * @typedef PlatformAddress
1912
- * @property {string} [phone] - Phone number for address
1913
- * @property {string} [id] - Id of the address
1914
- * @property {string} [area_code_slug] - Area code slug for address. example
1915
- * pincode is slug for India
1916
- * @property {string} [country_code] - Country code of address
1545
+ * @property {string} [phone]
1546
+ * @property {string} [id]
1547
+ * @property {string} [area_code_slug]
1548
+ * @property {string} [country_code]
1917
1549
  * @property {GeoLocation} [geo_location]
1918
- * @property {string} [country] - Country of address
1919
- * @property {string} [state] - State of the address
1920
- * @property {boolean} [is_default_address] - Default address flag if no address
1921
- * selected then this should be the default address selected
1922
- * @property {string[]} [tags] - Tags of address from which it can be identified
1923
- * @property {string} [created_by_user_id] - Created by user id of address
1924
- * @property {string} [landmark] - Landmark of address
1925
- * @property {string} [email] - Email address for address data
1926
- * @property {string} [area_code] - Area code of the address
1927
- * @property {string} [checkout_mode] - Checkout mode of address on which
1928
- * address to be used for which checkout mode of cart
1929
- * @property {Object} [meta] - Metadata of the address
1930
- * @property {boolean} [is_active] - States whether address is active or not
1931
- * @property {string} [name] - Name of person in address data to whom it belongs to
1932
- * @property {Object} [google_map_point] - Google map point of the address
1933
- * @property {string} [cart_id] - The cart id of user cart
1934
- * @property {string} [city] - City of the address
1935
- * @property {string} [sector] - Sector of the address
1550
+ * @property {string} [country]
1551
+ * @property {string} [state]
1552
+ * @property {boolean} [is_default_address]
1553
+ * @property {string[]} [tags]
1554
+ * @property {string} [created_by_user_id]
1555
+ * @property {string} [landmark]
1556
+ * @property {string} [email]
1557
+ * @property {string} [area_code]
1558
+ * @property {string} [checkout_mode]
1559
+ * @property {Object} [meta]
1560
+ * @property {boolean} [is_active]
1561
+ * @property {string} [name]
1562
+ * @property {Object} [google_map_point]
1563
+ * @property {string} [cart_id]
1564
+ * @property {string} [city]
1565
+ * @property {string} [sector]
1936
1566
  * @property {string} [state_code] - State code for international address
1937
- * @property {string} [area] - Area description for address
1938
- * @property {string} [user_id] - User id of address for which address is created
1939
- * @property {string} [address_type] - Address type of address
1940
- * @property {string} [address] - Address description for address data
1941
- * @property {string} [country_phone_code] - Country phone code for address
1942
- * @property {string} [country_iso_code] - Country iso code for address
1943
- * @property {Object} [_custom_json] - Custom json of the address
1567
+ * @property {string} [area]
1568
+ * @property {string} [user_id]
1569
+ * @property {string} [address_type]
1570
+ * @property {string} [address]
1571
+ * @property {string} [country_phone_code]
1572
+ * @property {string} [country_iso_code]
1573
+ * @property {Object} [_custom_json]
1944
1574
  */
1945
1575
 
1946
1576
  /**
1947
- * @typedef ValidationConfig
1948
- * @property {number} address_max_limit - The maximum number of addresses a user can have.
1949
- * @property {number} user_address_count - The total number of addresses saved by a user.
1577
+ * @typedef PlatformGetAddressesResponse
1578
+ * @property {PlatformAddress[]} [address]
1950
1579
  */
1951
1580
 
1952
1581
  /**
1953
- * @typedef PlatformGetAddressesDetails
1954
- * @property {PlatformAddress[]} [address] - List of all address saved by customer
1955
- * @property {ValidationConfig} [validation_config]
1582
+ * @typedef SaveAddressResponse
1583
+ * @property {string} [id]
1584
+ * @property {boolean} [success]
1585
+ * @property {boolean} [is_default_address]
1956
1586
  */
1957
1587
 
1958
1588
  /**
1959
- * @typedef SaveAddressDetails
1960
- * @property {string} [id] - Id of the address
1961
- * @property {boolean} [success] - Success flag of save address Response
1962
- * @property {boolean} [is_default_address] - Default address flag if no address
1963
- * selected then this should be the default address selected
1589
+ * @typedef UpdateAddressResponse
1590
+ * @property {string} [id]
1591
+ * @property {boolean} [is_default_address]
1592
+ * @property {boolean} [success]
1593
+ * @property {boolean} [is_updated]
1964
1594
  */
1965
1595
 
1966
1596
  /**
1967
- * @typedef UpdateAddressDetails
1968
- * @property {string} [id] - ID of an address
1969
- * @property {boolean} [is_default_address] - Default address flag if no address
1970
- * selected then this should be the default address selected
1971
- * @property {boolean} [success] - Success flag of update address response
1972
- * @property {boolean} [is_updated] - Updated flag for update address operation
1973
- * if the address updated or not
1597
+ * @typedef DeleteAddressResponse
1598
+ * @property {string} [id]
1599
+ * @property {boolean} [is_deleted]
1974
1600
  */
1975
1601
 
1976
1602
  /**
1977
- * @typedef DeleteAddressResult
1978
- * @property {string} [id] - Id of the address
1979
- * @property {boolean} [is_deleted] - Deleted flag in delete address response
1980
- * states whether the address was deleted or not
1603
+ * @typedef PlatformSelectCartAddressRequest
1604
+ * @property {string} [cart_id]
1605
+ * @property {string} [billing_address_id]
1606
+ * @property {string} [checkout_mode]
1607
+ * @property {string} [id]
1608
+ * @property {string} [user_id]
1981
1609
  */
1982
1610
 
1983
1611
  /**
1984
- * @typedef PlatformSelectCartAddress
1985
- * @property {string} [cart_id] - Cart id of the user cart for which the select
1986
- * address operation performed
1987
- * @property {string} [billing_address_id] - Billing address id selected by user
1988
- * on which shipment bill to be generated
1989
- * @property {string} [checkout_mode] - The checkout mode in cart
1990
- * @property {string} [id] - Address is selected by user on which shipment to be delivered
1991
- * @property {string} [user_id] - Unique Identifier of user
1612
+ * @typedef ShipmentArticle
1613
+ * @property {string} [meta]
1614
+ * @property {string} [quantity]
1615
+ * @property {string} [article_id]
1992
1616
  */
1993
1617
 
1994
1618
  /**
1995
- * @typedef ShipmentArticle
1996
- * @property {string} [meta] - Article meta data for shipment
1997
- * @property {string} [quantity] - Article quantity for shipment
1998
- * @property {string} [article_id] - Article unique id for shipment
1999
- */
2000
-
2001
- /**
2002
- * @typedef PlatformShipmentDetails
2003
- * @property {number} [shipments] - Count of shipments that will be shipped
2004
- * @property {number} [fulfillment_id] - Fulfilment id of the shipment
2005
- * @property {CartProductInfo[]} [items] - Item details in the shipment
2006
- * @property {Object} [dp_options] - Delivery partner options that are available
2007
- * to deliver the shipment
2008
- * @property {string} [shipment_type] - Shipment type of the shipment returned
2009
- * in get shipments API like single_shipment or multiple shipment. Single
2010
- * Shipment means 1 item in 1 shipment and vice versa in the other one
2011
- * @property {string} [order_type] - Order type of the shipment like pickAtStore
2012
- * or HomeDelivery
2013
- * @property {string} [box_type] - Box type of the shipment in which the
2014
- * shipment will be delivered
1619
+ * @typedef PlatformShipmentResponse
1620
+ * @property {number} [shipments]
1621
+ * @property {number} [fulfillment_id]
1622
+ * @property {CartProductInfo[]} [items]
1623
+ * @property {Object} [dp_options]
1624
+ * @property {string} [shipment_type]
1625
+ * @property {string} [order_type]
1626
+ * @property {string} [box_type]
2015
1627
  * @property {ShipmentPromise} [promise]
2016
- * @property {string} [dp_id] - Delivery partner id of the shipment
2017
- * @property {string} [fulfillment_type] - Fulfilment type of shipment
2018
- * @property {ShipmentArticle[]} [articles] - List of articles in shipment
1628
+ * @property {string} [dp_id]
1629
+ * @property {string} [fulfillment_type]
1630
+ * @property {ShipmentArticle[]} [articles]
2019
1631
  */
2020
1632
 
2021
1633
  /**
2022
- * @typedef PlatformCartShipmentsResult
2023
- * @property {string} [coupon_text] - Coupon text of coupon applied on cart
2024
- * @property {string} [id] - Cart id of the user cart
2025
- * @property {Object} [pan_config] - Pan card config states at what condition
2026
- * user should enter the pan card
1634
+ * @typedef PlatformCartShipmentsResponse
1635
+ * @property {string} [coupon_text]
1636
+ * @property {string} [id]
1637
+ * @property {Object} [pan_config]
2027
1638
  * @property {ShipmentPromise} [delivery_promise]
2028
- * @property {string} [comment] - Comment message added in cart
2029
- * @property {CartProductInfo[]} [items] - List of items in cart
1639
+ * @property {string} [comment]
1640
+ * @property {CartProductInfo[]} [items]
2030
1641
  * @property {PaymentSelectionLock} [payment_selection_lock]
2031
- * @property {string} [delivery_charge_info] - Delivery charge in information
2032
- * message on shipment
2033
- * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
2034
- * the checkout process
2035
- * @property {string} [message] - Response message of get shipments API
1642
+ * @property {string} [delivery_charge_info]
1643
+ * @property {boolean} [restrict_checkout]
1644
+ * @property {string} [message]
2036
1645
  * @property {CartBreakup} [breakup_values]
2037
- * @property {string} [staff_user_id] - Staff employee user id if cart is
2038
- * created by staff employee for the customer
2039
- * @property {boolean} [is_valid] - Cart validity flag determines the if the
2040
- * response is valid or not
2041
- * @property {PlatformShipmentDetails[]} [shipments] - List of shipments that
2042
- * will be shipped
1646
+ * @property {string} [staff_user_id]
1647
+ * @property {boolean} [is_valid]
1648
+ * @property {PlatformShipmentResponse[]} [shipments]
2043
1649
  * @property {CartCurrency} [currency]
2044
- * @property {string} [checkout_mode] - Checkout mode of cart
2045
- * @property {string} [last_modified] - Last modified timestamp of cart
2046
- * @property {boolean} [buy_now] - Buy now flag of user cart
2047
- * @property {string} [gstin] - GSTIN number added in cart
2048
- * @property {AppliedPromotion[]} [applied_promo_details] - List of applied
2049
- * promotions data to cart which includes promotion id, promotion name, offer
2050
- * text, description, buy rules, discount rules and promotion type
2051
- * @property {boolean} [error] - Error details if any error occurs which
2052
- * includes type of error, error code and error message
2053
- * @property {string} [pan_no] - Permanent Account Number of the user
2054
- * @property {Object} [custom_cart_meta] - Custom cart meta details added in cart
1650
+ * @property {string} [checkout_mode]
1651
+ * @property {string} [last_modified]
1652
+ * @property {boolean} [buy_now]
1653
+ * @property {string} [gstin]
1654
+ * @property {AppliedPromotion[]} [applied_promo_details]
1655
+ * @property {boolean} [error]
1656
+ * @property {string} [pan_no]
1657
+ * @property {Object} [custom_cart_meta]
2055
1658
  */
2056
1659
 
2057
1660
  /**
2058
1661
  * @typedef UpdateCartShipmentItem
2059
1662
  * @property {number} [quantity] - Quantity of product in shipment
2060
1663
  * @property {string} shipment_type - Shipment delivery type
2061
- * @property {string} article_uid - Article unique id for shipment
1664
+ * @property {string} article_uid - Article mongo id
2062
1665
  */
2063
1666
 
2064
1667
  /**
2065
- * @typedef UpdateCartShipmentCreation
2066
- * @property {UpdateCartShipmentItem[]} shipments - List of Shipments which
2067
- * includes shipment data like shipment items, shipment promise, Shipment
2068
- * type, shipment order type, shipment dp options etc
1668
+ * @typedef UpdateCartShipmentRequest
1669
+ * @property {UpdateCartShipmentItem[]} shipments
2069
1670
  */
2070
1671
 
2071
1672
  /**
2072
- * @typedef PlatformCartMetaCreation
2073
- * @property {string} [gstin] - GSTIN number to be added in user cart
1673
+ * @typedef PlatformCartMetaRequest
1674
+ * @property {string} [gstin]
2074
1675
  * @property {Object} [pick_up_customer_details] - Customer contact details for
2075
1676
  * customer pickup at store
2076
- * @property {string} [checkout_mode] - Checkout mode of user cart
2077
- * @property {Object} [gift_details] - Gift details is open json which can
2078
- * include gift message
2079
- * @property {string} [pan_no] - Permanent Account Number of the user
2080
- * @property {string} [comment] - Comment message to be added in user cart
1677
+ * @property {string} [checkout_mode]
1678
+ * @property {Object} [gift_details]
1679
+ * @property {string} [pan_no]
1680
+ * @property {string} [comment]
2081
1681
  * @property {string} [staff_user_id] - Staff user id
2082
1682
  */
2083
1683
 
2084
1684
  /**
2085
- * @typedef CartMetaDetails
2086
- * @property {boolean} [is_valid] - Whether added meta was vaild
2087
- * @property {string} [message] - Detailed message that used to display
1685
+ * @typedef CartMetaResponse
1686
+ * @property {boolean} [is_valid]
1687
+ * @property {string} [message]
2088
1688
  */
2089
1689
 
2090
1690
  /**
2091
- * @typedef CartMetaMissingDetails
2092
- * @property {string[]} [errors] - Detailed errors for invalid cart meta request
1691
+ * @typedef CartMetaMissingResponse
1692
+ * @property {string[]} [errors]
2093
1693
  */
2094
1694
 
2095
1695
  /**
2096
1696
  * @typedef StaffCheckout
2097
- * @property {string} [employee_code] - Employee code of staff who does checkout
2098
- * on behalf of customer
2099
- * @property {string} _id - Id of staff who does checkout on behalf of customer
2100
- * @property {string} user - User id of the employee who does checkout on behalf
2101
- * of customer
2102
- * @property {string} last_name - Last name of staff employee who does checkout
2103
- * on behalf of customer
2104
- * @property {string} first_name - First name of staff emplyee who does checkout
2105
- * on behalf of customer
1697
+ * @property {string} [employee_code]
1698
+ * @property {string} _id
1699
+ * @property {string} user
1700
+ * @property {string} last_name
1701
+ * @property {string} first_name
2106
1702
  */
2107
1703
 
2108
1704
  /**
2109
1705
  * @typedef CustomerDetails
2110
- * @property {string} [name] - Name of customer to be added in customer detail
2111
- * while checkout
2112
- * @property {string} [email] - Email address of the customer to be added in
2113
- * customer detail while checkout
2114
- * @property {string} mobile - Mobile number of customer to be added in customer
2115
- * detail while checkout
1706
+ * @property {string} [name]
1707
+ * @property {string} [email]
1708
+ * @property {string} mobile
2116
1709
  */
2117
1710
 
2118
1711
  /**
2119
1712
  * @typedef Files
2120
- * @property {string} key - Key represents name of file
2121
- * @property {string[]} values - List of urls path
2122
- */
2123
-
2124
- /**
2125
- * @typedef CartCheckoutCustomMeta
2126
- * @property {string} key - Key name of custom meta
2127
- * @property {string} value - Value to be added in key
2128
- */
2129
-
2130
- /**
2131
- * @typedef PlatformCartCheckoutDetailCreation
2132
- * @property {CartCheckoutCustomMeta[]} [custom_meta]
2133
- * @property {string} [address_id]
2134
- * @property {string} [payment_identifier]
2135
- * @property {Object} [payment_params]
2136
- * @property {boolean} [payment_auto_confirm]
2137
- * @property {string} id
2138
- * @property {boolean} [pos]
2139
- * @property {string} [billing_address_id]
2140
- * @property {string} [merchant_code]
2141
- * @property {string} [aggregator]
2142
- * @property {number} [pick_at_store_uid]
2143
- * @property {string} [device_id]
2144
- * @property {Object} [delivery_address]
2145
- * @property {string} payment_mode
2146
- * @property {string} [checkout_mode]
2147
- * @property {CustomerDetails} [customer_details] - Customer details
2148
- * @property {Object} [meta]
2149
- * @property {StaffCheckout} [staff]
2150
- * @property {string} [employee_code]
2151
- * @property {Object} [billing_address]
2152
- * @property {string} [callback_url]
2153
- * @property {string} [user_id]
2154
- * @property {Object} [extra_meta]
2155
- * @property {string} order_type
2156
- * @property {Files[]} [files] - List of file url
2157
- * @property {number} [ordering_store]
2158
- * @property {Object} [payment_extra_identifiers]
2159
- * @property {string} [iin]
2160
- * @property {string} [network]
2161
- * @property {string} [type]
2162
- * @property {string} [card_id]
1713
+ * @property {string} key
1714
+ * @property {string[]} values
2163
1715
  */
2164
1716
 
2165
1717
  /**
2166
1718
  * @typedef CheckCart
2167
- * @property {string} [coupon_text] - Coupon text of the applied coupon on order placed
2168
- * @property {string} [cod_message] - Cash On Delivery message for the order placed
2169
- * @property {string} [id] - Cart id of the user cart
2170
- * @property {string} [store_code] - Store code from which the order placed
1719
+ * @property {string} [coupon_text]
1720
+ * @property {string} [cod_message]
1721
+ * @property {string} [id]
1722
+ * @property {string} [store_code]
2171
1723
  * @property {ShipmentPromise} [delivery_promise]
2172
- * @property {string} [comment] - Comment message added in cart after order placed
2173
- * @property {string} [user_type] - User type of the cart who places the order
2174
- * @property {CartProductInfo[]} [items] - Items details in cart after order placed
2175
- * @property {string} [error_message] - Error details if any error occurs which
2176
- * includes type of error, error code and error message
2177
- * @property {boolean} [success] - Success flag of checkout cart API response
1724
+ * @property {string} [comment]
1725
+ * @property {string} [user_type]
1726
+ * @property {CartProductInfo[]} [items]
1727
+ * @property {string} [error_message]
1728
+ * @property {boolean} [success]
2178
1729
  * @property {PaymentSelectionLock} [payment_selection_lock]
2179
- * @property {string} [delivery_charge_info] - Delivery charge in information
2180
- * message on shipment
2181
- * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict
2182
- * the checkout process
2183
- * @property {string} [order_id] - Order id generated after placing order
2184
- * @property {string} [message] - Message of the cart checkout API response
1730
+ * @property {string} [delivery_charge_info]
1731
+ * @property {boolean} [restrict_checkout]
1732
+ * @property {string} [order_id]
1733
+ * @property {string} [message]
2185
1734
  * @property {CartBreakup} [breakup_values]
2186
- * @property {number} [cod_charges] - Cash On Delivery charges of the user cart
2187
- * @property {boolean} [is_valid] - Valid flag fotr the checkout response if
2188
- * order placed was valid
2189
- * @property {string} [uid] - Cart id of user cart
2190
- * @property {string} [checkout_mode] - Checkout mode of user cart
1735
+ * @property {number} [cod_charges]
1736
+ * @property {boolean} [is_valid]
1737
+ * @property {string} [uid]
1738
+ * @property {string} [checkout_mode]
2191
1739
  * @property {CartCurrency} [currency]
2192
- * @property {string} [last_modified] - Last modified timestamp of cart
2193
- * @property {boolean} [buy_now] - Buy now flag of user cart
2194
- * @property {number} [delivery_charge_order_value] - Delivery charge order value
2195
- * @property {number} [cart_id] - Cart id of the user cart for which the order placed
2196
- * @property {Object[]} [store_emps] - Store employees data
2197
- * @property {string} [gstin] - GSTIN number added in cart
2198
- * @property {boolean} [cod_available] - Whether Cash On Delivery available
2199
- * @property {number} [delivery_charges] - Delivery charges of the order placed
2200
- * via checkout API
2201
- * @property {Object} [custom_cart_meta] - Custom meta details added cart
2202
- * checkout API payload
2203
- */
2204
-
2205
- /**
2206
- * @typedef CartCheckoutDetails
2207
- * @property {string} [app_intercept_url] - App intercept url which is used to
2208
- * redirect on app after payment in confirmed/failed
2209
- * @property {Object} [data] - Data of the user cart checkout includes cart
2210
- * data, address, user id, order type etc
2211
- * @property {CheckCart} [cart]
2212
- * @property {boolean} [success] - Success flag of cart checkout API response
2213
- * @property {string} [callback_url] - Callback url to be redirected after
2214
- * payment received/failed
2215
- * @property {string} [payment_confirm_url] - Payment confirm url used to
2216
- * redirect after payment is confirmed
2217
- * @property {string} [order_id] - Order id generated after placing order
2218
- * @property {string} [message] - Message of the cart checkout v2 API response
1740
+ * @property {string} [last_modified]
1741
+ * @property {boolean} [buy_now]
1742
+ * @property {number} [delivery_charge_order_value]
1743
+ * @property {number} [cart_id]
1744
+ * @property {Object[]} [store_emps]
1745
+ * @property {string} [gstin]
1746
+ * @property {boolean} [cod_available]
1747
+ * @property {number} [delivery_charges]
1748
+ * @property {Object} [custom_cart_meta]
2219
1749
  */
2220
1750
 
2221
1751
  /**
2222
- * @typedef CartCheckoutResult
1752
+ * @typedef CartCheckoutResponse
2223
1753
  * @property {string} [app_intercept_url]
2224
1754
  * @property {Object} [data]
2225
1755
  * @property {CheckCart} [cart]
@@ -2231,256 +1761,196 @@ const Joi = require("joi");
2231
1761
  */
2232
1762
 
2233
1763
  /**
2234
- * @typedef CartDeliveryModesDetails
1764
+ * @typedef CartDeliveryModesResponse
2235
1765
  * @property {number[]} [pickup_stores] - Store pick up available store uids
2236
1766
  * @property {string[]} [available_modes] - Available delivery modes
2237
1767
  */
2238
1768
 
2239
1769
  /**
2240
1770
  * @typedef PickupStoreDetail
2241
- * @property {string} [country] - Country of address
2242
- * @property {string} [state] - State of the address
2243
- * @property {string} [city] - City of the address
2244
- * @property {string} [phone] - Phone number for address
2245
- * @property {string} [area_code] - Area code of the address
2246
- * @property {number} [uid] - Uid of the address
2247
- * @property {string} [area_code_slug] - Area code slug for address. example
2248
- * pincode is slug for India
2249
- * @property {string} [address_type] - Address type of address
2250
- * @property {string} [area] - Area description for address
2251
- * @property {number} [id] - Id of the address
2252
- * @property {string} [store_manager_name] - Name of store manager
2253
- * @property {string} [name] - Name of person in address data to whom it belongs to
2254
- * @property {string} [store_code] - Store code from which the order placed
2255
- * @property {string} [landmark] - Landmark of address
2256
- * @property {string} [email] - Email address for address data
2257
- * @property {number} [pincode] - Address pincode
2258
- * @property {string} [address] - Address description for address data
2259
- */
2260
-
2261
- /**
2262
- * @typedef StoreDetails
2263
- * @property {PickupStoreDetail[]} [items] - List of items need to pickup from store
2264
- */
2265
-
2266
- /**
2267
- * @typedef CartPaymentUpdate
2268
- * @property {string} [address_id] - Address id of the user on which the order
2269
- * to be delivered
2270
- * @property {string} [payment_mode] - Payment mode from which the payment to be
2271
- * done for the order
2272
- * @property {string} [aggregator_name] - Aggregator name of the payment gateway
2273
- * @property {string} [merchant_code] - Merchant code of the payment mode
2274
- * selected to do the payment
2275
- * @property {string} [payment_identifier] - Payment identifier of the payment
2276
- * mode selected to do the payment
2277
- * @property {string} [id] - Cart id of the user cart
1771
+ * @property {string} [country]
1772
+ * @property {string} [state]
1773
+ * @property {string} [city]
1774
+ * @property {string} [phone]
1775
+ * @property {string} [area_code]
1776
+ * @property {number} [uid]
1777
+ * @property {string} [area_code_slug]
1778
+ * @property {string} [address_type]
1779
+ * @property {string} [area]
1780
+ * @property {number} [id]
1781
+ * @property {string} [store_manager_name]
1782
+ * @property {string} [name]
1783
+ * @property {string} [store_code]
1784
+ * @property {string} [landmark]
1785
+ * @property {string} [email]
1786
+ * @property {number} [pincode]
1787
+ * @property {string} [address]
1788
+ */
1789
+
1790
+ /**
1791
+ * @typedef StoreDetailsResponse
1792
+ * @property {PickupStoreDetail[]} [items]
1793
+ */
1794
+
1795
+ /**
1796
+ * @typedef UpdateCartPaymentRequest
1797
+ * @property {string} [address_id]
1798
+ * @property {string} [payment_mode]
1799
+ * @property {string} [aggregator_name]
1800
+ * @property {string} [merchant_code]
1801
+ * @property {string} [payment_identifier]
1802
+ * @property {string} [id]
2278
1803
  */
2279
1804
 
2280
1805
  /**
2281
1806
  * @typedef CouponValidity
2282
- * @property {string} [title] - Coupon Title of the coupon applied
2283
- * @property {boolean} [next_validation_required] - Flag for coupon validation
2284
- * required on next page or not
2285
- * @property {boolean} [valid] - Valid flag which denotes if the applied coupon
2286
- * is valid or not
2287
- * @property {string} [display_message_en] - Display message for coupon validity
2288
- * @property {string} [code] - Coupon code of the coupon applied
2289
- * @property {number} [discount] - Coupon discount value of the coupon applied
2290
- * @property {string} [error_en] - Error message for the selected payment mode.
1807
+ * @property {string} [title]
1808
+ * @property {boolean} [next_validation_required]
1809
+ * @property {boolean} [valid]
1810
+ * @property {string} [display_message_en]
1811
+ * @property {string} [code]
1812
+ * @property {number} [discount]
2291
1813
  */
2292
1814
 
2293
1815
  /**
2294
1816
  * @typedef PaymentCouponValidate
2295
- * @property {boolean} success - Success flag of coupon payment mode validity API response
2296
- * @property {string} [message] - Payment mode valid message for coupon
1817
+ * @property {boolean} success
1818
+ * @property {string} [message]
2297
1819
  * @property {CouponValidity} [coupon_validity]
2298
1820
  */
2299
1821
 
2300
1822
  /**
2301
1823
  * @typedef PaymentMeta
2302
- * @property {string} [payment_gateway] - Payment gateway used to do the payment
2303
- * @property {string} [type] - Type of card if payment mode is card to do the payment
2304
- * @property {string} [payment_identifier] - Payment identifier of the payment
2305
- * mode selected to do the payment
2306
- * @property {string} [merchant_code] - Merchant code of the payment mode
2307
- * selected to do the payment
1824
+ * @property {string} [payment_gateway]
1825
+ * @property {string} [type]
1826
+ * @property {string} [payment_identifier]
1827
+ * @property {string} [merchant_code]
2308
1828
  */
2309
1829
 
2310
1830
  /**
2311
1831
  * @typedef PaymentMethod
2312
- * @property {string} mode - Payment mode of payment method used to make payment
2313
- * @property {string} [payment] - Payment name of payment method used to make payment
1832
+ * @property {string} mode
1833
+ * @property {string} [payment]
2314
1834
  * @property {PaymentMeta} payment_meta
2315
- * @property {number} [amount] - Amount of the payment mode to be paid
2316
- * @property {string} [name] - Name of the payment mode used to make payment
2317
- * @property {Object} [payment_extra_identifiers] - Payment extra identifier for
2318
- * the payment mode to do the payment
2319
- */
2320
-
2321
- /**
2322
- * @typedef PlatformCartCheckoutDetailV2Creation
2323
- * @property {string} [address_id] - Address id of the user on which the order
2324
- * to be delivered
2325
- * @property {string} [payment_identifier] - Payment identifier of the payment
2326
- * mode selected to do the payment
2327
- * @property {Object} [payment_params] - Payment params which includes payment
2328
- * identifier and merchant code
2329
- * @property {CartCheckoutCustomMeta[]} [custom_meta] - Custom meta data to be
2330
- * added in order
2331
- * @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
2332
- * payment need not to be collected from user
2333
- * @property {string} id - Cart id of the user cart
2334
- * @property {boolean} [pos] - Filed to determine whether user is making request
2335
- * from pos or not
2336
- * @property {string} [billing_address_id] - Billing address id of the customer
2337
- * on which the invoice to be generated after the order is placed
2338
- * @property {string} [merchant_code] - Merchant code of the payment mode
2339
- * selected to do the payment
2340
- * @property {string} [aggregator] - Aggregator name of the payment gateway
2341
- * @property {number} [pick_at_store_uid] - Store id where we have to pick product
2342
- * @property {string} [device_id] - Device id
2343
- * @property {Object} [delivery_address] - Delivery address data which includes
2344
- * customer address, customer phone, customer email, customer pincode,
2345
- * customer landmark and customer name
2346
- * @property {string} [payment_mode] - Payment mode from which the payment to be
2347
- * done for the order
2348
- * @property {string} [checkout_mode] - Mode of checkout used in cart
2349
- * @property {CustomerDetails} [customer_details]
2350
- * @property {Object} [meta] - Meta data to be added in order
2351
- * @property {PaymentMethod[]} payment_methods - Payment methods list used to
2352
- * make the payment
1835
+ * @property {number} [amount]
1836
+ * @property {string} [name]
1837
+ * @property {Object} [payment_extra_identifiers]
1838
+ */
1839
+
1840
+ /**
1841
+ * @typedef PlatformCartCheckoutDetailV2Request
1842
+ * @property {string} [address_id]
1843
+ * @property {string} [payment_identifier]
1844
+ * @property {Object} [payment_params]
1845
+ * @property {Object} [custom_meta]
1846
+ * @property {boolean} [payment_auto_confirm]
1847
+ * @property {string} id
1848
+ * @property {boolean} [pos]
1849
+ * @property {string} [billing_address_id]
1850
+ * @property {string} [merchant_code]
1851
+ * @property {string} [aggregator]
1852
+ * @property {number} [pick_at_store_uid]
1853
+ * @property {string} [device_id]
1854
+ * @property {Object} [delivery_address]
1855
+ * @property {string} [payment_mode]
1856
+ * @property {string} [checkout_mode]
1857
+ * @property {Object} [customer_details] - Customer details
1858
+ * @property {Object} [meta]
1859
+ * @property {PaymentMethod[]} payment_methods
2353
1860
  * @property {StaffCheckout} [staff]
2354
- * @property {string} [employee_code] - Employee code of staff who does checkout
2355
- * on behalf of customer
2356
- * @property {Object} [billing_address] - Billing address json which includes
2357
- * customer address, customer phone, customer email, customer pincode,
2358
- * customer landmark and customer name
2359
- * @property {string} [callback_url] - Callback url after payment received/failed
2360
- * @property {string} user_id - The user id of user cart
2361
- * @property {Object} [extra_meta] - Extra meta to be added while checkout in order
2362
- * @property {string} order_type - Order type of the order being placed like
2363
- * pickAtStore or HomeDelivery
1861
+ * @property {string} [employee_code]
1862
+ * @property {Object} [billing_address]
1863
+ * @property {string} [callback_url]
1864
+ * @property {string} user_id
1865
+ * @property {Object} [extra_meta]
1866
+ * @property {string} order_type
2364
1867
  * @property {Files[]} [files] - List of file url
2365
- * @property {number} [ordering_store] - Ordering store id of the store from
2366
- * which the order is getting placed
2367
- * @property {string} [iin] - Issuer Identification Number number of card if
2368
- * payment mode is card to do the payment
2369
- * @property {string} [network] - Network of card if payment mode is card to do
2370
- * the payment
2371
- * @property {string} [type] - Type of cart if payment mode is card to do the payment
2372
- * @property {string} [card_id] - Saved card id if payment mode is card to do the payment
1868
+ * @property {number} [ordering_store]
1869
+ * @property {string} [iin]
1870
+ * @property {string} [network]
1871
+ * @property {string} [type]
1872
+ * @property {string} [card_id]
2373
1873
  */
2374
1874
 
2375
1875
  /**
2376
1876
  * @typedef UpdateCartPaymentRequestV2
2377
- * @property {string} [address_id] - Address id of the user address selected to
2378
- * deliver the shipment
2379
- * @property {string} [payment_mode] - Payment mode of the payment selected to
2380
- * do the payment
2381
- * @property {string} [aggregator_name] - Aggregator name of the payment gateway
2382
- * @property {string} [merchant_code] - Merchant code of the payment mode
2383
- * selected to do the payment
2384
- * @property {string} [payment_identifier] - Payment identifier of the payment
2385
- * mode selected to do the payment
2386
- * @property {string} [id] - Cart id of the user cart for which the update cart
2387
- * payment operation performed
1877
+ * @property {string} [address_id]
1878
+ * @property {string} [payment_mode]
1879
+ * @property {string} [aggregator_name]
1880
+ * @property {string} [merchant_code]
1881
+ * @property {string} [payment_identifier]
1882
+ * @property {string} [id]
2388
1883
  * @property {PaymentMethod[]} [payment_methods]
2389
1884
  */
2390
1885
 
2391
1886
  /**
2392
1887
  * @typedef PriceMinMax
2393
- * @property {number} [min] - Min price of article added in user cart
2394
- * @property {number} [max] - Max price of article added in user cart
1888
+ * @property {number} [min]
1889
+ * @property {number} [max]
2395
1890
  */
2396
1891
 
2397
1892
  /**
2398
1893
  * @typedef ItemPriceDetails
2399
1894
  * @property {PriceMinMax} [marked]
2400
1895
  * @property {PriceMinMax} [effective]
2401
- * @property {string} [currency] - The currency code for price
2402
- */
2403
-
2404
- /**
2405
- * @typedef ArticlePriceDetails
2406
- * @property {number} [marked] - The Marked Price refers to the initial price of
2407
- * the free gift article before product discount.
2408
- * @property {number} [effective] - The Effective Price refers to the final
2409
- * amount of the free gift article after applying the product discount.
1896
+ * @property {string} [currency]
2410
1897
  */
2411
1898
 
2412
1899
  /**
2413
1900
  * @typedef FreeGiftItems
2414
- * @property {string} [item_slug] - Free gift product slug
2415
- * @property {string} [item_name] - Free gift product name
1901
+ * @property {string} [item_slug] - Item slug
1902
+ * @property {string} [item_name] - Item name
2416
1903
  * @property {ItemPriceDetails} [item_price_details]
2417
- * @property {ArticlePriceDetails} [article_price]
2418
- * @property {string} [item_brand_name] - Free gift product brand name
2419
- * @property {number} [item_id] - Free gift product id
2420
- * @property {string[]} [available_sizes] - Available sizes for the free gift item.
2421
- * @property {string} [size] - Selected size for the free gift item.
2422
- * @property {string[]} [item_images_url] - List of free gift product images URL
1904
+ * @property {string} [item_brand_name] - Item brand name
1905
+ * @property {number} [item_id] - Item id
1906
+ * @property {string[]} [item_images_url] - Item images URL
2423
1907
  */
2424
1908
 
2425
1909
  /**
2426
1910
  * @typedef PromotionOffer
2427
- * @property {string} [id] - Promotion unique identifier
1911
+ * @property {string} [id] - Promotion id
2428
1912
  * @property {Object} [buy_rules] - Buy rules of promotions
2429
- * @property {string} [offer_text] - Offer title of promotion that used to display
2430
- * @property {string} [promotion_type] - Type of Promotion like percentage,
2431
- * amount, bogo etc.
1913
+ * @property {string} [offer_text] - Offer title
1914
+ * @property {string} [promotion_type] - Promotion type
2432
1915
  * @property {string} [promotion_name] - Name of the promotion
2433
1916
  * @property {string} [promotion_group] - Group of promotion belongs to
2434
1917
  * @property {string} [valid_till] - Datetime ISOString for promotion end date
2435
1918
  * @property {Object[]} [discount_rules] - Discount rules of promotions
2436
1919
  * @property {FreeGiftItems[]} [free_gift_items] - Details of free gift items
2437
1920
  * @property {string} [description] - Offer details including T&C
2438
- * @property {boolean} [is_bank_offer] - Indicates whether the promotion is
2439
- * associated with a bank offer.
2440
1921
  */
2441
1922
 
2442
1923
  /**
2443
- * @typedef PromotionOffersDetails
2444
- * @property {PromotionOffer[]} [available_promotions] - List of available
2445
- * promotion for product
1924
+ * @typedef PromotionOffersResponse
1925
+ * @property {PromotionOffer[]} [available_promotions]
2446
1926
  */
2447
1927
 
2448
1928
  /**
2449
1929
  * @typedef PromotionPaymentOffer
2450
- * @property {string} [application_id] - Application id of the sales channel
1930
+ * @property {string} [application_id] - Application id
2451
1931
  * @property {Object[]} [buy_rules] - Buy rules of promotions
2452
1932
  * @property {string} [calculate_on] - Price on which promotion calculated
2453
1933
  * @property {string} [description] - Offer details including T&C
2454
1934
  * @property {Object[]} [discount_rules] - Discount rules of promotions
2455
- * @property {string} [id] - Promotion unique identifier
2456
- * @property {string} [offer_text] - Offer title of promotion that used to display
1935
+ * @property {string} [id] - Promotion id
1936
+ * @property {string} [offer_text] - Offer title
2457
1937
  * @property {string} [promotion_group] - Group of promotion belongs to
2458
- * @property {string} [promotion_type] - Type of Promotion like bogo, amount,
2459
- * percentage etc.
1938
+ * @property {string} [promotion_type] - Promotion type
2460
1939
  * @property {string} [promotion_name] - Name of the promotion
2461
1940
  */
2462
1941
 
2463
1942
  /**
2464
- * @typedef PromotionPaymentOffersDetails
2465
- * @property {boolean} [success] - Indicates if operation is successful or not.
1943
+ * @typedef PromotionPaymentOffersResponse
1944
+ * @property {boolean} [success]
2466
1945
  * @property {PromotionPaymentOffer[]} [promotions]
2467
1946
  */
2468
1947
 
2469
- /**
2470
- * @typedef ValidationError
2471
- * @property {string} message - A brief description of the error encountered.
2472
- * @property {string} field - The field in the request that caused the error.
2473
- */
2474
-
2475
1948
  class CartPlatformModel {
2476
1949
  /** @returns {CouponDateMeta} */
2477
1950
  static CouponDateMeta() {
2478
1951
  return Joi.object({
2479
1952
  modified_on: Joi.string().allow("").allow(null),
2480
1953
  created_on: Joi.string().allow("").allow(null),
2481
- approved_on: Joi.string().allow("").allow(null),
2482
- rejected_on: Joi.string().allow("").allow(null),
2483
- reviewed_on: Joi.string().allow("").allow(null),
2484
1954
  });
2485
1955
  }
2486
1956
 
@@ -2488,7 +1958,7 @@ class CartPlatformModel {
2488
1958
  static Ownership() {
2489
1959
  return Joi.object({
2490
1960
  payable_category: Joi.string().allow("").required(),
2491
- payable_by: Joi.string().allow("").allow(null),
1961
+ payable_by: Joi.string().allow("").required(),
2492
1962
  });
2493
1963
  }
2494
1964
 
@@ -2497,9 +1967,6 @@ class CartPlatformModel {
2497
1967
  return Joi.object({
2498
1968
  created_by: Joi.string().allow("").allow(null),
2499
1969
  modified_by: Joi.string().allow("").allow(null),
2500
- approved_by: Joi.string().allow("").allow(null),
2501
- rejected_by: Joi.string().allow("").allow(null),
2502
- reviewed_by: Joi.string().allow("").allow(null),
2503
1970
  });
2504
1971
  }
2505
1972
 
@@ -2573,7 +2040,7 @@ class CartPlatformModel {
2573
2040
  /** @returns {Restrictions} */
2574
2041
  static Restrictions() {
2575
2042
  return Joi.object({
2576
- payments: CartPlatformModel.PaymentModes(),
2043
+ payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
2577
2044
  user_type: Joi.string().allow(""),
2578
2045
  price_range: CartPlatformModel.PriceRange(),
2579
2046
  platforms: Joi.array().items(Joi.string().allow("")),
@@ -2607,10 +2074,9 @@ class CartPlatformModel {
2607
2074
  static CouponSchedule() {
2608
2075
  return Joi.object({
2609
2076
  end: Joi.string().allow("").allow(null),
2610
- start: Joi.string().allow("").allow(null),
2077
+ start: Joi.string().allow(""),
2611
2078
  next_schedule: Joi.array().items(Joi.any()),
2612
2079
  cron: Joi.string().allow("").allow(null),
2613
- status: Joi.string().allow(""),
2614
2080
  duration: Joi.number().allow(null),
2615
2081
  });
2616
2082
  }
@@ -2674,11 +2140,11 @@ class CartPlatformModel {
2674
2140
  return Joi.object({
2675
2141
  currency_code: Joi.string().allow(""),
2676
2142
  auto_apply: Joi.boolean(),
2677
- type: Joi.string().allow(""),
2143
+ type: Joi.string().allow("").required(),
2678
2144
  is_exact: Joi.boolean(),
2679
- applicable_on: Joi.string().allow(""),
2680
- calculate_on: Joi.string().allow(""),
2681
- value_type: Joi.string().allow(""),
2145
+ applicable_on: Joi.string().allow("").required(),
2146
+ calculate_on: Joi.string().allow("").required(),
2147
+ value_type: Joi.string().allow("").required(),
2682
2148
  scope: Joi.array().items(Joi.string().allow("")),
2683
2149
  });
2684
2150
  }
@@ -2687,26 +2153,22 @@ class CartPlatformModel {
2687
2153
  static CouponAdd() {
2688
2154
  return Joi.object({
2689
2155
  date_meta: CartPlatformModel.CouponDateMeta(),
2690
- ownership: CartPlatformModel.Ownership(),
2156
+ ownership: CartPlatformModel.Ownership().required(),
2691
2157
  author: CartPlatformModel.CouponAuthor(),
2692
2158
  state: CartPlatformModel.State(),
2693
2159
  restrictions: CartPlatformModel.Restrictions(),
2694
2160
  validation: CartPlatformModel.Validation(),
2695
2161
  action: CartPlatformModel.CouponAction(),
2696
- coupon_type: Joi.string().allow(""),
2697
- coupon_prefix: Joi.string().allow("").allow(null),
2698
- coupon_counts: Joi.number(),
2699
2162
  tags: Joi.array().items(Joi.string().allow("")),
2700
2163
  _schedule: CartPlatformModel.CouponSchedule(),
2701
- rule: Joi.array().items(CartPlatformModel.Rule()),
2702
- display_meta: CartPlatformModel.DisplayMeta(),
2164
+ rule: Joi.array().items(CartPlatformModel.Rule()).required(),
2165
+ display_meta: CartPlatformModel.DisplayMeta().required(),
2703
2166
  code: Joi.string().allow("").required(),
2704
2167
  type_slug: Joi.string().allow("").required(),
2705
- identifiers: CartPlatformModel.Identifier(),
2706
- validity: CartPlatformModel.Validity(),
2707
- rule_definition: CartPlatformModel.RuleDefinition(),
2168
+ identifiers: CartPlatformModel.Identifier().required(),
2169
+ validity: CartPlatformModel.Validity().required(),
2170
+ rule_definition: CartPlatformModel.RuleDefinition().required(),
2708
2171
  _id: Joi.string().allow(""),
2709
- is_archived: Joi.boolean(),
2710
2172
  });
2711
2173
  }
2712
2174
 
@@ -2723,8 +2185,8 @@ class CartPlatformModel {
2723
2185
  });
2724
2186
  }
2725
2187
 
2726
- /** @returns {CouponsResult} */
2727
- static CouponsResult() {
2188
+ /** @returns {CouponsResponse} */
2189
+ static CouponsResponse() {
2728
2190
  return Joi.object({
2729
2191
  items: Joi.array().items(CartPlatformModel.CouponAdd()),
2730
2192
  page: CartPlatformModel.Page(),
@@ -2739,8 +2201,8 @@ class CartPlatformModel {
2739
2201
  });
2740
2202
  }
2741
2203
 
2742
- /** @returns {OperationErrorResult} */
2743
- static OperationErrorResult() {
2204
+ /** @returns {OperationErrorResponse} */
2205
+ static OperationErrorResponse() {
2744
2206
  return Joi.object({
2745
2207
  success: Joi.boolean(),
2746
2208
  message: Joi.string().allow(""),
@@ -2752,7 +2214,7 @@ class CartPlatformModel {
2752
2214
  static CouponUpdate() {
2753
2215
  return Joi.object({
2754
2216
  date_meta: CartPlatformModel.CouponDateMeta(),
2755
- ownership: CartPlatformModel.Ownership(),
2217
+ ownership: CartPlatformModel.Ownership().required(),
2756
2218
  author: CartPlatformModel.CouponAuthor(),
2757
2219
  state: CartPlatformModel.State(),
2758
2220
  restrictions: CartPlatformModel.Restrictions(),
@@ -2760,17 +2222,13 @@ class CartPlatformModel {
2760
2222
  action: CartPlatformModel.CouponAction(),
2761
2223
  tags: Joi.array().items(Joi.string().allow("")),
2762
2224
  _schedule: CartPlatformModel.CouponSchedule(),
2763
- rule: Joi.array().items(CartPlatformModel.Rule()),
2764
- display_meta: CartPlatformModel.DisplayMeta(),
2225
+ rule: Joi.array().items(CartPlatformModel.Rule()).required(),
2226
+ display_meta: CartPlatformModel.DisplayMeta().required(),
2765
2227
  code: Joi.string().allow("").required(),
2766
- coupon_type: Joi.string().allow(""),
2767
- coupon_prefix: Joi.string().allow("").allow(null),
2768
- coupon_counts: Joi.number(),
2769
- reason: Joi.string().allow("").allow(null),
2770
2228
  type_slug: Joi.string().allow("").required(),
2771
- identifiers: CartPlatformModel.Identifier(),
2772
- validity: CartPlatformModel.Validity(),
2773
- rule_definition: CartPlatformModel.RuleDefinition(),
2229
+ identifiers: CartPlatformModel.Identifier().required(),
2230
+ validity: CartPlatformModel.Validity().required(),
2231
+ rule_definition: CartPlatformModel.RuleDefinition().required(),
2774
2232
  });
2775
2233
  }
2776
2234
 
@@ -2782,48 +2240,32 @@ class CartPlatformModel {
2782
2240
  });
2783
2241
  }
2784
2242
 
2785
- /** @returns {CouponCreateResult} */
2786
- static CouponCreateResult() {
2787
- return Joi.object({
2788
- success: Joi.boolean(),
2789
- message: Joi.string().allow(""),
2790
- _id: Joi.string().allow(""),
2791
- });
2792
- }
2793
-
2794
2243
  /** @returns {DisplayMeta1} */
2795
2244
  static DisplayMeta1() {
2796
2245
  return Joi.object({
2797
- description: Joi.string().allow("").allow(null),
2246
+ description: Joi.string().allow(""),
2798
2247
  offer_label: Joi.string().allow(""),
2799
- name: Joi.string().allow("").allow(null),
2800
- offer_text: Joi.string().allow("").allow(null),
2248
+ name: Joi.string().allow(""),
2249
+ offer_text: Joi.string().allow(""),
2801
2250
  });
2802
2251
  }
2803
2252
 
2804
2253
  /** @returns {Ownership1} */
2805
2254
  static Ownership1() {
2806
2255
  return Joi.object({
2807
- payable_category: Joi.string().allow(""),
2808
- payable_by: Joi.string().allow(""),
2256
+ payable_category: Joi.string().allow("").required(),
2257
+ payable_by: Joi.string().allow("").required(),
2809
2258
  });
2810
2259
  }
2811
2260
 
2812
2261
  /** @returns {CompareObject} */
2813
2262
  static CompareObject() {
2814
2263
  return Joi.object({
2815
- equals: Joi.number().allow(null),
2816
- greater_than: Joi.number().allow(null),
2817
- less_than_equals: Joi.number().allow(null),
2818
- less_than: Joi.number().allow(null),
2819
- greater_than_equals: Joi.number().allow(null),
2820
- });
2821
- }
2822
-
2823
- /** @returns {ItemSizeMapping} */
2824
- static ItemSizeMapping() {
2825
- return Joi.object({
2826
- item_size_mapping: Joi.object().pattern(/\S/, Joi.any()),
2264
+ equals: Joi.number(),
2265
+ greater_than: Joi.number(),
2266
+ less_than_equals: Joi.number(),
2267
+ less_than: Joi.number(),
2268
+ greater_than_equals: Joi.number(),
2827
2269
  });
2828
2270
  }
2829
2271
 
@@ -2857,7 +2299,6 @@ class CartPlatformModel {
2857
2299
  item_tags: Joi.array().items(Joi.string().allow("")),
2858
2300
  item_exclude_l2_category: Joi.array().items(Joi.number()),
2859
2301
  item_sku: Joi.array().items(Joi.string().allow("")),
2860
- item_exclude_product_tags: Joi.array().items(Joi.string().allow("")),
2861
2302
  });
2862
2303
  }
2863
2304
 
@@ -2868,7 +2309,7 @@ class CartPlatformModel {
2868
2309
  discount_price: Joi.number(),
2869
2310
  apportion_discount: Joi.boolean(),
2870
2311
  partial_can_ret: Joi.boolean(),
2871
- max_usage_per_transaction: Joi.number().allow(null),
2312
+ max_usage_per_transaction: Joi.number(),
2872
2313
  min_offer_quantity: Joi.number(),
2873
2314
  code: Joi.string().allow(""),
2874
2315
  discount_amount: Joi.number(),
@@ -2883,7 +2324,6 @@ class CartPlatformModel {
2883
2324
  discount_type: Joi.string().allow("").required(),
2884
2325
  buy_condition: Joi.string().allow("").required(),
2885
2326
  item_criteria: CartPlatformModel.ItemCriteria().required(),
2886
- meta: CartPlatformModel.ItemSizeMapping(),
2887
2327
  offer: CartPlatformModel.DiscountOffer().required(),
2888
2328
  });
2889
2329
  }
@@ -2898,7 +2338,7 @@ class CartPlatformModel {
2898
2338
  /** @returns {PromotionPaymentModes} */
2899
2339
  static PromotionPaymentModes() {
2900
2340
  return Joi.object({
2901
- type: Joi.string().allow(""),
2341
+ type: Joi.string().allow("").required(),
2902
2342
  uses: CartPlatformModel.PaymentAllowValue1(),
2903
2343
  codes: Joi.array().items(Joi.string().allow("")),
2904
2344
  });
@@ -2939,7 +2379,7 @@ class CartPlatformModel {
2939
2379
  /** @returns {Restrictions1} */
2940
2380
  static Restrictions1() {
2941
2381
  return Joi.object({
2942
- payments: CartPlatformModel.PaymentModes(),
2382
+ payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()),
2943
2383
  user_registered: CartPlatformModel.UserRegistered(),
2944
2384
  platforms: Joi.array().items(Joi.string().allow("")),
2945
2385
  post_order: CartPlatformModel.PostOrder1(),
@@ -2947,7 +2387,7 @@ class CartPlatformModel {
2947
2387
  order_quantity: Joi.number(),
2948
2388
  anonymous_users: Joi.boolean(),
2949
2389
  user_id: Joi.array().items(Joi.string().allow("")),
2950
- uses: CartPlatformModel.UsesRestriction1(),
2390
+ uses: CartPlatformModel.UsesRestriction1().required(),
2951
2391
  ordering_stores: Joi.array().items(Joi.number()),
2952
2392
  });
2953
2393
  }
@@ -2955,10 +2395,9 @@ class CartPlatformModel {
2955
2395
  /** @returns {PromotionSchedule} */
2956
2396
  static PromotionSchedule() {
2957
2397
  return Joi.object({
2958
- end: Joi.string().allow("").allow(null),
2959
- start: Joi.string().allow("").allow(null),
2960
- status: Joi.string().allow(""),
2961
- published: Joi.boolean(),
2398
+ end: Joi.string().allow("").required(),
2399
+ start: Joi.string().allow("").required(),
2400
+ published: Joi.boolean().required(),
2962
2401
  next_schedule: Joi.array().items(Joi.any()),
2963
2402
  cron: Joi.string().allow("").allow(null),
2964
2403
  duration: Joi.number().allow(null),
@@ -2968,8 +2407,8 @@ class CartPlatformModel {
2968
2407
  /** @returns {PromotionAction} */
2969
2408
  static PromotionAction() {
2970
2409
  return Joi.object({
2971
- action_date: Joi.string().allow("").allow(null),
2972
- action_type: Joi.string().allow("").allow(null),
2410
+ action_date: Joi.string().allow("").allow(null).required(),
2411
+ action_type: Joi.string().allow("").required(),
2973
2412
  });
2974
2413
  }
2975
2414
 
@@ -2978,17 +2417,14 @@ class CartPlatformModel {
2978
2417
  return Joi.object({
2979
2418
  created_by: Joi.string().allow("").allow(null),
2980
2419
  modified_by: Joi.string().allow("").allow(null),
2981
- approved_by: Joi.string().allow("").allow(null),
2982
- rejected_by: Joi.string().allow("").allow(null),
2983
- reviewed_by: Joi.string().allow("").allow(null),
2984
2420
  });
2985
2421
  }
2986
2422
 
2987
2423
  /** @returns {Visibility} */
2988
2424
  static Visibility() {
2989
2425
  return Joi.object({
2990
- coupon_list: Joi.boolean(),
2991
- pdp: Joi.boolean(),
2426
+ coupon_list: Joi.boolean().required(),
2427
+ pdp: Joi.boolean().required(),
2992
2428
  });
2993
2429
  }
2994
2430
 
@@ -2997,9 +2433,6 @@ class CartPlatformModel {
2997
2433
  return Joi.object({
2998
2434
  modified_on: Joi.string().allow("").allow(null),
2999
2435
  created_on: Joi.string().allow("").allow(null),
3000
- approved_on: Joi.string().allow("").allow(null),
3001
- rejected_on: Joi.string().allow("").allow(null),
3002
- reviewed_on: Joi.string().allow("").allow(null),
3003
2436
  });
3004
2437
  }
3005
2438
 
@@ -3020,7 +2453,6 @@ class CartPlatformModel {
3020
2453
  .required(),
3021
2454
  restrictions: CartPlatformModel.Restrictions1(),
3022
2455
  currency: Joi.string().allow(""),
3023
- is_processed: Joi.boolean(),
3024
2456
  code: Joi.string().allow(""),
3025
2457
  _schedule: CartPlatformModel.PromotionSchedule(),
3026
2458
  post_order_action: CartPlatformModel.PromotionAction(),
@@ -3028,17 +2460,18 @@ class CartPlatformModel {
3028
2460
  author: CartPlatformModel.PromotionAuthor(),
3029
2461
  visiblility: CartPlatformModel.Visibility(),
3030
2462
  application_id: Joi.string().allow("").required(),
3031
- buy_rules: CartPlatformModel.ItemCriteria().required(),
3032
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2463
+ buy_rules: Joi.object()
2464
+ .pattern(/\S/, CartPlatformModel.ItemCriteria())
2465
+ .required(),
2466
+ _custom_json: Joi.any(),
3033
2467
  date_meta: CartPlatformModel.PromotionDateMeta(),
3034
2468
  _id: Joi.string().allow(""),
3035
2469
  tags: Joi.array().items(Joi.string().allow("")),
3036
- is_archived: Joi.boolean(),
3037
2470
  });
3038
2471
  }
3039
2472
 
3040
- /** @returns {PromotionsResult} */
3041
- static PromotionsResult() {
2473
+ /** @returns {PromotionsResponse} */
2474
+ static PromotionsResponse() {
3042
2475
  return Joi.object({
3043
2476
  items: Joi.array().items(CartPlatformModel.PromotionListItem()),
3044
2477
  page: CartPlatformModel.Page(),
@@ -3054,41 +2487,12 @@ class CartPlatformModel {
3054
2487
  promo_group: Joi.string().allow("").required(),
3055
2488
  mode: Joi.string().allow("").required(),
3056
2489
  apply_all_discount: Joi.boolean(),
3057
- display_meta: CartPlatformModel.DisplayMeta1(),
3058
- ownership: CartPlatformModel.Ownership1(),
3059
- promotion_type: Joi.string().allow("").required(),
3060
- discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
3061
- restrictions: CartPlatformModel.Restrictions1(),
3062
- currency: Joi.string().allow(""),
3063
- code: Joi.string().allow(""),
3064
- _schedule: CartPlatformModel.PromotionSchedule(),
3065
- post_order_action: CartPlatformModel.PromotionAction(),
3066
- apply_priority: Joi.number(),
3067
- author: CartPlatformModel.PromotionAuthor(),
3068
- visiblility: CartPlatformModel.Visibility(),
3069
- application_id: Joi.string().allow("").required(),
3070
- buy_rules: CartPlatformModel.ItemCriteria(),
3071
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3072
- date_meta: CartPlatformModel.PromotionDateMeta(),
3073
- tags: Joi.array().items(Joi.string().allow("")),
3074
- _id: Joi.string().allow(""),
3075
- });
3076
- }
3077
-
3078
- /** @returns {PromotionAddResult} */
3079
- static PromotionAddResult() {
3080
- return Joi.object({
3081
- stackable: Joi.boolean(),
3082
- calculate_on: Joi.string().allow(""),
3083
- apply_exclusive: Joi.string().allow("").allow(null),
3084
- promo_group: Joi.string().allow("").required(),
3085
- mode: Joi.string().allow("").required(),
3086
- is_processed: Joi.boolean(),
3087
- apply_all_discount: Joi.boolean(),
3088
- display_meta: CartPlatformModel.DisplayMeta1(),
3089
- ownership: CartPlatformModel.Ownership1(),
2490
+ display_meta: CartPlatformModel.DisplayMeta1().required(),
2491
+ ownership: CartPlatformModel.Ownership1().required(),
3090
2492
  promotion_type: Joi.string().allow("").required(),
3091
- discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
2493
+ discount_rules: Joi.array()
2494
+ .items(CartPlatformModel.DiscountRule())
2495
+ .required(),
3092
2496
  restrictions: CartPlatformModel.Restrictions1(),
3093
2497
  currency: Joi.string().allow(""),
3094
2498
  code: Joi.string().allow(""),
@@ -3098,11 +2502,12 @@ class CartPlatformModel {
3098
2502
  author: CartPlatformModel.PromotionAuthor(),
3099
2503
  visiblility: CartPlatformModel.Visibility(),
3100
2504
  application_id: Joi.string().allow("").required(),
3101
- buy_rules: CartPlatformModel.ItemCriteria(),
3102
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2505
+ buy_rules: Joi.object()
2506
+ .pattern(/\S/, CartPlatformModel.ItemCriteria())
2507
+ .required(),
2508
+ _custom_json: Joi.any(),
3103
2509
  date_meta: CartPlatformModel.PromotionDateMeta(),
3104
2510
  tags: Joi.array().items(Joi.string().allow("")),
3105
- is_archived: Joi.boolean(),
3106
2511
  });
3107
2512
  }
3108
2513
 
@@ -3112,45 +2517,15 @@ class CartPlatformModel {
3112
2517
  stackable: Joi.boolean(),
3113
2518
  calculate_on: Joi.string().allow(""),
3114
2519
  apply_exclusive: Joi.string().allow("").allow(null),
3115
- reason: Joi.string().allow("").allow(null),
3116
2520
  promo_group: Joi.string().allow("").required(),
3117
2521
  mode: Joi.string().allow("").required(),
3118
2522
  apply_all_discount: Joi.boolean(),
3119
- display_meta: CartPlatformModel.DisplayMeta1(),
3120
- ownership: CartPlatformModel.Ownership1(),
3121
- promotion_type: Joi.string().allow("").required(),
3122
- discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
3123
- restrictions: CartPlatformModel.Restrictions1(),
3124
- currency: Joi.string().allow(""),
3125
- code: Joi.string().allow(""),
3126
- _schedule: CartPlatformModel.PromotionSchedule(),
3127
- post_order_action: CartPlatformModel.PromotionAction(),
3128
- apply_priority: Joi.number(),
3129
- author: CartPlatformModel.PromotionAuthor(),
3130
- visiblility: CartPlatformModel.Visibility(),
3131
- application_id: Joi.string().allow("").required(),
3132
- buy_rules: CartPlatformModel.ItemCriteria(),
3133
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3134
- date_meta: CartPlatformModel.PromotionDateMeta(),
3135
- tags: Joi.array().items(Joi.string().allow("")),
3136
- });
3137
- }
3138
-
3139
- /** @returns {PromotionUpdateResult} */
3140
- static PromotionUpdateResult() {
3141
- return Joi.object({
3142
- stackable: Joi.boolean(),
3143
- calculate_on: Joi.string().allow(""),
3144
- apply_exclusive: Joi.string().allow("").allow(null),
3145
- reason: Joi.string().allow("").allow(null),
3146
- is_processed: Joi.boolean(),
3147
- promo_group: Joi.string().allow("").required(),
3148
- mode: Joi.string().allow("").required(),
3149
- apply_all_discount: Joi.boolean(),
3150
- display_meta: CartPlatformModel.DisplayMeta1(),
3151
- ownership: CartPlatformModel.Ownership1(),
2523
+ display_meta: CartPlatformModel.DisplayMeta1().required(),
2524
+ ownership: CartPlatformModel.Ownership1().required(),
3152
2525
  promotion_type: Joi.string().allow("").required(),
3153
- discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()),
2526
+ discount_rules: Joi.array()
2527
+ .items(CartPlatformModel.DiscountRule())
2528
+ .required(),
3154
2529
  restrictions: CartPlatformModel.Restrictions1(),
3155
2530
  currency: Joi.string().allow(""),
3156
2531
  code: Joi.string().allow(""),
@@ -3160,11 +2535,12 @@ class CartPlatformModel {
3160
2535
  author: CartPlatformModel.PromotionAuthor(),
3161
2536
  visiblility: CartPlatformModel.Visibility(),
3162
2537
  application_id: Joi.string().allow("").required(),
3163
- buy_rules: CartPlatformModel.ItemCriteria(),
3164
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2538
+ buy_rules: Joi.object()
2539
+ .pattern(/\S/, CartPlatformModel.ItemCriteria())
2540
+ .required(),
2541
+ _custom_json: Joi.any(),
3165
2542
  date_meta: CartPlatformModel.PromotionDateMeta(),
3166
2543
  tags: Joi.array().items(Joi.string().allow("")),
3167
- is_archived: Joi.boolean(),
3168
2544
  });
3169
2545
  }
3170
2546
 
@@ -3176,8 +2552,8 @@ class CartPlatformModel {
3176
2552
  });
3177
2553
  }
3178
2554
 
3179
- /** @returns {ActivePromosResult} */
3180
- static ActivePromosResult() {
2555
+ /** @returns {ActivePromosResponse} */
2556
+ static ActivePromosResponse() {
3181
2557
  return Joi.object({
3182
2558
  entity_slug: Joi.string().allow(""),
3183
2559
  title: Joi.string().allow(""),
@@ -3246,14 +2622,14 @@ class CartPlatformModel {
3246
2622
  type: Joi.string().allow(""),
3247
2623
  article_id: Joi.string().allow("").required(),
3248
2624
  quantity: Joi.number(),
3249
- meta: Joi.object().pattern(/\S/, Joi.any()),
2625
+ meta: Joi.any(),
3250
2626
  });
3251
2627
  }
3252
2628
 
3253
2629
  /** @returns {PriceAdjustmentRestrictions} */
3254
2630
  static PriceAdjustmentRestrictions() {
3255
2631
  return Joi.object({
3256
- post_order: Joi.object().pattern(/\S/, Joi.any()),
2632
+ post_order: Joi.any(),
3257
2633
  });
3258
2634
  }
3259
2635
 
@@ -3280,9 +2656,8 @@ class CartPlatformModel {
3280
2656
  is_authenticated: Joi.boolean().required(),
3281
2657
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
3282
2658
  auto_remove: Joi.boolean(),
3283
- meta: Joi.object().pattern(/\S/, Joi.any()),
2659
+ meta: Joi.any(),
3284
2660
  cart_id: Joi.string().allow("").required(),
3285
- distribution_logic: CartPlatformModel.DistributionLogic(),
3286
2661
  });
3287
2662
  }
3288
2663
 
@@ -3301,21 +2676,20 @@ class CartPlatformModel {
3301
2676
  is_authenticated: Joi.boolean().required(),
3302
2677
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
3303
2678
  auto_remove: Joi.boolean(),
3304
- meta: Joi.object().pattern(/\S/, Joi.any()),
2679
+ meta: Joi.any(),
3305
2680
  cart_id: Joi.string().allow("").required(),
3306
- distribution_logic: CartPlatformModel.DistributionLogic(),
3307
2681
  });
3308
2682
  }
3309
2683
 
3310
- /** @returns {PriceAdjustmentResult} */
3311
- static PriceAdjustmentResult() {
2684
+ /** @returns {PriceAdjustmentResponse} */
2685
+ static PriceAdjustmentResponse() {
3312
2686
  return Joi.object({
3313
2687
  data: CartPlatformModel.PriceAdjustment(),
3314
2688
  });
3315
2689
  }
3316
2690
 
3317
- /** @returns {GetPriceAdjustmentResult} */
3318
- static GetPriceAdjustmentResult() {
2691
+ /** @returns {GetPriceAdjustmentResponse} */
2692
+ static GetPriceAdjustmentResponse() {
3319
2693
  return Joi.object({
3320
2694
  data: Joi.array().items(CartPlatformModel.PriceAdjustment()),
3321
2695
  });
@@ -3335,34 +2709,9 @@ class CartPlatformModel {
3335
2709
  allowed_refund: Joi.boolean(),
3336
2710
  is_authenticated: Joi.boolean().required(),
3337
2711
  article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
3338
- meta: Joi.object().pattern(/\S/, Joi.any()),
2712
+ meta: Joi.any(),
3339
2713
  cart_id: Joi.string().allow("").required(),
3340
2714
  auto_remove: Joi.boolean(),
3341
- distribution_logic: CartPlatformModel.DistributionLogic(),
3342
- });
3343
- }
3344
-
3345
- /** @returns {DistributionRule} */
3346
- static DistributionRule() {
3347
- return Joi.object({
3348
- conditions: Joi.object().pattern(/\S/, Joi.any()),
3349
- });
3350
- }
3351
-
3352
- /** @returns {Distribution} */
3353
- static Distribution() {
3354
- return Joi.object({
3355
- type: Joi.string().allow(""),
3356
- logic: Joi.string().allow(""),
3357
- rule: CartPlatformModel.DistributionRule(),
3358
- });
3359
- }
3360
-
3361
- /** @returns {DistributionLogic} */
3362
- static DistributionLogic() {
3363
- return Joi.object({
3364
- distribution_level: Joi.string().allow(""),
3365
- distribution: CartPlatformModel.Distribution(),
3366
2715
  });
3367
2716
  }
3368
2717
 
@@ -3375,8 +2724,8 @@ class CartPlatformModel {
3375
2724
  });
3376
2725
  }
3377
2726
 
3378
- /** @returns {OpenapiCartDetailsCreation} */
3379
- static OpenapiCartDetailsCreation() {
2727
+ /** @returns {OpenapiCartDetailsRequest} */
2728
+ static OpenapiCartDetailsRequest() {
3380
2729
  return Joi.object({
3381
2730
  cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
3382
2731
  });
@@ -3464,7 +2813,7 @@ class CartPlatformModel {
3464
2813
  /** @returns {Tags} */
3465
2814
  static Tags() {
3466
2815
  return Joi.object({
3467
- tags: Joi.object().pattern(/\S/, Joi.any()),
2816
+ tags: Joi.any(),
3468
2817
  });
3469
2818
  }
3470
2819
 
@@ -3483,28 +2832,12 @@ class CartPlatformModel {
3483
2832
  });
3484
2833
  }
3485
2834
 
3486
- /** @returns {ProductActionParams} */
3487
- static ProductActionParams() {
3488
- return Joi.object({
3489
- slug: Joi.array().items(Joi.string().allow("")),
3490
- });
3491
- }
3492
-
3493
- /** @returns {ProductActionPage} */
3494
- static ProductActionPage() {
3495
- return Joi.object({
3496
- type: Joi.string().allow(""),
3497
- params: CartPlatformModel.ProductActionParams(),
3498
- });
3499
- }
3500
-
3501
2835
  /** @returns {ProductAction} */
3502
2836
  static ProductAction() {
3503
2837
  return Joi.object({
3504
2838
  type: Joi.string().allow(""),
3505
2839
  url: Joi.string().allow(""),
3506
2840
  query: CartPlatformModel.ActionQuery(),
3507
- page: CartPlatformModel.ProductActionPage(),
3508
2841
  });
3509
2842
  }
3510
2843
 
@@ -3526,12 +2859,12 @@ class CartPlatformModel {
3526
2859
  action: CartPlatformModel.ProductAction(),
3527
2860
  uid: Joi.number(),
3528
2861
  tags: Joi.array().items(Joi.string().allow("")),
3529
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2862
+ _custom_json: Joi.any(),
3530
2863
  type: Joi.string().allow(""),
3531
2864
  name: Joi.string().allow(""),
3532
2865
  item_code: Joi.string().allow("").allow(null),
3533
2866
  categories: Joi.array().items(CartPlatformModel.CategoryInfo()),
3534
- attributes: Joi.object().pattern(/\S/, Joi.any()),
2867
+ attributes: Joi.any(),
3535
2868
  });
3536
2869
  }
3537
2870
 
@@ -3568,19 +2901,19 @@ class CartPlatformModel {
3568
2901
  seller_identifier: Joi.string().allow(""),
3569
2902
  quantity: Joi.number(),
3570
2903
  seller: CartPlatformModel.BaseInfo(),
3571
- cart_item_meta: Joi.object().pattern(/\S/, Joi.any()),
3572
- parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
2904
+ cart_item_meta: Joi.any(),
2905
+ parent_item_identifiers: Joi.any(),
3573
2906
  is_gift_visible: Joi.boolean(),
3574
2907
  uid: Joi.string().allow(""),
3575
- gift_card: Joi.object().pattern(/\S/, Joi.any()),
2908
+ gift_card: Joi.any(),
3576
2909
  product_group_tags: Joi.array().items(Joi.string().allow("")),
3577
- identifier: Joi.object().pattern(/\S/, Joi.any()),
2910
+ identifier: Joi.any(),
3578
2911
  mto_quantity: Joi.number(),
3579
- extra_meta: Joi.object().pattern(/\S/, Joi.any()),
2912
+ extra_meta: Joi.any(),
3580
2913
  type: Joi.string().allow(""),
3581
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2914
+ _custom_json: Joi.any(),
3582
2915
  price: CartPlatformModel.ArticlePriceInfo(),
3583
- meta: Joi.object().pattern(/\S/, Joi.any()),
2916
+ meta: Joi.any(),
3584
2917
  size: Joi.string().allow(""),
3585
2918
  store: CartPlatformModel.StoreInfo(),
3586
2919
  tags: Joi.array().items(Joi.string().allow("")),
@@ -3598,9 +2931,9 @@ class CartPlatformModel {
3598
2931
  /** @returns {DiscountRulesApp} */
3599
2932
  static DiscountRulesApp() {
3600
2933
  return Joi.object({
3601
- offer: Joi.object().pattern(/\S/, Joi.any()),
3602
- raw_offer: Joi.object().pattern(/\S/, Joi.any()),
3603
- item_criteria: Joi.object().pattern(/\S/, Joi.any()),
2934
+ offer: Joi.any(),
2935
+ raw_offer: Joi.any(),
2936
+ item_criteria: Joi.any(),
3604
2937
  matched_buy_rules: Joi.array().items(Joi.string().allow("")),
3605
2938
  });
3606
2939
  }
@@ -3618,8 +2951,8 @@ class CartPlatformModel {
3618
2951
  /** @returns {BuyRules} */
3619
2952
  static BuyRules() {
3620
2953
  return Joi.object({
3621
- cart_conditions: Joi.object().pattern(/\S/, Joi.any()),
3622
- item_criteria: Joi.object().pattern(/\S/, Joi.any()),
2954
+ cart_conditions: Joi.any(),
2955
+ item_criteria: Joi.any(),
3623
2956
  });
3624
2957
  }
3625
2958
 
@@ -3642,7 +2975,7 @@ class CartPlatformModel {
3642
2975
  mrp_promotion: Joi.boolean(),
3643
2976
  promotion_group: Joi.string().allow(""),
3644
2977
  promo_id: Joi.string().allow(""),
3645
- meta: Joi.object().pattern(/\S/, Joi.any()),
2978
+ meta: Joi.any(),
3646
2979
  code: Joi.string().allow("").allow(null),
3647
2980
  });
3648
2981
  }
@@ -3752,7 +3085,7 @@ class CartPlatformModel {
3752
3085
  quantity: Joi.number(),
3753
3086
  product: CartPlatformModel.CartProduct(),
3754
3087
  product_ean_id: Joi.string().allow(""),
3755
- parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
3088
+ parent_item_identifiers: Joi.any(),
3756
3089
  is_set: Joi.boolean(),
3757
3090
  article: CartPlatformModel.ProductArticle(),
3758
3091
  promotions_applied: Joi.array().items(
@@ -3761,22 +3094,22 @@ class CartPlatformModel {
3761
3094
  delivery_promise: CartPlatformModel.ShipmentPromise(),
3762
3095
  key: Joi.string().allow(""),
3763
3096
  coupon: CartPlatformModel.CouponDetails(),
3764
- bulk_offer: Joi.object().pattern(/\S/, Joi.any()),
3097
+ bulk_offer: Joi.any(),
3765
3098
  price: CartPlatformModel.ProductPriceInfo(),
3766
3099
  coupon_message: Joi.string().allow(""),
3767
3100
  identifiers: CartPlatformModel.CartProductIdentifer().required(),
3768
3101
  message: Joi.string().allow(""),
3769
3102
  discount: Joi.string().allow(""),
3770
3103
  availability: CartPlatformModel.ProductAvailability(),
3771
- moq: Joi.object().pattern(/\S/, Joi.any()),
3104
+ moq: Joi.any(),
3772
3105
  price_per_unit: CartPlatformModel.ProductPriceInfo(),
3773
3106
  promo_meta: CartPlatformModel.PromoMeta(),
3774
- custom_order: Joi.object().pattern(/\S/, Joi.any()),
3107
+ custom_order: Joi.any(),
3775
3108
  });
3776
3109
  }
3777
3110
 
3778
- /** @returns {OpenapiCartDetailsResult} */
3779
- static OpenapiCartDetailsResult() {
3111
+ /** @returns {OpenapiCartDetailsResponse} */
3112
+ static OpenapiCartDetailsResponse() {
3780
3113
  return Joi.object({
3781
3114
  is_valid: Joi.boolean(),
3782
3115
  message: Joi.string().allow(""),
@@ -3785,12 +3118,12 @@ class CartPlatformModel {
3785
3118
  });
3786
3119
  }
3787
3120
 
3788
- /** @returns {OpenApiErrorResult} */
3789
- static OpenApiErrorResult() {
3121
+ /** @returns {OpenApiErrorResponse} */
3122
+ static OpenApiErrorResponse() {
3790
3123
  return Joi.object({
3791
3124
  success: Joi.boolean(),
3792
3125
  message: Joi.string().allow(""),
3793
- errors: Joi.object().pattern(/\S/, Joi.any()),
3126
+ errors: Joi.any(),
3794
3127
  });
3795
3128
  }
3796
3129
 
@@ -3804,7 +3137,7 @@ class CartPlatformModel {
3804
3137
  area_code: Joi.string().allow("").required(),
3805
3138
  country_iso_code: Joi.string().allow(""),
3806
3139
  country_phone_code: Joi.string().allow(""),
3807
- meta: Joi.object().pattern(/\S/, Joi.any()),
3140
+ meta: Joi.any(),
3808
3141
  address_type: Joi.string().allow(""),
3809
3142
  area: Joi.string().allow(""),
3810
3143
  area_code_slug: Joi.string().allow(""),
@@ -3817,16 +3150,16 @@ class CartPlatformModel {
3817
3150
  });
3818
3151
  }
3819
3152
 
3820
- /** @returns {OpenApiCartServiceabilityCreation} */
3821
- static OpenApiCartServiceabilityCreation() {
3153
+ /** @returns {OpenApiCartServiceabilityRequest} */
3154
+ static OpenApiCartServiceabilityRequest() {
3822
3155
  return Joi.object({
3823
3156
  cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(),
3824
3157
  shipping_address: CartPlatformModel.ShippingAddress().required(),
3825
3158
  });
3826
3159
  }
3827
3160
 
3828
- /** @returns {OpenApiCartServiceabilityResult} */
3829
- static OpenApiCartServiceabilityResult() {
3161
+ /** @returns {OpenApiCartServiceabilityResponse} */
3162
+ static OpenApiCartServiceabilityResponse() {
3830
3163
  return Joi.object({
3831
3164
  is_valid: Joi.boolean(),
3832
3165
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -3857,7 +3190,7 @@ class CartPlatformModel {
3857
3190
  return Joi.object({
3858
3191
  payment_id: Joi.string().allow("").allow(null),
3859
3192
  payment_gateway: Joi.string().allow("").allow(null),
3860
- extra_meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3193
+ extra_meta: Joi.any().allow(null),
3861
3194
  current_status: Joi.string().allow("").allow(null),
3862
3195
  order_id: Joi.string().allow("").allow(null),
3863
3196
  });
@@ -3885,7 +3218,7 @@ class CartPlatformModel {
3885
3218
  price_marked: Joi.number().required(),
3886
3219
  files: Joi.array().items(CartPlatformModel.OpenApiFiles()),
3887
3220
  meta: CartPlatformModel.CartItemMeta(),
3888
- extra_meta: Joi.object().pattern(/\S/, Joi.any()),
3221
+ extra_meta: Joi.any(),
3889
3222
  product_id: Joi.number().required(),
3890
3223
  loyalty_discount: Joi.number(),
3891
3224
  discount: Joi.number().required(),
@@ -3912,7 +3245,7 @@ class CartPlatformModel {
3912
3245
  payment_methods: Joi.array()
3913
3246
  .items(CartPlatformModel.MultiTenderPaymentMethod())
3914
3247
  .required(),
3915
- employee_discount: Joi.object().pattern(/\S/, Joi.any()),
3248
+ employee_discount: Joi.any(),
3916
3249
  coupon: Joi.string().allow(""),
3917
3250
  cashback_applied: Joi.number().required(),
3918
3251
  gstin: Joi.string().allow("").allow(null),
@@ -3928,8 +3261,8 @@ class CartPlatformModel {
3928
3261
  });
3929
3262
  }
3930
3263
 
3931
- /** @returns {OpenApiCheckoutResult} */
3932
- static OpenApiCheckoutResult() {
3264
+ /** @returns {OpenApiCheckoutResponse} */
3265
+ static OpenApiCheckoutResponse() {
3933
3266
  return Joi.object({
3934
3267
  success: Joi.boolean(),
3935
3268
  message: Joi.string().allow(""),
@@ -3942,48 +3275,46 @@ class CartPlatformModel {
3942
3275
  static AbandonedCart() {
3943
3276
  return Joi.object({
3944
3277
  expire_at: Joi.string().allow("").required(),
3945
- promotion: Joi.object().pattern(/\S/, Joi.any()),
3278
+ promotion: Joi.any(),
3946
3279
  is_default: Joi.boolean().required(),
3947
3280
  comment: Joi.string().allow("").allow(null),
3948
3281
  articles: Joi.array().items(Joi.any()).required(),
3949
- coupon: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3282
+ coupon: Joi.any().allow(null),
3950
3283
  bulk_coupon_discount: Joi.number().allow(null),
3951
3284
  _id: Joi.string().allow("").required(),
3952
- fynd_credits: Joi.object().pattern(/\S/, Joi.any()),
3285
+ fynd_credits: Joi.any(),
3953
3286
  fc_index_map: Joi.array().items(Joi.number()),
3954
3287
  order_id: Joi.string().allow(""),
3955
3288
  discount: Joi.number(),
3956
- cod_charges: Joi.object().pattern(/\S/, Joi.any()),
3957
- payments: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3289
+ cod_charges: Joi.any(),
3290
+ payments: Joi.any().allow(null),
3958
3291
  payment_mode: Joi.string().allow("").allow(null),
3959
3292
  shipments: Joi.array().items(Joi.any()),
3960
- pick_up_customer_details: Joi.object()
3961
- .pattern(/\S/, Joi.any())
3962
- .allow(null, ""),
3293
+ pick_up_customer_details: Joi.any().allow(null),
3963
3294
  uid: Joi.number().required(),
3964
3295
  checkout_mode: Joi.string().allow(""),
3965
3296
  cart_value: Joi.number(),
3966
3297
  is_archive: Joi.boolean(),
3967
3298
  created_on: Joi.string().allow("").required(),
3968
3299
  last_modified: Joi.string().allow("").required(),
3969
- meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3300
+ meta: Joi.any().allow(null),
3970
3301
  buy_now: Joi.boolean(),
3971
3302
  is_active: Joi.boolean(),
3972
- cashback: Joi.object().pattern(/\S/, Joi.any()).required(),
3303
+ cashback: Joi.any().required(),
3973
3304
  payment_methods: Joi.array().items(Joi.any()),
3974
3305
  gstin: Joi.string().allow("").allow(null),
3975
- delivery_charges: Joi.object().pattern(/\S/, Joi.any()),
3306
+ delivery_charges: Joi.any(),
3976
3307
  merge_qty: Joi.boolean().allow(null),
3977
3308
  user_id: Joi.string().allow("").required(),
3978
3309
  app_id: Joi.string().allow(""),
3979
3310
  });
3980
3311
  }
3981
3312
 
3982
- /** @returns {AbandonedCartResult} */
3983
- static AbandonedCartResult() {
3313
+ /** @returns {AbandonedCartResponse} */
3314
+ static AbandonedCartResponse() {
3984
3315
  return Joi.object({
3985
3316
  items: Joi.array().items(CartPlatformModel.AbandonedCart()),
3986
- result: Joi.object().pattern(/\S/, Joi.any()),
3317
+ result: Joi.any(),
3987
3318
  page: CartPlatformModel.Page(),
3988
3319
  success: Joi.boolean(),
3989
3320
  message: Joi.string().allow(""),
@@ -4052,14 +3383,14 @@ class CartPlatformModel {
4052
3383
  });
4053
3384
  }
4054
3385
 
4055
- /** @returns {CartDetailResult} */
4056
- static CartDetailResult() {
3386
+ /** @returns {CartDetailResponse} */
3387
+ static CartDetailResponse() {
4057
3388
  return Joi.object({
4058
3389
  cart_id: Joi.number(),
4059
3390
  uid: Joi.string().allow(""),
4060
3391
  coupon_text: Joi.string().allow(""),
4061
3392
  id: Joi.string().allow(""),
4062
- pan_config: Joi.object().pattern(/\S/, Joi.any()),
3393
+ pan_config: Joi.any(),
4063
3394
  delivery_promise: CartPlatformModel.ShipmentPromise(),
4064
3395
  comment: Joi.string().allow(""),
4065
3396
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -4069,7 +3400,7 @@ class CartPlatformModel {
4069
3400
  coupon: CartPlatformModel.CartDetailCoupon(),
4070
3401
  restrict_checkout: Joi.boolean(),
4071
3402
  message: Joi.string().allow(""),
4072
- notification: Joi.object().pattern(/\S/, Joi.any()),
3403
+ notification: Joi.any(),
4073
3404
  staff_user_id: Joi.string().allow(""),
4074
3405
  success: Joi.boolean(),
4075
3406
  breakup_values: CartPlatformModel.CartBreakup(),
@@ -4083,7 +3414,7 @@ class CartPlatformModel {
4083
3414
  CartPlatformModel.AppliedPromotion()
4084
3415
  ),
4085
3416
  pan_no: Joi.string().allow(""),
4086
- custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3417
+ custom_cart_meta: Joi.any(),
4087
3418
  });
4088
3419
  }
4089
3420
 
@@ -4098,31 +3429,31 @@ class CartPlatformModel {
4098
3429
  ),
4099
3430
  product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
4100
3431
  article_id: Joi.string().allow(""),
4101
- article_assignment: Joi.object().pattern(/\S/, Joi.any()),
3432
+ article_assignment: Joi.any(),
4102
3433
  store_id: Joi.number(),
4103
3434
  display: Joi.string().allow(""),
4104
3435
  item_id: Joi.number(),
4105
- extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4106
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
4107
- meta: Joi.object().pattern(/\S/, Joi.any()),
3436
+ extra_meta: Joi.any(),
3437
+ _custom_json: Joi.any(),
3438
+ meta: Joi.any(),
4108
3439
  pos: Joi.boolean(),
4109
3440
  seller_identifier: Joi.string().allow(""),
4110
3441
  });
4111
3442
  }
4112
3443
 
4113
- /** @returns {AddCartCreation} */
4114
- static AddCartCreation() {
3444
+ /** @returns {AddCartRequest} */
3445
+ static AddCartRequest() {
4115
3446
  return Joi.object({
4116
3447
  new_cart: Joi.boolean(),
4117
3448
  items: Joi.array().items(CartPlatformModel.AddProductCart()),
4118
3449
  });
4119
3450
  }
4120
3451
 
4121
- /** @returns {AddCartDetailResult} */
4122
- static AddCartDetailResult() {
3452
+ /** @returns {AddCartDetailResponse} */
3453
+ static AddCartDetailResponse() {
4123
3454
  return Joi.object({
4124
3455
  success: Joi.boolean(),
4125
- cart: CartPlatformModel.CartDetailResult(),
3456
+ cart: CartPlatformModel.CartDetailResponse(),
4126
3457
  partial: Joi.boolean(),
4127
3458
  message: Joi.string().allow(""),
4128
3459
  });
@@ -4133,10 +3464,10 @@ class CartPlatformModel {
4133
3464
  return Joi.object({
4134
3465
  quantity: Joi.number(),
4135
3466
  item_size: Joi.string().allow(""),
4136
- parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()),
4137
- meta: Joi.object().pattern(/\S/, Joi.any()),
4138
- extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4139
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3467
+ parent_item_identifiers: Joi.any(),
3468
+ meta: Joi.any(),
3469
+ extra_meta: Joi.any(),
3470
+ _custom_json: Joi.any(),
4140
3471
  item_id: Joi.number(),
4141
3472
  item_index: Joi.number(),
4142
3473
  identifiers: CartPlatformModel.CartProductIdentifer().required(),
@@ -4144,31 +3475,19 @@ class CartPlatformModel {
4144
3475
  });
4145
3476
  }
4146
3477
 
4147
- /** @returns {FreeGiftItemCreation} */
4148
- static FreeGiftItemCreation() {
4149
- return Joi.object({
4150
- promotion_id: Joi.string().allow("").required(),
4151
- item_id: Joi.string().allow("").required(),
4152
- item_size: Joi.string().allow("").required(),
4153
- });
4154
- }
4155
-
4156
- /** @returns {UpdateCartCreation} */
4157
- static UpdateCartCreation() {
3478
+ /** @returns {UpdateCartRequest} */
3479
+ static UpdateCartRequest() {
4158
3480
  return Joi.object({
4159
3481
  items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
4160
- free_gift_items: Joi.array().items(
4161
- CartPlatformModel.FreeGiftItemCreation()
4162
- ),
4163
3482
  operation: Joi.string().allow("").required(),
4164
3483
  });
4165
3484
  }
4166
3485
 
4167
- /** @returns {UpdateCartDetailResult} */
4168
- static UpdateCartDetailResult() {
3486
+ /** @returns {UpdateCartDetailResponse} */
3487
+ static UpdateCartDetailResponse() {
4169
3488
  return Joi.object({
4170
3489
  success: Joi.boolean(),
4171
- cart: CartPlatformModel.CartDetailResult(),
3490
+ cart: CartPlatformModel.CartDetailResponse(),
4172
3491
  message: Joi.string().allow(""),
4173
3492
  });
4174
3493
  }
@@ -4194,7 +3513,7 @@ class CartPlatformModel {
4194
3513
  price_marked: Joi.number().required(),
4195
3514
  amount_paid: Joi.number().required(),
4196
3515
  promo_list: Joi.array().items(CartPlatformModel.OverrideCartItemPromo()),
4197
- extra_meta: Joi.object().pattern(/\S/, Joi.any()),
3516
+ extra_meta: Joi.any(),
4198
3517
  item_id: Joi.number().required(),
4199
3518
  discount: Joi.number().required(),
4200
3519
  price_effective: Joi.number().required(),
@@ -4206,9 +3525,9 @@ class CartPlatformModel {
4206
3525
  return Joi.object({
4207
3526
  cart_id: Joi.string().allow("").required(),
4208
3527
  payment_mode: Joi.string().allow("").required(),
4209
- billing_address: Joi.object().pattern(/\S/, Joi.any()),
3528
+ billing_address: Joi.any(),
4210
3529
  merchant_code: Joi.string().allow("").required(),
4211
- payment_identifier: Joi.string().allow("").required(),
3530
+ payment_identifier: Joi.string().allow("").allow(null).required(),
4212
3531
  currency_code: Joi.string().allow("").required(),
4213
3532
  aggregator: Joi.string().allow("").required(),
4214
3533
  order_type: Joi.string().allow("").required(),
@@ -4217,31 +3536,31 @@ class CartPlatformModel {
4217
3536
  .items(CartPlatformModel.OverrideCartItem())
4218
3537
  .required(),
4219
3538
  ordering_store: Joi.number().allow(null),
4220
- shipping_address: Joi.object().pattern(/\S/, Joi.any()),
3539
+ shipping_address: Joi.any(),
4221
3540
  });
4222
3541
  }
4223
3542
 
4224
- /** @returns {OverrideCheckoutResult} */
4225
- static OverrideCheckoutResult() {
3543
+ /** @returns {OverrideCheckoutResponse} */
3544
+ static OverrideCheckoutResponse() {
4226
3545
  return Joi.object({
4227
- data: Joi.object().pattern(/\S/, Joi.any()).required(),
4228
- cart: Joi.object().pattern(/\S/, Joi.any()).required(),
3546
+ data: Joi.any().required(),
3547
+ cart: Joi.any().required(),
4229
3548
  success: Joi.string().allow("").required(),
4230
3549
  order_id: Joi.string().allow("").required(),
4231
3550
  message: Joi.string().allow("").required(),
4232
3551
  });
4233
3552
  }
4234
3553
 
4235
- /** @returns {GetShareCartLinkCreation} */
4236
- static GetShareCartLinkCreation() {
3554
+ /** @returns {GetShareCartLinkRequest} */
3555
+ static GetShareCartLinkRequest() {
4237
3556
  return Joi.object({
4238
3557
  id: Joi.string().allow(""),
4239
- meta: Joi.object().pattern(/\S/, Joi.any()),
3558
+ meta: Joi.any(),
4240
3559
  });
4241
3560
  }
4242
3561
 
4243
- /** @returns {GetShareCartLinkResult} */
4244
- static GetShareCartLinkResult() {
3562
+ /** @returns {GetShareCartLinkResponse} */
3563
+ static GetShareCartLinkResponse() {
4245
3564
  return Joi.object({
4246
3565
  token: Joi.string().allow(""),
4247
3566
  share_url: Joi.string().allow(""),
@@ -4251,11 +3570,11 @@ class CartPlatformModel {
4251
3570
  /** @returns {SharedCartDetails} */
4252
3571
  static SharedCartDetails() {
4253
3572
  return Joi.object({
4254
- source: Joi.object().pattern(/\S/, Joi.any()),
4255
- user: Joi.object().pattern(/\S/, Joi.any()),
3573
+ source: Joi.any(),
3574
+ user: Joi.any(),
4256
3575
  token: Joi.string().allow(""),
4257
3576
  created_on: Joi.string().allow(""),
4258
- meta: Joi.object().pattern(/\S/, Joi.any()),
3577
+ meta: Joi.any(),
4259
3578
  });
4260
3579
  }
4261
3580
 
@@ -4281,12 +3600,12 @@ class CartPlatformModel {
4281
3600
  buy_now: Joi.boolean(),
4282
3601
  cart_id: Joi.number(),
4283
3602
  gstin: Joi.string().allow(""),
4284
- custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3603
+ custom_cart_meta: Joi.any(),
4285
3604
  });
4286
3605
  }
4287
3606
 
4288
- /** @returns {SharedCartResult} */
4289
- static SharedCartResult() {
3607
+ /** @returns {SharedCartResponse} */
3608
+ static SharedCartResponse() {
4290
3609
  return Joi.object({
4291
3610
  cart: CartPlatformModel.SharedCart(),
4292
3611
  error: Joi.string().allow(""),
@@ -4297,7 +3616,7 @@ class CartPlatformModel {
4297
3616
  static CartList() {
4298
3617
  return Joi.object({
4299
3618
  cart_id: Joi.string().allow(""),
4300
- pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()),
3619
+ pick_up_customer_details: Joi.any(),
4301
3620
  cart_value: Joi.number(),
4302
3621
  created_on: Joi.string().allow(""),
4303
3622
  user_id: Joi.string().allow(""),
@@ -4306,8 +3625,8 @@ class CartPlatformModel {
4306
3625
  });
4307
3626
  }
4308
3627
 
4309
- /** @returns {MultiCartResult} */
4310
- static MultiCartResult() {
3628
+ /** @returns {MultiCartResponse} */
3629
+ static MultiCartResponse() {
4311
3630
  return Joi.object({
4312
3631
  success: Joi.boolean(),
4313
3632
  data: Joi.array().items(CartPlatformModel.CartList()),
@@ -4336,13 +3655,13 @@ class CartPlatformModel {
4336
3655
  });
4337
3656
  }
4338
3657
 
4339
- /** @returns {UserCartMappingResult} */
4340
- static UserCartMappingResult() {
3658
+ /** @returns {UserCartMappingResponse} */
3659
+ static UserCartMappingResponse() {
4341
3660
  return Joi.object({
4342
3661
  coupon_text: Joi.string().allow(""),
4343
3662
  user: CartPlatformModel.UserInfo(),
4344
3663
  id: Joi.string().allow(""),
4345
- pan_config: Joi.object().pattern(/\S/, Joi.any()),
3664
+ pan_config: Joi.any(),
4346
3665
  delivery_promise: CartPlatformModel.ShipmentPromise(),
4347
3666
  comment: Joi.string().allow(""),
4348
3667
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -4357,7 +3676,7 @@ class CartPlatformModel {
4357
3676
  last_modified: Joi.string().allow(""),
4358
3677
  buy_now: Joi.boolean(),
4359
3678
  gstin: Joi.string().allow(""),
4360
- custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3679
+ custom_cart_meta: Joi.any(),
4361
3680
  applied_promo_details: Joi.array().items(
4362
3681
  CartPlatformModel.AppliedPromotion()
4363
3682
  ),
@@ -4365,8 +3684,8 @@ class CartPlatformModel {
4365
3684
  });
4366
3685
  }
4367
3686
 
4368
- /** @returns {PlatformAddCartDetails} */
4369
- static PlatformAddCartDetails() {
3687
+ /** @returns {PlatformAddCartRequest} */
3688
+ static PlatformAddCartRequest() {
4370
3689
  return Joi.object({
4371
3690
  user_id: Joi.string().allow(""),
4372
3691
  new_cart: Joi.boolean(),
@@ -4374,35 +3693,32 @@ class CartPlatformModel {
4374
3693
  });
4375
3694
  }
4376
3695
 
4377
- /** @returns {PlatformUpdateCartDetails} */
4378
- static PlatformUpdateCartDetails() {
3696
+ /** @returns {PlatformUpdateCartRequest} */
3697
+ static PlatformUpdateCartRequest() {
4379
3698
  return Joi.object({
4380
3699
  user_id: Joi.string().allow(""),
4381
3700
  items: Joi.array().items(CartPlatformModel.UpdateProductCart()),
4382
- free_gift_items: Joi.array().items(
4383
- CartPlatformModel.FreeGiftItemCreation()
4384
- ),
4385
3701
  operation: Joi.string().allow("").required(),
4386
3702
  });
4387
3703
  }
4388
3704
 
4389
- /** @returns {DeleteCartDetails} */
4390
- static DeleteCartDetails() {
3705
+ /** @returns {DeleteCartRequest} */
3706
+ static DeleteCartRequest() {
4391
3707
  return Joi.object({
4392
3708
  cart_id_list: Joi.array().items(Joi.string().allow("")),
4393
3709
  });
4394
3710
  }
4395
3711
 
4396
- /** @returns {DeleteCartDetailResult} */
4397
- static DeleteCartDetailResult() {
3712
+ /** @returns {DeleteCartDetailResponse} */
3713
+ static DeleteCartDetailResponse() {
4398
3714
  return Joi.object({
4399
3715
  success: Joi.boolean(),
4400
3716
  message: Joi.string().allow(""),
4401
3717
  });
4402
3718
  }
4403
3719
 
4404
- /** @returns {CartItemCountResult} */
4405
- static CartItemCountResult() {
3720
+ /** @returns {CartItemCountResponse} */
3721
+ static CartItemCountResponse() {
4406
3722
  return Joi.object({
4407
3723
  user_cart_items_count: Joi.number(),
4408
3724
  });
@@ -4440,16 +3756,16 @@ class CartPlatformModel {
4440
3756
  });
4441
3757
  }
4442
3758
 
4443
- /** @returns {GetCouponResult} */
4444
- static GetCouponResult() {
3759
+ /** @returns {GetCouponResponse} */
3760
+ static GetCouponResponse() {
4445
3761
  return Joi.object({
4446
3762
  available_coupon_list: Joi.array().items(CartPlatformModel.Coupon()),
4447
3763
  page: CartPlatformModel.PageCoupon(),
4448
3764
  });
4449
3765
  }
4450
3766
 
4451
- /** @returns {ApplyCouponDetails} */
4452
- static ApplyCouponDetails() {
3767
+ /** @returns {ApplyCouponRequest} */
3768
+ static ApplyCouponRequest() {
4453
3769
  return Joi.object({
4454
3770
  coupon_code: Joi.string().allow("").required(),
4455
3771
  });
@@ -4480,10 +3796,10 @@ class CartPlatformModel {
4480
3796
  email: Joi.string().allow(""),
4481
3797
  area_code: Joi.string().allow(""),
4482
3798
  checkout_mode: Joi.string().allow(""),
4483
- meta: Joi.object().pattern(/\S/, Joi.any()),
3799
+ meta: Joi.any(),
4484
3800
  is_active: Joi.boolean(),
4485
3801
  name: Joi.string().allow(""),
4486
- google_map_point: Joi.object().pattern(/\S/, Joi.any()),
3802
+ google_map_point: Joi.any(),
4487
3803
  cart_id: Joi.string().allow(""),
4488
3804
  city: Joi.string().allow(""),
4489
3805
  sector: Joi.string().allow(""),
@@ -4494,28 +3810,19 @@ class CartPlatformModel {
4494
3810
  address: Joi.string().allow(""),
4495
3811
  country_phone_code: Joi.string().allow(""),
4496
3812
  country_iso_code: Joi.string().allow(""),
4497
- _custom_json: Joi.object().pattern(/\S/, Joi.any()),
4498
- });
4499
- }
4500
-
4501
- /** @returns {ValidationConfig} */
4502
- static ValidationConfig() {
4503
- return Joi.object({
4504
- address_max_limit: Joi.number().required(),
4505
- user_address_count: Joi.number().required(),
3813
+ _custom_json: Joi.any(),
4506
3814
  });
4507
3815
  }
4508
3816
 
4509
- /** @returns {PlatformGetAddressesDetails} */
4510
- static PlatformGetAddressesDetails() {
3817
+ /** @returns {PlatformGetAddressesResponse} */
3818
+ static PlatformGetAddressesResponse() {
4511
3819
  return Joi.object({
4512
3820
  address: Joi.array().items(CartPlatformModel.PlatformAddress()),
4513
- validation_config: CartPlatformModel.ValidationConfig(),
4514
3821
  });
4515
3822
  }
4516
3823
 
4517
- /** @returns {SaveAddressDetails} */
4518
- static SaveAddressDetails() {
3824
+ /** @returns {SaveAddressResponse} */
3825
+ static SaveAddressResponse() {
4519
3826
  return Joi.object({
4520
3827
  id: Joi.string().allow(""),
4521
3828
  success: Joi.boolean(),
@@ -4523,8 +3830,8 @@ class CartPlatformModel {
4523
3830
  });
4524
3831
  }
4525
3832
 
4526
- /** @returns {UpdateAddressDetails} */
4527
- static UpdateAddressDetails() {
3833
+ /** @returns {UpdateAddressResponse} */
3834
+ static UpdateAddressResponse() {
4528
3835
  return Joi.object({
4529
3836
  id: Joi.string().allow(""),
4530
3837
  is_default_address: Joi.boolean(),
@@ -4533,16 +3840,16 @@ class CartPlatformModel {
4533
3840
  });
4534
3841
  }
4535
3842
 
4536
- /** @returns {DeleteAddressResult} */
4537
- static DeleteAddressResult() {
3843
+ /** @returns {DeleteAddressResponse} */
3844
+ static DeleteAddressResponse() {
4538
3845
  return Joi.object({
4539
3846
  id: Joi.string().allow(""),
4540
3847
  is_deleted: Joi.boolean(),
4541
3848
  });
4542
3849
  }
4543
3850
 
4544
- /** @returns {PlatformSelectCartAddress} */
4545
- static PlatformSelectCartAddress() {
3851
+ /** @returns {PlatformSelectCartAddressRequest} */
3852
+ static PlatformSelectCartAddressRequest() {
4546
3853
  return Joi.object({
4547
3854
  cart_id: Joi.string().allow(""),
4548
3855
  billing_address_id: Joi.string().allow(""),
@@ -4561,13 +3868,13 @@ class CartPlatformModel {
4561
3868
  });
4562
3869
  }
4563
3870
 
4564
- /** @returns {PlatformShipmentDetails} */
4565
- static PlatformShipmentDetails() {
3871
+ /** @returns {PlatformShipmentResponse} */
3872
+ static PlatformShipmentResponse() {
4566
3873
  return Joi.object({
4567
3874
  shipments: Joi.number(),
4568
3875
  fulfillment_id: Joi.number(),
4569
3876
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
4570
- dp_options: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3877
+ dp_options: Joi.any().allow(null),
4571
3878
  shipment_type: Joi.string().allow(""),
4572
3879
  order_type: Joi.string().allow(""),
4573
3880
  box_type: Joi.string().allow("").allow(null),
@@ -4578,12 +3885,12 @@ class CartPlatformModel {
4578
3885
  });
4579
3886
  }
4580
3887
 
4581
- /** @returns {PlatformCartShipmentsResult} */
4582
- static PlatformCartShipmentsResult() {
3888
+ /** @returns {PlatformCartShipmentsResponse} */
3889
+ static PlatformCartShipmentsResponse() {
4583
3890
  return Joi.object({
4584
3891
  coupon_text: Joi.string().allow(""),
4585
3892
  id: Joi.string().allow(""),
4586
- pan_config: Joi.object().pattern(/\S/, Joi.any()),
3893
+ pan_config: Joi.any(),
4587
3894
  delivery_promise: CartPlatformModel.ShipmentPromise(),
4588
3895
  comment: Joi.string().allow(""),
4589
3896
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
@@ -4594,7 +3901,9 @@ class CartPlatformModel {
4594
3901
  breakup_values: CartPlatformModel.CartBreakup(),
4595
3902
  staff_user_id: Joi.string().allow("").allow(null),
4596
3903
  is_valid: Joi.boolean(),
4597
- shipments: Joi.array().items(CartPlatformModel.PlatformShipmentDetails()),
3904
+ shipments: Joi.array().items(
3905
+ CartPlatformModel.PlatformShipmentResponse()
3906
+ ),
4598
3907
  currency: CartPlatformModel.CartCurrency(),
4599
3908
  checkout_mode: Joi.string().allow(""),
4600
3909
  last_modified: Joi.string().allow(""),
@@ -4605,7 +3914,7 @@ class CartPlatformModel {
4605
3914
  ),
4606
3915
  error: Joi.boolean(),
4607
3916
  pan_no: Joi.string().allow(""),
4608
- custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
3917
+ custom_cart_meta: Joi.any(),
4609
3918
  });
4610
3919
  }
4611
3920
 
@@ -4618,8 +3927,8 @@ class CartPlatformModel {
4618
3927
  });
4619
3928
  }
4620
3929
 
4621
- /** @returns {UpdateCartShipmentCreation} */
4622
- static UpdateCartShipmentCreation() {
3930
+ /** @returns {UpdateCartShipmentRequest} */
3931
+ static UpdateCartShipmentRequest() {
4623
3932
  return Joi.object({
4624
3933
  shipments: Joi.array()
4625
3934
  .items(CartPlatformModel.UpdateCartShipmentItem())
@@ -4627,29 +3936,29 @@ class CartPlatformModel {
4627
3936
  });
4628
3937
  }
4629
3938
 
4630
- /** @returns {PlatformCartMetaCreation} */
4631
- static PlatformCartMetaCreation() {
3939
+ /** @returns {PlatformCartMetaRequest} */
3940
+ static PlatformCartMetaRequest() {
4632
3941
  return Joi.object({
4633
3942
  gstin: Joi.string().allow(""),
4634
- pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()),
3943
+ pick_up_customer_details: Joi.any(),
4635
3944
  checkout_mode: Joi.string().allow(""),
4636
- gift_details: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
3945
+ gift_details: Joi.any().allow(null),
4637
3946
  pan_no: Joi.string().allow(""),
4638
3947
  comment: Joi.string().allow(""),
4639
3948
  staff_user_id: Joi.string().allow("").allow(null),
4640
3949
  });
4641
3950
  }
4642
3951
 
4643
- /** @returns {CartMetaDetails} */
4644
- static CartMetaDetails() {
3952
+ /** @returns {CartMetaResponse} */
3953
+ static CartMetaResponse() {
4645
3954
  return Joi.object({
4646
3955
  is_valid: Joi.boolean(),
4647
3956
  message: Joi.string().allow(""),
4648
3957
  });
4649
3958
  }
4650
3959
 
4651
- /** @returns {CartMetaMissingDetails} */
4652
- static CartMetaMissingDetails() {
3960
+ /** @returns {CartMetaMissingResponse} */
3961
+ static CartMetaMissingResponse() {
4653
3962
  return Joi.object({
4654
3963
  errors: Joi.array().items(Joi.string().allow("")),
4655
3964
  });
@@ -4683,53 +3992,6 @@ class CartPlatformModel {
4683
3992
  });
4684
3993
  }
4685
3994
 
4686
- /** @returns {CartCheckoutCustomMeta} */
4687
- static CartCheckoutCustomMeta() {
4688
- return Joi.object({
4689
- key: Joi.string().allow("").required(),
4690
- value: Joi.string().allow("").required(),
4691
- });
4692
- }
4693
-
4694
- /** @returns {PlatformCartCheckoutDetailCreation} */
4695
- static PlatformCartCheckoutDetailCreation() {
4696
- return Joi.object({
4697
- custom_meta: Joi.array().items(
4698
- CartPlatformModel.CartCheckoutCustomMeta()
4699
- ),
4700
- address_id: Joi.string().allow(""),
4701
- payment_identifier: Joi.string().allow("").allow(null),
4702
- payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
4703
- payment_auto_confirm: Joi.boolean(),
4704
- id: Joi.string().allow("").required(),
4705
- pos: Joi.boolean(),
4706
- billing_address_id: Joi.string().allow(""),
4707
- merchant_code: Joi.string().allow(""),
4708
- aggregator: Joi.string().allow(""),
4709
- pick_at_store_uid: Joi.number().allow(null),
4710
- device_id: Joi.string().allow("").allow(null),
4711
- delivery_address: Joi.object().pattern(/\S/, Joi.any()),
4712
- payment_mode: Joi.string().allow("").required(),
4713
- checkout_mode: Joi.string().allow(""),
4714
- customer_details: CartPlatformModel.CustomerDetails(),
4715
- meta: Joi.object().pattern(/\S/, Joi.any()),
4716
- staff: CartPlatformModel.StaffCheckout(),
4717
- employee_code: Joi.string().allow("").allow(null),
4718
- billing_address: Joi.object().pattern(/\S/, Joi.any()),
4719
- callback_url: Joi.string().allow("").allow(null),
4720
- user_id: Joi.string().allow("").allow(null),
4721
- extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4722
- order_type: Joi.string().allow("").required(),
4723
- files: Joi.array().items(CartPlatformModel.Files()),
4724
- ordering_store: Joi.number().allow(null),
4725
- payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
4726
- iin: Joi.string().allow(""),
4727
- network: Joi.string().allow(""),
4728
- type: Joi.string().allow(""),
4729
- card_id: Joi.string().allow(""),
4730
- });
4731
- }
4732
-
4733
3995
  /** @returns {CheckCart} */
4734
3996
  static CheckCart() {
4735
3997
  return Joi.object({
@@ -4762,15 +4024,15 @@ class CartPlatformModel {
4762
4024
  gstin: Joi.string().allow(""),
4763
4025
  cod_available: Joi.boolean(),
4764
4026
  delivery_charges: Joi.number(),
4765
- custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()),
4027
+ custom_cart_meta: Joi.any(),
4766
4028
  });
4767
4029
  }
4768
4030
 
4769
- /** @returns {CartCheckoutDetails} */
4770
- static CartCheckoutDetails() {
4031
+ /** @returns {CartCheckoutResponse} */
4032
+ static CartCheckoutResponse() {
4771
4033
  return Joi.object({
4772
4034
  app_intercept_url: Joi.string().allow(""),
4773
- data: Joi.object().pattern(/\S/, Joi.any()),
4035
+ data: Joi.any(),
4774
4036
  cart: CartPlatformModel.CheckCart(),
4775
4037
  success: Joi.boolean(),
4776
4038
  callback_url: Joi.string().allow(""),
@@ -4780,22 +4042,8 @@ class CartPlatformModel {
4780
4042
  });
4781
4043
  }
4782
4044
 
4783
- /** @returns {CartCheckoutResult} */
4784
- static CartCheckoutResult() {
4785
- return Joi.object({
4786
- app_intercept_url: Joi.string().allow(""),
4787
- data: Joi.object().pattern(/\S/, Joi.any()),
4788
- cart: CartPlatformModel.CheckCart(),
4789
- success: Joi.boolean(),
4790
- callback_url: Joi.string().allow(""),
4791
- payment_confirm_url: Joi.string().allow(""),
4792
- order_id: Joi.string().allow(""),
4793
- message: Joi.string().allow(""),
4794
- });
4795
- }
4796
-
4797
- /** @returns {CartDeliveryModesDetails} */
4798
- static CartDeliveryModesDetails() {
4045
+ /** @returns {CartDeliveryModesResponse} */
4046
+ static CartDeliveryModesResponse() {
4799
4047
  return Joi.object({
4800
4048
  pickup_stores: Joi.array().items(Joi.number()),
4801
4049
  available_modes: Joi.array().items(Joi.string().allow("")),
@@ -4825,15 +4073,15 @@ class CartPlatformModel {
4825
4073
  });
4826
4074
  }
4827
4075
 
4828
- /** @returns {StoreDetails} */
4829
- static StoreDetails() {
4076
+ /** @returns {StoreDetailsResponse} */
4077
+ static StoreDetailsResponse() {
4830
4078
  return Joi.object({
4831
4079
  items: Joi.array().items(CartPlatformModel.PickupStoreDetail()),
4832
4080
  });
4833
4081
  }
4834
4082
 
4835
- /** @returns {CartPaymentUpdate} */
4836
- static CartPaymentUpdate() {
4083
+ /** @returns {UpdateCartPaymentRequest} */
4084
+ static UpdateCartPaymentRequest() {
4837
4085
  return Joi.object({
4838
4086
  address_id: Joi.string().allow(""),
4839
4087
  payment_mode: Joi.string().allow(""),
@@ -4853,7 +4101,6 @@ class CartPlatformModel {
4853
4101
  display_message_en: Joi.string().allow("").allow(null),
4854
4102
  code: Joi.string().allow("").allow(null),
4855
4103
  discount: Joi.number(),
4856
- error_en: Joi.string().allow("").allow(null),
4857
4104
  });
4858
4105
  }
4859
4106
 
@@ -4884,19 +4131,17 @@ class CartPlatformModel {
4884
4131
  payment_meta: CartPlatformModel.PaymentMeta().required(),
4885
4132
  amount: Joi.number().allow(null),
4886
4133
  name: Joi.string().allow(""),
4887
- payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
4134
+ payment_extra_identifiers: Joi.any(),
4888
4135
  });
4889
4136
  }
4890
4137
 
4891
- /** @returns {PlatformCartCheckoutDetailV2Creation} */
4892
- static PlatformCartCheckoutDetailV2Creation() {
4138
+ /** @returns {PlatformCartCheckoutDetailV2Request} */
4139
+ static PlatformCartCheckoutDetailV2Request() {
4893
4140
  return Joi.object({
4894
4141
  address_id: Joi.string().allow(""),
4895
4142
  payment_identifier: Joi.string().allow("").allow(null),
4896
- payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
4897
- custom_meta: Joi.array().items(
4898
- CartPlatformModel.CartCheckoutCustomMeta()
4899
- ),
4143
+ payment_params: Joi.any().allow(null),
4144
+ custom_meta: Joi.any(),
4900
4145
  payment_auto_confirm: Joi.boolean(),
4901
4146
  id: Joi.string().allow("").required(),
4902
4147
  pos: Joi.boolean(),
@@ -4905,20 +4150,20 @@ class CartPlatformModel {
4905
4150
  aggregator: Joi.string().allow(""),
4906
4151
  pick_at_store_uid: Joi.number().allow(null),
4907
4152
  device_id: Joi.string().allow("").allow(null),
4908
- delivery_address: Joi.object().pattern(/\S/, Joi.any()),
4153
+ delivery_address: Joi.any(),
4909
4154
  payment_mode: Joi.string().allow(""),
4910
4155
  checkout_mode: Joi.string().allow(""),
4911
- customer_details: CartPlatformModel.CustomerDetails(),
4912
- meta: Joi.object().pattern(/\S/, Joi.any()),
4156
+ customer_details: Joi.any().allow(null),
4157
+ meta: Joi.any(),
4913
4158
  payment_methods: Joi.array()
4914
4159
  .items(CartPlatformModel.PaymentMethod())
4915
4160
  .required(),
4916
4161
  staff: CartPlatformModel.StaffCheckout(),
4917
4162
  employee_code: Joi.string().allow("").allow(null),
4918
- billing_address: Joi.object().pattern(/\S/, Joi.any()),
4163
+ billing_address: Joi.any(),
4919
4164
  callback_url: Joi.string().allow("").allow(null),
4920
- user_id: Joi.string().allow("").required(),
4921
- extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4165
+ user_id: Joi.string().allow("").allow(null).required(),
4166
+ extra_meta: Joi.any(),
4922
4167
  order_type: Joi.string().allow("").required(),
4923
4168
  files: Joi.array().items(CartPlatformModel.Files()),
4924
4169
  ordering_store: Joi.number().allow(null),
@@ -4959,25 +4204,14 @@ class CartPlatformModel {
4959
4204
  });
4960
4205
  }
4961
4206
 
4962
- /** @returns {ArticlePriceDetails} */
4963
- static ArticlePriceDetails() {
4964
- return Joi.object({
4965
- marked: Joi.number(),
4966
- effective: Joi.number(),
4967
- });
4968
- }
4969
-
4970
4207
  /** @returns {FreeGiftItems} */
4971
4208
  static FreeGiftItems() {
4972
4209
  return Joi.object({
4973
4210
  item_slug: Joi.string().allow(""),
4974
4211
  item_name: Joi.string().allow(""),
4975
4212
  item_price_details: CartPlatformModel.ItemPriceDetails(),
4976
- article_price: CartPlatformModel.ArticlePriceDetails(),
4977
4213
  item_brand_name: Joi.string().allow(""),
4978
4214
  item_id: Joi.number(),
4979
- available_sizes: Joi.array().items(Joi.string().allow("")),
4980
- size: Joi.string().allow(""),
4981
4215
  item_images_url: Joi.array().items(Joi.string().allow("")),
4982
4216
  });
4983
4217
  }
@@ -4986,7 +4220,7 @@ class CartPlatformModel {
4986
4220
  static PromotionOffer() {
4987
4221
  return Joi.object({
4988
4222
  id: Joi.string().allow(""),
4989
- buy_rules: Joi.object().pattern(/\S/, Joi.any()),
4223
+ buy_rules: Joi.any(),
4990
4224
  offer_text: Joi.string().allow(""),
4991
4225
  promotion_type: Joi.string().allow(""),
4992
4226
  promotion_name: Joi.string().allow(""),
@@ -4995,12 +4229,11 @@ class CartPlatformModel {
4995
4229
  discount_rules: Joi.array().items(Joi.any()),
4996
4230
  free_gift_items: Joi.array().items(CartPlatformModel.FreeGiftItems()),
4997
4231
  description: Joi.string().allow(""),
4998
- is_bank_offer: Joi.boolean(),
4999
4232
  });
5000
4233
  }
5001
4234
 
5002
- /** @returns {PromotionOffersDetails} */
5003
- static PromotionOffersDetails() {
4235
+ /** @returns {PromotionOffersResponse} */
4236
+ static PromotionOffersResponse() {
5004
4237
  return Joi.object({
5005
4238
  available_promotions: Joi.array().items(
5006
4239
  CartPlatformModel.PromotionOffer()
@@ -5024,20 +4257,12 @@ class CartPlatformModel {
5024
4257
  });
5025
4258
  }
5026
4259
 
5027
- /** @returns {PromotionPaymentOffersDetails} */
5028
- static PromotionPaymentOffersDetails() {
4260
+ /** @returns {PromotionPaymentOffersResponse} */
4261
+ static PromotionPaymentOffersResponse() {
5029
4262
  return Joi.object({
5030
4263
  success: Joi.boolean(),
5031
4264
  promotions: Joi.array().items(CartPlatformModel.PromotionPaymentOffer()),
5032
4265
  });
5033
4266
  }
5034
-
5035
- /** @returns {ValidationError} */
5036
- static ValidationError() {
5037
- return Joi.object({
5038
- message: Joi.string().allow("").required(),
5039
- field: Joi.string().allow("").required(),
5040
- });
5041
- }
5042
4267
  }
5043
4268
  module.exports = CartPlatformModel;