@gofynd/fdk-client-javascript 1.4.2-beta.2 → 1.4.2-beta.3

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 (106) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
  4. package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
  5. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  6. package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
  7. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  8. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  9. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  10. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  11. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
  12. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
  13. package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
  14. package/sdk/application/Content/ContentApplicationModel.js +757 -757
  15. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  16. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  17. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  18. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  19. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
  20. package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
  21. package/sdk/application/Order/OrderApplicationModel.d.ts +846 -846
  22. package/sdk/application/Order/OrderApplicationModel.js +822 -822
  23. package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
  24. package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
  25. package/sdk/application/Payment/PaymentApplicationModel.d.ts +2155 -2150
  26. package/sdk/application/Payment/PaymentApplicationModel.js +1460 -1458
  27. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
  28. package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
  29. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
  30. package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
  31. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  32. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  33. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  34. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  35. package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
  36. package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
  37. package/sdk/application/User/UserApplicationModel.d.ts +762 -762
  38. package/sdk/application/User/UserApplicationModel.js +738 -738
  39. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
  40. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
  41. package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
  42. package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
  43. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
  44. package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
  45. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
  46. package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
  47. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
  48. package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
  49. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  50. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  51. package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
  52. package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
  53. package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
  54. package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
  55. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -1013
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +923 -923
  57. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  58. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  59. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
  60. package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
  61. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
  62. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
  63. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
  64. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
  65. package/sdk/platform/Content/ContentPlatformModel.d.ts +1833 -1833
  66. package/sdk/platform/Content/ContentPlatformModel.js +1837 -1837
  67. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
  68. package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
  69. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +865 -865
  70. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +877 -877
  71. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
  72. package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
  73. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  74. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  75. package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
  76. package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
  77. package/sdk/platform/Order/OrderPlatformModel.d.ts +5180 -5176
  78. package/sdk/platform/Order/OrderPlatformModel.js +4740 -4736
  79. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  80. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  81. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2670 -2660
  82. package/sdk/platform/Payment/PaymentPlatformModel.js +1831 -1827
  83. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  84. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  85. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1505 -1507
  86. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1532 -1536
  87. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  88. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  89. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
  90. package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
  91. package/sdk/platform/User/UserPlatformModel.d.ts +758 -758
  92. package/sdk/platform/User/UserPlatformModel.js +643 -643
  93. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
  94. package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
  95. package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
  96. package/sdk/public/Billing/BillingPublicModel.js +51 -51
  97. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  98. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  99. package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
  100. package/sdk/public/Content/ContentPublicModel.js +28 -28
  101. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  102. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  103. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  104. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  105. package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
  106. package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
@@ -1,1905 +1,1905 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef ActionQuery
5
- * @property {string[]} [product_slug] - Contains list of product slug
6
- */
7
-
8
- /**
9
- * @typedef AddCartDetailResponse
10
- * @property {CartDetailResponse} [cart]
11
- * @property {string} [message]
12
- * @property {boolean} [partial] - When adding multiple items check if all
13
- * added. True if only few are added.
14
- * @property {boolean} [success] - True if all items are added successfully.
15
- * False if partially added or not added.
16
- */
17
-
18
- /**
19
- * @typedef AddCartRequest
20
- * @property {AddProductCart[]} [items]
21
- * @property {boolean} [new_cart]
4
+ * @typedef BuyRules
5
+ * @property {Object} [cart_conditions] - Cart conditions details for promotion
6
+ * @property {Object} [item_criteria] - Item criteria of promotion
22
7
  */
23
8
 
24
9
  /**
25
- * @typedef AddProductCart
26
- * @property {Object} [_custom_json]
27
- * @property {Object} [article_assignment]
28
- * @property {string} [article_id]
29
- * @property {string} [display]
30
- * @property {Object} [extra_meta]
31
- * @property {number} [item_id]
32
- * @property {string} [item_size]
33
- * @property {Object} [meta]
34
- * @property {Object[]} [parent_item_identifiers]
35
- * @property {boolean} [pos]
36
- * @property {string[]} [product_group_tags]
37
- * @property {number} [quantity]
38
- * @property {number} [seller_id]
39
- * @property {number} [store_id]
10
+ * @typedef DiscountRulesApp
11
+ * @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
12
+ * @property {Object} [offer] - Offer for promotion
13
+ * @property {Object} [item_criteria] - Item criteria of promotion
14
+ * @property {Object} [raw_offer] - Raw offer details for promotion
40
15
  */
41
16
 
42
17
  /**
43
- * @typedef Address
44
- * @property {Object} [_custom_json]
45
- * @property {string} [address]
46
- * @property {string} [address_type]
47
- * @property {string} [area]
48
- * @property {string} [area_code]
49
- * @property {string} [area_code_slug]
50
- * @property {string} [checkout_mode]
51
- * @property {string} [city]
52
- * @property {string} [country]
53
- * @property {string} [country_code]
54
- * @property {string} [country_iso_code]
55
- * @property {string} [country_phone_code]
56
- * @property {string} [created_by_user_id]
57
- * @property {string} [email]
58
- * @property {GeoLocation} [geo_location]
59
- * @property {Object} [google_map_point]
60
- * @property {string} [id]
61
- * @property {boolean} [is_active]
62
- * @property {boolean} [is_default_address]
63
- * @property {string} [landmark]
64
- * @property {Object} [meta]
65
- * @property {string} [name]
66
- * @property {string} [phone]
67
- * @property {string} [sector]
68
- * @property {string} [state]
69
- * @property {string} [state_code] - State code for international address
70
- * @property {string[]} [tags]
71
- * @property {string} [user_id]
18
+ * @typedef FreeGiftItem
19
+ * @property {string} [item_slug] - Item slug
20
+ * @property {Object} [item_price_details] - Item price details
21
+ * @property {string[]} [item_images_url] - Item images URL
22
+ * @property {string} [item_name] - Item name
23
+ * @property {number} [item_id] - Item id
24
+ * @property {string} [item_brand_name] - Item brand name
72
25
  */
73
26
 
74
27
  /**
75
28
  * @typedef AppliedFreeArticles
29
+ * @property {number} [quantity] - Free article quantity
30
+ * @property {string} [parent_item_identifier] - Parent item identifier for free article
76
31
  * @property {string} [article_id] - Free article id
77
32
  * @property {FreeGiftItem} [free_gift_item_details] - Free gift items details
78
- * @property {string} [parent_item_identifier] - Parent item identifier for free article
79
- * @property {number} [quantity] - Free article quantity
33
+ */
34
+
35
+ /**
36
+ * @typedef Ownership
37
+ * @property {string} [payable_category] - Promo amount payable category
38
+ * @property {string} [payable_by] - Promo amount bearable party
80
39
  */
81
40
 
82
41
  /**
83
42
  * @typedef AppliedPromotion
84
- * @property {number} [amount] - Per unit discount amount applied with current promotion
85
- * @property {AppliedFreeArticles[]} [applied_free_articles] - Applied free
86
- * article for free gift item promotions
43
+ * @property {string} [promotion_name] - Promotion name of current promotion
44
+ * @property {boolean} [mrp_promotion] - If applied promotion is applied on
45
+ * product MRP or ESP
46
+ * @property {BuyRules[]} [buy_rules] - Buy rules for promotions
47
+ * @property {string} [promotion_type] - Promotion type of current promotion
87
48
  * @property {number} [article_quantity] - Quantity of article on which
88
49
  * promotion is applicable
89
- * @property {BuyRules[]} [buy_rules] - Buy rules for promotions
90
- * @property {CartCurrency} [currency]
50
+ * @property {number} [amount] - Per unit discount amount applied with current promotion
91
51
  * @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions
92
- * @property {boolean} [mrp_promotion] - If applied promotion is applied on
93
- * product MRP or ESP
94
52
  * @property {string} [offer_text] - Offer text of current promotion
95
- * @property {Ownership} [ownership] - Ownership of promotion
96
53
  * @property {string} [promo_id] - Promotion id
54
+ * @property {AppliedFreeArticles[]} [applied_free_articles] - Applied free
55
+ * article for free gift item promotions
56
+ * @property {Ownership} [ownership] - Ownership of promotion
57
+ * @property {CartCurrency} [currency]
97
58
  * @property {string} [promotion_group] - Promotion group for the promotion
98
- * @property {string} [promotion_name] - Promotion name of current promotion
99
- * @property {string} [promotion_type] - Promotion type of current promotion
100
- */
101
-
102
- /**
103
- * @typedef ApplyCouponRequest
104
- * @property {string} coupon_code - Coupon code to be applied
105
59
  */
106
60
 
107
61
  /**
108
- * @typedef ArticleGiftDetail
109
- * @property {GiftDetail} [article_id]
110
- */
111
-
112
- /**
113
- * @typedef ArticlePriceInfo
114
- * @property {BasePrice} [base]
115
- * @property {BasePrice} [converted]
62
+ * @typedef LoyaltyPoints
63
+ * @property {string} [description]
64
+ * @property {boolean} [is_applied]
65
+ * @property {number} [applicable]
66
+ * @property {number} [total]
116
67
  */
117
68
 
118
69
  /**
119
- * @typedef BaseInfo
120
- * @property {string} [name]
121
- * @property {number} [uid]
70
+ * @typedef RawBreakup
71
+ * @property {number} [discount]
72
+ * @property {number} [you_saved]
73
+ * @property {number} [mrp_total]
74
+ * @property {number} [gst_charges]
75
+ * @property {number} [total]
76
+ * @property {number} [vog]
77
+ * @property {number} [coupon]
78
+ * @property {number} [subtotal]
79
+ * @property {number} [delivery_charge]
80
+ * @property {number} [cod_charge]
81
+ * @property {number} [fynd_cash]
82
+ * @property {number} [gift_card]
83
+ * @property {number} [convenience_fee]
122
84
  */
123
85
 
124
86
  /**
125
- * @typedef BasePrice
87
+ * @typedef DisplayBreakup
126
88
  * @property {string} [currency_code]
127
89
  * @property {string} [currency_symbol]
128
- * @property {number} [effective]
129
- * @property {number} [marked]
90
+ * @property {string} [display]
91
+ * @property {string[]} [message]
92
+ * @property {string} [key]
93
+ * @property {number} [value]
130
94
  */
131
95
 
132
96
  /**
133
- * @typedef BulkPriceOffer
134
- * @property {OfferItem[]} [offers]
135
- * @property {OfferSeller} [seller]
97
+ * @typedef CouponBreakup
98
+ * @property {number} [max_discount_value]
99
+ * @property {string} [message]
100
+ * @property {boolean} [is_applied]
101
+ * @property {string} [uid]
102
+ * @property {string} [type]
103
+ * @property {string} [coupon_type]
104
+ * @property {string} [sub_title]
105
+ * @property {number} [coupon_value]
106
+ * @property {string} [description]
107
+ * @property {string} [code]
108
+ * @property {number} [minimum_cart_value]
109
+ * @property {number} [value]
110
+ * @property {string} [title]
136
111
  */
137
112
 
138
113
  /**
139
- * @typedef BulkPriceResponse
140
- * @property {BulkPriceOffer[]} [data] - Consist of offers from multiple seller
114
+ * @typedef CartBreakup
115
+ * @property {LoyaltyPoints} [loyalty_points]
116
+ * @property {RawBreakup} [raw]
117
+ * @property {DisplayBreakup[]} [display]
118
+ * @property {CouponBreakup} [coupon]
141
119
  */
142
120
 
143
121
  /**
144
- * @typedef BuyRules
145
- * @property {Object} [cart_conditions] - Cart conditions details for promotion
146
- * @property {Object} [item_criteria] - Item criteria of promotion
122
+ * @typedef PaymentSelectionLock
123
+ * @property {string} [default_options]
124
+ * @property {boolean} [enabled]
125
+ * @property {string} [payment_identifier]
147
126
  */
148
127
 
149
128
  /**
150
- * @typedef CartBreakup
151
- * @property {CouponBreakup} [coupon]
152
- * @property {DisplayBreakup[]} [display]
153
- * @property {LoyaltyPoints} [loyalty_points]
154
- * @property {RawBreakup} [raw]
129
+ * @typedef PromiseTimestamp
130
+ * @property {number} [max]
131
+ * @property {number} [min]
155
132
  */
156
133
 
157
134
  /**
158
- * @typedef CartCheckoutCustomMeta
159
- * @property {string} key
160
- * @property {string} value
135
+ * @typedef PromiseFormatted
136
+ * @property {string} [max]
137
+ * @property {string} [min]
161
138
  */
162
139
 
163
140
  /**
164
- * @typedef CartCheckoutResponse
165
- * @property {string} [app_intercept_url]
166
- * @property {string} [callback_url]
167
- * @property {CheckCart} [cart]
168
- * @property {Object} [data]
169
- * @property {string} [message]
170
- * @property {string} [order_id]
171
- * @property {string} [payment_confirm_url]
172
- * @property {boolean} [success]
141
+ * @typedef PromiseISOFormat
142
+ * @property {string} [max] - Max promise in ISO format.
143
+ * @property {string} [min] - Min Promise in ISO format.
173
144
  */
174
145
 
175
146
  /**
176
- * @typedef CartCurrency
177
- * @property {string} [code] - Currency code defined by ISO 4217:2015
178
- * @property {string} [symbol]
147
+ * @typedef ShipmentPromise
148
+ * @property {PromiseTimestamp} [timestamp]
149
+ * @property {PromiseFormatted} [formatted]
150
+ * @property {PromiseISOFormat} [iso]
179
151
  */
180
152
 
181
153
  /**
182
- * @typedef CartDeliveryModesResponse
183
- * @property {string[]} [available_modes] - Available delivery modes
184
- * @property {number[]} [pickup_stores] - Store pick up available store uids
154
+ * @typedef StoreInfo
155
+ * @property {number} [uid]
156
+ * @property {string} [store_code]
157
+ * @property {string} [name]
185
158
  */
186
159
 
187
160
  /**
188
- * @typedef CartDetailResponse
189
- * @property {AppliedPromotion[]} [applied_promo_details]
190
- * @property {CartBreakup} [breakup_values]
191
- * @property {boolean} [buy_now]
192
- * @property {string} [checkout_mode]
193
- * @property {string} [comment]
194
- * @property {string} [coupon_text]
195
- * @property {CartCurrency} [currency]
196
- * @property {string} [delivery_charge_info]
197
- * @property {ShipmentPromise} [delivery_promise]
198
- * @property {string} [gstin]
199
- * @property {string} [id]
200
- * @property {boolean} [is_valid]
201
- * @property {CartProductInfo[]} [items]
202
- * @property {string} [last_modified]
203
- * @property {string} [message]
204
- * @property {Object} [pan_config]
205
- * @property {string} [pan_no]
206
- * @property {PaymentSelectionLock} [payment_selection_lock]
207
- * @property {boolean} [restrict_checkout]
161
+ * @typedef BaseInfo
162
+ * @property {number} [uid]
163
+ * @property {string} [name]
208
164
  */
209
165
 
210
166
  /**
211
- * @typedef CartItemCountResponse
212
- * @property {number} [user_cart_items_count] - Item count present in cart
167
+ * @typedef BasePrice
168
+ * @property {number} [effective]
169
+ * @property {string} [currency_code]
170
+ * @property {string} [currency_symbol]
171
+ * @property {number} [marked]
213
172
  */
214
173
 
215
174
  /**
216
- * @typedef CartMetaMissingResponse
217
- * @property {string[]} [errors]
175
+ * @typedef ArticlePriceInfo
176
+ * @property {BasePrice} [converted]
177
+ * @property {BasePrice} [base]
218
178
  */
219
179
 
220
180
  /**
221
- * @typedef CartMetaRequest
222
- * @property {string} [checkout_mode]
223
- * @property {string} [comment]
224
- * @property {Object} [delivery_slots]
225
- * @property {ArticleGiftDetail} [gift_details]
226
- * @property {string} [gstin]
227
- * @property {Object} [pick_up_customer_details] - Customer contact details for
228
- * customer pickup at store
181
+ * @typedef ProductArticle
182
+ * @property {Object} [meta]
183
+ * @property {StoreInfo} [store]
184
+ * @property {Object} [_custom_json]
185
+ * @property {string} [seller_identifier]
186
+ * @property {Object} [identifier]
187
+ * @property {number} [quantity]
188
+ * @property {BaseInfo} [seller]
189
+ * @property {number} [mto_quantity]
190
+ * @property {string} [uid]
191
+ * @property {Object} [cart_item_meta]
192
+ * @property {string} [type]
193
+ * @property {ArticlePriceInfo} [price]
194
+ * @property {Object} [parent_item_identifiers]
195
+ * @property {string} [size]
196
+ * @property {Object} [extra_meta]
197
+ * @property {Object} [gift_card]
198
+ * @property {string[]} [product_group_tags]
199
+ * @property {boolean} [is_gift_visible]
200
+ * @property {string[]} [tags] - A list of article tags
229
201
  */
230
202
 
