@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
|
@@ -1,28 +1,57 @@
|
|
|
1
1
|
export = CartValidator;
|
|
2
2
|
declare class CartValidator {
|
|
3
|
+
static addAddress(): any;
|
|
3
4
|
static addItems(): any;
|
|
5
|
+
static applyCoupon(): any;
|
|
4
6
|
static checkCartServiceability(): any;
|
|
5
7
|
static checkoutCart(): any;
|
|
6
8
|
static createCartMetaConfig(): any;
|
|
7
9
|
static createCoupon(): any;
|
|
8
10
|
static createPromotion(): any;
|
|
11
|
+
static deleteCart(): any;
|
|
9
12
|
static fetchAndvalidateCartItems(): any;
|
|
10
13
|
static fetchCartMetaConfig(): any;
|
|
11
14
|
static getAbandonedCart(): any;
|
|
12
15
|
static getAbandonedCartDetails(): any;
|
|
16
|
+
static getAddressById(): any;
|
|
17
|
+
static getAddresses(): any;
|
|
18
|
+
static getAppCoupons(): any;
|
|
19
|
+
static getAvailableDeliveryModes(): any;
|
|
20
|
+
static getCart(): any;
|
|
21
|
+
static getCartList(): any;
|
|
22
|
+
static getCartShareLink(): any;
|
|
23
|
+
static getCartSharedItems(): any;
|
|
13
24
|
static getCouponById(): any;
|
|
14
25
|
static getCouponCodeExists(): any;
|
|
15
26
|
static getCouponOptionValues(): any;
|
|
16
27
|
static getCoupons(): any;
|
|
28
|
+
static getItemCount(): any;
|
|
17
29
|
static getPromosCouponConfig(): any;
|
|
18
30
|
static getPromotionById(): any;
|
|
19
31
|
static getPromotionCodeExists(): any;
|
|
20
32
|
static getPromotions(): any;
|
|
33
|
+
static getShipments(): any;
|
|
34
|
+
static getStoreAddressByUid(): any;
|
|
21
35
|
static overrideCart(): any;
|
|
36
|
+
static platformAddItems(): any;
|
|
37
|
+
static platformCheckoutCart(): any;
|
|
38
|
+
static platformCheckoutCartV2(): any;
|
|
39
|
+
static platformUpdateCart(): any;
|
|
40
|
+
static removeAddress(): any;
|
|
41
|
+
static removeCoupon(): any;
|
|
42
|
+
static selectAddress(): any;
|
|
43
|
+
static selectPaymentMode(): any;
|
|
44
|
+
static selectPaymentModeV2(): any;
|
|
45
|
+
static updateAddress(): any;
|
|
22
46
|
static updateCart(): any;
|
|
47
|
+
static updateCartMeta(): any;
|
|
23
48
|
static updateCartMetaConfig(): any;
|
|
49
|
+
static updateCartUser(): any;
|
|
50
|
+
static updateCartWithSharedItems(): any;
|
|
24
51
|
static updateCoupon(): any;
|
|
25
52
|
static updateCouponPartially(): any;
|
|
26
53
|
static updatePromotion(): any;
|
|
27
54
|
static updatePromotionPartially(): any;
|
|
55
|
+
static updateShipments(): any;
|
|
56
|
+
static validateCouponForPayment(): any;
|
|
28
57
|
}
|
|
@@ -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,17 @@ class CartValidator {
|
|
|
10
16
|
}).required();
|
|
11
17
|
}
|
|
12
18
|
|
|
19
|
+
static applyCoupon() {
|
|
20
|
+
return Joi.object({
|
|
21
|
+
i: Joi.boolean(),
|
|
22
|
+
b: Joi.boolean(),
|
|
23
|
+
p: Joi.boolean(),
|
|
24
|
+
id: Joi.string().allow(""),
|
|
25
|
+
buyNow: Joi.boolean(),
|
|
26
|
+
body: CartModel.ApplyCouponRequest().required(),
|
|
27
|
+
}).required();
|
|
28
|
+
}
|
|
29
|
+
|
|
13
30
|
static checkCartServiceability() {
|
|
14
31
|
return Joi.object({
|
|
15
32
|
body: CartModel.OpenApiCartServiceabilityRequest().required(),
|
|
@@ -40,6 +57,13 @@ class CartValidator {
|
|
|
40
57
|
}).required();
|
|
41
58
|
}
|
|
42
59
|
|
|
60
|
+
static deleteCart() {
|
|
61
|
+
return Joi.object({
|
|
62
|
+
id: Joi.string().allow(""),
|
|
63
|
+
body: CartModel.DeleteCartRequest().required(),
|
|
64
|
+
}).required();
|
|
65
|
+
}
|
|
66
|
+
|
|
43
67
|
static fetchAndvalidateCartItems() {
|
|
44
68
|
return Joi.object({
|
|
45
69
|
body: CartModel.OpenapiCartDetailsRequest().required(),
|
|
@@ -70,6 +94,76 @@ class CartValidator {
|
|
|
70
94
|
}).required();
|
|
71
95
|
}
|
|
72
96
|
|
|
97
|
+
static getAddressById() {
|
|
98
|
+
return Joi.object({
|
|
99
|
+
id: Joi.string().allow("").required(),
|
|
100
|
+
cartId: Joi.string().allow(""),
|
|
101
|
+
buyNow: Joi.boolean(),
|
|
102
|
+
mobileNo: Joi.string().allow(""),
|
|
103
|
+
checkoutMode: Joi.string().allow(""),
|
|
104
|
+
tags: Joi.string().allow(""),
|
|
105
|
+
isDefault: Joi.boolean(),
|
|
106
|
+
userId: Joi.string().allow(""),
|
|
107
|
+
}).required();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
static getAddresses() {
|
|
111
|
+
return Joi.object({
|
|
112
|
+
cartId: Joi.string().allow(""),
|
|
113
|
+
buyNow: Joi.boolean(),
|
|
114
|
+
mobileNo: Joi.string().allow(""),
|
|
115
|
+
checkoutMode: Joi.string().allow(""),
|
|
116
|
+
tags: Joi.string().allow(""),
|
|
117
|
+
isDefault: Joi.boolean(),
|
|
118
|
+
userId: Joi.string().allow(""),
|
|
119
|
+
}).required();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
static getAppCoupons() {
|
|
123
|
+
return Joi.object({
|
|
124
|
+
id: Joi.string().allow(""),
|
|
125
|
+
buyNow: Joi.boolean(),
|
|
126
|
+
}).required();
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
static getAvailableDeliveryModes() {
|
|
130
|
+
return Joi.object({
|
|
131
|
+
areaCode: Joi.string().allow("").required(),
|
|
132
|
+
id: Joi.string().allow(""),
|
|
133
|
+
}).required();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
static getCart() {
|
|
137
|
+
return Joi.object({
|
|
138
|
+
id: Joi.string().allow(""),
|
|
139
|
+
userId: Joi.string().allow(""),
|
|
140
|
+
i: Joi.boolean(),
|
|
141
|
+
b: Joi.boolean(),
|
|
142
|
+
assignCardId: Joi.number(),
|
|
143
|
+
buyNow: Joi.boolean(),
|
|
144
|
+
}).required();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
static getCartList() {
|
|
148
|
+
return Joi.object({
|
|
149
|
+
fromDate: Joi.string().allow(""),
|
|
150
|
+
toDate: Joi.string().allow(""),
|
|
151
|
+
filterOn: Joi.string().allow(""),
|
|
152
|
+
}).required();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
static getCartShareLink() {
|
|
156
|
+
return Joi.object({
|
|
157
|
+
body: CartModel.GetShareCartLinkRequest().required(),
|
|
158
|
+
}).required();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
static getCartSharedItems() {
|
|
162
|
+
return Joi.object({
|
|
163
|
+
token: Joi.string().allow("").required(),
|
|
164
|
+
}).required();
|
|
165
|
+
}
|
|
166
|
+
|
|
73
167
|
static getCouponById() {
|
|
74
168
|
return Joi.object({
|
|
75
169
|
id: Joi.string().allow("").required(),
|
|
@@ -99,6 +193,13 @@ class CartValidator {
|
|
|
99
193
|
}).required();
|
|
100
194
|
}
|
|
101
195
|
|
|
196
|
+
static getItemCount() {
|
|
197
|
+
return Joi.object({
|
|
198
|
+
id: Joi.string().allow(""),
|
|
199
|
+
buyNow: Joi.boolean(),
|
|
200
|
+
}).required();
|
|
201
|
+
}
|
|
202
|
+
|
|
102
203
|
static getPromosCouponConfig() {
|
|
103
204
|
return Joi.object({
|
|
104
205
|
entityType: Joi.string().allow(""),
|
|
@@ -131,12 +232,114 @@ class CartValidator {
|
|
|
131
232
|
}).required();
|
|
132
233
|
}
|
|
133
234
|
|
|
235
|
+
static getShipments() {
|
|
236
|
+
return Joi.object({
|
|
237
|
+
pickAtStoreUid: Joi.number(),
|
|
238
|
+
orderingStoreId: Joi.number(),
|
|
239
|
+
i: Joi.boolean(),
|
|
240
|
+
p: Joi.boolean(),
|
|
241
|
+
id: Joi.string().allow(""),
|
|
242
|
+
addressId: Joi.string().allow(""),
|
|
243
|
+
areaCode: Joi.string().allow(""),
|
|
244
|
+
orderType: Joi.string().allow(""),
|
|
245
|
+
}).required();
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
static getStoreAddressByUid() {
|
|
249
|
+
return Joi.object({
|
|
250
|
+
storeUid: Joi.number().required(),
|
|
251
|
+
}).required();
|
|
252
|
+
}
|
|
253
|
+
|
|
134
254
|
static overrideCart() {
|
|
135
255
|
return Joi.object({
|
|
136
256
|
body: CartModel.OverrideCheckoutReq().required(),
|
|
137
257
|
}).required();
|
|
138
258
|
}
|
|
139
259
|
|
|
260
|
+
static platformAddItems() {
|
|
261
|
+
return Joi.object({
|
|
262
|
+
i: Joi.boolean(),
|
|
263
|
+
b: Joi.boolean(),
|
|
264
|
+
buyNow: Joi.boolean(),
|
|
265
|
+
id: Joi.string().allow(""),
|
|
266
|
+
body: CartModel.PlatformAddCartRequest().required(),
|
|
267
|
+
}).required();
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
static platformCheckoutCart() {
|
|
271
|
+
return Joi.object({
|
|
272
|
+
id: Joi.string().allow(""),
|
|
273
|
+
body: CartModel.PlatformCartCheckoutDetailRequest().required(),
|
|
274
|
+
}).required();
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
static platformCheckoutCartV2() {
|
|
278
|
+
return Joi.object({
|
|
279
|
+
id: Joi.string().allow(""),
|
|
280
|
+
body: CartModel.PlatformCartCheckoutDetailV2Request().required(),
|
|
281
|
+
}).required();
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
static platformUpdateCart() {
|
|
285
|
+
return Joi.object({
|
|
286
|
+
id: Joi.string().allow(""),
|
|
287
|
+
i: Joi.boolean(),
|
|
288
|
+
b: Joi.boolean(),
|
|
289
|
+
buyNow: Joi.boolean(),
|
|
290
|
+
body: CartModel.PlatformUpdateCartRequest().required(),
|
|
291
|
+
}).required();
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
static removeAddress() {
|
|
295
|
+
return Joi.object({
|
|
296
|
+
id: Joi.string().allow("").required(),
|
|
297
|
+
userId: Joi.string().allow(""),
|
|
298
|
+
}).required();
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
static removeCoupon() {
|
|
302
|
+
return Joi.object({
|
|
303
|
+
uid: Joi.string().allow(""),
|
|
304
|
+
buyNow: Joi.boolean(),
|
|
305
|
+
}).required();
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
static selectAddress() {
|
|
309
|
+
return Joi.object({
|
|
310
|
+
cartId: Joi.string().allow(""),
|
|
311
|
+
buyNow: Joi.boolean(),
|
|
312
|
+
i: Joi.boolean(),
|
|
313
|
+
b: Joi.boolean(),
|
|
314
|
+
body: CartModel.PlatformSelectCartAddressRequest().required(),
|
|
315
|
+
}).required();
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
static selectPaymentMode() {
|
|
319
|
+
return Joi.object({
|
|
320
|
+
id: Joi.string().allow(""),
|
|
321
|
+
buyNow: Joi.boolean(),
|
|
322
|
+
orderType: Joi.string().allow(""),
|
|
323
|
+
body: CartModel.UpdateCartPaymentRequest().required(),
|
|
324
|
+
}).required();
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
static selectPaymentModeV2() {
|
|
328
|
+
return Joi.object({
|
|
329
|
+
id: Joi.string().allow(""),
|
|
330
|
+
buyNow: Joi.boolean(),
|
|
331
|
+
orderType: Joi.string().allow(""),
|
|
332
|
+
body: CartModel.UpdateCartPaymentRequestV2().required(),
|
|
333
|
+
}).required();
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
static updateAddress() {
|
|
337
|
+
return Joi.object({
|
|
338
|
+
id: Joi.string().allow("").required(),
|
|
339
|
+
body: CartModel.PlatformAddress().required(),
|
|
340
|
+
}).required();
|
|
341
|
+
}
|
|
342
|
+
|
|
140
343
|
static updateCart() {
|
|
141
344
|
return Joi.object({
|
|
142
345
|
cartId: Joi.string().allow("").required(),
|
|
@@ -145,6 +348,14 @@ class CartValidator {
|
|
|
145
348
|
}).required();
|
|
146
349
|
}
|
|
147
350
|
|
|
351
|
+
static updateCartMeta() {
|
|
352
|
+
return Joi.object({
|
|
353
|
+
id: Joi.string().allow(""),
|
|
354
|
+
buyNow: Joi.boolean(),
|
|
355
|
+
body: CartModel.PlatformCartMetaRequest().required(),
|
|
356
|
+
}).required();
|
|
357
|
+
}
|
|
358
|
+
|
|
148
359
|
static updateCartMetaConfig() {
|
|
149
360
|
return Joi.object({
|
|
150
361
|
cartMetaId: Joi.string().allow("").required(),
|
|
@@ -152,6 +363,21 @@ class CartValidator {
|
|
|
152
363
|
}).required();
|
|
153
364
|
}
|
|
154
365
|
|
|
366
|
+
static updateCartUser() {
|
|
367
|
+
return Joi.object({
|
|
368
|
+
id: Joi.string().allow(""),
|
|
369
|
+
body: CartModel.UpdateUserCartMapping().required(),
|
|
370
|
+
}).required();
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
static updateCartWithSharedItems() {
|
|
374
|
+
return Joi.object({
|
|
375
|
+
token: Joi.string().allow("").required(),
|
|
376
|
+
action: Joi.string().allow("").required(),
|
|
377
|
+
cartId: Joi.string().allow(""),
|
|
378
|
+
}).required();
|
|
379
|
+
}
|
|
380
|
+
|
|
155
381
|
static updateCoupon() {
|
|
156
382
|
return Joi.object({
|
|
157
383
|
id: Joi.string().allow("").required(),
|
|
@@ -179,6 +405,30 @@ class CartValidator {
|
|
|
179
405
|
body: CartModel.PromotionPartialUpdate().required(),
|
|
180
406
|
}).required();
|
|
181
407
|
}
|
|
408
|
+
|
|
409
|
+
static updateShipments() {
|
|
410
|
+
return Joi.object({
|
|
411
|
+
i: Joi.boolean(),
|
|
412
|
+
p: Joi.boolean(),
|
|
413
|
+
id: Joi.string().allow(""),
|
|
414
|
+
addressId: Joi.string().allow(""),
|
|
415
|
+
areaCode: Joi.string().allow(""),
|
|
416
|
+
orderType: Joi.string().allow(""),
|
|
417
|
+
body: CartModel.UpdateCartShipmentRequest().required(),
|
|
418
|
+
}).required();
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
static validateCouponForPayment() {
|
|
422
|
+
return Joi.object({
|
|
423
|
+
id: Joi.string().allow(""),
|
|
424
|
+
buyNow: Joi.boolean(),
|
|
425
|
+
addressId: Joi.string().allow(""),
|
|
426
|
+
paymentMode: Joi.string().allow(""),
|
|
427
|
+
paymentIdentifier: Joi.string().allow(""),
|
|
428
|
+
aggregatorName: Joi.string().allow(""),
|
|
429
|
+
merchantCode: Joi.string().allow(""),
|
|
430
|
+
}).required();
|
|
431
|
+
}
|
|
182
432
|
}
|
|
183
433
|
|
|
184
434
|
module.exports = CartValidator;
|
|
@@ -9,33 +9,47 @@ declare class CartModel {
|
|
|
9
9
|
static AddProductCart(): any;
|
|
10
10
|
static AppliedFreeArticles(): any;
|
|
11
11
|
static AppliedPromotion(): any;
|
|
12
|
+
static ApplyCouponRequest(): any;
|
|
12
13
|
static ArticlePriceInfo(): any;
|
|
13
14
|
static BaseInfo(): any;
|
|
14
15
|
static BasePrice(): any;
|
|
15
16
|
static BulkBundleRestriction(): any;
|
|
16
17
|
static BuyRules(): any;
|
|
17
18
|
static CartBreakup(): any;
|
|
19
|
+
static CartCheckoutResponse(): any;
|
|
18
20
|
static CartCurrency(): any;
|
|
21
|
+
static CartDeliveryModesResponse(): any;
|
|
19
22
|
static CartDetailResponse(): any;
|
|
20
23
|
static CartItem(): any;
|
|
24
|
+
static CartItemCountResponse(): any;
|
|
21
25
|
static CartItemMeta(): any;
|
|
26
|
+
static CartList(): any;
|
|
22
27
|
static CartMetaConfigAdd(): any;
|
|
23
28
|
static CartMetaConfigUpdate(): any;
|
|
29
|
+
static CartMetaMissingResponse(): any;
|
|
30
|
+
static CartMetaResponse(): any;
|
|
24
31
|
static CartProduct(): any;
|
|
25
32
|
static CartProductIdentifer(): any;
|
|
26
33
|
static CartProductInfo(): any;
|
|
27
34
|
static CategoryInfo(): any;
|
|
28
35
|
static Charges(): any;
|
|
36
|
+
static CheckCart(): any;
|
|
29
37
|
static CompareObject(): any;
|
|
38
|
+
static Coupon(): any;
|
|
30
39
|
static CouponAction(): any;
|
|
31
40
|
static CouponAdd(): any;
|
|
32
41
|
static CouponAuthor(): any;
|
|
33
42
|
static CouponBreakup(): any;
|
|
34
43
|
static CouponDateMeta(): any;
|
|
44
|
+
static CouponDetails(): any;
|
|
35
45
|
static CouponPartialUpdate(): any;
|
|
36
46
|
static CouponSchedule(): any;
|
|
37
47
|
static CouponsResponse(): any;
|
|
38
48
|
static CouponUpdate(): any;
|
|
49
|
+
static CouponValidity(): any;
|
|
50
|
+
static DeleteAddressResponse(): any;
|
|
51
|
+
static DeleteCartDetailResponse(): any;
|
|
52
|
+
static DeleteCartRequest(): any;
|
|
39
53
|
static DeliveryCharges(): any;
|
|
40
54
|
static DiscountOffer(): any;
|
|
41
55
|
static DiscountRule(): any;
|
|
@@ -44,10 +58,16 @@ declare class CartModel {
|
|
|
44
58
|
static DisplayMeta(): any;
|
|
45
59
|
static DisplayMeta1(): any;
|
|
46
60
|
static DisplayMetaDict(): any;
|
|
61
|
+
static Files(): any;
|
|
47
62
|
static FreeGiftItem(): any;
|
|
63
|
+
static GeoLocation(): any;
|
|
64
|
+
static GetCouponResponse(): any;
|
|
65
|
+
static GetShareCartLinkRequest(): any;
|
|
66
|
+
static GetShareCartLinkResponse(): any;
|
|
48
67
|
static Identifier(): any;
|
|
49
68
|
static ItemCriteria(): any;
|
|
50
69
|
static LoyaltyPoints(): any;
|
|
70
|
+
static MultiCartResponse(): any;
|
|
51
71
|
static MultiTenderPaymentMeta(): any;
|
|
52
72
|
static MultiTenderPaymentMethod(): any;
|
|
53
73
|
static OpenapiCartDetailsRequest(): any;
|
|
@@ -68,10 +88,25 @@ declare class CartModel {
|
|
|
68
88
|
static Ownership1(): any;
|
|
69
89
|
static Ownership2(): any;
|
|
70
90
|
static Page(): any;
|
|
91
|
+
static PageCoupon(): any;
|
|
71
92
|
static PaymentAllowValue(): any;
|
|
72
93
|
static PaymentAllowValue1(): any;
|
|
94
|
+
static PaymentCouponValidate(): any;
|
|
95
|
+
static PaymentMeta(): any;
|
|
96
|
+
static PaymentMethod(): any;
|
|
73
97
|
static PaymentModes(): any;
|
|
74
98
|
static PaymentSelectionLock(): any;
|
|
99
|
+
static PickupStoreDetail(): any;
|
|
100
|
+
static PlatformAddCartRequest(): any;
|
|
101
|
+
static PlatformAddress(): any;
|
|
102
|
+
static PlatformCartCheckoutDetailRequest(): any;
|
|
103
|
+
static PlatformCartCheckoutDetailV2Request(): any;
|
|
104
|
+
static PlatformCartMetaRequest(): any;
|
|
105
|
+
static PlatformCartShipmentsResponse(): any;
|
|
106
|
+
static PlatformGetAddressesResponse(): any;
|
|
107
|
+
static PlatformSelectCartAddressRequest(): any;
|
|
108
|
+
static PlatformShipmentResponse(): any;
|
|
109
|
+
static PlatformUpdateCartRequest(): any;
|
|
75
110
|
static PostOrder(): any;
|
|
76
111
|
static PostOrder1(): any;
|
|
77
112
|
static PriceRange(): any;
|
|
@@ -100,13 +135,30 @@ declare class CartModel {
|
|
|
100
135
|
static Restrictions1(): any;
|
|
101
136
|
static Rule(): any;
|
|
102
137
|
static RuleDefinition(): any;
|
|
138
|
+
static SaveAddressResponse(): any;
|
|
139
|
+
static SharedCart(): any;
|
|
140
|
+
static SharedCartDetails(): any;
|
|
141
|
+
static SharedCartResponse(): any;
|
|
142
|
+
static ShipmentArticle(): any;
|
|
103
143
|
static ShipmentPromise(): any;
|
|
104
144
|
static ShippingAddress(): any;
|
|
145
|
+
static StaffCheckout(): any;
|
|
105
146
|
static State(): any;
|
|
147
|
+
static StoreDetailsResponse(): any;
|
|
148
|
+
static StoreInfo(): any;
|
|
106
149
|
static SuccessMessage(): any;
|
|
150
|
+
static Tags(): any;
|
|
151
|
+
static UpdateAddressResponse(): any;
|
|
107
152
|
static UpdateCartDetailResponse(): any;
|
|
153
|
+
static UpdateCartPaymentRequest(): any;
|
|
154
|
+
static UpdateCartPaymentRequestV2(): any;
|
|
108
155
|
static UpdateCartRequest(): any;
|
|
156
|
+
static UpdateCartShipmentItem(): any;
|
|
157
|
+
static UpdateCartShipmentRequest(): any;
|
|
109
158
|
static UpdateProductCart(): any;
|
|
159
|
+
static UpdateUserCartMapping(): any;
|
|
160
|
+
static UserCartMappingResponse(): any;
|
|
161
|
+
static UserInfo(): any;
|
|
110
162
|
static UserRegistered(): any;
|
|
111
163
|
static UsesRemaining(): any;
|
|
112
164
|
static UsesRemaining1(): any;
|