@gofynd/fdk-client-javascript 1.4.5 → 1.4.6
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/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +5 -5
- package/sdk/application/Catalog/CatalogApplicationClient.js +5 -5
- package/sdk/application/Logistic/LogisticApplicationModel.js +2 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +1 -1
- package/sdk/application/Order/OrderApplicationClient.js +1 -1
- package/sdk/application/Order/OrderApplicationValidator.d.ts +2 -2
- package/sdk/application/Order/OrderApplicationValidator.js +1 -1
- package/sdk/application/Payment/PaymentApplicationModel.js +23 -17
- package/sdk/application/index.d.ts +0 -1
- package/sdk/application/index.js +0 -2
- package/sdk/partner/Webhook/WebhookPartnerModel.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +25 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +69 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +2 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +16 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +59 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +25 -0
- package/sdk/platform/Order/OrderPlatformModel.js +65 -41
- package/sdk/platform/Payment/PaymentPlatformModel.js +22 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +1 -1
- package/sdk/public/Webhook/WebhookPublicModel.js +1 -1
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +0 -323
- package/sdk/application/PosCart/PosCartApplicationClient.js +0 -2364
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +0 -1857
- package/sdk/application/PosCart/PosCartApplicationModel.js +0 -1906
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +0 -483
- package/sdk/application/PosCart/PosCartApplicationValidator.js +0 -492
|
@@ -1,1906 +0,0 @@
|
|
|
1
|
-
const Joi = require("joi");
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @typedef BuyRules
|
|
5
|
-
* @property {Object} [cart_conditions] - Cart conditions details for promotion
|
|
6
|
-
* @property {Object} [item_criteria] - Item criteria of promotion
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
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
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
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
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @typedef AppliedFreeArticles
|
|
29
|
-
* @property {number} [quantity] - Free article quantity
|
|
30
|
-
* @property {string} [parent_item_identifier] - Parent item identifier for free article
|
|
31
|
-
* @property {string} [article_id] - Free article id
|
|
32
|
-
* @property {FreeGiftItem} [free_gift_item_details] - Free gift items details
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @typedef Ownership
|
|
37
|
-
* @property {string} [payable_category] - Promo amount payable category
|
|
38
|
-
* @property {string} [payable_by] - Promo amount bearable party
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @typedef AppliedPromotion
|
|
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
|
|
48
|
-
* @property {number} [article_quantity] - Quantity of article on which
|
|
49
|
-
* promotion is applicable
|
|
50
|
-
* @property {number} [amount] - Per unit discount amount applied with current promotion
|
|
51
|
-
* @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions
|
|
52
|
-
* @property {string} [offer_text] - Offer text of current promotion
|
|
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]
|
|
58
|
-
* @property {string} [promotion_group] - Promotion group for the promotion
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @typedef LoyaltyPoints
|
|
63
|
-
* @property {string} [description]
|
|
64
|
-
* @property {boolean} [is_applied]
|
|
65
|
-
* @property {number} [applicable]
|
|
66
|
-
* @property {number} [total]
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
/**
|
|
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]
|
|
84
|
-
*/
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* @typedef DisplayBreakup
|
|
88
|
-
* @property {string} [currency_code]
|
|
89
|
-
* @property {string} [currency_symbol]
|
|
90
|
-
* @property {string} [display]
|
|
91
|
-
* @property {string[]} [message]
|
|
92
|
-
* @property {string} [key]
|
|
93
|
-
* @property {number} [value]
|
|
94
|
-
*/
|
|
95
|
-
|
|
96
|
-
/**
|
|
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]
|
|
111
|
-
*/
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* @typedef CartBreakup
|
|
115
|
-
* @property {LoyaltyPoints} [loyalty_points]
|
|
116
|
-
* @property {RawBreakup} [raw]
|
|
117
|
-
* @property {DisplayBreakup[]} [display]
|
|
118
|
-
* @property {CouponBreakup} [coupon]
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @typedef PaymentSelectionLock
|
|
123
|
-
* @property {string} [default_options]
|
|
124
|
-
* @property {boolean} [enabled]
|
|
125
|
-
* @property {string} [payment_identifier]
|
|
126
|
-
*/
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* @typedef PromiseTimestamp
|
|
130
|
-
* @property {number} [max]
|
|
131
|
-
* @property {number} [min]
|
|
132
|
-
*/
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* @typedef PromiseFormatted
|
|
136
|
-
* @property {string} [max]
|
|
137
|
-
* @property {string} [min]
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* @typedef PromiseISOFormat
|
|
142
|
-
* @property {string} [max] - Max promise in ISO format.
|
|
143
|
-
* @property {string} [min] - Min Promise in ISO format.
|
|
144
|
-
*/
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* @typedef ShipmentPromise
|
|
148
|
-
* @property {PromiseTimestamp} [timestamp]
|
|
149
|
-
* @property {PromiseFormatted} [formatted]
|
|
150
|
-
* @property {PromiseISOFormat} [iso]
|
|
151
|
-
*/
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* @typedef StoreInfo
|
|
155
|
-
* @property {number} [uid]
|
|
156
|
-
* @property {string} [store_code]
|
|
157
|
-
* @property {string} [name]
|
|
158
|
-
*/
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* @typedef BaseInfo
|
|
162
|
-
* @property {number} [uid]
|
|
163
|
-
* @property {string} [name]
|
|
164
|
-
*/
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @typedef BasePrice
|
|
168
|
-
* @property {number} [effective]
|
|
169
|
-
* @property {string} [currency_code]
|
|
170
|
-
* @property {string} [currency_symbol]
|
|
171
|
-
* @property {number} [marked]
|
|
172
|
-
*/
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* @typedef ArticlePriceInfo
|
|
176
|
-
* @property {BasePrice} [converted]
|
|
177
|
-
* @property {BasePrice} [base]
|
|
178
|
-
*/
|
|
179
|
-
|
|
180
|
-
/**
|
|
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
|
|
201
|
-
*/
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* @typedef Tags
|
|
205
|
-
* @property {Object} [tags]
|
|
206
|
-
*/
|
|
207
|
-
|
|
208
|
-
/**
|
|
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]
|
|
231
|
-
*/
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* @typedef CartProduct
|
|
235
|
-
* @property {Tags} [teaser_tag]
|
|
236
|
-
* @property {Object} [_custom_json]
|
|
237
|
-
* @property {CategoryInfo[]} [categories]
|
|
238
|
-
* @property {string} [item_code]
|
|
239
|
-
* @property {string[]} [tags]
|
|
240
|
-
* @property {number} [uid]
|
|
241
|
-
* @property {string} [type]
|
|
242
|
-
* @property {ProductImage[]} [images]
|
|
243
|
-
* @property {string} [name]
|
|
244
|
-
* @property {string} [slug] - Unique product url name generated via product
|
|
245
|
-
* name and other meta data
|
|
246
|
-
* @property {ProductAction} [action]
|
|
247
|
-
* @property {BaseInfo} [brand]
|
|
248
|
-
*/
|
|
249
|
-
|
|
250
|
-
/**
|
|
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]
|
|
258
|
-
*/
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* @typedef ProductPriceInfo
|
|
262
|
-
* @property {ProductPrice} [converted]
|
|
263
|
-
* @property {ProductPrice} [base]
|
|
264
|
-
*/
|
|
265
|
-
|
|
266
|
-
/**
|
|
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
|
|
275
|
-
* @property {string} [message]
|
|
276
|
-
*/
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* @typedef ProductAvailabilitySize
|
|
280
|
-
* @property {boolean} [is_available]
|
|
281
|
-
* @property {string} [value]
|
|
282
|
-
* @property {string} [display]
|
|
283
|
-
*/
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* @typedef ProductAvailability
|
|
287
|
-
* @property {ProductAvailabilitySize[]} [available_sizes]
|
|
288
|
-
* @property {number} [other_store_quantity]
|
|
289
|
-
* @property {boolean} [deliverable]
|
|
290
|
-
* @property {boolean} [out_of_stock]
|
|
291
|
-
* @property {boolean} [is_valid]
|
|
292
|
-
* @property {string[]} [sizes]
|
|
293
|
-
*/
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* @typedef CartProductIdentifer
|
|
297
|
-
* @property {string} [identifier] - Article idenfier generated by cart
|
|
298
|
-
*/
|
|
299
|
-
|
|
300
|
-
/**
|
|
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]
|
|
314
|
-
* @property {string} [message]
|
|
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
|
|
322
|
-
*/
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* @typedef CartCurrency
|
|
326
|
-
* @property {string} [symbol]
|
|
327
|
-
* @property {string} [code] - Currency code defined by ISO 4217:2015
|
|
328
|
-
*/
|
|
329
|
-
|
|
330
|
-
/**
|
|
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]
|
|
351
|
-
*/
|
|
352
|
-
|
|
353
|
-
/**
|
|
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]
|
|
369
|
-
*/
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* @typedef AddCartRequest
|
|
373
|
-
* @property {AddProductCart[]} [items]
|
|
374
|
-
* @property {boolean} [new_cart]
|
|
375
|
-
*/
|
|
376
|
-
|
|
377
|
-
/**
|
|
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.
|
|
385
|
-
*/
|
|
386
|
-
|
|
387
|
-
/**
|
|
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]
|
|
399
|
-
*/
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* @typedef UpdateCartRequest
|
|
403
|
-
* @property {string} operation
|
|
404
|
-
* @property {UpdateProductCart[]} [items]
|
|
405
|
-
*/
|
|
406
|
-
|
|
407
|
-
/**
|
|
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.
|
|
413
|
-
*/
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* @typedef CartItemCountResponse
|
|
417
|
-
* @property {number} [user_cart_items_count] - Item count present in cart
|
|
418
|
-
*/
|
|
419
|
-
|
|
420
|
-
/**
|
|
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]
|
|
427
|
-
*/
|
|
428
|
-
|
|
429
|
-
/**
|
|
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]
|
|
443
|
-
*/
|
|
444
|
-
|
|
445
|
-
/**
|
|
446
|
-
* @typedef GetCouponResponse
|
|
447
|
-
* @property {PageCoupon} [page]
|
|
448
|
-
* @property {Coupon[]} [available_coupon_list]
|
|
449
|
-
*/
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* @typedef ApplyCouponRequest
|
|
453
|
-
* @property {string} coupon_code - Coupon code to be applied
|
|
454
|
-
*/
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* @typedef OfferSeller
|
|
458
|
-
* @property {number} [uid] - Seller id
|
|
459
|
-
* @property {string} [name]
|
|
460
|
-
*/
|
|
461
|
-
|
|
462
|
-
/**
|
|
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
|
|
471
|
-
*/
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* @typedef OfferItem
|
|
475
|
-
* @property {number} [margin] - Percentage value of discount
|
|
476
|
-
* @property {number} [quantity] - Quantity on which offer is applicable
|
|
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
|
|
480
|
-
* @property {string} [type] - Offer type
|
|
481
|
-
* @property {OfferPrice} [price]
|
|
482
|
-
* @property {boolean} [auto_applied] - Whether offer discount is auto applied in cart
|
|
483
|
-
*/
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* @typedef BulkPriceOffer
|
|
487
|
-
* @property {OfferSeller} [seller]
|
|
488
|
-
* @property {OfferItem[]} [offers]
|
|
489
|
-
*/
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* @typedef BulkPriceResponse
|
|
493
|
-
* @property {BulkPriceOffer[]} [data] - Consist of offers from multiple seller
|
|
494
|
-
*/
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* @typedef RewardPointRequest
|
|
498
|
-
* @property {boolean} points
|
|
499
|
-
*/
|
|
500
|
-
|
|
501
|
-
/**
|
|
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]
|
|
537
|
-
*/
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* @typedef GetAddressesResponse
|
|
541
|
-
* @property {boolean} [pii_masking]
|
|
542
|
-
* @property {Address[]} [address]
|
|
543
|
-
*/
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* @typedef SaveAddressResponse
|
|
547
|
-
* @property {boolean} [is_default_address]
|
|
548
|
-
* @property {boolean} [success]
|
|
549
|
-
* @property {string} [id]
|
|
550
|
-
*/
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* @typedef UpdateAddressResponse
|
|
554
|
-
* @property {boolean} [is_updated]
|
|
555
|
-
* @property {boolean} [is_default_address]
|
|
556
|
-
* @property {boolean} [success]
|
|
557
|
-
* @property {string} [id]
|
|
558
|
-
*/
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* @typedef DeleteAddressResponse
|
|
562
|
-
* @property {boolean} [is_deleted]
|
|
563
|
-
* @property {string} [id]
|
|
564
|
-
*/
|
|
565
|
-
|
|
566
|
-
/**
|
|
567
|
-
* @typedef SelectCartAddressRequest
|
|
568
|
-
* @property {string} [billing_address_id]
|
|
569
|
-
* @property {string} [cart_id]
|
|
570
|
-
* @property {string} [id]
|
|
571
|
-
*/
|
|
572
|
-
|
|
573
|
-
/**
|
|
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]
|
|
581
|
-
*/
|
|
582
|
-
|
|
583
|
-
/**
|
|
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]
|
|
591
|
-
*/
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* @typedef PaymentCouponValidate
|
|
595
|
-
* @property {string} [message]
|
|
596
|
-
* @property {boolean} success
|
|
597
|
-
* @property {CouponValidity} [coupon_validity]
|
|
598
|
-
*/
|
|
599
|
-
|
|
600
|
-
/**
|
|
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]
|
|
612
|
-
*/
|
|
613
|
-
|
|
614
|
-
/**
|
|
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]
|
|
635
|
-
*/
|
|
636
|
-
|
|
637
|
-
/**
|
|
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
|
|
642
|
-
*/
|
|
643
|
-
|
|
644
|
-
/**
|
|
645
|
-
* @typedef UpdateCartShipmentRequest
|
|
646
|
-
* @property {UpdateCartShipmentItem[]} shipments
|
|
647
|
-
*/
|
|
648
|
-
|
|
649
|
-
/**
|
|
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
|
|
656
|
-
*/
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* @typedef CustomerDetails
|
|
660
|
-
* @property {string} mobile
|
|
661
|
-
* @property {string} [name]
|
|
662
|
-
* @property {string} [email]
|
|
663
|
-
*/
|
|
664
|
-
|
|
665
|
-
/**
|
|
666
|
-
* @typedef CartCheckoutCustomMeta
|
|
667
|
-
* @property {string} value
|
|
668
|
-
* @property {string} key
|
|
669
|
-
*/
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* @typedef Files
|
|
673
|
-
* @property {string[]} values
|
|
674
|
-
* @property {string} key
|
|
675
|
-
*/
|
|
676
|
-
|
|
677
|
-
/**
|
|
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
|
|
687
|
-
* @property {string} [id]
|
|
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]
|
|
693
|
-
* @property {string} [billing_address_id]
|
|
694
|
-
* @property {string} payment_mode
|
|
695
|
-
* @property {boolean} [pos]
|
|
696
|
-
* @property {Object} [extra_meta]
|
|
697
|
-
* @property {CartCheckoutCustomMeta[]} [custom_meta]
|
|
698
|
-
* @property {string} [payment_identifier]
|
|
699
|
-
* @property {number} [ordering_store]
|
|
700
|
-
* @property {Files[]} [files] - List of file url
|
|
701
|
-
*/
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* @typedef CheckCart
|
|
705
|
-
* @property {string} [comment]
|
|
706
|
-
* @property {number} [delivery_charges]
|
|
707
|
-
* @property {string} [coupon_text]
|
|
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]
|
|
726
|
-
* @property {string} [delivery_charge_info]
|
|
727
|
-
* @property {string} [user_type]
|
|
728
|
-
* @property {PaymentSelectionLock} [payment_selection_lock]
|
|
729
|
-
* @property {string} [gstin]
|
|
730
|
-
* @property {ShipmentPromise} [delivery_promise]
|
|
731
|
-
* @property {CartProductInfo[]} [items]
|
|
732
|
-
* @property {CartCurrency} [currency]
|
|
733
|
-
* @property {number} [delivery_charge_order_value]
|
|
734
|
-
*/
|
|
735
|
-
|
|
736
|
-
/**
|
|
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]
|
|
746
|
-
*/
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* @typedef GiftDetail
|
|
750
|
-
* @property {string} [gift_message]
|
|
751
|
-
* @property {boolean} [is_gift_applied]
|
|
752
|
-
*/
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* @typedef ArticleGiftDetail
|
|
756
|
-
* @property {GiftDetail} [article_id]
|
|
757
|
-
*/
|
|
758
|
-
|
|
759
|
-
/**
|
|
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]
|
|
768
|
-
*/
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* @typedef CartMetaResponse
|
|
772
|
-
* @property {string} [message]
|
|
773
|
-
* @property {boolean} [is_valid]
|
|
774
|
-
*/
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
* @typedef CartMetaMissingResponse
|
|
778
|
-
* @property {string[]} [errors]
|
|
779
|
-
*/
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
* @typedef CartDeliveryModesResponse
|
|
783
|
-
* @property {string[]} [available_modes] - Available delivery modes
|
|
784
|
-
* @property {number[]} [pickup_stores] - Store pick up available store uids
|
|
785
|
-
*/
|
|
786
|
-
|
|
787
|
-
/**
|
|
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]
|
|
805
|
-
*/
|
|
806
|
-
|
|
807
|
-
/**
|
|
808
|
-
* @typedef StoreDetailsResponse
|
|
809
|
-
* @property {PickupStoreDetail[]} [items]
|
|
810
|
-
*/
|
|
811
|
-
|
|
812
|
-
/**
|
|
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
|
|
817
|
-
*/
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* @typedef GetShareCartLinkResponse
|
|
821
|
-
* @property {string} [share_url] - Short shareable final url
|
|
822
|
-
* @property {string} [token] - Short url unique id
|
|
823
|
-
*/
|
|
824
|
-
|
|
825
|
-
/**
|
|
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
|
|
832
|
-
*/
|
|
833
|
-
|
|
834
|
-
/**
|
|
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]
|
|
855
|
-
*/
|
|
856
|
-
|
|
857
|
-
/**
|
|
858
|
-
* @typedef SharedCartResponse
|
|
859
|
-
* @property {string} [error]
|
|
860
|
-
* @property {SharedCart} [cart]
|
|
861
|
-
*/
|
|
862
|
-
|
|
863
|
-
class PosCartApplicationModel {
|
|
864
|
-
/** @returns {BuyRules} */
|
|
865
|
-
static BuyRules() {
|
|
866
|
-
return Joi.object({
|
|
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(""),
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
/** @returns {AppliedFreeArticles} */
|
|
895
|
-
static AppliedFreeArticles() {
|
|
896
|
-
return Joi.object({
|
|
897
|
-
quantity: Joi.number(),
|
|
898
|
-
parent_item_identifier: Joi.string().allow(""),
|
|
899
|
-
article_id: Joi.string().allow(""),
|
|
900
|
-
free_gift_item_details: PosCartApplicationModel.FreeGiftItem(),
|
|
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(""),
|
|
909
|
-
});
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
/** @returns {AppliedPromotion} */
|
|
913
|
-
static AppliedPromotion() {
|
|
914
|
-
return Joi.object({
|
|
915
|
-
promotion_name: Joi.string().allow(""),
|
|
916
|
-
mrp_promotion: Joi.boolean(),
|
|
917
|
-
buy_rules: Joi.array().items(PosCartApplicationModel.BuyRules()),
|
|
918
|
-
promotion_type: Joi.string().allow(""),
|
|
919
|
-
article_quantity: Joi.number(),
|
|
920
|
-
amount: Joi.number(),
|
|
921
|
-
discount_rules: Joi.array().items(
|
|
922
|
-
PosCartApplicationModel.DiscountRulesApp()
|
|
923
|
-
),
|
|
924
|
-
offer_text: Joi.string().allow(""),
|
|
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(),
|
|
931
|
-
promotion_group: Joi.string().allow(""),
|
|
932
|
-
});
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
/** @returns {LoyaltyPoints} */
|
|
936
|
-
static LoyaltyPoints() {
|
|
937
|
-
return Joi.object({
|
|
938
|
-
description: Joi.string().allow(""),
|
|
939
|
-
is_applied: Joi.boolean(),
|
|
940
|
-
applicable: Joi.number(),
|
|
941
|
-
total: Joi.number(),
|
|
942
|
-
});
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
/** @returns {RawBreakup} */
|
|
946
|
-
static RawBreakup() {
|
|
947
|
-
return Joi.object({
|
|
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(),
|
|
961
|
-
});
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
/** @returns {DisplayBreakup} */
|
|
965
|
-
static DisplayBreakup() {
|
|
966
|
-
return Joi.object({
|
|
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(),
|
|
973
|
-
});
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
/** @returns {CouponBreakup} */
|
|
977
|
-
static CouponBreakup() {
|
|
978
|
-
return Joi.object({
|
|
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),
|
|
992
|
-
});
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
/** @returns {CartBreakup} */
|
|
996
|
-
static CartBreakup() {
|
|
997
|
-
return Joi.object({
|
|
998
|
-
loyalty_points: PosCartApplicationModel.LoyaltyPoints(),
|
|
999
|
-
raw: PosCartApplicationModel.RawBreakup(),
|
|
1000
|
-
display: Joi.array().items(PosCartApplicationModel.DisplayBreakup()),
|
|
1001
|
-
coupon: PosCartApplicationModel.CouponBreakup(),
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
/** @returns {PaymentSelectionLock} */
|
|
1006
|
-
static PaymentSelectionLock() {
|
|
1007
|
-
return Joi.object({
|
|
1008
|
-
default_options: Joi.string().allow(""),
|
|
1009
|
-
enabled: Joi.boolean(),
|
|
1010
|
-
payment_identifier: Joi.string().allow(""),
|
|
1011
|
-
});
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
/** @returns {PromiseTimestamp} */
|
|
1015
|
-
static PromiseTimestamp() {
|
|
1016
|
-
return Joi.object({
|
|
1017
|
-
max: Joi.number(),
|
|
1018
|
-
min: Joi.number(),
|
|
1019
|
-
});
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
/** @returns {PromiseFormatted} */
|
|
1023
|
-
static PromiseFormatted() {
|
|
1024
|
-
return Joi.object({
|
|
1025
|
-
max: Joi.string().allow(""),
|
|
1026
|
-
min: Joi.string().allow(""),
|
|
1027
|
-
});
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
/** @returns {PromiseISOFormat} */
|
|
1031
|
-
static PromiseISOFormat() {
|
|
1032
|
-
return Joi.object({
|
|
1033
|
-
max: Joi.string().allow(""),
|
|
1034
|
-
min: Joi.string().allow(""),
|
|
1035
|
-
});
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
/** @returns {ShipmentPromise} */
|
|
1039
|
-
static ShipmentPromise() {
|
|
1040
|
-
return Joi.object({
|
|
1041
|
-
timestamp: PosCartApplicationModel.PromiseTimestamp(),
|
|
1042
|
-
formatted: PosCartApplicationModel.PromiseFormatted(),
|
|
1043
|
-
iso: PosCartApplicationModel.PromiseISOFormat(),
|
|
1044
|
-
});
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
/** @returns {StoreInfo} */
|
|
1048
|
-
static StoreInfo() {
|
|
1049
|
-
return Joi.object({
|
|
1050
|
-
uid: Joi.number(),
|
|
1051
|
-
store_code: Joi.string().allow(""),
|
|
1052
|
-
name: Joi.string().allow(""),
|
|
1053
|
-
});
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
/** @returns {BaseInfo} */
|
|
1057
|
-
static BaseInfo() {
|
|
1058
|
-
return Joi.object({
|
|
1059
|
-
uid: Joi.number(),
|
|
1060
|
-
name: Joi.string().allow(""),
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
/** @returns {BasePrice} */
|
|
1065
|
-
static BasePrice() {
|
|
1066
|
-
return Joi.object({
|
|
1067
|
-
effective: Joi.number(),
|
|
1068
|
-
currency_code: Joi.string().allow(""),
|
|
1069
|
-
currency_symbol: Joi.string().allow(""),
|
|
1070
|
-
marked: Joi.number(),
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
/** @returns {ArticlePriceInfo} */
|
|
1075
|
-
static ArticlePriceInfo() {
|
|
1076
|
-
return Joi.object({
|
|
1077
|
-
converted: PosCartApplicationModel.BasePrice(),
|
|
1078
|
-
base: PosCartApplicationModel.BasePrice(),
|
|
1079
|
-
});
|
|
1080
|
-
}
|
|
1081
|
-
|
|
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() {
|
|
1109
|
-
return Joi.object({
|
|
1110
|
-
tags: Joi.any(),
|
|
1111
|
-
});
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
/** @returns {CategoryInfo} */
|
|
1115
|
-
static CategoryInfo() {
|
|
1116
|
-
return Joi.object({
|
|
1117
|
-
uid: Joi.number(),
|
|
1118
|
-
name: Joi.string().allow(""),
|
|
1119
|
-
});
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
/** @returns {ProductImage} */
|
|
1123
|
-
static ProductImage() {
|
|
1124
|
-
return Joi.object({
|
|
1125
|
-
aspect_ratio: Joi.string().allow(""),
|
|
1126
|
-
url: Joi.string().allow(""),
|
|
1127
|
-
secure_url: Joi.string().allow(""),
|
|
1128
|
-
});
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
/** @returns {ActionQuery} */
|
|
1132
|
-
static ActionQuery() {
|
|
1133
|
-
return Joi.object({
|
|
1134
|
-
product_slug: Joi.array().items(Joi.string().allow("")),
|
|
1135
|
-
});
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
/** @returns {ProductAction} */
|
|
1139
|
-
static ProductAction() {
|
|
1140
|
-
return Joi.object({
|
|
1141
|
-
query: PosCartApplicationModel.ActionQuery(),
|
|
1142
|
-
url: Joi.string().allow(""),
|
|
1143
|
-
type: Joi.string().allow(""),
|
|
1144
|
-
});
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
/** @returns {CartProduct} */
|
|
1148
|
-
static CartProduct() {
|
|
1149
|
-
return Joi.object({
|
|
1150
|
-
teaser_tag: PosCartApplicationModel.Tags(),
|
|
1151
|
-
_custom_json: Joi.any(),
|
|
1152
|
-
categories: Joi.array().items(PosCartApplicationModel.CategoryInfo()),
|
|
1153
|
-
item_code: Joi.string().allow("").allow(null),
|
|
1154
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
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(),
|
|
1162
|
-
});
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
/** @returns {ProductPrice} */
|
|
1166
|
-
static ProductPrice() {
|
|
1167
|
-
return Joi.object({
|
|
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(),
|
|
1174
|
-
});
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
/** @returns {ProductPriceInfo} */
|
|
1178
|
-
static ProductPriceInfo() {
|
|
1179
|
-
return Joi.object({
|
|
1180
|
-
converted: PosCartApplicationModel.ProductPrice(),
|
|
1181
|
-
base: PosCartApplicationModel.ProductPrice(),
|
|
1182
|
-
});
|
|
1183
|
-
}
|
|
1184
|
-
|
|
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() {
|
|
1196
|
-
return Joi.object({
|
|
1197
|
-
message: Joi.string().allow(""),
|
|
1198
|
-
});
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
/** @returns {ProductAvailabilitySize} */
|
|
1202
|
-
static ProductAvailabilitySize() {
|
|
1203
|
-
return Joi.object({
|
|
1204
|
-
is_available: Joi.boolean(),
|
|
1205
|
-
value: Joi.string().allow(""),
|
|
1206
|
-
display: Joi.string().allow(""),
|
|
1207
|
-
});
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
/** @returns {ProductAvailability} */
|
|
1211
|
-
static ProductAvailability() {
|
|
1212
|
-
return Joi.object({
|
|
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(),
|
|
1219
|
-
is_valid: Joi.boolean(),
|
|
1220
|
-
sizes: Joi.array().items(Joi.string().allow("")),
|
|
1221
|
-
});
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
/** @returns {CartProductIdentifer} */
|
|
1225
|
-
static CartProductIdentifer() {
|
|
1226
|
-
return Joi.object({
|
|
1227
|
-
identifier: Joi.string().allow(""),
|
|
1228
|
-
});
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
/** @returns {CartProductInfo} */
|
|
1232
|
-
static CartProductInfo() {
|
|
1233
|
-
return Joi.object({
|
|
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(""),
|
|
1248
|
-
message: Joi.string().allow(""),
|
|
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(),
|
|
1256
|
-
});
|
|
1257
|
-
}
|
|
1258
|
-
|
|
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() {
|
|
1269
|
-
return Joi.object({
|
|
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(),
|
|
1291
|
-
});
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
/** @returns {AddProductCart} */
|
|
1295
|
-
static AddProductCart() {
|
|
1296
|
-
return Joi.object({
|
|
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(""),
|
|
1313
|
-
});
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
/** @returns {AddCartRequest} */
|
|
1317
|
-
static AddCartRequest() {
|
|
1318
|
-
return Joi.object({
|
|
1319
|
-
items: Joi.array().items(PosCartApplicationModel.AddProductCart()),
|
|
1320
|
-
new_cart: Joi.boolean(),
|
|
1321
|
-
});
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
/** @returns {AddCartDetailResponse} */
|
|
1325
|
-
static AddCartDetailResponse() {
|
|
1326
|
-
return Joi.object({
|
|
1327
|
-
cart: PosCartApplicationModel.CartDetailResponse(),
|
|
1328
|
-
message: Joi.string().allow(""),
|
|
1329
|
-
partial: Joi.boolean(),
|
|
1330
|
-
success: Joi.boolean(),
|
|
1331
|
-
});
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
/** @returns {UpdateProductCart} */
|
|
1335
|
-
static UpdateProductCart() {
|
|
1336
|
-
return Joi.object({
|
|
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(""),
|
|
1347
|
-
});
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
/** @returns {UpdateCartRequest} */
|
|
1351
|
-
static UpdateCartRequest() {
|
|
1352
|
-
return Joi.object({
|
|
1353
|
-
operation: Joi.string().allow("").required(),
|
|
1354
|
-
items: Joi.array().items(PosCartApplicationModel.UpdateProductCart()),
|
|
1355
|
-
});
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
/** @returns {UpdateCartDetailResponse} */
|
|
1359
|
-
static UpdateCartDetailResponse() {
|
|
1360
|
-
return Joi.object({
|
|
1361
|
-
cart: PosCartApplicationModel.CartDetailResponse(),
|
|
1362
|
-
message: Joi.string().allow(""),
|
|
1363
|
-
success: Joi.boolean(),
|
|
1364
|
-
});
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
/** @returns {CartItemCountResponse} */
|
|
1368
|
-
static CartItemCountResponse() {
|
|
1369
|
-
return Joi.object({
|
|
1370
|
-
user_cart_items_count: Joi.number(),
|
|
1371
|
-
});
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
/** @returns {PageCoupon} */
|
|
1375
|
-
static PageCoupon() {
|
|
1376
|
-
return Joi.object({
|
|
1377
|
-
has_previous: Joi.boolean(),
|
|
1378
|
-
current: Joi.number(),
|
|
1379
|
-
total: Joi.number(),
|
|
1380
|
-
total_item_count: Joi.number(),
|
|
1381
|
-
has_next: Joi.boolean(),
|
|
1382
|
-
});
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
/** @returns {Coupon} */
|
|
1386
|
-
static Coupon() {
|
|
1387
|
-
return Joi.object({
|
|
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(""),
|
|
1400
|
-
});
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
/** @returns {GetCouponResponse} */
|
|
1404
|
-
static GetCouponResponse() {
|
|
1405
|
-
return Joi.object({
|
|
1406
|
-
page: PosCartApplicationModel.PageCoupon(),
|
|
1407
|
-
available_coupon_list: Joi.array().items(
|
|
1408
|
-
PosCartApplicationModel.Coupon()
|
|
1409
|
-
),
|
|
1410
|
-
});
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
/** @returns {ApplyCouponRequest} */
|
|
1414
|
-
static ApplyCouponRequest() {
|
|
1415
|
-
return Joi.object({
|
|
1416
|
-
coupon_code: Joi.string().allow("").required(),
|
|
1417
|
-
});
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
/** @returns {OfferSeller} */
|
|
1421
|
-
static OfferSeller() {
|
|
1422
|
-
return Joi.object({
|
|
1423
|
-
uid: Joi.number(),
|
|
1424
|
-
name: Joi.string().allow(""),
|
|
1425
|
-
});
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
/** @returns {OfferPrice} */
|
|
1429
|
-
static OfferPrice() {
|
|
1430
|
-
return Joi.object({
|
|
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(),
|
|
1436
|
-
});
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
/** @returns {OfferItem} */
|
|
1440
|
-
static OfferItem() {
|
|
1441
|
-
return Joi.object({
|
|
1442
|
-
margin: Joi.number(),
|
|
1443
|
-
quantity: Joi.number(),
|
|
1444
|
-
total: Joi.number(),
|
|
1445
|
-
best: Joi.boolean(),
|
|
1446
|
-
type: Joi.string().allow(""),
|
|
1447
|
-
price: PosCartApplicationModel.OfferPrice(),
|
|
1448
|
-
auto_applied: Joi.boolean(),
|
|
1449
|
-
});
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
/** @returns {BulkPriceOffer} */
|
|
1453
|
-
static BulkPriceOffer() {
|
|
1454
|
-
return Joi.object({
|
|
1455
|
-
seller: PosCartApplicationModel.OfferSeller(),
|
|
1456
|
-
offers: Joi.array().items(PosCartApplicationModel.OfferItem()),
|
|
1457
|
-
});
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
/** @returns {BulkPriceResponse} */
|
|
1461
|
-
static BulkPriceResponse() {
|
|
1462
|
-
return Joi.object({
|
|
1463
|
-
data: Joi.array().items(PosCartApplicationModel.BulkPriceOffer()),
|
|
1464
|
-
});
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
/** @returns {RewardPointRequest} */
|
|
1468
|
-
static RewardPointRequest() {
|
|
1469
|
-
return Joi.object({
|
|
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(""),
|
|
1513
|
-
});
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
/** @returns {GetAddressesResponse} */
|
|
1517
|
-
static GetAddressesResponse() {
|
|
1518
|
-
return Joi.object({
|
|
1519
|
-
pii_masking: Joi.boolean(),
|
|
1520
|
-
address: Joi.array().items(PosCartApplicationModel.Address()),
|
|
1521
|
-
});
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
/** @returns {SaveAddressResponse} */
|
|
1525
|
-
static SaveAddressResponse() {
|
|
1526
|
-
return Joi.object({
|
|
1527
|
-
is_default_address: Joi.boolean(),
|
|
1528
|
-
success: Joi.boolean(),
|
|
1529
|
-
id: Joi.string().allow(""),
|
|
1530
|
-
});
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
/** @returns {UpdateAddressResponse} */
|
|
1534
|
-
static UpdateAddressResponse() {
|
|
1535
|
-
return Joi.object({
|
|
1536
|
-
is_updated: Joi.boolean(),
|
|
1537
|
-
is_default_address: Joi.boolean(),
|
|
1538
|
-
success: Joi.boolean(),
|
|
1539
|
-
id: Joi.string().allow(""),
|
|
1540
|
-
});
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
/** @returns {DeleteAddressResponse} */
|
|
1544
|
-
static DeleteAddressResponse() {
|
|
1545
|
-
return Joi.object({
|
|
1546
|
-
is_deleted: Joi.boolean(),
|
|
1547
|
-
id: Joi.string().allow(""),
|
|
1548
|
-
});
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
/** @returns {SelectCartAddressRequest} */
|
|
1552
|
-
static SelectCartAddressRequest() {
|
|
1553
|
-
return Joi.object({
|
|
1554
|
-
billing_address_id: Joi.string().allow(""),
|
|
1555
|
-
cart_id: Joi.string().allow(""),
|
|
1556
|
-
id: Joi.string().allow(""),
|
|
1557
|
-
});
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
/** @returns {UpdateCartPaymentRequest} */
|
|
1561
|
-
static UpdateCartPaymentRequest() {
|
|
1562
|
-
return Joi.object({
|
|
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(""),
|
|
1569
|
-
});
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
/** @returns {CouponValidity} */
|
|
1573
|
-
static CouponValidity() {
|
|
1574
|
-
return Joi.object({
|
|
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(""),
|
|
1581
|
-
});
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
|
-
/** @returns {PaymentCouponValidate} */
|
|
1585
|
-
static PaymentCouponValidate() {
|
|
1586
|
-
return Joi.object({
|
|
1587
|
-
message: Joi.string().allow(""),
|
|
1588
|
-
success: Joi.boolean().required(),
|
|
1589
|
-
coupon_validity: PosCartApplicationModel.CouponValidity(),
|
|
1590
|
-
});
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
/** @returns {ShipmentResponse} */
|
|
1594
|
-
static ShipmentResponse() {
|
|
1595
|
-
return Joi.object({
|
|
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(),
|
|
1606
|
-
});
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
/** @returns {CartShipmentsResponse} */
|
|
1610
|
-
static CartShipmentsResponse() {
|
|
1611
|
-
return Joi.object({
|
|
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(),
|
|
1631
|
-
});
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
/** @returns {UpdateCartShipmentItem} */
|
|
1635
|
-
static UpdateCartShipmentItem() {
|
|
1636
|
-
return Joi.object({
|
|
1637
|
-
quantity: Joi.number(),
|
|
1638
|
-
shipment_type: Joi.string().allow("").required(),
|
|
1639
|
-
article_uid: Joi.string().allow("").required(),
|
|
1640
|
-
});
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
/** @returns {UpdateCartShipmentRequest} */
|
|
1644
|
-
static UpdateCartShipmentRequest() {
|
|
1645
|
-
return Joi.object({
|
|
1646
|
-
shipments: Joi.array()
|
|
1647
|
-
.items(PosCartApplicationModel.UpdateCartShipmentItem())
|
|
1648
|
-
.required(),
|
|
1649
|
-
});
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
/** @returns {StaffCheckout} */
|
|
1653
|
-
static StaffCheckout() {
|
|
1654
|
-
return Joi.object({
|
|
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(),
|
|
1660
|
-
});
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
/** @returns {CustomerDetails} */
|
|
1664
|
-
static CustomerDetails() {
|
|
1665
|
-
return Joi.object({
|
|
1666
|
-
mobile: Joi.string().allow("").required(),
|
|
1667
|
-
name: Joi.string().allow(""),
|
|
1668
|
-
email: Joi.string().allow("").allow(null),
|
|
1669
|
-
});
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
/** @returns {CartCheckoutCustomMeta} */
|
|
1673
|
-
static CartCheckoutCustomMeta() {
|
|
1674
|
-
return Joi.object({
|
|
1675
|
-
value: Joi.string().allow("").required(),
|
|
1676
|
-
key: Joi.string().allow("").required(),
|
|
1677
|
-
});
|
|
1678
|
-
}
|
|
1679
|
-
|
|
1680
|
-
/** @returns {Files} */
|
|
1681
|
-
static Files() {
|
|
1682
|
-
return Joi.object({
|
|
1683
|
-
values: Joi.array().items(Joi.string().allow("")).required(),
|
|
1684
|
-
key: Joi.string().allow("").required(),
|
|
1685
|
-
});
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
/** @returns {CartPosCheckoutDetailRequest} */
|
|
1689
|
-
static CartPosCheckoutDetailRequest() {
|
|
1690
|
-
return Joi.object({
|
|
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()),
|
|
1715
|
-
});
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
/** @returns {CheckCart} */
|
|
1719
|
-
static CheckCart() {
|
|
1720
|
-
return Joi.object({
|
|
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(""),
|
|
1727
|
-
success: Joi.boolean(),
|
|
1728
|
-
id: Joi.string().allow(""),
|
|
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(""),
|
|
1736
|
-
buy_now: Joi.boolean(),
|
|
1737
|
-
cod_available: Joi.boolean(),
|
|
1738
|
-
cart_id: Joi.number(),
|
|
1739
|
-
breakup_values: PosCartApplicationModel.CartBreakup(),
|
|
1740
|
-
order_id: Joi.string().allow(""),
|
|
1741
|
-
cod_charges: Joi.number(),
|
|
1742
|
-
delivery_charge_info: Joi.string().allow(""),
|
|
1743
|
-
user_type: Joi.string().allow(""),
|
|
1744
|
-
payment_selection_lock: PosCartApplicationModel.PaymentSelectionLock(),
|
|
1745
|
-
gstin: Joi.string().allow(""),
|
|
1746
|
-
delivery_promise: PosCartApplicationModel.ShipmentPromise(),
|
|
1747
|
-
items: Joi.array().items(PosCartApplicationModel.CartProductInfo()),
|
|
1748
|
-
currency: PosCartApplicationModel.CartCurrency(),
|
|
1749
|
-
delivery_charge_order_value: Joi.number(),
|
|
1750
|
-
});
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
/** @returns {CartCheckoutResponse} */
|
|
1754
|
-
static CartCheckoutResponse() {
|
|
1755
|
-
return Joi.object({
|
|
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(""),
|
|
1764
|
-
});
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
/** @returns {GiftDetail} */
|
|
1768
|
-
static GiftDetail() {
|
|
1769
|
-
return Joi.object({
|
|
1770
|
-
gift_message: Joi.string().allow(""),
|
|
1771
|
-
is_gift_applied: Joi.boolean(),
|
|
1772
|
-
});
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
/** @returns {ArticleGiftDetail} */
|
|
1776
|
-
static ArticleGiftDetail() {
|
|
1777
|
-
return Joi.object({
|
|
1778
|
-
article_id: PosCartApplicationModel.GiftDetail(),
|
|
1779
|
-
});
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
/** @returns {CartMetaRequest} */
|
|
1783
|
-
static CartMetaRequest() {
|
|
1784
|
-
return Joi.object({
|
|
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(),
|
|
1791
|
-
});
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
/** @returns {CartMetaResponse} */
|
|
1795
|
-
static CartMetaResponse() {
|
|
1796
|
-
return Joi.object({
|
|
1797
|
-
message: Joi.string().allow(""),
|
|
1798
|
-
is_valid: Joi.boolean(),
|
|
1799
|
-
});
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
/** @returns {CartMetaMissingResponse} */
|
|
1803
|
-
static CartMetaMissingResponse() {
|
|
1804
|
-
return Joi.object({
|
|
1805
|
-
errors: Joi.array().items(Joi.string().allow("")),
|
|
1806
|
-
});
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
/** @returns {CartDeliveryModesResponse} */
|
|
1810
|
-
static CartDeliveryModesResponse() {
|
|
1811
|
-
return Joi.object({
|
|
1812
|
-
available_modes: Joi.array().items(Joi.string().allow("")),
|
|
1813
|
-
pickup_stores: Joi.array().items(Joi.number()),
|
|
1814
|
-
});
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
/** @returns {PickupStoreDetail} */
|
|
1818
|
-
static PickupStoreDetail() {
|
|
1819
|
-
return Joi.object({
|
|
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(),
|
|
1836
|
-
});
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
/** @returns {StoreDetailsResponse} */
|
|
1840
|
-
static StoreDetailsResponse() {
|
|
1841
|
-
return Joi.object({
|
|
1842
|
-
items: Joi.array().items(PosCartApplicationModel.PickupStoreDetail()),
|
|
1843
|
-
});
|
|
1844
|
-
}
|
|
1845
|
-
|
|
1846
|
-
/** @returns {GetShareCartLinkRequest} */
|
|
1847
|
-
static GetShareCartLinkRequest() {
|
|
1848
|
-
return Joi.object({
|
|
1849
|
-
meta: Joi.any(),
|
|
1850
|
-
id: Joi.string().allow(""),
|
|
1851
|
-
});
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
/** @returns {GetShareCartLinkResponse} */
|
|
1855
|
-
static GetShareCartLinkResponse() {
|
|
1856
|
-
return Joi.object({
|
|
1857
|
-
share_url: Joi.string().allow(""),
|
|
1858
|
-
token: Joi.string().allow(""),
|
|
1859
|
-
});
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
/** @returns {SharedCartDetails} */
|
|
1863
|
-
static SharedCartDetails() {
|
|
1864
|
-
return Joi.object({
|
|
1865
|
-
meta: Joi.any(),
|
|
1866
|
-
user: Joi.any(),
|
|
1867
|
-
created_on: Joi.string().allow(""),
|
|
1868
|
-
token: Joi.string().allow(""),
|
|
1869
|
-
source: Joi.any(),
|
|
1870
|
-
});
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
/** @returns {SharedCart} */
|
|
1874
|
-
static SharedCart() {
|
|
1875
|
-
return Joi.object({
|
|
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(),
|
|
1895
|
-
});
|
|
1896
|
-
}
|
|
1897
|
-
|
|
1898
|
-
/** @returns {SharedCartResponse} */
|
|
1899
|
-
static SharedCartResponse() {
|
|
1900
|
-
return Joi.object({
|
|
1901
|
-
error: Joi.string().allow(""),
|
|
1902
|
-
cart: PosCartApplicationModel.SharedCart(),
|
|
1903
|
-
});
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1906
|
-
module.exports = PosCartApplicationModel;
|