231
203
  /**
232
- * @typedef CartMetaResponse
233
- * @property {boolean} [is_valid]
234
- * @property {string} [message]
204
+ * @typedef Tags
205
+ * @property {Object} [tags]
235
206
  */
236
207
 
237
208
  /**
238
- * @typedef CartPosCheckoutDetailRequest
239
- * @property {string} [address_id]
240
- * @property {string} [aggregator]
241
- * @property {Object} [billing_address]
242
- * @property {string} [billing_address_id]
243
- * @property {string} [callback_url]
244
- * @property {CartCheckoutCustomMeta[]} [custom_meta]
245
- * @property {Object} [customer_details] - Customer details
246
- * @property {Object} [delivery_address]
247
- * @property {Object} [extra_meta]
248
- * @property {Files[]} [files] - List of file url
249
- * @property {string} [id]
250
- * @property {string} [merchant_code]
251
- * @property {Object} [meta]
252
- * @property {string} order_type
253
- * @property {number} [ordering_store]
254
- * @property {boolean} [payment_auto_confirm]
255
- * @property {string} [payment_identifier]
256
- * @property {string} payment_mode
257
- * @property {Object} [payment_params]
258
- * @property {number} [pick_at_store_uid]
259
- * @property {boolean} [pos]
260
- * @property {StaffCheckout} [staff]
209
+ * @typedef CategoryInfo
210
+ * @property {number} [uid] - Product Category Id
211
+ * @property {string} [name]
212
+ */
213
+
214
+ /**
215
+ * @typedef ProductImage
216
+ * @property {string} [aspect_ratio]
217
+ * @property {string} [url]
218
+ * @property {string} [secure_url]
219
+ */
220
+
221
+ /**
222
+ * @typedef ActionQuery
223
+ * @property {string[]} [product_slug] - Contains list of product slug
224
+ */
225
+
226
+ /**
227
+ * @typedef ProductAction
228
+ * @property {ActionQuery} [query]
229
+ * @property {string} [url]
230
+ * @property {string} [type]
261
231
  */
262
232
 
263
233
  /**
264
234
  * @typedef CartProduct
235
+ * @property {Tags} [teaser_tag]
265
236
  * @property {Object} [_custom_json]
266
- * @property {ProductAction} [action]
267
- * @property {BaseInfo} [brand]
268
237
  * @property {CategoryInfo[]} [categories]
269
- * @property {ProductImage[]} [images]
270
238
  * @property {string} [item_code]
239
+ * @property {string[]} [tags]
240
+ * @property {number} [uid]
241
+ * @property {string} [type]
242
+ * @property {ProductImage[]} [images]
271
243
  * @property {string} [name]
272
244
  * @property {string} [slug] - Unique product url name generated via product
273
245
  * name and other meta data
274
- * @property {string[]} [tags]
275
- * @property {Tags} [teaser_tag]
276
- * @property {string} [type]
277
- * @property {number} [uid]
246
+ * @property {ProductAction} [action]
247
+ * @property {BaseInfo} [brand]
278
248
  */
279
249
 
280
250
  /**
281
- * @typedef CartProductIdentifer
282
- * @property {string} [identifier] - Article idenfier generated by cart
251
+ * @typedef ProductPrice
252
+ * @property {number} [effective]
253
+ * @property {string} [currency_code]
254
+ * @property {string} [currency_symbol]
255
+ * @property {number} [marked]
256
+ * @property {number} [selling]
257
+ * @property {number} [add_on]
283
258
  */
284
259
 
285
260
  /**
286
- * @typedef CartProductInfo
287
- * @property {ProductArticle} [article]
288
- * @property {ProductAvailability} [availability]
289
- * @property {Object} [bulk_offer]
290
- * @property {CouponDetails} [coupon]
291
- * @property {string} [coupon_message]
292
- * @property {Object} [custom_order]
293
- * @property {ShipmentPromise} [delivery_promise]
294
- * @property {string} [discount]
295
- * @property {CartProductIdentifer} identifiers
296
- * @property {boolean} [is_set]
297
- * @property {string} [key]
298
- * @property {string} [message]
299
- * @property {Object} [moq]
300
- * @property {Object} [parent_item_identifiers]
301
- * @property {ProductPriceInfo} [price]
302
- * @property {ProductPriceInfo} [price_per_unit]
303
- * @property {CartProduct} [product]
304
- * @property {PromoMeta} [promo_meta]
305
- * @property {AppliedPromotion[]} [promotions_applied]
306
- * @property {number} [quantity]
261
+ * @typedef ProductPriceInfo
262
+ * @property {ProductPrice} [converted]
263
+ * @property {ProductPrice} [base]
307
264
  */
308
265
 
309
266
  /**
310
- * @typedef CartShipmentsResponse
311
- * @property {CartBreakup} [breakup_values]
312
- * @property {boolean} [buy_now]
313
- * @property {number} [cart_id]
314
- * @property {string} [checkout_mode]
315
- * @property {string} [comment]
316
- * @property {string} [coupon_text]
317
- * @property {CartCurrency} [currency]
318
- * @property {string} [delivery_charge_info]
319
- * @property {ShipmentPromise} [delivery_promise]
320
- * @property {boolean} [error]
321
- * @property {string} [gstin]
322
- * @property {string} [id]
323
- * @property {boolean} [is_valid]
324
- * @property {string} [last_modified]
267
+ * @typedef CouponDetails
268
+ * @property {number} [discount_total_quantity]
269
+ * @property {number} [discount_single_quantity]
270
+ * @property {string} [code]
271
+ */
272
+
273
+ /**
274
+ * @typedef PromoMeta
325
275
  * @property {string} [message]
326
- * @property {PaymentSelectionLock} [payment_selection_lock]
327
- * @property {boolean} [restrict_checkout]
328
- * @property {ShipmentResponse[]} [shipments]
329
- * @property {string} [uid]
330
276
  */
331
277
 
332
278
  /**
333
- * @typedef CategoryInfo
334
- * @property {string} [name]
335
- * @property {number} [uid] - Product Category Id
279
+ * @typedef ProductAvailabilitySize
280
+ * @property {boolean} [is_available]
281
+ * @property {string} [value]
282
+ * @property {string} [display]
336
283
  */
337
284
 
338
285
  /**
339
- * @typedef CheckCart
340
- * @property {CartBreakup} [breakup_values]
341
- * @property {boolean} [buy_now]
342
- * @property {number} [cart_id]
343
- * @property {string} [checkout_mode]
344
- * @property {boolean} [cod_available]
345
- * @property {number} [cod_charges]
346
- * @property {string} [cod_message]
347
- * @property {string} [comment]
348
- * @property {string} [coupon_text]
349
- * @property {CartCurrency} [currency]
350
- * @property {string} [delivery_charge_info]
351
- * @property {number} [delivery_charge_order_value]
352
- * @property {number} [delivery_charges]
353
- * @property {ShipmentPromise} [delivery_promise]
354
- * @property {string} [error_message]
355
- * @property {string} [gstin]
356
- * @property {string} [id]
286
+ * @typedef ProductAvailability
287
+ * @property {ProductAvailabilitySize[]} [available_sizes]
288
+ * @property {number} [other_store_quantity]
289
+ * @property {boolean} [deliverable]
290
+ * @property {boolean} [out_of_stock]
357
291
  * @property {boolean} [is_valid]
358
- * @property {CartProductInfo[]} [items]
359
- * @property {string} [last_modified]
360
- * @property {string} [message]
361
- * @property {string} [order_id]
362
- * @property {PaymentSelectionLock} [payment_selection_lock]
363
- * @property {boolean} [restrict_checkout]
364
- * @property {string} [store_code]
365
- * @property {Object[]} [store_emps]
366
- * @property {boolean} [success]
367
- * @property {string} [uid]
368
- * @property {string} [user_type]
292
+ * @property {string[]} [sizes]
369
293
  */
370
294
 
371
295
  /**
372
- * @typedef Coupon
373
- * @property {string} [coupon_code]
374
- * @property {string} [coupon_type]
375
- * @property {number} [coupon_value]
376
- * @property {string} [description]
377
- * @property {string} [expires_on]
378
- * @property {boolean} [is_applicable]
379
- * @property {boolean} [is_applied]
380
- * @property {number} [max_discount_value]
381
- * @property {string} [message]
382
- * @property {number} [minimum_cart_value]
383
- * @property {string} [sub_title]
384
- * @property {string} [title]
296
+ * @typedef CartProductIdentifer
297
+ * @property {string} [identifier] - Article idenfier generated by cart
385
298
  */
386
299
 
387
300
  /**
388
- * @typedef CouponBreakup
389
- * @property {string} [code]
390
- * @property {string} [coupon_type]
391
- * @property {number} [coupon_value]
392
- * @property {string} [description]
393
- * @property {boolean} [is_applied]
394
- * @property {number} [max_discount_value]
301
+ * @typedef CartProductInfo
302
+ * @property {Object} [custom_order]
303
+ * @property {ProductArticle} [article]
304
+ * @property {CartProduct} [product]
305
+ * @property {number} [quantity]
306
+ * @property {Object} [moq]
307
+ * @property {AppliedPromotion[]} [promotions_applied]
308
+ * @property {ProductPriceInfo} [price_per_unit]
309
+ * @property {string} [key]
310
+ * @property {ProductPriceInfo} [price]
311
+ * @property {Object} [parent_item_identifiers]
312
+ * @property {boolean} [is_set]
313
+ * @property {string} [coupon_message]
395
314
  * @property {string} [message]
396
- * @property {number} [minimum_cart_value]
397
- * @property {string} [sub_title]
398
- * @property {string} [title]
399
- * @property {string} [type]
400
- * @property {string} [uid]
401
- * @property {number} [value]
315
+ * @property {CouponDetails} [coupon]
316
+ * @property {string} [discount]
317
+ * @property {Object} [bulk_offer]
318
+ * @property {PromoMeta} [promo_meta]
319
+ * @property {ShipmentPromise} [delivery_promise]
320
+ * @property {ProductAvailability} [availability]
321
+ * @property {CartProductIdentifer} identifiers
402
322
  */
403
323
 
404
324
  /**
405
- * @typedef CouponDetails
406
- * @property {string} [code]
407
- * @property {number} [discount_single_quantity]
408
- * @property {number} [discount_total_quantity]
325
+ * @typedef CartCurrency
326
+ * @property {string} [symbol]
327
+ * @property {string} [code] - Currency code defined by ISO 4217:2015
409
328
  */
410
329
 
411
330
  /**
412
- * @typedef CouponValidity
413
- * @property {string} [code]
414
- * @property {number} [discount]
415
- * @property {string} [display_message_en]
416
- * @property {boolean} [next_validation_required]
417
- * @property {string} [title]
418
- * @property {boolean} [valid]
331
+ * @typedef CartDetailResponse
332
+ * @property {string} [comment]
333
+ * @property {string} [coupon_text]
334
+ * @property {string} [last_modified]
335
+ * @property {Object} [pan_config]
336
+ * @property {boolean} [is_valid]
337
+ * @property {string} [id]
338
+ * @property {AppliedPromotion[]} [applied_promo_details]
339
+ * @property {string} [checkout_mode]
340
+ * @property {boolean} [restrict_checkout]
341
+ * @property {string} [message]
342
+ * @property {boolean} [buy_now]
343
+ * @property {CartBreakup} [breakup_values]
344
+ * @property {string} [delivery_charge_info]
345
+ * @property {PaymentSelectionLock} [payment_selection_lock]
346
+ * @property {string} [gstin]
347
+ * @property {ShipmentPromise} [delivery_promise]
348
+ * @property {string} [pan_no]
349
+ * @property {CartProductInfo[]} [items]
350
+ * @property {CartCurrency} [currency]
419
351
  */
420
352
 
421
353
  /**
422
- * @typedef CustomerDetails
423
- * @property {string} [email]
424
- * @property {string} mobile
425
- * @property {string} [name]
354
+ * @typedef AddProductCart
355
+ * @property {number} [seller_id]
356
+ * @property {Object} [_custom_json]
357
+ * @property {Object} [meta]
358
+ * @property {string} [display]
359
+ * @property {number} [quantity]
360
+ * @property {string} [item_size]
361
+ * @property {number} [item_id]
362
+ * @property {number} [store_id]
363
+ * @property {boolean} [pos]
364
+ * @property {Object[]} [parent_item_identifiers]
365
+ * @property {Object} [extra_meta]
366
+ * @property {string[]} [product_group_tags]
367
+ * @property {Object} [article_assignment]
368
+ * @property {string} [article_id]
426
369
  */
427
370
 
428
371
  /**
429
- * @typedef DeleteAddressResponse
430
- * @property {string} [id]
431
- * @property {boolean} [is_deleted]
372
+ * @typedef AddCartRequest
373
+ * @property {AddProductCart[]} [items]
374
+ * @property {boolean} [new_cart]
432
375
  */
433
376
 
434
377
  /**
435
- * @typedef DiscountRulesApp
436
- * @property {Object} [item_criteria] - Item criteria of promotion
437
- * @property {string[]} [matched_buy_rules] - Matched buy rules for promotion
438
- * @property {Object} [offer] - Offer for promotion
439
- * @property {Object} [raw_offer] - Raw offer details for promotion
378
+ * @typedef AddCartDetailResponse
379
+ * @property {CartDetailResponse} [cart]
380
+ * @property {string} [message]
381
+ * @property {boolean} [partial] - When adding multiple items check if all
382
+ * added. True if only few are added.
383
+ * @property {boolean} [success] - True if all items are added successfully.
384
+ * False if partially added or not added.
440
385
  */
441
386
 
442
387
  /**
443
- * @typedef DisplayBreakup
444
- * @property {string} [currency_code]
445
- * @property {string} [currency_symbol]
446
- * @property {string} [display]
447
- * @property {string} [key]
448
- * @property {string[]} [message]
449
- * @property {number} [value]
388
+ * @typedef UpdateProductCart
389
+ * @property {Object} [meta]
390
+ * @property {Object} [_custom_json]
391
+ * @property {number} [quantity]
392
+ * @property {string} [item_size]
393
+ * @property {number} [item_id]
394
+ * @property {number} [item_index]
395
+ * @property {CartProductIdentifer} identifiers
396
+ * @property {Object} [parent_item_identifiers]
397
+ * @property {Object} [extra_meta]
398
+ * @property {string} [article_id]
450
399
  */
451
400
 
452
401
  /**
453
- * @typedef Files
454
- * @property {string} key
455
- * @property {string[]} values
402
+ * @typedef UpdateCartRequest
403
+ * @property {string} operation
404
+ * @property {UpdateProductCart[]} [items]
456
405
  */
457
406
 
458
407
  /**
459
- * @typedef FreeGiftItem
460
- * @property {string} [item_brand_name] - Item brand name
461
- * @property {number} [item_id] - Item id
462
- * @property {string[]} [item_images_url] - Item images URL
463
- * @property {string} [item_name] - Item name
464
- * @property {Object} [item_price_details] - Item price details
465
- * @property {string} [item_slug] - Item slug
408
+ * @typedef UpdateCartDetailResponse
409
+ * @property {CartDetailResponse} [cart]
410
+ * @property {string} [message]
411
+ * @property {boolean} [success] - True if all items are added successfully.
412
+ * False if partially added or not added.
466
413
  */
467
414
 
468
415
  /**
469
- * @typedef GeoLocation
470
- * @property {number} [latitude]
471
- * @property {number} [longitude]
416
+ * @typedef CartItemCountResponse
417
+ * @property {number} [user_cart_items_count] - Item count present in cart
472
418
  */
473
419
 
474
420
  /**
475
- * @typedef GetAddressesResponse
476
- * @property {Address[]} [address]
477
- * @property {boolean} [pii_masking]
421
+ * @typedef PageCoupon
422
+ * @property {boolean} [has_previous]
423
+ * @property {number} [current]
424
+ * @property {number} [total]
425
+ * @property {number} [total_item_count]
426
+ * @property {boolean} [has_next]
478
427
  */
479
428
 
480
429
  /**
481
- * @typedef GetCouponResponse
482
- * @property {Coupon[]} [available_coupon_list]
483
- * @property {PageCoupon} [page]
430
+ * @typedef Coupon
431
+ * @property {number} [max_discount_value]
432
+ * @property {string} [coupon_code]
433
+ * @property {string} [message]
434
+ * @property {boolean} [is_applied]
435
+ * @property {string} [coupon_type]
436
+ * @property {string} [sub_title]
437
+ * @property {number} [coupon_value]
438
+ * @property {boolean} [is_applicable]
439
+ * @property {string} [description]
440
+ * @property {number} [minimum_cart_value]
441
+ * @property {string} [title]
442
+ * @property {string} [expires_on]
484
443
  */
485
444
 
486
445
  /**
487
- * @typedef GetShareCartLinkRequest
488
- * @property {string} [id] - Cart uid for generating sharing
489
- * @property {Object} [meta] - Staff, Ordering store or any other data. This
490
- * data will be used to generate link as well as sent as shared details.
446
+ * @typedef GetCouponResponse
447
+ * @property {PageCoupon} [page]
448
+ * @property {Coupon[]} [available_coupon_list]
491
449
  */
