@gofynd/fdk-client-javascript 1.1.2 → 1.1.4
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 +2 -2
- package/index.d.ts +7 -7
- package/index.js +12 -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/Common/CommonApplicationModel.js +4 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +6 -5
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +3 -1
- package/sdk/application/Lead/LeadApplicationModel.js +4 -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/partner/OAuthClient.js +1 -1
- package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +491 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +2661 -337
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +32 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +269 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +58 -0
- package/sdk/platform/Cart/CartPlatformModel.js +652 -3
- 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 +43 -31
- package/sdk/platform/Common/CommonPlatformModel.js +4 -0
- 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 +34 -7
- 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 +161 -79
- package/sdk/platform/Order/OrderPlatformClient.js +546 -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 +52 -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 +48 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +452 -7
- package/sdk/platform/PlatformApplicationClient.d.ts +1249 -937
- package/sdk/platform/PlatformApplicationClient.js +1366 -1033
- package/sdk/platform/PlatformClient.d.ts +10979 -8771
- package/sdk/platform/PlatformClient.js +11874 -9197
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +134 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +852 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +16 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +81 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +223 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1296 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +97 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +778 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +21 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +130 -0
- package/sdk/platform/index.d.ts +16 -14
- package/sdk/platform/index.js +22 -18
- package/sdk/public/Configuration/ConfigurationPublicModel.js +5 -0
- 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
|
@@ -1,28 +1,60 @@
|
|
|
1
1
|
export = CartValidator;
|
|
2
2
|
declare class CartValidator {
|
|
3
|
+
static addAddress(): any;
|
|
3
4
|
static addItems(): any;
|
|
5
|
+
static addPriceAdjustment(): any;
|
|
6
|
+
static applyCoupon(): any;
|
|
4
7
|
static checkCartServiceability(): any;
|
|
5
8
|
static checkoutCart(): any;
|
|
6
9
|
static createCartMetaConfig(): any;
|
|
7
10
|
static createCoupon(): any;
|
|
8
11
|
static createPromotion(): any;
|
|
12
|
+
static deleteCart(): any;
|
|
9
13
|
static fetchAndvalidateCartItems(): any;
|
|
10
14
|
static fetchCartMetaConfig(): any;
|
|
11
15
|
static getAbandonedCart(): any;
|
|
12
16
|
static getAbandonedCartDetails(): any;
|
|
17
|
+
static getAddressById(): any;
|
|
18
|
+
static getAddresses(): any;
|
|
19
|
+
static getAppCoupons(): any;
|
|
20
|
+
static getAvailableDeliveryModes(): any;
|
|
21
|
+
static getCart(): any;
|
|
22
|
+
static getCartList(): any;
|
|
23
|
+
static getCartShareLink(): any;
|
|
24
|
+
static getCartSharedItems(): any;
|
|
13
25
|
static getCouponById(): any;
|
|
14
26
|
static getCouponCodeExists(): any;
|
|
15
27
|
static getCouponOptionValues(): any;
|
|
16
28
|
static getCoupons(): any;
|
|
29
|
+
static getItemCount(): any;
|
|
17
30
|
static getPromosCouponConfig(): any;
|
|
18
31
|
static getPromotionById(): any;
|
|
19
32
|
static getPromotionCodeExists(): any;
|
|
20
33
|
static getPromotions(): any;
|
|
34
|
+
static getShipments(): any;
|
|
35
|
+
static getStoreAddressByUid(): any;
|
|
21
36
|
static overrideCart(): any;
|
|
37
|
+
static platformAddItems(): any;
|
|
38
|
+
static platformCheckoutCart(): any;
|
|
39
|
+
static platformCheckoutCartV2(): any;
|
|
40
|
+
static platformUpdateCart(): any;
|
|
41
|
+
static removeAddress(): any;
|
|
42
|
+
static removeCoupon(): any;
|
|
43
|
+
static removePriceAdjustment(): any;
|
|
44
|
+
static selectAddress(): any;
|
|
45
|
+
static selectPaymentMode(): any;
|
|
46
|
+
static selectPaymentModeV2(): any;
|
|
47
|
+
static updateAddress(): any;
|
|
22
48
|
static updateCart(): any;
|
|
49
|
+
static updateCartMeta(): any;
|
|
23
50
|
static updateCartMetaConfig(): any;
|
|
51
|
+
static updateCartUser(): any;
|
|
52
|
+
static updateCartWithSharedItems(): any;
|
|
24
53
|
static updateCoupon(): any;
|
|
25
54
|
static updateCouponPartially(): any;
|
|
55
|
+
static updatePriceAdjustment(): any;
|
|
26
56
|
static updatePromotion(): any;
|
|
27
57
|
static updatePromotionPartially(): any;
|
|
58
|
+
static updateShipments(): any;
|
|
59
|
+
static validateCouponForPayment(): any;
|
|
28
60
|
}
|
|
@@ -2,6 +2,12 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
const CartModel = require("./CartPlatformModel");
|
|
4
4
|
class CartValidator {
|
|
5
|
+
static addAddress() {
|
|
6
|
+
return Joi.object({
|
|
7
|
+
body: CartModel.PlatformAddress().required(),
|
|
8
|
+
}).required();
|
|
9
|
+
}
|
|
10
|
+
|
|
5
11
|
static addItems() {
|
|
6
12
|
return Joi.object({
|
|
7
13
|
cartId: Joi.string().allow("").required(),
|
|
@@ -10,6 +16,23 @@ class CartValidator {
|
|
|
10
16
|
}).required();
|
|
11
17
|
}
|
|
12
18
|
|
|
19
|
+
static addPriceAdjustment() {
|
|
20
|
+
return Joi.object({
|
|
21
|
+
body: CartModel.PriceAdjustmentAdd().required(),
|
|
22
|
+
}).required();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static applyCoupon() {
|
|
26
|
+
return Joi.object({
|
|
27
|
+
i: Joi.boolean(),
|
|
28
|
+
b: Joi.boolean(),
|
|
29
|
+
p: Joi.boolean(),
|
|
30
|
+
id: Joi.string().allow(""),
|
|
31
|
+
buyNow: Joi.boolean(),
|
|
32
|
+
body: CartModel.ApplyCouponRequest().required(),
|
|
33
|
+
}).required();
|
|
34
|
+
}
|
|
35
|
+
|
|
13
36
|
static checkCartServiceability() {
|
|
14
37
|
return Joi.object({
|
|
15
38
|
body: CartModel.OpenApiCartServiceabilityRequest().required(),
|
|
@@ -40,6 +63,13 @@ class CartValidator {
|
|
|
40
63
|
}).required();
|
|
41
64
|
}
|
|
42
65
|
|
|
66
|
+
static deleteCart() {
|
|
67
|
+
return Joi.object({
|
|
68
|
+
id: Joi.string().allow(""),
|
|
69
|
+
body: CartModel.DeleteCartRequest().required(),
|
|
70
|
+
}).required();
|
|
71
|
+
}
|
|
72
|
+
|
|
43
73
|
static fetchAndvalidateCartItems() {
|
|
44
74
|
return Joi.object({
|
|
45
75
|
body: CartModel.OpenapiCartDetailsRequest().required(),
|
|
@@ -70,6 +100,76 @@ class CartValidator {
|
|
|
70
100
|
}).required();
|
|
71
101
|
}
|
|
72
102
|
|
|
103
|
+
static getAddressById() {
|
|
104
|
+
return Joi.object({
|
|
105
|
+
id: Joi.string().allow("").required(),
|
|
106
|
+
cartId: Joi.string().allow(""),
|
|
107
|
+
buyNow: Joi.boolean(),
|
|
108
|
+
mobileNo: Joi.string().allow(""),
|
|
109
|
+
checkoutMode: Joi.string().allow(""),
|
|
110
|
+
tags: Joi.string().allow(""),
|
|
111
|
+
isDefault: Joi.boolean(),
|
|
112
|
+
userId: Joi.string().allow(""),
|
|
113
|
+
}).required();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
static getAddresses() {
|
|
117
|
+
return Joi.object({
|
|
118
|
+
cartId: Joi.string().allow(""),
|
|
119
|
+
buyNow: Joi.boolean(),
|
|
120
|
+
mobileNo: Joi.string().allow(""),
|
|
121
|
+
checkoutMode: Joi.string().allow(""),
|
|
122
|
+
tags: Joi.string().allow(""),
|
|
123
|
+
isDefault: Joi.boolean(),
|
|
124
|
+
userId: Joi.string().allow(""),
|
|
125
|
+
}).required();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
static getAppCoupons() {
|
|
129
|
+
return Joi.object({
|
|
130
|
+
id: Joi.string().allow(""),
|
|
131
|
+
buyNow: Joi.boolean(),
|
|
132
|
+
}).required();
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
static getAvailableDeliveryModes() {
|
|
136
|
+
return Joi.object({
|
|
137
|
+
areaCode: Joi.string().allow("").required(),
|
|
138
|
+
id: Joi.string().allow(""),
|
|
139
|
+
}).required();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static getCart() {
|
|
143
|
+
return Joi.object({
|
|
144
|
+
id: Joi.string().allow(""),
|
|
145
|
+
userId: Joi.string().allow(""),
|
|
146
|
+
i: Joi.boolean(),
|
|
147
|
+
b: Joi.boolean(),
|
|
148
|
+
assignCardId: Joi.number(),
|
|
149
|
+
buyNow: Joi.boolean(),
|
|
150
|
+
}).required();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
static getCartList() {
|
|
154
|
+
return Joi.object({
|
|
155
|
+
fromDate: Joi.string().allow(""),
|
|
156
|
+
toDate: Joi.string().allow(""),
|
|
157
|
+
filterOn: Joi.string().allow(""),
|
|
158
|
+
}).required();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
static getCartShareLink() {
|
|
162
|
+
return Joi.object({
|
|
163
|
+
body: CartModel.GetShareCartLinkRequest().required(),
|
|
164
|
+
}).required();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
static getCartSharedItems() {
|
|
168
|
+
return Joi.object({
|
|
169
|
+
token: Joi.string().allow("").required(),
|
|
170
|
+
}).required();
|
|
171
|
+
}
|
|
172
|
+
|
|
73
173
|
static getCouponById() {
|
|
74
174
|
return Joi.object({
|
|
75
175
|
id: Joi.string().allow("").required(),
|
|
@@ -99,6 +199,13 @@ class CartValidator {
|
|
|
99
199
|
}).required();
|
|
100
200
|
}
|
|
101
201
|
|
|
202
|
+
static getItemCount() {
|
|
203
|
+
return Joi.object({
|
|
204
|
+
id: Joi.string().allow(""),
|
|
205
|
+
buyNow: Joi.boolean(),
|
|
206
|
+
}).required();
|
|
207
|
+
}
|
|
208
|
+
|
|
102
209
|
static getPromosCouponConfig() {
|
|
103
210
|
return Joi.object({
|
|
104
211
|
entityType: Joi.string().allow(""),
|
|
@@ -131,12 +238,120 @@ class CartValidator {
|
|
|
131
238
|
}).required();
|
|
132
239
|
}
|
|
133
240
|
|
|
241
|
+
static getShipments() {
|
|
242
|
+
return Joi.object({
|
|
243
|
+
pickAtStoreUid: Joi.number(),
|
|
244
|
+
orderingStoreId: Joi.number(),
|
|
245
|
+
i: Joi.boolean(),
|
|
246
|
+
p: Joi.boolean(),
|
|
247
|
+
id: Joi.string().allow(""),
|
|
248
|
+
addressId: Joi.string().allow(""),
|
|
249
|
+
areaCode: Joi.string().allow(""),
|
|
250
|
+
orderType: Joi.string().allow(""),
|
|
251
|
+
}).required();
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
static getStoreAddressByUid() {
|
|
255
|
+
return Joi.object({
|
|
256
|
+
storeUid: Joi.number().required(),
|
|
257
|
+
}).required();
|
|
258
|
+
}
|
|
259
|
+
|
|
134
260
|
static overrideCart() {
|
|
135
261
|
return Joi.object({
|
|
136
262
|
body: CartModel.OverrideCheckoutReq().required(),
|
|
137
263
|
}).required();
|
|
138
264
|
}
|
|
139
265
|
|
|
266
|
+
static platformAddItems() {
|
|
267
|
+
return Joi.object({
|
|
268
|
+
i: Joi.boolean(),
|
|
269
|
+
b: Joi.boolean(),
|
|
270
|
+
buyNow: Joi.boolean(),
|
|
271
|
+
id: Joi.string().allow(""),
|
|
272
|
+
body: CartModel.PlatformAddCartRequest().required(),
|
|
273
|
+
}).required();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
static platformCheckoutCart() {
|
|
277
|
+
return Joi.object({
|
|
278
|
+
id: Joi.string().allow(""),
|
|
279
|
+
body: CartModel.PlatformCartCheckoutDetailRequest().required(),
|
|
280
|
+
}).required();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
static platformCheckoutCartV2() {
|
|
284
|
+
return Joi.object({
|
|
285
|
+
id: Joi.string().allow(""),
|
|
286
|
+
body: CartModel.PlatformCartCheckoutDetailV2Request().required(),
|
|
287
|
+
}).required();
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
static platformUpdateCart() {
|
|
291
|
+
return Joi.object({
|
|
292
|
+
id: Joi.string().allow(""),
|
|
293
|
+
i: Joi.boolean(),
|
|
294
|
+
b: Joi.boolean(),
|
|
295
|
+
buyNow: Joi.boolean(),
|
|
296
|
+
body: CartModel.PlatformUpdateCartRequest().required(),
|
|
297
|
+
}).required();
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
static removeAddress() {
|
|
301
|
+
return Joi.object({
|
|
302
|
+
id: Joi.string().allow("").required(),
|
|
303
|
+
userId: Joi.string().allow(""),
|
|
304
|
+
}).required();
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
static removeCoupon() {
|
|
308
|
+
return Joi.object({
|
|
309
|
+
uid: Joi.string().allow(""),
|
|
310
|
+
buyNow: Joi.boolean(),
|
|
311
|
+
}).required();
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
static removePriceAdjustment() {
|
|
315
|
+
return Joi.object({
|
|
316
|
+
id: Joi.string().allow("").required(),
|
|
317
|
+
}).required();
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
static selectAddress() {
|
|
321
|
+
return Joi.object({
|
|
322
|
+
cartId: Joi.string().allow(""),
|
|
323
|
+
buyNow: Joi.boolean(),
|
|
324
|
+
i: Joi.boolean(),
|
|
325
|
+
b: Joi.boolean(),
|
|
326
|
+
body: CartModel.PlatformSelectCartAddressRequest().required(),
|
|
327
|
+
}).required();
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
static selectPaymentMode() {
|
|
331
|
+
return Joi.object({
|
|
332
|
+
id: Joi.string().allow(""),
|
|
333
|
+
buyNow: Joi.boolean(),
|
|
334
|
+
orderType: Joi.string().allow(""),
|
|
335
|
+
body: CartModel.UpdateCartPaymentRequest().required(),
|
|
336
|
+
}).required();
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
static selectPaymentModeV2() {
|
|
340
|
+
return Joi.object({
|
|
341
|
+
id: Joi.string().allow(""),
|
|
342
|
+
buyNow: Joi.boolean(),
|
|
343
|
+
orderType: Joi.string().allow(""),
|
|
344
|
+
body: CartModel.UpdateCartPaymentRequestV2().required(),
|
|
345
|
+
}).required();
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
static updateAddress() {
|
|
349
|
+
return Joi.object({
|
|
350
|
+
id: Joi.string().allow("").required(),
|
|
351
|
+
body: CartModel.PlatformAddress().required(),
|
|
352
|
+
}).required();
|
|
353
|
+
}
|
|
354
|
+
|
|
140
355
|
static updateCart() {
|
|
141
356
|
return Joi.object({
|
|
142
357
|
cartId: Joi.string().allow("").required(),
|
|
@@ -145,6 +360,14 @@ class CartValidator {
|
|
|
145
360
|
}).required();
|
|
146
361
|
}
|
|
147
362
|
|
|
363
|
+
static updateCartMeta() {
|
|
364
|
+
return Joi.object({
|
|
365
|
+
id: Joi.string().allow(""),
|
|
366
|
+
buyNow: Joi.boolean(),
|
|
367
|
+
body: CartModel.PlatformCartMetaRequest().required(),
|
|
368
|
+
}).required();
|
|
369
|
+
}
|
|
370
|
+
|
|
148
371
|
static updateCartMetaConfig() {
|
|
149
372
|
return Joi.object({
|
|
150
373
|
cartMetaId: Joi.string().allow("").required(),
|
|
@@ -152,6 +375,21 @@ class CartValidator {
|
|
|
152
375
|
}).required();
|
|
153
376
|
}
|
|
154
377
|
|
|
378
|
+
static updateCartUser() {
|
|
379
|
+
return Joi.object({
|
|
380
|
+
id: Joi.string().allow(""),
|
|
381
|
+
body: CartModel.UpdateUserCartMapping().required(),
|
|
382
|
+
}).required();
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
static updateCartWithSharedItems() {
|
|
386
|
+
return Joi.object({
|
|
387
|
+
token: Joi.string().allow("").required(),
|
|
388
|
+
action: Joi.string().allow("").required(),
|
|
389
|
+
cartId: Joi.string().allow(""),
|
|
390
|
+
}).required();
|
|
391
|
+
}
|
|
392
|
+
|
|
155
393
|
static updateCoupon() {
|
|
156
394
|
return Joi.object({
|
|
157
395
|
id: Joi.string().allow("").required(),
|
|
@@ -166,6 +404,13 @@ class CartValidator {
|
|
|
166
404
|
}).required();
|
|
167
405
|
}
|
|
168
406
|
|
|
407
|
+
static updatePriceAdjustment() {
|
|
408
|
+
return Joi.object({
|
|
409
|
+
id: Joi.string().allow("").required(),
|
|
410
|
+
body: CartModel.PriceAdjustmentUpdate().required(),
|
|
411
|
+
}).required();
|
|
412
|
+
}
|
|
413
|
+
|
|
169
414
|
static updatePromotion() {
|
|
170
415
|
return Joi.object({
|
|
171
416
|
id: Joi.string().allow("").required(),
|
|
@@ -179,6 +424,30 @@ class CartValidator {
|
|
|
179
424
|
body: CartModel.PromotionPartialUpdate().required(),
|
|
180
425
|
}).required();
|
|
181
426
|
}
|
|
427
|
+
|
|
428
|
+
static updateShipments() {
|
|
429
|
+
return Joi.object({
|
|
430
|
+
i: Joi.boolean(),
|
|
431
|
+
p: Joi.boolean(),
|
|
432
|
+
id: Joi.string().allow(""),
|
|
433
|
+
addressId: Joi.string().allow(""),
|
|
434
|
+
areaCode: Joi.string().allow(""),
|
|
435
|
+
orderType: Joi.string().allow(""),
|
|
436
|
+
body: CartModel.UpdateCartShipmentRequest().required(),
|
|
437
|
+
}).required();
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
static validateCouponForPayment() {
|
|
441
|
+
return Joi.object({
|
|
442
|
+
id: Joi.string().allow(""),
|
|
443
|
+
buyNow: Joi.boolean(),
|
|
444
|
+
addressId: Joi.string().allow(""),
|
|
445
|
+
paymentMode: Joi.string().allow(""),
|
|
446
|
+
paymentIdentifier: Joi.string().allow(""),
|
|
447
|
+
aggregatorName: Joi.string().allow(""),
|
|
448
|
+
merchantCode: Joi.string().allow(""),
|
|
449
|
+
}).required();
|
|
450
|
+
}
|
|
182
451
|
}
|
|
183
452
|
|
|
184
453
|
module.exports = CartValidator;
|
|
@@ -9,33 +9,49 @@ declare class CartModel {
|
|
|
9
9
|
static AddProductCart(): any;
|
|
10
10
|
static AppliedFreeArticles(): any;
|
|
11
11
|
static AppliedPromotion(): any;
|
|
12
|
+
static ApplyCouponRequest(): any;
|
|
13
|
+
static Article(): any;
|
|
12
14
|
static ArticlePriceInfo(): any;
|
|
13
15
|
static BaseInfo(): any;
|
|
14
16
|
static BasePrice(): any;
|
|
15
17
|
static BulkBundleRestriction(): any;
|
|
16
18
|
static BuyRules(): any;
|
|
17
19
|
static CartBreakup(): any;
|
|
20
|
+
static CartCheckoutResponse(): any;
|
|
18
21
|
static CartCurrency(): any;
|
|
22
|
+
static CartDeliveryModesResponse(): any;
|
|
19
23
|
static CartDetailResponse(): any;
|
|
20
24
|
static CartItem(): any;
|
|
25
|
+
static CartItemCountResponse(): any;
|
|
21
26
|
static CartItemMeta(): any;
|
|
27
|
+
static CartList(): any;
|
|
22
28
|
static CartMetaConfigAdd(): any;
|
|
23
29
|
static CartMetaConfigUpdate(): any;
|
|
30
|
+
static CartMetaMissingResponse(): any;
|
|
31
|
+
static CartMetaResponse(): any;
|
|
24
32
|
static CartProduct(): any;
|
|
25
33
|
static CartProductIdentifer(): any;
|
|
26
34
|
static CartProductInfo(): any;
|
|
27
35
|
static CategoryInfo(): any;
|
|
28
36
|
static Charges(): any;
|
|
37
|
+
static CheckCart(): any;
|
|
38
|
+
static Collection(): any;
|
|
29
39
|
static CompareObject(): any;
|
|
40
|
+
static Coupon(): any;
|
|
30
41
|
static CouponAction(): any;
|
|
31
42
|
static CouponAdd(): any;
|
|
32
43
|
static CouponAuthor(): any;
|
|
33
44
|
static CouponBreakup(): any;
|
|
34
45
|
static CouponDateMeta(): any;
|
|
46
|
+
static CouponDetails(): any;
|
|
35
47
|
static CouponPartialUpdate(): any;
|
|
36
48
|
static CouponSchedule(): any;
|
|
37
49
|
static CouponsResponse(): any;
|
|
38
50
|
static CouponUpdate(): any;
|
|
51
|
+
static CouponValidity(): any;
|
|
52
|
+
static DeleteAddressResponse(): any;
|
|
53
|
+
static DeleteCartDetailResponse(): any;
|
|
54
|
+
static DeleteCartRequest(): any;
|
|
39
55
|
static DeliveryCharges(): any;
|
|
40
56
|
static DiscountOffer(): any;
|
|
41
57
|
static DiscountRule(): any;
|
|
@@ -44,10 +60,16 @@ declare class CartModel {
|
|
|
44
60
|
static DisplayMeta(): any;
|
|
45
61
|
static DisplayMeta1(): any;
|
|
46
62
|
static DisplayMetaDict(): any;
|
|
63
|
+
static Files(): any;
|
|
47
64
|
static FreeGiftItem(): any;
|
|
65
|
+
static GeoLocation(): any;
|
|
66
|
+
static GetCouponResponse(): any;
|
|
67
|
+
static GetShareCartLinkRequest(): any;
|
|
68
|
+
static GetShareCartLinkResponse(): any;
|
|
48
69
|
static Identifier(): any;
|
|
49
70
|
static ItemCriteria(): any;
|
|
50
71
|
static LoyaltyPoints(): any;
|
|
72
|
+
static MultiCartResponse(): any;
|
|
51
73
|
static MultiTenderPaymentMeta(): any;
|
|
52
74
|
static MultiTenderPaymentMethod(): any;
|
|
53
75
|
static OpenapiCartDetailsRequest(): any;
|
|
@@ -68,12 +90,31 @@ declare class CartModel {
|
|
|
68
90
|
static Ownership1(): any;
|
|
69
91
|
static Ownership2(): any;
|
|
70
92
|
static Page(): any;
|
|
93
|
+
static PageCoupon(): any;
|
|
71
94
|
static PaymentAllowValue(): any;
|
|
72
95
|
static PaymentAllowValue1(): any;
|
|
96
|
+
static PaymentCouponValidate(): any;
|
|
97
|
+
static PaymentMeta(): any;
|
|
98
|
+
static PaymentMethod(): any;
|
|
73
99
|
static PaymentModes(): any;
|
|
74
100
|
static PaymentSelectionLock(): any;
|
|
101
|
+
static PickupStoreDetail(): any;
|
|
102
|
+
static PlatformAddCartRequest(): any;
|
|
103
|
+
static PlatformAddress(): any;
|
|
104
|
+
static PlatformCartCheckoutDetailRequest(): any;
|
|
105
|
+
static PlatformCartCheckoutDetailV2Request(): any;
|
|
106
|
+
static PlatformCartMetaRequest(): any;
|
|
107
|
+
static PlatformCartShipmentsResponse(): any;
|
|
108
|
+
static PlatformGetAddressesResponse(): any;
|
|
109
|
+
static PlatformSelectCartAddressRequest(): any;
|
|
110
|
+
static PlatformShipmentResponse(): any;
|
|
111
|
+
static PlatformUpdateCartRequest(): any;
|
|
75
112
|
static PostOrder(): any;
|
|
76
113
|
static PostOrder1(): any;
|
|
114
|
+
static PriceAdjustment(): any;
|
|
115
|
+
static PriceAdjustmentAdd(): any;
|
|
116
|
+
static PriceAdjustmentResponse(): any;
|
|
117
|
+
static PriceAdjustmentUpdate(): any;
|
|
77
118
|
static PriceRange(): any;
|
|
78
119
|
static ProductAction(): any;
|
|
79
120
|
static ProductArticle(): any;
|
|
@@ -100,13 +141,30 @@ declare class CartModel {
|
|
|
100
141
|
static Restrictions1(): any;
|
|
101
142
|
static Rule(): any;
|
|
102
143
|
static RuleDefinition(): any;
|
|
144
|
+
static SaveAddressResponse(): any;
|
|
145
|
+
static SharedCart(): any;
|
|
146
|
+
static SharedCartDetails(): any;
|
|
147
|
+
static SharedCartResponse(): any;
|
|
148
|
+
static ShipmentArticle(): any;
|
|
103
149
|
static ShipmentPromise(): any;
|
|
104
150
|
static ShippingAddress(): any;
|
|
151
|
+
static StaffCheckout(): any;
|
|
105
152
|
static State(): any;
|
|
153
|
+
static StoreDetailsResponse(): any;
|
|
154
|
+
static StoreInfo(): any;
|
|
106
155
|
static SuccessMessage(): any;
|
|
156
|
+
static Tags(): any;
|
|
157
|
+
static UpdateAddressResponse(): any;
|
|
107
158
|
static UpdateCartDetailResponse(): any;
|
|
159
|
+
static UpdateCartPaymentRequest(): any;
|
|
160
|
+
static UpdateCartPaymentRequestV2(): any;
|
|
108
161
|
static UpdateCartRequest(): any;
|
|
162
|
+
static UpdateCartShipmentItem(): any;
|
|
163
|
+
static UpdateCartShipmentRequest(): any;
|
|
109
164
|
static UpdateProductCart(): any;
|
|
165
|
+
static UpdateUserCartMapping(): any;
|
|
166
|
+
static UserCartMappingResponse(): any;
|
|
167
|
+
static UserInfo(): any;
|
|
110
168
|
static UserRegistered(): any;
|
|
111
169
|
static UsesRemaining(): any;
|
|
112
170
|
static UsesRemaining1(): any;
|