@gofynd/fdk-client-javascript 1.0.1 → 1.0.2
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/documentation/application/CART.md +251 -251
- package/documentation/application/CATALOG.md +414 -414
- package/documentation/application/CONTENT.md +15 -1
- package/documentation/application/ORDER.md +290 -290
- package/documentation/application/PAYMENT.md +255 -255
- package/documentation/application/POSCART.md +297 -297
- package/documentation/platform/CART.md +499 -499
- package/documentation/platform/CATALOG.md +3088 -2702
- package/documentation/platform/COMPANYPROFILE.md +201 -201
- package/documentation/platform/CONTENT.md +123 -1
- package/documentation/platform/ORDER.md +1233 -1158
- package/documentation/platform/PARTNER.md +7 -7
- package/documentation/platform/PAYMENT.md +83 -83
- package/package.json +1 -1
- package/sdk/application/ApplicationConfig.js +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +619 -108
- package/sdk/application/Cart/CartApplicationModel.d.ts +7 -7
- package/sdk/application/Cart/CartApplicationModel.js +335 -335
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.js +730 -134
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +21 -21
- package/sdk/application/Catalog/CatalogApplicationModel.js +547 -547
- package/sdk/application/Common/CommonApplicationClient.js +48 -8
- package/sdk/application/Communication/CommunicationApplicationClient.js +75 -14
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +1 -1
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +392 -66
- package/sdk/application/Content/ContentApplicationClient.js +444 -76
- package/sdk/application/Content/ContentApplicationModel.d.ts +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +11 -1
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -12
- package/sdk/application/Lead/LeadApplicationClient.js +164 -30
- package/sdk/application/Logistic/LogisticApplicationClient.js +98 -16
- package/sdk/application/Order/OrderApplicationClient.d.ts +1 -1
- package/sdk/application/Order/OrderApplicationClient.js +287 -54
- package/sdk/application/Order/OrderApplicationModel.d.ts +19 -19
- package/sdk/application/Order/OrderApplicationModel.js +357 -357
- package/sdk/application/Payment/PaymentApplicationClient.js +961 -186
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3 -3
- package/sdk/application/Payment/PaymentApplicationModel.js +352 -352
- package/sdk/application/PosCart/PosCartApplicationClient.js +645 -114
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +15 -15
- package/sdk/application/PosCart/PosCartApplicationModel.js +389 -389
- package/sdk/application/Rewards/RewardsApplicationClient.js +168 -28
- package/sdk/application/Share/ShareApplicationClient.js +157 -32
- package/sdk/application/Theme/ThemeApplicationClient.js +94 -16
- package/sdk/application/User/UserApplicationClient.js +806 -148
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +16 -8
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +191 -34
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +103 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +103 -16
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +24 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +299 -54
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +34 -17
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +409 -72
- package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -35
- package/sdk/platform/Cart/CartPlatformModel.js +617 -617
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +167 -114
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1562 -453
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +39 -39
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +314 -196
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2459 -718
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +103 -94
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2063 -1797
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +17 -15
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +95 -76
- package/sdk/platform/Common/CommonPlatformClient.d.ts +4 -2
- package/sdk/platform/Common/CommonPlatformClient.js +51 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -40
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1000 -168
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +28 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +27 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +335 -54
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +10 -10
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +278 -278
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +56 -28
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +702 -118
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +457 -82
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +148 -67
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1724 -284
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +4 -0
- package/sdk/platform/Content/ContentPlatformModel.js +43 -1
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +21 -10
- package/sdk/platform/Discount/DiscountPlatformClient.js +270 -44
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +8 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +102 -16
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +12 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +150 -24
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +27 -14
- package/sdk/platform/Inventory/InventoryPlatformClient.js +316 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +26 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +311 -52
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +22 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +266 -44
- package/sdk/platform/OAuthClient.js +8 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -3
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +78 -14
- package/sdk/platform/Order/OrderPlatformClient.d.ts +95 -43
- package/sdk/platform/Order/OrderPlatformClient.js +1062 -180
- package/sdk/platform/Order/OrderPlatformModel.d.ts +64 -60
- package/sdk/platform/Order/OrderPlatformModel.js +1481 -1425
- package/sdk/platform/Order/OrderPlatformValidator.js +5 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -8
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +22 -11
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +287 -56
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +21 -11
- package/sdk/platform/Payment/PaymentPlatformClient.js +263 -48
- package/sdk/platform/Payment/PaymentPlatformModel.js +122 -122
- package/sdk/platform/PlatformApplicationClient.d.ts +2959 -2787
- package/sdk/platform/PlatformApplicationClient.js +3420 -3212
- package/sdk/platform/PlatformClient.d.ts +2959 -2787
- package/sdk/platform/PlatformClient.js +3420 -3212
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +26 -13
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +308 -54
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +8 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +94 -16
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +47 -23
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +571 -96
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +24 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +296 -48
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +12 -6
- package/sdk/platform/Webhook/WebhookPlatformClient.js +157 -30
- package/sdk/public/Configuration/ConfigurationPublicClient.js +51 -8
- package/sdk/public/Inventory/InventoryPublicClient.js +149 -26
- package/sdk/public/Webhook/WebhookPublicClient.js +51 -10
|
@@ -1,21 +1,35 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
class CartModel {
|
|
4
|
-
static
|
|
4
|
+
static CartCurrency() {
|
|
5
5
|
return Joi.object({
|
|
6
|
-
|
|
6
|
+
code: Joi.string().allow(""),
|
|
7
|
+
|
|
8
|
+
symbol: Joi.string().allow(""),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
7
11
|
|
|
12
|
+
static PaymentSelectionLock() {
|
|
13
|
+
return Joi.object({
|
|
8
14
|
payment_identifier: Joi.string().allow(""),
|
|
9
15
|
|
|
16
|
+
enabled: Joi.boolean(),
|
|
17
|
+
|
|
10
18
|
default_options: Joi.string().allow(""),
|
|
11
19
|
});
|
|
12
20
|
}
|
|
13
21
|
|
|
14
|
-
static
|
|
22
|
+
static ProductAvailability() {
|
|
15
23
|
return Joi.object({
|
|
16
|
-
|
|
24
|
+
sizes: Joi.array().items(Joi.string().allow("")),
|
|
17
25
|
|
|
18
|
-
|
|
26
|
+
is_valid: Joi.boolean(),
|
|
27
|
+
|
|
28
|
+
deliverable: Joi.boolean(),
|
|
29
|
+
|
|
30
|
+
other_store_quantity: Joi.number(),
|
|
31
|
+
|
|
32
|
+
out_of_stock: Joi.boolean(),
|
|
19
33
|
});
|
|
20
34
|
}
|
|
21
35
|
|
|
@@ -23,61 +37,61 @@ class CartModel {
|
|
|
23
37
|
return Joi.object({
|
|
24
38
|
aspect_ratio: Joi.string().allow(""),
|
|
25
39
|
|
|
26
|
-
secure_url: Joi.string().allow(""),
|
|
27
|
-
|
|
28
40
|
url: Joi.string().allow(""),
|
|
41
|
+
|
|
42
|
+
secure_url: Joi.string().allow(""),
|
|
29
43
|
});
|
|
30
44
|
}
|
|
31
45
|
|
|
32
|
-
static
|
|
46
|
+
static BaseInfo() {
|
|
33
47
|
return Joi.object({
|
|
34
|
-
|
|
48
|
+
name: Joi.string().allow(""),
|
|
49
|
+
|
|
50
|
+
uid: Joi.number(),
|
|
35
51
|
});
|
|
36
52
|
}
|
|
37
53
|
|
|
38
|
-
static
|
|
54
|
+
static CategoryInfo() {
|
|
39
55
|
return Joi.object({
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
type: Joi.string().allow(""),
|
|
56
|
+
name: Joi.string().allow(""),
|
|
43
57
|
|
|
44
|
-
|
|
58
|
+
uid: Joi.number(),
|
|
45
59
|
});
|
|
46
60
|
}
|
|
47
61
|
|
|
48
|
-
static
|
|
62
|
+
static ActionQuery() {
|
|
49
63
|
return Joi.object({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
name: Joi.string().allow(""),
|
|
64
|
+
product_slug: Joi.array().items(Joi.string().allow("")),
|
|
53
65
|
});
|
|
54
66
|
}
|
|
55
67
|
|
|
56
|
-
static
|
|
68
|
+
static ProductAction() {
|
|
57
69
|
return Joi.object({
|
|
58
|
-
|
|
70
|
+
url: Joi.string().allow(""),
|
|
59
71
|
|
|
60
|
-
|
|
72
|
+
query: CartModel.ActionQuery(),
|
|
73
|
+
|
|
74
|
+
type: Joi.string().allow(""),
|
|
61
75
|
});
|
|
62
76
|
}
|
|
63
77
|
|
|
64
78
|
static CartProduct() {
|
|
65
79
|
return Joi.object({
|
|
80
|
+
name: Joi.string().allow(""),
|
|
81
|
+
|
|
66
82
|
images: Joi.array().items(CartModel.ProductImage()),
|
|
67
83
|
|
|
68
84
|
uid: Joi.number(),
|
|
69
85
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
type: Joi.string().allow(""),
|
|
86
|
+
brand: CartModel.BaseInfo(),
|
|
73
87
|
|
|
74
|
-
|
|
88
|
+
categories: Joi.array().items(CartModel.CategoryInfo()),
|
|
75
89
|
|
|
76
|
-
|
|
90
|
+
action: CartModel.ProductAction(),
|
|
77
91
|
|
|
78
92
|
slug: Joi.string().allow(""),
|
|
79
93
|
|
|
80
|
-
|
|
94
|
+
type: Joi.string().allow(""),
|
|
81
95
|
});
|
|
82
96
|
}
|
|
83
97
|
|
|
@@ -85,13 +99,13 @@ class CartModel {
|
|
|
85
99
|
return Joi.object({
|
|
86
100
|
currency_code: Joi.string().allow(""),
|
|
87
101
|
|
|
88
|
-
|
|
102
|
+
effective: Joi.number(),
|
|
89
103
|
|
|
90
|
-
|
|
104
|
+
marked: Joi.number(),
|
|
91
105
|
|
|
92
106
|
selling: Joi.number(),
|
|
93
107
|
|
|
94
|
-
|
|
108
|
+
currency_symbol: Joi.string().allow(""),
|
|
95
109
|
|
|
96
110
|
add_on: Joi.number(),
|
|
97
111
|
});
|
|
@@ -105,29 +119,15 @@ class CartModel {
|
|
|
105
119
|
});
|
|
106
120
|
}
|
|
107
121
|
|
|
108
|
-
static ProductAvailability() {
|
|
109
|
-
return Joi.object({
|
|
110
|
-
is_valid: Joi.boolean(),
|
|
111
|
-
|
|
112
|
-
sizes: Joi.array().items(Joi.string().allow("")),
|
|
113
|
-
|
|
114
|
-
deliverable: Joi.boolean(),
|
|
115
|
-
|
|
116
|
-
other_store_quantity: Joi.number(),
|
|
117
|
-
|
|
118
|
-
out_of_stock: Joi.boolean(),
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
122
|
static BasePrice() {
|
|
123
123
|
return Joi.object({
|
|
124
124
|
marked: Joi.number(),
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
currency_code: Joi.string().allow(""),
|
|
127
127
|
|
|
128
128
|
currency_symbol: Joi.string().allow(""),
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
effective: Joi.number(),
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -141,27 +141,27 @@ class CartModel {
|
|
|
141
141
|
|
|
142
142
|
static ProductArticle() {
|
|
143
143
|
return Joi.object({
|
|
144
|
-
|
|
144
|
+
store: CartModel.BaseInfo(),
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
147
147
|
|
|
148
148
|
extra_meta: Joi.any(),
|
|
149
149
|
|
|
150
|
-
uid: Joi.string().allow(""),
|
|
151
|
-
|
|
152
150
|
size: Joi.string().allow(""),
|
|
153
151
|
|
|
154
|
-
|
|
152
|
+
price: CartModel.ArticlePriceInfo(),
|
|
153
|
+
|
|
154
|
+
uid: Joi.string().allow(""),
|
|
155
155
|
|
|
156
156
|
_custom_json: Joi.any(),
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
seller: CartModel.BaseInfo(),
|
|
159
159
|
|
|
160
160
|
quantity: Joi.number(),
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
parent_item_identifiers: Joi.any(),
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
type: Joi.string().allow(""),
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
|
|
@@ -187,63 +187,55 @@ class CartModel {
|
|
|
187
187
|
|
|
188
188
|
static AppliedPromotion() {
|
|
189
189
|
return Joi.object({
|
|
190
|
-
|
|
190
|
+
amount: Joi.number(),
|
|
191
191
|
|
|
192
|
-
|
|
192
|
+
mrp_promotion: Joi.boolean(),
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
promo_id: Joi.string().allow(""),
|
|
195
195
|
|
|
196
|
-
|
|
196
|
+
offer_text: Joi.string().allow(""),
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
promotion_type: Joi.string().allow(""),
|
|
199
199
|
|
|
200
|
-
|
|
200
|
+
ownership: CartModel.Ownership(),
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
article_quantity: Joi.number(),
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
static CartProductInfo() {
|
|
207
207
|
return Joi.object({
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
product: CartModel.CartProduct(),
|
|
211
|
-
|
|
212
|
-
parent_item_identifiers: Joi.any(),
|
|
213
|
-
|
|
214
|
-
price: CartModel.ProductPriceInfo(),
|
|
215
|
-
|
|
216
|
-
key: Joi.string().allow(""),
|
|
217
|
-
|
|
218
|
-
message: Joi.string().allow(""),
|
|
208
|
+
discount: Joi.string().allow(""),
|
|
219
209
|
|
|
220
210
|
coupon_message: Joi.string().allow(""),
|
|
221
211
|
|
|
222
212
|
availability: CartModel.ProductAvailability(),
|
|
223
213
|
|
|
224
|
-
|
|
214
|
+
product: CartModel.CartProduct(),
|
|
225
215
|
|
|
226
216
|
price_per_unit: CartModel.ProductPriceInfo(),
|
|
227
217
|
|
|
228
218
|
article: CartModel.ProductArticle(),
|
|
229
219
|
|
|
220
|
+
price: CartModel.ProductPriceInfo(),
|
|
221
|
+
|
|
222
|
+
is_set: Joi.boolean(),
|
|
223
|
+
|
|
224
|
+
bulk_offer: Joi.any(),
|
|
225
|
+
|
|
230
226
|
identifiers: CartModel.CartProductIdentifer().required(),
|
|
231
227
|
|
|
232
228
|
promo_meta: CartModel.PromoMeta(),
|
|
233
229
|
|
|
234
|
-
|
|
230
|
+
message: Joi.string().allow(""),
|
|
235
231
|
|
|
236
232
|
quantity: Joi.number(),
|
|
237
233
|
|
|
238
234
|
promotions_applied: Joi.array().items(CartModel.AppliedPromotion()),
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
235
|
|
|
242
|
-
|
|
243
|
-
return Joi.object({
|
|
244
|
-
max: Joi.number(),
|
|
236
|
+
parent_item_identifiers: Joi.any(),
|
|
245
237
|
|
|
246
|
-
|
|
238
|
+
key: Joi.string().allow(""),
|
|
247
239
|
});
|
|
248
240
|
}
|
|
249
241
|
|
|
@@ -255,11 +247,19 @@ class CartModel {
|
|
|
255
247
|
});
|
|
256
248
|
}
|
|
257
249
|
|
|
258
|
-
static
|
|
250
|
+
static PromiseTimestamp() {
|
|
259
251
|
return Joi.object({
|
|
260
|
-
|
|
252
|
+
max: Joi.number(),
|
|
253
|
+
|
|
254
|
+
min: Joi.number(),
|
|
255
|
+
});
|
|
256
|
+
}
|
|
261
257
|
|
|
258
|
+
static ShipmentPromise() {
|
|
259
|
+
return Joi.object({
|
|
262
260
|
formatted: CartModel.PromiseFormatted(),
|
|
261
|
+
|
|
262
|
+
timestamp: CartModel.PromiseTimestamp(),
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -267,39 +267,39 @@ class CartModel {
|
|
|
267
267
|
return Joi.object({
|
|
268
268
|
convenience_fee: Joi.number(),
|
|
269
269
|
|
|
270
|
-
fynd_cash: Joi.number(),
|
|
271
|
-
|
|
272
270
|
coupon: Joi.number(),
|
|
273
271
|
|
|
274
|
-
|
|
272
|
+
discount: Joi.number(),
|
|
275
273
|
|
|
276
|
-
|
|
274
|
+
cod_charge: Joi.number(),
|
|
277
275
|
|
|
278
|
-
|
|
276
|
+
mrp_total: Joi.number(),
|
|
279
277
|
|
|
280
|
-
|
|
278
|
+
gst_charges: Joi.number(),
|
|
279
|
+
|
|
280
|
+
delivery_charge: Joi.number(),
|
|
281
281
|
|
|
282
282
|
you_saved: Joi.number(),
|
|
283
283
|
|
|
284
|
-
|
|
284
|
+
vog: Joi.number(),
|
|
285
285
|
|
|
286
|
-
|
|
286
|
+
subtotal: Joi.number(),
|
|
287
287
|
|
|
288
288
|
total: Joi.number(),
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
fynd_cash: Joi.number(),
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
static LoyaltyPoints() {
|
|
295
295
|
return Joi.object({
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
description: Joi.string().allow(""),
|
|
296
|
+
total: Joi.number(),
|
|
299
297
|
|
|
300
298
|
applicable: Joi.number(),
|
|
301
299
|
|
|
302
|
-
|
|
300
|
+
description: Joi.string().allow(""),
|
|
301
|
+
|
|
302
|
+
is_applied: Joi.boolean(),
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
305
|
|
|
@@ -307,28 +307,28 @@ class CartModel {
|
|
|
307
307
|
return Joi.object({
|
|
308
308
|
currency_code: Joi.string().allow(""),
|
|
309
309
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
key: Joi.string().allow(""),
|
|
310
|
+
value: Joi.number(),
|
|
313
311
|
|
|
314
312
|
currency_symbol: Joi.string().allow(""),
|
|
315
313
|
|
|
316
|
-
|
|
314
|
+
message: Joi.array().items(Joi.string().allow("")),
|
|
317
315
|
|
|
318
316
|
display: Joi.string().allow(""),
|
|
317
|
+
|
|
318
|
+
key: Joi.string().allow(""),
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
static CouponBreakup() {
|
|
323
323
|
return Joi.object({
|
|
324
|
-
is_applied: Joi.boolean(),
|
|
325
|
-
|
|
326
|
-
message: Joi.string().allow(""),
|
|
327
|
-
|
|
328
324
|
uid: Joi.string().allow(""),
|
|
329
325
|
|
|
326
|
+
is_applied: Joi.boolean(),
|
|
327
|
+
|
|
330
328
|
value: Joi.number(),
|
|
331
329
|
|
|
330
|
+
message: Joi.string().allow(""),
|
|
331
|
+
|
|
332
332
|
code: Joi.string().allow(""),
|
|
333
333
|
|
|
334
334
|
type: Joi.string().allow(""),
|
|
@@ -349,67 +349,67 @@ class CartModel {
|
|
|
349
349
|
|
|
350
350
|
static CartDetailResponse() {
|
|
351
351
|
return Joi.object({
|
|
352
|
-
|
|
352
|
+
id: Joi.string().allow(""),
|
|
353
353
|
|
|
354
|
-
|
|
354
|
+
checkout_mode: Joi.string().allow(""),
|
|
355
355
|
|
|
356
|
-
|
|
356
|
+
is_valid: Joi.boolean(),
|
|
357
357
|
|
|
358
|
-
|
|
358
|
+
comment: Joi.string().allow(""),
|
|
359
359
|
|
|
360
360
|
restrict_checkout: Joi.boolean(),
|
|
361
361
|
|
|
362
|
-
last_modified: Joi.string().allow(""),
|
|
363
|
-
|
|
364
362
|
currency: CartModel.CartCurrency(),
|
|
365
363
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
comment: Joi.string().allow(""),
|
|
369
|
-
|
|
370
|
-
delivery_promise: CartModel.ShipmentPromise(),
|
|
364
|
+
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
371
365
|
|
|
372
366
|
delivery_charge_info: Joi.string().allow(""),
|
|
373
367
|
|
|
374
|
-
|
|
368
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
369
|
+
|
|
370
|
+
last_modified: Joi.string().allow(""),
|
|
375
371
|
|
|
376
372
|
buy_now: Joi.boolean(),
|
|
377
373
|
|
|
378
|
-
|
|
374
|
+
message: Joi.string().allow(""),
|
|
379
375
|
|
|
380
|
-
|
|
376
|
+
delivery_promise: CartModel.ShipmentPromise(),
|
|
381
377
|
|
|
382
378
|
coupon_text: Joi.string().allow(""),
|
|
379
|
+
|
|
380
|
+
gstin: Joi.string().allow(""),
|
|
381
|
+
|
|
382
|
+
breakup_values: CartModel.CartBreakup(),
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
static AddProductCart() {
|
|
387
387
|
return Joi.object({
|
|
388
|
-
|
|
388
|
+
product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
|
|
389
389
|
|
|
390
390
|
store_id: Joi.number(),
|
|
391
391
|
|
|
392
|
-
item_size: Joi.string().allow(""),
|
|
393
|
-
|
|
394
392
|
extra_meta: Joi.any(),
|
|
395
393
|
|
|
396
|
-
article_assignment: Joi.any(),
|
|
397
|
-
|
|
398
|
-
item_id: Joi.number(),
|
|
399
|
-
|
|
400
394
|
seller_id: Joi.number(),
|
|
401
395
|
|
|
402
|
-
|
|
396
|
+
article_assignment: Joi.any(),
|
|
397
|
+
|
|
398
|
+
item_size: Joi.string().allow(""),
|
|
403
399
|
|
|
404
400
|
_custom_json: Joi.any(),
|
|
405
401
|
|
|
406
|
-
|
|
402
|
+
item_id: Joi.number(),
|
|
403
|
+
|
|
404
|
+
pos: Joi.boolean(),
|
|
407
405
|
|
|
408
406
|
article_id: Joi.string().allow(""),
|
|
409
407
|
|
|
410
408
|
quantity: Joi.number(),
|
|
411
409
|
|
|
412
|
-
|
|
410
|
+
display: Joi.string().allow(""),
|
|
411
|
+
|
|
412
|
+
parent_item_identifiers: Joi.any(),
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
|
|
@@ -421,11 +421,11 @@ class CartModel {
|
|
|
421
421
|
|
|
422
422
|
static AddCartDetailResponse() {
|
|
423
423
|
return Joi.object({
|
|
424
|
-
|
|
424
|
+
message: Joi.string().allow(""),
|
|
425
425
|
|
|
426
426
|
partial: Joi.boolean(),
|
|
427
427
|
|
|
428
|
-
|
|
428
|
+
success: Joi.boolean(),
|
|
429
429
|
|
|
430
430
|
cart: CartModel.CartDetailResponse(),
|
|
431
431
|
});
|
|
@@ -433,40 +433,40 @@ class CartModel {
|
|
|
433
433
|
|
|
434
434
|
static UpdateProductCart() {
|
|
435
435
|
return Joi.object({
|
|
436
|
-
|
|
436
|
+
extra_meta: Joi.any(),
|
|
437
437
|
|
|
438
438
|
item_size: Joi.string().allow(""),
|
|
439
439
|
|
|
440
|
-
|
|
440
|
+
_custom_json: Joi.any(),
|
|
441
441
|
|
|
442
442
|
item_id: Joi.number(),
|
|
443
443
|
|
|
444
444
|
identifiers: CartModel.CartProductIdentifer().required(),
|
|
445
445
|
|
|
446
|
-
_custom_json: Joi.any(),
|
|
447
|
-
|
|
448
|
-
item_index: Joi.number(),
|
|
449
|
-
|
|
450
446
|
article_id: Joi.string().allow(""),
|
|
451
447
|
|
|
452
448
|
quantity: Joi.number(),
|
|
449
|
+
|
|
450
|
+
item_index: Joi.number(),
|
|
451
|
+
|
|
452
|
+
parent_item_identifiers: Joi.any(),
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
static UpdateCartRequest() {
|
|
457
457
|
return Joi.object({
|
|
458
|
-
operation: Joi.string().allow("").required(),
|
|
459
|
-
|
|
460
458
|
items: Joi.array().items(CartModel.UpdateProductCart()),
|
|
459
|
+
|
|
460
|
+
operation: Joi.string().allow("").required(),
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
static UpdateCartDetailResponse() {
|
|
465
465
|
return Joi.object({
|
|
466
|
-
success: Joi.boolean(),
|
|
467
|
-
|
|
468
466
|
message: Joi.string().allow(""),
|
|
469
467
|
|
|
468
|
+
success: Joi.boolean(),
|
|
469
|
+
|
|
470
470
|
cart: CartModel.CartDetailResponse(),
|
|
471
471
|
});
|
|
472
472
|
}
|
|
@@ -481,37 +481,37 @@ class CartModel {
|
|
|
481
481
|
return Joi.object({
|
|
482
482
|
has_previous: Joi.boolean(),
|
|
483
483
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
total: Joi.number(),
|
|
484
|
+
has_next: Joi.boolean(),
|
|
487
485
|
|
|
488
486
|
total_item_count: Joi.number(),
|
|
489
487
|
|
|
490
|
-
|
|
488
|
+
current: Joi.number(),
|
|
489
|
+
|
|
490
|
+
total: Joi.number(),
|
|
491
491
|
});
|
|
492
492
|
}
|
|
493
493
|
|
|
494
494
|
static Coupon() {
|
|
495
495
|
return Joi.object({
|
|
496
|
-
is_applied: Joi.boolean(),
|
|
497
|
-
|
|
498
|
-
message: Joi.string().allow(""),
|
|
499
|
-
|
|
500
496
|
max_discount_value: Joi.number(),
|
|
501
497
|
|
|
502
|
-
|
|
498
|
+
minimum_cart_value: Joi.number(),
|
|
503
499
|
|
|
504
|
-
|
|
500
|
+
is_applied: Joi.boolean(),
|
|
501
|
+
|
|
502
|
+
title: Joi.string().allow(""),
|
|
505
503
|
|
|
506
504
|
coupon_code: Joi.string().allow(""),
|
|
507
505
|
|
|
508
|
-
|
|
506
|
+
sub_title: Joi.string().allow(""),
|
|
509
507
|
|
|
510
|
-
|
|
508
|
+
message: Joi.string().allow(""),
|
|
511
509
|
|
|
512
510
|
expires_on: Joi.string().allow(""),
|
|
513
511
|
|
|
514
|
-
|
|
512
|
+
is_applicable: Joi.boolean(),
|
|
513
|
+
|
|
514
|
+
coupon_value: Joi.number(),
|
|
515
515
|
});
|
|
516
516
|
}
|
|
517
517
|
|
|
@@ -529,51 +529,51 @@ class CartModel {
|
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
-
static OfferSeller() {
|
|
533
|
-
return Joi.object({
|
|
534
|
-
uid: Joi.number(),
|
|
535
|
-
|
|
536
|
-
name: Joi.string().allow(""),
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
|
|
540
532
|
static OfferPrice() {
|
|
541
533
|
return Joi.object({
|
|
542
534
|
currency_code: Joi.string().allow(""),
|
|
543
535
|
|
|
544
|
-
marked: Joi.number(),
|
|
545
|
-
|
|
546
|
-
currency_symbol: Joi.string().allow(""),
|
|
547
|
-
|
|
548
536
|
effective: Joi.number(),
|
|
549
537
|
|
|
538
|
+
marked: Joi.number(),
|
|
539
|
+
|
|
550
540
|
bulk_effective: Joi.number(),
|
|
541
|
+
|
|
542
|
+
currency_symbol: Joi.string().allow(""),
|
|
551
543
|
});
|
|
552
544
|
}
|
|
553
545
|
|
|
554
546
|
static OfferItem() {
|
|
555
547
|
return Joi.object({
|
|
556
|
-
|
|
548
|
+
best: Joi.boolean(),
|
|
557
549
|
|
|
558
|
-
|
|
550
|
+
price: CartModel.OfferPrice(),
|
|
559
551
|
|
|
560
552
|
margin: Joi.number(),
|
|
561
553
|
|
|
562
|
-
|
|
554
|
+
quantity: Joi.number(),
|
|
563
555
|
|
|
564
556
|
total: Joi.number(),
|
|
565
557
|
|
|
566
|
-
quantity: Joi.number(),
|
|
567
|
-
|
|
568
558
|
auto_applied: Joi.boolean(),
|
|
559
|
+
|
|
560
|
+
type: Joi.string().allow(""),
|
|
569
561
|
});
|
|
570
562
|
}
|
|
571
563
|
|
|
572
|
-
static
|
|
564
|
+
static OfferSeller() {
|
|
573
565
|
return Joi.object({
|
|
574
|
-
|
|
566
|
+
name: Joi.string().allow(""),
|
|
575
567
|
|
|
568
|
+
uid: Joi.number(),
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
static BulkPriceOffer() {
|
|
573
|
+
return Joi.object({
|
|
576
574
|
offers: Joi.array().items(CartModel.OfferItem()),
|
|
575
|
+
|
|
576
|
+
seller: CartModel.OfferSeller(),
|
|
577
577
|
});
|
|
578
578
|
}
|
|
579
579
|
|
|
@@ -591,61 +591,61 @@ class CartModel {
|
|
|
591
591
|
|
|
592
592
|
static GeoLocation() {
|
|
593
593
|
return Joi.object({
|
|
594
|
-
latitude: Joi.number(),
|
|
595
|
-
|
|
596
594
|
longitude: Joi.number(),
|
|
595
|
+
|
|
596
|
+
latitude: Joi.number(),
|
|
597
597
|
});
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
static Address() {
|
|
601
601
|
return Joi.object({
|
|
602
|
-
|
|
602
|
+
name: Joi.string().allow(""),
|
|
603
603
|
|
|
604
|
-
|
|
604
|
+
is_default_address: Joi.boolean(),
|
|
605
605
|
|
|
606
|
-
|
|
606
|
+
country_code: Joi.string().allow(""),
|
|
607
607
|
|
|
608
|
-
|
|
608
|
+
geo_location: CartModel.GeoLocation(),
|
|
609
609
|
|
|
610
|
-
|
|
610
|
+
user_id: Joi.string().allow(""),
|
|
611
611
|
|
|
612
|
-
|
|
612
|
+
area_code: Joi.string().allow(""),
|
|
613
613
|
|
|
614
|
-
|
|
614
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
615
615
|
|
|
616
|
-
|
|
616
|
+
area: Joi.string().allow(""),
|
|
617
617
|
|
|
618
|
-
|
|
618
|
+
meta: Joi.any(),
|
|
619
619
|
|
|
620
|
-
|
|
620
|
+
country: Joi.string().allow(""),
|
|
621
621
|
|
|
622
|
-
|
|
622
|
+
address: Joi.string().allow(""),
|
|
623
623
|
|
|
624
|
-
|
|
624
|
+
state: Joi.string().allow(""),
|
|
625
625
|
|
|
626
|
-
|
|
626
|
+
checkout_mode: Joi.string().allow(""),
|
|
627
627
|
|
|
628
|
-
|
|
628
|
+
is_active: Joi.boolean(),
|
|
629
629
|
|
|
630
|
-
|
|
630
|
+
phone: Joi.string().allow(""),
|
|
631
631
|
|
|
632
|
-
|
|
632
|
+
google_map_point: Joi.any(),
|
|
633
633
|
|
|
634
|
-
|
|
634
|
+
id: Joi.string().allow(""),
|
|
635
635
|
|
|
636
|
-
|
|
636
|
+
address_type: Joi.string().allow(""),
|
|
637
637
|
|
|
638
|
-
|
|
638
|
+
area_code_slug: Joi.string().allow(""),
|
|
639
639
|
|
|
640
|
-
|
|
640
|
+
country_iso_code: Joi.string().allow(""),
|
|
641
641
|
|
|
642
|
-
|
|
642
|
+
city: Joi.string().allow(""),
|
|
643
643
|
|
|
644
|
-
|
|
644
|
+
country_phone_code: Joi.string().allow(""),
|
|
645
645
|
|
|
646
|
-
|
|
646
|
+
email: Joi.string().allow(""),
|
|
647
647
|
|
|
648
|
-
|
|
648
|
+
landmark: Joi.string().allow(""),
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
651
|
|
|
@@ -669,11 +669,11 @@ class CartModel {
|
|
|
669
669
|
return Joi.object({
|
|
670
670
|
id: Joi.string().allow(""),
|
|
671
671
|
|
|
672
|
-
is_updated: Joi.boolean(),
|
|
673
|
-
|
|
674
672
|
is_default_address: Joi.boolean(),
|
|
675
673
|
|
|
676
674
|
success: Joi.boolean(),
|
|
675
|
+
|
|
676
|
+
is_updated: Joi.boolean(),
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
679
|
|
|
@@ -687,10 +687,10 @@ class CartModel {
|
|
|
687
687
|
|
|
688
688
|
static SelectCartAddressRequest() {
|
|
689
689
|
return Joi.object({
|
|
690
|
-
billing_address_id: Joi.string().allow(""),
|
|
691
|
-
|
|
692
690
|
id: Joi.string().allow(""),
|
|
693
691
|
|
|
692
|
+
billing_address_id: Joi.string().allow(""),
|
|
693
|
+
|
|
694
694
|
cart_id: Joi.string().allow(""),
|
|
695
695
|
});
|
|
696
696
|
}
|
|
@@ -699,243 +699,243 @@ class CartModel {
|
|
|
699
699
|
return Joi.object({
|
|
700
700
|
id: Joi.string().allow(""),
|
|
701
701
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
merchant_code: Joi.string().allow(""),
|
|
702
|
+
payment_mode: Joi.string().allow(""),
|
|
705
703
|
|
|
706
704
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
707
705
|
|
|
708
|
-
|
|
706
|
+
aggregator_name: Joi.string().allow(""),
|
|
709
707
|
|
|
710
708
|
address_id: Joi.string().allow(""),
|
|
709
|
+
|
|
710
|
+
merchant_code: Joi.string().allow(""),
|
|
711
711
|
});
|
|
712
712
|
}
|
|
713
713
|
|
|
714
714
|
static CouponValidity() {
|
|
715
715
|
return Joi.object({
|
|
716
|
-
|
|
716
|
+
valid: Joi.boolean(),
|
|
717
717
|
|
|
718
718
|
discount: Joi.number(),
|
|
719
719
|
|
|
720
|
-
|
|
720
|
+
title: Joi.string().allow(""),
|
|
721
721
|
|
|
722
|
-
|
|
722
|
+
display_message_en: Joi.string().allow("").allow(null),
|
|
723
723
|
|
|
724
|
-
|
|
724
|
+
code: Joi.string().allow("").allow(null),
|
|
725
725
|
});
|
|
726
726
|
}
|
|
727
727
|
|
|
728
728
|
static PaymentCouponValidate() {
|
|
729
729
|
return Joi.object({
|
|
730
|
+
message: Joi.string().allow(""),
|
|
731
|
+
|
|
730
732
|
coupon_validity: CartModel.CouponValidity(),
|
|
731
733
|
|
|
732
734
|
success: Joi.boolean().required(),
|
|
733
|
-
|
|
734
|
-
message: Joi.string().allow(""),
|
|
735
735
|
});
|
|
736
736
|
}
|
|
737
737
|
|
|
738
738
|
static ShipmentResponse() {
|
|
739
739
|
return Joi.object({
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
promise: CartModel.ShipmentPromise(),
|
|
740
|
+
fulfillment_type: Joi.string().allow(""),
|
|
743
741
|
|
|
744
742
|
dp_options: Joi.any().allow(null),
|
|
745
743
|
|
|
746
|
-
|
|
744
|
+
shipment_type: Joi.string().allow(""),
|
|
747
745
|
|
|
748
|
-
|
|
746
|
+
order_type: Joi.string().allow(""),
|
|
749
747
|
|
|
750
|
-
|
|
748
|
+
promise: CartModel.ShipmentPromise(),
|
|
751
749
|
|
|
752
|
-
|
|
750
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
753
751
|
|
|
754
|
-
|
|
752
|
+
box_type: Joi.string().allow("").allow(null),
|
|
755
753
|
|
|
756
|
-
|
|
754
|
+
dp_id: Joi.string().allow("").allow(null),
|
|
757
755
|
|
|
758
756
|
shipments: Joi.number(),
|
|
757
|
+
|
|
758
|
+
fulfillment_id: Joi.number(),
|
|
759
759
|
});
|
|
760
760
|
}
|
|
761
761
|
|
|
762
762
|
static CartShipmentsResponse() {
|
|
763
763
|
return Joi.object({
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
message: Joi.string().allow(""),
|
|
764
|
+
checkout_mode: Joi.string().allow(""),
|
|
767
765
|
|
|
768
|
-
|
|
766
|
+
is_valid: Joi.boolean(),
|
|
769
767
|
|
|
770
|
-
|
|
768
|
+
comment: Joi.string().allow(""),
|
|
771
769
|
|
|
772
770
|
restrict_checkout: Joi.boolean(),
|
|
773
771
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
comment: Joi.string().allow(""),
|
|
772
|
+
currency: CartModel.CartCurrency(),
|
|
777
773
|
|
|
778
|
-
|
|
774
|
+
uid: Joi.string().allow(""),
|
|
779
775
|
|
|
780
776
|
buy_now: Joi.boolean(),
|
|
781
777
|
|
|
782
|
-
|
|
778
|
+
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
783
779
|
|
|
784
|
-
|
|
780
|
+
message: Joi.string().allow(""),
|
|
785
781
|
|
|
786
|
-
|
|
782
|
+
delivery_promise: CartModel.ShipmentPromise(),
|
|
787
783
|
|
|
788
|
-
|
|
784
|
+
shipments: Joi.array().items(CartModel.ShipmentResponse()),
|
|
789
785
|
|
|
790
|
-
|
|
786
|
+
id: Joi.string().allow(""),
|
|
791
787
|
|
|
792
788
|
error: Joi.boolean(),
|
|
793
789
|
|
|
794
|
-
|
|
790
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
795
791
|
|
|
796
|
-
|
|
792
|
+
last_modified: Joi.string().allow(""),
|
|
797
793
|
|
|
798
|
-
|
|
794
|
+
cart_id: Joi.number(),
|
|
799
795
|
|
|
800
796
|
coupon_text: Joi.string().allow(""),
|
|
801
|
-
});
|
|
802
|
-
}
|
|
803
797
|
|
|
804
|
-
|
|
805
|
-
return Joi.object({
|
|
806
|
-
value: Joi.string().allow("").required(),
|
|
798
|
+
gstin: Joi.string().allow(""),
|
|
807
799
|
|
|
808
|
-
|
|
800
|
+
breakup_values: CartModel.CartBreakup(),
|
|
809
801
|
});
|
|
810
802
|
}
|
|
811
803
|
|
|
812
804
|
static StaffCheckout() {
|
|
813
805
|
return Joi.object({
|
|
806
|
+
last_name: Joi.string().allow("").required(),
|
|
807
|
+
|
|
808
|
+
employee_code: Joi.string().allow(""),
|
|
809
|
+
|
|
810
|
+
user: Joi.string().allow("").required(),
|
|
811
|
+
|
|
814
812
|
_id: Joi.string().allow("").required(),
|
|
815
813
|
|
|
816
814
|
first_name: Joi.string().allow("").required(),
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
817
|
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
818
|
+
static CartCheckoutCustomMeta() {
|
|
819
|
+
return Joi.object({
|
|
820
|
+
value: Joi.string().allow("").required(),
|
|
821
821
|
|
|
822
|
-
|
|
822
|
+
key: Joi.string().allow("").required(),
|
|
823
823
|
});
|
|
824
824
|
}
|
|
825
825
|
|
|
826
826
|
static CartCheckoutDetailRequest() {
|
|
827
827
|
return Joi.object({
|
|
828
|
-
|
|
828
|
+
delivery_address: Joi.any(),
|
|
829
829
|
|
|
830
|
-
|
|
830
|
+
payment_mode: Joi.string().allow("").required(),
|
|
831
831
|
|
|
832
|
-
|
|
832
|
+
meta: Joi.any(),
|
|
833
833
|
|
|
834
834
|
extra_meta: Joi.any(),
|
|
835
835
|
|
|
836
|
-
|
|
836
|
+
staff: CartModel.StaffCheckout(),
|
|
837
837
|
|
|
838
|
-
|
|
838
|
+
aggregator: Joi.string().allow(""),
|
|
839
839
|
|
|
840
|
-
|
|
840
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
841
841
|
|
|
842
|
-
|
|
842
|
+
ordering_store: Joi.number().allow(null),
|
|
843
|
+
|
|
844
|
+
payment_params: Joi.any().allow(null),
|
|
843
845
|
|
|
844
846
|
callback_url: Joi.string().allow("").allow(null),
|
|
845
847
|
|
|
846
|
-
|
|
848
|
+
address_id: Joi.string().allow(""),
|
|
847
849
|
|
|
848
|
-
|
|
850
|
+
billing_address_id: Joi.string().allow(""),
|
|
849
851
|
|
|
850
|
-
|
|
852
|
+
custom_meta: Joi.array().items(CartModel.CartCheckoutCustomMeta()),
|
|
851
853
|
|
|
852
|
-
|
|
854
|
+
billing_address: Joi.any(),
|
|
853
855
|
|
|
854
|
-
|
|
856
|
+
merchant_code: Joi.string().allow(""),
|
|
855
857
|
|
|
856
858
|
payment_auto_confirm: Joi.boolean(),
|
|
857
|
-
|
|
858
|
-
address_id: Joi.string().allow(""),
|
|
859
859
|
});
|
|
860
860
|
}
|
|
861
861
|
|
|
862
862
|
static CheckCart() {
|
|
863
863
|
return Joi.object({
|
|
864
|
-
|
|
864
|
+
is_valid: Joi.boolean(),
|
|
865
865
|
|
|
866
|
-
|
|
866
|
+
error_message: Joi.string().allow(""),
|
|
867
867
|
|
|
868
|
-
|
|
868
|
+
restrict_checkout: Joi.boolean(),
|
|
869
869
|
|
|
870
|
-
|
|
870
|
+
currency: CartModel.CartCurrency(),
|
|
871
871
|
|
|
872
|
-
|
|
872
|
+
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
873
873
|
|
|
874
|
-
|
|
874
|
+
cod_available: Joi.boolean(),
|
|
875
875
|
|
|
876
876
|
cod_charges: Joi.number(),
|
|
877
877
|
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
cart_id: Joi.number(),
|
|
878
|
+
store_emps: Joi.array().items(Joi.any()),
|
|
881
879
|
|
|
882
880
|
cod_message: Joi.string().allow(""),
|
|
883
881
|
|
|
884
|
-
|
|
882
|
+
store_code: Joi.string().allow(""),
|
|
885
883
|
|
|
886
|
-
|
|
884
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
887
885
|
|
|
888
|
-
|
|
886
|
+
coupon_text: Joi.string().allow(""),
|
|
887
|
+
|
|
888
|
+
checkout_mode: Joi.string().allow(""),
|
|
889
|
+
|
|
890
|
+
comment: Joi.string().allow(""),
|
|
889
891
|
|
|
890
892
|
delivery_charges: Joi.number(),
|
|
891
893
|
|
|
892
|
-
|
|
894
|
+
uid: Joi.string().allow(""),
|
|
893
895
|
|
|
894
|
-
|
|
896
|
+
buy_now: Joi.boolean(),
|
|
895
897
|
|
|
896
|
-
|
|
898
|
+
message: Joi.string().allow(""),
|
|
897
899
|
|
|
898
|
-
|
|
900
|
+
delivery_promise: CartModel.ShipmentPromise(),
|
|
899
901
|
|
|
900
|
-
|
|
902
|
+
user_type: Joi.string().allow(""),
|
|
901
903
|
|
|
902
|
-
|
|
904
|
+
id: Joi.string().allow(""),
|
|
903
905
|
|
|
904
906
|
success: Joi.boolean(),
|
|
905
907
|
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
gstin: Joi.string().allow(""),
|
|
908
|
+
delivery_charge_order_value: Joi.number(),
|
|
909
909
|
|
|
910
|
-
|
|
910
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
911
911
|
|
|
912
|
-
|
|
912
|
+
last_modified: Joi.string().allow(""),
|
|
913
913
|
|
|
914
|
-
|
|
914
|
+
order_id: Joi.string().allow(""),
|
|
915
915
|
|
|
916
|
-
|
|
916
|
+
cart_id: Joi.number(),
|
|
917
917
|
|
|
918
|
-
|
|
918
|
+
gstin: Joi.string().allow(""),
|
|
919
919
|
|
|
920
|
-
|
|
920
|
+
breakup_values: CartModel.CartBreakup(),
|
|
921
921
|
});
|
|
922
922
|
}
|
|
923
923
|
|
|
924
924
|
static CartCheckoutResponse() {
|
|
925
925
|
return Joi.object({
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
order_id: Joi.string().allow(""),
|
|
929
|
-
|
|
930
|
-
data: Joi.any(),
|
|
926
|
+
success: Joi.boolean(),
|
|
931
927
|
|
|
932
928
|
callback_url: Joi.string().allow(""),
|
|
933
929
|
|
|
934
930
|
app_intercept_url: Joi.string().allow(""),
|
|
935
931
|
|
|
932
|
+
order_id: Joi.string().allow(""),
|
|
933
|
+
|
|
936
934
|
payment_confirm_url: Joi.string().allow(""),
|
|
937
935
|
|
|
938
|
-
|
|
936
|
+
message: Joi.string().allow(""),
|
|
937
|
+
|
|
938
|
+
data: Joi.any(),
|
|
939
939
|
|
|
940
940
|
cart: CartModel.CheckCart(),
|
|
941
941
|
});
|
|
@@ -943,13 +943,13 @@ class CartModel {
|
|
|
943
943
|
|
|
944
944
|
static CartMetaRequest() {
|
|
945
945
|
return Joi.object({
|
|
946
|
-
comment: Joi.string().allow(""),
|
|
947
|
-
|
|
948
946
|
checkout_mode: Joi.string().allow(""),
|
|
949
947
|
|
|
950
|
-
|
|
948
|
+
comment: Joi.string().allow(""),
|
|
951
949
|
|
|
952
950
|
gstin: Joi.string().allow(""),
|
|
951
|
+
|
|
952
|
+
pick_up_customer_details: Joi.any(),
|
|
953
953
|
});
|
|
954
954
|
}
|
|
955
955
|
|
|
@@ -967,9 +967,9 @@ class CartModel {
|
|
|
967
967
|
|
|
968
968
|
static GetShareCartLinkRequest() {
|
|
969
969
|
return Joi.object({
|
|
970
|
-
meta: Joi.any(),
|
|
971
|
-
|
|
972
970
|
id: Joi.string().allow(""),
|
|
971
|
+
|
|
972
|
+
meta: Joi.any(),
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
975
|
|
|
@@ -987,53 +987,53 @@ class CartModel {
|
|
|
987
987
|
|
|
988
988
|
token: Joi.string().allow(""),
|
|
989
989
|
|
|
990
|
+
user: Joi.any(),
|
|
991
|
+
|
|
990
992
|
source: Joi.any(),
|
|
991
993
|
|
|
992
994
|
created_on: Joi.string().allow(""),
|
|
993
|
-
|
|
994
|
-
user: Joi.any(),
|
|
995
995
|
});
|
|
996
996
|
}
|
|
997
997
|
|
|
998
998
|
static SharedCart() {
|
|
999
999
|
return Joi.object({
|
|
1000
|
-
|
|
1000
|
+
is_valid: Joi.boolean(),
|
|
1001
1001
|
|
|
1002
|
-
|
|
1002
|
+
restrict_checkout: Joi.boolean(),
|
|
1003
1003
|
|
|
1004
|
-
|
|
1004
|
+
currency: CartModel.CartCurrency(),
|
|
1005
|
+
|
|
1006
|
+
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
1007
|
+
|
|
1008
|
+
shared_cart_details: CartModel.SharedCartDetails(),
|
|
1005
1009
|
|
|
1006
1010
|
delivery_charge_info: Joi.string().allow(""),
|
|
1007
1011
|
|
|
1008
|
-
|
|
1012
|
+
coupon_text: Joi.string().allow(""),
|
|
1009
1013
|
|
|
1010
|
-
|
|
1014
|
+
checkout_mode: Joi.string().allow(""),
|
|
1011
1015
|
|
|
1012
|
-
|
|
1016
|
+
comment: Joi.string().allow(""),
|
|
1013
1017
|
|
|
1014
|
-
|
|
1018
|
+
uid: Joi.string().allow(""),
|
|
1015
1019
|
|
|
1016
|
-
|
|
1020
|
+
buy_now: Joi.boolean(),
|
|
1017
1021
|
|
|
1018
1022
|
message: Joi.string().allow(""),
|
|
1019
1023
|
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
restrict_checkout: Joi.boolean(),
|
|
1024
|
+
delivery_promise: CartModel.ShipmentPromise(),
|
|
1023
1025
|
|
|
1024
|
-
|
|
1026
|
+
id: Joi.string().allow(""),
|
|
1025
1027
|
|
|
1026
|
-
|
|
1028
|
+
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
1027
1029
|
|
|
1028
|
-
|
|
1030
|
+
last_modified: Joi.string().allow(""),
|
|
1029
1031
|
|
|
1030
|
-
|
|
1032
|
+
cart_id: Joi.number(),
|
|
1031
1033
|
|
|
1032
1034
|
gstin: Joi.string().allow(""),
|
|
1033
1035
|
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
delivery_promise: CartModel.ShipmentPromise(),
|
|
1036
|
+
breakup_values: CartModel.CartBreakup(),
|
|
1037
1037
|
});
|
|
1038
1038
|
}
|
|
1039
1039
|
|
|
@@ -1047,14 +1047,14 @@ class CartModel {
|
|
|
1047
1047
|
|
|
1048
1048
|
static PromotionOffer() {
|
|
1049
1049
|
return Joi.object({
|
|
1050
|
-
offer_text: Joi.string().allow(""),
|
|
1051
|
-
|
|
1052
|
-
promotion_group: Joi.string().allow(""),
|
|
1053
|
-
|
|
1054
1050
|
id: Joi.string().allow(""),
|
|
1055
1051
|
|
|
1052
|
+
offer_text: Joi.string().allow(""),
|
|
1053
|
+
|
|
1056
1054
|
description: Joi.string().allow(""),
|
|
1057
1055
|
|
|
1056
|
+
promotion_group: Joi.string().allow(""),
|
|
1057
|
+
|
|
1058
1058
|
valid_till: Joi.string().allow(""),
|
|
1059
1059
|
});
|
|
1060
1060
|
}
|
|
@@ -1067,9 +1067,9 @@ class CartModel {
|
|
|
1067
1067
|
|
|
1068
1068
|
static OperationErrorResponse() {
|
|
1069
1069
|
return Joi.object({
|
|
1070
|
-
success: Joi.boolean(),
|
|
1071
|
-
|
|
1072
1070
|
message: Joi.string().allow(""),
|
|
1071
|
+
|
|
1072
|
+
success: Joi.boolean(),
|
|
1073
1073
|
});
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
@@ -1085,42 +1085,42 @@ class CartModel {
|
|
|
1085
1085
|
return Joi.object({
|
|
1086
1086
|
currency_code: Joi.string().allow(""),
|
|
1087
1087
|
|
|
1088
|
-
|
|
1088
|
+
effective: Joi.number(),
|
|
1089
1089
|
|
|
1090
1090
|
marked: Joi.number(),
|
|
1091
1091
|
|
|
1092
1092
|
currency_symbol: Joi.string().allow(""),
|
|
1093
1093
|
|
|
1094
|
-
|
|
1094
|
+
offer_price: Joi.number(),
|
|
1095
1095
|
});
|
|
1096
1096
|
}
|
|
1097
1097
|
|
|
1098
1098
|
static LadderOfferItem() {
|
|
1099
1099
|
return Joi.object({
|
|
1100
|
+
max_quantity: Joi.number(),
|
|
1101
|
+
|
|
1100
1102
|
price: CartModel.LadderPrice(),
|
|
1101
1103
|
|
|
1102
|
-
|
|
1104
|
+
margin: Joi.number(),
|
|
1103
1105
|
|
|
1104
|
-
|
|
1106
|
+
min_quantity: Joi.number(),
|
|
1105
1107
|
|
|
1106
1108
|
type: Joi.string().allow(""),
|
|
1107
|
-
|
|
1108
|
-
margin: Joi.number(),
|
|
1109
1109
|
});
|
|
1110
1110
|
}
|
|
1111
1111
|
|
|
1112
1112
|
static LadderPriceOffer() {
|
|
1113
1113
|
return Joi.object({
|
|
1114
|
-
offer_text: Joi.string().allow(""),
|
|
1115
|
-
|
|
1116
|
-
promotion_group: Joi.string().allow(""),
|
|
1117
|
-
|
|
1118
1114
|
id: Joi.string().allow(""),
|
|
1119
1115
|
|
|
1120
1116
|
offer_prices: Joi.array().items(CartModel.LadderOfferItem()),
|
|
1121
1117
|
|
|
1118
|
+
offer_text: Joi.string().allow(""),
|
|
1119
|
+
|
|
1122
1120
|
description: Joi.string().allow(""),
|
|
1123
1121
|
|
|
1122
|
+
promotion_group: Joi.string().allow(""),
|
|
1123
|
+
|
|
1124
1124
|
valid_till: Joi.string().allow(""),
|
|
1125
1125
|
});
|
|
1126
1126
|
}
|