492
450
 
493
451
  /**
494
- * @typedef GetShareCartLinkResponse
495
- * @property {string} [share_url] - Short shareable final url
496
- * @property {string} [token] - Short url unique id
452
+ * @typedef ApplyCouponRequest
453
+ * @property {string} coupon_code - Coupon code to be applied
497
454
  */
498
455
 
499
456
  /**
500
- * @typedef GiftDetail
501
- * @property {string} [gift_message]
502
- * @property {boolean} [is_gift_applied]
457
+ * @typedef OfferSeller
458
+ * @property {number} [uid] - Seller id
459
+ * @property {string} [name]
503
460
  */
504
461
 
505
462
  /**
506
- * @typedef LoyaltyPoints
507
- * @property {number} [applicable]
508
- * @property {string} [description]
509
- * @property {boolean} [is_applied]
510
- * @property {number} [total]
463
+ * @typedef OfferPrice
464
+ * @property {number} [effective] - Current per unit price of product after
465
+ * existing deductions
466
+ * @property {string} [currency_code] - Currency code for all amounts
467
+ * @property {string} [currency_symbol] - Currency symbol for currency
468
+ * @property {number} [marked] - Original price of product
469
+ * @property {number} [bulk_effective] - Discounted per unit price for current
470
+ * offer object
511
471
  */
512
472
 
513
473
  /**
514
474
  * @typedef OfferItem
515
- * @property {boolean} [auto_applied] - Whether offer discount is auto applied in cart
516
- * @property {boolean} [best] - Is true for best offer from all offers present
517
- * for all sellers
518
475
  * @property {number} [margin] - Percentage value of discount
519
- * @property {OfferPrice} [price]
520
476
  * @property {number} [quantity] - Quantity on which offer is applicable
521
477
  * @property {number} [total] - Total price of offer quantity with discount
478
+ * @property {boolean} [best] - Is true for best offer from all offers present
479
+ * for all sellers
522
480
  * @property {string} [type] - Offer type
481
+ * @property {OfferPrice} [price]
482
+ * @property {boolean} [auto_applied] - Whether offer discount is auto applied in cart
523
483
  */
524
484
 
525
485
  /**
526
- * @typedef OfferPrice
527
- * @property {number} [bulk_effective] - Discounted per unit price for current
528
- * offer object
529
- * @property {string} [currency_code] - Currency code for all amounts
530
- * @property {string} [currency_symbol] - Currency symbol for currency
531
- * @property {number} [effective] - Current per unit price of product after
532
- * existing deductions
533
- * @property {number} [marked] - Original price of product
486
+ * @typedef BulkPriceOffer
487
+ * @property {OfferSeller} [seller]
488
+ * @property {OfferItem[]} [offers]
534
489
  */
535
490
 
536
491
  /**
537
- * @typedef OfferSeller
538
- * @property {string} [name]
539
- * @property {number} [uid] - Seller id
492
+ * @typedef BulkPriceResponse
493
+ * @property {BulkPriceOffer[]} [data] - Consist of offers from multiple seller
540
494
  */
541
495
 
542
496
  /**
543
- * @typedef Ownership
544
- * @property {string} [payable_by] - Promo amount bearable party
545
- * @property {string} [payable_category] - Promo amount payable category
497
+ * @typedef RewardPointRequest
498
+ * @property {boolean} points
546
499
  */
547
500
 
548
501
  /**
549
- * @typedef PageCoupon
550
- * @property {number} [current]
551
- * @property {boolean} [has_next]
552
- * @property {boolean} [has_previous]
553
- * @property {number} [total]
554
- * @property {number} [total_item_count]
502
+ * @typedef GeoLocation
503
+ * @property {number} [latitude]
504
+ * @property {number} [longitude]
505
+ */
506
+
507
+ /**
508
+ * @typedef Address
509
+ * @property {Object} [meta]
510
+ * @property {string} [country_code]
511
+ * @property {string} [country_iso_code]
512
+ * @property {string} [country]
513
+ * @property {string} [id]
514
+ * @property {string} [checkout_mode]
515
+ * @property {string} [created_by_user_id]
516
+ * @property {string} [area]
517
+ * @property {boolean} [is_active]
518
+ * @property {string} [city]
519
+ * @property {string} [sector]
520
+ * @property {string} [state_code] - State code for international address
521
+ * @property {string} [address_type]
522
+ * @property {string} [state]
523
+ * @property {boolean} [is_default_address]
524
+ * @property {Object} [_custom_json]
525
+ * @property {string} [country_phone_code]
526
+ * @property {string} [area_code_slug]
527
+ * @property {string} [area_code]
528
+ * @property {string} [email]
529
+ * @property {Object} [google_map_point]
530
+ * @property {GeoLocation} [geo_location]
531
+ * @property {string} [address]
532
+ * @property {string[]} [tags]
533
+ * @property {string} [name]
534
+ * @property {string} [landmark]
535
+ * @property {string} [user_id]
536
+ * @property {string} [phone]
555
537
  */
556
538
 
557
539
  /**
558
- * @typedef PaymentCouponValidate
559
- * @property {CouponValidity} [coupon_validity]
560
- * @property {string} [message]
561
- * @property {boolean} success
540
+ * @typedef GetAddressesResponse
541
+ * @property {boolean} [pii_masking]
542
+ * @property {Address[]} [address]
562
543
  */
563
544
 
564
545
  /**
565
- * @typedef PaymentSelectionLock
566
- * @property {string} [default_options]
567
- * @property {boolean} [enabled]
568
- * @property {string} [payment_identifier]
546
+ * @typedef SaveAddressResponse
547
+ * @property {boolean} [is_default_address]
548
+ * @property {boolean} [success]
549
+ * @property {string} [id]
569
550
  */
570
551
 
571
552
  /**
572
- * @typedef PickupStoreDetail
573
- * @property {string} [address]
574
- * @property {string} [address_type]
575
- * @property {string} [area]
576
- * @property {string} [area_code]
577
- * @property {string} [area_code_slug]
578
- * @property {string} [city]
579
- * @property {string} [country]
580
- * @property {string} [email]
581
- * @property {number} [id]
582
- * @property {string} [landmark]
583
- * @property {string} [name]
584
- * @property {string} [phone]
585
- * @property {number} [pincode]
586
- * @property {string} [state]
587
- * @property {string} [store_code]
588
- * @property {number} [uid]
553
+ * @typedef UpdateAddressResponse
554
+ * @property {boolean} [is_updated]
555
+ * @property {boolean} [is_default_address]
556
+ * @property {boolean} [success]
557
+ * @property {string} [id]
589
558
  */
590
559
 
591
560
  /**
592
- * @typedef ProductAction
593
- * @property {ActionQuery} [query]
594
- * @property {string} [type]
595
- * @property {string} [url]
561
+ * @typedef DeleteAddressResponse
562
+ * @property {boolean} [is_deleted]
563
+ * @property {string} [id]
596
564
  */
597
565
 
598
566
  /**
599
- * @typedef ProductArticle
600
- * @property {Object} [_custom_json]
601
- * @property {Object} [cart_item_meta]
602
- * @property {Object} [extra_meta]
603
- * @property {Object} [gift_card]
604
- * @property {Object} [identifier]
605
- * @property {boolean} [is_gift_visible]
606
- * @property {Object} [meta]
607
- * @property {number} [mto_quantity]
608
- * @property {Object} [parent_item_identifiers]
609
- * @property {ArticlePriceInfo} [price]
610
- * @property {string[]} [product_group_tags]
611
- * @property {number} [quantity]
612
- * @property {BaseInfo} [seller]
613
- * @property {string} [seller_identifier]
614
- * @property {string} [size]
615
- * @property {StoreInfo} [store]
616
- * @property {string[]} [tags] - A list of article tags
617
- * @property {string} [type]
618
- * @property {string} [uid]
567
+ * @typedef SelectCartAddressRequest
568
+ * @property {string} [billing_address_id]
569
+ * @property {string} [cart_id]
570
+ * @property {string} [id]
619
571
  */
620
572
 
621
573
  /**
622
- * @typedef ProductAvailability
623
- * @property {ProductAvailabilitySize[]} [available_sizes]
624
- * @property {boolean} [deliverable]
625
- * @property {boolean} [is_valid]
626
- * @property {number} [other_store_quantity]
627
- * @property {boolean} [out_of_stock]
628
- * @property {string[]} [sizes]
574
+ * @typedef UpdateCartPaymentRequest
575
+ * @property {string} [payment_identifier]
576
+ * @property {string} [aggregator_name]
577
+ * @property {string} [address_id]
578
+ * @property {string} [merchant_code]
579
+ * @property {string} [payment_mode]
580
+ * @property {string} [id]
629
581
  */
630
582
 
631
583
  /**
632
- * @typedef ProductAvailabilitySize
633
- * @property {string} [display]
634
- * @property {boolean} [is_available]
635
- * @property {string} [value]
584
+ * @typedef CouponValidity
585
+ * @property {number} [discount]
586
+ * @property {boolean} [valid]
587
+ * @property {boolean} [next_validation_required]
588
+ * @property {string} [display_message_en]
589
+ * @property {string} [code]
590
+ * @property {string} [title]
636
591
  */
637
592
 
638
593
  /**
639
- * @typedef ProductImage
640
- * @property {string} [aspect_ratio]
641
- * @property {string} [secure_url]
642
- * @property {string} [url]
594
+ * @typedef PaymentCouponValidate
595
+ * @property {string} [message]
596
+ * @property {boolean} success
597
+ * @property {CouponValidity} [coupon_validity]
643
598
  */
644
599
 
645
600
  /**
646
- * @typedef ProductPrice
647
- * @property {number} [add_on]
648
- * @property {string} [currency_code]
649
- * @property {string} [currency_symbol]
650
- * @property {number} [effective]
651
- * @property {number} [marked]
652
- * @property {number} [selling]
601
+ * @typedef ShipmentResponse
602
+ * @property {number} [shipments]
603
+ * @property {string} [fulfillment_type]
604
+ * @property {ShipmentPromise} [promise]
605
+ * @property {string} [dp_id]
606
+ * @property {string} [box_type]
607
+ * @property {Object} [dp_options]
608
+ * @property {CartProductInfo[]} [items]
609
+ * @property {string} [order_type]
610
+ * @property {string} [shipment_type]
611
+ * @property {number} [fulfillment_id]
653
612
  */
654
613
 
655
614
  /**
656
- * @typedef ProductPriceInfo
657
- * @property {ProductPrice} [base]
658
- * @property {ProductPrice} [converted]
615
+ * @typedef CartShipmentsResponse
616
+ * @property {string} [comment]
617
+ * @property {boolean} [restrict_checkout]
618
+ * @property {string} [message]
619
+ * @property {boolean} [buy_now]
620
+ * @property {string} [coupon_text]
621
+ * @property {string} [last_modified]
622
+ * @property {number} [cart_id]
623
+ * @property {CartBreakup} [breakup_values]
624
+ * @property {boolean} [is_valid]
625
+ * @property {string} [delivery_charge_info]
626
+ * @property {string} [id]
627
+ * @property {PaymentSelectionLock} [payment_selection_lock]
628
+ * @property {string} [gstin]
629
+ * @property {ShipmentResponse[]} [shipments]
630
+ * @property {boolean} [error]
631
+ * @property {ShipmentPromise} [delivery_promise]
632
+ * @property {string} [uid]
633
+ * @property {string} [checkout_mode]
634
+ * @property {CartCurrency} [currency]
659
635
  */
660
636
 
661
637
  /**
662
- * @typedef PromiseFormatted
663
- * @property {string} [max]
664
- * @property {string} [min]
638
+ * @typedef UpdateCartShipmentItem
639
+ * @property {number} [quantity] - Quantity of product in shipment
640
+ * @property {string} shipment_type - Shipment delivery type
641
+ * @property {string} article_uid - Article mongo id
665
642
  */
666
643
 
667
644
  /**
668
- * @typedef PromiseISOFormat
669
- * @property {string} [max] - Max promise in ISO format.
670
- * @property {string} [min] - Min Promise in ISO format.
645
+ * @typedef UpdateCartShipmentRequest
646
+ * @property {UpdateCartShipmentItem[]} shipments
671
647
  */
672
648
 
673
649
  /**
674
- * @typedef PromiseTimestamp
675
- * @property {number} [max]
676
- * @property {number} [min]
650
+ * @typedef StaffCheckout
651
+ * @property {string} first_name
652
+ * @property {string} user
653
+ * @property {string} [employee_code]
654
+ * @property {string} _id
655
+ * @property {string} last_name
677
656
  */
678
657
 
679
658
  /**
680
- * @typedef PromoMeta
681
- * @property {string} [message]
659
+ * @typedef CustomerDetails
660
+ * @property {string} mobile
661
+ * @property {string} [name]
662
+ * @property {string} [email]
682
663
  */
683
664
 
684
665
  /**
685
- * @typedef RawBreakup
686
- * @property {number} [cod_charge]
687
- * @property {number} [convenience_fee]
688
- * @property {number} [coupon]
689
- * @property {number} [delivery_charge]
690
- * @property {number} [discount]
691
- * @property {number} [fynd_cash]
692
- * @property {number} [gift_card]
693
- * @property {number} [gst_charges]
694
- * @property {number} [mrp_total]
695
- * @property {number} [subtotal]
696
- * @property {number} [total]
697
- * @property {number} [vog]
698
- * @property {number} [you_saved]
666
+ * @typedef CartCheckoutCustomMeta
667
+ * @property {string} value
668
+ * @property {string} key
699
669
  */
700
670
 
701
671
  /**
702
- * @typedef RewardPointRequest
703
- * @property {boolean} points
672
+ * @typedef Files
673
+ * @property {string[]} values
674
+ * @property {string} key
704
675
  */
705
676
 
706
677
  /**
707
- * @typedef SaveAddressResponse
678
+ * @typedef CartPosCheckoutDetailRequest
679
+ * @property {Object} [meta]
680
+ * @property {number} [pick_at_store_uid]
681
+ * @property {Object} [billing_address]
682
+ * @property {boolean} [payment_auto_confirm]
683
+ * @property {string} [callback_url]
684
+ * @property {Object} [delivery_address]
685
+ * @property {string} [merchant_code]
686
+ * @property {string} order_type
708
687
  * @property {string} [id]
709
- * @property {boolean} [is_default_address]
710
- * @property {boolean} [success]
711
- */
712
-
713
- /**
714
- * @typedef SelectCartAddressRequest
688
+ * @property {StaffCheckout} [staff]
689
+ * @property {Object} [customer_details] - Customer details
690
+ * @property {string} [address_id]
691
+ * @property {string} [aggregator]
692
+ * @property {Object} [payment_params]
715
693
  * @property {string} [billing_address_id]
716
- * @property {string} [cart_id]
717
- * @property {string} [id]
694
+ * @property {string} payment_mode
695
+ * @property {boolean} [pos]
696
+ * @property {Object} [extra_meta]
697
+ * @property {CartCheckoutCustomMeta[]} [custom_meta]
698
+ * @property {string} [payment_identifier]
699
+ * @property {number} [ordering_store]
700
+ * @property {Files[]} [files] - List of file url
718
701
  */
719
702
 
720
703
  /**
721
- * @typedef SharedCart
722
- * @property {CartBreakup} [breakup_values]
723
- * @property {boolean} [buy_now]
724
- * @property {number} [cart_id]
725
- * @property {string} [checkout_mode]
704
+ * @typedef CheckCart
726
705
  * @property {string} [comment]
706
+ * @property {number} [delivery_charges]
727
707
  * @property {string} [coupon_text]
728
- * @property {CartCurrency} [currency]
708
+ * @property {string} [last_modified]
709
+ * @property {boolean} [is_valid]
710
+ * @property {string} [cod_message]
711
+ * @property {boolean} [success]
712
+ * @property {string} [id]
713
+ * @property {string} [uid]
714
+ * @property {string} [checkout_mode]
715
+ * @property {string} [error_message]
716
+ * @property {Object[]} [store_emps]
717
+ * @property {string} [store_code]
718
+ * @property {boolean} [restrict_checkout]
719
+ * @property {string} [message]
720
+ * @property {boolean} [buy_now]
721
+ * @property {boolean} [cod_available]
722
+ * @property {number} [cart_id]
723
+ * @property {CartBreakup} [breakup_values]
724
+ * @property {string} [order_id]
725
+ * @property {number} [cod_charges]
729
726
  * @property {string} [delivery_charge_info]
730
- * @property {ShipmentPromise} [delivery_promise]
727
+ * @property {string} [user_type]
728
+ * @property {PaymentSelectionLock} [payment_selection_lock]
731
729
  * @property {string} [gstin]
732
- * @property {string} [id]
733
- * @property {boolean} [is_valid]
730
+ * @property {ShipmentPromise} [delivery_promise]
734
731
  * @property {CartProductInfo[]} [items]
735
- * @property {string} [last_modified]
736
- * @property {string} [message]
737
- * @property {PaymentSelectionLock} [payment_selection_lock]
738
- * @property {boolean} [restrict_checkout]
739
- * @property {SharedCartDetails} [shared_cart_details]
740
- * @property {string} [uid]
741
- */
742
-
743
- /**
744
- * @typedef SharedCartDetails
745
- * @property {string} [created_on]
746
- * @property {Object} [meta] - Meta data sent while generating share cart link
747
- * @property {Object} [source] - Share link device and other source information
748
- * @property {string} [token] - Short link id
749
- * @property {Object} [user] - User details of who generated share link
732
+ * @property {CartCurrency} [currency]
733
+ * @property {number} [delivery_charge_order_value]
750
734
  */
