@gofynd/fdk-client-javascript 1.4.2-beta.1 → 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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
- package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
- package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
- package/sdk/application/Content/ContentApplicationModel.js +757 -757
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
- package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
- package/sdk/application/Order/OrderApplicationModel.d.ts +846 -846
- package/sdk/application/Order/OrderApplicationModel.js +822 -822
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +2155 -2150
- package/sdk/application/Payment/PaymentApplicationModel.js +1460 -1458
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
- package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
- package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
- package/sdk/application/User/UserApplicationModel.d.ts +762 -762
- package/sdk/application/User/UserApplicationModel.js +738 -738
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
- package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
- package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
- package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
- package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
- package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -1013
- package/sdk/platform/Catalog/CatalogPlatformModel.js +923 -923
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1833 -1833
- package/sdk/platform/Content/ContentPlatformModel.js +1837 -1837
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
- package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +865 -865
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +877 -877
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
- package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
- package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5180 -5176
- package/sdk/platform/Order/OrderPlatformModel.js +4740 -4736
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2670 -2660
- package/sdk/platform/Payment/PaymentPlatformModel.js +1831 -1827
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1505 -1507
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1532 -1536
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
- package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
- package/sdk/platform/User/UserPlatformModel.d.ts +758 -758
- package/sdk/platform/User/UserPlatformModel.js +643 -643
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
- package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
- package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
- package/sdk/public/Billing/BillingPublicModel.js +51 -51
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
- package/sdk/public/Content/ContentPublicModel.js +28 -28
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
- package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
|
@@ -1,1905 +1,1905 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {
|
|
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
|
|
26
|
-
* @property {
|
|
27
|
-
* @property {Object} [
|
|
28
|
-
* @property {
|
|
29
|
-
* @property {
|
|
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
|
|
44
|
-
* @property {
|
|
45
|
-
* @property {
|
|
46
|
-
* @property {string} [
|
|
47
|
-
* @property {string} [
|
|
48
|
-
* @property {
|
|
49
|
-
* @property {string} [
|
|
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
|
-
|
|
79
|
-
|
|
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 {
|
|
85
|
-
* @property {
|
|
86
|
-
*
|
|
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 {
|
|
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
|
|
109
|
-
* @property {
|
|
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
|
|
120
|
-
* @property {
|
|
121
|
-
* @property {number} [
|
|
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
|
|
87
|
+
* @typedef DisplayBreakup
|
|
126
88
|
* @property {string} [currency_code]
|
|
127
89
|
* @property {string} [currency_symbol]
|
|
128
|
-
* @property {
|
|
129
|
-
* @property {
|
|
90
|
+
* @property {string} [display]
|
|
91
|
+
* @property {string[]} [message]
|
|
92
|
+
* @property {string} [key]
|
|
93
|
+
* @property {number} [value]
|
|
130
94
|
*/
|
|
131
95
|
|
|
132
96
|
/**
|
|
133
|
-
* @typedef
|
|
134
|
-
* @property {
|
|
135
|
-
* @property {
|
|
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
|
|
140
|
-
* @property {
|
|
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
|
|
145
|
-
* @property {
|
|
146
|
-
* @property {
|
|
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
|
|
151
|
-
* @property {
|
|
152
|
-
* @property {
|
|
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
|
|
159
|
-
* @property {string}
|
|
160
|
-
* @property {string}
|
|
135
|
+
* @typedef PromiseFormatted
|
|
136
|
+
* @property {string} [max]
|
|
137
|
+
* @property {string} [min]
|
|
161
138
|
*/
|
|
162
139
|
|
|
163
140
|
/**
|
|
164
|
-
* @typedef
|
|
165
|
-
* @property {string} [
|
|
166
|
-
* @property {string} [
|
|
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
|
|
177
|
-
* @property {
|
|
178
|
-
* @property {
|
|
147
|
+
* @typedef ShipmentPromise
|
|
148
|
+
* @property {PromiseTimestamp} [timestamp]
|
|
149
|
+
* @property {PromiseFormatted} [formatted]
|
|
150
|
+
* @property {PromiseISOFormat} [iso]
|
|
179
151
|
*/
|
|
180
152
|
|
|
181
153
|
/**
|
|
182
|
-
* @typedef
|
|
183
|
-
* @property {
|
|
184
|
-
* @property {
|
|
154
|
+
* @typedef StoreInfo
|
|
155
|
+
* @property {number} [uid]
|
|
156
|
+
* @property {string} [store_code]
|
|
157
|
+
* @property {string} [name]
|
|
185
158
|
*/
|
|
186
159
|
|
|
187
160
|
/**
|
|
188
|
-
* @typedef
|
|
189
|
-
* @property {
|
|
190
|
-
* @property {
|
|
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
|
|
212
|
-
* @property {number} [
|
|
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
|
|
217
|
-
* @property {
|
|
175
|
+
* @typedef ArticlePriceInfo
|
|
176
|
+
* @property {BasePrice} [converted]
|
|
177
|
+
* @property {BasePrice} [base]
|
|
218
178
|
*/
|
|
219
179
|
|
|
220
180
|
/**
|
|
221
|
-
* @typedef
|
|
222
|
-
* @property {
|
|
223
|
-
* @property {
|
|
224
|
-
* @property {Object} [
|
|
225
|
-
* @property {
|
|
226
|
-
* @property {
|
|
227
|
-
* @property {
|
|
228
|
-
*
|
|
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
|
|
233
|
-
* @property {
|
|
234
|
-
* @property {string} [message]
|
|
204
|
+
* @typedef Tags
|
|
205
|
+
* @property {Object} [tags]
|
|
235
206
|
*/
|
|
236
207
|
|
|
237
208
|
/**
|
|
238
|
-
* @typedef
|
|
239
|
-
* @property {
|
|
240
|
-
* @property {string} [
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
* @
|
|
245
|
-
* @property {
|
|
246
|
-
* @property {
|
|
247
|
-
* @property {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
* @
|
|
252
|
-
* @property {string}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
* @
|
|
257
|
-
* @property {
|
|
258
|
-
* @property {
|
|
259
|
-
* @property {
|
|
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 {
|
|
275
|
-
* @property {
|
|
276
|
-
* @property {string} [type]
|
|
277
|
-
* @property {number} [uid]
|
|
246
|
+
* @property {ProductAction} [action]
|
|
247
|
+
* @property {BaseInfo} [brand]
|
|
278
248
|
*/
|
|
279
249
|
|
|
280
250
|
/**
|
|
281
|
-
* @typedef
|
|
282
|
-
* @property {
|
|
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
|
|
287
|
-
* @property {
|
|
288
|
-
* @property {
|
|
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
|
|
311
|
-
* @property {
|
|
312
|
-
* @property {
|
|
313
|
-
* @property {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
* @
|
|
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
|
|
334
|
-
* @property {
|
|
335
|
-
* @property {
|
|
279
|
+
* @typedef ProductAvailabilitySize
|
|
280
|
+
* @property {boolean} [is_available]
|
|
281
|
+
* @property {string} [value]
|
|
282
|
+
* @property {string} [display]
|
|
336
283
|
*/
|
|
337
284
|
|
|
338
285
|
/**
|
|
339
|
-
* @typedef
|
|
340
|
-
* @property {
|
|
341
|
-
* @property {
|
|
342
|
-
* @property {
|
|
343
|
-
* @property {
|
|
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 {
|
|
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
|
|
373
|
-
* @property {string} [
|
|
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
|
|
389
|
-
* @property {
|
|
390
|
-
* @property {
|
|
391
|
-
* @property {
|
|
392
|
-
* @property {
|
|
393
|
-
* @property {
|
|
394
|
-
* @property {
|
|
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 {
|
|
397
|
-
* @property {string} [
|
|
398
|
-
* @property {
|
|
399
|
-
* @property {
|
|
400
|
-
* @property {
|
|
401
|
-
* @property {
|
|
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
|
|
406
|
-
* @property {string} [
|
|
407
|
-
* @property {
|
|
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
|
|
413
|
-
* @property {string} [
|
|
414
|
-
* @property {
|
|
415
|
-
* @property {string} [
|
|
416
|
-
* @property {
|
|
417
|
-
* @property {
|
|
418
|
-
* @property {
|
|
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
|
|
423
|
-
* @property {
|
|
424
|
-
* @property {
|
|
425
|
-
* @property {
|
|
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
|
|
430
|
-
* @property {
|
|
431
|
-
* @property {boolean} [
|
|
372
|
+
* @typedef AddCartRequest
|
|
373
|
+
* @property {AddProductCart[]} [items]
|
|
374
|
+
* @property {boolean} [new_cart]
|
|
432
375
|
*/
|
|
433
376
|
|
|
434
377
|
/**
|
|
435
|
-
* @typedef
|
|
436
|
-
* @property {
|
|
437
|
-
* @property {string
|
|
438
|
-
* @property {
|
|
439
|
-
*
|
|
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
|
|
444
|
-
* @property {
|
|
445
|
-
* @property {
|
|
446
|
-
* @property {
|
|
447
|
-
* @property {string} [
|
|
448
|
-
* @property {
|
|
449
|
-
* @property {number} [
|
|
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
|
|
454
|
-
* @property {string}
|
|
455
|
-
* @property {
|
|
402
|
+
* @typedef UpdateCartRequest
|
|
403
|
+
* @property {string} operation
|
|
404
|
+
* @property {UpdateProductCart[]} [items]
|
|
456
405
|
*/
|
|
457
406
|
|
|
458
407
|
/**
|
|
459
|
-
* @typedef
|
|
460
|
-
* @property {
|
|
461
|
-
* @property {
|
|
462
|
-
* @property {
|
|
463
|
-
*
|
|
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
|
|
470
|
-
* @property {number} [
|
|
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
|
|
476
|
-
* @property {
|
|
477
|
-
* @property {
|
|
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
|
|
482
|
-
* @property {
|
|
483
|
-
* @property {
|
|
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
|
|
488
|
-
* @property {
|
|
489
|
-
* @property {
|
|
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
|
|
495
|
-
* @property {string}
|
|
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
|
|
501
|
-
* @property {
|
|
502
|
-
* @property {
|
|
457
|
+
* @typedef OfferSeller
|
|
458
|
+
* @property {number} [uid] - Seller id
|
|
459
|
+
* @property {string} [name]
|
|
503
460
|
*/
|
|
504
461
|
|
|
505
462
|
/**
|
|
506
|
-
* @typedef
|
|
507
|
-
* @property {number} [
|
|
508
|
-
*
|
|
509
|
-
* @property {
|
|
510
|
-
* @property {
|
|
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
|
|
527
|
-
* @property {
|
|
528
|
-
*
|
|
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
|
|
538
|
-
* @property {
|
|
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
|
|
544
|
-
* @property {
|
|
545
|
-
* @property {string} [payable_category] - Promo amount payable category
|
|
497
|
+
* @typedef RewardPointRequest
|
|
498
|
+
* @property {boolean} points
|
|
546
499
|
*/
|
|
547
500
|
|
|
548
501
|
/**
|
|
549
|
-
* @typedef
|
|
550
|
-
* @property {number} [
|
|
551
|
-
* @property {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
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
|
|
559
|
-
* @property {
|
|
560
|
-
* @property {
|
|
561
|
-
* @property {boolean} success
|
|
540
|
+
* @typedef GetAddressesResponse
|
|
541
|
+
* @property {boolean} [pii_masking]
|
|
542
|
+
* @property {Address[]} [address]
|
|
562
543
|
*/
|
|
563
544
|
|
|
564
545
|
/**
|
|
565
|
-
* @typedef
|
|
566
|
-
* @property {
|
|
567
|
-
* @property {boolean} [
|
|
568
|
-
* @property {string} [
|
|
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
|
|
573
|
-
* @property {
|
|
574
|
-
* @property {
|
|
575
|
-
* @property {
|
|
576
|
-
* @property {string} [
|
|
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
|
|
593
|
-
* @property {
|
|
594
|
-
* @property {string} [
|
|
595
|
-
* @property {string} [url]
|
|
561
|
+
* @typedef DeleteAddressResponse
|
|
562
|
+
* @property {boolean} [is_deleted]
|
|
563
|
+
* @property {string} [id]
|
|
596
564
|
*/
|
|
597
565
|
|
|
598
566
|
/**
|
|
599
|
-
* @typedef
|
|
600
|
-
* @property {
|
|
601
|
-
* @property {
|
|
602
|
-
* @property {
|
|
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
|
|
623
|
-
* @property {
|
|
624
|
-
* @property {
|
|
625
|
-
* @property {
|
|
626
|
-
* @property {
|
|
627
|
-
* @property {
|
|
628
|
-
* @property {string
|
|
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
|
|
633
|
-
* @property {
|
|
634
|
-
* @property {boolean} [
|
|
635
|
-
* @property {
|
|
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
|
|
640
|
-
* @property {string} [
|
|
641
|
-
* @property {
|
|
642
|
-
* @property {
|
|
594
|
+
* @typedef PaymentCouponValidate
|
|
595
|
+
* @property {string} [message]
|
|
596
|
+
* @property {boolean} success
|
|
597
|
+
* @property {CouponValidity} [coupon_validity]
|
|
643
598
|
*/
|
|
644
599
|
|
|
645
600
|
/**
|
|
646
|
-
* @typedef
|
|
647
|
-
* @property {number} [
|
|
648
|
-
* @property {string} [
|
|
649
|
-
* @property {
|
|
650
|
-
* @property {
|
|
651
|
-
* @property {
|
|
652
|
-
* @property {
|
|
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
|
|
657
|
-
* @property {
|
|
658
|
-
* @property {
|
|
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
|
|
663
|
-
* @property {
|
|
664
|
-
* @property {string}
|
|
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
|
|
669
|
-
* @property {
|
|
670
|
-
* @property {string} [min] - Min Promise in ISO format.
|
|
645
|
+
* @typedef UpdateCartShipmentRequest
|
|
646
|
+
* @property {UpdateCartShipmentItem[]} shipments
|
|
671
647
|
*/
|
|
672
648
|
|
|
673
649
|
/**
|
|
674
|
-
* @typedef
|
|
675
|
-
* @property {
|
|
676
|
-
* @property {
|
|
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
|
|
681
|
-
* @property {string}
|
|
659
|
+
* @typedef CustomerDetails
|
|
660
|
+
* @property {string} mobile
|
|
661
|
+
* @property {string} [name]
|
|
662
|
+
* @property {string} [email]
|
|
682
663
|
*/
|
|
683
664
|
|
|
684
665
|
/**
|
|
685
|
-
* @typedef
|
|
686
|
-
* @property {
|
|
687
|
-
* @property {
|
|
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
|
|
703
|
-
* @property {
|
|
672
|
+
* @typedef Files
|
|
673
|
+
* @property {string[]} values
|
|
674
|
+
* @property {string} key
|
|
704
675
|
*/
|
|
705
676
|
|
|
706
677
|
/**
|
|
707
|
-
* @typedef
|
|
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 {
|
|
710
|
-
* @property {
|
|
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}
|
|
717
|
-
* @property {
|
|
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
|
|
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 {
|
|
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 {
|
|
727
|
+
* @property {string} [user_type]
|
|
728
|
+
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
731
729
|
* @property {string} [gstin]
|
|
732
|
-
* @property {
|
|
733
|
-
* @property {boolean} [is_valid]
|
|
730
|
+
* @property {ShipmentPromise} [delivery_promise]
|
|
734
731
|
* @property {CartProductInfo[]} [items]
|
|
735
|
-
* @property {
|
|
736
|
-
* @property {
|
|
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
|
|
754
|
-
* @property {
|
|
755
|
-
* @property {string} [
|
|
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
|
|
760
|
-
* @property {
|
|
761
|
-
* @property {
|
|
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
|
|
767
|
-
* @property {
|
|
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
|
|
781
|
-
* @property {string}
|
|
782
|
-
* @property {string} [
|
|
783
|
-
* @property {
|
|
784
|
-
*
|
|
785
|
-
* @property {string}
|
|
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
|
|
790
|
-
* @property {
|
|
771
|
+
* @typedef CartMetaResponse
|
|
772
|
+
* @property {string} [message]
|
|
773
|
+
* @property {boolean} [is_valid]
|
|
791
774
|
*/
|
|
792
775
|
|
|
793
776
|
/**
|
|
794
|
-
* @typedef
|
|
795
|
-
* @property {string} [
|
|
796
|
-
* @property {string} [store_code]
|
|
797
|
-
* @property {number} [uid]
|
|
777
|
+
* @typedef CartMetaMissingResponse
|
|
778
|
+
* @property {string[]} [errors]
|
|
798
779
|
*/
|
|
799
780
|
|
|
800
781
|
/**
|
|
801
|
-
* @typedef
|
|
802
|
-
* @property {
|
|
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
|
|
807
|
-
* @property {string} [
|
|
808
|
-
* @property {
|
|
809
|
-
* @property {
|
|
810
|
-
* @property {
|
|
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
|
|
815
|
-
* @property {
|
|
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
|
|
823
|
-
* @property {
|
|
824
|
-
*
|
|
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
|
|
833
|
-
* @property {
|
|
834
|
-
* @property {string}
|
|
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
|
|
839
|
-
* @property {
|
|
840
|
-
* @property {
|
|
841
|
-
* @property {string}
|
|
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
|
|
846
|
-
* @property {
|
|
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
|
|
851
|
-
* @property {
|
|
852
|
-
* @property {
|
|
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 {
|
|
865
|
-
static
|
|
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
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
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
|
-
|
|
951
|
-
|
|
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
|
-
|
|
959
|
-
|
|
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
|
-
|
|
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 {
|
|
979
|
-
static
|
|
935
|
+
/** @returns {LoyaltyPoints} */
|
|
936
|
+
static LoyaltyPoints() {
|
|
980
937
|
return Joi.object({
|
|
981
|
-
|
|
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 {
|
|
986
|
-
static
|
|
945
|
+
/** @returns {RawBreakup} */
|
|
946
|
+
static RawBreakup() {
|
|
987
947
|
return Joi.object({
|
|
988
|
-
|
|
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 {
|
|
993
|
-
static
|
|
964
|
+
/** @returns {DisplayBreakup} */
|
|
965
|
+
static DisplayBreakup() {
|
|
994
966
|
return Joi.object({
|
|
995
|
-
|
|
996
|
-
|
|
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 {
|
|
1001
|
-
static
|
|
976
|
+
/** @returns {CouponBreakup} */
|
|
977
|
+
static CouponBreakup() {
|
|
1002
978
|
return Joi.object({
|
|
1003
|
-
|
|
1004
|
-
|
|
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 {
|
|
1009
|
-
static
|
|
995
|
+
/** @returns {CartBreakup} */
|
|
996
|
+
static CartBreakup() {
|
|
1010
997
|
return Joi.object({
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
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 {
|
|
1019
|
-
static
|
|
1005
|
+
/** @returns {PaymentSelectionLock} */
|
|
1006
|
+
static PaymentSelectionLock() {
|
|
1020
1007
|
return Joi.object({
|
|
1021
|
-
|
|
1022
|
-
|
|
1008
|
+
default_options: Joi.string().allow(""),
|
|
1009
|
+
enabled: Joi.boolean(),
|
|
1010
|
+
payment_identifier: Joi.string().allow(""),
|
|
1023
1011
|
});
|
|
1024
1012
|
}
|
|
1025
1013
|
|
|
1026
|
-
/** @returns {
|
|
1027
|
-
static
|
|
1014
|
+
/** @returns {PromiseTimestamp} */
|
|
1015
|
+
static PromiseTimestamp() {
|
|
1028
1016
|
return Joi.object({
|
|
1029
|
-
|
|
1017
|
+
max: Joi.number(),
|
|
1018
|
+
min: Joi.number(),
|
|
1030
1019
|
});
|
|
1031
1020
|
}
|
|
1032
1021
|
|
|
1033
|
-
/** @returns {
|
|
1034
|
-
static
|
|
1022
|
+
/** @returns {PromiseFormatted} */
|
|
1023
|
+
static PromiseFormatted() {
|
|
1035
1024
|
return Joi.object({
|
|
1036
|
-
|
|
1037
|
-
|
|
1025
|
+
max: Joi.string().allow(""),
|
|
1026
|
+
min: Joi.string().allow(""),
|
|
1038
1027
|
});
|
|
1039
1028
|
}
|
|
1040
1029
|
|
|
1041
|
-
/** @returns {
|
|
1042
|
-
static
|
|
1030
|
+
/** @returns {PromiseISOFormat} */
|
|
1031
|
+
static PromiseISOFormat() {
|
|
1043
1032
|
return Joi.object({
|
|
1044
|
-
|
|
1045
|
-
|
|
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 {
|
|
1052
|
-
static
|
|
1038
|
+
/** @returns {ShipmentPromise} */
|
|
1039
|
+
static ShipmentPromise() {
|
|
1053
1040
|
return Joi.object({
|
|
1054
|
-
|
|
1055
|
-
|
|
1041
|
+
timestamp: PosCartApplicationModel.PromiseTimestamp(),
|
|
1042
|
+
formatted: PosCartApplicationModel.PromiseFormatted(),
|
|
1043
|
+
iso: PosCartApplicationModel.PromiseISOFormat(),
|
|
1056
1044
|
});
|
|
1057
1045
|
}
|
|
1058
1046
|
|
|
1059
|
-
/** @returns {
|
|
1060
|
-
static
|
|
1047
|
+
/** @returns {StoreInfo} */
|
|
1048
|
+
static StoreInfo() {
|
|
1061
1049
|
return Joi.object({
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
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 {
|
|
1074
|
-
static
|
|
1056
|
+
/** @returns {BaseInfo} */
|
|
1057
|
+
static BaseInfo() {
|
|
1075
1058
|
return Joi.object({
|
|
1076
|
-
|
|
1077
|
-
|
|
1059
|
+
uid: Joi.number(),
|
|
1060
|
+
name: Joi.string().allow(""),
|
|
1078
1061
|
});
|
|
1079
1062
|
}
|
|
1080
1063
|
|
|
1081
|
-
/** @returns {
|
|
1082
|
-
static
|
|
1064
|
+
/** @returns {BasePrice} */
|
|
1065
|
+
static BasePrice() {
|
|
1083
1066
|
return Joi.object({
|
|
1084
|
-
|
|
1085
|
-
|
|
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 {
|
|
1090
|
-
static
|
|
1074
|
+
/** @returns {ArticlePriceInfo} */
|
|
1075
|
+
static ArticlePriceInfo() {
|
|
1091
1076
|
return Joi.object({
|
|
1092
|
-
|
|
1093
|
-
|
|
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 {
|
|
1117
|
-
static
|
|
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
|
-
|
|
1110
|
+
tags: Joi.any(),
|
|
1120
1111
|
});
|
|
1121
1112
|
}
|
|
1122
1113
|
|
|
1123
|
-
/** @returns {
|
|
1124
|
-
static
|
|
1114
|
+
/** @returns {CategoryInfo} */
|
|
1115
|
+
static CategoryInfo() {
|
|
1125
1116
|
return Joi.object({
|
|
1126
|
-
|
|
1117
|
+
uid: Joi.number(),
|
|
1118
|
+
name: Joi.string().allow(""),
|
|
1127
1119
|
});
|
|
1128
1120
|
}
|
|
1129
1121
|
|
|
1130
|
-
/** @returns {
|
|
1131
|
-
static
|
|
1122
|
+
/** @returns {ProductImage} */
|
|
1123
|
+
static ProductImage() {
|
|
1132
1124
|
return Joi.object({
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
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 {
|
|
1143
|
-
static
|
|
1131
|
+
/** @returns {ActionQuery} */
|
|
1132
|
+
static ActionQuery() {
|
|
1144
1133
|
return Joi.object({
|
|
1145
|
-
|
|
1146
|
-
message: Joi.string().allow(""),
|
|
1134
|
+
product_slug: Joi.array().items(Joi.string().allow("")),
|
|
1147
1135
|
});
|
|
1148
1136
|
}
|
|
1149
1137
|
|
|
1150
|
-
/** @returns {
|
|
1151
|
-
static
|
|
1138
|
+
/** @returns {ProductAction} */
|
|
1139
|
+
static ProductAction() {
|
|
1152
1140
|
return Joi.object({
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
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 {
|
|
1199
|
-
static
|
|
1165
|
+
/** @returns {ProductPrice} */
|
|
1166
|
+
static ProductPrice() {
|
|
1200
1167
|
return Joi.object({
|
|
1201
|
-
|
|
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 {
|
|
1206
|
-
static
|
|
1177
|
+
/** @returns {ProductPriceInfo} */
|
|
1178
|
+
static ProductPriceInfo() {
|
|
1207
1179
|
return Joi.object({
|
|
1208
|
-
|
|
1209
|
-
|
|
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 {
|
|
1234
|
-
static
|
|
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 {
|
|
1259
|
-
static
|
|
1201
|
+
/** @returns {ProductAvailabilitySize} */
|
|
1202
|
+
static ProductAvailabilitySize() {
|
|
1260
1203
|
return Joi.object({
|
|
1261
|
-
|
|
1262
|
-
|
|
1204
|
+
is_available: Joi.boolean(),
|
|
1205
|
+
value: Joi.string().allow(""),
|
|
1206
|
+
display: Joi.string().allow(""),
|
|
1263
1207
|
});
|
|
1264
1208
|
}
|
|
1265
1209
|
|
|
1266
|
-
/** @returns {
|
|
1267
|
-
static
|
|
1210
|
+
/** @returns {ProductAvailability} */
|
|
1211
|
+
static ProductAvailability() {
|
|
1268
1212
|
return Joi.object({
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
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
|
-
|
|
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 {
|
|
1302
|
-
static
|
|
1224
|
+
/** @returns {CartProductIdentifer} */
|
|
1225
|
+
static CartProductIdentifer() {
|
|
1303
1226
|
return Joi.object({
|
|
1304
|
-
|
|
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 {
|
|
1320
|
-
static
|
|
1231
|
+
/** @returns {CartProductInfo} */
|
|
1232
|
+
static CartProductInfo() {
|
|
1321
1233
|
return Joi.object({
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
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
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
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 {
|
|
1339
|
-
static
|
|
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
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
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 {
|
|
1348
|
-
static
|
|
1294
|
+
/** @returns {AddProductCart} */
|
|
1295
|
+
static AddProductCart() {
|
|
1349
1296
|
return Joi.object({
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
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 {
|
|
1360
|
-
static
|
|
1316
|
+
/** @returns {AddCartRequest} */
|
|
1317
|
+
static AddCartRequest() {
|
|
1361
1318
|
return Joi.object({
|
|
1362
|
-
|
|
1363
|
-
|
|
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 {
|
|
1369
|
-
static
|
|
1324
|
+
/** @returns {AddCartDetailResponse} */
|
|
1325
|
+
static AddCartDetailResponse() {
|
|
1370
1326
|
return Joi.object({
|
|
1371
|
-
|
|
1372
|
-
|
|
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 {
|
|
1377
|
-
static
|
|
1334
|
+
/** @returns {UpdateProductCart} */
|
|
1335
|
+
static UpdateProductCart() {
|
|
1378
1336
|
return Joi.object({
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
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 {
|
|
1387
|
-
static
|
|
1350
|
+
/** @returns {UpdateCartRequest} */
|
|
1351
|
+
static UpdateCartRequest() {
|
|
1388
1352
|
return Joi.object({
|
|
1389
|
-
|
|
1390
|
-
|
|
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 {
|
|
1399
|
-
static
|
|
1358
|
+
/** @returns {UpdateCartDetailResponse} */
|
|
1359
|
+
static UpdateCartDetailResponse() {
|
|
1400
1360
|
return Joi.object({
|
|
1401
|
-
|
|
1402
|
-
|
|
1361
|
+
cart: PosCartApplicationModel.CartDetailResponse(),
|
|
1362
|
+
message: Joi.string().allow(""),
|
|
1363
|
+
success: Joi.boolean(),
|
|
1403
1364
|
});
|
|
1404
1365
|
}
|
|
1405
1366
|
|
|
1406
|
-
/** @returns {
|
|
1407
|
-
static
|
|
1367
|
+
/** @returns {CartItemCountResponse} */
|
|
1368
|
+
static CartItemCountResponse() {
|
|
1408
1369
|
return Joi.object({
|
|
1409
|
-
|
|
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 {
|
|
1419
|
-
static
|
|
1374
|
+
/** @returns {PageCoupon} */
|
|
1375
|
+
static PageCoupon() {
|
|
1420
1376
|
return Joi.object({
|
|
1421
|
-
|
|
1422
|
-
|
|
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 {
|
|
1427
|
-
static
|
|
1385
|
+
/** @returns {Coupon} */
|
|
1386
|
+
static Coupon() {
|
|
1428
1387
|
return Joi.object({
|
|
1429
|
-
|
|
1430
|
-
|
|
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 {
|
|
1453
|
-
static
|
|
1413
|
+
/** @returns {ApplyCouponRequest} */
|
|
1414
|
+
static ApplyCouponRequest() {
|
|
1454
1415
|
return Joi.object({
|
|
1455
|
-
|
|
1456
|
-
token: Joi.string().allow(""),
|
|
1416
|
+
coupon_code: Joi.string().allow("").required(),
|
|
1457
1417
|
});
|
|
1458
1418
|
}
|
|
1459
1419
|
|
|
1460
|
-
/** @returns {
|
|
1461
|
-
static
|
|
1420
|
+
/** @returns {OfferSeller} */
|
|
1421
|
+
static OfferSeller() {
|
|
1462
1422
|
return Joi.object({
|
|
1463
|
-
|
|
1464
|
-
|
|
1423
|
+
uid: Joi.number(),
|
|
1424
|
+
name: Joi.string().allow(""),
|
|
1465
1425
|
});
|
|
1466
1426
|
}
|
|
1467
1427
|
|
|
1468
|
-
/** @returns {
|
|
1469
|
-
static
|
|
1428
|
+
/** @returns {OfferPrice} */
|
|
1429
|
+
static OfferPrice() {
|
|
1470
1430
|
return Joi.object({
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
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 {
|
|
1492
|
-
static
|
|
1452
|
+
/** @returns {BulkPriceOffer} */
|
|
1453
|
+
static BulkPriceOffer() {
|
|
1493
1454
|
return Joi.object({
|
|
1494
|
-
|
|
1495
|
-
|
|
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 {
|
|
1503
|
-
static
|
|
1460
|
+
/** @returns {BulkPriceResponse} */
|
|
1461
|
+
static BulkPriceResponse() {
|
|
1504
1462
|
return Joi.object({
|
|
1505
|
-
|
|
1506
|
-
uid: Joi.number(),
|
|
1463
|
+
data: Joi.array().items(PosCartApplicationModel.BulkPriceOffer()),
|
|
1507
1464
|
});
|
|
1508
1465
|
}
|
|
1509
1466
|
|
|
1510
|
-
/** @returns {
|
|
1511
|
-
static
|
|
1467
|
+
/** @returns {RewardPointRequest} */
|
|
1468
|
+
static RewardPointRequest() {
|
|
1512
1469
|
return Joi.object({
|
|
1513
|
-
|
|
1514
|
-
|
|
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 {
|
|
1519
|
-
static
|
|
1516
|
+
/** @returns {GetAddressesResponse} */
|
|
1517
|
+
static GetAddressesResponse() {
|
|
1520
1518
|
return Joi.object({
|
|
1521
|
-
|
|
1522
|
-
|
|
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 {
|
|
1530
|
-
static
|
|
1524
|
+
/** @returns {SaveAddressResponse} */
|
|
1525
|
+
static SaveAddressResponse() {
|
|
1531
1526
|
return Joi.object({
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1527
|
+
is_default_address: Joi.boolean(),
|
|
1528
|
+
success: Joi.boolean(),
|
|
1529
|
+
id: Joi.string().allow(""),
|
|
1535
1530
|
});
|
|
1536
1531
|
}
|
|
1537
1532
|
|
|
1538
|
-
/** @returns {
|
|
1539
|
-
static
|
|
1533
|
+
/** @returns {UpdateAddressResponse} */
|
|
1534
|
+
static UpdateAddressResponse() {
|
|
1540
1535
|
return Joi.object({
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
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 {
|
|
1548
|
-
static
|
|
1543
|
+
/** @returns {DeleteAddressResponse} */
|
|
1544
|
+
static DeleteAddressResponse() {
|
|
1549
1545
|
return Joi.object({
|
|
1550
|
-
|
|
1551
|
-
|
|
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 {
|
|
1570
|
-
static
|
|
1551
|
+
/** @returns {SelectCartAddressRequest} */
|
|
1552
|
+
static SelectCartAddressRequest() {
|
|
1571
1553
|
return Joi.object({
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
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 {
|
|
1579
|
-
static
|
|
1560
|
+
/** @returns {UpdateCartPaymentRequest} */
|
|
1561
|
+
static UpdateCartPaymentRequest() {
|
|
1580
1562
|
return Joi.object({
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
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 {
|
|
1604
|
-
static
|
|
1572
|
+
/** @returns {CouponValidity} */
|
|
1573
|
+
static CouponValidity() {
|
|
1605
1574
|
return Joi.object({
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
),
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
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 {
|
|
1618
|
-
static
|
|
1584
|
+
/** @returns {PaymentCouponValidate} */
|
|
1585
|
+
static PaymentCouponValidate() {
|
|
1619
1586
|
return Joi.object({
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1587
|
+
message: Joi.string().allow(""),
|
|
1588
|
+
success: Joi.boolean().required(),
|
|
1589
|
+
coupon_validity: PosCartApplicationModel.CouponValidity(),
|
|
1623
1590
|
});
|
|
1624
1591
|
}
|
|
1625
1592
|
|
|
1626
|
-
/** @returns {
|
|
1627
|
-
static
|
|
1593
|
+
/** @returns {ShipmentResponse} */
|
|
1594
|
+
static ShipmentResponse() {
|
|
1628
1595
|
return Joi.object({
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
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 {
|
|
1636
|
-
static
|
|
1609
|
+
/** @returns {CartShipmentsResponse} */
|
|
1610
|
+
static CartShipmentsResponse() {
|
|
1637
1611
|
return Joi.object({
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
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 {
|
|
1648
|
-
static
|
|
1634
|
+
/** @returns {UpdateCartShipmentItem} */
|
|
1635
|
+
static UpdateCartShipmentItem() {
|
|
1649
1636
|
return Joi.object({
|
|
1650
|
-
|
|
1651
|
-
|
|
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 {
|
|
1656
|
-
static
|
|
1643
|
+
/** @returns {UpdateCartShipmentRequest} */
|
|
1644
|
+
static UpdateCartShipmentRequest() {
|
|
1657
1645
|
return Joi.object({
|
|
1658
|
-
|
|
1659
|
-
|
|
1646
|
+
shipments: Joi.array()
|
|
1647
|
+
.items(PosCartApplicationModel.UpdateCartShipmentItem())
|
|
1648
|
+
.required(),
|
|
1660
1649
|
});
|
|
1661
1650
|
}
|
|
1662
1651
|
|
|
1663
|
-
/** @returns {
|
|
1664
|
-
static
|
|
1652
|
+
/** @returns {StaffCheckout} */
|
|
1653
|
+
static StaffCheckout() {
|
|
1665
1654
|
return Joi.object({
|
|
1666
|
-
|
|
1667
|
-
|
|
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 {
|
|
1672
|
-
static
|
|
1663
|
+
/** @returns {CustomerDetails} */
|
|
1664
|
+
static CustomerDetails() {
|
|
1673
1665
|
return Joi.object({
|
|
1674
|
-
|
|
1675
|
-
|
|
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 {
|
|
1680
|
-
static
|
|
1672
|
+
/** @returns {CartCheckoutCustomMeta} */
|
|
1673
|
+
static CartCheckoutCustomMeta() {
|
|
1681
1674
|
return Joi.object({
|
|
1682
|
-
|
|
1675
|
+
value: Joi.string().allow("").required(),
|
|
1676
|
+
key: Joi.string().allow("").required(),
|
|
1683
1677
|
});
|
|
1684
1678
|
}
|
|
1685
1679
|
|
|
1686
|
-
/** @returns {
|
|
1687
|
-
static
|
|
1680
|
+
/** @returns {Files} */
|
|
1681
|
+
static Files() {
|
|
1688
1682
|
return Joi.object({
|
|
1689
|
-
|
|
1690
|
-
|
|
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 {
|
|
1706
|
-
static
|
|
1688
|
+
/** @returns {CartPosCheckoutDetailRequest} */
|
|
1689
|
+
static CartPosCheckoutDetailRequest() {
|
|
1707
1690
|
return Joi.object({
|
|
1708
|
-
|
|
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 {
|
|
1713
|
-
static
|
|
1718
|
+
/** @returns {CheckCart} */
|
|
1719
|
+
static CheckCart() {
|
|
1714
1720
|
return Joi.object({
|
|
1715
|
-
|
|
1716
|
-
|
|
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
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
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
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
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
|
-
|
|
1743
|
+
user_type: Joi.string().allow(""),
|
|
1744
|
+
payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
|
|
1742
1745
|
gstin: Joi.string().allow(""),
|
|
1743
|
-
|
|
1744
|
-
is_valid: Joi.boolean(),
|
|
1746
|
+
delivery_promise: PosCartApplicationModel.ShipmentPromise(),
|
|
1745
1747
|
items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
|
|
1746
|
-
|
|
1747
|
-
|
|
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 {
|
|
1767
|
-
static
|
|
1753
|
+
/** @returns {CartCheckoutResponse} */
|
|
1754
|
+
static CartCheckoutResponse() {
|
|
1768
1755
|
return Joi.object({
|
|
1769
|
-
cart: PosCartApplicationModel.
|
|
1770
|
-
|
|
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 {
|
|
1775
|
-
static
|
|
1767
|
+
/** @returns {GiftDetail} */
|
|
1768
|
+
static GiftDetail() {
|
|
1776
1769
|
return Joi.object({
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
timestamp: PosCartApplicationModel.PromiseTimestamp(),
|
|
1770
|
+
gift_message: Joi.string().allow(""),
|
|
1771
|
+
is_gift_applied: Joi.boolean(),
|
|
1780
1772
|
});
|
|
1781
1773
|
}
|
|
1782
1774
|
|
|
1783
|
-
/** @returns {
|
|
1784
|
-
static
|
|
1775
|
+
/** @returns {ArticleGiftDetail} */
|
|
1776
|
+
static ArticleGiftDetail() {
|
|
1785
1777
|
return Joi.object({
|
|
1786
|
-
|
|
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 {
|
|
1800
|
-
static
|
|
1782
|
+
/** @returns {CartMetaRequest} */
|
|
1783
|
+
static CartMetaRequest() {
|
|
1801
1784
|
return Joi.object({
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
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 {
|
|
1811
|
-
static
|
|
1794
|
+
/** @returns {CartMetaResponse} */
|
|
1795
|
+
static CartMetaResponse() {
|
|
1812
1796
|
return Joi.object({
|
|
1813
|
-
|
|
1797
|
+
message: Joi.string().allow(""),
|
|
1798
|
+
is_valid: Joi.boolean(),
|
|
1814
1799
|
});
|
|
1815
1800
|
}
|
|
1816
1801
|
|
|
1817
|
-
/** @returns {
|
|
1818
|
-
static
|
|
1802
|
+
/** @returns {CartMetaMissingResponse} */
|
|
1803
|
+
static CartMetaMissingResponse() {
|
|
1819
1804
|
return Joi.object({
|
|
1820
|
-
|
|
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 {
|
|
1827
|
-
static
|
|
1809
|
+
/** @returns {CartDeliveryModesResponse} */
|
|
1810
|
+
static CartDeliveryModesResponse() {
|
|
1828
1811
|
return Joi.object({
|
|
1829
|
-
|
|
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 {
|
|
1834
|
-
static
|
|
1817
|
+
/** @returns {PickupStoreDetail} */
|
|
1818
|
+
static PickupStoreDetail() {
|
|
1835
1819
|
return Joi.object({
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
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 {
|
|
1844
|
-
static
|
|
1839
|
+
/** @returns {StoreDetailsResponse} */
|
|
1840
|
+
static StoreDetailsResponse() {
|
|
1845
1841
|
return Joi.object({
|
|
1846
|
-
|
|
1847
|
-
message: Joi.string().allow(""),
|
|
1848
|
-
success: Joi.boolean(),
|
|
1842
|
+
items: Joi.array().items(PosCartApplicationModel.PickupStoreDetail()),
|
|
1849
1843
|
});
|
|
1850
1844
|
}
|
|
1851
1845
|
|
|
1852
|
-
/** @returns {
|
|
1853
|
-
static
|
|
1846
|
+
/** @returns {GetShareCartLinkRequest} */
|
|
1847
|
+
static GetShareCartLinkRequest() {
|
|
1854
1848
|
return Joi.object({
|
|
1855
|
-
|
|
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 {
|
|
1865
|
-
static
|
|
1854
|
+
/** @returns {GetShareCartLinkResponse} */
|
|
1855
|
+
static GetShareCartLinkResponse() {
|
|
1866
1856
|
return Joi.object({
|
|
1867
|
-
|
|
1868
|
-
|
|
1857
|
+
share_url: Joi.string().allow(""),
|
|
1858
|
+
token: Joi.string().allow(""),
|
|
1869
1859
|
});
|
|
1870
1860
|
}
|
|
1871
1861
|
|
|
1872
|
-
/** @returns {
|
|
1873
|
-
static
|
|
1862
|
+
/** @returns {SharedCartDetails} */
|
|
1863
|
+
static SharedCartDetails() {
|
|
1874
1864
|
return Joi.object({
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
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 {
|
|
1882
|
-
static
|
|
1873
|
+
/** @returns {SharedCart} */
|
|
1874
|
+
static SharedCart() {
|
|
1883
1875
|
return Joi.object({
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
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 {
|
|
1891
|
-
static
|
|
1898
|
+
/** @returns {SharedCartResponse} */
|
|
1899
|
+
static SharedCartResponse() {
|
|
1892
1900
|
return Joi.object({
|
|
1893
|
-
|
|
1894
|
-
|
|
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
|
}
|