@gofynd/fdk-client-javascript 1.1.2 → 1.1.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 -2
- package/index.d.ts +4 -7
- package/index.js +5 -12
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +20 -20
- package/sdk/application/ApplicationClient.js +26 -26
- package/sdk/application/Cart/CartApplicationClient.d.ts +36 -6
- package/sdk/application/Cart/CartApplicationClient.js +105 -10
- package/sdk/application/Cart/CartApplicationModel.d.ts +9 -0
- package/sdk/application/Cart/CartApplicationModel.js +105 -1
- package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -0
- package/sdk/application/Cart/CartApplicationValidator.js +15 -1
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +3 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +2 -2
- package/sdk/application/Order/OrderApplicationClient.js +2 -2
- package/sdk/application/Order/OrderApplicationModel.js +18 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
- package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
- package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
- package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +6 -0
- package/sdk/application/PosCart/PosCartApplicationModel.js +63 -1
- package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
- package/sdk/application/index.d.ts +10 -10
- package/sdk/application/index.js +13 -13
- package/sdk/common/Constant.d.ts +5 -0
- package/sdk/common/Constant.js +5 -0
- package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +459 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +2480 -340
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +29 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +250 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +52 -0
- package/sdk/platform/Cart/CartPlatformModel.js +580 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +41 -29
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +26 -0
- package/sdk/platform/Content/ContentPlatformModel.js +3 -1
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +159 -79
- package/sdk/platform/Order/OrderPlatformClient.js +541 -114
- package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
- package/sdk/platform/Order/OrderPlatformModel.js +569 -159
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +51 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
- package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
- package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +410 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +1149 -938
- package/sdk/platform/PlatformApplicationClient.js +1259 -1035
- package/sdk/platform/PlatformClient.d.ts +9888 -8286
- package/sdk/platform/PlatformClient.js +10960 -9038
- package/sdk/platform/index.d.ts +15 -14
- package/sdk/platform/index.js +20 -18
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +2 -2
- package/partner.d.ts +0 -4
- package/partner.js +0 -7
- package/sdk/partner/OAuthClient.d.ts +0 -14
- package/sdk/partner/OAuthClient.js +0 -112
- package/sdk/partner/PartnerAPIClient.d.ts +0 -12
- package/sdk/partner/PartnerAPIClient.js +0 -42
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -17
- package/sdk/partner/PartnerConfig.d.ts +0 -30
- package/sdk/partner/PartnerConfig.js +0 -39
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -5
|
@@ -77,6 +77,7 @@ class CartModel {
|
|
|
77
77
|
static AddCartRequest() {
|
|
78
78
|
return Joi.object({
|
|
79
79
|
items: Joi.array().items(CartModel.AddProductCart()),
|
|
80
|
+
new_cart: Joi.boolean(),
|
|
80
81
|
});
|
|
81
82
|
}
|
|
82
83
|
static AddProductCart() {
|
|
@@ -88,6 +89,7 @@ class CartModel {
|
|
|
88
89
|
extra_meta: Joi.any(),
|
|
89
90
|
item_id: Joi.number(),
|
|
90
91
|
item_size: Joi.string().allow(""),
|
|
92
|
+
meta: Joi.any(),
|
|
91
93
|
parent_item_identifiers: Joi.array().items(
|
|
92
94
|
Joi.object().pattern(/\S/, Joi.string().allow(""))
|
|
93
95
|
),
|
|
@@ -122,6 +124,11 @@ class CartModel {
|
|
|
122
124
|
promotion_type: Joi.string().allow(""),
|
|
123
125
|
});
|
|
124
126
|
}
|
|
127
|
+
static ApplyCouponRequest() {
|
|
128
|
+
return Joi.object({
|
|
129
|
+
coupon_code: Joi.string().allow("").required(),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
125
132
|
static ArticlePriceInfo() {
|
|
126
133
|
return Joi.object({
|
|
127
134
|
base: CartModel.BasePrice(),
|
|
@@ -161,12 +168,30 @@ class CartModel {
|
|
|
161
168
|
raw: CartModel.RawBreakup(),
|
|
162
169
|
});
|
|
163
170
|
}
|
|
171
|
+
static CartCheckoutResponse() {
|
|
172
|
+
return Joi.object({
|
|
173
|
+
app_intercept_url: Joi.string().allow(""),
|
|
174
|
+
callback_url: Joi.string().allow(""),
|
|
175
|
+
cart: CartModel.CheckCart(),
|
|
176
|
+
data: Joi.any(),
|
|
177
|
+
message: Joi.string().allow(""),
|
|
178
|
+
order_id: Joi.string().allow(""),
|
|
179
|
+
payment_confirm_url: Joi.string().allow(""),
|
|
180
|
+
success: Joi.boolean(),
|
|
181
|
+
});
|
|
182
|
+
}
|
|
164
183
|
static CartCurrency() {
|
|
165
184
|
return Joi.object({
|
|
166
185
|
code: Joi.string().allow(""),
|
|
167
186
|
symbol: Joi.string().allow(""),
|
|
168
187
|
});
|
|
169
188
|
}
|
|
189
|
+
static CartDeliveryModesResponse() {
|
|
190
|
+
return Joi.object({
|
|
191
|
+
available_modes: Joi.array().items(Joi.string().allow("")),
|
|
192
|
+
pickup_stores: Joi.array().items(Joi.number()),
|
|
193
|
+
});
|
|
194
|
+
}
|
|
170
195
|
static CartDetailResponse() {
|
|
171
196
|
return Joi.object({
|
|
172
197
|
applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
|
|
@@ -184,6 +209,8 @@ class CartModel {
|
|
|
184
209
|
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
185
210
|
last_modified: Joi.string().allow(""),
|
|
186
211
|
message: Joi.string().allow(""),
|
|
212
|
+
pan_config: Joi.any(),
|
|
213
|
+
pan_no: Joi.string().allow(""),
|
|
187
214
|
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
188
215
|
restrict_checkout: Joi.boolean(),
|
|
189
216
|
});
|
|
@@ -195,12 +222,27 @@ class CartModel {
|
|
|
195
222
|
size: Joi.string().allow("").required(),
|
|
196
223
|
});
|
|
197
224
|
}
|
|
225
|
+
static CartItemCountResponse() {
|
|
226
|
+
return Joi.object({
|
|
227
|
+
user_cart_items_count: Joi.number(),
|
|
228
|
+
});
|
|
229
|
+
}
|
|
198
230
|
static CartItemMeta() {
|
|
199
231
|
return Joi.object({
|
|
200
232
|
group_id: Joi.string().allow(""),
|
|
201
233
|
primary_item: Joi.boolean(),
|
|
202
234
|
});
|
|
203
235
|
}
|
|
236
|
+
static CartList() {
|
|
237
|
+
return Joi.object({
|
|
238
|
+
cart_id: Joi.string().allow(""),
|
|
239
|
+
cart_value: Joi.number(),
|
|
240
|
+
created_on: Joi.string().allow(""),
|
|
241
|
+
item_counts: Joi.number(),
|
|
242
|
+
pick_up_customer_details: Joi.any(),
|
|
243
|
+
user_id: Joi.string().allow(""),
|
|
244
|
+
});
|
|
245
|
+
}
|
|
204
246
|
static CartMetaConfigAdd() {
|
|
205
247
|
return Joi.object({
|
|
206
248
|
bulk_coupons: Joi.boolean(),
|
|
@@ -225,14 +267,29 @@ class CartModel {
|
|
|
225
267
|
revenue_engine_coupon: Joi.boolean(),
|
|
226
268
|
});
|
|
227
269
|
}
|
|
270
|
+
static CartMetaMissingResponse() {
|
|
271
|
+
return Joi.object({
|
|
272
|
+
errors: Joi.array().items(Joi.string().allow("")),
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
static CartMetaResponse() {
|
|
276
|
+
return Joi.object({
|
|
277
|
+
is_valid: Joi.boolean(),
|
|
278
|
+
message: Joi.string().allow(""),
|
|
279
|
+
});
|
|
280
|
+
}
|
|
228
281
|
static CartProduct() {
|
|
229
282
|
return Joi.object({
|
|
283
|
+
_custom_json: Joi.any(),
|
|
230
284
|
action: CartModel.ProductAction(),
|
|
231
285
|
brand: CartModel.BaseInfo(),
|
|
232
286
|
categories: Joi.array().items(CartModel.CategoryInfo()),
|
|
233
287
|
images: Joi.array().items(CartModel.ProductImage()),
|
|
288
|
+
item_code: Joi.string().allow("").allow(null),
|
|
234
289
|
name: Joi.string().allow(""),
|
|
235
290
|
slug: Joi.string().allow(""),
|
|
291
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
292
|
+
teaser_tag: CartModel.Tags(),
|
|
236
293
|
type: Joi.string().allow(""),
|
|
237
294
|
uid: Joi.number(),
|
|
238
295
|
});
|
|
@@ -247,7 +304,9 @@ class CartModel {
|
|
|
247
304
|
article: CartModel.ProductArticle(),
|
|
248
305
|
availability: CartModel.ProductAvailability(),
|
|
249
306
|
bulk_offer: Joi.any(),
|
|
307
|
+
coupon: CartModel.CouponDetails(),
|
|
250
308
|
coupon_message: Joi.string().allow(""),
|
|
309
|
+
custom_order: Joi.any(),
|
|
251
310
|
delivery_promise: CartModel.ShipmentPromise(),
|
|
252
311
|
discount: Joi.string().allow(""),
|
|
253
312
|
identifiers: CartModel.CartProductIdentifer().required(),
|
|
@@ -276,6 +335,39 @@ class CartModel {
|
|
|
276
335
|
threshold: Joi.number(),
|
|
277
336
|
});
|
|
278
337
|
}
|
|
338
|
+
static CheckCart() {
|
|
339
|
+
return Joi.object({
|
|
340
|
+
breakup_values: CartModel.CartBreakup(),
|
|
341
|
+
buy_now: Joi.boolean(),
|
|
342
|
+
cart_id: Joi.number(),
|
|
343
|
+
checkout_mode: Joi.string().allow(""),
|
|
344
|
+
cod_available: Joi.boolean(),
|
|
345
|
+
cod_charges: Joi.number(),
|
|
346
|
+
cod_message: Joi.string().allow(""),
|
|
347
|
+
comment: Joi.string().allow(""),
|
|
348
|
+
coupon_text: Joi.string().allow(""),
|
|
349
|
+
currency: CartModel.CartCurrency(),
|
|
350
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
351
|
+
delivery_charge_order_value: Joi.number(),
|
|
352
|
+
delivery_charges: Joi.number(),
|
|
353
|
+
delivery_promise: CartModel.ShipmentPromise(),
|
|
354
|
+
error_message: Joi.string().allow(""),
|
|
355
|
+
gstin: Joi.string().allow(""),
|
|
356
|
+
id: Joi.string().allow(""),
|
|
357
|
+
is_valid: Joi.boolean(),
|
|
358
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
359
|
+
last_modified: Joi.string().allow(""),
|
|
360
|
+
message: Joi.string().allow(""),
|
|
361
|
+
order_id: Joi.string().allow(""),
|
|
362
|
+
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
363
|
+
restrict_checkout: Joi.boolean(),
|
|
364
|
+
store_code: Joi.string().allow(""),
|
|
365
|
+
store_emps: Joi.array().items(Joi.any()),
|
|
366
|
+
success: Joi.boolean(),
|
|
367
|
+
uid: Joi.string().allow(""),
|
|
368
|
+
user_type: Joi.string().allow(""),
|
|
369
|
+
});
|
|
370
|
+
}
|
|
279
371
|
static CompareObject() {
|
|
280
372
|
return Joi.object({
|
|
281
373
|
equals: Joi.number(),
|
|
@@ -285,6 +377,22 @@ class CartModel {
|
|
|
285
377
|
less_than_equals: Joi.number(),
|
|
286
378
|
});
|
|
287
379
|
}
|
|
380
|
+
static Coupon() {
|
|
381
|
+
return Joi.object({
|
|
382
|
+
coupon_code: Joi.string().allow(""),
|
|
383
|
+
coupon_type: Joi.string().allow("").allow(null),
|
|
384
|
+
coupon_value: Joi.number(),
|
|
385
|
+
description: Joi.string().allow("").allow(null),
|
|
386
|
+
expires_on: Joi.string().allow(""),
|
|
387
|
+
is_applicable: Joi.boolean(),
|
|
388
|
+
is_applied: Joi.boolean(),
|
|
389
|
+
max_discount_value: Joi.number(),
|
|
390
|
+
message: Joi.string().allow(""),
|
|
391
|
+
minimum_cart_value: Joi.number(),
|
|
392
|
+
sub_title: Joi.string().allow(""),
|
|
393
|
+
title: Joi.string().allow(""),
|
|
394
|
+
});
|
|
395
|
+
}
|
|
288
396
|
static CouponAction() {
|
|
289
397
|
return Joi.object({
|
|
290
398
|
action_date: Joi.string().allow("").allow(null),
|
|
@@ -340,6 +448,13 @@ class CartModel {
|
|
|
340
448
|
modified_on: Joi.string().allow("").allow(null),
|
|
341
449
|
});
|
|
342
450
|
}
|
|
451
|
+
static CouponDetails() {
|
|
452
|
+
return Joi.object({
|
|
453
|
+
code: Joi.string().allow(""),
|
|
454
|
+
discount_single_quantity: Joi.number(),
|
|
455
|
+
discount_total_quantity: Joi.number(),
|
|
456
|
+
});
|
|
457
|
+
}
|
|
343
458
|
static CouponPartialUpdate() {
|
|
344
459
|
return Joi.object({
|
|
345
460
|
archive: Joi.boolean(),
|
|
@@ -381,6 +496,33 @@ class CartModel {
|
|
|
381
496
|
validity: CartModel.Validity().required(),
|
|
382
497
|
});
|
|
383
498
|
}
|
|
499
|
+
static CouponValidity() {
|
|
500
|
+
return Joi.object({
|
|
501
|
+
code: Joi.string().allow("").allow(null),
|
|
502
|
+
discount: Joi.number(),
|
|
503
|
+
display_message_en: Joi.string().allow("").allow(null),
|
|
504
|
+
next_validation_required: Joi.boolean().allow(null),
|
|
505
|
+
title: Joi.string().allow(""),
|
|
506
|
+
valid: Joi.boolean(),
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
static DeleteAddressResponse() {
|
|
510
|
+
return Joi.object({
|
|
511
|
+
id: Joi.string().allow(""),
|
|
512
|
+
is_deleted: Joi.boolean(),
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
static DeleteCartDetailResponse() {
|
|
516
|
+
return Joi.object({
|
|
517
|
+
message: Joi.string().allow(""),
|
|
518
|
+
success: Joi.boolean(),
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
static DeleteCartRequest() {
|
|
522
|
+
return Joi.object({
|
|
523
|
+
cart_id_list: Joi.array().items(Joi.string().allow("")),
|
|
524
|
+
});
|
|
525
|
+
}
|
|
384
526
|
static DeliveryCharges() {
|
|
385
527
|
return Joi.object({
|
|
386
528
|
charges: Joi.array().items(CartModel.Charges()),
|
|
@@ -441,6 +583,7 @@ class CartModel {
|
|
|
441
583
|
return Joi.object({
|
|
442
584
|
description: Joi.string().allow(""),
|
|
443
585
|
name: Joi.string().allow(""),
|
|
586
|
+
offer_label: Joi.string().allow(""),
|
|
444
587
|
offer_text: Joi.string().allow(""),
|
|
445
588
|
});
|
|
446
589
|
}
|
|
@@ -450,6 +593,12 @@ class CartModel {
|
|
|
450
593
|
title: Joi.string().allow(""),
|
|
451
594
|
});
|
|
452
595
|
}
|
|
596
|
+
static Files() {
|
|
597
|
+
return Joi.object({
|
|
598
|
+
key: Joi.string().allow("").required(),
|
|
599
|
+
values: Joi.array().items(Joi.string().allow("")).required(),
|
|
600
|
+
});
|
|
601
|
+
}
|
|
453
602
|
static FreeGiftItem() {
|
|
454
603
|
return Joi.object({
|
|
455
604
|
item_brand_name: Joi.string().allow(""),
|
|
@@ -460,6 +609,30 @@ class CartModel {
|
|
|
460
609
|
item_slug: Joi.string().allow(""),
|
|
461
610
|
});
|
|
462
611
|
}
|
|
612
|
+
static GeoLocation() {
|
|
613
|
+
return Joi.object({
|
|
614
|
+
latitude: Joi.number(),
|
|
615
|
+
longitude: Joi.number(),
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
static GetCouponResponse() {
|
|
619
|
+
return Joi.object({
|
|
620
|
+
available_coupon_list: Joi.array().items(CartModel.Coupon()),
|
|
621
|
+
page: CartModel.PageCoupon(),
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
static GetShareCartLinkRequest() {
|
|
625
|
+
return Joi.object({
|
|
626
|
+
id: Joi.string().allow(""),
|
|
627
|
+
meta: Joi.any(),
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
static GetShareCartLinkResponse() {
|
|
631
|
+
return Joi.object({
|
|
632
|
+
share_url: Joi.string().allow(""),
|
|
633
|
+
token: Joi.string().allow(""),
|
|
634
|
+
});
|
|
635
|
+
}
|
|
463
636
|
static Identifier() {
|
|
464
637
|
return Joi.object({
|
|
465
638
|
article_id: Joi.array().items(Joi.string().allow("")),
|
|
@@ -467,6 +640,7 @@ class CartModel {
|
|
|
467
640
|
category_id: Joi.array().items(Joi.number()),
|
|
468
641
|
collection_id: Joi.array().items(Joi.string().allow("")),
|
|
469
642
|
company_id: Joi.array().items(Joi.number()),
|
|
643
|
+
email_domain: Joi.array().items(Joi.string().allow("")),
|
|
470
644
|
exclude_brand_id: Joi.array().items(Joi.number()),
|
|
471
645
|
item_id: Joi.array().items(Joi.number()),
|
|
472
646
|
store_id: Joi.array().items(Joi.number()),
|
|
@@ -485,16 +659,23 @@ class CartModel {
|
|
|
485
659
|
item_brand: Joi.array().items(Joi.number()),
|
|
486
660
|
item_category: Joi.array().items(Joi.number()),
|
|
487
661
|
item_company: Joi.array().items(Joi.number()),
|
|
662
|
+
item_department: Joi.array().items(Joi.number()),
|
|
488
663
|
item_exclude_brand: Joi.array().items(Joi.number()),
|
|
489
664
|
item_exclude_category: Joi.array().items(Joi.number()),
|
|
490
665
|
item_exclude_company: Joi.array().items(Joi.number()),
|
|
666
|
+
item_exclude_department: Joi.array().items(Joi.number()),
|
|
491
667
|
item_exclude_id: Joi.array().items(Joi.number()),
|
|
668
|
+
item_exclude_l1_category: Joi.array().items(Joi.number()),
|
|
669
|
+
item_exclude_l2_category: Joi.array().items(Joi.number()),
|
|
492
670
|
item_exclude_sku: Joi.array().items(Joi.string().allow("")),
|
|
493
671
|
item_exclude_store: Joi.array().items(Joi.number()),
|
|
494
672
|
item_id: Joi.array().items(Joi.number()),
|
|
673
|
+
item_l1_category: Joi.array().items(Joi.number()),
|
|
674
|
+
item_l2_category: Joi.array().items(Joi.number()),
|
|
495
675
|
item_size: Joi.array().items(Joi.string().allow("")),
|
|
496
676
|
item_sku: Joi.array().items(Joi.string().allow("")),
|
|
497
677
|
item_store: Joi.array().items(Joi.number()),
|
|
678
|
+
item_tags: Joi.array().items(Joi.string().allow("")),
|
|
498
679
|
});
|
|
499
680
|
}
|
|
500
681
|
static LoyaltyPoints() {
|
|
@@ -505,6 +686,12 @@ class CartModel {
|
|
|
505
686
|
total: Joi.number(),
|
|
506
687
|
});
|
|
507
688
|
}
|
|
689
|
+
static MultiCartResponse() {
|
|
690
|
+
return Joi.object({
|
|
691
|
+
data: Joi.array().items(CartModel.CartList()),
|
|
692
|
+
success: Joi.boolean(),
|
|
693
|
+
});
|
|
694
|
+
}
|
|
508
695
|
static MultiTenderPaymentMeta() {
|
|
509
696
|
return Joi.object({
|
|
510
697
|
current_status: Joi.string().allow("").allow(null),
|
|
@@ -702,6 +889,15 @@ class CartModel {
|
|
|
702
889
|
type: Joi.string().allow("").required(),
|
|
703
890
|
});
|
|
704
891
|
}
|
|
892
|
+
static PageCoupon() {
|
|
893
|
+
return Joi.object({
|
|
894
|
+
current: Joi.number(),
|
|
895
|
+
has_next: Joi.boolean(),
|
|
896
|
+
has_previous: Joi.boolean(),
|
|
897
|
+
total: Joi.number(),
|
|
898
|
+
total_item_count: Joi.number(),
|
|
899
|
+
});
|
|
900
|
+
}
|
|
705
901
|
static PaymentAllowValue() {
|
|
706
902
|
return Joi.object({
|
|
707
903
|
max: Joi.number(),
|
|
@@ -712,9 +908,34 @@ class CartModel {
|
|
|
712
908
|
max: Joi.number(),
|
|
713
909
|
});
|
|
714
910
|
}
|
|
911
|
+
static PaymentCouponValidate() {
|
|
912
|
+
return Joi.object({
|
|
913
|
+
coupon_validity: CartModel.CouponValidity(),
|
|
914
|
+
message: Joi.string().allow(""),
|
|
915
|
+
success: Joi.boolean().required(),
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
static PaymentMeta() {
|
|
919
|
+
return Joi.object({
|
|
920
|
+
merchant_code: Joi.string().allow(""),
|
|
921
|
+
payment_gateway: Joi.string().allow(""),
|
|
922
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
923
|
+
type: Joi.string().allow(""),
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
static PaymentMethod() {
|
|
927
|
+
return Joi.object({
|
|
928
|
+
amount: Joi.number().allow(null),
|
|
929
|
+
mode: Joi.string().allow("").required(),
|
|
930
|
+
name: Joi.string().allow(""),
|
|
931
|
+
payment: Joi.string().allow(""),
|
|
932
|
+
payment_meta: CartModel.PaymentMeta().required(),
|
|
933
|
+
});
|
|
934
|
+
}
|
|
715
935
|
static PaymentModes() {
|
|
716
936
|
return Joi.object({
|
|
717
937
|
codes: Joi.array().items(Joi.string().allow("")),
|
|
938
|
+
iins: Joi.array().items(Joi.string().allow("")),
|
|
718
939
|
networks: Joi.array().items(Joi.string().allow("")),
|
|
719
940
|
types: Joi.array().items(Joi.string().allow("")),
|
|
720
941
|
uses: CartModel.PaymentAllowValue(),
|
|
@@ -727,6 +948,192 @@ class CartModel {
|
|
|
727
948
|
payment_identifier: Joi.string().allow(""),
|
|
728
949
|
});
|
|
729
950
|
}
|
|
951
|
+
static PickupStoreDetail() {
|
|
952
|
+
return Joi.object({
|
|
953
|
+
address: Joi.string().allow(""),
|
|
954
|
+
address_type: Joi.string().allow(""),
|
|
955
|
+
area: Joi.string().allow(""),
|
|
956
|
+
area_code: Joi.string().allow(""),
|
|
957
|
+
area_code_slug: Joi.string().allow(""),
|
|
958
|
+
city: Joi.string().allow(""),
|
|
959
|
+
country: Joi.string().allow(""),
|
|
960
|
+
email: Joi.string().allow(""),
|
|
961
|
+
id: Joi.number(),
|
|
962
|
+
landmark: Joi.string().allow(""),
|
|
963
|
+
name: Joi.string().allow(""),
|
|
964
|
+
phone: Joi.string().allow(""),
|
|
965
|
+
pincode: Joi.number(),
|
|
966
|
+
state: Joi.string().allow(""),
|
|
967
|
+
store_code: Joi.string().allow(""),
|
|
968
|
+
uid: Joi.number(),
|
|
969
|
+
});
|
|
970
|
+
}
|
|
971
|
+
static PlatformAddCartRequest() {
|
|
972
|
+
return Joi.object({
|
|
973
|
+
items: Joi.array().items(CartModel.AddProductCart()),
|
|
974
|
+
new_cart: Joi.boolean(),
|
|
975
|
+
user_id: Joi.string().allow(""),
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
static PlatformAddress() {
|
|
979
|
+
return Joi.object({
|
|
980
|
+
address: Joi.string().allow(""),
|
|
981
|
+
address_type: Joi.string().allow(""),
|
|
982
|
+
area: Joi.string().allow(""),
|
|
983
|
+
area_code: Joi.string().allow(""),
|
|
984
|
+
area_code_slug: Joi.string().allow(""),
|
|
985
|
+
cart_id: Joi.string().allow(""),
|
|
986
|
+
checkout_mode: Joi.string().allow(""),
|
|
987
|
+
city: Joi.string().allow(""),
|
|
988
|
+
country: Joi.string().allow(""),
|
|
989
|
+
country_code: Joi.string().allow(""),
|
|
990
|
+
created_by_user_id: Joi.string().allow(""),
|
|
991
|
+
email: Joi.string().allow(""),
|
|
992
|
+
geo_location: CartModel.GeoLocation(),
|
|
993
|
+
google_map_point: Joi.any(),
|
|
994
|
+
id: Joi.string().allow(""),
|
|
995
|
+
is_active: Joi.boolean(),
|
|
996
|
+
is_default_address: Joi.boolean(),
|
|
997
|
+
landmark: Joi.string().allow(""),
|
|
998
|
+
meta: Joi.any(),
|
|
999
|
+
name: Joi.string().allow(""),
|
|
1000
|
+
phone: Joi.string().allow(""),
|
|
1001
|
+
state: Joi.string().allow(""),
|
|
1002
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
1003
|
+
user_id: Joi.string().allow(""),
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
static PlatformCartCheckoutDetailRequest() {
|
|
1007
|
+
return Joi.object({
|
|
1008
|
+
address_id: Joi.string().allow(""),
|
|
1009
|
+
aggregator: Joi.string().allow(""),
|
|
1010
|
+
billing_address: Joi.any(),
|
|
1011
|
+
billing_address_id: Joi.string().allow(""),
|
|
1012
|
+
callback_url: Joi.string().allow("").allow(null),
|
|
1013
|
+
checkout_mode: Joi.string().allow(""),
|
|
1014
|
+
delivery_address: Joi.any(),
|
|
1015
|
+
device_id: Joi.string().allow("").allow(null),
|
|
1016
|
+
employee_code: Joi.string().allow("").allow(null),
|
|
1017
|
+
extra_meta: Joi.any(),
|
|
1018
|
+
files: Joi.array().items(CartModel.Files()),
|
|
1019
|
+
id: Joi.string().allow("").required(),
|
|
1020
|
+
merchant_code: Joi.string().allow(""),
|
|
1021
|
+
meta: Joi.any(),
|
|
1022
|
+
order_type: Joi.string().allow("").required(),
|
|
1023
|
+
ordering_store: Joi.number().allow(null),
|
|
1024
|
+
payment_auto_confirm: Joi.boolean(),
|
|
1025
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
1026
|
+
payment_mode: Joi.string().allow("").required(),
|
|
1027
|
+
payment_params: Joi.any().allow(null),
|
|
1028
|
+
pick_at_store_uid: Joi.number().allow(null),
|
|
1029
|
+
pos: Joi.boolean(),
|
|
1030
|
+
staff: CartModel.StaffCheckout(),
|
|
1031
|
+
user_id: Joi.string().allow("").required(),
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
static PlatformCartCheckoutDetailV2Request() {
|
|
1035
|
+
return Joi.object({
|
|
1036
|
+
address_id: Joi.string().allow(""),
|
|
1037
|
+
aggregator: Joi.string().allow(""),
|
|
1038
|
+
billing_address: Joi.any(),
|
|
1039
|
+
billing_address_id: Joi.string().allow(""),
|
|
1040
|
+
callback_url: Joi.string().allow("").allow(null),
|
|
1041
|
+
checkout_mode: Joi.string().allow(""),
|
|
1042
|
+
custom_meta: Joi.any(),
|
|
1043
|
+
delivery_address: Joi.any(),
|
|
1044
|
+
device_id: Joi.string().allow("").allow(null),
|
|
1045
|
+
employee_code: Joi.string().allow("").allow(null),
|
|
1046
|
+
extra_meta: Joi.any(),
|
|
1047
|
+
files: Joi.array().items(CartModel.Files()),
|
|
1048
|
+
id: Joi.string().allow("").required(),
|
|
1049
|
+
merchant_code: Joi.string().allow(""),
|
|
1050
|
+
meta: Joi.any(),
|
|
1051
|
+
order_type: Joi.string().allow("").required(),
|
|
1052
|
+
ordering_store: Joi.number().allow(null),
|
|
1053
|
+
payment_auto_confirm: Joi.boolean(),
|
|
1054
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
1055
|
+
payment_methods: Joi.array().items(CartModel.PaymentMethod()).required(),
|
|
1056
|
+
payment_mode: Joi.string().allow(""),
|
|
1057
|
+
payment_params: Joi.any().allow(null),
|
|
1058
|
+
pick_at_store_uid: Joi.number().allow(null),
|
|
1059
|
+
pos: Joi.boolean(),
|
|
1060
|
+
staff: CartModel.StaffCheckout(),
|
|
1061
|
+
user_id: Joi.string().allow("").required(),
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
static PlatformCartMetaRequest() {
|
|
1065
|
+
return Joi.object({
|
|
1066
|
+
checkout_mode: Joi.string().allow(""),
|
|
1067
|
+
comment: Joi.string().allow(""),
|
|
1068
|
+
gift_details: Joi.any().allow(null),
|
|
1069
|
+
gstin: Joi.string().allow(""),
|
|
1070
|
+
pan_no: Joi.string().allow(""),
|
|
1071
|
+
pick_up_customer_details: Joi.any(),
|
|
1072
|
+
staff_user_id: Joi.string().allow("").allow(null),
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
static PlatformCartShipmentsResponse() {
|
|
1076
|
+
return Joi.object({
|
|
1077
|
+
applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
|
|
1078
|
+
breakup_values: CartModel.CartBreakup(),
|
|
1079
|
+
buy_now: Joi.boolean(),
|
|
1080
|
+
checkout_mode: Joi.string().allow(""),
|
|
1081
|
+
comment: Joi.string().allow(""),
|
|
1082
|
+
coupon_text: Joi.string().allow(""),
|
|
1083
|
+
currency: CartModel.CartCurrency(),
|
|
1084
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
1085
|
+
delivery_promise: CartModel.ShipmentPromise(),
|
|
1086
|
+
error: Joi.boolean(),
|
|
1087
|
+
gstin: Joi.string().allow(""),
|
|
1088
|
+
id: Joi.string().allow(""),
|
|
1089
|
+
is_valid: Joi.boolean(),
|
|
1090
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
1091
|
+
last_modified: Joi.string().allow(""),
|
|
1092
|
+
message: Joi.string().allow(""),
|
|
1093
|
+
pan_config: Joi.any(),
|
|
1094
|
+
pan_no: Joi.string().allow(""),
|
|
1095
|
+
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
1096
|
+
restrict_checkout: Joi.boolean(),
|
|
1097
|
+
shipments: Joi.array().items(CartModel.PlatformShipmentResponse()),
|
|
1098
|
+
staff_user_id: Joi.string().allow("").allow(null),
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1101
|
+
static PlatformGetAddressesResponse() {
|
|
1102
|
+
return Joi.object({
|
|
1103
|
+
address: Joi.array().items(CartModel.PlatformAddress()),
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
static PlatformSelectCartAddressRequest() {
|
|
1107
|
+
return Joi.object({
|
|
1108
|
+
billing_address_id: Joi.string().allow(""),
|
|
1109
|
+
cart_id: Joi.string().allow(""),
|
|
1110
|
+
checkout_mode: Joi.string().allow(""),
|
|
1111
|
+
id: Joi.string().allow(""),
|
|
1112
|
+
user_id: Joi.string().allow(""),
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
static PlatformShipmentResponse() {
|
|
1116
|
+
return Joi.object({
|
|
1117
|
+
articles: Joi.array().items(CartModel.ShipmentArticle()),
|
|
1118
|
+
box_type: Joi.string().allow("").allow(null),
|
|
1119
|
+
dp_id: Joi.string().allow("").allow(null),
|
|
1120
|
+
dp_options: Joi.any().allow(null),
|
|
1121
|
+
fulfillment_id: Joi.number(),
|
|
1122
|
+
fulfillment_type: Joi.string().allow(""),
|
|
1123
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
1124
|
+
order_type: Joi.string().allow(""),
|
|
1125
|
+
promise: CartModel.ShipmentPromise(),
|
|
1126
|
+
shipment_type: Joi.string().allow(""),
|
|
1127
|
+
shipments: Joi.number(),
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
static PlatformUpdateCartRequest() {
|
|
1131
|
+
return Joi.object({
|
|
1132
|
+
items: Joi.array().items(CartModel.UpdateProductCart()),
|
|
1133
|
+
operation: Joi.string().allow("").required(),
|
|
1134
|
+
user_id: Joi.string().allow(""),
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
730
1137
|
static PostOrder() {
|
|
731
1138
|
return Joi.object({
|
|
732
1139
|
cancellation_allowed: Joi.boolean(),
|
|
@@ -755,8 +1162,13 @@ class CartModel {
|
|
|
755
1162
|
static ProductArticle() {
|
|
756
1163
|
return Joi.object({
|
|
757
1164
|
_custom_json: Joi.any(),
|
|
1165
|
+
cart_item_meta: Joi.any(),
|
|
758
1166
|
extra_meta: Joi.any(),
|
|
1167
|
+
gift_card: Joi.any(),
|
|
759
1168
|
identifier: Joi.any(),
|
|
1169
|
+
is_gift_visible: Joi.boolean(),
|
|
1170
|
+
meta: Joi.any(),
|
|
1171
|
+
mto_quantity: Joi.number(),
|
|
760
1172
|
parent_item_identifiers: Joi.any(),
|
|
761
1173
|
price: CartModel.ArticlePriceInfo(),
|
|
762
1174
|
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
@@ -764,7 +1176,7 @@ class CartModel {
|
|
|
764
1176
|
seller: CartModel.BaseInfo(),
|
|
765
1177
|
seller_identifier: Joi.string().allow(""),
|
|
766
1178
|
size: Joi.string().allow(""),
|
|
767
|
-
store: CartModel.
|
|
1179
|
+
store: CartModel.StoreInfo(),
|
|
768
1180
|
type: Joi.string().allow(""),
|
|
769
1181
|
uid: Joi.string().allow(""),
|
|
770
1182
|
});
|
|
@@ -917,7 +1329,7 @@ class CartModel {
|
|
|
917
1329
|
return Joi.object({
|
|
918
1330
|
cron: Joi.string().allow("").allow(null),
|
|
919
1331
|
duration: Joi.number().allow(null),
|
|
920
|
-
end: Joi.string().allow("").
|
|
1332
|
+
end: Joi.string().allow("").required(),
|
|
921
1333
|
next_schedule: Joi.array().items(Joi.any()),
|
|
922
1334
|
published: Joi.boolean().required(),
|
|
923
1335
|
start: Joi.string().allow("").required(),
|
|
@@ -965,6 +1377,7 @@ class CartModel {
|
|
|
965
1377
|
delivery_charge: Joi.number(),
|
|
966
1378
|
discount: Joi.number(),
|
|
967
1379
|
fynd_cash: Joi.number(),
|
|
1380
|
+
gift_card: Joi.number(),
|
|
968
1381
|
gst_charges: Joi.number(),
|
|
969
1382
|
mrp_total: Joi.number(),
|
|
970
1383
|
subtotal: Joi.number(),
|
|
@@ -983,6 +1396,7 @@ class CartModel {
|
|
|
983
1396
|
post_order: CartModel.PostOrder(),
|
|
984
1397
|
price_range: CartModel.PriceRange(),
|
|
985
1398
|
user_groups: Joi.array().items(Joi.number()),
|
|
1399
|
+
user_type: Joi.string().allow(""),
|
|
986
1400
|
uses: CartModel.UsesRestriction(),
|
|
987
1401
|
});
|
|
988
1402
|
}
|
|
@@ -1021,6 +1435,58 @@ class CartModel {
|
|
|
1021
1435
|
value_type: Joi.string().allow("").required(),
|
|
1022
1436
|
});
|
|
1023
1437
|
}
|
|
1438
|
+
static SaveAddressResponse() {
|
|
1439
|
+
return Joi.object({
|
|
1440
|
+
id: Joi.string().allow(""),
|
|
1441
|
+
is_default_address: Joi.boolean(),
|
|
1442
|
+
success: Joi.boolean(),
|
|
1443
|
+
});
|
|
1444
|
+
}
|
|
1445
|
+
static SharedCart() {
|
|
1446
|
+
return Joi.object({
|
|
1447
|
+
breakup_values: CartModel.CartBreakup(),
|
|
1448
|
+
buy_now: Joi.boolean(),
|
|
1449
|
+
cart_id: Joi.number(),
|
|
1450
|
+
checkout_mode: Joi.string().allow(""),
|
|
1451
|
+
comment: Joi.string().allow(""),
|
|
1452
|
+
coupon_text: Joi.string().allow(""),
|
|
1453
|
+
currency: CartModel.CartCurrency(),
|
|
1454
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
1455
|
+
delivery_promise: CartModel.ShipmentPromise(),
|
|
1456
|
+
gstin: Joi.string().allow(""),
|
|
1457
|
+
id: Joi.string().allow(""),
|
|
1458
|
+
is_valid: Joi.boolean(),
|
|
1459
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
1460
|
+
last_modified: Joi.string().allow(""),
|
|
1461
|
+
message: Joi.string().allow(""),
|
|
1462
|
+
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
1463
|
+
restrict_checkout: Joi.boolean(),
|
|
1464
|
+
shared_cart_details: CartModel.SharedCartDetails(),
|
|
1465
|
+
uid: Joi.string().allow(""),
|
|
1466
|
+
});
|
|
1467
|
+
}
|
|
1468
|
+
static SharedCartDetails() {
|
|
1469
|
+
return Joi.object({
|
|
1470
|
+
created_on: Joi.string().allow(""),
|
|
1471
|
+
meta: Joi.any(),
|
|
1472
|
+
source: Joi.any(),
|
|
1473
|
+
token: Joi.string().allow(""),
|
|
1474
|
+
user: Joi.any(),
|
|
1475
|
+
});
|
|
1476
|
+
}
|
|
1477
|
+
static SharedCartResponse() {
|
|
1478
|
+
return Joi.object({
|
|
1479
|
+
cart: CartModel.SharedCart(),
|
|
1480
|
+
error: Joi.string().allow(""),
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
static ShipmentArticle() {
|
|
1484
|
+
return Joi.object({
|
|
1485
|
+
article_id: Joi.string().allow(""),
|
|
1486
|
+
meta: Joi.string().allow(""),
|
|
1487
|
+
quantity: Joi.string().allow(""),
|
|
1488
|
+
});
|
|
1489
|
+
}
|
|
1024
1490
|
static ShipmentPromise() {
|
|
1025
1491
|
return Joi.object({
|
|
1026
1492
|
formatted: CartModel.PromiseFormatted(),
|
|
@@ -1048,6 +1514,15 @@ class CartModel {
|
|
|
1048
1514
|
state: Joi.string().allow("").allow(null),
|
|
1049
1515
|
});
|
|
1050
1516
|
}
|
|
1517
|
+
static StaffCheckout() {
|
|
1518
|
+
return Joi.object({
|
|
1519
|
+
_id: Joi.string().allow("").required(),
|
|
1520
|
+
employee_code: Joi.string().allow(""),
|
|
1521
|
+
first_name: Joi.string().allow("").required(),
|
|
1522
|
+
last_name: Joi.string().allow("").required(),
|
|
1523
|
+
user: Joi.string().allow("").required(),
|
|
1524
|
+
});
|
|
1525
|
+
}
|
|
1051
1526
|
static State() {
|
|
1052
1527
|
return Joi.object({
|
|
1053
1528
|
is_archived: Joi.boolean(),
|
|
@@ -1055,12 +1530,37 @@ class CartModel {
|
|
|
1055
1530
|
is_public: Joi.boolean(),
|
|
1056
1531
|
});
|
|
1057
1532
|
}
|
|
1533
|
+
static StoreDetailsResponse() {
|
|
1534
|
+
return Joi.object({
|
|
1535
|
+
items: Joi.array().items(CartModel.PickupStoreDetail()),
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
static StoreInfo() {
|
|
1539
|
+
return Joi.object({
|
|
1540
|
+
name: Joi.string().allow(""),
|
|
1541
|
+
store_code: Joi.string().allow(""),
|
|
1542
|
+
uid: Joi.number(),
|
|
1543
|
+
});
|
|
1544
|
+
}
|
|
1058
1545
|
static SuccessMessage() {
|
|
1059
1546
|
return Joi.object({
|
|
1060
1547
|
message: Joi.string().allow(""),
|
|
1061
1548
|
success: Joi.boolean(),
|
|
1062
1549
|
});
|
|
1063
1550
|
}
|
|
1551
|
+
static Tags() {
|
|
1552
|
+
return Joi.object({
|
|
1553
|
+
tags: Joi.any(),
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1556
|
+
static UpdateAddressResponse() {
|
|
1557
|
+
return Joi.object({
|
|
1558
|
+
id: Joi.string().allow(""),
|
|
1559
|
+
is_default_address: Joi.boolean(),
|
|
1560
|
+
is_updated: Joi.boolean(),
|
|
1561
|
+
success: Joi.boolean(),
|
|
1562
|
+
});
|
|
1563
|
+
}
|
|
1064
1564
|
static UpdateCartDetailResponse() {
|
|
1065
1565
|
return Joi.object({
|
|
1066
1566
|
cart: CartModel.CartDetailResponse(),
|
|
@@ -1068,12 +1568,47 @@ class CartModel {
|
|
|
1068
1568
|
success: Joi.boolean(),
|
|
1069
1569
|
});
|
|
1070
1570
|
}
|
|
1571
|
+
static UpdateCartPaymentRequest() {
|
|
1572
|
+
return Joi.object({
|
|
1573
|
+
address_id: Joi.string().allow(""),
|
|
1574
|
+
aggregator_name: Joi.string().allow(""),
|
|
1575
|
+
id: Joi.string().allow(""),
|
|
1576
|
+
merchant_code: Joi.string().allow(""),
|
|
1577
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
1578
|
+
payment_mode: Joi.string().allow(""),
|
|
1579
|
+
});
|
|
1580
|
+
}
|
|
1581
|
+
static UpdateCartPaymentRequestV2() {
|
|
1582
|
+
return Joi.object({
|
|
1583
|
+
address_id: Joi.string().allow(""),
|
|
1584
|
+
aggregator_name: Joi.string().allow(""),
|
|
1585
|
+
id: Joi.string().allow(""),
|
|
1586
|
+
merchant_code: Joi.string().allow(""),
|
|
1587
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
1588
|
+
payment_methods: Joi.array().items(CartModel.PaymentMethod()),
|
|
1589
|
+
payment_mode: Joi.string().allow(""),
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1071
1592
|
static UpdateCartRequest() {
|
|
1072
1593
|
return Joi.object({
|
|
1073
1594
|
items: Joi.array().items(CartModel.UpdateProductCart()),
|
|
1074
1595
|
operation: Joi.string().allow("").required(),
|
|
1075
1596
|
});
|
|
1076
1597
|
}
|
|
1598
|
+
static UpdateCartShipmentItem() {
|
|
1599
|
+
return Joi.object({
|
|
1600
|
+
article_uid: Joi.string().allow("").required(),
|
|
1601
|
+
quantity: Joi.number(),
|
|
1602
|
+
shipment_type: Joi.string().allow("").required(),
|
|
1603
|
+
});
|
|
1604
|
+
}
|
|
1605
|
+
static UpdateCartShipmentRequest() {
|
|
1606
|
+
return Joi.object({
|
|
1607
|
+
shipments: Joi.array()
|
|
1608
|
+
.items(CartModel.UpdateCartShipmentItem())
|
|
1609
|
+
.required(),
|
|
1610
|
+
});
|
|
1611
|
+
}
|
|
1077
1612
|
static UpdateProductCart() {
|
|
1078
1613
|
return Joi.object({
|
|
1079
1614
|
_custom_json: Joi.any(),
|
|
@@ -1083,10 +1618,53 @@ class CartModel {
|
|
|
1083
1618
|
item_id: Joi.number(),
|
|
1084
1619
|
item_index: Joi.number(),
|
|
1085
1620
|
item_size: Joi.string().allow(""),
|
|
1621
|
+
meta: Joi.any(),
|
|
1086
1622
|
parent_item_identifiers: Joi.any(),
|
|
1087
1623
|
quantity: Joi.number(),
|
|
1088
1624
|
});
|
|
1089
1625
|
}
|
|
1626
|
+
static UpdateUserCartMapping() {
|
|
1627
|
+
return Joi.object({
|
|
1628
|
+
user_id: Joi.string().allow("").required(),
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1631
|
+
static UserCartMappingResponse() {
|
|
1632
|
+
return Joi.object({
|
|
1633
|
+
applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
|
|
1634
|
+
breakup_values: CartModel.CartBreakup(),
|
|
1635
|
+
buy_now: Joi.boolean(),
|
|
1636
|
+
checkout_mode: Joi.string().allow(""),
|
|
1637
|
+
comment: Joi.string().allow(""),
|
|
1638
|
+
coupon_text: Joi.string().allow(""),
|
|
1639
|
+
currency: CartModel.CartCurrency(),
|
|
1640
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
1641
|
+
delivery_promise: CartModel.ShipmentPromise(),
|
|
1642
|
+
gstin: Joi.string().allow(""),
|
|
1643
|
+
id: Joi.string().allow(""),
|
|
1644
|
+
is_valid: Joi.boolean(),
|
|
1645
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
1646
|
+
last_modified: Joi.string().allow(""),
|
|
1647
|
+
message: Joi.string().allow(""),
|
|
1648
|
+
pan_config: Joi.any(),
|
|
1649
|
+
pan_no: Joi.string().allow(""),
|
|
1650
|
+
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
1651
|
+
restrict_checkout: Joi.boolean(),
|
|
1652
|
+
user: CartModel.UserInfo(),
|
|
1653
|
+
});
|
|
1654
|
+
}
|
|
1655
|
+
static UserInfo() {
|
|
1656
|
+
return Joi.object({
|
|
1657
|
+
_id: Joi.string().allow(""),
|
|
1658
|
+
created_at: Joi.string().allow(""),
|
|
1659
|
+
external_id: Joi.string().allow(""),
|
|
1660
|
+
first_name: Joi.string().allow(""),
|
|
1661
|
+
gender: Joi.string().allow(""),
|
|
1662
|
+
last_name: Joi.string().allow(""),
|
|
1663
|
+
mobile: Joi.string().allow(""),
|
|
1664
|
+
modified_on: Joi.string().allow(""),
|
|
1665
|
+
uid: Joi.string().allow(""),
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1090
1668
|
static UserRegistered() {
|
|
1091
1669
|
return Joi.object({
|
|
1092
1670
|
end: Joi.string().allow("").allow(null),
|