751
735
 
752
736
  /**
753
- * @typedef SharedCartResponse
754
- * @property {SharedCart} [cart]
755
- * @property {string} [error]
737
+ * @typedef CartCheckoutResponse
738
+ * @property {CheckCart} [cart]
739
+ * @property {string} [app_intercept_url]
740
+ * @property {string} [callback_url]
741
+ * @property {string} [message]
742
+ * @property {Object} [data]
743
+ * @property {string} [order_id]
744
+ * @property {boolean} [success]
745
+ * @property {string} [payment_confirm_url]
756
746
  */
757
747
 
758
748
  /**
759
- * @typedef ShipmentPromise
760
- * @property {PromiseFormatted} [formatted]
761
- * @property {PromiseISOFormat} [iso]
762
- * @property {PromiseTimestamp} [timestamp]
749
+ * @typedef GiftDetail
750
+ * @property {string} [gift_message]
751
+ * @property {boolean} [is_gift_applied]
763
752
  */
764
753
 
765
754
  /**
766
- * @typedef ShipmentResponse
767
- * @property {string} [box_type]
768
- * @property {string} [dp_id]
769
- * @property {Object} [dp_options]
770
- * @property {number} [fulfillment_id]
771
- * @property {string} [fulfillment_type]
772
- * @property {CartProductInfo[]} [items]
773
- * @property {string} [order_type]
774
- * @property {ShipmentPromise} [promise]
775
- * @property {string} [shipment_type]
776
- * @property {number} [shipments]
755
+ * @typedef ArticleGiftDetail
756
+ * @property {GiftDetail} [article_id]
777
757
  */
778
758
 
779
759
  /**
780
- * @typedef StaffCheckout
781
- * @property {string} _id
782
- * @property {string} [employee_code]
783
- * @property {string} first_name
784
- * @property {string} last_name
785
- * @property {string} user
760
+ * @typedef CartMetaRequest
761
+ * @property {string} [comment]
762
+ * @property {string} [gstin]
763
+ * @property {Object} [pick_up_customer_details] - Customer contact details for
764
+ * customer pickup at store
765
+ * @property {string} [checkout_mode]
766
+ * @property {ArticleGiftDetail} [gift_details]
767
+ * @property {Object} [delivery_slots]
786
768
  */
787
769
 
788
770
  /**
789
- * @typedef StoreDetailsResponse
790
- * @property {PickupStoreDetail[]} [items]
771
+ * @typedef CartMetaResponse
772
+ * @property {string} [message]
773
+ * @property {boolean} [is_valid]
791
774
  */
792
775
 
793
776
  /**
794
- * @typedef StoreInfo
795
- * @property {string} [name]
796
- * @property {string} [store_code]
797
- * @property {number} [uid]
777
+ * @typedef CartMetaMissingResponse
778
+ * @property {string[]} [errors]
798
779
  */
799
780
 
800
781
  /**
801
- * @typedef Tags
802
- * @property {Object} [tags]
782
+ * @typedef CartDeliveryModesResponse
783
+ * @property {string[]} [available_modes] - Available delivery modes
784
+ * @property {number[]} [pickup_stores] - Store pick up available store uids
803
785
  */
804
786
 
805
787
  /**
806
- * @typedef UpdateAddressResponse
807
- * @property {string} [id]
808
- * @property {boolean} [is_default_address]
809
- * @property {boolean} [is_updated]
810
- * @property {boolean} [success]
788
+ * @typedef PickupStoreDetail
789
+ * @property {string} [city]
790
+ * @property {string} [address_type]
791
+ * @property {string} [address]
792
+ * @property {string} [state]
793
+ * @property {string} [store_code]
794
+ * @property {number} [uid]
795
+ * @property {number} [pincode]
796
+ * @property {string} [area_code_slug]
797
+ * @property {string} [area_code]
798
+ * @property {string} [email]
799
+ * @property {string} [name]
800
+ * @property {string} [landmark]
801
+ * @property {string} [area]
802
+ * @property {string} [country]
803
+ * @property {string} [phone]
804
+ * @property {number} [id]
811
805
  */
812
806
 
813
807
  /**
814
- * @typedef UpdateCartDetailResponse
815
- * @property {CartDetailResponse} [cart]
816
- * @property {string} [message]
817
- * @property {boolean} [success] - True if all items are added successfully.
818
- * False if partially added or not added.
808
+ * @typedef StoreDetailsResponse
809
+ * @property {PickupStoreDetail[]} [items]
819
810
  */
820
811
 
821
812
  /**
822
- * @typedef UpdateCartPaymentRequest
823
- * @property {string} [address_id]
824
- * @property {string} [aggregator_name]
825
- * @property {string} [id]
826
- * @property {string} [merchant_code]
827
- * @property {string} [payment_identifier]
828
- * @property {string} [payment_mode]
813
+ * @typedef GetShareCartLinkRequest
814
+ * @property {Object} [meta] - Staff, Ordering store or any other data. This
815
+ * data will be used to generate link as well as sent as shared details.
816
+ * @property {string} [id] - Cart uid for generating sharing
829
817
  */
830
818
 
831
819
  /**
832
- * @typedef UpdateCartRequest
833
- * @property {UpdateProductCart[]} [items]
834
- * @property {string} operation
820
+ * @typedef GetShareCartLinkResponse
821
+ * @property {string} [share_url] - Short shareable final url
822
+ * @property {string} [token] - Short url unique id
835
823
  */
836
824
 
837
825
  /**
838
- * @typedef UpdateCartShipmentItem
839
- * @property {string} article_uid - Article mongo id
840
- * @property {number} [quantity] - Quantity of product in shipment
841
- * @property {string} shipment_type - Shipment delivery type
826
+ * @typedef SharedCartDetails
827
+ * @property {Object} [meta] - Meta data sent while generating share cart link
828
+ * @property {Object} [user] - User details of who generated share link
829
+ * @property {string} [created_on]
830
+ * @property {string} [token] - Short link id
831
+ * @property {Object} [source] - Share link device and other source information
842
832
  */
843
833
 
844
834
  /**
845
- * @typedef UpdateCartShipmentRequest
846
- * @property {UpdateCartShipmentItem[]} shipments
835
+ * @typedef SharedCart
836
+ * @property {string} [comment]
837
+ * @property {string} [coupon_text]
838
+ * @property {string} [last_modified]
839
+ * @property {SharedCartDetails} [shared_cart_details]
840
+ * @property {boolean} [is_valid]
841
+ * @property {string} [id]
842
+ * @property {string} [uid]
843
+ * @property {string} [checkout_mode]
844
+ * @property {boolean} [restrict_checkout]
845
+ * @property {string} [message]
846
+ * @property {boolean} [buy_now]
847
+ * @property {number} [cart_id]
848
+ * @property {CartBreakup} [breakup_values]
849
+ * @property {string} [delivery_charge_info]
850
+ * @property {PaymentSelectionLock} [payment_selection_lock]
851
+ * @property {string} [gstin]
852
+ * @property {ShipmentPromise} [delivery_promise]
853
+ * @property {CartProductInfo[]} [items]
854
+ * @property {CartCurrency} [currency]
847
855
  */
848
856
 
849
857
  /**
850
- * @typedef UpdateProductCart
851
- * @property {Object} [_custom_json]
852
- * @property {string} [article_id]
853
- * @property {Object} [extra_meta]
854
- * @property {CartProductIdentifer} identifiers
855
- * @property {number} [item_id]
856
- * @property {number} [item_index]
857
- * @property {string} [item_size]
858
- * @property {Object} [meta]
859
- * @property {Object} [parent_item_identifiers]
860
- * @property {number} [quantity]
858
+ * @typedef SharedCartResponse
859
+ * @property {string} [error]
860
+ * @property {SharedCart} [cart]
861
861
  */
862
862
 
