@gofynd/fdk-client-javascript 1.1.1 → 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 +45 -4
- package/sdk/application/Cart/CartApplicationClient.js +169 -9
- package/sdk/application/Cart/CartApplicationModel.d.ts +15 -0
- package/sdk/application/Cart/CartApplicationModel.js +177 -1
- package/sdk/application/Cart/CartApplicationValidator.d.ts +2 -0
- package/sdk/application/Cart/CartApplicationValidator.js +20 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +14 -4
- package/sdk/application/Catalog/CatalogApplicationClient.js +18 -6
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
- package/sdk/application/Catalog/CatalogApplicationValidator.js +2 -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 +4 -1
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -2
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +2 -2
- package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +17 -2
- package/sdk/application/Order/OrderApplicationClient.js +70 -2
- package/sdk/application/Order/OrderApplicationModel.d.ts +17 -0
- package/sdk/application/Order/OrderApplicationModel.js +129 -8
- package/sdk/application/Order/OrderApplicationValidator.d.ts +1 -0
- package/sdk/application/Order/OrderApplicationValidator.js +7 -0
- 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 +10 -0
- package/sdk/application/PosCart/PosCartApplicationModel.js +113 -1
- package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +8 -8
- package/sdk/application/Rewards/RewardsApplicationClient.js +8 -8
- package/sdk/application/index.d.ts +10 -10
- package/sdk/application/index.js +13 -13
- package/sdk/common/AxiosHelper.js +1 -1
- 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 +479 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +2574 -307
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +263 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +61 -0
- package/sdk/platform/Cart/CartPlatformModel.js +697 -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 +4 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +10 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +15 -9
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -2
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +2 -2
- 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 +161 -81
- package/sdk/platform/Order/OrderPlatformClient.js +546 -119
- package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
- package/sdk/platform/Order/OrderPlatformModel.js +570 -158
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +52 -10
- 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 -930
- package/sdk/platform/PlatformApplicationClient.js +1260 -1027
- package/sdk/platform/PlatformClient.d.ts +10360 -8660
- package/sdk/platform/PlatformClient.js +11126 -9093
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +14 -26
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +14 -74
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -1
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -7
- 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
|
@@ -52,6 +52,20 @@ class CartModel {
|
|
|
52
52
|
product_slug: Joi.array().items(Joi.string().allow("")),
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
+
static ActivePromosResponse() {
|
|
56
|
+
return Joi.object({
|
|
57
|
+
created_on: Joi.string().allow(""),
|
|
58
|
+
description: Joi.string().allow(""),
|
|
59
|
+
entity_slug: Joi.string().allow(""),
|
|
60
|
+
entity_type: Joi.string().allow(""),
|
|
61
|
+
example: Joi.string().allow(""),
|
|
62
|
+
is_hidden: Joi.boolean(),
|
|
63
|
+
modified_on: Joi.string().allow(""),
|
|
64
|
+
subtitle: Joi.string().allow(""),
|
|
65
|
+
title: Joi.string().allow(""),
|
|
66
|
+
type: Joi.string().allow(""),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
55
69
|
static AddCartDetailResponse() {
|
|
56
70
|
return Joi.object({
|
|
57
71
|
cart: CartModel.CartDetailResponse(),
|
|
@@ -63,6 +77,7 @@ class CartModel {
|
|
|
63
77
|
static AddCartRequest() {
|
|
64
78
|
return Joi.object({
|
|
65
79
|
items: Joi.array().items(CartModel.AddProductCart()),
|
|
80
|
+
new_cart: Joi.boolean(),
|
|
66
81
|
});
|
|
67
82
|
}
|
|
68
83
|
static AddProductCart() {
|
|
@@ -74,6 +89,7 @@ class CartModel {
|
|
|
74
89
|
extra_meta: Joi.any(),
|
|
75
90
|
item_id: Joi.number(),
|
|
76
91
|
item_size: Joi.string().allow(""),
|
|
92
|
+
meta: Joi.any(),
|
|
77
93
|
parent_item_identifiers: Joi.array().items(
|
|
78
94
|
Joi.object().pattern(/\S/, Joi.string().allow(""))
|
|
79
95
|
),
|
|
@@ -84,17 +100,35 @@ class CartModel {
|
|
|
84
100
|
store_id: Joi.number(),
|
|
85
101
|
});
|
|
86
102
|
}
|
|
103
|
+
static AppliedFreeArticles() {
|
|
104
|
+
return Joi.object({
|
|
105
|
+
article_id: Joi.string().allow(""),
|
|
106
|
+
free_gift_item_details: CartModel.FreeGiftItem(),
|
|
107
|
+
parent_item_identifier: Joi.string().allow(""),
|
|
108
|
+
quantity: Joi.number(),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
87
111
|
static AppliedPromotion() {
|
|
88
112
|
return Joi.object({
|
|
89
113
|
amount: Joi.number(),
|
|
114
|
+
applied_free_articles: Joi.array().items(CartModel.AppliedFreeArticles()),
|
|
90
115
|
article_quantity: Joi.number(),
|
|
116
|
+
buy_rules: Joi.array().items(CartModel.BuyRules()),
|
|
117
|
+
discount_rules: Joi.array().items(CartModel.DiscountRulesApp()),
|
|
91
118
|
mrp_promotion: Joi.boolean(),
|
|
92
119
|
offer_text: Joi.string().allow(""),
|
|
93
120
|
ownership: CartModel.Ownership2(),
|
|
94
121
|
promo_id: Joi.string().allow(""),
|
|
122
|
+
promotion_group: Joi.string().allow(""),
|
|
123
|
+
promotion_name: Joi.string().allow(""),
|
|
95
124
|
promotion_type: Joi.string().allow(""),
|
|
96
125
|
});
|
|
97
126
|
}
|
|
127
|
+
static ApplyCouponRequest() {
|
|
128
|
+
return Joi.object({
|
|
129
|
+
coupon_code: Joi.string().allow("").required(),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
98
132
|
static ArticlePriceInfo() {
|
|
99
133
|
return Joi.object({
|
|
100
134
|
base: CartModel.BasePrice(),
|
|
@@ -120,6 +154,12 @@ class CartModel {
|
|
|
120
154
|
multi_store_allowed: Joi.boolean().required(),
|
|
121
155
|
});
|
|
122
156
|
}
|
|
157
|
+
static BuyRules() {
|
|
158
|
+
return Joi.object({
|
|
159
|
+
cart_conditions: Joi.any(),
|
|
160
|
+
item_criteria: Joi.any(),
|
|
161
|
+
});
|
|
162
|
+
}
|
|
123
163
|
static CartBreakup() {
|
|
124
164
|
return Joi.object({
|
|
125
165
|
coupon: CartModel.CouponBreakup(),
|
|
@@ -128,12 +168,30 @@ class CartModel {
|
|
|
128
168
|
raw: CartModel.RawBreakup(),
|
|
129
169
|
});
|
|
130
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
|
+
}
|
|
131
183
|
static CartCurrency() {
|
|
132
184
|
return Joi.object({
|
|
133
185
|
code: Joi.string().allow(""),
|
|
134
186
|
symbol: Joi.string().allow(""),
|
|
135
187
|
});
|
|
136
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
|
+
}
|
|
137
195
|
static CartDetailResponse() {
|
|
138
196
|
return Joi.object({
|
|
139
197
|
applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
|
|
@@ -151,6 +209,8 @@ class CartModel {
|
|
|
151
209
|
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
152
210
|
last_modified: Joi.string().allow(""),
|
|
153
211
|
message: Joi.string().allow(""),
|
|
212
|
+
pan_config: Joi.any(),
|
|
213
|
+
pan_no: Joi.string().allow(""),
|
|
154
214
|
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
155
215
|
restrict_checkout: Joi.boolean(),
|
|
156
216
|
});
|
|
@@ -162,12 +222,27 @@ class CartModel {
|
|
|
162
222
|
size: Joi.string().allow("").required(),
|
|
163
223
|
});
|
|
164
224
|
}
|
|
225
|
+
static CartItemCountResponse() {
|
|
226
|
+
return Joi.object({
|
|
227
|
+
user_cart_items_count: Joi.number(),
|
|
228
|
+
});
|
|
229
|
+
}
|
|
165
230
|
static CartItemMeta() {
|
|
166
231
|
return Joi.object({
|
|
167
232
|
group_id: Joi.string().allow(""),
|
|
168
233
|
primary_item: Joi.boolean(),
|
|
169
234
|
});
|
|
170
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
|
+
}
|
|
171
246
|
static CartMetaConfigAdd() {
|
|
172
247
|
return Joi.object({
|
|
173
248
|
bulk_coupons: Joi.boolean(),
|
|
@@ -192,14 +267,29 @@ class CartModel {
|
|
|
192
267
|
revenue_engine_coupon: Joi.boolean(),
|
|
193
268
|
});
|
|
194
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
|
+
}
|
|
195
281
|
static CartProduct() {
|
|
196
282
|
return Joi.object({
|
|
283
|
+
_custom_json: Joi.any(),
|
|
197
284
|
action: CartModel.ProductAction(),
|
|
198
285
|
brand: CartModel.BaseInfo(),
|
|
199
286
|
categories: Joi.array().items(CartModel.CategoryInfo()),
|
|
200
287
|
images: Joi.array().items(CartModel.ProductImage()),
|
|
288
|
+
item_code: Joi.string().allow("").allow(null),
|
|
201
289
|
name: Joi.string().allow(""),
|
|
202
290
|
slug: Joi.string().allow(""),
|
|
291
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
292
|
+
teaser_tag: CartModel.Tags(),
|
|
203
293
|
type: Joi.string().allow(""),
|
|
204
294
|
uid: Joi.number(),
|
|
205
295
|
});
|
|
@@ -214,7 +304,9 @@ class CartModel {
|
|
|
214
304
|
article: CartModel.ProductArticle(),
|
|
215
305
|
availability: CartModel.ProductAvailability(),
|
|
216
306
|
bulk_offer: Joi.any(),
|
|
307
|
+
coupon: CartModel.CouponDetails(),
|
|
217
308
|
coupon_message: Joi.string().allow(""),
|
|
309
|
+
custom_order: Joi.any(),
|
|
218
310
|
delivery_promise: CartModel.ShipmentPromise(),
|
|
219
311
|
discount: Joi.string().allow(""),
|
|
220
312
|
identifiers: CartModel.CartProductIdentifer().required(),
|
|
@@ -243,6 +335,39 @@ class CartModel {
|
|
|
243
335
|
threshold: Joi.number(),
|
|
244
336
|
});
|
|
245
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
|
+
}
|
|
246
371
|
static CompareObject() {
|
|
247
372
|
return Joi.object({
|
|
248
373
|
equals: Joi.number(),
|
|
@@ -252,6 +377,22 @@ class CartModel {
|
|
|
252
377
|
less_than_equals: Joi.number(),
|
|
253
378
|
});
|
|
254
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
|
+
}
|
|
255
396
|
static CouponAction() {
|
|
256
397
|
return Joi.object({
|
|
257
398
|
action_date: Joi.string().allow("").allow(null),
|
|
@@ -287,8 +428,15 @@ class CartModel {
|
|
|
287
428
|
static CouponBreakup() {
|
|
288
429
|
return Joi.object({
|
|
289
430
|
code: Joi.string().allow(""),
|
|
431
|
+
coupon_type: Joi.string().allow("").allow(null),
|
|
432
|
+
coupon_value: Joi.number(),
|
|
433
|
+
description: Joi.string().allow("").allow(null),
|
|
290
434
|
is_applied: Joi.boolean(),
|
|
435
|
+
max_discount_value: Joi.number(),
|
|
291
436
|
message: Joi.string().allow(""),
|
|
437
|
+
minimum_cart_value: Joi.number(),
|
|
438
|
+
sub_title: Joi.string().allow("").allow(null),
|
|
439
|
+
title: Joi.string().allow("").allow(null),
|
|
292
440
|
type: Joi.string().allow(""),
|
|
293
441
|
uid: Joi.string().allow(""),
|
|
294
442
|
value: Joi.number(),
|
|
@@ -300,6 +448,13 @@ class CartModel {
|
|
|
300
448
|
modified_on: Joi.string().allow("").allow(null),
|
|
301
449
|
});
|
|
302
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
|
+
}
|
|
303
458
|
static CouponPartialUpdate() {
|
|
304
459
|
return Joi.object({
|
|
305
460
|
archive: Joi.boolean(),
|
|
@@ -341,6 +496,33 @@ class CartModel {
|
|
|
341
496
|
validity: CartModel.Validity().required(),
|
|
342
497
|
});
|
|
343
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
|
+
}
|
|
344
526
|
static DeliveryCharges() {
|
|
345
527
|
return Joi.object({
|
|
346
528
|
charges: Joi.array().items(CartModel.Charges()),
|
|
@@ -349,13 +531,16 @@ class CartModel {
|
|
|
349
531
|
}
|
|
350
532
|
static DiscountOffer() {
|
|
351
533
|
return Joi.object({
|
|
534
|
+
apportion_discount: Joi.boolean(),
|
|
352
535
|
code: Joi.string().allow(""),
|
|
353
536
|
discount_amount: Joi.number(),
|
|
354
537
|
discount_percentage: Joi.number(),
|
|
355
538
|
discount_price: Joi.number(),
|
|
356
539
|
max_discount_amount: Joi.number(),
|
|
357
540
|
max_offer_quantity: Joi.number(),
|
|
541
|
+
max_usage_per_transaction: Joi.number(),
|
|
358
542
|
min_offer_quantity: Joi.number(),
|
|
543
|
+
partial_can_ret: Joi.boolean(),
|
|
359
544
|
});
|
|
360
545
|
}
|
|
361
546
|
static DiscountRule() {
|
|
@@ -366,6 +551,14 @@ class CartModel {
|
|
|
366
551
|
offer: CartModel.DiscountOffer().required(),
|
|
367
552
|
});
|
|
368
553
|
}
|
|
554
|
+
static DiscountRulesApp() {
|
|
555
|
+
return Joi.object({
|
|
556
|
+
item_criteria: Joi.any(),
|
|
557
|
+
matched_buy_rules: Joi.array().items(Joi.string().allow("")),
|
|
558
|
+
offer: Joi.any(),
|
|
559
|
+
raw_offer: Joi.any(),
|
|
560
|
+
});
|
|
561
|
+
}
|
|
369
562
|
static DisplayBreakup() {
|
|
370
563
|
return Joi.object({
|
|
371
564
|
currency_code: Joi.string().allow(""),
|
|
@@ -390,6 +583,7 @@ class CartModel {
|
|
|
390
583
|
return Joi.object({
|
|
391
584
|
description: Joi.string().allow(""),
|
|
392
585
|
name: Joi.string().allow(""),
|
|
586
|
+
offer_label: Joi.string().allow(""),
|
|
393
587
|
offer_text: Joi.string().allow(""),
|
|
394
588
|
});
|
|
395
589
|
}
|
|
@@ -399,6 +593,46 @@ class CartModel {
|
|
|
399
593
|
title: Joi.string().allow(""),
|
|
400
594
|
});
|
|
401
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
|
+
}
|
|
602
|
+
static FreeGiftItem() {
|
|
603
|
+
return Joi.object({
|
|
604
|
+
item_brand_name: Joi.string().allow(""),
|
|
605
|
+
item_id: Joi.number(),
|
|
606
|
+
item_images_url: Joi.array().items(Joi.string().allow("")),
|
|
607
|
+
item_name: Joi.string().allow(""),
|
|
608
|
+
item_price_details: Joi.any(),
|
|
609
|
+
item_slug: Joi.string().allow(""),
|
|
610
|
+
});
|
|
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
|
+
}
|
|
402
636
|
static Identifier() {
|
|
403
637
|
return Joi.object({
|
|
404
638
|
article_id: Joi.array().items(Joi.string().allow("")),
|
|
@@ -406,6 +640,7 @@ class CartModel {
|
|
|
406
640
|
category_id: Joi.array().items(Joi.number()),
|
|
407
641
|
collection_id: Joi.array().items(Joi.string().allow("")),
|
|
408
642
|
company_id: Joi.array().items(Joi.number()),
|
|
643
|
+
email_domain: Joi.array().items(Joi.string().allow("")),
|
|
409
644
|
exclude_brand_id: Joi.array().items(Joi.number()),
|
|
410
645
|
item_id: Joi.array().items(Joi.number()),
|
|
411
646
|
store_id: Joi.array().items(Joi.number()),
|
|
@@ -415,21 +650,32 @@ class CartModel {
|
|
|
415
650
|
static ItemCriteria() {
|
|
416
651
|
return Joi.object({
|
|
417
652
|
all_items: Joi.boolean(),
|
|
653
|
+
available_zones: Joi.array().items(Joi.string().allow("")),
|
|
418
654
|
buy_rules: Joi.array().items(Joi.string().allow("")),
|
|
419
655
|
cart_quantity: CartModel.CompareObject(),
|
|
420
656
|
cart_total: CartModel.CompareObject(),
|
|
657
|
+
cart_unique_item_amount: CartModel.CompareObject(),
|
|
658
|
+
cart_unique_item_quantity: CartModel.CompareObject(),
|
|
421
659
|
item_brand: Joi.array().items(Joi.number()),
|
|
422
660
|
item_category: Joi.array().items(Joi.number()),
|
|
423
661
|
item_company: Joi.array().items(Joi.number()),
|
|
662
|
+
item_department: Joi.array().items(Joi.number()),
|
|
424
663
|
item_exclude_brand: Joi.array().items(Joi.number()),
|
|
425
664
|
item_exclude_category: Joi.array().items(Joi.number()),
|
|
426
665
|
item_exclude_company: Joi.array().items(Joi.number()),
|
|
666
|
+
item_exclude_department: Joi.array().items(Joi.number()),
|
|
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()),
|
|
427
670
|
item_exclude_sku: Joi.array().items(Joi.string().allow("")),
|
|
428
671
|
item_exclude_store: Joi.array().items(Joi.number()),
|
|
429
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()),
|
|
430
675
|
item_size: Joi.array().items(Joi.string().allow("")),
|
|
431
676
|
item_sku: Joi.array().items(Joi.string().allow("")),
|
|
432
677
|
item_store: Joi.array().items(Joi.number()),
|
|
678
|
+
item_tags: Joi.array().items(Joi.string().allow("")),
|
|
433
679
|
});
|
|
434
680
|
}
|
|
435
681
|
static LoyaltyPoints() {
|
|
@@ -440,6 +686,12 @@ class CartModel {
|
|
|
440
686
|
total: Joi.number(),
|
|
441
687
|
});
|
|
442
688
|
}
|
|
689
|
+
static MultiCartResponse() {
|
|
690
|
+
return Joi.object({
|
|
691
|
+
data: Joi.array().items(CartModel.CartList()),
|
|
692
|
+
success: Joi.boolean(),
|
|
693
|
+
});
|
|
694
|
+
}
|
|
443
695
|
static MultiTenderPaymentMeta() {
|
|
444
696
|
return Joi.object({
|
|
445
697
|
current_status: Joi.string().allow("").allow(null),
|
|
@@ -561,6 +813,53 @@ class CartModel {
|
|
|
561
813
|
success: Joi.boolean(),
|
|
562
814
|
});
|
|
563
815
|
}
|
|
816
|
+
static OverrideCartItem() {
|
|
817
|
+
return Joi.object({
|
|
818
|
+
amount_paid: Joi.number().required(),
|
|
819
|
+
discount: Joi.number().required(),
|
|
820
|
+
extra_meta: Joi.any(),
|
|
821
|
+
item_id: Joi.number().required(),
|
|
822
|
+
price_effective: Joi.number().required(),
|
|
823
|
+
price_marked: Joi.number().required(),
|
|
824
|
+
promo_list: Joi.array().items(CartModel.OverrideCartItemPromo()),
|
|
825
|
+
quantity: Joi.number(),
|
|
826
|
+
seller_identifier: Joi.string().allow(""),
|
|
827
|
+
size: Joi.string().allow("").required(),
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
static OverrideCartItemPromo() {
|
|
831
|
+
return Joi.object({
|
|
832
|
+
item_list: Joi.array().items(Joi.any().allow(null)),
|
|
833
|
+
promo_amount: Joi.string().allow("").required(),
|
|
834
|
+
promo_desc: Joi.string().allow(""),
|
|
835
|
+
promo_id: Joi.string().allow("").required(),
|
|
836
|
+
rwrd_tndr: Joi.string().allow(""),
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
static OverrideCheckoutReq() {
|
|
840
|
+
return Joi.object({
|
|
841
|
+
aggregator: Joi.string().allow("").required(),
|
|
842
|
+
billing_address: Joi.any(),
|
|
843
|
+
cart_id: Joi.string().allow("").required(),
|
|
844
|
+
cart_items: Joi.array().items(CartModel.OverrideCartItem()).required(),
|
|
845
|
+
currency_code: Joi.string().allow("").required(),
|
|
846
|
+
merchant_code: Joi.string().allow("").required(),
|
|
847
|
+
order_type: Joi.string().allow("").required(),
|
|
848
|
+
ordering_store: Joi.number().allow(null),
|
|
849
|
+
payment_identifier: Joi.string().allow("").allow(null).required(),
|
|
850
|
+
payment_mode: Joi.string().allow("").required(),
|
|
851
|
+
shipping_address: Joi.any(),
|
|
852
|
+
});
|
|
853
|
+
}
|
|
854
|
+
static OverrideCheckoutResponse() {
|
|
855
|
+
return Joi.object({
|
|
856
|
+
cart: Joi.any().required(),
|
|
857
|
+
data: Joi.any().required(),
|
|
858
|
+
message: Joi.string().allow("").required(),
|
|
859
|
+
order_id: Joi.string().allow("").required(),
|
|
860
|
+
success: Joi.string().allow("").required(),
|
|
861
|
+
});
|
|
862
|
+
}
|
|
564
863
|
static Ownership() {
|
|
565
864
|
return Joi.object({
|
|
566
865
|
payable_by: Joi.string().allow("").required(),
|
|
@@ -590,6 +889,15 @@ class CartModel {
|
|
|
590
889
|
type: Joi.string().allow("").required(),
|
|
591
890
|
});
|
|
592
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
|
+
}
|
|
593
901
|
static PaymentAllowValue() {
|
|
594
902
|
return Joi.object({
|
|
595
903
|
max: Joi.number(),
|
|
@@ -600,9 +908,34 @@ class CartModel {
|
|
|
600
908
|
max: Joi.number(),
|
|
601
909
|
});
|
|
602
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
|
+
}
|
|
603
935
|
static PaymentModes() {
|
|
604
936
|
return Joi.object({
|
|
605
937
|
codes: Joi.array().items(Joi.string().allow("")),
|
|
938
|
+
iins: Joi.array().items(Joi.string().allow("")),
|
|
606
939
|
networks: Joi.array().items(Joi.string().allow("")),
|
|
607
940
|
types: Joi.array().items(Joi.string().allow("")),
|
|
608
941
|
uses: CartModel.PaymentAllowValue(),
|
|
@@ -615,6 +948,192 @@ class CartModel {
|
|
|
615
948
|
payment_identifier: Joi.string().allow(""),
|
|
616
949
|
});
|
|
617
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
|
+
}
|
|
618
1137
|
static PostOrder() {
|
|
619
1138
|
return Joi.object({
|
|
620
1139
|
cancellation_allowed: Joi.boolean(),
|
|
@@ -643,14 +1162,21 @@ class CartModel {
|
|
|
643
1162
|
static ProductArticle() {
|
|
644
1163
|
return Joi.object({
|
|
645
1164
|
_custom_json: Joi.any(),
|
|
1165
|
+
cart_item_meta: Joi.any(),
|
|
646
1166
|
extra_meta: Joi.any(),
|
|
1167
|
+
gift_card: Joi.any(),
|
|
1168
|
+
identifier: Joi.any(),
|
|
1169
|
+
is_gift_visible: Joi.boolean(),
|
|
1170
|
+
meta: Joi.any(),
|
|
1171
|
+
mto_quantity: Joi.number(),
|
|
647
1172
|
parent_item_identifiers: Joi.any(),
|
|
648
1173
|
price: CartModel.ArticlePriceInfo(),
|
|
649
1174
|
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
650
1175
|
quantity: Joi.number(),
|
|
651
1176
|
seller: CartModel.BaseInfo(),
|
|
1177
|
+
seller_identifier: Joi.string().allow(""),
|
|
652
1178
|
size: Joi.string().allow(""),
|
|
653
|
-
store: CartModel.
|
|
1179
|
+
store: CartModel.StoreInfo(),
|
|
654
1180
|
type: Joi.string().allow(""),
|
|
655
1181
|
uid: Joi.string().allow(""),
|
|
656
1182
|
});
|
|
@@ -730,6 +1256,7 @@ class CartModel {
|
|
|
730
1256
|
buy_rules: Joi.object()
|
|
731
1257
|
.pattern(/\S/, CartModel.ItemCriteria())
|
|
732
1258
|
.required(),
|
|
1259
|
+
calculate_on: Joi.string().allow(""),
|
|
733
1260
|
code: Joi.string().allow(""),
|
|
734
1261
|
currency: Joi.string().allow(""),
|
|
735
1262
|
date_meta: CartModel.PromotionDateMeta(),
|
|
@@ -769,6 +1296,7 @@ class CartModel {
|
|
|
769
1296
|
buy_rules: Joi.object()
|
|
770
1297
|
.pattern(/\S/, CartModel.ItemCriteria())
|
|
771
1298
|
.required(),
|
|
1299
|
+
calculate_on: Joi.string().allow(""),
|
|
772
1300
|
code: Joi.string().allow(""),
|
|
773
1301
|
currency: Joi.string().allow(""),
|
|
774
1302
|
date_meta: CartModel.PromotionDateMeta(),
|
|
@@ -801,7 +1329,7 @@ class CartModel {
|
|
|
801
1329
|
return Joi.object({
|
|
802
1330
|
cron: Joi.string().allow("").allow(null),
|
|
803
1331
|
duration: Joi.number().allow(null),
|
|
804
|
-
end: Joi.string().allow("").
|
|
1332
|
+
end: Joi.string().allow("").required(),
|
|
805
1333
|
next_schedule: Joi.array().items(Joi.any()),
|
|
806
1334
|
published: Joi.boolean().required(),
|
|
807
1335
|
start: Joi.string().allow("").required(),
|
|
@@ -825,6 +1353,7 @@ class CartModel {
|
|
|
825
1353
|
buy_rules: Joi.object()
|
|
826
1354
|
.pattern(/\S/, CartModel.ItemCriteria())
|
|
827
1355
|
.required(),
|
|
1356
|
+
calculate_on: Joi.string().allow(""),
|
|
828
1357
|
code: Joi.string().allow(""),
|
|
829
1358
|
currency: Joi.string().allow(""),
|
|
830
1359
|
date_meta: CartModel.PromotionDateMeta(),
|
|
@@ -848,6 +1377,7 @@ class CartModel {
|
|
|
848
1377
|
delivery_charge: Joi.number(),
|
|
849
1378
|
discount: Joi.number(),
|
|
850
1379
|
fynd_cash: Joi.number(),
|
|
1380
|
+
gift_card: Joi.number(),
|
|
851
1381
|
gst_charges: Joi.number(),
|
|
852
1382
|
mrp_total: Joi.number(),
|
|
853
1383
|
subtotal: Joi.number(),
|
|
@@ -866,6 +1396,7 @@ class CartModel {
|
|
|
866
1396
|
post_order: CartModel.PostOrder(),
|
|
867
1397
|
price_range: CartModel.PriceRange(),
|
|
868
1398
|
user_groups: Joi.array().items(Joi.number()),
|
|
1399
|
+
user_type: Joi.string().allow(""),
|
|
869
1400
|
uses: CartModel.UsesRestriction(),
|
|
870
1401
|
});
|
|
871
1402
|
}
|
|
@@ -904,6 +1435,58 @@ class CartModel {
|
|
|
904
1435
|
value_type: Joi.string().allow("").required(),
|
|
905
1436
|
});
|
|
906
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
|
+
}
|
|
907
1490
|
static ShipmentPromise() {
|
|
908
1491
|
return Joi.object({
|
|
909
1492
|
formatted: CartModel.PromiseFormatted(),
|
|
@@ -931,6 +1514,15 @@ class CartModel {
|
|
|
931
1514
|
state: Joi.string().allow("").allow(null),
|
|
932
1515
|
});
|
|
933
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
|
+
}
|
|
934
1526
|
static State() {
|
|
935
1527
|
return Joi.object({
|
|
936
1528
|
is_archived: Joi.boolean(),
|
|
@@ -938,12 +1530,37 @@ class CartModel {
|
|
|
938
1530
|
is_public: Joi.boolean(),
|
|
939
1531
|
});
|
|
940
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
|
+
}
|
|
941
1545
|
static SuccessMessage() {
|
|
942
1546
|
return Joi.object({
|
|
943
1547
|
message: Joi.string().allow(""),
|
|
944
1548
|
success: Joi.boolean(),
|
|
945
1549
|
});
|
|
946
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
|
+
}
|
|
947
1564
|
static UpdateCartDetailResponse() {
|
|
948
1565
|
return Joi.object({
|
|
949
1566
|
cart: CartModel.CartDetailResponse(),
|
|
@@ -951,12 +1568,47 @@ class CartModel {
|
|
|
951
1568
|
success: Joi.boolean(),
|
|
952
1569
|
});
|
|
953
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
|
+
}
|
|
954
1592
|
static UpdateCartRequest() {
|
|
955
1593
|
return Joi.object({
|
|
956
1594
|
items: Joi.array().items(CartModel.UpdateProductCart()),
|
|
957
1595
|
operation: Joi.string().allow("").required(),
|
|
958
1596
|
});
|
|
959
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
|
+
}
|
|
960
1612
|
static UpdateProductCart() {
|
|
961
1613
|
return Joi.object({
|
|
962
1614
|
_custom_json: Joi.any(),
|
|
@@ -966,10 +1618,53 @@ class CartModel {
|
|
|
966
1618
|
item_id: Joi.number(),
|
|
967
1619
|
item_index: Joi.number(),
|
|
968
1620
|
item_size: Joi.string().allow(""),
|
|
1621
|
+
meta: Joi.any(),
|
|
969
1622
|
parent_item_identifiers: Joi.any(),
|
|
970
1623
|
quantity: Joi.number(),
|
|
971
1624
|
});
|
|
972
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
|
+
}
|
|
973
1668
|
static UserRegistered() {
|
|
974
1669
|
return Joi.object({
|
|
975
1670
|
end: Joi.string().allow("").allow(null),
|