@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,121 +1,179 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
class PosCartModel {
|
|
4
|
-
static
|
|
4
|
+
static PromiseFormatted() {
|
|
5
5
|
return Joi.object({
|
|
6
|
-
|
|
6
|
+
min: Joi.string().allow(""),
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
max: Joi.string().allow(""),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
static PromiseTimestamp() {
|
|
13
|
+
return Joi.object({
|
|
14
|
+
min: Joi.number(),
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
max: Joi.number(),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
13
19
|
|
|
14
|
-
|
|
20
|
+
static ShipmentPromise() {
|
|
21
|
+
return Joi.object({
|
|
22
|
+
formatted: PosCartModel.PromiseFormatted(),
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
timestamp: PosCartModel.PromiseTimestamp(),
|
|
17
25
|
});
|
|
18
26
|
}
|
|
19
27
|
|
|
20
|
-
static
|
|
28
|
+
static RawBreakup() {
|
|
21
29
|
return Joi.object({
|
|
22
|
-
|
|
30
|
+
coupon: Joi.number(),
|
|
23
31
|
|
|
24
|
-
|
|
32
|
+
total: Joi.number(),
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
convenience_fee: Joi.number(),
|
|
27
35
|
|
|
28
|
-
|
|
36
|
+
you_saved: Joi.number(),
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
mrp_total: Joi.number(),
|
|
31
39
|
|
|
32
|
-
|
|
40
|
+
cod_charge: Joi.number(),
|
|
41
|
+
|
|
42
|
+
discount: Joi.number(),
|
|
43
|
+
|
|
44
|
+
gst_charges: Joi.number(),
|
|
45
|
+
|
|
46
|
+
subtotal: Joi.number(),
|
|
47
|
+
|
|
48
|
+
vog: Joi.number(),
|
|
49
|
+
|
|
50
|
+
delivery_charge: Joi.number(),
|
|
51
|
+
|
|
52
|
+
fynd_cash: Joi.number(),
|
|
33
53
|
});
|
|
34
54
|
}
|
|
35
55
|
|
|
36
|
-
static
|
|
56
|
+
static CouponBreakup() {
|
|
37
57
|
return Joi.object({
|
|
38
58
|
is_applied: Joi.boolean(),
|
|
39
59
|
|
|
40
|
-
|
|
60
|
+
code: Joi.string().allow(""),
|
|
41
61
|
|
|
42
|
-
|
|
62
|
+
value: Joi.number(),
|
|
43
63
|
|
|
44
|
-
|
|
64
|
+
uid: Joi.string().allow(""),
|
|
65
|
+
|
|
66
|
+
type: Joi.string().allow(""),
|
|
67
|
+
|
|
68
|
+
message: Joi.string().allow(""),
|
|
45
69
|
});
|
|
46
70
|
}
|
|
47
71
|
|
|
48
|
-
static
|
|
72
|
+
static DisplayBreakup() {
|
|
49
73
|
return Joi.object({
|
|
50
|
-
|
|
74
|
+
value: Joi.number(),
|
|
51
75
|
|
|
52
|
-
|
|
76
|
+
display: Joi.string().allow(""),
|
|
53
77
|
|
|
54
|
-
|
|
78
|
+
key: Joi.string().allow(""),
|
|
55
79
|
|
|
56
|
-
|
|
80
|
+
currency_symbol: Joi.string().allow(""),
|
|
57
81
|
|
|
58
|
-
|
|
82
|
+
currency_code: Joi.string().allow(""),
|
|
59
83
|
|
|
60
|
-
|
|
84
|
+
message: Joi.array().items(Joi.string().allow("")),
|
|
85
|
+
});
|
|
86
|
+
}
|
|
61
87
|
|
|
62
|
-
|
|
88
|
+
static LoyaltyPoints() {
|
|
89
|
+
return Joi.object({
|
|
90
|
+
is_applied: Joi.boolean(),
|
|
63
91
|
|
|
64
|
-
|
|
92
|
+
applicable: Joi.number(),
|
|
65
93
|
|
|
66
|
-
|
|
94
|
+
description: Joi.string().allow(""),
|
|
67
95
|
|
|
68
96
|
total: Joi.number(),
|
|
69
|
-
|
|
70
|
-
convenience_fee: Joi.number(),
|
|
71
|
-
|
|
72
|
-
discount: Joi.number(),
|
|
73
97
|
});
|
|
74
98
|
}
|
|
75
99
|
|
|
76
100
|
static CartBreakup() {
|
|
77
101
|
return Joi.object({
|
|
102
|
+
raw: PosCartModel.RawBreakup(),
|
|
103
|
+
|
|
78
104
|
coupon: PosCartModel.CouponBreakup(),
|
|
79
105
|
|
|
80
106
|
display: Joi.array().items(PosCartModel.DisplayBreakup()),
|
|
81
107
|
|
|
82
108
|
loyalty_points: PosCartModel.LoyaltyPoints(),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
83
111
|
|
|
84
|
-
|
|
112
|
+
static CartCurrency() {
|
|
113
|
+
return Joi.object({
|
|
114
|
+
code: Joi.string().allow(""),
|
|
115
|
+
|
|
116
|
+
symbol: Joi.string().allow(""),
|
|
85
117
|
});
|
|
86
118
|
}
|
|
87
119
|
|
|
88
|
-
static
|
|
120
|
+
static PromoMeta() {
|
|
89
121
|
return Joi.object({
|
|
90
|
-
|
|
122
|
+
message: Joi.string().allow(""),
|
|
123
|
+
});
|
|
124
|
+
}
|
|
91
125
|
|
|
92
|
-
|
|
126
|
+
static BasePrice() {
|
|
127
|
+
return Joi.object({
|
|
128
|
+
effective: Joi.number(),
|
|
93
129
|
|
|
94
|
-
|
|
130
|
+
currency_code: Joi.string().allow(""),
|
|
131
|
+
|
|
132
|
+
currency_symbol: Joi.string().allow(""),
|
|
133
|
+
|
|
134
|
+
marked: Joi.number(),
|
|
95
135
|
});
|
|
96
136
|
}
|
|
97
137
|
|
|
98
|
-
static
|
|
138
|
+
static ArticlePriceInfo() {
|
|
99
139
|
return Joi.object({
|
|
100
|
-
|
|
140
|
+
base: PosCartModel.BasePrice(),
|
|
101
141
|
|
|
102
|
-
|
|
142
|
+
converted: PosCartModel.BasePrice(),
|
|
103
143
|
});
|
|
104
144
|
}
|
|
105
145
|
|
|
106
|
-
static
|
|
146
|
+
static BaseInfo() {
|
|
107
147
|
return Joi.object({
|
|
108
|
-
|
|
148
|
+
name: Joi.string().allow(""),
|
|
109
149
|
|
|
110
|
-
|
|
150
|
+
uid: Joi.number(),
|
|
111
151
|
});
|
|
112
152
|
}
|
|
113
153
|
|
|
114
|
-
static
|
|
154
|
+
static ProductArticle() {
|
|
115
155
|
return Joi.object({
|
|
116
|
-
|
|
156
|
+
size: Joi.string().allow(""),
|
|
117
157
|
|
|
118
|
-
|
|
158
|
+
parent_item_identifiers: Joi.any(),
|
|
159
|
+
|
|
160
|
+
_custom_json: Joi.any(),
|
|
161
|
+
|
|
162
|
+
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
163
|
+
|
|
164
|
+
extra_meta: Joi.any(),
|
|
165
|
+
|
|
166
|
+
uid: Joi.string().allow(""),
|
|
167
|
+
|
|
168
|
+
price: PosCartModel.ArticlePriceInfo(),
|
|
169
|
+
|
|
170
|
+
seller: PosCartModel.BaseInfo(),
|
|
171
|
+
|
|
172
|
+
type: Joi.string().allow(""),
|
|
173
|
+
|
|
174
|
+
quantity: Joi.number(),
|
|
175
|
+
|
|
176
|
+
store: PosCartModel.BaseInfo(),
|
|
119
177
|
});
|
|
120
178
|
}
|
|
121
179
|
|
|
@@ -123,29 +181,35 @@ class PosCartModel {
|
|
|
123
181
|
return Joi.object({
|
|
124
182
|
other_store_quantity: Joi.number(),
|
|
125
183
|
|
|
126
|
-
|
|
184
|
+
is_valid: Joi.boolean(),
|
|
185
|
+
|
|
186
|
+
deliverable: Joi.boolean(),
|
|
127
187
|
|
|
128
188
|
sizes: Joi.array().items(Joi.string().allow("")),
|
|
129
189
|
|
|
130
|
-
|
|
190
|
+
out_of_stock: Joi.boolean(),
|
|
191
|
+
});
|
|
192
|
+
}
|
|
131
193
|
|
|
132
|
-
|
|
194
|
+
static CartProductIdentifer() {
|
|
195
|
+
return Joi.object({
|
|
196
|
+
identifier: Joi.string().allow(""),
|
|
133
197
|
});
|
|
134
198
|
}
|
|
135
199
|
|
|
136
200
|
static ProductPrice() {
|
|
137
201
|
return Joi.object({
|
|
138
|
-
|
|
202
|
+
add_on: Joi.number(),
|
|
139
203
|
|
|
140
|
-
|
|
204
|
+
effective: Joi.number(),
|
|
141
205
|
|
|
142
|
-
|
|
206
|
+
selling: Joi.number(),
|
|
143
207
|
|
|
144
208
|
currency_symbol: Joi.string().allow(""),
|
|
145
209
|
|
|
146
|
-
|
|
210
|
+
currency_code: Joi.string().allow(""),
|
|
147
211
|
|
|
148
|
-
|
|
212
|
+
marked: Joi.number(),
|
|
149
213
|
});
|
|
150
214
|
}
|
|
151
215
|
|
|
@@ -157,23 +221,17 @@ class PosCartModel {
|
|
|
157
221
|
});
|
|
158
222
|
}
|
|
159
223
|
|
|
160
|
-
static
|
|
224
|
+
static ProductImage() {
|
|
161
225
|
return Joi.object({
|
|
162
|
-
|
|
163
|
-
});
|
|
164
|
-
}
|
|
226
|
+
aspect_ratio: Joi.string().allow(""),
|
|
165
227
|
|
|
166
|
-
|
|
167
|
-
return Joi.object({
|
|
168
|
-
query: PosCartModel.ActionQuery(),
|
|
228
|
+
secure_url: Joi.string().allow(""),
|
|
169
229
|
|
|
170
230
|
url: Joi.string().allow(""),
|
|
171
|
-
|
|
172
|
-
type: Joi.string().allow(""),
|
|
173
231
|
});
|
|
174
232
|
}
|
|
175
233
|
|
|
176
|
-
static
|
|
234
|
+
static CategoryInfo() {
|
|
177
235
|
return Joi.object({
|
|
178
236
|
name: Joi.string().allow(""),
|
|
179
237
|
|
|
@@ -181,19 +239,17 @@ class PosCartModel {
|
|
|
181
239
|
});
|
|
182
240
|
}
|
|
183
241
|
|
|
184
|
-
static
|
|
242
|
+
static ActionQuery() {
|
|
185
243
|
return Joi.object({
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
uid: Joi.number(),
|
|
244
|
+
product_slug: Joi.array().items(Joi.string().allow("")),
|
|
189
245
|
});
|
|
190
246
|
}
|
|
191
247
|
|
|
192
|
-
static
|
|
248
|
+
static ProductAction() {
|
|
193
249
|
return Joi.object({
|
|
194
|
-
|
|
250
|
+
query: PosCartModel.ActionQuery(),
|
|
195
251
|
|
|
196
|
-
|
|
252
|
+
type: Joi.string().allow(""),
|
|
197
253
|
|
|
198
254
|
url: Joi.string().allow(""),
|
|
199
255
|
});
|
|
@@ -201,27 +257,21 @@ class PosCartModel {
|
|
|
201
257
|
|
|
202
258
|
static CartProduct() {
|
|
203
259
|
return Joi.object({
|
|
204
|
-
slug: Joi.string().allow(""),
|
|
205
|
-
|
|
206
|
-
action: PosCartModel.ProductAction(),
|
|
207
|
-
|
|
208
260
|
brand: PosCartModel.BaseInfo(),
|
|
209
261
|
|
|
210
262
|
name: Joi.string().allow(""),
|
|
211
263
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
categories: Joi.array().items(PosCartModel.CategoryInfo()),
|
|
264
|
+
images: Joi.array().items(PosCartModel.ProductImage()),
|
|
215
265
|
|
|
216
266
|
uid: Joi.number(),
|
|
217
267
|
|
|
218
|
-
|
|
219
|
-
});
|
|
220
|
-
}
|
|
268
|
+
type: Joi.string().allow(""),
|
|
221
269
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
270
|
+
slug: Joi.string().allow(""),
|
|
271
|
+
|
|
272
|
+
categories: Joi.array().items(PosCartModel.CategoryInfo()),
|
|
273
|
+
|
|
274
|
+
action: PosCartModel.ProductAction(),
|
|
225
275
|
});
|
|
226
276
|
}
|
|
227
277
|
|
|
@@ -235,151 +285,101 @@ class PosCartModel {
|
|
|
235
285
|
|
|
236
286
|
static AppliedPromotion() {
|
|
237
287
|
return Joi.object({
|
|
238
|
-
offer_text: Joi.string().allow(""),
|
|
239
|
-
|
|
240
|
-
article_quantity: Joi.number(),
|
|
241
|
-
|
|
242
|
-
promotion_type: Joi.string().allow(""),
|
|
243
|
-
|
|
244
288
|
amount: Joi.number(),
|
|
245
289
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
ownership: PosCartModel.Ownership(),
|
|
249
|
-
|
|
250
|
-
mrp_promotion: Joi.boolean(),
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
static BasePrice() {
|
|
255
|
-
return Joi.object({
|
|
256
|
-
effective: Joi.number(),
|
|
257
|
-
|
|
258
|
-
currency_symbol: Joi.string().allow(""),
|
|
259
|
-
|
|
260
|
-
marked: Joi.number(),
|
|
261
|
-
|
|
262
|
-
currency_code: Joi.string().allow(""),
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
static ArticlePriceInfo() {
|
|
267
|
-
return Joi.object({
|
|
268
|
-
base: PosCartModel.BasePrice(),
|
|
269
|
-
|
|
270
|
-
converted: PosCartModel.BasePrice(),
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
static ProductArticle() {
|
|
275
|
-
return Joi.object({
|
|
276
|
-
type: Joi.string().allow(""),
|
|
277
|
-
|
|
278
|
-
parent_item_identifiers: Joi.any(),
|
|
279
|
-
|
|
280
|
-
seller: PosCartModel.BaseInfo(),
|
|
281
|
-
|
|
282
|
-
extra_meta: Joi.any(),
|
|
283
|
-
|
|
284
|
-
_custom_json: Joi.any(),
|
|
285
|
-
|
|
286
|
-
store: PosCartModel.BaseInfo(),
|
|
287
|
-
|
|
288
|
-
price: PosCartModel.ArticlePriceInfo(),
|
|
290
|
+
ownership: PosCartModel.Ownership(),
|
|
289
291
|
|
|
290
|
-
|
|
292
|
+
mrp_promotion: Joi.boolean(),
|
|
291
293
|
|
|
292
|
-
|
|
294
|
+
offer_text: Joi.string().allow(""),
|
|
293
295
|
|
|
294
|
-
|
|
296
|
+
article_quantity: Joi.number(),
|
|
295
297
|
|
|
296
|
-
|
|
297
|
-
});
|
|
298
|
-
}
|
|
298
|
+
promo_id: Joi.string().allow(""),
|
|
299
299
|
|
|
300
|
-
|
|
301
|
-
return Joi.object({
|
|
302
|
-
message: Joi.string().allow(""),
|
|
300
|
+
promotion_type: Joi.string().allow(""),
|
|
303
301
|
});
|
|
304
302
|
}
|
|
305
303
|
|
|
306
304
|
static CartProductInfo() {
|
|
307
305
|
return Joi.object({
|
|
308
|
-
|
|
306
|
+
promo_meta: PosCartModel.PromoMeta(),
|
|
309
307
|
|
|
310
|
-
|
|
308
|
+
article: PosCartModel.ProductArticle(),
|
|
309
|
+
|
|
310
|
+
coupon_message: Joi.string().allow(""),
|
|
311
311
|
|
|
312
312
|
availability: PosCartModel.ProductAvailability(),
|
|
313
313
|
|
|
314
314
|
parent_item_identifiers: Joi.any(),
|
|
315
315
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
price_per_unit: PosCartModel.ProductPriceInfo(),
|
|
316
|
+
identifiers: PosCartModel.CartProductIdentifer().required(),
|
|
319
317
|
|
|
320
|
-
|
|
318
|
+
price: PosCartModel.ProductPriceInfo(),
|
|
321
319
|
|
|
322
|
-
|
|
320
|
+
is_set: Joi.boolean(),
|
|
323
321
|
|
|
324
322
|
discount: Joi.string().allow(""),
|
|
325
323
|
|
|
326
|
-
|
|
324
|
+
price_per_unit: PosCartModel.ProductPriceInfo(),
|
|
327
325
|
|
|
328
|
-
|
|
326
|
+
key: Joi.string().allow(""),
|
|
329
327
|
|
|
330
328
|
bulk_offer: Joi.any(),
|
|
331
329
|
|
|
332
|
-
|
|
330
|
+
quantity: Joi.number(),
|
|
333
331
|
|
|
334
|
-
|
|
332
|
+
product: PosCartModel.CartProduct(),
|
|
335
333
|
|
|
336
|
-
|
|
334
|
+
message: Joi.string().allow(""),
|
|
337
335
|
|
|
338
|
-
|
|
336
|
+
promotions_applied: Joi.array().items(PosCartModel.AppliedPromotion()),
|
|
339
337
|
});
|
|
340
338
|
}
|
|
341
339
|
|
|
342
|
-
static
|
|
340
|
+
static PaymentSelectionLock() {
|
|
343
341
|
return Joi.object({
|
|
344
|
-
|
|
342
|
+
payment_identifier: Joi.string().allow(""),
|
|
345
343
|
|
|
346
|
-
|
|
344
|
+
default_options: Joi.string().allow(""),
|
|
345
|
+
|
|
346
|
+
enabled: Joi.boolean(),
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
static CartDetailResponse() {
|
|
351
351
|
return Joi.object({
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
message: Joi.string().allow(""),
|
|
355
|
-
|
|
356
|
-
restrict_checkout: Joi.boolean(),
|
|
352
|
+
checkout_mode: Joi.string().allow(""),
|
|
357
353
|
|
|
358
|
-
|
|
354
|
+
delivery_promise: PosCartModel.ShipmentPromise(),
|
|
359
355
|
|
|
360
|
-
|
|
356
|
+
gstin: Joi.string().allow(""),
|
|
361
357
|
|
|
362
|
-
|
|
358
|
+
last_modified: Joi.string().allow(""),
|
|
363
359
|
|
|
364
|
-
|
|
360
|
+
is_valid: Joi.boolean(),
|
|
365
361
|
|
|
366
|
-
|
|
362
|
+
id: Joi.string().allow(""),
|
|
367
363
|
|
|
368
|
-
|
|
364
|
+
breakup_values: PosCartModel.CartBreakup(),
|
|
369
365
|
|
|
370
|
-
|
|
366
|
+
currency: PosCartModel.CartCurrency(),
|
|
371
367
|
|
|
372
|
-
|
|
368
|
+
comment: Joi.string().allow(""),
|
|
373
369
|
|
|
374
|
-
|
|
370
|
+
coupon_text: Joi.string().allow(""),
|
|
375
371
|
|
|
376
372
|
delivery_charge_info: Joi.string().allow(""),
|
|
377
373
|
|
|
378
374
|
items: Joi.array().items(PosCartModel.CartProductInfo()),
|
|
379
375
|
|
|
380
|
-
|
|
376
|
+
payment_selection_lock: PosCartModel.PaymentSelectionLock(),
|
|
381
377
|
|
|
382
|
-
|
|
378
|
+
restrict_checkout: Joi.boolean(),
|
|
379
|
+
|
|
380
|
+
buy_now: Joi.boolean(),
|
|
381
|
+
|
|
382
|
+
message: Joi.string().allow(""),
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
|
|
@@ -387,29 +387,29 @@ class PosCartModel {
|
|
|
387
387
|
return Joi.object({
|
|
388
388
|
seller_id: Joi.number(),
|
|
389
389
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
store_id: Joi.number(),
|
|
390
|
+
article_assignment: Joi.any(),
|
|
393
391
|
|
|
394
392
|
parent_item_identifiers: Joi.any(),
|
|
395
393
|
|
|
396
|
-
|
|
394
|
+
_custom_json: Joi.any(),
|
|
397
395
|
|
|
398
|
-
|
|
396
|
+
item_id: Joi.number(),
|
|
399
397
|
|
|
400
398
|
product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
|
|
401
399
|
|
|
402
400
|
extra_meta: Joi.any(),
|
|
403
401
|
|
|
404
|
-
_custom_json: Joi.any(),
|
|
405
|
-
|
|
406
|
-
article_id: Joi.string().allow(""),
|
|
407
|
-
|
|
408
402
|
item_size: Joi.string().allow(""),
|
|
409
403
|
|
|
410
404
|
display: Joi.string().allow(""),
|
|
411
405
|
|
|
406
|
+
article_id: Joi.string().allow(""),
|
|
407
|
+
|
|
408
|
+
pos: Joi.boolean(),
|
|
409
|
+
|
|
412
410
|
quantity: Joi.number(),
|
|
411
|
+
|
|
412
|
+
store_id: Joi.number(),
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
|
|
@@ -421,13 +421,13 @@ class PosCartModel {
|
|
|
421
421
|
|
|
422
422
|
static AddCartDetailResponse() {
|
|
423
423
|
return Joi.object({
|
|
424
|
-
success: Joi.boolean(),
|
|
425
|
-
|
|
426
424
|
partial: Joi.boolean(),
|
|
427
425
|
|
|
428
426
|
cart: PosCartModel.CartDetailResponse(),
|
|
429
427
|
|
|
430
428
|
message: Joi.string().allow(""),
|
|
429
|
+
|
|
430
|
+
success: Joi.boolean(),
|
|
431
431
|
});
|
|
432
432
|
}
|
|
433
433
|
|
|
@@ -437,37 +437,37 @@ class PosCartModel {
|
|
|
437
437
|
|
|
438
438
|
parent_item_identifiers: Joi.any(),
|
|
439
439
|
|
|
440
|
+
_custom_json: Joi.any(),
|
|
441
|
+
|
|
440
442
|
item_id: Joi.number(),
|
|
441
443
|
|
|
442
444
|
extra_meta: Joi.any(),
|
|
443
445
|
|
|
444
|
-
_custom_json: Joi.any(),
|
|
445
|
-
|
|
446
446
|
identifiers: PosCartModel.CartProductIdentifer().required(),
|
|
447
447
|
|
|
448
|
-
article_id: Joi.string().allow(""),
|
|
449
|
-
|
|
450
448
|
item_size: Joi.string().allow(""),
|
|
451
449
|
|
|
450
|
+
article_id: Joi.string().allow(""),
|
|
451
|
+
|
|
452
452
|
quantity: Joi.number(),
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
static UpdateCartRequest() {
|
|
457
457
|
return Joi.object({
|
|
458
|
-
items: Joi.array().items(PosCartModel.UpdateProductCart()),
|
|
459
|
-
|
|
460
458
|
operation: Joi.string().allow("").required(),
|
|
459
|
+
|
|
460
|
+
items: Joi.array().items(PosCartModel.UpdateProductCart()),
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
static UpdateCartDetailResponse() {
|
|
465
465
|
return Joi.object({
|
|
466
|
-
success: Joi.boolean(),
|
|
467
|
-
|
|
468
466
|
cart: PosCartModel.CartDetailResponse(),
|
|
469
467
|
|
|
470
468
|
message: Joi.string().allow(""),
|
|
469
|
+
|
|
470
|
+
success: Joi.boolean(),
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
|
|
@@ -479,37 +479,37 @@ class PosCartModel {
|
|
|
479
479
|
|
|
480
480
|
static Coupon() {
|
|
481
481
|
return Joi.object({
|
|
482
|
-
|
|
482
|
+
is_applicable: Joi.boolean(),
|
|
483
483
|
|
|
484
|
-
|
|
484
|
+
coupon_code: Joi.string().allow(""),
|
|
485
485
|
|
|
486
|
-
|
|
486
|
+
max_discount_value: Joi.number(),
|
|
487
487
|
|
|
488
|
-
|
|
488
|
+
coupon_value: Joi.number(),
|
|
489
489
|
|
|
490
|
-
|
|
490
|
+
minimum_cart_value: Joi.number(),
|
|
491
491
|
|
|
492
|
-
|
|
492
|
+
is_applied: Joi.boolean(),
|
|
493
493
|
|
|
494
494
|
sub_title: Joi.string().allow(""),
|
|
495
495
|
|
|
496
|
-
|
|
496
|
+
title: Joi.string().allow(""),
|
|
497
497
|
|
|
498
|
-
|
|
498
|
+
expires_on: Joi.string().allow(""),
|
|
499
499
|
|
|
500
|
-
|
|
500
|
+
message: Joi.string().allow(""),
|
|
501
501
|
});
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
static PageCoupon() {
|
|
505
505
|
return Joi.object({
|
|
506
|
-
|
|
506
|
+
total_item_count: Joi.number(),
|
|
507
507
|
|
|
508
|
-
|
|
508
|
+
has_next: Joi.boolean(),
|
|
509
509
|
|
|
510
510
|
total: Joi.number(),
|
|
511
511
|
|
|
512
|
-
|
|
512
|
+
has_previous: Joi.boolean(),
|
|
513
513
|
|
|
514
514
|
current: Joi.number(),
|
|
515
515
|
});
|
|
@@ -529,51 +529,51 @@ class PosCartModel {
|
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
+
static OfferSeller() {
|
|
533
|
+
return Joi.object({
|
|
534
|
+
name: Joi.string().allow(""),
|
|
535
|
+
|
|
536
|
+
uid: Joi.number(),
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
|
|
532
540
|
static OfferPrice() {
|
|
533
541
|
return Joi.object({
|
|
534
542
|
bulk_effective: Joi.number(),
|
|
535
543
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
currency_code: Joi.string().allow(""),
|
|
544
|
+
effective: Joi.number(),
|
|
539
545
|
|
|
540
546
|
currency_symbol: Joi.string().allow(""),
|
|
541
547
|
|
|
542
|
-
|
|
548
|
+
currency_code: Joi.string().allow(""),
|
|
549
|
+
|
|
550
|
+
marked: Joi.number(),
|
|
543
551
|
});
|
|
544
552
|
}
|
|
545
553
|
|
|
546
554
|
static OfferItem() {
|
|
547
555
|
return Joi.object({
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
type: Joi.string().allow(""),
|
|
551
|
-
|
|
552
|
-
auto_applied: Joi.boolean(),
|
|
556
|
+
total: Joi.number(),
|
|
553
557
|
|
|
554
558
|
price: PosCartModel.OfferPrice(),
|
|
555
559
|
|
|
556
|
-
|
|
560
|
+
margin: Joi.number(),
|
|
557
561
|
|
|
558
|
-
|
|
562
|
+
type: Joi.string().allow(""),
|
|
559
563
|
|
|
560
564
|
quantity: Joi.number(),
|
|
561
|
-
});
|
|
562
|
-
}
|
|
563
565
|
|
|
564
|
-
|
|
565
|
-
return Joi.object({
|
|
566
|
-
name: Joi.string().allow(""),
|
|
566
|
+
auto_applied: Joi.boolean(),
|
|
567
567
|
|
|
568
|
-
|
|
568
|
+
best: Joi.boolean(),
|
|
569
569
|
});
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
static BulkPriceOffer() {
|
|
573
573
|
return Joi.object({
|
|
574
|
-
offers: Joi.array().items(PosCartModel.OfferItem()),
|
|
575
|
-
|
|
576
574
|
seller: PosCartModel.OfferSeller(),
|
|
575
|
+
|
|
576
|
+
offers: Joi.array().items(PosCartModel.OfferItem()),
|
|
577
577
|
});
|
|
578
578
|
}
|
|
579
579
|
|
|
@@ -599,53 +599,53 @@ class PosCartModel {
|
|
|
599
599
|
|
|
600
600
|
static Address() {
|
|
601
601
|
return Joi.object({
|
|
602
|
-
|
|
602
|
+
checkout_mode: Joi.string().allow(""),
|
|
603
|
+
|
|
604
|
+
google_map_point: Joi.any(),
|
|
603
605
|
|
|
604
606
|
area_code: Joi.string().allow(""),
|
|
605
607
|
|
|
608
|
+
email: Joi.string().allow(""),
|
|
609
|
+
|
|
606
610
|
country_iso_code: Joi.string().allow(""),
|
|
607
611
|
|
|
608
612
|
landmark: Joi.string().allow(""),
|
|
609
613
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
user_id: Joi.string().allow(""),
|
|
613
|
-
|
|
614
|
-
meta: Joi.any(),
|
|
615
|
-
|
|
616
|
-
area_code_slug: Joi.string().allow(""),
|
|
614
|
+
state: Joi.string().allow(""),
|
|
617
615
|
|
|
618
|
-
|
|
616
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
619
617
|
|
|
620
|
-
|
|
618
|
+
address: Joi.string().allow(""),
|
|
621
619
|
|
|
622
620
|
is_default_address: Joi.boolean(),
|
|
623
621
|
|
|
622
|
+
country_code: Joi.string().allow(""),
|
|
623
|
+
|
|
624
624
|
phone: Joi.string().allow(""),
|
|
625
625
|
|
|
626
|
-
|
|
626
|
+
city: Joi.string().allow(""),
|
|
627
627
|
|
|
628
628
|
country_phone_code: Joi.string().allow(""),
|
|
629
629
|
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
checkout_mode: Joi.string().allow(""),
|
|
630
|
+
area: Joi.string().allow(""),
|
|
633
631
|
|
|
634
632
|
address_type: Joi.string().allow(""),
|
|
635
633
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
address: Joi.string().allow(""),
|
|
634
|
+
country: Joi.string().allow(""),
|
|
639
635
|
|
|
640
|
-
|
|
636
|
+
meta: Joi.any(),
|
|
641
637
|
|
|
642
638
|
name: Joi.string().allow(""),
|
|
643
639
|
|
|
640
|
+
geo_location: PosCartModel.GeoLocation(),
|
|
641
|
+
|
|
644
642
|
is_active: Joi.boolean(),
|
|
645
643
|
|
|
646
|
-
|
|
644
|
+
id: Joi.string().allow(""),
|
|
647
645
|
|
|
648
|
-
|
|
646
|
+
area_code_slug: Joi.string().allow(""),
|
|
647
|
+
|
|
648
|
+
user_id: Joi.string().allow(""),
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
651
|
|
|
@@ -657,40 +657,40 @@ class PosCartModel {
|
|
|
657
657
|
|
|
658
658
|
static SaveAddressResponse() {
|
|
659
659
|
return Joi.object({
|
|
660
|
-
|
|
660
|
+
is_default_address: Joi.boolean(),
|
|
661
661
|
|
|
662
662
|
id: Joi.string().allow(""),
|
|
663
663
|
|
|
664
|
-
|
|
664
|
+
success: Joi.boolean(),
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
667
|
|
|
668
668
|
static UpdateAddressResponse() {
|
|
669
669
|
return Joi.object({
|
|
670
|
+
is_default_address: Joi.boolean(),
|
|
671
|
+
|
|
670
672
|
success: Joi.boolean(),
|
|
671
673
|
|
|
672
674
|
id: Joi.string().allow(""),
|
|
673
675
|
|
|
674
676
|
is_updated: Joi.boolean(),
|
|
675
|
-
|
|
676
|
-
is_default_address: Joi.boolean(),
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
static DeleteAddressResponse() {
|
|
681
681
|
return Joi.object({
|
|
682
|
-
id: Joi.string().allow(""),
|
|
683
|
-
|
|
684
682
|
is_deleted: Joi.boolean(),
|
|
683
|
+
|
|
684
|
+
id: Joi.string().allow(""),
|
|
685
685
|
});
|
|
686
686
|
}
|
|
687
687
|
|
|
688
688
|
static SelectCartAddressRequest() {
|
|
689
689
|
return Joi.object({
|
|
690
|
-
id: Joi.string().allow(""),
|
|
691
|
-
|
|
692
690
|
cart_id: Joi.string().allow(""),
|
|
693
691
|
|
|
692
|
+
id: Joi.string().allow(""),
|
|
693
|
+
|
|
694
694
|
billing_address_id: Joi.string().allow(""),
|
|
695
695
|
});
|
|
696
696
|
}
|
|
@@ -701,113 +701,113 @@ class PosCartModel {
|
|
|
701
701
|
|
|
702
702
|
id: Joi.string().allow(""),
|
|
703
703
|
|
|
704
|
-
|
|
704
|
+
merchant_code: Joi.string().allow(""),
|
|
705
705
|
|
|
706
|
-
|
|
706
|
+
address_id: Joi.string().allow(""),
|
|
707
707
|
|
|
708
708
|
payment_mode: Joi.string().allow(""),
|
|
709
709
|
|
|
710
|
-
|
|
710
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
711
711
|
});
|
|
712
712
|
}
|
|
713
713
|
|
|
714
714
|
static CouponValidity() {
|
|
715
715
|
return Joi.object({
|
|
716
|
-
|
|
716
|
+
display_message_en: Joi.string().allow("").allow(null),
|
|
717
717
|
|
|
718
|
-
|
|
718
|
+
code: Joi.string().allow("").allow(null),
|
|
719
719
|
|
|
720
720
|
valid: Joi.boolean(),
|
|
721
721
|
|
|
722
|
-
display_message_en: Joi.string().allow("").allow(null),
|
|
723
|
-
|
|
724
722
|
discount: Joi.number(),
|
|
723
|
+
|
|
724
|
+
title: Joi.string().allow(""),
|
|
725
725
|
});
|
|
726
726
|
}
|
|
727
727
|
|
|
728
728
|
static PaymentCouponValidate() {
|
|
729
729
|
return Joi.object({
|
|
730
|
+
message: Joi.string().allow(""),
|
|
731
|
+
|
|
730
732
|
success: Joi.boolean().required(),
|
|
731
733
|
|
|
732
734
|
coupon_validity: PosCartModel.CouponValidity(),
|
|
733
|
-
|
|
734
|
-
message: Joi.string().allow(""),
|
|
735
735
|
});
|
|
736
736
|
}
|
|
737
737
|
|
|
738
738
|
static ShipmentResponse() {
|
|
739
739
|
return Joi.object({
|
|
740
|
+
fulfillment_id: Joi.number(),
|
|
741
|
+
|
|
740
742
|
dp_options: Joi.any().allow(null),
|
|
741
743
|
|
|
742
|
-
|
|
744
|
+
fulfillment_type: Joi.string().allow(""),
|
|
743
745
|
|
|
744
|
-
|
|
746
|
+
shipments: Joi.number(),
|
|
745
747
|
|
|
746
|
-
|
|
748
|
+
shipment_type: Joi.string().allow(""),
|
|
747
749
|
|
|
748
|
-
|
|
750
|
+
order_type: Joi.string().allow(""),
|
|
749
751
|
|
|
750
|
-
|
|
752
|
+
items: Joi.array().items(PosCartModel.CartProductInfo()),
|
|
751
753
|
|
|
752
754
|
box_type: Joi.string().allow("").allow(null),
|
|
753
755
|
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
shipment_type: Joi.string().allow(""),
|
|
756
|
+
promise: PosCartModel.ShipmentPromise(),
|
|
757
757
|
|
|
758
|
-
|
|
758
|
+
dp_id: Joi.string().allow("").allow(null),
|
|
759
759
|
});
|
|
760
760
|
}
|
|
761
761
|
|
|
762
762
|
static CartShipmentsResponse() {
|
|
763
763
|
return Joi.object({
|
|
764
|
-
|
|
764
|
+
checkout_mode: Joi.string().allow(""),
|
|
765
765
|
|
|
766
|
-
|
|
766
|
+
gstin: Joi.string().allow(""),
|
|
767
767
|
|
|
768
|
-
|
|
768
|
+
is_valid: Joi.boolean(),
|
|
769
769
|
|
|
770
|
-
|
|
770
|
+
currency: PosCartModel.CartCurrency(),
|
|
771
771
|
|
|
772
772
|
uid: Joi.string().allow(""),
|
|
773
773
|
|
|
774
|
-
|
|
774
|
+
cart_id: Joi.number(),
|
|
775
775
|
|
|
776
776
|
comment: Joi.string().allow(""),
|
|
777
777
|
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
shipments: Joi.array().items(PosCartModel.ShipmentResponse()),
|
|
778
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
781
779
|
|
|
782
780
|
error: Joi.boolean(),
|
|
783
781
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
coupon_text: Joi.string().allow(""),
|
|
787
|
-
|
|
788
|
-
gstin: Joi.string().allow(""),
|
|
782
|
+
restrict_checkout: Joi.boolean(),
|
|
789
783
|
|
|
790
784
|
buy_now: Joi.boolean(),
|
|
791
785
|
|
|
792
|
-
|
|
786
|
+
delivery_promise: PosCartModel.ShipmentPromise(),
|
|
793
787
|
|
|
794
|
-
|
|
788
|
+
message: Joi.string().allow(""),
|
|
795
789
|
|
|
796
790
|
last_modified: Joi.string().allow(""),
|
|
797
791
|
|
|
798
|
-
|
|
792
|
+
shipments: Joi.array().items(PosCartModel.ShipmentResponse()),
|
|
799
793
|
|
|
800
|
-
|
|
794
|
+
id: Joi.string().allow(""),
|
|
795
|
+
|
|
796
|
+
breakup_values: PosCartModel.CartBreakup(),
|
|
797
|
+
|
|
798
|
+
coupon_text: Joi.string().allow(""),
|
|
799
|
+
|
|
800
|
+
payment_selection_lock: PosCartModel.PaymentSelectionLock(),
|
|
801
801
|
});
|
|
802
802
|
}
|
|
803
803
|
|
|
804
804
|
static UpdateCartShipmentItem() {
|
|
805
805
|
return Joi.object({
|
|
806
|
-
|
|
806
|
+
article_uid: Joi.string().allow("").required(),
|
|
807
807
|
|
|
808
808
|
quantity: Joi.number(),
|
|
809
809
|
|
|
810
|
-
|
|
810
|
+
shipment_type: Joi.string().allow("").required(),
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
813
|
|
|
@@ -823,21 +823,21 @@ class PosCartModel {
|
|
|
823
823
|
return Joi.object({
|
|
824
824
|
user: Joi.string().allow("").required(),
|
|
825
825
|
|
|
826
|
-
last_name: Joi.string().allow("").required(),
|
|
827
|
-
|
|
828
826
|
employee_code: Joi.string().allow(""),
|
|
829
827
|
|
|
830
828
|
_id: Joi.string().allow("").required(),
|
|
831
829
|
|
|
830
|
+
last_name: Joi.string().allow("").required(),
|
|
831
|
+
|
|
832
832
|
first_name: Joi.string().allow("").required(),
|
|
833
833
|
});
|
|
834
834
|
}
|
|
835
835
|
|
|
836
836
|
static CartCheckoutCustomMeta() {
|
|
837
837
|
return Joi.object({
|
|
838
|
-
value: Joi.string().allow("").required(),
|
|
839
|
-
|
|
840
838
|
key: Joi.string().allow("").required(),
|
|
839
|
+
|
|
840
|
+
value: Joi.string().allow("").required(),
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
843
|
|
|
@@ -851,107 +851,107 @@ class PosCartModel {
|
|
|
851
851
|
|
|
852
852
|
static CartPosCheckoutDetailRequest() {
|
|
853
853
|
return Joi.object({
|
|
854
|
-
billing_address_id: Joi.string().allow(""),
|
|
855
|
-
|
|
856
|
-
extra_meta: Joi.any(),
|
|
857
|
-
|
|
858
|
-
billing_address: Joi.any(),
|
|
859
|
-
|
|
860
854
|
delivery_address: Joi.any(),
|
|
861
855
|
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
address_id: Joi.string().allow(""),
|
|
856
|
+
payment_auto_confirm: Joi.boolean(),
|
|
865
857
|
|
|
866
858
|
staff: PosCartModel.StaffCheckout(),
|
|
867
859
|
|
|
868
|
-
payment_mode: Joi.string().allow("").required(),
|
|
869
|
-
|
|
870
860
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
871
861
|
|
|
872
|
-
|
|
862
|
+
custom_meta: Joi.array().items(PosCartModel.CartCheckoutCustomMeta()),
|
|
863
|
+
|
|
864
|
+
order_type: Joi.string().allow("").required(),
|
|
865
|
+
|
|
866
|
+
billing_address_id: Joi.string().allow(""),
|
|
867
|
+
|
|
868
|
+
files: Joi.array().items(PosCartModel.Files()),
|
|
873
869
|
|
|
874
870
|
pos: Joi.boolean(),
|
|
875
871
|
|
|
876
|
-
|
|
872
|
+
ordering_store: Joi.number().allow(null),
|
|
873
|
+
|
|
874
|
+
callback_url: Joi.string().allow("").allow(null),
|
|
877
875
|
|
|
878
876
|
pick_at_store_uid: Joi.number().allow(null),
|
|
879
877
|
|
|
880
|
-
|
|
878
|
+
extra_meta: Joi.any(),
|
|
881
879
|
|
|
882
|
-
|
|
880
|
+
billing_address: Joi.any(),
|
|
883
881
|
|
|
884
|
-
|
|
882
|
+
payment_params: Joi.any().allow(null),
|
|
885
883
|
|
|
886
|
-
|
|
884
|
+
meta: Joi.any(),
|
|
887
885
|
|
|
888
|
-
|
|
886
|
+
aggregator: Joi.string().allow(""),
|
|
889
887
|
|
|
890
888
|
merchant_code: Joi.string().allow(""),
|
|
891
889
|
|
|
892
|
-
|
|
890
|
+
address_id: Joi.string().allow(""),
|
|
891
|
+
|
|
892
|
+
payment_mode: Joi.string().allow("").required(),
|
|
893
893
|
});
|
|
894
894
|
}
|
|
895
895
|
|
|
896
896
|
static CheckCart() {
|
|
897
897
|
return Joi.object({
|
|
898
|
+
checkout_mode: Joi.string().allow(""),
|
|
899
|
+
|
|
900
|
+
currency: PosCartModel.CartCurrency(),
|
|
901
|
+
|
|
902
|
+
cart_id: Joi.number(),
|
|
903
|
+
|
|
898
904
|
delivery_charges: Joi.number(),
|
|
899
905
|
|
|
900
|
-
|
|
906
|
+
order_id: Joi.string().allow(""),
|
|
901
907
|
|
|
902
|
-
|
|
908
|
+
buy_now: Joi.boolean(),
|
|
903
909
|
|
|
904
|
-
|
|
910
|
+
delivery_promise: PosCartModel.ShipmentPromise(),
|
|
905
911
|
|
|
906
|
-
|
|
912
|
+
cod_message: Joi.string().allow(""),
|
|
907
913
|
|
|
908
|
-
|
|
914
|
+
user_type: Joi.string().allow(""),
|
|
909
915
|
|
|
910
|
-
|
|
916
|
+
last_modified: Joi.string().allow(""),
|
|
911
917
|
|
|
912
918
|
breakup_values: PosCartModel.CartBreakup(),
|
|
913
919
|
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
buy_now: Joi.boolean(),
|
|
920
|
+
coupon_text: Joi.string().allow(""),
|
|
917
921
|
|
|
918
|
-
|
|
922
|
+
payment_selection_lock: PosCartModel.PaymentSelectionLock(),
|
|
919
923
|
|
|
920
|
-
|
|
924
|
+
store_code: Joi.string().allow(""),
|
|
921
925
|
|
|
922
926
|
delivery_charge_order_value: Joi.number(),
|
|
923
927
|
|
|
924
|
-
|
|
928
|
+
gstin: Joi.string().allow(""),
|
|
925
929
|
|
|
926
|
-
|
|
930
|
+
is_valid: Joi.boolean(),
|
|
927
931
|
|
|
928
932
|
uid: Joi.string().allow(""),
|
|
929
933
|
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
store_code: Joi.string().allow(""),
|
|
933
|
-
|
|
934
|
-
currency: PosCartModel.CartCurrency(),
|
|
934
|
+
comment: Joi.string().allow(""),
|
|
935
935
|
|
|
936
|
-
|
|
936
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
937
937
|
|
|
938
|
-
|
|
938
|
+
restrict_checkout: Joi.boolean(),
|
|
939
939
|
|
|
940
|
-
|
|
940
|
+
error_message: Joi.string().allow(""),
|
|
941
941
|
|
|
942
|
-
|
|
942
|
+
message: Joi.string().allow(""),
|
|
943
943
|
|
|
944
944
|
store_emps: Joi.array().items(Joi.any()),
|
|
945
945
|
|
|
946
|
-
|
|
946
|
+
id: Joi.string().allow(""),
|
|
947
947
|
|
|
948
|
-
|
|
948
|
+
success: Joi.boolean(),
|
|
949
949
|
|
|
950
|
-
|
|
950
|
+
cod_charges: Joi.number(),
|
|
951
951
|
|
|
952
|
-
|
|
952
|
+
items: Joi.array().items(PosCartModel.CartProductInfo()),
|
|
953
953
|
|
|
954
|
-
|
|
954
|
+
cod_available: Joi.boolean(),
|
|
955
955
|
});
|
|
956
956
|
}
|
|
957
957
|
|
|
@@ -959,31 +959,31 @@ class PosCartModel {
|
|
|
959
959
|
return Joi.object({
|
|
960
960
|
payment_confirm_url: Joi.string().allow(""),
|
|
961
961
|
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
message: Joi.string().allow(""),
|
|
962
|
+
callback_url: Joi.string().allow(""),
|
|
965
963
|
|
|
966
964
|
success: Joi.boolean(),
|
|
967
965
|
|
|
968
|
-
|
|
966
|
+
data: Joi.any(),
|
|
969
967
|
|
|
970
968
|
app_intercept_url: Joi.string().allow(""),
|
|
971
969
|
|
|
972
|
-
|
|
970
|
+
order_id: Joi.string().allow(""),
|
|
973
971
|
|
|
974
|
-
|
|
972
|
+
cart: PosCartModel.CheckCart(),
|
|
973
|
+
|
|
974
|
+
message: Joi.string().allow(""),
|
|
975
975
|
});
|
|
976
976
|
}
|
|
977
977
|
|
|
978
978
|
static CartMetaRequest() {
|
|
979
979
|
return Joi.object({
|
|
980
|
+
comment: Joi.string().allow(""),
|
|
981
|
+
|
|
980
982
|
checkout_mode: Joi.string().allow(""),
|
|
981
983
|
|
|
982
984
|
pick_up_customer_details: Joi.any(),
|
|
983
985
|
|
|
984
986
|
gstin: Joi.string().allow(""),
|
|
985
|
-
|
|
986
|
-
comment: Joi.string().allow(""),
|
|
987
987
|
});
|
|
988
988
|
}
|
|
989
989
|
|
|
@@ -1001,45 +1001,45 @@ class PosCartModel {
|
|
|
1001
1001
|
|
|
1002
1002
|
static CartDeliveryModesResponse() {
|
|
1003
1003
|
return Joi.object({
|
|
1004
|
-
pickup_stores: Joi.array().items(Joi.number()),
|
|
1005
|
-
|
|
1006
1004
|
available_modes: Joi.array().items(Joi.string().allow("")),
|
|
1005
|
+
|
|
1006
|
+
pickup_stores: Joi.array().items(Joi.number()),
|
|
1007
1007
|
});
|
|
1008
1008
|
}
|
|
1009
1009
|
|
|
1010
1010
|
static PickupStoreDetail() {
|
|
1011
1011
|
return Joi.object({
|
|
1012
|
-
|
|
1012
|
+
store_code: Joi.string().allow(""),
|
|
1013
1013
|
|
|
1014
1014
|
pincode: Joi.number(),
|
|
1015
1015
|
|
|
1016
|
-
area_code: Joi.string().allow(""),
|
|
1017
|
-
|
|
1018
|
-
area_code_slug: Joi.string().allow(""),
|
|
1019
|
-
|
|
1020
1016
|
name: Joi.string().allow(""),
|
|
1021
1017
|
|
|
1022
|
-
|
|
1018
|
+
state: Joi.string().allow(""),
|
|
1023
1019
|
|
|
1024
|
-
|
|
1020
|
+
address: Joi.string().allow(""),
|
|
1025
1021
|
|
|
1026
|
-
|
|
1022
|
+
area_code: Joi.string().allow(""),
|
|
1027
1023
|
|
|
1028
1024
|
id: Joi.number(),
|
|
1029
1025
|
|
|
1030
|
-
|
|
1026
|
+
email: Joi.string().allow(""),
|
|
1031
1027
|
|
|
1032
|
-
|
|
1028
|
+
area: Joi.string().allow(""),
|
|
1029
|
+
|
|
1030
|
+
area_code_slug: Joi.string().allow(""),
|
|
1031
|
+
|
|
1032
|
+
uid: Joi.number(),
|
|
1033
1033
|
|
|
1034
1034
|
address_type: Joi.string().allow(""),
|
|
1035
1035
|
|
|
1036
1036
|
country: Joi.string().allow(""),
|
|
1037
1037
|
|
|
1038
|
-
|
|
1038
|
+
phone: Joi.string().allow(""),
|
|
1039
1039
|
|
|
1040
|
-
|
|
1040
|
+
city: Joi.string().allow(""),
|
|
1041
1041
|
|
|
1042
|
-
|
|
1042
|
+
landmark: Joi.string().allow(""),
|
|
1043
1043
|
});
|
|
1044
1044
|
}
|
|
1045
1045
|
|
|
@@ -1051,81 +1051,81 @@ class PosCartModel {
|
|
|
1051
1051
|
|
|
1052
1052
|
static GetShareCartLinkRequest() {
|
|
1053
1053
|
return Joi.object({
|
|
1054
|
-
id: Joi.string().allow(""),
|
|
1055
|
-
|
|
1056
1054
|
meta: Joi.any(),
|
|
1055
|
+
|
|
1056
|
+
id: Joi.string().allow(""),
|
|
1057
1057
|
});
|
|
1058
1058
|
}
|
|
1059
1059
|
|
|
1060
1060
|
static GetShareCartLinkResponse() {
|
|
1061
1061
|
return Joi.object({
|
|
1062
|
-
share_url: Joi.string().allow(""),
|
|
1063
|
-
|
|
1064
1062
|
token: Joi.string().allow(""),
|
|
1063
|
+
|
|
1064
|
+
share_url: Joi.string().allow(""),
|
|
1065
1065
|
});
|
|
1066
1066
|
}
|
|
1067
1067
|
|
|
1068
1068
|
static SharedCartDetails() {
|
|
1069
1069
|
return Joi.object({
|
|
1070
|
+
meta: Joi.any(),
|
|
1071
|
+
|
|
1070
1072
|
user: Joi.any(),
|
|
1071
1073
|
|
|
1072
|
-
|
|
1074
|
+
token: Joi.string().allow(""),
|
|
1073
1075
|
|
|
1074
1076
|
created_on: Joi.string().allow(""),
|
|
1075
1077
|
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
token: Joi.string().allow(""),
|
|
1078
|
+
source: Joi.any(),
|
|
1079
1079
|
});
|
|
1080
1080
|
}
|
|
1081
1081
|
|
|
1082
1082
|
static SharedCart() {
|
|
1083
1083
|
return Joi.object({
|
|
1084
|
-
|
|
1084
|
+
checkout_mode: Joi.string().allow(""),
|
|
1085
1085
|
|
|
1086
|
-
|
|
1086
|
+
currency: PosCartModel.CartCurrency(),
|
|
1087
1087
|
|
|
1088
|
-
|
|
1088
|
+
cart_id: Joi.number(),
|
|
1089
1089
|
|
|
1090
|
-
|
|
1090
|
+
buy_now: Joi.boolean(),
|
|
1091
1091
|
|
|
1092
|
-
|
|
1092
|
+
delivery_promise: PosCartModel.ShipmentPromise(),
|
|
1093
1093
|
|
|
1094
|
-
|
|
1094
|
+
last_modified: Joi.string().allow(""),
|
|
1095
1095
|
|
|
1096
1096
|
breakup_values: PosCartModel.CartBreakup(),
|
|
1097
1097
|
|
|
1098
|
-
|
|
1098
|
+
shared_cart_details: PosCartModel.SharedCartDetails(),
|
|
1099
1099
|
|
|
1100
|
-
|
|
1100
|
+
coupon_text: Joi.string().allow(""),
|
|
1101
1101
|
|
|
1102
|
-
|
|
1102
|
+
payment_selection_lock: PosCartModel.PaymentSelectionLock(),
|
|
1103
1103
|
|
|
1104
|
-
|
|
1104
|
+
gstin: Joi.string().allow(""),
|
|
1105
1105
|
|
|
1106
|
-
|
|
1106
|
+
is_valid: Joi.boolean(),
|
|
1107
1107
|
|
|
1108
1108
|
uid: Joi.string().allow(""),
|
|
1109
1109
|
|
|
1110
|
-
|
|
1110
|
+
comment: Joi.string().allow(""),
|
|
1111
1111
|
|
|
1112
|
-
|
|
1112
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
1113
1113
|
|
|
1114
|
-
|
|
1114
|
+
restrict_checkout: Joi.boolean(),
|
|
1115
1115
|
|
|
1116
|
-
|
|
1116
|
+
message: Joi.string().allow(""),
|
|
1117
1117
|
|
|
1118
|
-
|
|
1118
|
+
id: Joi.string().allow(""),
|
|
1119
1119
|
|
|
1120
|
-
|
|
1120
|
+
items: Joi.array().items(PosCartModel.CartProductInfo()),
|
|
1121
1121
|
});
|
|
1122
1122
|
}
|
|
1123
1123
|
|
|
1124
1124
|
static SharedCartResponse() {
|
|
1125
1125
|
return Joi.object({
|
|
1126
|
-
error: Joi.string().allow(""),
|
|
1127
|
-
|
|
1128
1126
|
cart: PosCartModel.SharedCart(),
|
|
1127
|
+
|
|
1128
|
+
error: Joi.string().allow(""),
|
|
1129
1129
|
});
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|