863
863
  class PosCartApplicationModel {
864
- /** @returns {ActionQuery} */
865
- static ActionQuery() {
866
- return Joi.object({
867
- product_slug: Joi.array().items(Joi.string().allow("")),
868
- });
869
- }
870
-
871
- /** @returns {AddCartDetailResponse} */
872
- static AddCartDetailResponse() {
873
- return Joi.object({
874
- cart: PosCartApplicationModel.CartDetailResponse(),
875
- message: Joi.string().allow(""),
876
- partial: Joi.boolean(),
877
- success: Joi.boolean(),
878
- });
879
- }
880
-
881
- /** @returns {AddCartRequest} */
882
- static AddCartRequest() {
883
- return Joi.object({
884
- items: Joi.array().items(PosCartApplicationModel.AddProductCart()),
885
- new_cart: Joi.boolean(),
886
- });
887
- }
888
-
889
- /** @returns {AddProductCart} */
890
- static AddProductCart() {
891
- return Joi.object({
892
- _custom_json: Joi.any(),
893
- article_assignment: Joi.any(),
894
- article_id: Joi.string().allow(""),
895
- display: Joi.string().allow(""),
896
- extra_meta: Joi.any(),
897
- item_id: Joi.number(),
898
- item_size: Joi.string().allow(""),
899
- meta: Joi.any(),
900
- parent_item_identifiers: Joi.array().items(
901
- Joi.object().pattern(/\S/, Joi.string().allow(""))
902
- ),
903
- pos: Joi.boolean(),
904
- product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
905
- quantity: Joi.number(),
906
- seller_id: Joi.number(),
907
- store_id: Joi.number(),
908
- });
909
- }
910
-
911
- /** @returns {Address} */
912
- static Address() {
864
+ /** @returns {BuyRules} */
865
+ static BuyRules() {
913
866
  return Joi.object({
914
- _custom_json: Joi.any(),
915
- address: Joi.string().allow(""),
916
- address_type: Joi.string().allow(""),
917
- area: Joi.string().allow(""),
918
- area_code: Joi.string().allow(""),
919
- area_code_slug: Joi.string().allow(""),
920
- checkout_mode: Joi.string().allow(""),
921
- city: Joi.string().allow(""),
922
- country: Joi.string().allow(""),
923
- country_code: Joi.string().allow(""),
924
- country_iso_code: Joi.string().allow(""),
925
- country_phone_code: Joi.string().allow(""),
926
- created_by_user_id: Joi.string().allow(""),
927
- email: Joi.string().allow(""),
928
- geo_location: PosCartApplicationModel.GeoLocation(),
929
- google_map_point: Joi.any(),
930
- id: Joi.string().allow(""),
931
- is_active: Joi.boolean(),
932
- is_default_address: Joi.boolean(),
933
- landmark: Joi.string().allow(""),
934
- meta: Joi.any(),
935
- name: Joi.string().allow(""),
936
- phone: Joi.string().allow(""),
937
- sector: Joi.string().allow(""),
938
- state: Joi.string().allow(""),
939
- state_code: Joi.string().allow(""),
940
- tags: Joi.array().items(Joi.string().allow("")),
941
- user_id: Joi.string().allow(""),
867
+ cart_conditions: Joi.any(),
868
+ item_criteria: Joi.any(),
869
+ });
870
+ }
871
+
872
+ /** @returns {DiscountRulesApp} */
873
+ static DiscountRulesApp() {
874
+ return Joi.object({
875
+ matched_buy_rules: Joi.array().items(Joi.string().allow("")),
876
+ offer: Joi.any(),
877
+ item_criteria: Joi.any(),
878
+ raw_offer: Joi.any(),
879
+ });
880
+ }
881
+
882
+ /** @returns {FreeGiftItem} */
883
+ static FreeGiftItem() {
884
+ return Joi.object({
885
+ item_slug: Joi.string().allow(""),
886
+ item_price_details: Joi.any(),
887
+ item_images_url: Joi.array().items(Joi.string().allow("")),
888
+ item_name: Joi.string().allow(""),
889
+ item_id: Joi.number(),
890
+ item_brand_name: Joi.string().allow(""),
942
891
  });
943
892
  }
944
893
 
945
894
  /** @returns {AppliedFreeArticles} */
946
895
  static AppliedFreeArticles() {
947
896
  return Joi.object({
897
+ quantity: Joi.number(),
898
+ parent_item_identifier: Joi.string().allow(""),
948
899
  article_id: Joi.string().allow(""),
949
900
  free_gift_item_details: PosCartApplicationModel.FreeGiftItem(),
950
- parent_item_identifier: Joi.string().allow(""),
951
- quantity: Joi.number(),
901
+ });
902
+ }
903
+
904
+ /** @returns {Ownership} */
905
+ static Ownership() {
906
+ return Joi.object({
907
+ payable_category: Joi.string().allow(""),
908
+ payable_by: Joi.string().allow(""),
952
909
  });
953
910
  }
954
911
 
955
912
  /** @returns {AppliedPromotion} */
956
913
  static AppliedPromotion() {
957
914
  return Joi.object({
958
- amount: Joi.number(),
959
- applied_free_articles: Joi.array().items(
960
- PosCartApplicationModel.AppliedFreeArticles()
961
- ),
962
- article_quantity: Joi.number(),
915
+ promotion_name: Joi.string().allow(""),
916
+ mrp_promotion: Joi.boolean(),
963
917
  buy_rules: Joi.array().items(PosCartApplicationModel.BuyRules()),
964
- currency: PosCartApplicationModel.CartCurrency(),
918
+ promotion_type: Joi.string().allow(""),
919
+ article_quantity: Joi.number(),
920
+ amount: Joi.number(),
965
921
  discount_rules: Joi.array().items(
966
922
  PosCartApplicationModel.DiscountRulesApp()
967
923
  ),
968
- mrp_promotion: Joi.boolean(),
969
924
  offer_text: Joi.string().allow(""),
970
- ownership: PosCartApplicationModel.Ownership(),
971
925
  promo_id: Joi.string().allow(""),
926
+ applied_free_articles: Joi.array().items(
927
+ PosCartApplicationModel.AppliedFreeArticles()
928
+ ),
929
+ ownership: PosCartApplicationModel.Ownership(),
930
+ currency: PosCartApplicationModel.CartCurrency(),
972
931
  promotion_group: Joi.string().allow(""),
973
- promotion_name: Joi.string().allow(""),
974
- promotion_type: Joi.string().allow(""),
975
932
  });
976
933
  }
977
934
 
978
- /** @returns {ApplyCouponRequest} */
979
- static ApplyCouponRequest() {
935
+ /** @returns {LoyaltyPoints} */
936
+ static LoyaltyPoints() {
980
937
  return Joi.object({
981
- coupon_code: Joi.string().allow("").required(),
938
+ description: Joi.string().allow(""),
939
+ is_applied: Joi.boolean(),
940
+ applicable: Joi.number(),
941
+ total: Joi.number(),
982
942
  });
983
943
  }
984
944
 
985
- /** @returns {ArticleGiftDetail} */
986
- static ArticleGiftDetail() {
945
+ /** @returns {RawBreakup} */
946
+ static RawBreakup() {
987
947
  return Joi.object({
988
- article_id: PosCartApplicationModel.GiftDetail(),
948
+ discount: Joi.number(),
949
+ you_saved: Joi.number(),
950
+ mrp_total: Joi.number(),
951
+ gst_charges: Joi.number(),
952
+ total: Joi.number(),
953
+ vog: Joi.number(),
954
+ coupon: Joi.number(),
955
+ subtotal: Joi.number(),
956
+ delivery_charge: Joi.number(),
957
+ cod_charge: Joi.number(),
958
+ fynd_cash: Joi.number(),
959
+ gift_card: Joi.number(),
960
+ convenience_fee: Joi.number(),
989
961
  });
990
962
  }
991
963
 
992
- /** @returns {ArticlePriceInfo} */
993
- static ArticlePriceInfo() {
964
+ /** @returns {DisplayBreakup} */
965
+ static DisplayBreakup() {
994
966
  return Joi.object({
995
- base: PosCartApplicationModel.BasePrice(),
996
- converted: PosCartApplicationModel.BasePrice(),
967
+ currency_code: Joi.string().allow(""),
968
+ currency_symbol: Joi.string().allow(""),
969
+ display: Joi.string().allow(""),
970
+ message: Joi.array().items(Joi.string().allow("")),
971
+ key: Joi.string().allow(""),
972
+ value: Joi.number(),
997
973
  });
998
974
  }
999
975
 
1000
- /** @returns {BaseInfo} */
1001
- static BaseInfo() {
976
+ /** @returns {CouponBreakup} */
977
+ static CouponBreakup() {
1002
978
  return Joi.object({
1003
- name: Joi.string().allow(""),
1004
- uid: Joi.number(),
979
+ max_discount_value: Joi.number(),
980
+ message: Joi.string().allow(""),
981
+ is_applied: Joi.boolean(),
982
+ uid: Joi.string().allow(""),
983
+ type: Joi.string().allow(""),
984
+ coupon_type: Joi.string().allow("").allow(null),
985
+ sub_title: Joi.string().allow("").allow(null),
986
+ coupon_value: Joi.number(),
987
+ description: Joi.string().allow("").allow(null),
988
+ code: Joi.string().allow(""),
989
+ minimum_cart_value: Joi.number(),
990
+ value: Joi.number(),
991
+ title: Joi.string().allow("").allow(null),
1005
992
  });
1006
993
  }
1007
994
 
1008
- /** @returns {BasePrice} */
1009
- static BasePrice() {
995
+ /** @returns {CartBreakup} */
996
+ static CartBreakup() {
1010
997
  return Joi.object({
1011
- currency_code: Joi.string().allow(""),
1012
- currency_symbol: Joi.string().allow(""),
1013
- effective: Joi.number(),
1014
- marked: Joi.number(),
998
+ loyalty_points: PosCartApplicationModel.LoyaltyPoints(),
999
+ raw: PosCartApplicationModel.RawBreakup(),
1000
+ display: Joi.array().items(PosCartApplicationModel.DisplayBreakup()),
1001
+ coupon: PosCartApplicationModel.CouponBreakup(),
1015
1002
  });
1016
1003
  }
1017
1004
 
1018
- /** @returns {BulkPriceOffer} */
1019
- static BulkPriceOffer() {
1005
+ /** @returns {PaymentSelectionLock} */
1006
+ static PaymentSelectionLock() {
1020
1007
  return Joi.object({
1021
- offers: Joi.array().items(PosCartApplicationModel.OfferItem()),
1022
- seller: PosCartApplicationModel.OfferSeller(),
1008
+ default_options: Joi.string().allow(""),
1009
+ enabled: Joi.boolean(),
1010
+ payment_identifier: Joi.string().allow(""),
1023
1011
  });
1024
1012
  }
1025
1013
 
1026
- /** @returns {BulkPriceResponse} */
1027
- static BulkPriceResponse() {
1014
+ /** @returns {PromiseTimestamp} */
1015
+ static PromiseTimestamp() {
1028
1016
  return Joi.object({
1029
- data: Joi.array().items(PosCartApplicationModel.BulkPriceOffer()),
1017
+ max: Joi.number(),
1018
+ min: Joi.number(),
1030
1019
  });
1031
1020
  }
1032
1021
 
1033
- /** @returns {BuyRules} */
1034
- static BuyRules() {
1022
+ /** @returns {PromiseFormatted} */
1023
+ static PromiseFormatted() {
1035
1024
  return Joi.object({
1036
- cart_conditions: Joi.any(),
1037
- item_criteria: Joi.any(),
1025
+ max: Joi.string().allow(""),
1026
+ min: Joi.string().allow(""),
1038
1027
  });
1039
1028
  }
1040
1029
 
1041
- /** @returns {CartBreakup} */
1042
- static CartBreakup() {
1030
+ /** @returns {PromiseISOFormat} */
1031
+ static PromiseISOFormat() {
1043
1032
  return Joi.object({
1044
- coupon: PosCartApplicationModel.CouponBreakup(),
1045
- display: Joi.array().items(PosCartApplicationModel.DisplayBreakup()),
1046
- loyalty_points: PosCartApplicationModel.LoyaltyPoints(),
1047
- raw: PosCartApplicationModel.RawBreakup(),
1033
+ max: Joi.string().allow(""),
1034
+ min: Joi.string().allow(""),
1048
1035
  });
1049
1036
  }
1050
1037
 
1051
- /** @returns {CartCheckoutCustomMeta} */
1052
- static CartCheckoutCustomMeta() {
1038
+ /** @returns {ShipmentPromise} */
1039
+ static ShipmentPromise() {
1053
1040
  return Joi.object({
1054
- key: Joi.string().allow("").required(),
1055
- value: Joi.string().allow("").required(),
1041
+ timestamp: PosCartApplicationModel.PromiseTimestamp(),
1042
+ formatted: PosCartApplicationModel.PromiseFormatted(),
1043
+ iso: PosCartApplicationModel.PromiseISOFormat(),
1056
1044
  });
1057
1045
  }
1058
1046
 
1059
- /** @returns {CartCheckoutResponse} */
1060
- static CartCheckoutResponse() {
1047
+ /** @returns {StoreInfo} */
1048
+ static StoreInfo() {
1061
1049
  return Joi.object({
1062
- app_intercept_url: Joi.string().allow(""),
1063
- callback_url: Joi.string().allow(""),
1064
- cart: PosCartApplicationModel.CheckCart(),
1065
- data: Joi.any(),
1066
- message: Joi.string().allow(""),
1067
- order_id: Joi.string().allow(""),
1068
- payment_confirm_url: Joi.string().allow(""),
1069
- success: Joi.boolean(),
1050
+ uid: Joi.number(),
1051
+ store_code: Joi.string().allow(""),
1052
+ name: Joi.string().allow(""),
1070
1053
  });
1071
1054
  }
1072
1055
 
1073
- /** @returns {CartCurrency} */
1074
- static CartCurrency() {
1056
+ /** @returns {BaseInfo} */
1057
+ static BaseInfo() {
1075
1058
  return Joi.object({
1076
- code: Joi.string().allow(""),
1077
- symbol: Joi.string().allow(""),
1059
+ uid: Joi.number(),
1060
+ name: Joi.string().allow(""),
1078
1061
  });
1079
1062
  }
1080
1063
 
1081
- /** @returns {CartDeliveryModesResponse} */
1082
- static CartDeliveryModesResponse() {
1064
+ /** @returns {BasePrice} */
1065
+ static BasePrice() {
1083
1066
  return Joi.object({
1084
- available_modes: Joi.array().items(Joi.string().allow("")),
1085
- pickup_stores: Joi.array().items(Joi.number()),
1067
+ effective: Joi.number(),
1068
+ currency_code: Joi.string().allow(""),
1069
+ currency_symbol: Joi.string().allow(""),
1070
+ marked: Joi.number(),
1086
1071
  });
1087
1072
  }
1088
1073
 
1089
- /** @returns {CartDetailResponse} */
1090
- static CartDetailResponse() {
1074
+ /** @returns {ArticlePriceInfo} */
1075
+ static ArticlePriceInfo() {
1091
1076
  return Joi.object({
1092
- applied_promo_details: Joi.array().items(
1093
- PosCartApplicationModel.AppliedPromotion()
1094
- ),
1095
- breakup_values: PosCartApplicationModel.CartBreakup(),
1096
- buy_now: Joi.boolean(),
1097
- checkout_mode: Joi.string().allow(""),
1098
- comment: Joi.string().allow(""),
1099
- coupon_text: Joi.string().allow(""),
1100
- currency: PosCartApplicationModel.CartCurrency(),
1101
- delivery_charge_info: Joi.string().allow(""),
1102
- delivery_promise: PosCartApplicationModel.ShipmentPromise(),
1103
- gstin: Joi.string().allow(""),
1104
- id: Joi.string().allow(""),
1105
- is_valid: Joi.boolean(),
1106
- items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
1107
- last_modified: Joi.string().allow(""),
1108
- message: Joi.string().allow(""),
1109
- pan_config: Joi.any(),
1110
- pan_no: Joi.string().allow(""),
1111
- payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
1112
- restrict_checkout: Joi.boolean(),
1077
+ converted: PosCartApplicationModel.BasePrice(),
1078
+ base: PosCartApplicationModel.BasePrice(),
1113
1079
  });
1114
1080
  }
1115
1081
 
1116
- /** @returns {CartItemCountResponse} */
1117
- static CartItemCountResponse() {
1082
+ /** @returns {ProductArticle} */
1083
+ static ProductArticle() {
1084
+ return Joi.object({
1085
+ meta: Joi.any(),
1086
+ store: PosCartApplicationModel.StoreInfo(),
1087
+ _custom_json: Joi.any(),
1088
+ seller_identifier: Joi.string().allow(""),
1089
+ identifier: Joi.any(),
1090
+ quantity: Joi.number(),
1091
+ seller: PosCartApplicationModel.BaseInfo(),
1092
+ mto_quantity: Joi.number(),
1093
+ uid: Joi.string().allow(""),
1094
+ cart_item_meta: Joi.any(),
1095
+ type: Joi.string().allow(""),
1096
+ price: PosCartApplicationModel.ArticlePriceInfo(),
1097
+ parent_item_identifiers: Joi.any(),
1098
+ size: Joi.string().allow(""),
1099
+ extra_meta: Joi.any(),
1100
+ gift_card: Joi.any(),
1101
+ product_group_tags: Joi.array().items(Joi.string().allow("")),
1102
+ is_gift_visible: Joi.boolean(),
1103
+ tags: Joi.array().items(Joi.string().allow("")),
1104
+ });
1105
+ }
1106
+
1107
+ /** @returns {Tags} */
1108
+ static Tags() {
1118
1109
  return Joi.object({
1119
- user_cart_items_count: Joi.number(),
1110
+ tags: Joi.any(),
1120
1111
  });
1121
1112
  }
1122
1113
 
1123
- /** @returns {CartMetaMissingResponse} */
1124
- static CartMetaMissingResponse() {
1114
+ /** @returns {CategoryInfo} */
1115
+ static CategoryInfo() {
1125
1116
  return Joi.object({
1126
- errors: Joi.array().items(Joi.string().allow("")),
1117
+ uid: Joi.number(),
1118
+ name: Joi.string().allow(""),
1127
1119
  });
1128
1120
  }
1129
1121
 
1130
- /** @returns {CartMetaRequest} */
1131
- static CartMetaRequest() {
1122
+ /** @returns {ProductImage} */
1123
+ static ProductImage() {
1132
1124
  return Joi.object({
1133
- checkout_mode: Joi.string().allow(""),
1134
- comment: Joi.string().allow(""),
1135
- delivery_slots: Joi.any(),
1136
- gift_details: PosCartApplicationModel.ArticleGiftDetail(),
1137
- gstin: Joi.string().allow(""),
1138
- pick_up_customer_details: Joi.any(),
1125
+ aspect_ratio: Joi.string().allow(""),
1126
+ url: Joi.string().allow(""),
1127
+ secure_url: Joi.string().allow(""),
1139
1128
  });
1140
1129
  }
1141
1130
 
1142
- /** @returns {CartMetaResponse} */
1143
- static CartMetaResponse() {
1131
+ /** @returns {ActionQuery} */
1132
+ static ActionQuery() {
1144
1133
  return Joi.object({
1145
- is_valid: Joi.boolean(),
1146
- message: Joi.string().allow(""),
1134
+ product_slug: Joi.array().items(Joi.string().allow("")),
1147
1135
  });
1148
1136
  }
1149
1137
 
1150
- /** @returns {CartPosCheckoutDetailRequest} */
1151
- static CartPosCheckoutDetailRequest() {
1138
+ /** @returns {ProductAction} */
1139
+ static ProductAction() {
1152
1140
  return Joi.object({
1153
- address_id: Joi.string().allow(""),
1154
- aggregator: Joi.string().allow(""),
1155
- billing_address: Joi.any(),
1156
- billing_address_id: Joi.string().allow(""),
1157
- callback_url: Joi.string().allow("").allow(null),
1158
- custom_meta: Joi.array().items(
1159
- PosCartApplicationModel.CartCheckoutCustomMeta()
1160
- ),
1161
- customer_details: Joi.any().allow(null),
1162
- delivery_address: Joi.any(),
1163
- extra_meta: Joi.any(),
1164
- files: Joi.array().items(PosCartApplicationModel.Files()),
1165
- id: Joi.string().allow("").allow(null),
1166
- merchant_code: Joi.string().allow(""),
1167
- meta: Joi.any(),
1168
- order_type: Joi.string().allow("").required(),
1169
- ordering_store: Joi.number().allow(null),
1170
- payment_auto_confirm: Joi.boolean(),
1171
- payment_identifier: Joi.string().allow("").allow(null),
1172
- payment_mode: Joi.string().allow("").required(),
1173
- payment_params: Joi.any().allow(null),
1174
- pick_at_store_uid: Joi.number().allow(null),
1175
- pos: Joi.boolean(),
1176
- staff: PosCartApplicationModel.StaffCheckout(),
1141
+ query: PosCartApplicationModel.ActionQuery(),
1142
+ url: Joi.string().allow(""),
1143
+ type: Joi.string().allow(""),
1177
1144
  });
1178
1145
  }
1179
1146
 
1180
1147
  /** @returns {CartProduct} */
1181
1148
  static CartProduct() {
1182
1149
  return Joi.object({
1150
+ teaser_tag: PosCartApplicationModel.Tags(),
1183
1151
  _custom_json: Joi.any(),
1184
- action: PosCartApplicationModel.ProductAction(),
1185
- brand: PosCartApplicationModel.BaseInfo(),
1186
1152
  categories: Joi.array().items(PosCartApplicationModel.CategoryInfo()),
1187
- images: Joi.array().items(PosCartApplicationModel.ProductImage()),
1188
1153
  item_code: Joi.string().allow("").allow(null),
1189
- name: Joi.string().allow(""),
1190
- slug: Joi.string().allow(""),
1191
1154
  tags: Joi.array().items(Joi.string().allow("")),
1192
- teaser_tag: PosCartApplicationModel.Tags(),
1193
- type: Joi.string().allow(""),
1194
1155
  uid: Joi.number(),
1156
+ type: Joi.string().allow(""),
1157
+ images: Joi.array().items(PosCartApplicationModel.ProductImage()),
1158
+ name: Joi.string().allow(""),
1159
+ slug: Joi.string().allow(""),
1160
+ action: PosCartApplicationModel.ProductAction(),
1161
+ brand: PosCartApplicationModel.BaseInfo(),
1195
1162
  });
1196
1163
  }
1197
1164
 
1198
- /** @returns {CartProductIdentifer} */
1199
- static CartProductIdentifer() {
1165
+ /** @returns {ProductPrice} */
1166
+ static ProductPrice() {
1200
1167
  return Joi.object({
1201
- identifier: Joi.string().allow(""),
1168
+ effective: Joi.number(),
1169
+ currency_code: Joi.string().allow(""),
1170
+ currency_symbol: Joi.string().allow(""),
1171
+ marked: Joi.number(),
1172
+ selling: Joi.number(),
1173
+ add_on: Joi.number(),
1202
1174
  });
1203
1175
  }
1204
1176
 
1205
- /** @returns {CartProductInfo} */
1206
- static CartProductInfo() {
1177
+ /** @returns {ProductPriceInfo} */
1178
+ static ProductPriceInfo() {
1207
1179
  return Joi.object({
1208
- article: PosCartApplicationModel.ProductArticle(),
1209
- availability: PosCartApplicationModel.ProductAvailability(),
1210
- bulk_offer: Joi.any(),
1211
- coupon: PosCartApplicationModel.CouponDetails(),
1212
- coupon_message: Joi.string().allow(""),
1213
- custom_order: Joi.any(),
1214
- delivery_promise: PosCartApplicationModel.ShipmentPromise(),
1215
- discount: Joi.string().allow(""),
1216
- identifiers: PosCartApplicationModel.CartProductIdentifer().required(),
1217
- is_set: Joi.boolean(),
1218
- key: Joi.string().allow(""),
1219
- message: Joi.string().allow(""),
1220
- moq: Joi.any(),
1221
- parent_item_identifiers: Joi.any(),
1222
- price: PosCartApplicationModel.ProductPriceInfo(),
1223
- price_per_unit: PosCartApplicationModel.ProductPriceInfo(),
1224
- product: PosCartApplicationModel.CartProduct(),
1225
- promo_meta: PosCartApplicationModel.PromoMeta(),
1226
- promotions_applied: Joi.array().items(
1227
- PosCartApplicationModel.AppliedPromotion()
1228
- ),
1229
- quantity: Joi.number(),
1180
+ converted: PosCartApplicationModel.ProductPrice(),
1181
+ base: PosCartApplicationModel.ProductPrice(),
1230
1182
  });
1231
1183
  }
1232
1184
 
1233
- /** @returns {CartShipmentsResponse} */
1234
- static CartShipmentsResponse() {
1185
+ /** @returns {CouponDetails} */
1186
+ static CouponDetails() {
1187
+ return Joi.object({
1188
+ discount_total_quantity: Joi.number(),
1189
+ discount_single_quantity: Joi.number(),
1190
+ code: Joi.string().allow(""),
1191
+ });
1192
+ }
1193
+
1194
+ /** @returns {PromoMeta} */
1195
+ static PromoMeta() {
1235
1196
  return Joi.object({
1236
- breakup_values: PosCartApplicationModel.CartBreakup(),
1237
- buy_now: Joi.boolean(),
1238
- cart_id: Joi.number(),
1239
- checkout_mode: Joi.string().allow(""),
1240
- comment: Joi.string().allow(""),
1241
- coupon_text: Joi.string().allow(""),
1242
- currency: PosCartApplicationModel.CartCurrency(),
1243
- delivery_charge_info: Joi.string().allow(""),
1244
- delivery_promise: PosCartApplicationModel.ShipmentPromise(),
1245
- error: Joi.boolean(),
1246
- gstin: Joi.string().allow(""),
1247
- id: Joi.string().allow(""),
1248
- is_valid: Joi.boolean(),
1249
- last_modified: Joi.string().allow(""),
1250
1197
  message: Joi.string().allow(""),
1251
- payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
1252
- restrict_checkout: Joi.boolean(),
1253
- shipments: Joi.array().items(PosCartApplicationModel.ShipmentResponse()),
1254
- uid: Joi.string().allow(""),
1255
1198
  });
1256
1199
  }
1257
1200
 
1258
- /** @returns {CategoryInfo} */
1259
- static CategoryInfo() {
1201
+ /** @returns {ProductAvailabilitySize} */
1202
+ static ProductAvailabilitySize() {
1260
1203
  return Joi.object({
1261
- name: Joi.string().allow(""),
1262
- uid: Joi.number(),
1204
+ is_available: Joi.boolean(),
1205
+ value: Joi.string().allow(""),
1206
+ display: Joi.string().allow(""),
1263
1207
  });
1264
1208
  }
1265
1209
 
1266
- /** @returns {CheckCart} */
1267
- static CheckCart() {
1210
+ /** @returns {ProductAvailability} */
1211
+ static ProductAvailability() {
1268
1212
  return Joi.object({
1269
- breakup_values: PosCartApplicationModel.CartBreakup(),
1270
- buy_now: Joi.boolean(),
1271
- cart_id: Joi.number(),
1272
- checkout_mode: Joi.string().allow(""),
1273
- cod_available: Joi.boolean(),
1274
- cod_charges: Joi.number(),
1275
- cod_message: Joi.string().allow(""),
1276
- comment: Joi.string().allow(""),
1277
- coupon_text: Joi.string().allow(""),
1278
- currency: PosCartApplicationModel.CartCurrency(),
1279
- delivery_charge_info: Joi.string().allow(""),
1280
- delivery_charge_order_value: Joi.number(),
1281
- delivery_charges: Joi.number(),
1282
- delivery_promise: PosCartApplicationModel.ShipmentPromise(),
1283
- error_message: Joi.string().allow(""),
1284
- gstin: Joi.string().allow(""),
1285
- id: Joi.string().allow(""),
1213
+ available_sizes: Joi.array().items(
1214
+ PosCartApplicationModel.ProductAvailabilitySize()
1215
+ ),
1216
+ other_store_quantity: Joi.number(),
1217
+ deliverable: Joi.boolean(),
1218
+ out_of_stock: Joi.boolean(),
1286
1219
  is_valid: Joi.boolean(),
1287
- items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
1288
- last_modified: Joi.string().allow(""),
1289
- message: Joi.string().allow(""),
1290
- order_id: Joi.string().allow(""),
1291
- payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
1292
- restrict_checkout: Joi.boolean(),
1293
- store_code: Joi.string().allow(""),
1294
- store_emps: Joi.array().items(Joi.any()),
1295
- success: Joi.boolean(),
1296
- uid: Joi.string().allow(""),
1297
- user_type: Joi.string().allow(""),
1220
+ sizes: Joi.array().items(Joi.string().allow("")),
1298
1221
  });
1299
1222
  }
1300
1223
 
1301
- /** @returns {Coupon} */
1302
- static Coupon() {
1224
+ /** @returns {CartProductIdentifer} */
1225
+ static CartProductIdentifer() {
1303
1226
  return Joi.object({
1304
- coupon_code: Joi.string().allow(""),
1305
- coupon_type: Joi.string().allow("").allow(null),
1306
- coupon_value: Joi.number(),
1307
- description: Joi.string().allow("").allow(null),
1308
- expires_on: Joi.string().allow(""),
1309
- is_applicable: Joi.boolean(),
1310
- is_applied: Joi.boolean(),
1311
- max_discount_value: Joi.number(),
1312
- message: Joi.string().allow(""),
1313
- minimum_cart_value: Joi.number(),
1314
- sub_title: Joi.string().allow(""),
1315
- title: Joi.string().allow(""),
1227
+ identifier: Joi.string().allow(""),
1316
1228
  });
1317
1229
  }
1318
1230
 
1319
- /** @returns {CouponBreakup} */
1320
- static CouponBreakup() {
1231
+ /** @returns {CartProductInfo} */
1232
+ static CartProductInfo() {
1321
1233
  return Joi.object({
1322
- code: Joi.string().allow(""),
1323
- coupon_type: Joi.string().allow("").allow(null),
1324
- coupon_value: Joi.number(),
1325
- description: Joi.string().allow("").allow(null),
1326
- is_applied: Joi.boolean(),
1327
- max_discount_value: Joi.number(),
1234
+ custom_order: Joi.any(),
1235
+ article: PosCartApplicationModel.ProductArticle(),
1236
+ product: PosCartApplicationModel.CartProduct(),
1237
+ quantity: Joi.number(),
1238
+ moq: Joi.any(),
1239
+ promotions_applied: Joi.array().items(
1240
+ PosCartApplicationModel.AppliedPromotion()
1241
+ ),
1242
+ price_per_unit: PosCartApplicationModel.ProductPriceInfo(),
1243
+ key: Joi.string().allow(""),
1244
+ price: PosCartApplicationModel.ProductPriceInfo(),
1245
+ parent_item_identifiers: Joi.any(),
1246
+ is_set: Joi.boolean(),
1247
+ coupon_message: Joi.string().allow(""),
1328
1248
  message: Joi.string().allow(""),
1329
- minimum_cart_value: Joi.number(),
1330
- sub_title: Joi.string().allow("").allow(null),
1331
- title: Joi.string().allow("").allow(null),
1332
- type: Joi.string().allow(""),
1333
- uid: Joi.string().allow(""),
1334
- value: Joi.number(),
1249
+ coupon: PosCartApplicationModel.CouponDetails(),
1250
+ discount: Joi.string().allow(""),
1251
+ bulk_offer: Joi.any(),
1252
+ promo_meta: PosCartApplicationModel.PromoMeta(),
1253
+ delivery_promise: PosCartApplicationModel.ShipmentPromise(),
1254
+ availability: PosCartApplicationModel.ProductAvailability(),
1255
+ identifiers: PosCartApplicationModel.CartProductIdentifer().required(),
1335
1256
  });
1336
1257
  }
1337
1258
 
1338
- /** @returns {CouponDetails} */
1339
- static CouponDetails() {
1259
+ /** @returns {CartCurrency} */
1260
+ static CartCurrency() {
1261
+ return Joi.object({
1262
+ symbol: Joi.string().allow(""),
1263
+ code: Joi.string().allow(""),
1264
+ });
1265
+ }
1266
+
1267
+ /** @returns {CartDetailResponse} */
1268
+ static CartDetailResponse() {
1340
1269
  return Joi.object({
1341
- code: Joi.string().allow(""),
1342
- discount_single_quantity: Joi.number(),
1343
- discount_total_quantity: Joi.number(),
1270
+ comment: Joi.string().allow(""),
1271
+ coupon_text: Joi.string().allow(""),
1272
+ last_modified: Joi.string().allow(""),
1273
+ pan_config: Joi.any(),
1274
+ is_valid: Joi.boolean(),
1275
+ id: Joi.string().allow(""),
1276
+ applied_promo_details: Joi.array().items(
1277
+ PosCartApplicationModel.AppliedPromotion()
1278
+ ),
1279
+ checkout_mode: Joi.string().allow(""),
1280
+ restrict_checkout: Joi.boolean(),
1281
+ message: Joi.string().allow(""),
1282
+ buy_now: Joi.boolean(),
1283
+ breakup_values: PosCartApplicationModel.CartBreakup(),
1284
+ delivery_charge_info: Joi.string().allow(""),
1285
+ payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
1286
+ gstin: Joi.string().allow(""),
1287
+ delivery_promise: PosCartApplicationModel.ShipmentPromise(),
1288
+ pan_no: Joi.string().allow(""),
1289
+ items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
1290
+ currency: PosCartApplicationModel.CartCurrency(),
1344
1291
  });
1345
1292
  }
1346
1293
 
1347
- /** @returns {CouponValidity} */
1348
- static CouponValidity() {
1294
+ /** @returns {AddProductCart} */
1295
+ static AddProductCart() {
1349
1296
  return Joi.object({
1350
- code: Joi.string().allow("").allow(null),
1351
- discount: Joi.number(),
1352
- display_message_en: Joi.string().allow("").allow(null),
1353
- next_validation_required: Joi.boolean().allow(null),
1354
- title: Joi.string().allow(""),
1355
- valid: Joi.boolean(),
1297
+ seller_id: Joi.number(),
1298
+ _custom_json: Joi.any(),
1299
+ meta: Joi.any(),
1300
+ display: Joi.string().allow(""),
1301
+ quantity: Joi.number(),
1302
+ item_size: Joi.string().allow(""),
1303
+ item_id: Joi.number(),
1304
+ store_id: Joi.number(),
1305
+ pos: Joi.boolean(),
1306
+ parent_item_identifiers: Joi.array().items(
1307
+ Joi.object().pattern(/\S/, Joi.string().allow(""))
1308
+ ),
1309
+ extra_meta: Joi.any(),
1310
+ product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
1311
+ article_assignment: Joi.any(),
1312
+ article_id: Joi.string().allow(""),
1356
1313
  });
1357
1314
  }
1358
1315
 
1359
- /** @returns {CustomerDetails} */
1360
- static CustomerDetails() {
1316
+ /** @returns {AddCartRequest} */
1317
+ static AddCartRequest() {
1361
1318
  return Joi.object({
1362
- email: Joi.string().allow("").allow(null),
1363
- mobile: Joi.string().allow("").required(),
1364
- name: Joi.string().allow(""),
1319
+ items: Joi.array().items(PosCartApplicationModel.AddProductCart()),
1320
+ new_cart: Joi.boolean(),
1365
1321
  });
1366
1322
  }
1367
1323
 
1368
- /** @returns {DeleteAddressResponse} */
1369
- static DeleteAddressResponse() {
1324
+ /** @returns {AddCartDetailResponse} */
1325
+ static AddCartDetailResponse() {
1370
1326
  return Joi.object({
1371
- id: Joi.string().allow(""),
1372
- is_deleted: Joi.boolean(),
1327
+ cart: PosCartApplicationModel.CartDetailResponse(),
1328
+ message: Joi.string().allow(""),
1329
+ partial: Joi.boolean(),
1330
+ success: Joi.boolean(),
1373
1331
  });
1374
1332
  }
1375
1333
 
1376
- /** @returns {DiscountRulesApp} */
1377
- static DiscountRulesApp() {
1334
+ /** @returns {UpdateProductCart} */
1335
+ static UpdateProductCart() {
1378
1336
  return Joi.object({
1379
- item_criteria: Joi.any(),
1380
- matched_buy_rules: Joi.array().items(Joi.string().allow("")),
1381
- offer: Joi.any(),
1382
- raw_offer: Joi.any(),
1337
+ meta: Joi.any(),
1338
+ _custom_json: Joi.any(),
1339
+ quantity: Joi.number(),
1340
+ item_size: Joi.string().allow(""),
1341
+ item_id: Joi.number(),
1342
+ item_index: Joi.number(),
1343
+ identifiers: PosCartApplicationModel.CartProductIdentifer().required(),
1344
+ parent_item_identifiers: Joi.any(),
1345
+ extra_meta: Joi.any(),
1346
+ article_id: Joi.string().allow(""),
1383
1347
  });
1384
1348
  }
1385
1349
 
1386
- /** @returns {DisplayBreakup} */
1387
- static DisplayBreakup() {
1350
+ /** @returns {UpdateCartRequest} */
1351
+ static UpdateCartRequest() {
1388
1352
  return Joi.object({
1389
- currency_code: Joi.string().allow(""),
1390
- currency_symbol: Joi.string().allow(""),
1391
- display: Joi.string().allow(""),
1392
- key: Joi.string().allow(""),
1393
- message: Joi.array().items(Joi.string().allow("")),
1394
- value: Joi.number(),
1353
+ operation: Joi.string().allow("").required(),
1354
+ items: Joi.array().items(PosCartApplicationModel.UpdateProductCart()),
1395
1355
  });
1396
1356
  }
1397
1357
 
1398
- /** @returns {Files} */
1399
- static Files() {
1358
+ /** @returns {UpdateCartDetailResponse} */
1359
+ static UpdateCartDetailResponse() {
1400
1360
  return Joi.object({
1401
- key: Joi.string().allow("").required(),
1402
- values: Joi.array().items(Joi.string().allow("")).required(),
1361
+ cart: PosCartApplicationModel.CartDetailResponse(),
1362
+ message: Joi.string().allow(""),
1363
+ success: Joi.boolean(),
1403
1364
  });
1404
1365
  }
1405
1366
 
1406
- /** @returns {FreeGiftItem} */
1407
- static FreeGiftItem() {
1367
+ /** @returns {CartItemCountResponse} */
1368
+ static CartItemCountResponse() {
1408
1369
  return Joi.object({
1409
- item_brand_name: Joi.string().allow(""),
1410
- item_id: Joi.number(),
1411
- item_images_url: Joi.array().items(Joi.string().allow("")),
1412
- item_name: Joi.string().allow(""),
1413
- item_price_details: Joi.any(),
1414
- item_slug: Joi.string().allow(""),
1370
+ user_cart_items_count: Joi.number(),
1415
1371
  });
1416
1372
  }
1417
1373
 
1418
- /** @returns {GeoLocation} */
1419
- static GeoLocation() {
1374
+ /** @returns {PageCoupon} */
1375
+ static PageCoupon() {
1420
1376
  return Joi.object({
1421
- latitude: Joi.number(),
1422
- longitude: Joi.number(),
1377
+ has_previous: Joi.boolean(),
1378
+ current: Joi.number(),
1379
+ total: Joi.number(),
1380
+ total_item_count: Joi.number(),
1381
+ has_next: Joi.boolean(),
1423
1382
  });
1424
1383
  }
1425
1384
 
1426
- /** @returns {GetAddressesResponse} */
1427
- static GetAddressesResponse() {
1385
+ /** @returns {Coupon} */
1386
+ static Coupon() {
1428
1387
  return Joi.object({
1429
- address: Joi.array().items(PosCartApplicationModel.Address()),
1430
- pii_masking: Joi.boolean(),
1388
+ max_discount_value: Joi.number(),
1389
+ coupon_code: Joi.string().allow(""),
1390
+ message: Joi.string().allow(""),
1391
+ is_applied: Joi.boolean(),
1392
+ coupon_type: Joi.string().allow("").allow(null),
1393
+ sub_title: Joi.string().allow(""),
1394
+ coupon_value: Joi.number(),
1395
+ is_applicable: Joi.boolean(),
1396
+ description: Joi.string().allow("").allow(null),
1397
+ minimum_cart_value: Joi.number(),
1398
+ title: Joi.string().allow(""),
1399
+ expires_on: Joi.string().allow(""),
1431
1400
  });
1432
1401
  }
1433
1402
 
1434
1403
  /** @returns {GetCouponResponse} */
1435
1404
  static GetCouponResponse() {
1436
1405
  return Joi.object({
1406
+ page: PosCartApplicationModel.PageCoupon(),
1437
1407
  available_coupon_list: Joi.array().items(
1438
1408
  PosCartApplicationModel.Coupon()
1439
1409
  ),
1440
- page: PosCartApplicationModel.PageCoupon(),
1441
- });
1442
- }
1443
-
1444
- /** @returns {GetShareCartLinkRequest} */
1445
- static GetShareCartLinkRequest() {
1446
- return Joi.object({
1447
- id: Joi.string().allow(""),
1448
- meta: Joi.any(),
1449
1410
  });
1450
1411
  }
1451
1412
 
1452
- /** @returns {GetShareCartLinkResponse} */
1453
- static GetShareCartLinkResponse() {
1413
+ /** @returns {ApplyCouponRequest} */
1414
+ static ApplyCouponRequest() {
1454
1415
  return Joi.object({
1455
- share_url: Joi.string().allow(""),
1456
- token: Joi.string().allow(""),
1416
+ coupon_code: Joi.string().allow("").required(),
1457
1417
  });
1458
1418
  }
1459
1419
 
1460
- /** @returns {GiftDetail} */
1461
- static GiftDetail() {
1420
+ /** @returns {OfferSeller} */
1421
+ static OfferSeller() {
1462
1422
  return Joi.object({
1463
- gift_message: Joi.string().allow(""),
1464
- is_gift_applied: Joi.boolean(),
1423
+ uid: Joi.number(),
1424
+ name: Joi.string().allow(""),
1465
1425
  });
1466
1426
  }
1467
1427
 
1468
- /** @returns {LoyaltyPoints} */
1469
- static LoyaltyPoints() {
1428
+ /** @returns {OfferPrice} */
1429
+ static OfferPrice() {
1470
1430
  return Joi.object({
1471
- applicable: Joi.number(),
1472
- description: Joi.string().allow(""),
1473
- is_applied: Joi.boolean(),
1474
- total: Joi.number(),
1431
+ effective: Joi.number(),
1432
+ currency_code: Joi.string().allow(""),
1433
+ currency_symbol: Joi.string().allow(""),
1434
+ marked: Joi.number(),
1435
+ bulk_effective: Joi.number(),
1475
1436
  });
1476
1437
  }
1477
1438
 
1478
1439
  /** @returns {OfferItem} */
1479
1440
  static OfferItem() {
1480
1441
  return Joi.object({
1481
- auto_applied: Joi.boolean(),
1482
- best: Joi.boolean(),
1483
1442
  margin: Joi.number(),
1484
- price: PosCartApplicationModel.OfferPrice(),
1485
1443
  quantity: Joi.number(),
1486
1444
  total: Joi.number(),
1445
+ best: Joi.boolean(),
1487
1446
  type: Joi.string().allow(""),
1447
+ price: PosCartApplicationModel.OfferPrice(),
1448
+ auto_applied: Joi.boolean(),
1488
1449
  });
1489
1450
  }
1490
1451
 
1491
- /** @returns {OfferPrice} */
1492
- static OfferPrice() {
1452
+ /** @returns {BulkPriceOffer} */
1453
+ static BulkPriceOffer() {
1493
1454
  return Joi.object({
1494
- bulk_effective: Joi.number(),
1495
- currency_code: Joi.string().allow(""),
1496
- currency_symbol: Joi.string().allow(""),
1497
- effective: Joi.number(),
1498
- marked: Joi.number(),
1455
+ seller: PosCartApplicationModel.OfferSeller(),
1456
+ offers: Joi.array().items(PosCartApplicationModel.OfferItem()),
1499
1457
  });
1500
1458
  }
1501
1459
 
1502
- /** @returns {OfferSeller} */
1503
- static OfferSeller() {
1460
+ /** @returns {BulkPriceResponse} */
1461
+ static BulkPriceResponse() {
1504
1462
  return Joi.object({
1505
- name: Joi.string().allow(""),
1506
- uid: Joi.number(),
1463
+ data: Joi.array().items(PosCartApplicationModel.BulkPriceOffer()),
1507
1464
  });
1508
1465
  }
1509
1466
 
1510
- /** @returns {Ownership} */
1511
- static Ownership() {
1467
+ /** @returns {RewardPointRequest} */
1468
+ static RewardPointRequest() {
1512
1469
  return Joi.object({
1513
- payable_by: Joi.string().allow(""),
1514
- payable_category: Joi.string().allow(""),
1470
+ points: Joi.boolean().required(),
1471
+ });
1472
+ }
1473
+
1474
+ /** @returns {GeoLocation} */
1475
+ static GeoLocation() {
1476
+ return Joi.object({
1477
+ latitude: Joi.number(),
1478
+ longitude: Joi.number(),
1479
+ });
1480
+ }
1481
+
1482
+ /** @returns {Address} */
1483
+ static Address() {
1484
+ return Joi.object({
1485
+ meta: Joi.any(),
1486
+ country_code: Joi.string().allow(""),
1487
+ country_iso_code: Joi.string().allow(""),
1488
+ country: Joi.string().allow(""),
1489
+ id: Joi.string().allow(""),
1490
+ checkout_mode: Joi.string().allow(""),
1491
+ created_by_user_id: Joi.string().allow(""),
1492
+ area: Joi.string().allow(""),
1493
+ is_active: Joi.boolean(),
1494
+ city: Joi.string().allow(""),
1495
+ sector: Joi.string().allow(""),
1496
+ state_code: Joi.string().allow(""),
1497
+ address_type: Joi.string().allow(""),
1498
+ state: Joi.string().allow(""),
1499
+ is_default_address: Joi.boolean(),
1500
+ _custom_json: Joi.any(),
1501
+ country_phone_code: Joi.string().allow(""),
1502
+ area_code_slug: Joi.string().allow(""),
1503
+ area_code: Joi.string().allow(""),
1504
+ email: Joi.string().allow(""),
1505
+ google_map_point: Joi.any(),
1506
+ geo_location: PosCartApplicationModel.GeoLocation(),
1507
+ address: Joi.string().allow(""),
1508
+ tags: Joi.array().items(Joi.string().allow("")),
1509
+ name: Joi.string().allow(""),
1510
+ landmark: Joi.string().allow(""),
1511
+ user_id: Joi.string().allow(""),
1512
+ phone: Joi.string().allow(""),
1515
1513
  });
1516
1514
  }
1517
1515
 
1518
- /** @returns {PageCoupon} */
1519
- static PageCoupon() {
1516
+ /** @returns {GetAddressesResponse} */
1517
+ static GetAddressesResponse() {
1520
1518
  return Joi.object({
1521
- current: Joi.number(),
1522
- has_next: Joi.boolean(),
1523
- has_previous: Joi.boolean(),
1524
- total: Joi.number(),
1525
- total_item_count: Joi.number(),
1519
+ pii_masking: Joi.boolean(),
1520
+ address: Joi.array().items(PosCartApplicationModel.Address()),
1526
1521
  });
1527
1522
  }
1528
1523
 
1529
- /** @returns {PaymentCouponValidate} */
1530
- static PaymentCouponValidate() {
1524
+ /** @returns {SaveAddressResponse} */
1525
+ static SaveAddressResponse() {
1531
1526
  return Joi.object({
1532
- coupon_validity: PosCartApplicationModel.CouponValidity(),
1533
- message: Joi.string().allow(""),
1534
- success: Joi.boolean().required(),
1527
+ is_default_address: Joi.boolean(),
1528
+ success: Joi.boolean(),
1529
+ id: Joi.string().allow(""),
1535
1530
  });
1536
1531
  }
1537
1532
 
1538
- /** @returns {PaymentSelectionLock} */
1539
- static PaymentSelectionLock() {
1533
+ /** @returns {UpdateAddressResponse} */
1534
+ static UpdateAddressResponse() {
1540
1535
  return Joi.object({
1541
- default_options: Joi.string().allow(""),
1542
- enabled: Joi.boolean(),
1543
- payment_identifier: Joi.string().allow(""),
1536
+ is_updated: Joi.boolean(),
1537
+ is_default_address: Joi.boolean(),
1538
+ success: Joi.boolean(),
1539
+ id: Joi.string().allow(""),
1544
1540
  });
1545
1541
  }
1546
1542
 
1547
- /** @returns {PickupStoreDetail} */
1548
- static PickupStoreDetail() {
1543
+ /** @returns {DeleteAddressResponse} */
1544
+ static DeleteAddressResponse() {
1549
1545
  return Joi.object({
1550
- address: Joi.string().allow(""),
1551
- address_type: Joi.string().allow(""),
1552
- area: Joi.string().allow(""),
1553
- area_code: Joi.string().allow(""),
1554
- area_code_slug: Joi.string().allow(""),
1555
- city: Joi.string().allow(""),
1556
- country: Joi.string().allow(""),
1557
- email: Joi.string().allow(""),
1558
- id: Joi.number(),
1559
- landmark: Joi.string().allow(""),
1560
- name: Joi.string().allow(""),
1561
- phone: Joi.string().allow(""),
1562
- pincode: Joi.number(),
1563
- state: Joi.string().allow(""),
1564
- store_code: Joi.string().allow(""),
1565
- uid: Joi.number(),
1546
+ is_deleted: Joi.boolean(),
1547
+ id: Joi.string().allow(""),
1566
1548
  });
1567
1549
  }
1568
1550
 
1569
- /** @returns {ProductAction} */
1570
- static ProductAction() {
1551
+ /** @returns {SelectCartAddressRequest} */
1552
+ static SelectCartAddressRequest() {
1571
1553
  return Joi.object({
1572
- query: PosCartApplicationModel.ActionQuery(),
1573
- type: Joi.string().allow(""),
1574
- url: Joi.string().allow(""),
1554
+ billing_address_id: Joi.string().allow(""),
1555
+ cart_id: Joi.string().allow(""),
1556
+ id: Joi.string().allow(""),
1575
1557
  });
1576
1558
  }
1577
1559
 
1578
- /** @returns {ProductArticle} */
1579
- static ProductArticle() {
1560
+ /** @returns {UpdateCartPaymentRequest} */
1561
+ static UpdateCartPaymentRequest() {
1580
1562
  return Joi.object({
1581
- _custom_json: Joi.any(),
1582
- cart_item_meta: Joi.any(),
1583
- extra_meta: Joi.any(),
1584
- gift_card: Joi.any(),
1585
- identifier: Joi.any(),
1586
- is_gift_visible: Joi.boolean(),
1587
- meta: Joi.any(),
1588
- mto_quantity: Joi.number(),
1589
- parent_item_identifiers: Joi.any(),
1590
- price: PosCartApplicationModel.ArticlePriceInfo(),
1591
- product_group_tags: Joi.array().items(Joi.string().allow("")),
1592
- quantity: Joi.number(),
1593
- seller: PosCartApplicationModel.BaseInfo(),
1594
- seller_identifier: Joi.string().allow(""),
1595
- size: Joi.string().allow(""),
1596
- store: PosCartApplicationModel.StoreInfo(),
1597
- tags: Joi.array().items(Joi.string().allow("")),
1598
- type: Joi.string().allow(""),
1599
- uid: Joi.string().allow(""),
1563
+ payment_identifier: Joi.string().allow("").allow(null),
1564
+ aggregator_name: Joi.string().allow(""),
1565
+ address_id: Joi.string().allow(""),
1566
+ merchant_code: Joi.string().allow(""),
1567
+ payment_mode: Joi.string().allow(""),
1568
+ id: Joi.string().allow(""),
1600
1569
  });
1601
1570
  }
1602
1571
 
1603
- /** @returns {ProductAvailability} */
1604
- static ProductAvailability() {
1572
+ /** @returns {CouponValidity} */
1573
+ static CouponValidity() {
1605
1574
  return Joi.object({
1606
- available_sizes: Joi.array().items(
1607
- PosCartApplicationModel.ProductAvailabilitySize()
1608
- ),
1609
- deliverable: Joi.boolean(),
1610
- is_valid: Joi.boolean(),
1611
- other_store_quantity: Joi.number(),
1612
- out_of_stock: Joi.boolean(),
1613
- sizes: Joi.array().items(Joi.string().allow("")),
1575
+ discount: Joi.number(),
1576
+ valid: Joi.boolean(),
1577
+ next_validation_required: Joi.boolean().allow(null),
1578
+ display_message_en: Joi.string().allow("").allow(null),
1579
+ code: Joi.string().allow("").allow(null),
1580
+ title: Joi.string().allow(""),
1614
1581
  });
1615
1582
  }
1616
1583
 
1617
- /** @returns {ProductAvailabilitySize} */
1618
- static ProductAvailabilitySize() {
1584
+ /** @returns {PaymentCouponValidate} */
1585
+ static PaymentCouponValidate() {
1619
1586
  return Joi.object({
1620
- display: Joi.string().allow(""),
1621
- is_available: Joi.boolean(),
1622
- value: Joi.string().allow(""),
1587
+ message: Joi.string().allow(""),
1588
+ success: Joi.boolean().required(),
1589
+ coupon_validity: PosCartApplicationModel.CouponValidity(),
1623
1590
  });
1624
1591
  }
1625
1592
 
1626
- /** @returns {ProductImage} */
1627
- static ProductImage() {
1593
+ /** @returns {ShipmentResponse} */
1594
+ static ShipmentResponse() {
1628
1595
  return Joi.object({
1629
- aspect_ratio: Joi.string().allow(""),
1630
- secure_url: Joi.string().allow(""),
1631
- url: Joi.string().allow(""),
1596
+ shipments: Joi.number(),
1597
+ fulfillment_type: Joi.string().allow(""),
1598
+ promise: PosCartApplicationModel.ShipmentPromise(),
1599
+ dp_id: Joi.string().allow("").allow(null),
1600
+ box_type: Joi.string().allow("").allow(null),
1601
+ dp_options: Joi.any().allow(null),
1602
+ items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
1603
+ order_type: Joi.string().allow(""),
1604
+ shipment_type: Joi.string().allow(""),
1605
+ fulfillment_id: Joi.number(),
1632
1606
  });
1633
1607
  }
1634
1608
 
1635
- /** @returns {ProductPrice} */
1636
- static ProductPrice() {
1609
+ /** @returns {CartShipmentsResponse} */
1610
+ static CartShipmentsResponse() {
1637
1611
  return Joi.object({
1638
- add_on: Joi.number(),
1639
- currency_code: Joi.string().allow(""),
1640
- currency_symbol: Joi.string().allow(""),
1641
- effective: Joi.number(),
1642
- marked: Joi.number(),
1643
- selling: Joi.number(),
1612
+ comment: Joi.string().allow(""),
1613
+ restrict_checkout: Joi.boolean(),
1614
+ message: Joi.string().allow(""),
1615
+ buy_now: Joi.boolean(),
1616
+ coupon_text: Joi.string().allow(""),
1617
+ last_modified: Joi.string().allow(""),
1618
+ cart_id: Joi.number(),
1619
+ breakup_values: PosCartApplicationModel.CartBreakup(),
1620
+ is_valid: Joi.boolean(),
1621
+ delivery_charge_info: Joi.string().allow(""),
1622
+ id: Joi.string().allow(""),
1623
+ payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
1624
+ gstin: Joi.string().allow(""),
1625
+ shipments: Joi.array().items(PosCartApplicationModel.ShipmentResponse()),
1626
+ error: Joi.boolean(),
1627
+ delivery_promise: PosCartApplicationModel.ShipmentPromise(),
1628
+ uid: Joi.string().allow(""),
1629
+ checkout_mode: Joi.string().allow(""),
1630
+ currency: PosCartApplicationModel.CartCurrency(),
1644
1631
  });
1645
1632
  }
1646
1633
 
1647
- /** @returns {ProductPriceInfo} */
1648
- static ProductPriceInfo() {
1634
+ /** @returns {UpdateCartShipmentItem} */
1635
+ static UpdateCartShipmentItem() {
1649
1636
  return Joi.object({
1650
- base: PosCartApplicationModel.ProductPrice(),
1651
- converted: PosCartApplicationModel.ProductPrice(),
1637
+ quantity: Joi.number(),
1638
+ shipment_type: Joi.string().allow("").required(),
1639
+ article_uid: Joi.string().allow("").required(),
1652
1640
  });
1653
1641
  }
1654
1642
 
1655
- /** @returns {PromiseFormatted} */
1656
- static PromiseFormatted() {
1643
+ /** @returns {UpdateCartShipmentRequest} */
1644
+ static UpdateCartShipmentRequest() {
1657
1645
  return Joi.object({
1658
- max: Joi.string().allow(""),
1659
- min: Joi.string().allow(""),
1646
+ shipments: Joi.array()
1647
+ .items(PosCartApplicationModel.UpdateCartShipmentItem())
1648
+ .required(),
1660
1649
  });
1661
1650
  }
1662
1651
 
1663
- /** @returns {PromiseISOFormat} */
1664
- static PromiseISOFormat() {
1652
+ /** @returns {StaffCheckout} */
1653
+ static StaffCheckout() {
1665
1654
  return Joi.object({
1666
- max: Joi.string().allow(""),
1667
- min: Joi.string().allow(""),
1655
+ first_name: Joi.string().allow("").required(),
1656
+ user: Joi.string().allow("").required(),
1657
+ employee_code: Joi.string().allow(""),
1658
+ _id: Joi.string().allow("").required(),
1659
+ last_name: Joi.string().allow("").required(),
1668
1660
  });
1669
1661
  }
1670
1662
 
1671
- /** @returns {PromiseTimestamp} */
1672
- static PromiseTimestamp() {
1663
+ /** @returns {CustomerDetails} */
1664
+ static CustomerDetails() {
1673
1665
  return Joi.object({
1674
- max: Joi.number(),
1675
- min: Joi.number(),
1666
+ mobile: Joi.string().allow("").required(),
1667
+ name: Joi.string().allow(""),
1668
+ email: Joi.string().allow("").allow(null),
1676
1669
  });
1677
1670
  }
1678
1671
 
1679
- /** @returns {PromoMeta} */
1680
- static PromoMeta() {
1672
+ /** @returns {CartCheckoutCustomMeta} */
1673
+ static CartCheckoutCustomMeta() {
1681
1674
  return Joi.object({
1682
- message: Joi.string().allow(""),
1675
+ value: Joi.string().allow("").required(),
1676
+ key: Joi.string().allow("").required(),
1683
1677
  });
1684
1678
  }
1685
1679
 
1686
- /** @returns {RawBreakup} */
1687
- static RawBreakup() {
1680
+ /** @returns {Files} */
1681
+ static Files() {
1688
1682
  return Joi.object({
1689
- cod_charge: Joi.number(),
1690
- convenience_fee: Joi.number(),
1691
- coupon: Joi.number(),
1692
- delivery_charge: Joi.number(),
1693
- discount: Joi.number(),
1694
- fynd_cash: Joi.number(),
1695
- gift_card: Joi.number(),
1696
- gst_charges: Joi.number(),
1697
- mrp_total: Joi.number(),
1698
- subtotal: Joi.number(),
1699
- total: Joi.number(),
1700
- vog: Joi.number(),
1701
- you_saved: Joi.number(),
1683
+ values: Joi.array().items(Joi.string().allow("")).required(),
1684
+ key: Joi.string().allow("").required(),
1702
1685
  });
1703
1686
  }
1704
1687
 
1705
- /** @returns {RewardPointRequest} */
1706
- static RewardPointRequest() {
1688
+ /** @returns {CartPosCheckoutDetailRequest} */
1689
+ static CartPosCheckoutDetailRequest() {
1707
1690
  return Joi.object({
1708
- points: Joi.boolean().required(),
1691
+ meta: Joi.any(),
1692
+ pick_at_store_uid: Joi.number().allow(null),
1693
+ billing_address: Joi.any(),
1694
+ payment_auto_confirm: Joi.boolean(),
1695
+ callback_url: Joi.string().allow("").allow(null),
1696
+ delivery_address: Joi.any(),
1697
+ merchant_code: Joi.string().allow(""),
1698
+ order_type: Joi.string().allow("").required(),
1699
+ id: Joi.string().allow("").allow(null),
1700
+ staff: PosCartApplicationModel.StaffCheckout(),
1701
+ customer_details: Joi.any().allow(null),
1702
+ address_id: Joi.string().allow(""),
1703
+ aggregator: Joi.string().allow(""),
1704
+ payment_params: Joi.any().allow(null),
1705
+ billing_address_id: Joi.string().allow(""),
1706
+ payment_mode: Joi.string().allow("").required(),
1707
+ pos: Joi.boolean(),
1708
+ extra_meta: Joi.any(),
1709
+ custom_meta: Joi.array().items(
1710
+ PosCartApplicationModel.CartCheckoutCustomMeta()
1711
+ ),
1712
+ payment_identifier: Joi.string().allow("").allow(null),
1713
+ ordering_store: Joi.number().allow(null),
1714
+ files: Joi.array().items(PosCartApplicationModel.Files()),
1709
1715
  });
1710
1716
  }
1711
1717
 
1712
- /** @returns {SaveAddressResponse} */
1713
- static SaveAddressResponse() {
1718
+ /** @returns {CheckCart} */
1719
+ static CheckCart() {
1714
1720
  return Joi.object({
1715
- id: Joi.string().allow(""),
1716
- is_default_address: Joi.boolean(),
1721
+ comment: Joi.string().allow(""),
1722
+ delivery_charges: Joi.number(),
1723
+ coupon_text: Joi.string().allow(""),
1724
+ last_modified: Joi.string().allow(""),
1725
+ is_valid: Joi.boolean(),
1726
+ cod_message: Joi.string().allow(""),
1717
1727
  success: Joi.boolean(),
1718
- });
1719
- }
1720
-
1721
- /** @returns {SelectCartAddressRequest} */
1722
- static SelectCartAddressRequest() {
1723
- return Joi.object({
1724
- billing_address_id: Joi.string().allow(""),
1725
- cart_id: Joi.string().allow(""),
1726
1728
  id: Joi.string().allow(""),
1727
- });
1728
- }
1729
-
1730
- /** @returns {SharedCart} */
1731
- static SharedCart() {
1732
- return Joi.object({
1733
- breakup_values: PosCartApplicationModel.CartBreakup(),
1729
+ uid: Joi.string().allow(""),
1730
+ checkout_mode: Joi.string().allow(""),
1731
+ error_message: Joi.string().allow(""),
1732
+ store_emps: Joi.array().items(Joi.any()),
1733
+ store_code: Joi.string().allow(""),
1734
+ restrict_checkout: Joi.boolean(),
1735
+ message: Joi.string().allow(""),
1734
1736
  buy_now: Joi.boolean(),
1737
+ cod_available: Joi.boolean(),
1735
1738
  cart_id: Joi.number(),
1736
- checkout_mode: Joi.string().allow(""),
1737
- comment: Joi.string().allow(""),
1738
- coupon_text: Joi.string().allow(""),
1739
- currency: PosCartApplicationModel.CartCurrency(),
1739
+ breakup_values: PosCartApplicationModel.CartBreakup(),
1740
+ order_id: Joi.string().allow(""),
1741
+ cod_charges: Joi.number(),
1740
1742
  delivery_charge_info: Joi.string().allow(""),
1741
- delivery_promise: PosCartApplicationModel.ShipmentPromise(),
1743
+ user_type: Joi.string().allow(""),
1744
+ payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
1742
1745
  gstin: Joi.string().allow(""),
1743
- id: Joi.string().allow(""),
1744
- is_valid: Joi.boolean(),
1746
+ delivery_promise: PosCartApplicationModel.ShipmentPromise(),
1745
1747
  items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
1746
- last_modified: Joi.string().allow(""),
1747
- message: Joi.string().allow(""),
1748
- payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
1749
- restrict_checkout: Joi.boolean(),
1750
- shared_cart_details: PosCartApplicationModel.SharedCartDetails(),
1751
- uid: Joi.string().allow(""),
1752
- });
1753
- }
1754
-
1755
- /** @returns {SharedCartDetails} */
1756
- static SharedCartDetails() {
1757
- return Joi.object({
1758
- created_on: Joi.string().allow(""),
1759
- meta: Joi.any(),
1760
- source: Joi.any(),
1761
- token: Joi.string().allow(""),
1762
- user: Joi.any(),
1748
+ currency: PosCartApplicationModel.CartCurrency(),
1749
+ delivery_charge_order_value: Joi.number(),
1763
1750
  });
1764
1751
  }
1765
1752
 
1766
- /** @returns {SharedCartResponse} */
1767
- static SharedCartResponse() {
1753
+ /** @returns {CartCheckoutResponse} */
1754
+ static CartCheckoutResponse() {
1768
1755
  return Joi.object({
1769
- cart: PosCartApplicationModel.SharedCart(),
1770
- error: Joi.string().allow(""),
1756
+ cart: PosCartApplicationModel.CheckCart(),
1757
+ app_intercept_url: Joi.string().allow(""),
1758
+ callback_url: Joi.string().allow(""),
1759
+ message: Joi.string().allow(""),
1760
+ data: Joi.any(),
1761
+ order_id: Joi.string().allow(""),
1762
+ success: Joi.boolean(),
1763
+ payment_confirm_url: Joi.string().allow(""),
1771
1764
  });
1772
1765
  }
1773
1766
 
1774
- /** @returns {ShipmentPromise} */
1775
- static ShipmentPromise() {
1767
+ /** @returns {GiftDetail} */
1768
+ static GiftDetail() {
1776
1769
  return Joi.object({
1777
- formatted: PosCartApplicationModel.PromiseFormatted(),
1778
- iso: PosCartApplicationModel.PromiseISOFormat(),
1779
- timestamp: PosCartApplicationModel.PromiseTimestamp(),
1770
+ gift_message: Joi.string().allow(""),
1771
+ is_gift_applied: Joi.boolean(),
1780
1772
  });
1781
1773
  }
1782
1774
 
1783
- /** @returns {ShipmentResponse} */
1784
- static ShipmentResponse() {
1775
+ /** @returns {ArticleGiftDetail} */
1776
+ static ArticleGiftDetail() {
1785
1777
  return Joi.object({
1786
- box_type: Joi.string().allow("").allow(null),
1787
- dp_id: Joi.string().allow("").allow(null),
1788
- dp_options: Joi.any().allow(null),
1789
- fulfillment_id: Joi.number(),
1790
- fulfillment_type: Joi.string().allow(""),
1791
- items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
1792
- order_type: Joi.string().allow(""),
1793
- promise: PosCartApplicationModel.ShipmentPromise(),
1794
- shipment_type: Joi.string().allow(""),
1795
- shipments: Joi.number(),
1778
+ article_id: PosCartApplicationModel.GiftDetail(),
1796
1779
  });
1797
1780
  }
1798
1781
 
1799
- /** @returns {StaffCheckout} */
1800
- static StaffCheckout() {
1782
+ /** @returns {CartMetaRequest} */
1783
+ static CartMetaRequest() {
1801
1784
  return Joi.object({
1802
- _id: Joi.string().allow("").required(),
1803
- employee_code: Joi.string().allow(""),
1804
- first_name: Joi.string().allow("").required(),
1805
- last_name: Joi.string().allow("").required(),
1806
- user: Joi.string().allow("").required(),
1785
+ comment: Joi.string().allow(""),
1786
+ gstin: Joi.string().allow(""),
1787
+ pick_up_customer_details: Joi.any(),
1788
+ checkout_mode: Joi.string().allow(""),
1789
+ gift_details: PosCartApplicationModel.ArticleGiftDetail(),
1790
+ delivery_slots: Joi.any(),
1807
1791
  });
1808
1792
  }
1809
1793
 
1810
- /** @returns {StoreDetailsResponse} */
1811
- static StoreDetailsResponse() {
1794
+ /** @returns {CartMetaResponse} */
1795
+ static CartMetaResponse() {
1812
1796
  return Joi.object({
1813
- items: Joi.array().items(PosCartApplicationModel.PickupStoreDetail()),
1797
+ message: Joi.string().allow(""),
1798
+ is_valid: Joi.boolean(),
1814
1799
  });
1815
1800
  }
1816
1801
 
1817
- /** @returns {StoreInfo} */
1818
- static StoreInfo() {
1802
+ /** @returns {CartMetaMissingResponse} */
1803
+ static CartMetaMissingResponse() {
1819
1804
  return Joi.object({
1820
- name: Joi.string().allow(""),
1821
- store_code: Joi.string().allow(""),
1822
- uid: Joi.number(),
1805
+ errors: Joi.array().items(Joi.string().allow("")),
1823
1806
  });
1824
1807
  }
1825
1808
 
1826
- /** @returns {Tags} */
1827
- static Tags() {
1809
+ /** @returns {CartDeliveryModesResponse} */
1810
+ static CartDeliveryModesResponse() {
1828
1811
  return Joi.object({
1829
- tags: Joi.any(),
1812
+ available_modes: Joi.array().items(Joi.string().allow("")),
1813
+ pickup_stores: Joi.array().items(Joi.number()),
1830
1814
  });
1831
1815
  }
1832
1816
 
1833
- /** @returns {UpdateAddressResponse} */
1834
- static UpdateAddressResponse() {
1817
+ /** @returns {PickupStoreDetail} */
1818
+ static PickupStoreDetail() {
1835
1819
  return Joi.object({
1836
- id: Joi.string().allow(""),
1837
- is_default_address: Joi.boolean(),
1838
- is_updated: Joi.boolean(),
1839
- success: Joi.boolean(),
1820
+ city: Joi.string().allow(""),
1821
+ address_type: Joi.string().allow(""),
1822
+ address: Joi.string().allow(""),
1823
+ state: Joi.string().allow(""),
1824
+ store_code: Joi.string().allow(""),
1825
+ uid: Joi.number(),
1826
+ pincode: Joi.number(),
1827
+ area_code_slug: Joi.string().allow(""),
1828
+ area_code: Joi.string().allow(""),
1829
+ email: Joi.string().allow(""),
1830
+ name: Joi.string().allow(""),
1831
+ landmark: Joi.string().allow(""),
1832
+ area: Joi.string().allow(""),
1833
+ country: Joi.string().allow(""),
1834
+ phone: Joi.string().allow(""),
1835
+ id: Joi.number(),
1840
1836
  });
1841
1837
  }
1842
1838
 
1843
- /** @returns {UpdateCartDetailResponse} */
1844
- static UpdateCartDetailResponse() {
1839
+ /** @returns {StoreDetailsResponse} */
1840
+ static StoreDetailsResponse() {
1845
1841
  return Joi.object({
1846
- cart: PosCartApplicationModel.CartDetailResponse(),
1847
- message: Joi.string().allow(""),
1848
- success: Joi.boolean(),
1842
+ items: Joi.array().items(PosCartApplicationModel.PickupStoreDetail()),
1849
1843
  });
1850
1844
  }
1851
1845
 
1852
- /** @returns {UpdateCartPaymentRequest} */
1853
- static UpdateCartPaymentRequest() {
1846
+ /** @returns {GetShareCartLinkRequest} */
1847
+ static GetShareCartLinkRequest() {
1854
1848
  return Joi.object({
1855
- address_id: Joi.string().allow(""),
1856
- aggregator_name: Joi.string().allow(""),
1849
+ meta: Joi.any(),
1857
1850
  id: Joi.string().allow(""),
1858
- merchant_code: Joi.string().allow(""),
1859
- payment_identifier: Joi.string().allow("").allow(null),
1860
- payment_mode: Joi.string().allow(""),
1861
1851
  });
1862
1852
  }
1863
1853
 
1864
- /** @returns {UpdateCartRequest} */
1865
- static UpdateCartRequest() {
1854
+ /** @returns {GetShareCartLinkResponse} */
1855
+ static GetShareCartLinkResponse() {
1866
1856
  return Joi.object({
1867
- items: Joi.array().items(PosCartApplicationModel.UpdateProductCart()),
1868
- operation: Joi.string().allow("").required(),
1857
+ share_url: Joi.string().allow(""),
1858
+ token: Joi.string().allow(""),
1869
1859
  });
1870
1860
  }
1871
1861
 
1872
- /** @returns {UpdateCartShipmentItem} */
1873
- static UpdateCartShipmentItem() {
1862
+ /** @returns {SharedCartDetails} */
1863
+ static SharedCartDetails() {
1874
1864
  return Joi.object({
1875
- article_uid: Joi.string().allow("").required(),
1876
- quantity: Joi.number(),
1877
- shipment_type: Joi.string().allow("").required(),
1865
+ meta: Joi.any(),
1866
+ user: Joi.any(),
1867
+ created_on: Joi.string().allow(""),
1868
+ token: Joi.string().allow(""),
1869
+ source: Joi.any(),
1878
1870
  });
1879
1871
  }
1880
1872
 
1881
- /** @returns {UpdateCartShipmentRequest} */
1882
- static UpdateCartShipmentRequest() {
1873
+ /** @returns {SharedCart} */
1874
+ static SharedCart() {
1883
1875
  return Joi.object({
1884
- shipments: Joi.array()
1885
- .items(PosCartApplicationModel.UpdateCartShipmentItem())
1886
- .required(),
1876
+ comment: Joi.string().allow(""),
1877
+ coupon_text: Joi.string().allow(""),
1878
+ last_modified: Joi.string().allow(""),
1879
+ shared_cart_details: PosCartApplicationModel.SharedCartDetails(),
1880
+ is_valid: Joi.boolean(),
1881
+ id: Joi.string().allow(""),
1882
+ uid: Joi.string().allow(""),
1883
+ checkout_mode: Joi.string().allow(""),
1884
+ restrict_checkout: Joi.boolean(),
1885
+ message: Joi.string().allow(""),
1886
+ buy_now: Joi.boolean(),
1887
+ cart_id: Joi.number(),
1888
+ breakup_values: PosCartApplicationModel.CartBreakup(),
1889
+ delivery_charge_info: Joi.string().allow(""),
1890
+ payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
1891
+ gstin: Joi.string().allow(""),
1892
+ delivery_promise: PosCartApplicationModel.ShipmentPromise(),
1893
+ items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
1894
+ currency: PosCartApplicationModel.CartCurrency(),
1887
1895
  });
1888
1896
  }
1889
1897
 
1890
- /** @returns {UpdateProductCart} */
1891
- static UpdateProductCart() {
1898
+ /** @returns {SharedCartResponse} */
1899
+ static SharedCartResponse() {
1892
1900
  return Joi.object({
1893
- _custom_json: Joi.any(),
1894
- article_id: Joi.string().allow(""),
1895
- extra_meta: Joi.any(),
1896
- identifiers: PosCartApplicationModel.CartProductIdentifer().required(),
1897
- item_id: Joi.number(),
1898
- item_index: Joi.number(),
1899
- item_size: Joi.string().allow(""),
1900
- meta: Joi.any(),
1901
- parent_item_identifiers: Joi.any(),
1902
- quantity: Joi.number(),
1901
+ error: Joi.string().allow(""),
1902
+ cart: PosCartApplicationModel.SharedCart(),
1903
1903
  });
1904
1904
  }
1905
1905
  }