@gofynd/fdk-client-javascript 0.1.36 → 0.1.37
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 +291 -285
- package/documentation/application/CATALOG.md +411 -411
- package/documentation/application/LOGISTIC.md +423 -101
- package/documentation/application/ORDER.md +287 -287
- package/documentation/application/POSCART.md +319 -313
- package/documentation/application/README.md +1 -1
- package/documentation/platform/AUDITTRAIL.md +2 -2
- package/documentation/platform/CART.md +488 -488
- package/documentation/platform/CATALOG.md +1656 -1439
- package/documentation/platform/COMPANYPROFILE.md +250 -229
- package/documentation/platform/ORDER.md +1183 -1183
- package/package.json +2 -2
- package/sdk/application/ApplicationAPIClient.js +3 -0
- package/sdk/application/ApplicationClient.d.ts +1 -0
- package/sdk/application/ApplicationClient.js +11 -1
- package/sdk/application/ApplicationConfig.d.ts +1 -0
- package/sdk/application/ApplicationConfig.js +1 -0
- package/sdk/application/ApplicationModels.d.ts +83 -78
- package/sdk/application/ApplicationModels.js +1445 -1354
- package/sdk/application/client/LogisticApplicationClient.d.ts +32 -21
- package/sdk/application/client/LogisticApplicationClient.js +62 -27
- package/sdk/application/models/LogisticValidator.d.ts +2 -1
- package/sdk/application/models/LogisticValidator.js +11 -6
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +5328 -5185
- package/sdk/platform/PlatformApplicationClient.js +2877 -2795
- package/sdk/platform/PlatformApplicationModels.d.ts +5 -5
- package/sdk/platform/PlatformApplicationModels.js +3707 -3571
- package/sdk/platform/PlatformClient.d.ts +2577 -2509
- package/sdk/platform/PlatformClient.js +2770 -2688
- package/sdk/platform/PlatformModels.d.ts +146 -139
- package/sdk/platform/PlatformModels.js +3718 -3582
- package/sdk/platform/client/CatalogPlatformClient.d.ts +21 -12
- package/sdk/platform/client/CatalogPlatformClient.js +48 -17
- package/sdk/platform/models/CatalogValidator.d.ts +2 -1
- package/sdk/platform/models/CatalogValidator.js +11 -5
|
@@ -1,45 +1,41 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
class Validator {
|
|
4
|
-
static
|
|
4
|
+
static Price() {
|
|
5
5
|
return Joi.object({
|
|
6
|
-
|
|
6
|
+
currency_code: Joi.string().allow(""),
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
});
|
|
10
|
-
}
|
|
8
|
+
currency_symbol: Joi.string().allow(""),
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
return Joi.object({
|
|
14
|
-
value: Joi.number(),
|
|
10
|
+
max: Joi.number(),
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
min: Joi.number(),
|
|
17
13
|
});
|
|
18
14
|
}
|
|
19
15
|
|
|
20
|
-
static
|
|
16
|
+
static ProductListingPrice() {
|
|
21
17
|
return Joi.object({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
value: Joi.string().allow(""),
|
|
18
|
+
marked: this.Price(),
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
effective: this.Price(),
|
|
27
21
|
});
|
|
28
22
|
}
|
|
29
23
|
|
|
30
|
-
static
|
|
24
|
+
static ProductListingActionPage() {
|
|
31
25
|
return Joi.object({
|
|
32
|
-
|
|
26
|
+
type: Joi.string().allow(""),
|
|
33
27
|
|
|
34
|
-
|
|
28
|
+
params: Joi.any(),
|
|
29
|
+
|
|
30
|
+
query: Joi.any(),
|
|
35
31
|
});
|
|
36
32
|
}
|
|
37
33
|
|
|
38
|
-
static
|
|
34
|
+
static ProductListingAction() {
|
|
39
35
|
return Joi.object({
|
|
40
|
-
|
|
36
|
+
page: this.ProductListingActionPage(),
|
|
41
37
|
|
|
42
|
-
|
|
38
|
+
type: Joi.string().allow(""),
|
|
43
39
|
});
|
|
44
40
|
}
|
|
45
41
|
|
|
@@ -51,147 +47,151 @@ class Validator {
|
|
|
51
47
|
|
|
52
48
|
static Media() {
|
|
53
49
|
return Joi.object({
|
|
54
|
-
url: Joi.string().allow(""),
|
|
55
|
-
|
|
56
50
|
type: Joi.string().allow(""),
|
|
57
51
|
|
|
52
|
+
alt: Joi.string().allow(""),
|
|
53
|
+
|
|
58
54
|
meta: this.Meta(),
|
|
59
55
|
|
|
60
|
-
|
|
56
|
+
url: Joi.string().allow(""),
|
|
61
57
|
});
|
|
62
58
|
}
|
|
63
59
|
|
|
64
|
-
static
|
|
60
|
+
static ProductBrand() {
|
|
65
61
|
return Joi.object({
|
|
66
|
-
|
|
62
|
+
action: this.ProductListingAction(),
|
|
67
63
|
|
|
68
|
-
|
|
64
|
+
name: Joi.string().allow(""),
|
|
69
65
|
|
|
70
|
-
|
|
66
|
+
logo: this.Media(),
|
|
67
|
+
|
|
68
|
+
description: Joi.string().allow(""),
|
|
69
|
+
|
|
70
|
+
uid: Joi.number(),
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
static
|
|
74
|
+
static ProductDetailAttribute() {
|
|
75
75
|
return Joi.object({
|
|
76
76
|
type: Joi.string().allow(""),
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
key: Joi.string().allow(""),
|
|
79
|
+
|
|
80
|
+
value: Joi.string().allow(""),
|
|
79
81
|
});
|
|
80
82
|
}
|
|
81
83
|
|
|
82
|
-
static
|
|
84
|
+
static ProductDetailGroupedAttribute() {
|
|
83
85
|
return Joi.object({
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
description: Joi.string().allow(""),
|
|
86
|
+
details: Joi.array().items(this.ProductDetailAttribute()),
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
title: Joi.string().allow(""),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
static CustomMetaFields() {
|
|
93
|
+
return Joi.object({
|
|
94
|
+
key: Joi.string().allow("").required(),
|
|
91
95
|
|
|
92
|
-
|
|
96
|
+
value: Joi.string().allow("").required(),
|
|
93
97
|
});
|
|
94
98
|
}
|
|
95
99
|
|
|
96
|
-
static
|
|
100
|
+
static ApplicationItemMOQ() {
|
|
97
101
|
return Joi.object({
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
max: Joi.number(),
|
|
102
|
+
increment_unit: Joi.number(),
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
minimum: Joi.number(),
|
|
103
105
|
|
|
104
|
-
|
|
106
|
+
maximum: Joi.number(),
|
|
105
107
|
});
|
|
106
108
|
}
|
|
107
109
|
|
|
108
|
-
static
|
|
110
|
+
static ApplicationItemSEO() {
|
|
109
111
|
return Joi.object({
|
|
110
|
-
|
|
112
|
+
title: Joi.any(),
|
|
111
113
|
|
|
112
|
-
|
|
114
|
+
description: Joi.any(),
|
|
113
115
|
});
|
|
114
116
|
}
|
|
115
117
|
|
|
116
|
-
static
|
|
118
|
+
static NetQuantity() {
|
|
117
119
|
return Joi.object({
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
maximum: Joi.number(),
|
|
120
|
+
unit: Joi.any(),
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
value: Joi.number(),
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
static ProductDetail() {
|
|
127
127
|
return Joi.object({
|
|
128
|
-
|
|
128
|
+
discount: Joi.string().allow(""),
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
teaser_tag: Joi.string().allow(""),
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
attributes: Joi.any(),
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
price: this.ProductListingPrice(),
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
brand: this.ProductBrand(),
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
similars: Joi.array().items(Joi.string().allow("")),
|
|
139
|
+
|
|
140
|
+
short_description: Joi.string().allow(""),
|
|
139
141
|
|
|
140
142
|
grouped_attributes: Joi.array().items(
|
|
141
143
|
this.ProductDetailGroupedAttribute()
|
|
142
144
|
),
|
|
143
145
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
_custom_meta: Joi.array().items(this.CustomMetaFields()),
|
|
146
|
+
color: Joi.string().allow(""),
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
image_nature: Joi.string().allow(""),
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
_custom_meta: Joi.array().items(this.CustomMetaFields()),
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
moq: this.ApplicationItemMOQ(),
|
|
153
153
|
|
|
154
154
|
rating: Joi.number(),
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
uid: Joi.number(),
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
type: Joi.string().allow(""),
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
tryouts: Joi.array().items(Joi.string().allow("")),
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
seo: this.ApplicationItemSEO(),
|
|
163
|
+
|
|
164
|
+
has_variant: Joi.boolean(),
|
|
163
165
|
|
|
164
166
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
165
167
|
|
|
166
|
-
|
|
168
|
+
_custom_json: Joi.any(),
|
|
167
169
|
|
|
168
|
-
|
|
170
|
+
net_quantity: this.NetQuantity(),
|
|
169
171
|
|
|
170
|
-
|
|
172
|
+
action: this.ProductListingAction(),
|
|
171
173
|
|
|
172
|
-
|
|
174
|
+
highlights: Joi.array().items(Joi.string().allow("")),
|
|
173
175
|
|
|
174
|
-
|
|
176
|
+
product_online_date: Joi.string().allow(""),
|
|
175
177
|
|
|
176
|
-
|
|
178
|
+
rating_count: Joi.number(),
|
|
177
179
|
|
|
178
|
-
|
|
180
|
+
name: Joi.string().allow(""),
|
|
179
181
|
|
|
180
182
|
description: Joi.string().allow(""),
|
|
181
183
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
tryouts: Joi.array().items(Joi.string().allow("")),
|
|
184
|
+
medias: Joi.array().items(this.Media()),
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
slug: Joi.string().allow("").required(),
|
|
187
187
|
|
|
188
|
-
|
|
188
|
+
categories: Joi.array().items(this.ProductBrand()),
|
|
189
189
|
|
|
190
|
-
|
|
190
|
+
is_dependent: Joi.boolean(),
|
|
191
191
|
|
|
192
|
-
|
|
192
|
+
item_type: Joi.string().allow(""),
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
item_code: Joi.string().allow(""),
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -201,139 +201,139 @@ class Validator {
|
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
static ProductSizeStores() {
|
|
205
|
-
return Joi.object({
|
|
206
|
-
count: Joi.number(),
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
|
|
210
204
|
static Dimension() {
|
|
211
205
|
return Joi.object({
|
|
212
|
-
height: Joi.number().required(),
|
|
213
|
-
|
|
214
206
|
is_default: Joi.boolean().required(),
|
|
215
207
|
|
|
216
208
|
unit: Joi.string().allow("").required(),
|
|
217
209
|
|
|
210
|
+
width: Joi.number().required(),
|
|
211
|
+
|
|
218
212
|
length: Joi.number().required(),
|
|
219
213
|
|
|
220
|
-
|
|
214
|
+
height: Joi.number().required(),
|
|
221
215
|
});
|
|
222
216
|
}
|
|
223
217
|
|
|
224
218
|
static Weight() {
|
|
225
219
|
return Joi.object({
|
|
226
|
-
|
|
220
|
+
unit: Joi.string().allow("").required(),
|
|
227
221
|
|
|
228
222
|
is_default: Joi.boolean().required(),
|
|
229
223
|
|
|
230
|
-
|
|
224
|
+
shipping: Joi.number().required(),
|
|
231
225
|
});
|
|
232
226
|
}
|
|
233
227
|
|
|
234
228
|
static ProductSize() {
|
|
235
229
|
return Joi.object({
|
|
236
|
-
is_available: Joi.boolean(),
|
|
237
|
-
|
|
238
230
|
seller_identifiers: Joi.array().items(Joi.string().allow("")),
|
|
239
231
|
|
|
232
|
+
is_available: Joi.boolean(),
|
|
233
|
+
|
|
240
234
|
dimension: this.Dimension(),
|
|
241
235
|
|
|
236
|
+
display: Joi.string().allow(""),
|
|
237
|
+
|
|
242
238
|
quantity: Joi.number(),
|
|
243
239
|
|
|
244
240
|
value: Joi.string().allow(""),
|
|
245
241
|
|
|
246
242
|
weight: this.Weight(),
|
|
247
|
-
|
|
248
|
-
display: Joi.string().allow(""),
|
|
249
243
|
});
|
|
250
244
|
}
|
|
251
245
|
|
|
252
246
|
static SizeChartValues() {
|
|
253
247
|
return Joi.object({
|
|
248
|
+
col_6: Joi.string().allow(""),
|
|
249
|
+
|
|
254
250
|
col_1: Joi.string().allow(""),
|
|
255
251
|
|
|
256
|
-
|
|
252
|
+
col_3: Joi.string().allow(""),
|
|
257
253
|
|
|
258
|
-
|
|
254
|
+
col_5: Joi.string().allow(""),
|
|
259
255
|
|
|
260
256
|
col_2: Joi.string().allow(""),
|
|
261
257
|
|
|
262
|
-
col_3: Joi.string().allow(""),
|
|
263
|
-
|
|
264
258
|
col_4: Joi.string().allow(""),
|
|
265
259
|
});
|
|
266
260
|
}
|
|
267
261
|
|
|
268
262
|
static ColumnHeader() {
|
|
269
263
|
return Joi.object({
|
|
270
|
-
value: Joi.string().allow(""),
|
|
271
|
-
|
|
272
264
|
convertable: Joi.boolean(),
|
|
265
|
+
|
|
266
|
+
value: Joi.string().allow(""),
|
|
273
267
|
});
|
|
274
268
|
}
|
|
275
269
|
|
|
276
270
|
static ColumnHeaders() {
|
|
277
271
|
return Joi.object({
|
|
272
|
+
col_6: this.ColumnHeader(),
|
|
273
|
+
|
|
278
274
|
col_1: this.ColumnHeader(),
|
|
279
275
|
|
|
280
|
-
|
|
276
|
+
col_3: this.ColumnHeader(),
|
|
281
277
|
|
|
282
|
-
|
|
278
|
+
col_5: this.ColumnHeader(),
|
|
283
279
|
|
|
284
280
|
col_2: this.ColumnHeader(),
|
|
285
281
|
|
|
286
|
-
col_3: this.ColumnHeader(),
|
|
287
|
-
|
|
288
282
|
col_4: this.ColumnHeader(),
|
|
289
283
|
});
|
|
290
284
|
}
|
|
291
285
|
|
|
292
286
|
static SizeChart() {
|
|
293
287
|
return Joi.object({
|
|
294
|
-
description: Joi.string().allow(""),
|
|
295
|
-
|
|
296
288
|
sizes: Joi.array().items(this.SizeChartValues()),
|
|
297
289
|
|
|
298
290
|
title: Joi.string().allow(""),
|
|
299
291
|
|
|
300
|
-
size_tip: Joi.string().allow(""),
|
|
301
|
-
|
|
302
292
|
unit: Joi.string().allow(""),
|
|
303
293
|
|
|
304
|
-
|
|
294
|
+
description: Joi.string().allow(""),
|
|
305
295
|
|
|
306
296
|
image: Joi.string().allow(""),
|
|
297
|
+
|
|
298
|
+
headers: this.ColumnHeaders(),
|
|
299
|
+
|
|
300
|
+
size_tip: Joi.string().allow(""),
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
static ProductSizeStores() {
|
|
305
|
+
return Joi.object({
|
|
306
|
+
count: Joi.number(),
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
static ProductSizes() {
|
|
311
311
|
return Joi.object({
|
|
312
|
-
|
|
312
|
+
sizes: Joi.array().items(this.ProductSize()),
|
|
313
313
|
|
|
314
|
-
|
|
314
|
+
sellable: Joi.boolean(),
|
|
315
315
|
|
|
316
316
|
discount: Joi.string().allow(""),
|
|
317
317
|
|
|
318
|
-
|
|
318
|
+
size_chart: this.SizeChart(),
|
|
319
319
|
|
|
320
|
-
|
|
320
|
+
price: this.ProductListingPrice(),
|
|
321
321
|
|
|
322
322
|
multi_size: Joi.boolean(),
|
|
323
323
|
|
|
324
|
-
|
|
324
|
+
stores: this.ProductSizeStores(),
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
static AttributeDetail() {
|
|
329
329
|
return Joi.object({
|
|
330
|
+
display: Joi.string().allow(""),
|
|
331
|
+
|
|
330
332
|
key: Joi.string().allow(""),
|
|
331
333
|
|
|
332
334
|
logo: Joi.string().allow(""),
|
|
333
335
|
|
|
334
336
|
description: Joi.string().allow(""),
|
|
335
|
-
|
|
336
|
-
display: Joi.string().allow(""),
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
339
|
|
|
@@ -355,13 +355,13 @@ class Validator {
|
|
|
355
355
|
|
|
356
356
|
static ProductCompareResponse() {
|
|
357
357
|
return Joi.object({
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
items: Joi.array().items(this.ProductDetail()),
|
|
358
|
+
subtitle: Joi.string().allow(""),
|
|
361
359
|
|
|
362
360
|
title: Joi.string().allow(""),
|
|
363
361
|
|
|
364
|
-
|
|
362
|
+
items: Joi.array().items(this.ProductDetail()),
|
|
363
|
+
|
|
364
|
+
attributes_metadata: Joi.array().items(this.AttributeMetadata()),
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
367
|
|
|
@@ -373,23 +373,23 @@ class Validator {
|
|
|
373
373
|
|
|
374
374
|
static ProductVariantItemResponse() {
|
|
375
375
|
return Joi.object({
|
|
376
|
-
|
|
376
|
+
color_name: Joi.string().allow(""),
|
|
377
377
|
|
|
378
378
|
is_available: Joi.boolean(),
|
|
379
379
|
|
|
380
|
-
|
|
380
|
+
action: this.ProductListingAction(),
|
|
381
381
|
|
|
382
|
-
|
|
382
|
+
name: Joi.string().allow(""),
|
|
383
383
|
|
|
384
384
|
color: Joi.string().allow(""),
|
|
385
385
|
|
|
386
|
-
|
|
386
|
+
medias: Joi.array().items(this.Media()),
|
|
387
387
|
|
|
388
|
-
|
|
388
|
+
slug: Joi.string().allow(""),
|
|
389
389
|
|
|
390
|
-
|
|
390
|
+
value: Joi.string().allow(""),
|
|
391
391
|
|
|
392
|
-
|
|
392
|
+
uid: Joi.number(),
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
395
|
|
|
@@ -399,9 +399,9 @@ class Validator {
|
|
|
399
399
|
|
|
400
400
|
items: Joi.array().items(this.ProductVariantItemResponse()),
|
|
401
401
|
|
|
402
|
-
header: Joi.string().allow(""),
|
|
403
|
-
|
|
404
402
|
display_type: Joi.string().allow(""),
|
|
403
|
+
|
|
404
|
+
header: Joi.string().allow(""),
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
407
|
|
|
@@ -411,65 +411,65 @@ class Validator {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
+
static CompanyDetail() {
|
|
415
|
+
return Joi.object({
|
|
416
|
+
id: Joi.number(),
|
|
417
|
+
|
|
418
|
+
name: Joi.string().allow(""),
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
|
|
414
422
|
static ProductStockPrice() {
|
|
415
423
|
return Joi.object({
|
|
416
|
-
|
|
424
|
+
marked: Joi.number(),
|
|
417
425
|
|
|
418
426
|
effective: Joi.number(),
|
|
419
427
|
|
|
420
|
-
|
|
428
|
+
currency: Joi.string().allow(""),
|
|
421
429
|
});
|
|
422
430
|
}
|
|
423
431
|
|
|
424
432
|
static StoreDetail() {
|
|
425
433
|
return Joi.object({
|
|
426
|
-
code: Joi.string().allow(""),
|
|
427
|
-
|
|
428
434
|
id: Joi.number(),
|
|
429
435
|
|
|
430
|
-
city: Joi.string().allow(""),
|
|
431
|
-
|
|
432
436
|
name: Joi.string().allow(""),
|
|
437
|
+
|
|
438
|
+
code: Joi.string().allow(""),
|
|
439
|
+
|
|
440
|
+
city: Joi.string().allow(""),
|
|
433
441
|
});
|
|
434
442
|
}
|
|
435
443
|
|
|
436
444
|
static Seller() {
|
|
437
445
|
return Joi.object({
|
|
438
|
-
uid: Joi.number(),
|
|
439
|
-
|
|
440
446
|
count: Joi.number(),
|
|
441
447
|
|
|
442
448
|
name: Joi.string().allow(""),
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
static CompanyDetail() {
|
|
447
|
-
return Joi.object({
|
|
448
|
-
id: Joi.number(),
|
|
449
449
|
|
|
450
|
-
|
|
450
|
+
uid: Joi.number(),
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
static ProductStockStatusItem() {
|
|
455
455
|
return Joi.object({
|
|
456
|
-
|
|
456
|
+
item_id: Joi.number(),
|
|
457
|
+
|
|
458
|
+
company: this.CompanyDetail(),
|
|
457
459
|
|
|
458
460
|
price: this.ProductStockPrice(),
|
|
459
461
|
|
|
460
|
-
|
|
462
|
+
size: Joi.string().allow(""),
|
|
461
463
|
|
|
462
464
|
identifier: Joi.any(),
|
|
463
465
|
|
|
466
|
+
quantity: Joi.number(),
|
|
467
|
+
|
|
464
468
|
store: this.StoreDetail(),
|
|
465
469
|
|
|
466
470
|
seller: this.Seller(),
|
|
467
471
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
size: Joi.string().allow(""),
|
|
471
|
-
|
|
472
|
-
item_id: Joi.number(),
|
|
472
|
+
uid: Joi.string().allow(""),
|
|
473
473
|
});
|
|
474
474
|
}
|
|
475
475
|
|
|
@@ -481,172 +481,172 @@ class Validator {
|
|
|
481
481
|
|
|
482
482
|
static ProductStockPolling() {
|
|
483
483
|
return Joi.object({
|
|
484
|
-
items: Joi.array().items(this.ProductStockStatusItem()),
|
|
485
|
-
|
|
486
484
|
page: this.Page().required(),
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
static ProductFiltersKey() {
|
|
491
|
-
return Joi.object({
|
|
492
|
-
logo: Joi.string().allow(""),
|
|
493
|
-
|
|
494
|
-
name: Joi.string().allow("").required(),
|
|
495
485
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
display: Joi.string().allow("").required(),
|
|
486
|
+
items: Joi.array().items(this.ProductStockStatusItem()),
|
|
499
487
|
});
|
|
500
488
|
}
|
|
501
489
|
|
|
502
490
|
static ProductFiltersValue() {
|
|
503
491
|
return Joi.object({
|
|
504
|
-
|
|
492
|
+
min: Joi.number(),
|
|
493
|
+
|
|
494
|
+
query_format: Joi.string().allow(""),
|
|
495
|
+
|
|
496
|
+
display_format: Joi.string().allow(""),
|
|
505
497
|
|
|
506
498
|
currency_code: Joi.string().allow(""),
|
|
507
499
|
|
|
508
500
|
currency_symbol: Joi.string().allow(""),
|
|
509
501
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
min: Joi.number(),
|
|
502
|
+
display: Joi.string().allow("").required(),
|
|
513
503
|
|
|
514
504
|
value: Joi.string().allow(""),
|
|
515
505
|
|
|
516
|
-
|
|
506
|
+
is_selected: Joi.boolean().required(),
|
|
517
507
|
|
|
518
508
|
selected_max: Joi.number(),
|
|
519
509
|
|
|
510
|
+
max: Joi.number(),
|
|
511
|
+
|
|
520
512
|
selected_min: Joi.number(),
|
|
521
513
|
|
|
522
514
|
count: Joi.number(),
|
|
515
|
+
});
|
|
516
|
+
}
|
|
523
517
|
|
|
524
|
-
|
|
525
|
-
|
|
518
|
+
static ProductFiltersKey() {
|
|
519
|
+
return Joi.object({
|
|
526
520
|
display: Joi.string().allow("").required(),
|
|
521
|
+
|
|
522
|
+
kind: Joi.string().allow(""),
|
|
523
|
+
|
|
524
|
+
name: Joi.string().allow("").required(),
|
|
525
|
+
|
|
526
|
+
logo: Joi.string().allow(""),
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
529
|
|
|
530
530
|
static ProductFilters() {
|
|
531
531
|
return Joi.object({
|
|
532
|
-
key: this.ProductFiltersKey().required(),
|
|
533
|
-
|
|
534
532
|
values: Joi.array().items(this.ProductFiltersValue()).required(),
|
|
533
|
+
|
|
534
|
+
key: this.ProductFiltersKey().required(),
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
537
|
|
|
538
538
|
static ProductVariantListingResponse() {
|
|
539
539
|
return Joi.object({
|
|
540
|
-
header: Joi.string().allow(""),
|
|
541
|
-
|
|
542
|
-
display_type: Joi.string().allow(""),
|
|
543
|
-
|
|
544
540
|
total: Joi.number(),
|
|
545
541
|
|
|
542
|
+
items: Joi.array().items(this.ProductVariantItemResponse()),
|
|
543
|
+
|
|
546
544
|
key: Joi.string().allow(""),
|
|
547
545
|
|
|
548
|
-
|
|
546
|
+
display_type: Joi.string().allow(""),
|
|
547
|
+
|
|
548
|
+
header: Joi.string().allow(""),
|
|
549
549
|
});
|
|
550
550
|
}
|
|
551
551
|
|
|
552
552
|
static ProductListingDetail() {
|
|
553
553
|
return Joi.object({
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
short_description: Joi.string().allow(""),
|
|
554
|
+
discount: Joi.string().allow(""),
|
|
557
555
|
|
|
558
|
-
|
|
556
|
+
teaser_tag: Joi.string().allow(""),
|
|
559
557
|
|
|
560
|
-
|
|
558
|
+
attributes: Joi.any(),
|
|
561
559
|
|
|
562
|
-
|
|
560
|
+
price: this.ProductListingPrice(),
|
|
563
561
|
|
|
564
|
-
|
|
562
|
+
brand: this.ProductBrand(),
|
|
565
563
|
|
|
566
|
-
|
|
564
|
+
similars: Joi.array().items(Joi.string().allow("")),
|
|
567
565
|
|
|
568
|
-
|
|
566
|
+
short_description: Joi.string().allow(""),
|
|
569
567
|
|
|
570
568
|
grouped_attributes: Joi.array().items(
|
|
571
569
|
this.ProductDetailGroupedAttribute()
|
|
572
570
|
),
|
|
573
571
|
|
|
574
|
-
|
|
572
|
+
color: Joi.string().allow(""),
|
|
575
573
|
|
|
576
|
-
|
|
574
|
+
image_nature: Joi.string().allow(""),
|
|
577
575
|
|
|
578
576
|
_custom_meta: Joi.array().items(this.CustomMetaFields()),
|
|
579
577
|
|
|
580
|
-
|
|
578
|
+
moq: this.ApplicationItemMOQ(),
|
|
581
579
|
|
|
582
|
-
|
|
580
|
+
rating: Joi.number(),
|
|
583
581
|
|
|
584
|
-
|
|
582
|
+
uid: Joi.number(),
|
|
585
583
|
|
|
586
|
-
|
|
584
|
+
type: Joi.string().allow(""),
|
|
587
585
|
|
|
588
|
-
|
|
586
|
+
sellable: Joi.boolean(),
|
|
589
587
|
|
|
590
|
-
|
|
588
|
+
tryouts: Joi.array().items(Joi.string().allow("")),
|
|
591
589
|
|
|
592
|
-
|
|
590
|
+
seo: this.ApplicationItemSEO(),
|
|
593
591
|
|
|
594
|
-
|
|
592
|
+
has_variant: Joi.boolean(),
|
|
595
593
|
|
|
596
594
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
597
595
|
|
|
598
|
-
|
|
596
|
+
_custom_json: Joi.any(),
|
|
599
597
|
|
|
600
|
-
|
|
598
|
+
net_quantity: this.NetQuantity(),
|
|
601
599
|
|
|
602
|
-
|
|
600
|
+
variants: Joi.array().items(this.ProductVariantListingResponse()),
|
|
603
601
|
|
|
604
|
-
|
|
602
|
+
action: this.ProductListingAction(),
|
|
605
603
|
|
|
606
|
-
|
|
604
|
+
highlights: Joi.array().items(Joi.string().allow("")),
|
|
607
605
|
|
|
608
|
-
|
|
606
|
+
product_online_date: Joi.string().allow(""),
|
|
609
607
|
|
|
610
|
-
|
|
608
|
+
sizes: Joi.array().items(Joi.string().allow("")),
|
|
611
609
|
|
|
612
|
-
|
|
610
|
+
rating_count: Joi.number(),
|
|
613
611
|
|
|
614
|
-
|
|
612
|
+
name: Joi.string().allow(""),
|
|
615
613
|
|
|
616
|
-
|
|
614
|
+
identifiers: Joi.array().items(Joi.string().allow("")),
|
|
617
615
|
|
|
618
|
-
|
|
616
|
+
description: Joi.string().allow(""),
|
|
619
617
|
|
|
620
|
-
|
|
618
|
+
medias: Joi.array().items(this.Media()),
|
|
621
619
|
|
|
622
|
-
|
|
620
|
+
slug: Joi.string().allow("").required(),
|
|
623
621
|
|
|
624
|
-
|
|
622
|
+
categories: Joi.array().items(this.ProductBrand()),
|
|
625
623
|
|
|
626
|
-
|
|
624
|
+
is_dependent: Joi.boolean(),
|
|
627
625
|
|
|
628
|
-
|
|
626
|
+
item_type: Joi.string().allow(""),
|
|
627
|
+
|
|
628
|
+
item_code: Joi.string().allow(""),
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
static ProductSortOn() {
|
|
633
633
|
return Joi.object({
|
|
634
|
-
value: Joi.string().allow(""),
|
|
635
|
-
|
|
636
634
|
is_selected: Joi.boolean(),
|
|
637
635
|
|
|
638
636
|
name: Joi.string().allow(""),
|
|
637
|
+
|
|
638
|
+
value: Joi.string().allow(""),
|
|
639
639
|
});
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
static ProductListingResponse() {
|
|
643
643
|
return Joi.object({
|
|
644
|
+
page: this.Page().required(),
|
|
645
|
+
|
|
644
646
|
filters: Joi.array().items(this.ProductFilters()),
|
|
645
647
|
|
|
646
648
|
items: Joi.array().items(this.ProductListingDetail()),
|
|
647
649
|
|
|
648
|
-
page: this.Page().required(),
|
|
649
|
-
|
|
650
650
|
sort_on: Joi.array().items(this.ProductSortOn()),
|
|
651
651
|
});
|
|
652
652
|
}
|
|
@@ -661,131 +661,131 @@ class Validator {
|
|
|
661
661
|
|
|
662
662
|
static BrandItem() {
|
|
663
663
|
return Joi.object({
|
|
664
|
-
|
|
664
|
+
discount: Joi.string().allow(""),
|
|
665
665
|
|
|
666
|
-
|
|
666
|
+
action: this.ProductListingAction(),
|
|
667
667
|
|
|
668
|
-
|
|
668
|
+
name: Joi.string().allow(""),
|
|
669
669
|
|
|
670
|
-
|
|
670
|
+
logo: this.Media(),
|
|
671
|
+
|
|
672
|
+
description: Joi.string().allow(""),
|
|
671
673
|
|
|
672
674
|
slug: Joi.string().allow(""),
|
|
673
675
|
|
|
674
|
-
|
|
676
|
+
banners: this.ImageUrls(),
|
|
675
677
|
|
|
676
678
|
departments: Joi.array().items(Joi.string().allow("")),
|
|
677
679
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
name: Joi.string().allow(""),
|
|
680
|
+
uid: Joi.number(),
|
|
681
681
|
});
|
|
682
682
|
}
|
|
683
683
|
|
|
684
684
|
static BrandListingResponse() {
|
|
685
685
|
return Joi.object({
|
|
686
|
-
items: Joi.array().items(this.BrandItem()),
|
|
687
|
-
|
|
688
686
|
page: this.Page().required(),
|
|
687
|
+
|
|
688
|
+
items: Joi.array().items(this.BrandItem()),
|
|
689
689
|
});
|
|
690
690
|
}
|
|
691
691
|
|
|
692
692
|
static BrandDetailResponse() {
|
|
693
693
|
return Joi.object({
|
|
694
|
-
|
|
694
|
+
name: Joi.string().allow(""),
|
|
695
695
|
|
|
696
|
-
|
|
696
|
+
logo: this.Media(),
|
|
697
697
|
|
|
698
698
|
description: Joi.string().allow(""),
|
|
699
699
|
|
|
700
|
-
|
|
700
|
+
banners: this.ImageUrls(),
|
|
701
701
|
|
|
702
|
-
|
|
702
|
+
uid: Joi.number(),
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
|
|
706
706
|
static DepartmentIdentifier() {
|
|
707
707
|
return Joi.object({
|
|
708
|
-
uid: Joi.number(),
|
|
709
|
-
|
|
710
708
|
slug: Joi.string().allow(""),
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
static CategoryBanner() {
|
|
715
|
-
return Joi.object({
|
|
716
|
-
portrait: this.Media().required(),
|
|
717
709
|
|
|
718
|
-
|
|
710
|
+
uid: Joi.number(),
|
|
719
711
|
});
|
|
720
712
|
}
|
|
721
713
|
|
|
722
714
|
static ThirdLevelChild() {
|
|
723
715
|
return Joi.object({
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
uid: Joi.number(),
|
|
727
|
-
|
|
728
|
-
slug: Joi.string().allow(""),
|
|
716
|
+
childs: Joi.array().items(Joi.any()),
|
|
729
717
|
|
|
730
718
|
action: this.ProductListingAction(),
|
|
731
719
|
|
|
732
|
-
|
|
720
|
+
name: Joi.string().allow(""),
|
|
733
721
|
|
|
734
722
|
_custom_json: Joi.any(),
|
|
735
723
|
|
|
736
|
-
|
|
737
|
-
});
|
|
738
|
-
}
|
|
724
|
+
slug: Joi.string().allow(""),
|
|
739
725
|
|
|
740
|
-
static SecondLevelChild() {
|
|
741
|
-
return Joi.object({
|
|
742
726
|
banners: this.ImageUrls(),
|
|
743
727
|
|
|
744
728
|
uid: Joi.number(),
|
|
729
|
+
});
|
|
730
|
+
}
|
|
745
731
|
|
|
746
|
-
|
|
732
|
+
static SecondLevelChild() {
|
|
733
|
+
return Joi.object({
|
|
734
|
+
childs: Joi.array().items(this.ThirdLevelChild()),
|
|
747
735
|
|
|
748
736
|
action: this.ProductListingAction(),
|
|
749
737
|
|
|
750
|
-
|
|
738
|
+
name: Joi.string().allow(""),
|
|
751
739
|
|
|
752
740
|
_custom_json: Joi.any(),
|
|
753
741
|
|
|
754
|
-
|
|
755
|
-
});
|
|
756
|
-
}
|
|
742
|
+
slug: Joi.string().allow(""),
|
|
757
743
|
|
|
758
|
-
static Child() {
|
|
759
|
-
return Joi.object({
|
|
760
744
|
banners: this.ImageUrls(),
|
|
761
745
|
|
|
762
746
|
uid: Joi.number(),
|
|
747
|
+
});
|
|
748
|
+
}
|
|
763
749
|
|
|
764
|
-
|
|
750
|
+
static Child() {
|
|
751
|
+
return Joi.object({
|
|
752
|
+
childs: Joi.array().items(this.SecondLevelChild()),
|
|
765
753
|
|
|
766
754
|
action: this.ProductListingAction(),
|
|
767
755
|
|
|
768
|
-
|
|
756
|
+
name: Joi.string().allow(""),
|
|
769
757
|
|
|
770
758
|
_custom_json: Joi.any(),
|
|
771
759
|
|
|
772
|
-
|
|
760
|
+
slug: Joi.string().allow(""),
|
|
761
|
+
|
|
762
|
+
banners: this.ImageUrls(),
|
|
763
|
+
|
|
764
|
+
uid: Joi.number(),
|
|
773
765
|
});
|
|
774
766
|
}
|
|
775
767
|
|
|
776
|
-
static
|
|
768
|
+
static CategoryBanner() {
|
|
777
769
|
return Joi.object({
|
|
778
|
-
|
|
770
|
+
portrait: this.Media().required(),
|
|
779
771
|
|
|
780
|
-
|
|
772
|
+
landscape: this.Media().required(),
|
|
773
|
+
});
|
|
774
|
+
}
|
|
781
775
|
|
|
782
|
-
|
|
776
|
+
static CategoryItems() {
|
|
777
|
+
return Joi.object({
|
|
778
|
+
childs: Joi.array().items(this.Child()),
|
|
783
779
|
|
|
784
780
|
action: this.ProductListingAction().required(),
|
|
785
781
|
|
|
786
|
-
childs: Joi.array().items(this.Child()),
|
|
787
|
-
|
|
788
782
|
name: Joi.string().allow("").required(),
|
|
783
|
+
|
|
784
|
+
slug: Joi.string().allow("").required(),
|
|
785
|
+
|
|
786
|
+
banners: this.CategoryBanner().required(),
|
|
787
|
+
|
|
788
|
+
uid: Joi.number().required(),
|
|
789
789
|
});
|
|
790
790
|
}
|
|
791
791
|
|
|
@@ -807,37 +807,37 @@ class Validator {
|
|
|
807
807
|
|
|
808
808
|
static CategoryMetaResponse() {
|
|
809
809
|
return Joi.object({
|
|
810
|
+
name: Joi.string().allow(""),
|
|
811
|
+
|
|
810
812
|
banners: this.ImageUrls(),
|
|
811
813
|
|
|
812
814
|
logo: this.Media(),
|
|
813
815
|
|
|
814
816
|
uid: Joi.number(),
|
|
815
|
-
|
|
816
|
-
name: Joi.string().allow(""),
|
|
817
817
|
});
|
|
818
818
|
}
|
|
819
819
|
|
|
820
820
|
static HomeListingResponse() {
|
|
821
821
|
return Joi.object({
|
|
822
|
+
page: this.Page().required(),
|
|
823
|
+
|
|
822
824
|
message: Joi.string().allow(""),
|
|
823
825
|
|
|
824
826
|
items: Joi.array().items(this.ProductListingDetail()),
|
|
825
|
-
|
|
826
|
-
page: this.Page().required(),
|
|
827
827
|
});
|
|
828
828
|
}
|
|
829
829
|
|
|
830
830
|
static Department() {
|
|
831
831
|
return Joi.object({
|
|
832
|
-
|
|
832
|
+
name: Joi.string().allow(""),
|
|
833
|
+
|
|
834
|
+
logo: this.Media(),
|
|
833
835
|
|
|
834
836
|
slug: Joi.string().allow(""),
|
|
835
837
|
|
|
836
838
|
priority_order: Joi.number(),
|
|
837
839
|
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
name: Joi.string().allow(""),
|
|
840
|
+
uid: Joi.number(),
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
843
|
|
|
@@ -855,9 +855,9 @@ class Validator {
|
|
|
855
855
|
|
|
856
856
|
logo: this.Media(),
|
|
857
857
|
|
|
858
|
-
_custom_json: Joi.any(),
|
|
859
|
-
|
|
860
858
|
display: Joi.string().allow(""),
|
|
859
|
+
|
|
860
|
+
_custom_json: Joi.any(),
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
863
|
|
|
@@ -867,155 +867,155 @@ class Validator {
|
|
|
867
867
|
});
|
|
868
868
|
}
|
|
869
869
|
|
|
870
|
-
static
|
|
870
|
+
static CollectionListingFilterType() {
|
|
871
871
|
return Joi.object({
|
|
872
|
-
is_selected: Joi.boolean(),
|
|
873
|
-
|
|
874
872
|
display: Joi.string().allow(""),
|
|
875
873
|
|
|
874
|
+
is_selected: Joi.boolean(),
|
|
875
|
+
|
|
876
876
|
name: Joi.string().allow(""),
|
|
877
877
|
});
|
|
878
878
|
}
|
|
879
879
|
|
|
880
|
-
static
|
|
880
|
+
static CollectionListingFilterTag() {
|
|
881
881
|
return Joi.object({
|
|
882
|
-
is_selected: Joi.boolean(),
|
|
883
|
-
|
|
884
882
|
display: Joi.string().allow(""),
|
|
885
883
|
|
|
884
|
+
is_selected: Joi.boolean(),
|
|
885
|
+
|
|
886
886
|
name: Joi.string().allow(""),
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
889
|
|
|
890
890
|
static CollectionListingFilter() {
|
|
891
891
|
return Joi.object({
|
|
892
|
-
tags: Joi.array().items(this.CollectionListingFilterTag()),
|
|
893
|
-
|
|
894
892
|
type: Joi.array().items(this.CollectionListingFilterType()),
|
|
893
|
+
|
|
894
|
+
tags: Joi.array().items(this.CollectionListingFilterTag()),
|
|
895
895
|
});
|
|
896
896
|
}
|
|
897
897
|
|
|
898
898
|
static CollectionQuery() {
|
|
899
899
|
return Joi.object({
|
|
900
|
-
|
|
900
|
+
attribute: Joi.string().allow("").required(),
|
|
901
901
|
|
|
902
902
|
op: Joi.string().allow("").required(),
|
|
903
903
|
|
|
904
|
-
|
|
904
|
+
value: Joi.array().items(Joi.any()).required(),
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
907
|
|
|
908
908
|
static GetCollectionDetailNest() {
|
|
909
909
|
return Joi.object({
|
|
910
|
+
allow_facets: Joi.boolean(),
|
|
911
|
+
|
|
912
|
+
sort_on: Joi.string().allow(""),
|
|
913
|
+
|
|
910
914
|
uid: Joi.string().allow(""),
|
|
911
915
|
|
|
912
|
-
|
|
916
|
+
type: Joi.string().allow(""),
|
|
913
917
|
|
|
914
|
-
|
|
918
|
+
priority: Joi.number(),
|
|
915
919
|
|
|
916
|
-
|
|
920
|
+
logo: this.Media(),
|
|
917
921
|
|
|
918
|
-
|
|
922
|
+
allow_sort: Joi.boolean(),
|
|
919
923
|
|
|
920
|
-
|
|
924
|
+
query: Joi.array().items(this.CollectionQuery()),
|
|
921
925
|
|
|
922
|
-
|
|
926
|
+
action: this.ProductListingAction(),
|
|
923
927
|
|
|
924
928
|
cron: Joi.any(),
|
|
925
929
|
|
|
926
|
-
|
|
930
|
+
tag: Joi.array().items(Joi.string().allow("")),
|
|
927
931
|
|
|
928
|
-
|
|
932
|
+
banners: this.ImageUrls(),
|
|
929
933
|
|
|
930
934
|
app_id: Joi.string().allow(""),
|
|
931
935
|
|
|
932
|
-
is_active: Joi.boolean(),
|
|
933
|
-
|
|
934
936
|
badge: Joi.any(),
|
|
935
937
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
tag: Joi.array().items(Joi.string().allow("")),
|
|
938
|
+
meta: Joi.any(),
|
|
939
939
|
|
|
940
|
-
|
|
940
|
+
is_active: Joi.boolean(),
|
|
941
941
|
|
|
942
|
-
|
|
942
|
+
_schedule: Joi.any(),
|
|
943
943
|
|
|
944
|
-
|
|
944
|
+
name: Joi.string().allow(""),
|
|
945
945
|
|
|
946
|
-
|
|
946
|
+
description: Joi.string().allow(""),
|
|
947
947
|
|
|
948
|
-
|
|
948
|
+
slug: Joi.string().allow(""),
|
|
949
949
|
|
|
950
|
-
|
|
950
|
+
visible_facets_keys: Joi.array().items(Joi.string().allow("")),
|
|
951
951
|
});
|
|
952
952
|
}
|
|
953
953
|
|
|
954
954
|
static GetCollectionListingResponse() {
|
|
955
955
|
return Joi.object({
|
|
956
|
+
page: this.Page().required(),
|
|
957
|
+
|
|
956
958
|
filters: this.CollectionListingFilter(),
|
|
957
959
|
|
|
958
960
|
items: Joi.array().items(this.GetCollectionDetailNest()),
|
|
959
|
-
|
|
960
|
-
page: this.Page().required(),
|
|
961
961
|
});
|
|
962
962
|
}
|
|
963
963
|
|
|
964
964
|
static CollectionDetailResponse() {
|
|
965
965
|
return Joi.object({
|
|
966
|
-
|
|
966
|
+
allow_facets: Joi.boolean(),
|
|
967
967
|
|
|
968
968
|
sort_on: Joi.string().allow(""),
|
|
969
969
|
|
|
970
|
-
|
|
970
|
+
type: Joi.string().allow(""),
|
|
971
971
|
|
|
972
|
-
|
|
972
|
+
priority: Joi.number(),
|
|
973
973
|
|
|
974
|
-
|
|
974
|
+
logo: this.Media(),
|
|
975
975
|
|
|
976
|
-
|
|
976
|
+
allow_sort: Joi.boolean(),
|
|
977
|
+
|
|
978
|
+
query: Joi.array().items(this.CollectionQuery()),
|
|
977
979
|
|
|
978
980
|
cron: Joi.any(),
|
|
979
981
|
|
|
980
|
-
|
|
982
|
+
tag: Joi.array().items(Joi.string().allow("")),
|
|
981
983
|
|
|
982
|
-
|
|
984
|
+
banners: this.ImageUrls(),
|
|
983
985
|
|
|
984
986
|
app_id: Joi.string().allow(""),
|
|
985
987
|
|
|
986
|
-
is_active: Joi.boolean(),
|
|
987
|
-
|
|
988
988
|
badge: Joi.any(),
|
|
989
989
|
|
|
990
|
-
|
|
990
|
+
meta: Joi.any(),
|
|
991
991
|
|
|
992
|
-
|
|
992
|
+
is_active: Joi.boolean(),
|
|
993
993
|
|
|
994
|
-
|
|
994
|
+
_schedule: Joi.any(),
|
|
995
995
|
|
|
996
|
-
|
|
996
|
+
name: Joi.string().allow(""),
|
|
997
997
|
|
|
998
|
-
|
|
998
|
+
description: Joi.string().allow(""),
|
|
999
999
|
|
|
1000
|
-
|
|
1000
|
+
slug: Joi.string().allow(""),
|
|
1001
1001
|
|
|
1002
|
-
|
|
1002
|
+
visible_facets_keys: Joi.array().items(Joi.string().allow("")),
|
|
1003
1003
|
});
|
|
1004
1004
|
}
|
|
1005
1005
|
|
|
1006
1006
|
static GetFollowListingResponse() {
|
|
1007
1007
|
return Joi.object({
|
|
1008
|
-
items: Joi.array().items(this.ProductListingDetail()).required(),
|
|
1009
|
-
|
|
1010
1008
|
page: this.Page().required(),
|
|
1009
|
+
|
|
1010
|
+
items: Joi.array().items(this.ProductListingDetail()).required(),
|
|
1011
1011
|
});
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
1014
1014
|
static FollowPostResponse() {
|
|
1015
1015
|
return Joi.object({
|
|
1016
|
-
message: Joi.string().allow("").required(),
|
|
1017
|
-
|
|
1018
1016
|
id: Joi.string().allow("").required(),
|
|
1017
|
+
|
|
1018
|
+
message: Joi.string().allow("").required(),
|
|
1019
1019
|
});
|
|
1020
1020
|
}
|
|
1021
1021
|
|
|
@@ -1051,47 +1051,47 @@ class Validator {
|
|
|
1051
1051
|
|
|
1052
1052
|
static Store() {
|
|
1053
1053
|
return Joi.object({
|
|
1054
|
-
|
|
1054
|
+
store_code: Joi.string().allow(""),
|
|
1055
1055
|
|
|
1056
1056
|
state: Joi.string().allow(""),
|
|
1057
1057
|
|
|
1058
|
-
|
|
1058
|
+
address: Joi.string().allow(""),
|
|
1059
|
+
|
|
1060
|
+
name: Joi.string().allow(""),
|
|
1059
1061
|
|
|
1060
1062
|
store_email: Joi.string().allow(""),
|
|
1061
1063
|
|
|
1062
1064
|
lat_long: this.LatLong(),
|
|
1063
1065
|
|
|
1064
|
-
|
|
1066
|
+
city: Joi.string().allow(""),
|
|
1065
1067
|
|
|
1066
1068
|
country: Joi.string().allow(""),
|
|
1067
1069
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
city: Joi.string().allow(""),
|
|
1070
|
+
pincode: Joi.number(),
|
|
1071
1071
|
|
|
1072
|
-
|
|
1072
|
+
uid: Joi.number(),
|
|
1073
1073
|
});
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
1076
|
static StoreListingResponse() {
|
|
1077
1077
|
return Joi.object({
|
|
1078
|
-
items: Joi.array().items(this.Store()).required(),
|
|
1079
|
-
|
|
1080
1078
|
page: this.Page().required(),
|
|
1079
|
+
|
|
1080
|
+
items: Joi.array().items(this.Store()).required(),
|
|
1081
1081
|
});
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
1084
1084
|
static StoreDepartments() {
|
|
1085
1085
|
return Joi.object({
|
|
1086
|
-
|
|
1086
|
+
name: Joi.string().allow(""),
|
|
1087
|
+
|
|
1088
|
+
logo: Joi.string().allow(""),
|
|
1087
1089
|
|
|
1088
1090
|
slug: Joi.string().allow(""),
|
|
1089
1091
|
|
|
1090
1092
|
priority_order: Joi.number(),
|
|
1091
1093
|
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
name: Joi.string().allow(""),
|
|
1094
|
+
uid: Joi.number(),
|
|
1095
1095
|
});
|
|
1096
1096
|
}
|
|
1097
1097
|
|
|
@@ -1107,88 +1107,88 @@ class Validator {
|
|
|
1107
1107
|
return Joi.object({
|
|
1108
1108
|
mobile_no: this.SellerPhoneNumber(),
|
|
1109
1109
|
|
|
1110
|
-
email: Joi.string().allow(""),
|
|
1111
|
-
|
|
1112
1110
|
name: Joi.string().allow(""),
|
|
1111
|
+
|
|
1112
|
+
email: Joi.string().allow(""),
|
|
1113
1113
|
});
|
|
1114
1114
|
}
|
|
1115
1115
|
|
|
1116
|
-
static
|
|
1116
|
+
static CompanyStore() {
|
|
1117
1117
|
return Joi.object({
|
|
1118
|
-
|
|
1118
|
+
business_type: Joi.string().allow(""),
|
|
1119
1119
|
|
|
1120
|
-
|
|
1120
|
+
company_type: Joi.string().allow(""),
|
|
1121
1121
|
|
|
1122
|
-
|
|
1122
|
+
name: Joi.string().allow(""),
|
|
1123
1123
|
|
|
1124
|
-
|
|
1124
|
+
uid: Joi.number(),
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1125
1127
|
|
|
1128
|
+
static StoreAddressSerializer() {
|
|
1129
|
+
return Joi.object({
|
|
1126
1130
|
longitude: Joi.number(),
|
|
1127
1131
|
|
|
1128
1132
|
address1: Joi.string().allow(""),
|
|
1129
1133
|
|
|
1130
|
-
|
|
1134
|
+
state: Joi.string().allow(""),
|
|
1135
|
+
|
|
1136
|
+
latitude: Joi.number(),
|
|
1131
1137
|
|
|
1132
1138
|
landmark: Joi.string().allow(""),
|
|
1133
1139
|
|
|
1134
1140
|
city: Joi.string().allow(""),
|
|
1135
|
-
});
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
static CompanyStore() {
|
|
1139
|
-
return Joi.object({
|
|
1140
|
-
uid: Joi.number(),
|
|
1141
1141
|
|
|
1142
|
-
|
|
1142
|
+
country: Joi.string().allow(""),
|
|
1143
1143
|
|
|
1144
|
-
|
|
1144
|
+
pincode: Joi.number(),
|
|
1145
1145
|
|
|
1146
|
-
|
|
1146
|
+
address2: Joi.string().allow(""),
|
|
1147
1147
|
});
|
|
1148
1148
|
}
|
|
1149
1149
|
|
|
1150
1150
|
static AppStore() {
|
|
1151
1151
|
return Joi.object({
|
|
1152
|
-
uid: Joi.number(),
|
|
1153
|
-
|
|
1154
1152
|
manager: this.StoreManagerSerializer(),
|
|
1155
1153
|
|
|
1154
|
+
company: this.CompanyStore(),
|
|
1155
|
+
|
|
1156
1156
|
address: this.StoreAddressSerializer(),
|
|
1157
1157
|
|
|
1158
|
-
|
|
1158
|
+
name: Joi.string().allow(""),
|
|
1159
1159
|
|
|
1160
|
-
|
|
1160
|
+
departments: Joi.array().items(this.StoreDepartments()),
|
|
1161
1161
|
|
|
1162
1162
|
contact_numbers: Joi.array().items(this.SellerPhoneNumber()),
|
|
1163
1163
|
|
|
1164
|
-
|
|
1164
|
+
uid: Joi.number(),
|
|
1165
1165
|
});
|
|
1166
1166
|
}
|
|
1167
1167
|
|
|
1168
1168
|
static ApplicationStoreListing() {
|
|
1169
1169
|
return Joi.object({
|
|
1170
|
+
page: this.Page(),
|
|
1171
|
+
|
|
1170
1172
|
filters: Joi.array().items(this.StoreDepartments()),
|
|
1171
1173
|
|
|
1172
1174
|
items: Joi.array().items(this.AppStore()),
|
|
1173
|
-
|
|
1174
|
-
page: this.Page(),
|
|
1175
1175
|
});
|
|
1176
1176
|
}
|
|
1177
1177
|
|
|
1178
1178
|
static Time() {
|
|
1179
1179
|
return Joi.object({
|
|
1180
|
-
hour: Joi.number(),
|
|
1181
|
-
|
|
1182
1180
|
minute: Joi.number(),
|
|
1181
|
+
|
|
1182
|
+
hour: Joi.number(),
|
|
1183
1183
|
});
|
|
1184
1184
|
}
|
|
1185
1185
|
|
|
1186
1186
|
static StoreTiming() {
|
|
1187
1187
|
return Joi.object({
|
|
1188
|
-
closing: this.Time(),
|
|
1189
|
-
|
|
1190
1188
|
open: Joi.boolean(),
|
|
1191
1189
|
|
|
1190
|
+
closing: this.Time(),
|
|
1191
|
+
|
|
1192
1192
|
weekday: Joi.string().allow(""),
|
|
1193
1193
|
|
|
1194
1194
|
opening: this.Time(),
|
|
@@ -1197,167 +1197,167 @@ class Validator {
|
|
|
1197
1197
|
|
|
1198
1198
|
static StoreDetails() {
|
|
1199
1199
|
return Joi.object({
|
|
1200
|
-
uid: Joi.number(),
|
|
1201
|
-
|
|
1202
1200
|
manager: this.StoreManagerSerializer(),
|
|
1203
1201
|
|
|
1204
|
-
|
|
1202
|
+
company: this.CompanyStore(),
|
|
1205
1203
|
|
|
1206
|
-
|
|
1204
|
+
address: this.StoreAddressSerializer(),
|
|
1207
1205
|
|
|
1208
|
-
|
|
1206
|
+
name: Joi.string().allow(""),
|
|
1209
1207
|
|
|
1210
1208
|
timing: Joi.array().items(this.StoreTiming()),
|
|
1211
1209
|
|
|
1212
|
-
contact_numbers: Joi.array().items(this.SellerPhoneNumber()),
|
|
1213
|
-
|
|
1214
1210
|
_custom_json: Joi.any(),
|
|
1215
1211
|
|
|
1216
|
-
|
|
1212
|
+
departments: Joi.array().items(this.StoreDepartments()),
|
|
1213
|
+
|
|
1214
|
+
contact_numbers: Joi.array().items(this.SellerPhoneNumber()),
|
|
1215
|
+
|
|
1216
|
+
uid: Joi.number(),
|
|
1217
1217
|
});
|
|
1218
1218
|
}
|
|
1219
1219
|
|
|
1220
1220
|
static UserDetail() {
|
|
1221
1221
|
return Joi.object({
|
|
1222
|
-
username: Joi.string().allow("").required(),
|
|
1223
|
-
|
|
1224
|
-
super_user: Joi.boolean(),
|
|
1225
|
-
|
|
1226
1222
|
contact: Joi.string().allow(""),
|
|
1227
1223
|
|
|
1224
|
+
username: Joi.string().allow("").required(),
|
|
1225
|
+
|
|
1228
1226
|
user_id: Joi.string().allow("").required(),
|
|
1227
|
+
|
|
1228
|
+
super_user: Joi.boolean(),
|
|
1229
1229
|
});
|
|
1230
1230
|
}
|
|
1231
1231
|
|
|
1232
|
-
static
|
|
1232
|
+
static Size() {
|
|
1233
1233
|
return Joi.object({
|
|
1234
|
-
|
|
1234
|
+
display: Joi.any(),
|
|
1235
1235
|
|
|
1236
|
-
|
|
1236
|
+
is_available: Joi.boolean(),
|
|
1237
1237
|
|
|
1238
|
-
|
|
1238
|
+
quantity: Joi.number(),
|
|
1239
|
+
|
|
1240
|
+
value: Joi.any(),
|
|
1241
|
+
});
|
|
1242
|
+
}
|
|
1239
1243
|
|
|
1244
|
+
static ProductGroupPrice() {
|
|
1245
|
+
return Joi.object({
|
|
1240
1246
|
max_marked: Joi.number(),
|
|
1241
1247
|
|
|
1248
|
+
max_effective: Joi.number(),
|
|
1249
|
+
|
|
1250
|
+
min_effective: Joi.number(),
|
|
1251
|
+
|
|
1252
|
+
min_marked: Joi.number(),
|
|
1253
|
+
|
|
1242
1254
|
currency: Joi.any(),
|
|
1243
1255
|
});
|
|
1244
1256
|
}
|
|
1245
1257
|
|
|
1246
1258
|
static ProductDetails() {
|
|
1247
1259
|
return Joi.object({
|
|
1248
|
-
|
|
1260
|
+
attributes: Joi.any(),
|
|
1261
|
+
|
|
1262
|
+
template_tag: Joi.any(),
|
|
1249
1263
|
|
|
1250
1264
|
images: Joi.array().items(Joi.any()),
|
|
1251
1265
|
|
|
1252
|
-
|
|
1266
|
+
is_set: Joi.boolean(),
|
|
1253
1267
|
|
|
1254
1268
|
short_description: Joi.any(),
|
|
1255
1269
|
|
|
1256
|
-
out_of_stock: Joi.boolean(),
|
|
1257
|
-
|
|
1258
|
-
template_tag: Joi.any(),
|
|
1259
|
-
|
|
1260
|
-
has_variant: Joi.boolean(),
|
|
1261
|
-
|
|
1262
1270
|
grouped_attributes: Joi.any(),
|
|
1263
1271
|
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
slug: Joi.any(),
|
|
1272
|
+
image_nature: Joi.any(),
|
|
1267
1273
|
|
|
1268
1274
|
rating: Joi.number(),
|
|
1269
1275
|
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
brand_uid: Joi.number(),
|
|
1276
|
+
has_variant: Joi.boolean(),
|
|
1273
1277
|
|
|
1274
|
-
|
|
1278
|
+
media: Joi.array().items(Joi.any()),
|
|
1275
1279
|
|
|
1276
|
-
|
|
1280
|
+
brand_uid: Joi.number(),
|
|
1277
1281
|
|
|
1278
|
-
|
|
1282
|
+
hsn_code: Joi.number(),
|
|
1279
1283
|
|
|
1280
|
-
|
|
1284
|
+
highlights: Joi.array().items(Joi.any()),
|
|
1281
1285
|
|
|
1282
|
-
|
|
1286
|
+
country_of_origin: Joi.any(),
|
|
1283
1287
|
|
|
1284
1288
|
rating_count: Joi.number(),
|
|
1285
1289
|
|
|
1286
|
-
highlights: Joi.array().items(Joi.any()),
|
|
1287
|
-
|
|
1288
1290
|
name: Joi.any(),
|
|
1289
|
-
});
|
|
1290
|
-
}
|
|
1291
1291
|
|
|
1292
|
-
|
|
1293
|
-
return Joi.object({
|
|
1294
|
-
is_available: Joi.boolean(),
|
|
1292
|
+
identifier: Joi.any(),
|
|
1295
1293
|
|
|
1296
|
-
|
|
1294
|
+
description: Joi.any(),
|
|
1297
1295
|
|
|
1298
|
-
|
|
1296
|
+
slug: Joi.any(),
|
|
1299
1297
|
|
|
1300
|
-
|
|
1298
|
+
out_of_stock: Joi.boolean(),
|
|
1299
|
+
|
|
1300
|
+
item_code: Joi.any(),
|
|
1301
1301
|
});
|
|
1302
1302
|
}
|
|
1303
1303
|
|
|
1304
1304
|
static ProductInGroup() {
|
|
1305
1305
|
return Joi.object({
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
product_details: this.ProductDetails(),
|
|
1309
|
-
|
|
1310
|
-
auto_select: Joi.boolean(),
|
|
1306
|
+
sizes: Joi.array().items(this.Size()),
|
|
1311
1307
|
|
|
1312
1308
|
product_uid: Joi.number().required(),
|
|
1313
1309
|
|
|
1314
|
-
sizes: Joi.array().items(this.Size()),
|
|
1315
|
-
|
|
1316
1310
|
auto_add_to_cart: Joi.boolean(),
|
|
1317
1311
|
|
|
1318
|
-
allow_remove: Joi.boolean(),
|
|
1319
|
-
|
|
1320
1312
|
max_quantity: Joi.number().required(),
|
|
1321
1313
|
|
|
1322
1314
|
min_quantity: Joi.number(),
|
|
1315
|
+
|
|
1316
|
+
allow_remove: Joi.boolean(),
|
|
1317
|
+
|
|
1318
|
+
price: this.ProductGroupPrice(),
|
|
1319
|
+
|
|
1320
|
+
auto_select: Joi.boolean(),
|
|
1321
|
+
|
|
1322
|
+
product_details: this.ProductDetails(),
|
|
1323
1323
|
});
|
|
1324
1324
|
}
|
|
1325
1325
|
|
|
1326
1326
|
static ProductGroupingModel() {
|
|
1327
1327
|
return Joi.object({
|
|
1328
|
-
|
|
1328
|
+
created_by: this.UserDetail(),
|
|
1329
1329
|
|
|
1330
|
-
|
|
1330
|
+
choice: Joi.any(),
|
|
1331
1331
|
|
|
1332
|
-
|
|
1332
|
+
is_active: Joi.boolean(),
|
|
1333
1333
|
|
|
1334
1334
|
same_store_assignment: Joi.boolean(),
|
|
1335
1335
|
|
|
1336
|
-
_id: Joi.any(),
|
|
1337
|
-
|
|
1338
1336
|
verified_on: Joi.string().allow(""),
|
|
1339
1337
|
|
|
1340
|
-
|
|
1338
|
+
verified_by: this.UserDetail(),
|
|
1341
1339
|
|
|
1342
|
-
|
|
1340
|
+
modified_by: this.UserDetail(),
|
|
1343
1341
|
|
|
1344
|
-
|
|
1342
|
+
name: Joi.any().required(),
|
|
1345
1343
|
|
|
1346
|
-
|
|
1344
|
+
logo: Joi.string().allow("").allow(null),
|
|
1347
1345
|
|
|
1348
|
-
|
|
1346
|
+
company_id: Joi.number(),
|
|
1349
1347
|
|
|
1350
|
-
|
|
1348
|
+
created_on: Joi.string().allow("").required(),
|
|
1351
1349
|
|
|
1352
|
-
|
|
1350
|
+
_id: Joi.any(),
|
|
1353
1351
|
|
|
1354
|
-
|
|
1352
|
+
slug: Joi.any(),
|
|
1353
|
+
|
|
1354
|
+
page_visibility: Joi.array().items(Joi.any()),
|
|
1355
1355
|
|
|
1356
1356
|
modified_on: Joi.string().allow("").required(),
|
|
1357
1357
|
|
|
1358
|
-
|
|
1358
|
+
meta: Joi.any(),
|
|
1359
1359
|
|
|
1360
|
-
|
|
1360
|
+
products: Joi.array().items(this.ProductInGroup()).required(),
|
|
1361
1361
|
});
|
|
1362
1362
|
}
|
|
1363
1363
|
|
|
@@ -1367,33 +1367,23 @@ class Validator {
|
|
|
1367
1367
|
});
|
|
1368
1368
|
}
|
|
1369
1369
|
|
|
1370
|
-
static
|
|
1370
|
+
static ProductStockPriceV2() {
|
|
1371
1371
|
return Joi.object({
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
tat: Joi.number(),
|
|
1375
|
-
|
|
1376
|
-
distance: Joi.number(),
|
|
1377
|
-
|
|
1378
|
-
pincode: Joi.number(),
|
|
1379
|
-
});
|
|
1380
|
-
}
|
|
1372
|
+
marked: Joi.number(),
|
|
1381
1373
|
|
|
1382
|
-
|
|
1383
|
-
return Joi.object({
|
|
1384
|
-
level: Joi.string().allow(""),
|
|
1374
|
+
effective: Joi.number(),
|
|
1385
1375
|
|
|
1386
|
-
|
|
1376
|
+
currency: Joi.string().allow(""),
|
|
1387
1377
|
});
|
|
1388
1378
|
}
|
|
1389
1379
|
|
|
1390
1380
|
static DetailsSchemaV2() {
|
|
1391
1381
|
return Joi.object({
|
|
1382
|
+
type: Joi.string().allow(""),
|
|
1383
|
+
|
|
1392
1384
|
key: Joi.string().allow(""),
|
|
1393
1385
|
|
|
1394
1386
|
value: Joi.string().allow(""),
|
|
1395
|
-
|
|
1396
|
-
type: Joi.string().allow(""),
|
|
1397
1387
|
});
|
|
1398
1388
|
}
|
|
1399
1389
|
|
|
@@ -1405,563 +1395,573 @@ class Validator {
|
|
|
1405
1395
|
});
|
|
1406
1396
|
}
|
|
1407
1397
|
|
|
1408
|
-
static
|
|
1398
|
+
static MarketPlaceSttributesSchemaV2() {
|
|
1409
1399
|
return Joi.object({
|
|
1410
|
-
|
|
1400
|
+
details: Joi.array().items(this.DetailsSchemaV2()),
|
|
1411
1401
|
|
|
1412
|
-
|
|
1402
|
+
title: Joi.string().allow(""),
|
|
1413
1403
|
});
|
|
1414
1404
|
}
|
|
1415
1405
|
|
|
1416
|
-
static
|
|
1406
|
+
static ProductStockUnitPriceV2() {
|
|
1417
1407
|
return Joi.object({
|
|
1418
|
-
|
|
1419
|
-
});
|
|
1420
|
-
}
|
|
1408
|
+
price: Joi.number(),
|
|
1421
1409
|
|
|
1422
|
-
|
|
1423
|
-
return Joi.object({
|
|
1424
|
-
size_distribution: this.ProductSetDistributionV2(),
|
|
1410
|
+
unit: Joi.string().allow(""),
|
|
1425
1411
|
|
|
1426
|
-
|
|
1412
|
+
currency_code: Joi.string().allow(""),
|
|
1413
|
+
|
|
1414
|
+
currency_symbol: Joi.string().allow(""),
|
|
1427
1415
|
});
|
|
1428
1416
|
}
|
|
1429
1417
|
|
|
1430
1418
|
static ReturnConfigSchemaV2() {
|
|
1431
1419
|
return Joi.object({
|
|
1432
|
-
|
|
1420
|
+
unit: Joi.string().allow(""),
|
|
1433
1421
|
|
|
1434
1422
|
returnable: Joi.boolean(),
|
|
1435
1423
|
|
|
1436
|
-
|
|
1424
|
+
time: Joi.number(),
|
|
1437
1425
|
});
|
|
1438
1426
|
}
|
|
1439
1427
|
|
|
1440
|
-
static
|
|
1428
|
+
static StoreV2() {
|
|
1441
1429
|
return Joi.object({
|
|
1442
|
-
|
|
1430
|
+
count: Joi.number(),
|
|
1443
1431
|
|
|
1444
|
-
|
|
1432
|
+
name: Joi.string().allow(""),
|
|
1433
|
+
|
|
1434
|
+
uid: Joi.number(),
|
|
1445
1435
|
});
|
|
1446
1436
|
}
|
|
1447
1437
|
|
|
1448
|
-
static
|
|
1438
|
+
static SellerV2() {
|
|
1449
1439
|
return Joi.object({
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
currency_symbol: Joi.string().allow(""),
|
|
1440
|
+
count: Joi.number(),
|
|
1453
1441
|
|
|
1454
|
-
|
|
1442
|
+
name: Joi.string().allow(""),
|
|
1455
1443
|
|
|
1456
|
-
|
|
1444
|
+
uid: Joi.number(),
|
|
1457
1445
|
});
|
|
1458
1446
|
}
|
|
1459
1447
|
|
|
1460
|
-
static
|
|
1448
|
+
static ProductSetDistributionSizeV2() {
|
|
1461
1449
|
return Joi.object({
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
effective: Joi.number(),
|
|
1450
|
+
size: Joi.string().allow(""),
|
|
1465
1451
|
|
|
1466
|
-
|
|
1452
|
+
pieces: Joi.number(),
|
|
1467
1453
|
});
|
|
1468
1454
|
}
|
|
1469
1455
|
|
|
1470
|
-
static
|
|
1456
|
+
static ProductSetDistributionV2() {
|
|
1471
1457
|
return Joi.object({
|
|
1472
|
-
|
|
1458
|
+
sizes: Joi.array().items(this.ProductSetDistributionSizeV2()),
|
|
1459
|
+
});
|
|
1460
|
+
}
|
|
1473
1461
|
|
|
1474
|
-
|
|
1462
|
+
static ProductSetV2() {
|
|
1463
|
+
return Joi.object({
|
|
1464
|
+
size_distribution: this.ProductSetDistributionV2(),
|
|
1475
1465
|
|
|
1476
|
-
|
|
1466
|
+
quantity: Joi.number(),
|
|
1477
1467
|
});
|
|
1478
1468
|
}
|
|
1479
1469
|
|
|
1480
|
-
static
|
|
1470
|
+
static ArticleAssignmentV2() {
|
|
1481
1471
|
return Joi.object({
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
count: Joi.number(),
|
|
1472
|
+
strategy: Joi.string().allow(""),
|
|
1485
1473
|
|
|
1486
|
-
|
|
1474
|
+
level: Joi.string().allow(""),
|
|
1487
1475
|
});
|
|
1488
1476
|
}
|
|
1489
1477
|
|
|
1490
|
-
static
|
|
1478
|
+
static StrategyWiseListingSchemaV2() {
|
|
1491
1479
|
return Joi.object({
|
|
1492
|
-
|
|
1480
|
+
pincode: Joi.number(),
|
|
1493
1481
|
|
|
1494
|
-
|
|
1495
|
-
this.StrategyWiseListingSchemaV2()
|
|
1496
|
-
),
|
|
1482
|
+
tat: Joi.number(),
|
|
1497
1483
|
|
|
1498
|
-
|
|
1484
|
+
quantity: Joi.number(),
|
|
1499
1485
|
|
|
1500
|
-
|
|
1486
|
+
distance: Joi.number(),
|
|
1487
|
+
});
|
|
1488
|
+
}
|
|
1501
1489
|
|
|
1502
|
-
|
|
1490
|
+
static ProductSizePriceResponseV2() {
|
|
1491
|
+
return Joi.object({
|
|
1492
|
+
discount: Joi.string().allow(""),
|
|
1503
1493
|
|
|
1504
|
-
|
|
1494
|
+
is_gift: Joi.boolean(),
|
|
1505
1495
|
|
|
1506
|
-
|
|
1496
|
+
price: this.ProductStockPriceV2(),
|
|
1507
1497
|
|
|
1508
1498
|
is_cod: Joi.boolean(),
|
|
1509
1499
|
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
return_config: this.ReturnConfigSchemaV2(),
|
|
1500
|
+
grouped_attributes: Joi.array().items(this.SellerGroupAttributes()),
|
|
1513
1501
|
|
|
1514
1502
|
marketplace_attributes: Joi.array().items(
|
|
1515
1503
|
this.MarketPlaceSttributesSchemaV2()
|
|
1516
1504
|
),
|
|
1517
1505
|
|
|
1518
|
-
|
|
1506
|
+
long_lat: Joi.array().items(Joi.number()),
|
|
1519
1507
|
|
|
1520
1508
|
price_per_unit: this.ProductStockUnitPriceV2(),
|
|
1521
1509
|
|
|
1522
|
-
|
|
1510
|
+
return_config: this.ReturnConfigSchemaV2(),
|
|
1523
1511
|
|
|
1524
|
-
|
|
1512
|
+
store: this.StoreV2(),
|
|
1525
1513
|
|
|
1526
|
-
|
|
1514
|
+
article_id: Joi.string().allow(""),
|
|
1527
1515
|
|
|
1528
|
-
|
|
1516
|
+
seller: this.SellerV2(),
|
|
1529
1517
|
|
|
1530
1518
|
price_per_piece: this.ProductStockPriceV2(),
|
|
1531
1519
|
|
|
1532
|
-
|
|
1520
|
+
seller_count: Joi.number(),
|
|
1533
1521
|
|
|
1534
|
-
|
|
1522
|
+
set: this.ProductSetV2(),
|
|
1535
1523
|
|
|
1536
|
-
|
|
1537
|
-
});
|
|
1538
|
-
}
|
|
1524
|
+
article_assignment: this.ArticleAssignmentV2(),
|
|
1539
1525
|
|
|
1540
|
-
|
|
1541
|
-
return Joi.object({
|
|
1542
|
-
value: Joi.string().allow(""),
|
|
1526
|
+
special_badge: Joi.string().allow(""),
|
|
1543
1527
|
|
|
1544
|
-
|
|
1528
|
+
quantity: Joi.number(),
|
|
1545
1529
|
|
|
1546
|
-
|
|
1547
|
-
});
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
|
-
static ProductSizeSellersResponseV2() {
|
|
1551
|
-
return Joi.object({
|
|
1552
|
-
items: Joi.array().items(this.ProductSizePriceResponseV2()),
|
|
1530
|
+
pincode: Joi.number(),
|
|
1553
1531
|
|
|
1554
|
-
|
|
1532
|
+
item_type: Joi.string().allow(""),
|
|
1555
1533
|
|
|
1556
|
-
|
|
1534
|
+
strategy_wise_listing: Joi.array().items(
|
|
1535
|
+
this.StrategyWiseListingSchemaV2()
|
|
1536
|
+
),
|
|
1557
1537
|
});
|
|
1558
1538
|
}
|
|
1559
1539
|
|
|
1560
|
-
static
|
|
1540
|
+
static ProductSizeSellerFilterSchemaV2() {
|
|
1561
1541
|
return Joi.object({
|
|
1562
|
-
|
|
1542
|
+
is_selected: Joi.boolean(),
|
|
1563
1543
|
|
|
1564
|
-
|
|
1544
|
+
name: Joi.string().allow(""),
|
|
1565
1545
|
|
|
1566
|
-
|
|
1546
|
+
value: Joi.string().allow(""),
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1567
1549
|
|
|
1568
|
-
|
|
1550
|
+
static ProductSizeSellersResponseV2() {
|
|
1551
|
+
return Joi.object({
|
|
1552
|
+
page: this.Page().required(),
|
|
1569
1553
|
|
|
1570
|
-
|
|
1554
|
+
items: Joi.array().items(this.ProductSizePriceResponseV2()),
|
|
1571
1555
|
|
|
1572
|
-
|
|
1556
|
+
sort_on: Joi.array().items(this.ProductSizeSellerFilterSchemaV2()),
|
|
1573
1557
|
});
|
|
1574
1558
|
}
|
|
1575
1559
|
|
|
1576
|
-
static
|
|
1560
|
+
static CartCurrency() {
|
|
1577
1561
|
return Joi.object({
|
|
1578
|
-
|
|
1562
|
+
symbol: Joi.string().allow(""),
|
|
1579
1563
|
|
|
1580
1564
|
code: Joi.string().allow(""),
|
|
1565
|
+
});
|
|
1566
|
+
}
|
|
1581
1567
|
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1568
|
+
static PaymentSelectionLock() {
|
|
1569
|
+
return Joi.object({
|
|
1570
|
+
payment_identifier: Joi.string().allow(""),
|
|
1585
1571
|
|
|
1586
|
-
|
|
1572
|
+
enabled: Joi.boolean(),
|
|
1587
1573
|
|
|
1588
|
-
|
|
1574
|
+
default_options: Joi.string().allow(""),
|
|
1589
1575
|
});
|
|
1590
1576
|
}
|
|
1591
1577
|
|
|
1592
|
-
static
|
|
1578
|
+
static PromiseTimestamp() {
|
|
1593
1579
|
return Joi.object({
|
|
1594
|
-
|
|
1580
|
+
min: Joi.number(),
|
|
1595
1581
|
|
|
1596
|
-
|
|
1582
|
+
max: Joi.number(),
|
|
1583
|
+
});
|
|
1584
|
+
}
|
|
1597
1585
|
|
|
1598
|
-
|
|
1586
|
+
static PromiseFormatted() {
|
|
1587
|
+
return Joi.object({
|
|
1588
|
+
min: Joi.string().allow(""),
|
|
1599
1589
|
|
|
1600
|
-
|
|
1590
|
+
max: Joi.string().allow(""),
|
|
1591
|
+
});
|
|
1592
|
+
}
|
|
1601
1593
|
|
|
1602
|
-
|
|
1594
|
+
static ShipmentPromise() {
|
|
1595
|
+
return Joi.object({
|
|
1596
|
+
timestamp: this.PromiseTimestamp(),
|
|
1603
1597
|
|
|
1604
|
-
|
|
1598
|
+
formatted: this.PromiseFormatted(),
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1605
1601
|
|
|
1606
|
-
|
|
1602
|
+
static CouponBreakup() {
|
|
1603
|
+
return Joi.object({
|
|
1604
|
+
message: Joi.string().allow(""),
|
|
1607
1605
|
|
|
1608
|
-
|
|
1606
|
+
value: Joi.number(),
|
|
1609
1607
|
|
|
1610
|
-
|
|
1608
|
+
code: Joi.string().allow(""),
|
|
1611
1609
|
|
|
1612
|
-
|
|
1610
|
+
is_applied: Joi.boolean(),
|
|
1613
1611
|
|
|
1614
|
-
|
|
1612
|
+
uid: Joi.string().allow(""),
|
|
1615
1613
|
|
|
1616
|
-
|
|
1614
|
+
type: Joi.string().allow(""),
|
|
1617
1615
|
});
|
|
1618
1616
|
}
|
|
1619
1617
|
|
|
1620
1618
|
static LoyaltyPoints() {
|
|
1621
1619
|
return Joi.object({
|
|
1622
|
-
total: Joi.number(),
|
|
1623
|
-
|
|
1624
1620
|
applicable: Joi.number(),
|
|
1625
1621
|
|
|
1626
|
-
is_applied: Joi.boolean(),
|
|
1627
|
-
|
|
1628
1622
|
description: Joi.string().allow(""),
|
|
1623
|
+
|
|
1624
|
+
total: Joi.number(),
|
|
1625
|
+
|
|
1626
|
+
is_applied: Joi.boolean(),
|
|
1629
1627
|
});
|
|
1630
1628
|
}
|
|
1631
1629
|
|
|
1632
|
-
static
|
|
1630
|
+
static DisplayBreakup() {
|
|
1633
1631
|
return Joi.object({
|
|
1634
|
-
|
|
1632
|
+
message: Joi.array().items(Joi.string().allow("")),
|
|
1635
1633
|
|
|
1636
|
-
|
|
1634
|
+
value: Joi.number(),
|
|
1637
1635
|
|
|
1638
|
-
|
|
1636
|
+
key: Joi.string().allow(""),
|
|
1639
1637
|
|
|
1640
|
-
|
|
1641
|
-
});
|
|
1642
|
-
}
|
|
1638
|
+
currency_symbol: Joi.string().allow(""),
|
|
1643
1639
|
|
|
1644
|
-
|
|
1645
|
-
return Joi.object({
|
|
1646
|
-
min: Joi.string().allow(""),
|
|
1640
|
+
display: Joi.string().allow(""),
|
|
1647
1641
|
|
|
1648
|
-
|
|
1642
|
+
currency_code: Joi.string().allow(""),
|
|
1649
1643
|
});
|
|
1650
1644
|
}
|
|
1651
1645
|
|
|
1652
|
-
static
|
|
1646
|
+
static RawBreakup() {
|
|
1653
1647
|
return Joi.object({
|
|
1654
|
-
|
|
1648
|
+
coupon: Joi.number(),
|
|
1655
1649
|
|
|
1656
|
-
|
|
1657
|
-
});
|
|
1658
|
-
}
|
|
1650
|
+
total: Joi.number(),
|
|
1659
1651
|
|
|
1660
|
-
|
|
1661
|
-
return Joi.object({
|
|
1662
|
-
formatted: this.PromiseFormatted(),
|
|
1652
|
+
subtotal: Joi.number(),
|
|
1663
1653
|
|
|
1664
|
-
|
|
1665
|
-
});
|
|
1666
|
-
}
|
|
1654
|
+
vog: Joi.number(),
|
|
1667
1655
|
|
|
1668
|
-
|
|
1669
|
-
return Joi.object({
|
|
1670
|
-
symbol: Joi.string().allow(""),
|
|
1656
|
+
delivery_charge: Joi.number(),
|
|
1671
1657
|
|
|
1672
|
-
|
|
1658
|
+
you_saved: Joi.number(),
|
|
1659
|
+
|
|
1660
|
+
mrp_total: Joi.number(),
|
|
1661
|
+
|
|
1662
|
+
cod_charge: Joi.number(),
|
|
1663
|
+
|
|
1664
|
+
fynd_cash: Joi.number(),
|
|
1665
|
+
|
|
1666
|
+
gst_charges: Joi.number(),
|
|
1667
|
+
|
|
1668
|
+
convenience_fee: Joi.number(),
|
|
1669
|
+
|
|
1670
|
+
discount: Joi.number(),
|
|
1673
1671
|
});
|
|
1674
1672
|
}
|
|
1675
1673
|
|
|
1676
|
-
static
|
|
1674
|
+
static CartBreakup() {
|
|
1677
1675
|
return Joi.object({
|
|
1678
|
-
|
|
1676
|
+
coupon: this.CouponBreakup(),
|
|
1679
1677
|
|
|
1680
|
-
|
|
1678
|
+
loyalty_points: this.LoyaltyPoints(),
|
|
1681
1679
|
|
|
1682
|
-
|
|
1680
|
+
display: Joi.array().items(this.DisplayBreakup()),
|
|
1681
|
+
|
|
1682
|
+
raw: this.RawBreakup(),
|
|
1683
1683
|
});
|
|
1684
1684
|
}
|
|
1685
1685
|
|
|
1686
1686
|
static BaseInfo() {
|
|
1687
1687
|
return Joi.object({
|
|
1688
|
-
uid: Joi.number(),
|
|
1689
|
-
|
|
1690
1688
|
name: Joi.string().allow(""),
|
|
1689
|
+
|
|
1690
|
+
uid: Joi.number(),
|
|
1691
1691
|
});
|
|
1692
1692
|
}
|
|
1693
1693
|
|
|
1694
1694
|
static BasePrice() {
|
|
1695
1695
|
return Joi.object({
|
|
1696
|
+
currency_symbol: Joi.string().allow(""),
|
|
1697
|
+
|
|
1696
1698
|
marked: Joi.number(),
|
|
1697
1699
|
|
|
1698
1700
|
currency_code: Joi.string().allow(""),
|
|
1699
1701
|
|
|
1700
1702
|
effective: Joi.number(),
|
|
1701
|
-
|
|
1702
|
-
currency_symbol: Joi.string().allow(""),
|
|
1703
1703
|
});
|
|
1704
1704
|
}
|
|
1705
1705
|
|
|
1706
1706
|
static ArticlePriceInfo() {
|
|
1707
1707
|
return Joi.object({
|
|
1708
|
-
converted: this.BasePrice(),
|
|
1709
|
-
|
|
1710
1708
|
base: this.BasePrice(),
|
|
1709
|
+
|
|
1710
|
+
converted: this.BasePrice(),
|
|
1711
1711
|
});
|
|
1712
1712
|
}
|
|
1713
1713
|
|
|
1714
1714
|
static ProductArticle() {
|
|
1715
1715
|
return Joi.object({
|
|
1716
|
-
|
|
1716
|
+
parent_item_identifiers: Joi.any(),
|
|
1717
|
+
|
|
1718
|
+
size: Joi.string().allow(""),
|
|
1717
1719
|
|
|
1718
1720
|
extra_meta: Joi.any(),
|
|
1719
1721
|
|
|
1720
|
-
|
|
1722
|
+
store: this.BaseInfo(),
|
|
1723
|
+
|
|
1724
|
+
quantity: Joi.number(),
|
|
1721
1725
|
|
|
1722
1726
|
seller: this.BaseInfo(),
|
|
1723
1727
|
|
|
1724
|
-
|
|
1728
|
+
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
1725
1729
|
|
|
1726
|
-
|
|
1730
|
+
uid: Joi.string().allow(""),
|
|
1727
1731
|
|
|
1728
1732
|
price: this.ArticlePriceInfo(),
|
|
1729
1733
|
|
|
1730
|
-
|
|
1734
|
+
type: Joi.string().allow(""),
|
|
1735
|
+
});
|
|
1736
|
+
}
|
|
1731
1737
|
|
|
1732
|
-
|
|
1738
|
+
static CategoryInfo() {
|
|
1739
|
+
return Joi.object({
|
|
1740
|
+
name: Joi.string().allow(""),
|
|
1733
1741
|
|
|
1734
|
-
|
|
1742
|
+
uid: Joi.number(),
|
|
1735
1743
|
});
|
|
1736
1744
|
}
|
|
1737
1745
|
|
|
1738
|
-
static
|
|
1746
|
+
static ProductImage() {
|
|
1739
1747
|
return Joi.object({
|
|
1740
|
-
|
|
1748
|
+
aspect_ratio: Joi.string().allow(""),
|
|
1749
|
+
|
|
1750
|
+
secure_url: Joi.string().allow(""),
|
|
1751
|
+
|
|
1752
|
+
url: Joi.string().allow(""),
|
|
1741
1753
|
});
|
|
1742
1754
|
}
|
|
1743
1755
|
|
|
1744
|
-
static
|
|
1756
|
+
static ActionQuery() {
|
|
1745
1757
|
return Joi.object({
|
|
1746
|
-
|
|
1758
|
+
product_slug: Joi.array().items(Joi.string().allow("")),
|
|
1747
1759
|
});
|
|
1748
1760
|
}
|
|
1749
1761
|
|
|
1750
|
-
static
|
|
1762
|
+
static ProductAction() {
|
|
1751
1763
|
return Joi.object({
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
add_on: Joi.number(),
|
|
1755
|
-
|
|
1756
|
-
marked: Joi.number(),
|
|
1757
|
-
|
|
1758
|
-
currency_code: Joi.string().allow(""),
|
|
1764
|
+
query: this.ActionQuery(),
|
|
1759
1765
|
|
|
1760
|
-
|
|
1766
|
+
url: Joi.string().allow(""),
|
|
1761
1767
|
|
|
1762
|
-
|
|
1768
|
+
type: Joi.string().allow(""),
|
|
1763
1769
|
});
|
|
1764
1770
|
}
|
|
1765
1771
|
|
|
1766
|
-
static
|
|
1772
|
+
static CartProduct() {
|
|
1767
1773
|
return Joi.object({
|
|
1768
|
-
|
|
1774
|
+
categories: Joi.array().items(this.CategoryInfo()),
|
|
1769
1775
|
|
|
1770
|
-
|
|
1776
|
+
slug: Joi.string().allow(""),
|
|
1777
|
+
|
|
1778
|
+
images: Joi.array().items(this.ProductImage()),
|
|
1779
|
+
|
|
1780
|
+
action: this.ProductAction(),
|
|
1781
|
+
|
|
1782
|
+
brand: this.BaseInfo(),
|
|
1783
|
+
|
|
1784
|
+
name: Joi.string().allow(""),
|
|
1785
|
+
|
|
1786
|
+
uid: Joi.number(),
|
|
1787
|
+
|
|
1788
|
+
type: Joi.string().allow(""),
|
|
1771
1789
|
});
|
|
1772
1790
|
}
|
|
1773
1791
|
|
|
1774
|
-
static
|
|
1792
|
+
static ProductPrice() {
|
|
1775
1793
|
return Joi.object({
|
|
1776
|
-
|
|
1794
|
+
selling: Joi.number(),
|
|
1777
1795
|
|
|
1778
|
-
|
|
1796
|
+
currency_symbol: Joi.string().allow(""),
|
|
1779
1797
|
|
|
1780
|
-
|
|
1798
|
+
marked: Joi.number(),
|
|
1781
1799
|
|
|
1782
|
-
|
|
1800
|
+
add_on: Joi.number(),
|
|
1783
1801
|
|
|
1784
|
-
|
|
1802
|
+
effective: Joi.number(),
|
|
1803
|
+
|
|
1804
|
+
currency_code: Joi.string().allow(""),
|
|
1785
1805
|
});
|
|
1786
1806
|
}
|
|
1787
1807
|
|
|
1788
|
-
static
|
|
1808
|
+
static ProductPriceInfo() {
|
|
1789
1809
|
return Joi.object({
|
|
1790
|
-
|
|
1810
|
+
base: this.ProductPrice(),
|
|
1811
|
+
|
|
1812
|
+
converted: this.ProductPrice(),
|
|
1813
|
+
});
|
|
1814
|
+
}
|
|
1791
1815
|
|
|
1816
|
+
static Ownership() {
|
|
1817
|
+
return Joi.object({
|
|
1792
1818
|
payable_category: Joi.string().allow(""),
|
|
1819
|
+
|
|
1820
|
+
payable_by: Joi.string().allow(""),
|
|
1793
1821
|
});
|
|
1794
1822
|
}
|
|
1795
1823
|
|
|
1796
1824
|
static AppliedPromotion() {
|
|
1797
1825
|
return Joi.object({
|
|
1798
|
-
amount: Joi.number(),
|
|
1799
|
-
|
|
1800
1826
|
promo_id: Joi.string().allow(""),
|
|
1801
1827
|
|
|
1828
|
+
offer_text: Joi.string().allow(""),
|
|
1829
|
+
|
|
1802
1830
|
mrp_promotion: Joi.boolean(),
|
|
1803
1831
|
|
|
1804
|
-
|
|
1832
|
+
amount: Joi.number(),
|
|
1833
|
+
|
|
1834
|
+
promotion_type: Joi.string().allow(""),
|
|
1805
1835
|
|
|
1806
1836
|
article_quantity: Joi.number(),
|
|
1807
1837
|
|
|
1808
1838
|
ownership: this.Ownership(),
|
|
1809
|
-
|
|
1810
|
-
promotion_type: Joi.string().allow(""),
|
|
1811
1839
|
});
|
|
1812
1840
|
}
|
|
1813
1841
|
|
|
1814
|
-
static
|
|
1842
|
+
static ProductAvailability() {
|
|
1815
1843
|
return Joi.object({
|
|
1816
|
-
|
|
1844
|
+
out_of_stock: Joi.boolean(),
|
|
1817
1845
|
|
|
1818
|
-
|
|
1819
|
-
});
|
|
1820
|
-
}
|
|
1846
|
+
sizes: Joi.array().items(Joi.string().allow("")),
|
|
1821
1847
|
|
|
1822
|
-
|
|
1823
|
-
return Joi.object({
|
|
1824
|
-
secure_url: Joi.string().allow(""),
|
|
1848
|
+
other_store_quantity: Joi.number(),
|
|
1825
1849
|
|
|
1826
|
-
|
|
1850
|
+
deliverable: Joi.boolean(),
|
|
1827
1851
|
|
|
1828
|
-
|
|
1852
|
+
is_valid: Joi.boolean(),
|
|
1829
1853
|
});
|
|
1830
1854
|
}
|
|
1831
1855
|
|
|
1832
|
-
static
|
|
1856
|
+
static CartProductIdentifer() {
|
|
1833
1857
|
return Joi.object({
|
|
1834
|
-
|
|
1858
|
+
identifier: Joi.string().allow(""),
|
|
1835
1859
|
});
|
|
1836
1860
|
}
|
|
1837
1861
|
|
|
1838
|
-
static
|
|
1862
|
+
static PromoMeta() {
|
|
1839
1863
|
return Joi.object({
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
url: Joi.string().allow(""),
|
|
1843
|
-
|
|
1844
|
-
query: this.ActionQuery(),
|
|
1864
|
+
message: Joi.string().allow(""),
|
|
1845
1865
|
});
|
|
1846
1866
|
}
|
|
1847
1867
|
|
|
1848
|
-
static
|
|
1868
|
+
static CartProductInfo() {
|
|
1849
1869
|
return Joi.object({
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
categories: Joi.array().items(this.CategoryInfo()),
|
|
1853
|
-
|
|
1854
|
-
name: Joi.string().allow(""),
|
|
1855
|
-
|
|
1856
|
-
uid: Joi.number(),
|
|
1857
|
-
|
|
1858
|
-
brand: this.BaseInfo(),
|
|
1870
|
+
parent_item_identifiers: Joi.any(),
|
|
1859
1871
|
|
|
1860
|
-
|
|
1872
|
+
message: Joi.string().allow(""),
|
|
1861
1873
|
|
|
1862
|
-
|
|
1874
|
+
coupon_message: Joi.string().allow(""),
|
|
1863
1875
|
|
|
1864
|
-
|
|
1865
|
-
});
|
|
1866
|
-
}
|
|
1876
|
+
key: Joi.string().allow(""),
|
|
1867
1877
|
|
|
1868
|
-
static CartProductInfo() {
|
|
1869
|
-
return Joi.object({
|
|
1870
1878
|
article: this.ProductArticle(),
|
|
1871
1879
|
|
|
1872
|
-
|
|
1880
|
+
product: this.CartProduct(),
|
|
1873
1881
|
|
|
1874
1882
|
bulk_offer: Joi.any(),
|
|
1875
1883
|
|
|
1876
|
-
coupon_message: Joi.string().allow(""),
|
|
1877
|
-
|
|
1878
|
-
identifiers: this.CartProductIdentifer().required(),
|
|
1879
|
-
|
|
1880
1884
|
price_per_unit: this.ProductPriceInfo(),
|
|
1881
1885
|
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
price: this.ProductPriceInfo(),
|
|
1885
|
-
|
|
1886
|
-
message: Joi.string().allow(""),
|
|
1886
|
+
quantity: Joi.number(),
|
|
1887
1887
|
|
|
1888
1888
|
is_set: Joi.boolean(),
|
|
1889
1889
|
|
|
1890
1890
|
promotions_applied: Joi.array().items(this.AppliedPromotion()),
|
|
1891
1891
|
|
|
1892
|
-
|
|
1892
|
+
availability: this.ProductAvailability(),
|
|
1893
1893
|
|
|
1894
|
-
|
|
1894
|
+
identifiers: this.CartProductIdentifer().required(),
|
|
1895
1895
|
|
|
1896
|
-
|
|
1896
|
+
promo_meta: this.PromoMeta(),
|
|
1897
1897
|
|
|
1898
|
-
|
|
1898
|
+
price: this.ProductPriceInfo(),
|
|
1899
1899
|
|
|
1900
|
-
|
|
1900
|
+
discount: Joi.string().allow(""),
|
|
1901
1901
|
});
|
|
1902
1902
|
}
|
|
1903
1903
|
|
|
1904
1904
|
static CartDetailResponse() {
|
|
1905
1905
|
return Joi.object({
|
|
1906
|
-
delivery_charge_info: Joi.string().allow(""),
|
|
1907
|
-
|
|
1908
1906
|
buy_now: Joi.boolean(),
|
|
1909
1907
|
|
|
1910
|
-
|
|
1908
|
+
message: Joi.string().allow(""),
|
|
1911
1909
|
|
|
1912
|
-
|
|
1910
|
+
id: Joi.string().allow(""),
|
|
1913
1911
|
|
|
1914
|
-
|
|
1912
|
+
currency: this.CartCurrency(),
|
|
1913
|
+
|
|
1914
|
+
payment_selection_lock: this.PaymentSelectionLock(),
|
|
1915
1915
|
|
|
1916
1916
|
delivery_promise: this.ShipmentPromise(),
|
|
1917
1917
|
|
|
1918
|
-
|
|
1918
|
+
coupon_text: Joi.string().allow(""),
|
|
1919
1919
|
|
|
1920
|
-
|
|
1920
|
+
breakup_values: this.CartBreakup(),
|
|
1921
1921
|
|
|
1922
|
-
|
|
1922
|
+
items: Joi.array().items(this.CartProductInfo()),
|
|
1923
1923
|
|
|
1924
|
-
|
|
1924
|
+
gstin: Joi.string().allow(""),
|
|
1925
1925
|
|
|
1926
|
-
|
|
1926
|
+
restrict_checkout: Joi.boolean(),
|
|
1927
1927
|
|
|
1928
|
-
|
|
1928
|
+
last_modified: Joi.string().allow(""),
|
|
1929
1929
|
|
|
1930
|
-
|
|
1930
|
+
comment: Joi.string().allow(""),
|
|
1931
1931
|
|
|
1932
|
-
|
|
1932
|
+
checkout_mode: Joi.string().allow(""),
|
|
1933
1933
|
|
|
1934
|
-
|
|
1934
|
+
is_valid: Joi.boolean(),
|
|
1935
1935
|
|
|
1936
|
-
|
|
1936
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
1937
1937
|
});
|
|
1938
1938
|
}
|
|
1939
1939
|
|
|
1940
1940
|
static AddProductCart() {
|
|
1941
1941
|
return Joi.object({
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
pos: Joi.boolean(),
|
|
1942
|
+
parent_item_identifiers: Joi.any(),
|
|
1945
1943
|
|
|
1946
|
-
|
|
1944
|
+
item_size: Joi.string().allow(""),
|
|
1947
1945
|
|
|
1948
|
-
|
|
1946
|
+
pos: Joi.boolean(),
|
|
1949
1947
|
|
|
1950
|
-
|
|
1948
|
+
extra_meta: Joi.any(),
|
|
1951
1949
|
|
|
1952
1950
|
article_assignment: Joi.any(),
|
|
1953
1951
|
|
|
1952
|
+
article_id: Joi.string().allow(""),
|
|
1953
|
+
|
|
1954
1954
|
seller_id: Joi.number(),
|
|
1955
1955
|
|
|
1956
|
-
|
|
1956
|
+
quantity: Joi.number(),
|
|
1957
1957
|
|
|
1958
|
-
|
|
1958
|
+
item_id: Joi.number(),
|
|
1959
1959
|
|
|
1960
|
-
|
|
1960
|
+
display: Joi.string().allow(""),
|
|
1961
1961
|
|
|
1962
|
-
|
|
1962
|
+
product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
|
|
1963
1963
|
|
|
1964
|
-
|
|
1964
|
+
store_id: Joi.number(),
|
|
1965
1965
|
});
|
|
1966
1966
|
}
|
|
1967
1967
|
|
|
@@ -1973,11 +1973,11 @@ class Validator {
|
|
|
1973
1973
|
|
|
1974
1974
|
static AddCartDetailResponse() {
|
|
1975
1975
|
return Joi.object({
|
|
1976
|
-
|
|
1976
|
+
message: Joi.string().allow(""),
|
|
1977
1977
|
|
|
1978
1978
|
cart: this.CartDetailResponse(),
|
|
1979
1979
|
|
|
1980
|
-
|
|
1980
|
+
success: Joi.boolean(),
|
|
1981
1981
|
|
|
1982
1982
|
partial: Joi.boolean(),
|
|
1983
1983
|
});
|
|
@@ -1985,21 +1985,21 @@ class Validator {
|
|
|
1985
1985
|
|
|
1986
1986
|
static UpdateProductCart() {
|
|
1987
1987
|
return Joi.object({
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
identifiers: this.CartProductIdentifer().required(),
|
|
1988
|
+
parent_item_identifiers: Joi.any(),
|
|
1991
1989
|
|
|
1992
|
-
|
|
1990
|
+
item_size: Joi.string().allow(""),
|
|
1993
1991
|
|
|
1994
|
-
|
|
1992
|
+
extra_meta: Joi.any(),
|
|
1995
1993
|
|
|
1996
1994
|
article_id: Joi.string().allow(""),
|
|
1997
1995
|
|
|
1998
|
-
|
|
1996
|
+
quantity: Joi.number(),
|
|
1999
1997
|
|
|
2000
|
-
|
|
1998
|
+
item_id: Joi.number(),
|
|
2001
1999
|
|
|
2002
|
-
|
|
2000
|
+
identifiers: this.CartProductIdentifer().required(),
|
|
2001
|
+
|
|
2002
|
+
item_index: Joi.number(),
|
|
2003
2003
|
});
|
|
2004
2004
|
}
|
|
2005
2005
|
|
|
@@ -2013,11 +2013,11 @@ class Validator {
|
|
|
2013
2013
|
|
|
2014
2014
|
static UpdateCartDetailResponse() {
|
|
2015
2015
|
return Joi.object({
|
|
2016
|
-
|
|
2016
|
+
message: Joi.string().allow(""),
|
|
2017
2017
|
|
|
2018
2018
|
cart: this.CartDetailResponse(),
|
|
2019
2019
|
|
|
2020
|
-
|
|
2020
|
+
success: Joi.boolean(),
|
|
2021
2021
|
});
|
|
2022
2022
|
}
|
|
2023
2023
|
|
|
@@ -2029,13 +2029,13 @@ class Validator {
|
|
|
2029
2029
|
|
|
2030
2030
|
static PageCoupon() {
|
|
2031
2031
|
return Joi.object({
|
|
2032
|
-
|
|
2032
|
+
total_item_count: Joi.number(),
|
|
2033
2033
|
|
|
2034
2034
|
total: Joi.number(),
|
|
2035
2035
|
|
|
2036
2036
|
has_previous: Joi.boolean(),
|
|
2037
2037
|
|
|
2038
|
-
|
|
2038
|
+
has_next: Joi.boolean(),
|
|
2039
2039
|
|
|
2040
2040
|
current: Joi.number(),
|
|
2041
2041
|
});
|
|
@@ -2043,25 +2043,25 @@ class Validator {
|
|
|
2043
2043
|
|
|
2044
2044
|
static Coupon() {
|
|
2045
2045
|
return Joi.object({
|
|
2046
|
-
|
|
2046
|
+
message: Joi.string().allow(""),
|
|
2047
2047
|
|
|
2048
|
-
|
|
2048
|
+
minimum_cart_value: Joi.number(),
|
|
2049
2049
|
|
|
2050
2050
|
expires_on: Joi.string().allow(""),
|
|
2051
2051
|
|
|
2052
|
+
is_applicable: Joi.boolean(),
|
|
2053
|
+
|
|
2054
|
+
max_discount_value: Joi.number(),
|
|
2055
|
+
|
|
2052
2056
|
coupon_code: Joi.string().allow(""),
|
|
2053
2057
|
|
|
2054
|
-
|
|
2058
|
+
sub_title: Joi.string().allow(""),
|
|
2055
2059
|
|
|
2056
|
-
|
|
2060
|
+
title: Joi.string().allow(""),
|
|
2057
2061
|
|
|
2058
2062
|
is_applied: Joi.boolean(),
|
|
2059
2063
|
|
|
2060
2064
|
coupon_value: Joi.number(),
|
|
2061
|
-
|
|
2062
|
-
message: Joi.string().allow(""),
|
|
2063
|
-
|
|
2064
|
-
title: Joi.string().allow(""),
|
|
2065
2065
|
});
|
|
2066
2066
|
}
|
|
2067
2067
|
|
|
@@ -2081,41 +2081,41 @@ class Validator {
|
|
|
2081
2081
|
|
|
2082
2082
|
static OfferSeller() {
|
|
2083
2083
|
return Joi.object({
|
|
2084
|
-
uid: Joi.number(),
|
|
2085
|
-
|
|
2086
2084
|
name: Joi.string().allow(""),
|
|
2085
|
+
|
|
2086
|
+
uid: Joi.number(),
|
|
2087
2087
|
});
|
|
2088
2088
|
}
|
|
2089
2089
|
|
|
2090
2090
|
static OfferPrice() {
|
|
2091
2091
|
return Joi.object({
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
currency_code: Joi.string().allow(""),
|
|
2092
|
+
bulk_effective: Joi.number(),
|
|
2095
2093
|
|
|
2096
2094
|
currency_symbol: Joi.string().allow(""),
|
|
2097
2095
|
|
|
2098
|
-
|
|
2096
|
+
marked: Joi.number(),
|
|
2099
2097
|
|
|
2100
2098
|
effective: Joi.number(),
|
|
2099
|
+
|
|
2100
|
+
currency_code: Joi.string().allow(""),
|
|
2101
2101
|
});
|
|
2102
2102
|
}
|
|
2103
2103
|
|
|
2104
2104
|
static OfferItem() {
|
|
2105
2105
|
return Joi.object({
|
|
2106
|
-
type: Joi.string().allow(""),
|
|
2107
|
-
|
|
2108
2106
|
auto_applied: Joi.boolean(),
|
|
2109
2107
|
|
|
2110
|
-
price: this.OfferPrice(),
|
|
2111
|
-
|
|
2112
2108
|
total: Joi.number(),
|
|
2113
2109
|
|
|
2110
|
+
margin: Joi.number(),
|
|
2111
|
+
|
|
2114
2112
|
best: Joi.boolean(),
|
|
2115
2113
|
|
|
2116
2114
|
quantity: Joi.number(),
|
|
2117
2115
|
|
|
2118
|
-
|
|
2116
|
+
price: this.OfferPrice(),
|
|
2117
|
+
|
|
2118
|
+
type: Joi.string().allow(""),
|
|
2119
2119
|
});
|
|
2120
2120
|
}
|
|
2121
2121
|
|
|
@@ -2141,57 +2141,61 @@ class Validator {
|
|
|
2141
2141
|
|
|
2142
2142
|
static GeoLocation() {
|
|
2143
2143
|
return Joi.object({
|
|
2144
|
-
longitude: Joi.number(),
|
|
2145
|
-
|
|
2146
2144
|
latitude: Joi.number(),
|
|
2145
|
+
|
|
2146
|
+
longitude: Joi.number(),
|
|
2147
2147
|
});
|
|
2148
2148
|
}
|
|
2149
2149
|
|
|
2150
2150
|
static Address() {
|
|
2151
2151
|
return Joi.object({
|
|
2152
|
-
|
|
2152
|
+
geo_location: this.GeoLocation(),
|
|
2153
|
+
|
|
2154
|
+
country_iso_code: Joi.string().allow(""),
|
|
2153
2155
|
|
|
2154
2156
|
state: Joi.string().allow(""),
|
|
2155
2157
|
|
|
2156
|
-
|
|
2158
|
+
is_active: Joi.boolean(),
|
|
2157
2159
|
|
|
2158
|
-
|
|
2160
|
+
country_phone_code: Joi.string().allow(""),
|
|
2159
2161
|
|
|
2160
|
-
|
|
2162
|
+
area_code: Joi.string().allow(""),
|
|
2163
|
+
|
|
2164
|
+
city: Joi.string().allow(""),
|
|
2161
2165
|
|
|
2162
2166
|
area: Joi.string().allow(""),
|
|
2163
2167
|
|
|
2164
|
-
|
|
2168
|
+
phone: Joi.string().allow(""),
|
|
2165
2169
|
|
|
2166
2170
|
meta: Joi.any(),
|
|
2167
2171
|
|
|
2168
|
-
|
|
2172
|
+
area_code_slug: Joi.string().allow(""),
|
|
2169
2173
|
|
|
2170
|
-
|
|
2174
|
+
checkout_mode: Joi.string().allow(""),
|
|
2171
2175
|
|
|
2172
2176
|
email: Joi.string().allow(""),
|
|
2173
2177
|
|
|
2174
|
-
|
|
2178
|
+
country_code: Joi.string().allow(""),
|
|
2175
2179
|
|
|
2176
|
-
|
|
2180
|
+
id: Joi.string().allow(""),
|
|
2177
2181
|
|
|
2178
|
-
|
|
2182
|
+
country: Joi.string().allow(""),
|
|
2179
2183
|
|
|
2180
|
-
|
|
2184
|
+
address: Joi.string().allow(""),
|
|
2181
2185
|
|
|
2182
|
-
|
|
2186
|
+
landmark: Joi.string().allow(""),
|
|
2183
2187
|
|
|
2184
|
-
|
|
2188
|
+
name: Joi.string().allow(""),
|
|
2185
2189
|
|
|
2186
|
-
|
|
2190
|
+
google_map_point: Joi.any(),
|
|
2187
2191
|
|
|
2188
|
-
|
|
2192
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
2189
2193
|
|
|
2190
|
-
|
|
2194
|
+
is_default_address: Joi.boolean(),
|
|
2191
2195
|
|
|
2192
|
-
|
|
2196
|
+
address_type: Joi.string().allow(""),
|
|
2193
2197
|
|
|
2194
|
-
|
|
2198
|
+
user_id: Joi.string().allow(""),
|
|
2195
2199
|
});
|
|
2196
2200
|
}
|
|
2197
2201
|
|
|
@@ -2203,23 +2207,23 @@ class Validator {
|
|
|
2203
2207
|
|
|
2204
2208
|
static SaveAddressResponse() {
|
|
2205
2209
|
return Joi.object({
|
|
2210
|
+
is_default_address: Joi.boolean(),
|
|
2211
|
+
|
|
2206
2212
|
success: Joi.boolean(),
|
|
2207
2213
|
|
|
2208
2214
|
id: Joi.string().allow(""),
|
|
2209
|
-
|
|
2210
|
-
is_default_address: Joi.boolean(),
|
|
2211
2215
|
});
|
|
2212
2216
|
}
|
|
2213
2217
|
|
|
2214
2218
|
static UpdateAddressResponse() {
|
|
2215
2219
|
return Joi.object({
|
|
2220
|
+
is_default_address: Joi.boolean(),
|
|
2221
|
+
|
|
2216
2222
|
is_updated: Joi.boolean(),
|
|
2217
2223
|
|
|
2218
2224
|
success: Joi.boolean(),
|
|
2219
2225
|
|
|
2220
2226
|
id: Joi.string().allow(""),
|
|
2221
|
-
|
|
2222
|
-
is_default_address: Joi.boolean(),
|
|
2223
2227
|
});
|
|
2224
2228
|
}
|
|
2225
2229
|
|
|
@@ -2233,27 +2237,27 @@ class Validator {
|
|
|
2233
2237
|
|
|
2234
2238
|
static SelectCartAddressRequest() {
|
|
2235
2239
|
return Joi.object({
|
|
2240
|
+
billing_address_id: Joi.string().allow(""),
|
|
2241
|
+
|
|
2236
2242
|
cart_id: Joi.string().allow(""),
|
|
2237
2243
|
|
|
2238
2244
|
id: Joi.string().allow(""),
|
|
2239
|
-
|
|
2240
|
-
billing_address_id: Joi.string().allow(""),
|
|
2241
2245
|
});
|
|
2242
2246
|
}
|
|
2243
2247
|
|
|
2244
2248
|
static UpdateCartPaymentRequest() {
|
|
2245
2249
|
return Joi.object({
|
|
2246
|
-
aggregator_name: Joi.string().allow(""),
|
|
2247
|
-
|
|
2248
|
-
merchant_code: Joi.string().allow(""),
|
|
2249
|
-
|
|
2250
2250
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
2251
2251
|
|
|
2252
|
-
|
|
2252
|
+
id: Joi.string().allow(""),
|
|
2253
|
+
|
|
2254
|
+
aggregator_name: Joi.string().allow(""),
|
|
2253
2255
|
|
|
2254
2256
|
payment_mode: Joi.string().allow(""),
|
|
2255
2257
|
|
|
2256
|
-
|
|
2258
|
+
address_id: Joi.string().allow(""),
|
|
2259
|
+
|
|
2260
|
+
merchant_code: Joi.string().allow(""),
|
|
2257
2261
|
});
|
|
2258
2262
|
}
|
|
2259
2263
|
|
|
@@ -2263,21 +2267,21 @@ class Validator {
|
|
|
2263
2267
|
|
|
2264
2268
|
valid: Joi.boolean(),
|
|
2265
2269
|
|
|
2266
|
-
|
|
2270
|
+
title: Joi.string().allow(""),
|
|
2267
2271
|
|
|
2268
2272
|
discount: Joi.number(),
|
|
2269
2273
|
|
|
2270
|
-
|
|
2274
|
+
display_message_en: Joi.string().allow("").allow(null),
|
|
2271
2275
|
});
|
|
2272
2276
|
}
|
|
2273
2277
|
|
|
2274
2278
|
static PaymentCouponValidate() {
|
|
2275
2279
|
return Joi.object({
|
|
2280
|
+
message: Joi.string().allow(""),
|
|
2281
|
+
|
|
2276
2282
|
success: Joi.boolean().required(),
|
|
2277
2283
|
|
|
2278
2284
|
coupon_validity: this.CouponValidity(),
|
|
2279
|
-
|
|
2280
|
-
message: Joi.string().allow(""),
|
|
2281
2285
|
});
|
|
2282
2286
|
}
|
|
2283
2287
|
|
|
@@ -2287,61 +2291,61 @@ class Validator {
|
|
|
2287
2291
|
|
|
2288
2292
|
shipments: Joi.number(),
|
|
2289
2293
|
|
|
2290
|
-
|
|
2294
|
+
dp_options: Joi.any().allow(null),
|
|
2291
2295
|
|
|
2292
|
-
|
|
2296
|
+
box_type: Joi.string().allow("").allow(null),
|
|
2293
2297
|
|
|
2294
2298
|
dp_id: Joi.string().allow("").allow(null),
|
|
2295
2299
|
|
|
2296
|
-
|
|
2300
|
+
items: Joi.array().items(this.CartProductInfo()),
|
|
2297
2301
|
|
|
2298
|
-
|
|
2302
|
+
order_type: Joi.string().allow(""),
|
|
2299
2303
|
|
|
2300
|
-
|
|
2304
|
+
shipment_type: Joi.string().allow(""),
|
|
2301
2305
|
|
|
2302
2306
|
promise: this.ShipmentPromise(),
|
|
2303
2307
|
|
|
2304
|
-
|
|
2308
|
+
fulfillment_type: Joi.string().allow(""),
|
|
2305
2309
|
});
|
|
2306
2310
|
}
|
|
2307
2311
|
|
|
2308
2312
|
static CartShipmentsResponse() {
|
|
2309
2313
|
return Joi.object({
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
breakup_values: this.CartBreakup(),
|
|
2314
|
+
shipments: Joi.array().items(this.ShipmentResponse()),
|
|
2313
2315
|
|
|
2314
|
-
|
|
2316
|
+
currency: this.CartCurrency(),
|
|
2315
2317
|
|
|
2316
|
-
|
|
2318
|
+
gstin: Joi.string().allow(""),
|
|
2317
2319
|
|
|
2318
|
-
|
|
2320
|
+
error: Joi.boolean(),
|
|
2319
2321
|
|
|
2320
|
-
|
|
2322
|
+
checkout_mode: Joi.string().allow(""),
|
|
2321
2323
|
|
|
2322
|
-
|
|
2324
|
+
is_valid: Joi.boolean(),
|
|
2323
2325
|
|
|
2324
|
-
|
|
2326
|
+
uid: Joi.string().allow(""),
|
|
2325
2327
|
|
|
2326
|
-
|
|
2328
|
+
buy_now: Joi.boolean(),
|
|
2327
2329
|
|
|
2328
2330
|
message: Joi.string().allow(""),
|
|
2329
2331
|
|
|
2330
|
-
|
|
2332
|
+
id: Joi.string().allow(""),
|
|
2331
2333
|
|
|
2332
|
-
|
|
2334
|
+
payment_selection_lock: this.PaymentSelectionLock(),
|
|
2333
2335
|
|
|
2334
|
-
|
|
2336
|
+
delivery_promise: this.ShipmentPromise(),
|
|
2335
2337
|
|
|
2336
|
-
|
|
2338
|
+
coupon_text: Joi.string().allow(""),
|
|
2337
2339
|
|
|
2338
|
-
|
|
2340
|
+
breakup_values: this.CartBreakup(),
|
|
2341
|
+
|
|
2342
|
+
last_modified: Joi.string().allow(""),
|
|
2339
2343
|
|
|
2340
2344
|
comment: Joi.string().allow(""),
|
|
2341
2345
|
|
|
2342
|
-
|
|
2346
|
+
restrict_checkout: Joi.boolean(),
|
|
2343
2347
|
|
|
2344
|
-
|
|
2348
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
2345
2349
|
|
|
2346
2350
|
cart_id: Joi.number(),
|
|
2347
2351
|
});
|
|
@@ -2361,129 +2365,129 @@ class Validator {
|
|
|
2361
2365
|
|
|
2362
2366
|
static CartCheckoutDetailRequest() {
|
|
2363
2367
|
return Joi.object({
|
|
2364
|
-
|
|
2368
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
2365
2369
|
|
|
2366
|
-
|
|
2370
|
+
ordering_store: Joi.number().allow(null),
|
|
2367
2371
|
|
|
2368
|
-
|
|
2372
|
+
payment_params: Joi.any().allow(null),
|
|
2369
2373
|
|
|
2370
|
-
|
|
2374
|
+
callback_url: Joi.string().allow("").allow(null),
|
|
2371
2375
|
|
|
2372
|
-
|
|
2376
|
+
extra_meta: Joi.any(),
|
|
2373
2377
|
|
|
2374
|
-
|
|
2378
|
+
staff: this.StaffCheckout(),
|
|
2375
2379
|
|
|
2376
|
-
|
|
2380
|
+
billing_address_id: Joi.string().allow(""),
|
|
2377
2381
|
|
|
2378
|
-
|
|
2382
|
+
aggregator: Joi.string().allow(""),
|
|
2379
2383
|
|
|
2380
|
-
|
|
2384
|
+
payment_auto_confirm: Joi.boolean(),
|
|
2381
2385
|
|
|
2382
|
-
|
|
2386
|
+
address_id: Joi.string().allow(""),
|
|
2383
2387
|
|
|
2384
2388
|
delivery_address: Joi.any(),
|
|
2385
2389
|
|
|
2386
|
-
|
|
2390
|
+
meta: Joi.any(),
|
|
2387
2391
|
|
|
2388
|
-
|
|
2392
|
+
billing_address: Joi.any(),
|
|
2389
2393
|
|
|
2390
|
-
|
|
2394
|
+
payment_mode: Joi.string().allow("").required(),
|
|
2391
2395
|
|
|
2392
|
-
|
|
2396
|
+
merchant_code: Joi.string().allow(""),
|
|
2393
2397
|
});
|
|
2394
2398
|
}
|
|
2395
2399
|
|
|
2396
2400
|
static CheckCart() {
|
|
2397
2401
|
return Joi.object({
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
breakup_values: this.CartBreakup(),
|
|
2402
|
+
currency: this.CartCurrency(),
|
|
2401
2403
|
|
|
2402
|
-
|
|
2404
|
+
store_code: Joi.string().allow(""),
|
|
2403
2405
|
|
|
2404
|
-
|
|
2406
|
+
store_emps: Joi.array().items(Joi.any()),
|
|
2405
2407
|
|
|
2406
|
-
|
|
2408
|
+
user_type: Joi.string().allow(""),
|
|
2407
2409
|
|
|
2408
|
-
|
|
2410
|
+
success: Joi.boolean(),
|
|
2409
2411
|
|
|
2410
|
-
|
|
2412
|
+
error_message: Joi.string().allow(""),
|
|
2411
2413
|
|
|
2412
|
-
|
|
2414
|
+
payment_selection_lock: this.PaymentSelectionLock(),
|
|
2413
2415
|
|
|
2414
|
-
|
|
2416
|
+
breakup_values: this.CartBreakup(),
|
|
2415
2417
|
|
|
2416
|
-
|
|
2418
|
+
comment: Joi.string().allow(""),
|
|
2417
2419
|
|
|
2418
|
-
|
|
2420
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
2419
2421
|
|
|
2420
2422
|
cart_id: Joi.number(),
|
|
2421
2423
|
|
|
2422
|
-
|
|
2424
|
+
cod_charges: Joi.number(),
|
|
2425
|
+
|
|
2426
|
+
delivery_charges: Joi.number(),
|
|
2427
|
+
|
|
2428
|
+
gstin: Joi.string().allow(""),
|
|
2423
2429
|
|
|
2424
|
-
|
|
2430
|
+
items: Joi.array().items(this.CartProductInfo()),
|
|
2425
2431
|
|
|
2426
|
-
|
|
2432
|
+
checkout_mode: Joi.string().allow(""),
|
|
2427
2433
|
|
|
2428
|
-
|
|
2434
|
+
is_valid: Joi.boolean(),
|
|
2429
2435
|
|
|
2430
|
-
|
|
2436
|
+
order_id: Joi.string().allow(""),
|
|
2431
2437
|
|
|
2432
|
-
|
|
2438
|
+
uid: Joi.string().allow(""),
|
|
2433
2439
|
|
|
2434
|
-
|
|
2440
|
+
buy_now: Joi.boolean(),
|
|
2435
2441
|
|
|
2436
|
-
|
|
2442
|
+
message: Joi.string().allow(""),
|
|
2437
2443
|
|
|
2438
|
-
|
|
2444
|
+
cod_message: Joi.string().allow(""),
|
|
2439
2445
|
|
|
2440
|
-
|
|
2446
|
+
id: Joi.string().allow(""),
|
|
2441
2447
|
|
|
2442
|
-
|
|
2448
|
+
delivery_charge_order_value: Joi.number(),
|
|
2443
2449
|
|
|
2444
|
-
|
|
2450
|
+
delivery_promise: this.ShipmentPromise(),
|
|
2445
2451
|
|
|
2446
2452
|
coupon_text: Joi.string().allow(""),
|
|
2447
2453
|
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
user_type: Joi.string().allow(""),
|
|
2454
|
+
last_modified: Joi.string().allow(""),
|
|
2451
2455
|
|
|
2452
|
-
|
|
2456
|
+
restrict_checkout: Joi.boolean(),
|
|
2453
2457
|
|
|
2454
|
-
|
|
2458
|
+
cod_available: Joi.boolean(),
|
|
2455
2459
|
});
|
|
2456
2460
|
}
|
|
2457
2461
|
|
|
2458
2462
|
static CartCheckoutResponse() {
|
|
2459
2463
|
return Joi.object({
|
|
2460
|
-
|
|
2464
|
+
message: Joi.string().allow(""),
|
|
2461
2465
|
|
|
2462
|
-
|
|
2466
|
+
cart: this.CheckCart(),
|
|
2463
2467
|
|
|
2464
2468
|
data: Joi.any(),
|
|
2465
2469
|
|
|
2466
2470
|
callback_url: Joi.string().allow(""),
|
|
2467
2471
|
|
|
2468
|
-
|
|
2472
|
+
app_intercept_url: Joi.string().allow(""),
|
|
2469
2473
|
|
|
2470
|
-
|
|
2474
|
+
payment_confirm_url: Joi.string().allow(""),
|
|
2471
2475
|
|
|
2472
2476
|
order_id: Joi.string().allow(""),
|
|
2473
2477
|
|
|
2474
|
-
|
|
2478
|
+
success: Joi.boolean(),
|
|
2475
2479
|
});
|
|
2476
2480
|
}
|
|
2477
2481
|
|
|
2478
2482
|
static CartMetaRequest() {
|
|
2479
2483
|
return Joi.object({
|
|
2484
|
+
comment: Joi.string().allow(""),
|
|
2485
|
+
|
|
2480
2486
|
gstin: Joi.string().allow(""),
|
|
2481
2487
|
|
|
2482
2488
|
checkout_mode: Joi.string().allow(""),
|
|
2483
2489
|
|
|
2484
2490
|
pick_up_customer_details: Joi.any(),
|
|
2485
|
-
|
|
2486
|
-
comment: Joi.string().allow(""),
|
|
2487
2491
|
});
|
|
2488
2492
|
}
|
|
2489
2493
|
|
|
@@ -2509,86 +2513,86 @@ class Validator {
|
|
|
2509
2513
|
|
|
2510
2514
|
static GetShareCartLinkResponse() {
|
|
2511
2515
|
return Joi.object({
|
|
2512
|
-
share_url: Joi.string().allow(""),
|
|
2513
|
-
|
|
2514
2516
|
token: Joi.string().allow(""),
|
|
2517
|
+
|
|
2518
|
+
share_url: Joi.string().allow(""),
|
|
2515
2519
|
});
|
|
2516
2520
|
}
|
|
2517
2521
|
|
|
2518
2522
|
static SharedCartDetails() {
|
|
2519
2523
|
return Joi.object({
|
|
2520
|
-
token: Joi.string().allow(""),
|
|
2521
|
-
|
|
2522
2524
|
user: Joi.any(),
|
|
2523
2525
|
|
|
2526
|
+
created_on: Joi.string().allow(""),
|
|
2527
|
+
|
|
2524
2528
|
source: Joi.any(),
|
|
2525
2529
|
|
|
2526
|
-
|
|
2530
|
+
token: Joi.string().allow(""),
|
|
2527
2531
|
|
|
2528
|
-
|
|
2532
|
+
meta: Joi.any(),
|
|
2529
2533
|
});
|
|
2530
2534
|
}
|
|
2531
2535
|
|
|
2532
2536
|
static SharedCart() {
|
|
2533
2537
|
return Joi.object({
|
|
2534
|
-
|
|
2538
|
+
currency: this.CartCurrency(),
|
|
2539
|
+
|
|
2540
|
+
payment_selection_lock: this.PaymentSelectionLock(),
|
|
2535
2541
|
|
|
2536
2542
|
breakup_values: this.CartBreakup(),
|
|
2537
2543
|
|
|
2538
|
-
|
|
2544
|
+
comment: Joi.string().allow(""),
|
|
2539
2545
|
|
|
2540
|
-
|
|
2546
|
+
delivery_charge_info: Joi.string().allow(""),
|
|
2541
2547
|
|
|
2542
|
-
|
|
2548
|
+
cart_id: Joi.number(),
|
|
2543
2549
|
|
|
2544
2550
|
shared_cart_details: this.SharedCartDetails(),
|
|
2545
2551
|
|
|
2546
2552
|
gstin: Joi.string().allow(""),
|
|
2547
2553
|
|
|
2548
|
-
|
|
2554
|
+
items: Joi.array().items(this.CartProductInfo()),
|
|
2549
2555
|
|
|
2550
2556
|
checkout_mode: Joi.string().allow(""),
|
|
2551
2557
|
|
|
2552
|
-
|
|
2558
|
+
is_valid: Joi.boolean(),
|
|
2553
2559
|
|
|
2554
|
-
|
|
2560
|
+
uid: Joi.string().allow(""),
|
|
2555
2561
|
|
|
2556
|
-
|
|
2562
|
+
buy_now: Joi.boolean(),
|
|
2557
2563
|
|
|
2558
|
-
|
|
2564
|
+
message: Joi.string().allow(""),
|
|
2559
2565
|
|
|
2560
|
-
|
|
2566
|
+
id: Joi.string().allow(""),
|
|
2561
2567
|
|
|
2562
|
-
|
|
2568
|
+
delivery_promise: this.ShipmentPromise(),
|
|
2563
2569
|
|
|
2564
2570
|
coupon_text: Joi.string().allow(""),
|
|
2565
2571
|
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
comment: Joi.string().allow(""),
|
|
2572
|
+
last_modified: Joi.string().allow(""),
|
|
2569
2573
|
|
|
2570
|
-
|
|
2574
|
+
restrict_checkout: Joi.boolean(),
|
|
2571
2575
|
});
|
|
2572
2576
|
}
|
|
2573
2577
|
|
|
2574
2578
|
static SharedCartResponse() {
|
|
2575
2579
|
return Joi.object({
|
|
2576
|
-
cart: this.SharedCart(),
|
|
2577
|
-
|
|
2578
2580
|
error: Joi.string().allow(""),
|
|
2581
|
+
|
|
2582
|
+
cart: this.SharedCart(),
|
|
2579
2583
|
});
|
|
2580
2584
|
}
|
|
2581
2585
|
|
|
2582
2586
|
static PromotionOffer() {
|
|
2583
2587
|
return Joi.object({
|
|
2584
|
-
offer_text: Joi.string().allow(""),
|
|
2585
|
-
|
|
2586
|
-
promotion_group: Joi.string().allow(""),
|
|
2587
|
-
|
|
2588
2588
|
description: Joi.string().allow(""),
|
|
2589
2589
|
|
|
2590
2590
|
id: Joi.string().allow(""),
|
|
2591
2591
|
|
|
2592
|
+
offer_text: Joi.string().allow(""),
|
|
2593
|
+
|
|
2594
|
+
promotion_group: Joi.string().allow(""),
|
|
2595
|
+
|
|
2592
2596
|
valid_till: Joi.string().allow(""),
|
|
2593
2597
|
});
|
|
2594
2598
|
}
|
|
@@ -2601,37 +2605,29 @@ class Validator {
|
|
|
2601
2605
|
|
|
2602
2606
|
static OperationErrorResponse() {
|
|
2603
2607
|
return Joi.object({
|
|
2604
|
-
success: Joi.boolean(),
|
|
2605
|
-
|
|
2606
2608
|
message: Joi.string().allow(""),
|
|
2607
|
-
});
|
|
2608
|
-
}
|
|
2609
|
-
|
|
2610
|
-
static CurrencyInfo() {
|
|
2611
|
-
return Joi.object({
|
|
2612
|
-
symbol: Joi.string().allow(""),
|
|
2613
2609
|
|
|
2614
|
-
|
|
2610
|
+
success: Joi.boolean(),
|
|
2615
2611
|
});
|
|
2616
2612
|
}
|
|
2617
2613
|
|
|
2618
2614
|
static LadderPrice() {
|
|
2619
2615
|
return Joi.object({
|
|
2620
|
-
|
|
2616
|
+
currency_symbol: Joi.string().allow(""),
|
|
2621
2617
|
|
|
2622
2618
|
marked: Joi.number(),
|
|
2623
2619
|
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
currency_symbol: Joi.string().allow(""),
|
|
2620
|
+
offer_price: Joi.number(),
|
|
2627
2621
|
|
|
2628
2622
|
effective: Joi.number(),
|
|
2623
|
+
|
|
2624
|
+
currency_code: Joi.string().allow(""),
|
|
2629
2625
|
});
|
|
2630
2626
|
}
|
|
2631
2627
|
|
|
2632
2628
|
static LadderOfferItem() {
|
|
2633
2629
|
return Joi.object({
|
|
2634
|
-
|
|
2630
|
+
margin: Joi.number(),
|
|
2635
2631
|
|
|
2636
2632
|
max_quantity: Joi.number(),
|
|
2637
2633
|
|
|
@@ -2639,31 +2635,39 @@ class Validator {
|
|
|
2639
2635
|
|
|
2640
2636
|
price: this.LadderPrice(),
|
|
2641
2637
|
|
|
2642
|
-
|
|
2638
|
+
type: Joi.string().allow(""),
|
|
2643
2639
|
});
|
|
2644
2640
|
}
|
|
2645
2641
|
|
|
2646
2642
|
static LadderPriceOffer() {
|
|
2647
2643
|
return Joi.object({
|
|
2644
|
+
description: Joi.string().allow(""),
|
|
2645
|
+
|
|
2646
|
+
id: Joi.string().allow(""),
|
|
2647
|
+
|
|
2648
2648
|
offer_text: Joi.string().allow(""),
|
|
2649
2649
|
|
|
2650
2650
|
promotion_group: Joi.string().allow(""),
|
|
2651
2651
|
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
id: Joi.string().allow(""),
|
|
2652
|
+
offer_prices: Joi.array().items(this.LadderOfferItem()),
|
|
2655
2653
|
|
|
2656
2654
|
valid_till: Joi.string().allow(""),
|
|
2655
|
+
});
|
|
2656
|
+
}
|
|
2657
2657
|
|
|
2658
|
-
|
|
2658
|
+
static CurrencyInfo() {
|
|
2659
|
+
return Joi.object({
|
|
2660
|
+
symbol: Joi.string().allow(""),
|
|
2661
|
+
|
|
2662
|
+
code: Joi.string().allow(""),
|
|
2659
2663
|
});
|
|
2660
2664
|
}
|
|
2661
2665
|
|
|
2662
2666
|
static LadderPriceOffers() {
|
|
2663
2667
|
return Joi.object({
|
|
2664
|
-
currency: this.CurrencyInfo(),
|
|
2665
|
-
|
|
2666
2668
|
available_offers: Joi.array().items(this.LadderPriceOffer()),
|
|
2669
|
+
|
|
2670
|
+
currency: this.CurrencyInfo(),
|
|
2667
2671
|
});
|
|
2668
2672
|
}
|
|
2669
2673
|
|
|
@@ -9080,28 +9084,6 @@ class Validator {
|
|
|
9080
9084
|
});
|
|
9081
9085
|
}
|
|
9082
9086
|
|
|
9083
|
-
static BreakupValues() {
|
|
9084
|
-
return Joi.object({
|
|
9085
|
-
value: Joi.number(),
|
|
9086
|
-
|
|
9087
|
-
display: Joi.string().allow(""),
|
|
9088
|
-
|
|
9089
|
-
name: Joi.string().allow(""),
|
|
9090
|
-
});
|
|
9091
|
-
}
|
|
9092
|
-
|
|
9093
|
-
static UserInfo() {
|
|
9094
|
-
return Joi.object({
|
|
9095
|
-
email: Joi.string().allow(""),
|
|
9096
|
-
|
|
9097
|
-
mobile: Joi.string().allow(""),
|
|
9098
|
-
|
|
9099
|
-
name: Joi.string().allow(""),
|
|
9100
|
-
|
|
9101
|
-
gender: Joi.string().allow(""),
|
|
9102
|
-
});
|
|
9103
|
-
}
|
|
9104
|
-
|
|
9105
9087
|
static BagsForReorderArticleAssignment() {
|
|
9106
9088
|
return Joi.object({
|
|
9107
9089
|
level: Joi.string().allow(""),
|
|
@@ -9112,183 +9094,105 @@ class Validator {
|
|
|
9112
9094
|
|
|
9113
9095
|
static BagsForReorder() {
|
|
9114
9096
|
return Joi.object({
|
|
9115
|
-
item_size: Joi.string().allow(""),
|
|
9116
|
-
|
|
9117
|
-
store_id: Joi.number(),
|
|
9118
|
-
|
|
9119
|
-
seller_id: Joi.number(),
|
|
9120
|
-
|
|
9121
|
-
quantity: Joi.number(),
|
|
9122
|
-
|
|
9123
9097
|
item_id: Joi.number(),
|
|
9124
9098
|
|
|
9125
9099
|
article_assignment: this.BagsForReorderArticleAssignment(),
|
|
9126
|
-
});
|
|
9127
|
-
}
|
|
9128
|
-
|
|
9129
|
-
static FulfillingCompany() {
|
|
9130
|
-
return Joi.object({
|
|
9131
|
-
id: Joi.number(),
|
|
9132
|
-
|
|
9133
|
-
name: Joi.string().allow(""),
|
|
9134
|
-
});
|
|
9135
|
-
}
|
|
9136
|
-
|
|
9137
|
-
static FulfillingStore() {
|
|
9138
|
-
return Joi.object({
|
|
9139
|
-
id: Joi.number(),
|
|
9140
|
-
|
|
9141
|
-
company_name: Joi.string().allow(""),
|
|
9142
|
-
|
|
9143
|
-
name: Joi.string().allow(""),
|
|
9144
|
-
|
|
9145
|
-
company_id: Joi.number(),
|
|
9146
|
-
|
|
9147
|
-
code: Joi.string().allow(""),
|
|
9148
|
-
});
|
|
9149
|
-
}
|
|
9150
|
-
|
|
9151
|
-
static Invoice() {
|
|
9152
|
-
return Joi.object({
|
|
9153
|
-
label_url: Joi.string().allow(""),
|
|
9154
|
-
|
|
9155
|
-
invoice_url: Joi.string().allow(""),
|
|
9156
|
-
|
|
9157
|
-
updated_date: Joi.string().allow(""),
|
|
9158
|
-
});
|
|
9159
|
-
}
|
|
9160
|
-
|
|
9161
|
-
static DeliveryAddress() {
|
|
9162
|
-
return Joi.object({
|
|
9163
|
-
version: Joi.string().allow(""),
|
|
9164
|
-
|
|
9165
|
-
country: Joi.string().allow(""),
|
|
9166
|
-
|
|
9167
|
-
state: Joi.string().allow(""),
|
|
9168
|
-
|
|
9169
|
-
area: Joi.string().allow(""),
|
|
9170
|
-
|
|
9171
|
-
name: Joi.string().allow(""),
|
|
9172
|
-
|
|
9173
|
-
contact_person: Joi.string().allow(""),
|
|
9174
|
-
|
|
9175
|
-
pincode: Joi.string().allow(""),
|
|
9176
|
-
|
|
9177
|
-
updated_at: Joi.string().allow(""),
|
|
9178
|
-
|
|
9179
|
-
latitude: Joi.number(),
|
|
9180
|
-
|
|
9181
|
-
city: Joi.string().allow(""),
|
|
9182
|
-
|
|
9183
|
-
address_type: Joi.string().allow(""),
|
|
9184
|
-
|
|
9185
|
-
phone: Joi.string().allow(""),
|
|
9186
|
-
|
|
9187
|
-
address_category: Joi.string().allow(""),
|
|
9188
|
-
|
|
9189
|
-
created_at: Joi.string().allow(""),
|
|
9190
|
-
|
|
9191
|
-
address2: Joi.string().allow(""),
|
|
9192
|
-
|
|
9193
|
-
address1: Joi.string().allow(""),
|
|
9194
|
-
|
|
9195
|
-
landmark: Joi.string().allow(""),
|
|
9196
|
-
|
|
9197
|
-
address: Joi.string().allow(""),
|
|
9198
9100
|
|
|
9199
|
-
|
|
9101
|
+
store_id: Joi.number(),
|
|
9200
9102
|
|
|
9201
|
-
|
|
9202
|
-
});
|
|
9203
|
-
}
|
|
9103
|
+
item_size: Joi.string().allow(""),
|
|
9204
9104
|
|
|
9205
|
-
|
|
9206
|
-
return Joi.object({
|
|
9207
|
-
min: Joi.string().allow(""),
|
|
9105
|
+
quantity: Joi.number(),
|
|
9208
9106
|
|
|
9209
|
-
|
|
9107
|
+
seller_id: Joi.number(),
|
|
9210
9108
|
});
|
|
9211
9109
|
}
|
|
9212
9110
|
|
|
9213
|
-
static
|
|
9111
|
+
static BreakupValues() {
|
|
9214
9112
|
return Joi.object({
|
|
9215
|
-
|
|
9113
|
+
value: Joi.number(),
|
|
9216
9114
|
|
|
9217
|
-
|
|
9115
|
+
name: Joi.string().allow(""),
|
|
9116
|
+
|
|
9117
|
+
display: Joi.string().allow(""),
|
|
9218
9118
|
});
|
|
9219
9119
|
}
|
|
9220
9120
|
|
|
9221
|
-
static
|
|
9121
|
+
static Invoice() {
|
|
9222
9122
|
return Joi.object({
|
|
9223
|
-
|
|
9123
|
+
invoice_url: Joi.string().allow(""),
|
|
9224
9124
|
|
|
9225
|
-
|
|
9125
|
+
updated_date: Joi.string().allow(""),
|
|
9126
|
+
|
|
9127
|
+
label_url: Joi.string().allow(""),
|
|
9226
9128
|
});
|
|
9227
9129
|
}
|
|
9228
9130
|
|
|
9229
|
-
static
|
|
9131
|
+
static ShipmentStatus() {
|
|
9230
9132
|
return Joi.object({
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
total_price: Joi.number(),
|
|
9133
|
+
title: Joi.string().allow(""),
|
|
9234
9134
|
|
|
9235
|
-
|
|
9135
|
+
hex_code: Joi.string().allow(""),
|
|
9236
9136
|
});
|
|
9237
9137
|
}
|
|
9238
9138
|
|
|
9239
|
-
static
|
|
9139
|
+
static DeliveryAddress() {
|
|
9240
9140
|
return Joi.object({
|
|
9241
|
-
|
|
9141
|
+
address2: Joi.string().allow(""),
|
|
9242
9142
|
|
|
9243
|
-
|
|
9143
|
+
latitude: Joi.number(),
|
|
9244
9144
|
|
|
9245
|
-
|
|
9145
|
+
address_category: Joi.string().allow(""),
|
|
9246
9146
|
|
|
9247
|
-
|
|
9147
|
+
area: Joi.string().allow(""),
|
|
9248
9148
|
|
|
9249
|
-
|
|
9149
|
+
landmark: Joi.string().allow(""),
|
|
9250
9150
|
|
|
9251
|
-
|
|
9151
|
+
version: Joi.string().allow(""),
|
|
9252
9152
|
|
|
9253
|
-
|
|
9153
|
+
address1: Joi.string().allow(""),
|
|
9254
9154
|
|
|
9255
|
-
|
|
9155
|
+
city: Joi.string().allow(""),
|
|
9256
9156
|
|
|
9257
|
-
|
|
9157
|
+
state: Joi.string().allow(""),
|
|
9258
9158
|
|
|
9259
|
-
|
|
9159
|
+
updated_at: Joi.string().allow(""),
|
|
9260
9160
|
|
|
9261
|
-
|
|
9161
|
+
address: Joi.string().allow(""),
|
|
9262
9162
|
|
|
9263
|
-
|
|
9163
|
+
longitude: Joi.number(),
|
|
9264
9164
|
|
|
9265
|
-
|
|
9165
|
+
contact_person: Joi.string().allow(""),
|
|
9266
9166
|
|
|
9267
|
-
|
|
9167
|
+
created_at: Joi.string().allow(""),
|
|
9268
9168
|
|
|
9269
|
-
|
|
9169
|
+
name: Joi.string().allow(""),
|
|
9270
9170
|
|
|
9271
|
-
|
|
9171
|
+
phone: Joi.string().allow(""),
|
|
9272
9172
|
|
|
9273
|
-
|
|
9173
|
+
email: Joi.string().allow(""),
|
|
9274
9174
|
|
|
9275
|
-
|
|
9175
|
+
address_type: Joi.string().allow(""),
|
|
9276
9176
|
|
|
9277
|
-
|
|
9177
|
+
country: Joi.string().allow(""),
|
|
9278
9178
|
|
|
9279
|
-
|
|
9179
|
+
pincode: Joi.string().allow(""),
|
|
9280
9180
|
});
|
|
9281
9181
|
}
|
|
9282
9182
|
|
|
9283
|
-
static
|
|
9183
|
+
static ShipmentPayment() {
|
|
9284
9184
|
return Joi.object({
|
|
9285
|
-
|
|
9185
|
+
mode: Joi.string().allow(""),
|
|
9286
9186
|
|
|
9287
|
-
|
|
9187
|
+
status: Joi.string().allow(""),
|
|
9288
9188
|
|
|
9289
|
-
|
|
9189
|
+
display_name: Joi.string().allow(""),
|
|
9290
9190
|
|
|
9291
|
-
|
|
9191
|
+
mop: Joi.string().allow(""),
|
|
9192
|
+
|
|
9193
|
+
logo: Joi.string().allow(""),
|
|
9194
|
+
|
|
9195
|
+
payment_mode: Joi.string().allow(""),
|
|
9292
9196
|
});
|
|
9293
9197
|
}
|
|
9294
9198
|
|
|
@@ -9296,49 +9200,45 @@ class Validator {
|
|
|
9296
9200
|
return Joi.object({
|
|
9297
9201
|
is_passed: Joi.boolean(),
|
|
9298
9202
|
|
|
9299
|
-
time: Joi.string().allow(""),
|
|
9300
|
-
|
|
9301
9203
|
status: Joi.string().allow(""),
|
|
9302
9204
|
|
|
9303
9205
|
is_current: Joi.boolean(),
|
|
9206
|
+
|
|
9207
|
+
time: Joi.string().allow(""),
|
|
9304
9208
|
});
|
|
9305
9209
|
}
|
|
9306
9210
|
|
|
9307
9211
|
static TrackingDetails() {
|
|
9308
9212
|
return Joi.object({
|
|
9309
|
-
|
|
9213
|
+
status: Joi.string().allow(""),
|
|
9310
9214
|
|
|
9311
9215
|
tracking_details: Joi.array().items(this.NestedTrackingDetails()),
|
|
9312
9216
|
|
|
9313
|
-
|
|
9217
|
+
is_current: Joi.boolean(),
|
|
9314
9218
|
|
|
9315
|
-
|
|
9219
|
+
time: Joi.string().allow(""),
|
|
9316
9220
|
|
|
9317
|
-
|
|
9221
|
+
is_passed: Joi.boolean(),
|
|
9318
9222
|
});
|
|
9319
9223
|
}
|
|
9320
9224
|
|
|
9321
|
-
static
|
|
9225
|
+
static CurrentStatus() {
|
|
9322
9226
|
return Joi.object({
|
|
9323
|
-
mop: Joi.string().allow(""),
|
|
9324
|
-
|
|
9325
|
-
payment_mode: Joi.string().allow(""),
|
|
9326
|
-
|
|
9327
|
-
display_name: Joi.string().allow(""),
|
|
9328
|
-
|
|
9329
9227
|
status: Joi.string().allow(""),
|
|
9330
9228
|
|
|
9331
|
-
|
|
9229
|
+
journey_type: Joi.string().allow(""),
|
|
9332
9230
|
|
|
9333
|
-
|
|
9231
|
+
updated_at: Joi.string().allow(""),
|
|
9232
|
+
|
|
9233
|
+
name: Joi.string().allow(""),
|
|
9334
9234
|
});
|
|
9335
9235
|
}
|
|
9336
9236
|
|
|
9337
9237
|
static ItemBrand() {
|
|
9338
9238
|
return Joi.object({
|
|
9339
|
-
logo: Joi.string().allow(""),
|
|
9340
|
-
|
|
9341
9239
|
name: Joi.string().allow(""),
|
|
9240
|
+
|
|
9241
|
+
logo: Joi.string().allow(""),
|
|
9342
9242
|
});
|
|
9343
9243
|
}
|
|
9344
9244
|
|
|
@@ -9346,15 +9246,15 @@ class Validator {
|
|
|
9346
9246
|
return Joi.object({
|
|
9347
9247
|
id: Joi.number(),
|
|
9348
9248
|
|
|
9349
|
-
name: Joi.string().allow(""),
|
|
9350
|
-
|
|
9351
9249
|
brand: this.ItemBrand(),
|
|
9352
9250
|
|
|
9353
|
-
|
|
9251
|
+
slug_key: Joi.string().allow(""),
|
|
9354
9252
|
|
|
9355
9253
|
size: Joi.string().allow(""),
|
|
9356
9254
|
|
|
9357
|
-
|
|
9255
|
+
image: Joi.array().items(Joi.string().allow("")),
|
|
9256
|
+
|
|
9257
|
+
name: Joi.string().allow(""),
|
|
9358
9258
|
|
|
9359
9259
|
code: Joi.string().allow(""),
|
|
9360
9260
|
|
|
@@ -9362,15 +9262,33 @@ class Validator {
|
|
|
9362
9262
|
});
|
|
9363
9263
|
}
|
|
9364
9264
|
|
|
9365
|
-
static
|
|
9265
|
+
static AppliedFreeArticles() {
|
|
9366
9266
|
return Joi.object({
|
|
9367
|
-
|
|
9267
|
+
parent_item_identifier: Joi.string().allow(""),
|
|
9368
9268
|
|
|
9369
|
-
|
|
9269
|
+
free_gift_item_details: Joi.any(),
|
|
9370
9270
|
|
|
9371
|
-
|
|
9271
|
+
quantity: Joi.number(),
|
|
9372
9272
|
|
|
9373
|
-
|
|
9273
|
+
article_id: Joi.string().allow(""),
|
|
9274
|
+
});
|
|
9275
|
+
}
|
|
9276
|
+
|
|
9277
|
+
static AppliedPromos() {
|
|
9278
|
+
return Joi.object({
|
|
9279
|
+
promotion_type: Joi.string().allow(""),
|
|
9280
|
+
|
|
9281
|
+
article_quantity: Joi.number(),
|
|
9282
|
+
|
|
9283
|
+
promo_id: Joi.string().allow(""),
|
|
9284
|
+
|
|
9285
|
+
promotion_name: Joi.string().allow(""),
|
|
9286
|
+
|
|
9287
|
+
applied_free_articles: Joi.array().items(this.AppliedFreeArticles()),
|
|
9288
|
+
|
|
9289
|
+
amount: Joi.number(),
|
|
9290
|
+
|
|
9291
|
+
mrp_promotion: Joi.boolean(),
|
|
9374
9292
|
});
|
|
9375
9293
|
}
|
|
9376
9294
|
|
|
@@ -9384,213 +9302,313 @@ class Validator {
|
|
|
9384
9302
|
|
|
9385
9303
|
static FinancialBreakup() {
|
|
9386
9304
|
return Joi.object({
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
price_effective: Joi.number(),
|
|
9305
|
+
fynd_credits: Joi.number(),
|
|
9390
9306
|
|
|
9391
|
-
|
|
9307
|
+
total_units: Joi.number(),
|
|
9392
9308
|
|
|
9393
|
-
|
|
9309
|
+
gst_tax_percentage: Joi.number(),
|
|
9394
9310
|
|
|
9395
9311
|
amount_paid_roundoff: Joi.number(),
|
|
9396
9312
|
|
|
9397
|
-
|
|
9313
|
+
price_marked: Joi.number(),
|
|
9314
|
+
|
|
9315
|
+
brand_calculated_amount: Joi.number(),
|
|
9398
9316
|
|
|
9399
9317
|
cashback: Joi.number(),
|
|
9400
9318
|
|
|
9401
|
-
|
|
9319
|
+
transfer_price: Joi.number(),
|
|
9402
9320
|
|
|
9403
|
-
|
|
9321
|
+
price_effective: Joi.number(),
|
|
9404
9322
|
|
|
9405
|
-
|
|
9323
|
+
delivery_charge: Joi.number(),
|
|
9406
9324
|
|
|
9407
|
-
|
|
9325
|
+
discount: Joi.number(),
|
|
9408
9326
|
|
|
9409
|
-
|
|
9327
|
+
cod_charges: Joi.number(),
|
|
9410
9328
|
|
|
9411
|
-
|
|
9329
|
+
added_to_fynd_cash: Joi.boolean(),
|
|
9412
9330
|
|
|
9413
|
-
|
|
9331
|
+
coupon_effective_discount: Joi.number(),
|
|
9414
9332
|
|
|
9415
|
-
|
|
9333
|
+
item_name: Joi.string().allow(""),
|
|
9334
|
+
|
|
9335
|
+
amount_paid: Joi.number(),
|
|
9336
|
+
|
|
9337
|
+
value_of_good: Joi.number(),
|
|
9416
9338
|
|
|
9417
9339
|
cashback_applied: Joi.number(),
|
|
9418
9340
|
|
|
9341
|
+
size: Joi.string().allow(""),
|
|
9342
|
+
|
|
9343
|
+
refund_amount: Joi.number(),
|
|
9344
|
+
|
|
9419
9345
|
identifiers: this.Identifiers(),
|
|
9420
9346
|
|
|
9347
|
+
refund_credit: Joi.number(),
|
|
9348
|
+
|
|
9349
|
+
gst_tag: Joi.string().allow(""),
|
|
9350
|
+
|
|
9351
|
+
hsn_code: Joi.string().allow(""),
|
|
9352
|
+
|
|
9353
|
+
coupon_value: Joi.number(),
|
|
9354
|
+
|
|
9355
|
+
gst_fee: Joi.number(),
|
|
9356
|
+
|
|
9421
9357
|
promotion_effective_discount: Joi.number(),
|
|
9358
|
+
});
|
|
9359
|
+
}
|
|
9422
9360
|
|
|
9361
|
+
static Prices() {
|
|
9362
|
+
return Joi.object({
|
|
9423
9363
|
fynd_credits: Joi.number(),
|
|
9424
9364
|
|
|
9425
9365
|
gst_tax_percentage: Joi.number(),
|
|
9426
9366
|
|
|
9367
|
+
amount_paid_roundoff: Joi.number(),
|
|
9368
|
+
|
|
9369
|
+
price_marked: Joi.number(),
|
|
9370
|
+
|
|
9371
|
+
cashback: Joi.number(),
|
|
9372
|
+
|
|
9373
|
+
transfer_price: Joi.number(),
|
|
9374
|
+
|
|
9427
9375
|
brand_calculated_amount: Joi.number(),
|
|
9428
9376
|
|
|
9429
|
-
|
|
9377
|
+
price_effective: Joi.number(),
|
|
9430
9378
|
|
|
9431
9379
|
delivery_charge: Joi.number(),
|
|
9432
9380
|
|
|
9433
|
-
|
|
9381
|
+
discount: Joi.number(),
|
|
9382
|
+
|
|
9383
|
+
cod_charges: Joi.number(),
|
|
9434
9384
|
|
|
9435
9385
|
added_to_fynd_cash: Joi.boolean(),
|
|
9436
9386
|
|
|
9437
|
-
|
|
9387
|
+
coupon_effective_discount: Joi.number(),
|
|
9438
9388
|
|
|
9439
|
-
|
|
9440
|
-
});
|
|
9441
|
-
}
|
|
9389
|
+
amount_paid: Joi.number(),
|
|
9442
9390
|
|
|
9443
|
-
|
|
9444
|
-
return Joi.object({
|
|
9445
|
-
parent_item_identifier: Joi.string().allow(""),
|
|
9391
|
+
value_of_good: Joi.number(),
|
|
9446
9392
|
|
|
9447
|
-
|
|
9393
|
+
cashback_applied: Joi.number(),
|
|
9448
9394
|
|
|
9449
|
-
|
|
9395
|
+
refund_amount: Joi.number(),
|
|
9450
9396
|
|
|
9451
|
-
|
|
9397
|
+
refund_credit: Joi.number(),
|
|
9398
|
+
|
|
9399
|
+
coupon_value: Joi.number(),
|
|
9400
|
+
|
|
9401
|
+
promotion_effective_discount: Joi.number(),
|
|
9452
9402
|
});
|
|
9453
9403
|
}
|
|
9454
9404
|
|
|
9455
|
-
static
|
|
9405
|
+
static Bags() {
|
|
9456
9406
|
return Joi.object({
|
|
9457
|
-
|
|
9407
|
+
id: Joi.number(),
|
|
9458
9408
|
|
|
9459
|
-
|
|
9409
|
+
current_status: this.CurrentStatus(),
|
|
9410
|
+
|
|
9411
|
+
line_number: Joi.number(),
|
|
9412
|
+
|
|
9413
|
+
can_return: Joi.boolean(),
|
|
9414
|
+
|
|
9415
|
+
parent_promo_bags: Joi.any(),
|
|
9416
|
+
|
|
9417
|
+
item: this.Item(),
|
|
9418
|
+
|
|
9419
|
+
returnable_date: Joi.string().allow(""),
|
|
9420
|
+
|
|
9421
|
+
delivery_date: Joi.string().allow(""),
|
|
9422
|
+
|
|
9423
|
+
applied_promos: Joi.array().items(this.AppliedPromos()),
|
|
9424
|
+
|
|
9425
|
+
seller_identifier: Joi.string().allow(""),
|
|
9426
|
+
|
|
9427
|
+
can_cancel: Joi.boolean(),
|
|
9428
|
+
|
|
9429
|
+
financial_breakup: Joi.array().items(this.FinancialBreakup()),
|
|
9460
9430
|
|
|
9461
|
-
|
|
9431
|
+
prices: this.Prices(),
|
|
9462
9432
|
|
|
9463
|
-
|
|
9433
|
+
quantity: Joi.number(),
|
|
9434
|
+
});
|
|
9435
|
+
}
|
|
9464
9436
|
|
|
9465
|
-
|
|
9437
|
+
static ShipmentTotalDetails() {
|
|
9438
|
+
return Joi.object({
|
|
9439
|
+
pieces: Joi.number(),
|
|
9466
9440
|
|
|
9467
|
-
|
|
9441
|
+
total_price: Joi.number(),
|
|
9468
9442
|
|
|
9469
|
-
|
|
9443
|
+
sizes: Joi.number(),
|
|
9470
9444
|
});
|
|
9471
9445
|
}
|
|
9472
9446
|
|
|
9473
|
-
static
|
|
9447
|
+
static FulfillingStore() {
|
|
9474
9448
|
return Joi.object({
|
|
9475
9449
|
id: Joi.number(),
|
|
9476
9450
|
|
|
9477
|
-
|
|
9451
|
+
company_name: Joi.string().allow(""),
|
|
9478
9452
|
|
|
9479
|
-
|
|
9453
|
+
company_id: Joi.number(),
|
|
9480
9454
|
|
|
9481
|
-
|
|
9455
|
+
name: Joi.string().allow(""),
|
|
9482
9456
|
|
|
9483
|
-
|
|
9457
|
+
code: Joi.string().allow(""),
|
|
9458
|
+
});
|
|
9459
|
+
}
|
|
9484
9460
|
|
|
9485
|
-
|
|
9461
|
+
static ShipmentUserInfo() {
|
|
9462
|
+
return Joi.object({
|
|
9463
|
+
gender: Joi.string().allow(""),
|
|
9486
9464
|
|
|
9487
|
-
|
|
9465
|
+
last_name: Joi.string().allow(""),
|
|
9488
9466
|
|
|
9489
|
-
|
|
9467
|
+
mobile: Joi.string().allow(""),
|
|
9490
9468
|
|
|
9491
|
-
|
|
9469
|
+
first_name: Joi.string().allow(""),
|
|
9470
|
+
});
|
|
9471
|
+
}
|
|
9492
9472
|
|
|
9493
|
-
|
|
9473
|
+
static TimeStampData() {
|
|
9474
|
+
return Joi.object({
|
|
9475
|
+
min: Joi.string().allow(""),
|
|
9494
9476
|
|
|
9495
|
-
|
|
9477
|
+
max: Joi.string().allow(""),
|
|
9478
|
+
});
|
|
9479
|
+
}
|
|
9496
9480
|
|
|
9497
|
-
|
|
9481
|
+
static Promise() {
|
|
9482
|
+
return Joi.object({
|
|
9483
|
+
show_promise: Joi.boolean(),
|
|
9498
9484
|
|
|
9499
|
-
|
|
9485
|
+
timestamp: this.TimeStampData(),
|
|
9486
|
+
});
|
|
9487
|
+
}
|
|
9500
9488
|
|
|
9501
|
-
|
|
9489
|
+
static FulfillingCompany() {
|
|
9490
|
+
return Joi.object({
|
|
9491
|
+
id: Joi.number(),
|
|
9492
|
+
|
|
9493
|
+
name: Joi.string().allow(""),
|
|
9502
9494
|
});
|
|
9503
9495
|
}
|
|
9504
9496
|
|
|
9505
9497
|
static Shipments() {
|
|
9506
9498
|
return Joi.object({
|
|
9507
|
-
|
|
9499
|
+
invoice: this.Invoice(),
|
|
9508
9500
|
|
|
9509
|
-
|
|
9501
|
+
traking_no: Joi.string().allow(""),
|
|
9510
9502
|
|
|
9511
|
-
|
|
9503
|
+
delivery_date: Joi.string().allow(""),
|
|
9512
9504
|
|
|
9513
|
-
|
|
9505
|
+
returnable_date: Joi.string().allow(""),
|
|
9514
9506
|
|
|
9515
|
-
|
|
9507
|
+
comment: Joi.string().allow(""),
|
|
9516
9508
|
|
|
9517
|
-
|
|
9509
|
+
shipment_status: this.ShipmentStatus(),
|
|
9518
9510
|
|
|
9519
|
-
|
|
9511
|
+
show_download_invoice: Joi.boolean(),
|
|
9520
9512
|
|
|
9521
|
-
|
|
9513
|
+
total_bags: Joi.number(),
|
|
9522
9514
|
|
|
9523
|
-
|
|
9515
|
+
delivery_address: this.DeliveryAddress(),
|
|
9524
9516
|
|
|
9525
|
-
|
|
9517
|
+
payment: this.ShipmentPayment(),
|
|
9526
9518
|
|
|
9527
|
-
|
|
9519
|
+
breakup_values: Joi.array().items(this.BreakupValues()),
|
|
9528
9520
|
|
|
9529
|
-
|
|
9521
|
+
size_info: Joi.any(),
|
|
9530
9522
|
|
|
9531
|
-
|
|
9523
|
+
refund_details: Joi.any(),
|
|
9532
9524
|
|
|
9533
|
-
|
|
9525
|
+
tracking_details: Joi.array().items(this.TrackingDetails()),
|
|
9534
9526
|
|
|
9535
|
-
|
|
9527
|
+
awb_no: Joi.string().allow(""),
|
|
9528
|
+
|
|
9529
|
+
can_return: Joi.boolean(),
|
|
9530
|
+
|
|
9531
|
+
bags: Joi.array().items(this.Bags()),
|
|
9532
|
+
|
|
9533
|
+
shipment_id: Joi.string().allow(""),
|
|
9536
9534
|
|
|
9537
9535
|
total_details: this.ShipmentTotalDetails(),
|
|
9538
9536
|
|
|
9539
|
-
|
|
9537
|
+
beneficiary_details: Joi.boolean(),
|
|
9540
9538
|
|
|
9541
|
-
|
|
9539
|
+
order_id: Joi.string().allow(""),
|
|
9542
9540
|
|
|
9543
|
-
|
|
9541
|
+
custom_meta: Joi.array().items(Joi.any()),
|
|
9544
9542
|
|
|
9545
|
-
|
|
9543
|
+
order_type: Joi.string().allow(""),
|
|
9546
9544
|
|
|
9547
|
-
|
|
9545
|
+
fulfilling_store: this.FulfillingStore(),
|
|
9548
9546
|
|
|
9549
|
-
|
|
9547
|
+
track_url: Joi.string().allow(""),
|
|
9548
|
+
|
|
9549
|
+
shipment_created_at: Joi.string().allow(""),
|
|
9550
9550
|
|
|
9551
9551
|
need_help_url: Joi.string().allow(""),
|
|
9552
9552
|
|
|
9553
|
-
|
|
9553
|
+
can_break: Joi.any(),
|
|
9554
9554
|
|
|
9555
|
-
|
|
9555
|
+
dp_name: Joi.string().allow(""),
|
|
9556
9556
|
|
|
9557
|
-
|
|
9557
|
+
user_info: this.ShipmentUserInfo(),
|
|
9558
9558
|
|
|
9559
|
-
|
|
9559
|
+
can_cancel: Joi.boolean(),
|
|
9560
9560
|
|
|
9561
|
-
|
|
9561
|
+
prices: this.Prices(),
|
|
9562
9562
|
|
|
9563
|
-
|
|
9563
|
+
promise: this.Promise(),
|
|
9564
9564
|
|
|
9565
|
-
|
|
9565
|
+
fulfilling_company: this.FulfillingCompany(),
|
|
9566
9566
|
|
|
9567
|
-
|
|
9567
|
+
show_track_link: Joi.boolean(),
|
|
9568
|
+
});
|
|
9569
|
+
}
|
|
9568
9570
|
|
|
9569
|
-
|
|
9571
|
+
static UserInfo() {
|
|
9572
|
+
return Joi.object({
|
|
9573
|
+
email: Joi.string().allow(""),
|
|
9570
9574
|
|
|
9571
|
-
|
|
9575
|
+
gender: Joi.string().allow(""),
|
|
9572
9576
|
|
|
9573
|
-
|
|
9577
|
+
name: Joi.string().allow(""),
|
|
9574
9578
|
|
|
9575
|
-
|
|
9579
|
+
mobile: Joi.string().allow(""),
|
|
9576
9580
|
});
|
|
9577
9581
|
}
|
|
9578
9582
|
|
|
9579
9583
|
static OrderSchema() {
|
|
9580
9584
|
return Joi.object({
|
|
9581
|
-
|
|
9585
|
+
bags_for_reorder: Joi.array().items(this.BagsForReorder()),
|
|
9582
9586
|
|
|
9583
9587
|
breakup_values: Joi.array().items(this.BreakupValues()),
|
|
9584
9588
|
|
|
9585
|
-
|
|
9589
|
+
shipments: Joi.array().items(this.Shipments()),
|
|
9590
|
+
|
|
9591
|
+
total_shipments_in_order: Joi.number(),
|
|
9586
9592
|
|
|
9587
9593
|
user_info: this.UserInfo(),
|
|
9588
9594
|
|
|
9595
|
+
order_created_time: Joi.string().allow(""),
|
|
9596
|
+
|
|
9589
9597
|
order_id: Joi.string().allow(""),
|
|
9598
|
+
});
|
|
9599
|
+
}
|
|
9590
9600
|
|
|
9591
|
-
|
|
9601
|
+
static OrderPage() {
|
|
9602
|
+
return Joi.object({
|
|
9603
|
+
item_total: Joi.number(),
|
|
9592
9604
|
|
|
9593
|
-
|
|
9605
|
+
size: Joi.number(),
|
|
9606
|
+
|
|
9607
|
+
has_next: Joi.boolean(),
|
|
9608
|
+
|
|
9609
|
+
current: Joi.number(),
|
|
9610
|
+
|
|
9611
|
+
type: Joi.string().allow(""),
|
|
9594
9612
|
});
|
|
9595
9613
|
}
|
|
9596
9614
|
|
|
@@ -9610,27 +9628,13 @@ class Validator {
|
|
|
9610
9628
|
});
|
|
9611
9629
|
}
|
|
9612
9630
|
|
|
9613
|
-
static OrderPage() {
|
|
9614
|
-
return Joi.object({
|
|
9615
|
-
size: Joi.number(),
|
|
9616
|
-
|
|
9617
|
-
item_total: Joi.number(),
|
|
9618
|
-
|
|
9619
|
-
current: Joi.number(),
|
|
9620
|
-
|
|
9621
|
-
has_next: Joi.boolean(),
|
|
9622
|
-
|
|
9623
|
-
type: Joi.string().allow(""),
|
|
9624
|
-
});
|
|
9625
|
-
}
|
|
9626
|
-
|
|
9627
9631
|
static OrderList() {
|
|
9628
9632
|
return Joi.object({
|
|
9629
9633
|
items: Joi.array().items(this.OrderSchema()),
|
|
9630
9634
|
|
|
9631
|
-
filters: this.OrderFilters(),
|
|
9632
|
-
|
|
9633
9635
|
page: this.OrderPage(),
|
|
9636
|
+
|
|
9637
|
+
filters: this.OrderFilters(),
|
|
9634
9638
|
});
|
|
9635
9639
|
}
|
|
9636
9640
|
|
|
@@ -9656,33 +9660,33 @@ class Validator {
|
|
|
9656
9660
|
|
|
9657
9661
|
static ResponseGetInvoiceShipment() {
|
|
9658
9662
|
return Joi.object({
|
|
9659
|
-
shipment_id: Joi.string().allow("").required(),
|
|
9660
|
-
|
|
9661
|
-
presigned_type: Joi.string().allow("").required(),
|
|
9662
|
-
|
|
9663
9663
|
success: Joi.boolean().required(),
|
|
9664
9664
|
|
|
9665
|
+
shipment_id: Joi.string().allow("").required(),
|
|
9666
|
+
|
|
9665
9667
|
presigned_url: Joi.string().allow("").required(),
|
|
9668
|
+
|
|
9669
|
+
presigned_type: Joi.string().allow("").required(),
|
|
9666
9670
|
});
|
|
9667
9671
|
}
|
|
9668
9672
|
|
|
9669
9673
|
static Track() {
|
|
9670
9674
|
return Joi.object({
|
|
9671
|
-
|
|
9675
|
+
updated_time: Joi.string().allow(""),
|
|
9672
9676
|
|
|
9673
9677
|
awb: Joi.string().allow(""),
|
|
9674
9678
|
|
|
9675
|
-
|
|
9679
|
+
account_name: Joi.string().allow(""),
|
|
9676
9680
|
|
|
9677
9681
|
updated_at: Joi.string().allow(""),
|
|
9678
9682
|
|
|
9683
|
+
reason: Joi.string().allow(""),
|
|
9684
|
+
|
|
9679
9685
|
status: Joi.string().allow(""),
|
|
9680
9686
|
|
|
9681
|
-
|
|
9687
|
+
shipment_type: Joi.string().allow(""),
|
|
9682
9688
|
|
|
9683
9689
|
last_location_recieved_at: Joi.string().allow(""),
|
|
9684
|
-
|
|
9685
|
-
reason: Joi.string().allow(""),
|
|
9686
9690
|
});
|
|
9687
9691
|
}
|
|
9688
9692
|
|
|
@@ -9694,35 +9698,35 @@ class Validator {
|
|
|
9694
9698
|
|
|
9695
9699
|
static CustomerDetailsResponse() {
|
|
9696
9700
|
return Joi.object({
|
|
9697
|
-
shipment_id: Joi.string().allow(""),
|
|
9698
|
-
|
|
9699
9701
|
name: Joi.string().allow(""),
|
|
9700
9702
|
|
|
9701
|
-
|
|
9703
|
+
shipment_id: Joi.string().allow(""),
|
|
9702
9704
|
|
|
9703
|
-
|
|
9705
|
+
phone: Joi.string().allow(""),
|
|
9704
9706
|
|
|
9705
9707
|
order_id: Joi.string().allow(""),
|
|
9708
|
+
|
|
9709
|
+
country: Joi.string().allow(""),
|
|
9706
9710
|
});
|
|
9707
9711
|
}
|
|
9708
9712
|
|
|
9709
9713
|
static SendOtpToCustomerResponse() {
|
|
9710
9714
|
return Joi.object({
|
|
9711
|
-
request_id: Joi.string().allow(""),
|
|
9712
|
-
|
|
9713
9715
|
success: Joi.boolean(),
|
|
9714
9716
|
|
|
9715
9717
|
resend_timer: Joi.number(),
|
|
9716
9718
|
|
|
9717
9719
|
message: Joi.string().allow(""),
|
|
9720
|
+
|
|
9721
|
+
request_id: Joi.string().allow(""),
|
|
9718
9722
|
});
|
|
9719
9723
|
}
|
|
9720
9724
|
|
|
9721
9725
|
static VerifyOtp() {
|
|
9722
9726
|
return Joi.object({
|
|
9723
|
-
request_id: Joi.string().allow(""),
|
|
9724
|
-
|
|
9725
9727
|
otp_code: Joi.string().allow(""),
|
|
9728
|
+
|
|
9729
|
+
request_id: Joi.string().allow(""),
|
|
9726
9730
|
});
|
|
9727
9731
|
}
|
|
9728
9732
|
|
|
@@ -9740,9 +9744,9 @@ class Validator {
|
|
|
9740
9744
|
|
|
9741
9745
|
static QuestionSet() {
|
|
9742
9746
|
return Joi.object({
|
|
9743
|
-
id: Joi.number(),
|
|
9744
|
-
|
|
9745
9747
|
display_name: Joi.string().allow(""),
|
|
9748
|
+
|
|
9749
|
+
id: Joi.number(),
|
|
9746
9750
|
});
|
|
9747
9751
|
}
|
|
9748
9752
|
|
|
@@ -9750,15 +9754,15 @@ class Validator {
|
|
|
9750
9754
|
return Joi.object({
|
|
9751
9755
|
id: Joi.number(),
|
|
9752
9756
|
|
|
9753
|
-
|
|
9757
|
+
meta: this.BagReasonMeta(),
|
|
9758
|
+
|
|
9759
|
+
display_name: Joi.string().allow(""),
|
|
9754
9760
|
|
|
9755
9761
|
reasons: Joi.array().items(this.BagReasons()),
|
|
9756
9762
|
|
|
9757
|
-
|
|
9763
|
+
qc_type: Joi.array().items(Joi.string().allow("")),
|
|
9758
9764
|
|
|
9759
9765
|
question_set: Joi.array().items(this.QuestionSet()),
|
|
9760
|
-
|
|
9761
|
-
display_name: Joi.string().allow(""),
|
|
9762
9766
|
});
|
|
9763
9767
|
}
|
|
9764
9768
|
|
|
@@ -9772,15 +9776,15 @@ class Validator {
|
|
|
9772
9776
|
|
|
9773
9777
|
static ShipmentReason() {
|
|
9774
9778
|
return Joi.object({
|
|
9775
|
-
|
|
9779
|
+
show_text_area: Joi.boolean(),
|
|
9776
9780
|
|
|
9777
9781
|
reason_id: Joi.number(),
|
|
9778
9782
|
|
|
9779
|
-
priority: Joi.number(),
|
|
9780
|
-
|
|
9781
9783
|
flow: Joi.string().allow(""),
|
|
9782
9784
|
|
|
9783
|
-
|
|
9785
|
+
reason_text: Joi.string().allow(""),
|
|
9786
|
+
|
|
9787
|
+
priority: Joi.number(),
|
|
9784
9788
|
|
|
9785
9789
|
feedback_type: Joi.string().allow(""),
|
|
9786
9790
|
});
|
|
@@ -9792,131 +9796,131 @@ class Validator {
|
|
|
9792
9796
|
});
|
|
9793
9797
|
}
|
|
9794
9798
|
|
|
9795
|
-
static
|
|
9799
|
+
static ProductsReasonsData() {
|
|
9796
9800
|
return Joi.object({
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
identifier: Joi.string().allow(""),
|
|
9801
|
+
reason_id: Joi.number(),
|
|
9800
9802
|
|
|
9801
|
-
|
|
9803
|
+
reason_text: Joi.string().allow(""),
|
|
9802
9804
|
});
|
|
9803
9805
|
}
|
|
9804
9806
|
|
|
9805
|
-
static
|
|
9807
|
+
static ProductsReasonsFilters() {
|
|
9806
9808
|
return Joi.object({
|
|
9809
|
+
quantity: Joi.number(),
|
|
9810
|
+
|
|
9807
9811
|
line_number: Joi.number(),
|
|
9808
9812
|
|
|
9809
9813
|
identifier: Joi.string().allow(""),
|
|
9810
9814
|
});
|
|
9811
9815
|
}
|
|
9812
9816
|
|
|
9813
|
-
static
|
|
9817
|
+
static ProductsReasons() {
|
|
9814
9818
|
return Joi.object({
|
|
9815
|
-
|
|
9819
|
+
data: this.ProductsReasonsData(),
|
|
9816
9820
|
|
|
9817
|
-
|
|
9821
|
+
filters: Joi.array().items(this.ProductsReasonsFilters()),
|
|
9818
9822
|
});
|
|
9819
9823
|
}
|
|
9820
9824
|
|
|
9821
|
-
static
|
|
9825
|
+
static EntityReasonData() {
|
|
9822
9826
|
return Joi.object({
|
|
9823
|
-
|
|
9827
|
+
reason_id: Joi.number(),
|
|
9824
9828
|
|
|
9825
|
-
|
|
9829
|
+
reason_text: Joi.string().allow(""),
|
|
9826
9830
|
});
|
|
9827
9831
|
}
|
|
9828
9832
|
|
|
9829
|
-
static
|
|
9833
|
+
static EntitiesReasons() {
|
|
9830
9834
|
return Joi.object({
|
|
9831
|
-
|
|
9835
|
+
data: this.EntityReasonData(),
|
|
9832
9836
|
|
|
9833
|
-
|
|
9837
|
+
filters: Joi.array().items(Joi.any()),
|
|
9834
9838
|
});
|
|
9835
9839
|
}
|
|
9836
9840
|
|
|
9837
|
-
static
|
|
9841
|
+
static ReasonsData() {
|
|
9838
9842
|
return Joi.object({
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
identifier: Joi.string().allow(""),
|
|
9843
|
+
products: Joi.array().items(this.ProductsReasons()),
|
|
9842
9844
|
|
|
9843
|
-
|
|
9845
|
+
entities: Joi.array().items(this.EntitiesReasons()),
|
|
9844
9846
|
});
|
|
9845
9847
|
}
|
|
9846
9848
|
|
|
9847
|
-
static
|
|
9849
|
+
static Products() {
|
|
9848
9850
|
return Joi.object({
|
|
9849
|
-
|
|
9851
|
+
quantity: Joi.number(),
|
|
9850
9852
|
|
|
9851
|
-
|
|
9853
|
+
line_number: Joi.number(),
|
|
9854
|
+
|
|
9855
|
+
identifier: Joi.string().allow(""),
|
|
9852
9856
|
});
|
|
9853
9857
|
}
|
|
9854
9858
|
|
|
9855
|
-
static
|
|
9859
|
+
static ProductsDataUpdatesFilters() {
|
|
9856
9860
|
return Joi.object({
|
|
9857
|
-
|
|
9861
|
+
line_number: Joi.number(),
|
|
9858
9862
|
|
|
9859
|
-
|
|
9863
|
+
identifier: Joi.string().allow(""),
|
|
9860
9864
|
});
|
|
9861
9865
|
}
|
|
9862
9866
|
|
|
9863
|
-
static
|
|
9867
|
+
static ProductsDataUpdates() {
|
|
9864
9868
|
return Joi.object({
|
|
9865
|
-
|
|
9869
|
+
data: Joi.any(),
|
|
9866
9870
|
|
|
9867
|
-
|
|
9871
|
+
filters: Joi.array().items(this.ProductsDataUpdatesFilters()),
|
|
9868
9872
|
});
|
|
9869
9873
|
}
|
|
9870
9874
|
|
|
9871
|
-
static
|
|
9875
|
+
static EntitiesDataUpdates() {
|
|
9872
9876
|
return Joi.object({
|
|
9873
|
-
|
|
9877
|
+
data: Joi.any(),
|
|
9874
9878
|
|
|
9875
|
-
|
|
9879
|
+
filters: Joi.array().items(Joi.any()),
|
|
9876
9880
|
});
|
|
9877
9881
|
}
|
|
9878
9882
|
|
|
9879
|
-
static
|
|
9883
|
+
static DataUpdates() {
|
|
9880
9884
|
return Joi.object({
|
|
9881
|
-
products: Joi.array().items(this.
|
|
9885
|
+
products: Joi.array().items(this.ProductsDataUpdates()),
|
|
9882
9886
|
|
|
9883
|
-
entities: Joi.array().items(this.
|
|
9887
|
+
entities: Joi.array().items(this.EntitiesDataUpdates()),
|
|
9884
9888
|
});
|
|
9885
9889
|
}
|
|
9886
9890
|
|
|
9887
9891
|
static ShipmentsRequest() {
|
|
9888
9892
|
return Joi.object({
|
|
9893
|
+
reasons: this.ReasonsData(),
|
|
9894
|
+
|
|
9889
9895
|
products: Joi.array().items(this.Products()),
|
|
9890
9896
|
|
|
9891
9897
|
data_updates: this.DataUpdates(),
|
|
9892
9898
|
|
|
9893
9899
|
identifier: Joi.string().allow("").required(),
|
|
9894
|
-
|
|
9895
|
-
reasons: this.ReasonsData(),
|
|
9896
9900
|
});
|
|
9897
9901
|
}
|
|
9898
9902
|
|
|
9899
9903
|
static StatuesRequest() {
|
|
9900
9904
|
return Joi.object({
|
|
9905
|
+
status: Joi.string().allow(""),
|
|
9906
|
+
|
|
9901
9907
|
shipments: Joi.array().items(this.ShipmentsRequest()),
|
|
9902
9908
|
|
|
9903
9909
|
exclude_bags_next_state: Joi.string().allow(""),
|
|
9904
|
-
|
|
9905
|
-
status: Joi.string().allow(""),
|
|
9906
9910
|
});
|
|
9907
9911
|
}
|
|
9908
9912
|
|
|
9909
9913
|
static UpdateShipmentStatusRequest() {
|
|
9910
9914
|
return Joi.object({
|
|
9911
|
-
|
|
9915
|
+
force_transition: Joi.boolean(),
|
|
9912
9916
|
|
|
9913
|
-
|
|
9917
|
+
task: Joi.boolean(),
|
|
9914
9918
|
|
|
9915
|
-
|
|
9919
|
+
lock_after_transition: Joi.boolean(),
|
|
9916
9920
|
|
|
9917
|
-
|
|
9921
|
+
unlock_before_transition: Joi.boolean(),
|
|
9918
9922
|
|
|
9919
|
-
|
|
9923
|
+
statuses: Joi.array().items(this.StatuesRequest()),
|
|
9920
9924
|
});
|
|
9921
9925
|
}
|
|
9922
9926
|
|
|
@@ -10176,11 +10180,11 @@ class Validator {
|
|
|
10176
10180
|
|
|
10177
10181
|
static UpdateCartShipmentItem() {
|
|
10178
10182
|
return Joi.object({
|
|
10179
|
-
|
|
10183
|
+
quantity: Joi.number(),
|
|
10180
10184
|
|
|
10181
10185
|
shipment_type: Joi.string().allow("").required(),
|
|
10182
10186
|
|
|
10183
|
-
|
|
10187
|
+
article_uid: Joi.string().allow("").required(),
|
|
10184
10188
|
});
|
|
10185
10189
|
}
|
|
10186
10190
|
|
|
@@ -10200,43 +10204,43 @@ class Validator {
|
|
|
10200
10204
|
|
|
10201
10205
|
static CartPosCheckoutDetailRequest() {
|
|
10202
10206
|
return Joi.object({
|
|
10207
|
+
payment_mode: Joi.string().allow("").required(),
|
|
10208
|
+
|
|
10203
10209
|
aggregator: Joi.string().allow(""),
|
|
10204
10210
|
|
|
10205
|
-
|
|
10211
|
+
pick_at_store_uid: Joi.number().allow(null),
|
|
10206
10212
|
|
|
10207
|
-
|
|
10213
|
+
extra_meta: Joi.any(),
|
|
10208
10214
|
|
|
10209
|
-
|
|
10215
|
+
files: Joi.array().items(this.Files()),
|
|
10210
10216
|
|
|
10211
|
-
|
|
10217
|
+
payment_params: Joi.any().allow(null),
|
|
10212
10218
|
|
|
10213
|
-
|
|
10219
|
+
billing_address_id: Joi.string().allow(""),
|
|
10214
10220
|
|
|
10215
10221
|
ordering_store: Joi.number().allow(null),
|
|
10216
10222
|
|
|
10217
|
-
|
|
10223
|
+
merchant_code: Joi.string().allow(""),
|
|
10218
10224
|
|
|
10219
|
-
|
|
10225
|
+
meta: Joi.any(),
|
|
10220
10226
|
|
|
10221
|
-
|
|
10227
|
+
address_id: Joi.string().allow(""),
|
|
10222
10228
|
|
|
10223
|
-
|
|
10229
|
+
payment_auto_confirm: Joi.boolean(),
|
|
10224
10230
|
|
|
10225
|
-
|
|
10231
|
+
staff: this.StaffCheckout(),
|
|
10226
10232
|
|
|
10227
10233
|
billing_address: Joi.any(),
|
|
10228
10234
|
|
|
10229
|
-
|
|
10235
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
10230
10236
|
|
|
10231
|
-
|
|
10237
|
+
pos: Joi.boolean(),
|
|
10232
10238
|
|
|
10233
|
-
|
|
10239
|
+
order_type: Joi.string().allow("").required(),
|
|
10234
10240
|
|
|
10235
|
-
|
|
10241
|
+
delivery_address: Joi.any(),
|
|
10236
10242
|
|
|
10237
10243
|
callback_url: Joi.string().allow("").allow(null),
|
|
10238
|
-
|
|
10239
|
-
payment_identifier: Joi.string().allow("").allow(null),
|
|
10240
10244
|
});
|
|
10241
10245
|
}
|
|
10242
10246
|
|
|
@@ -10250,37 +10254,37 @@ class Validator {
|
|
|
10250
10254
|
|
|
10251
10255
|
static PickupStoreDetail() {
|
|
10252
10256
|
return Joi.object({
|
|
10257
|
+
city: Joi.string().allow(""),
|
|
10258
|
+
|
|
10253
10259
|
area_code: Joi.string().allow(""),
|
|
10254
10260
|
|
|
10255
|
-
|
|
10261
|
+
name: Joi.string().allow(""),
|
|
10256
10262
|
|
|
10257
10263
|
pincode: Joi.number(),
|
|
10258
10264
|
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
store_code: Joi.string().allow(""),
|
|
10262
|
-
|
|
10263
|
-
area_code_slug: Joi.string().allow(""),
|
|
10264
|
-
|
|
10265
|
-
name: Joi.string().allow(""),
|
|
10265
|
+
address: Joi.string().allow(""),
|
|
10266
10266
|
|
|
10267
|
-
|
|
10267
|
+
address_type: Joi.string().allow(""),
|
|
10268
10268
|
|
|
10269
|
-
|
|
10269
|
+
landmark: Joi.string().allow(""),
|
|
10270
10270
|
|
|
10271
10271
|
country: Joi.string().allow(""),
|
|
10272
10272
|
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
email: Joi.string().allow(""),
|
|
10273
|
+
uid: Joi.number(),
|
|
10276
10274
|
|
|
10277
10275
|
area: Joi.string().allow(""),
|
|
10278
10276
|
|
|
10277
|
+
id: Joi.number(),
|
|
10278
|
+
|
|
10279
|
+
store_code: Joi.string().allow(""),
|
|
10280
|
+
|
|
10279
10281
|
phone: Joi.string().allow(""),
|
|
10280
10282
|
|
|
10281
|
-
|
|
10283
|
+
state: Joi.string().allow(""),
|
|
10282
10284
|
|
|
10283
|
-
|
|
10285
|
+
area_code_slug: Joi.string().allow(""),
|
|
10286
|
+
|
|
10287
|
+
email: Joi.string().allow(""),
|
|
10284
10288
|
});
|
|
10285
10289
|
}
|
|
10286
10290
|
|
|
@@ -10290,195 +10294,281 @@ class Validator {
|
|
|
10290
10294
|
});
|
|
10291
10295
|
}
|
|
10292
10296
|
|
|
10293
|
-
static
|
|
10297
|
+
static PincodeErrorSchemaResponse() {
|
|
10294
10298
|
return Joi.object({
|
|
10295
|
-
|
|
10296
|
-
|
|
10297
|
-
stormbreaker_uuid: Joi.string().allow("").required(),
|
|
10299
|
+
message: Joi.string().allow("").allow(null),
|
|
10298
10300
|
|
|
10299
|
-
|
|
10301
|
+
value: Joi.string().allow("").allow(null),
|
|
10300
10302
|
|
|
10301
|
-
|
|
10303
|
+
type: Joi.string().allow("").allow(null),
|
|
10302
10304
|
});
|
|
10303
10305
|
}
|
|
10304
10306
|
|
|
10305
|
-
static
|
|
10307
|
+
static PincodeParentsResponse() {
|
|
10306
10308
|
return Joi.object({
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
parents: Joi.array().items(this.LogisticParents()),
|
|
10309
|
+
name: Joi.string().allow(""),
|
|
10310
10310
|
|
|
10311
10311
|
sub_type: Joi.string().allow(""),
|
|
10312
10312
|
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
error: this.LogisticError(),
|
|
10313
|
+
display_name: Joi.string().allow(""),
|
|
10316
10314
|
|
|
10317
10315
|
uid: Joi.string().allow(""),
|
|
10316
|
+
});
|
|
10317
|
+
}
|
|
10318
10318
|
|
|
10319
|
-
|
|
10319
|
+
static CountryMetaResponse() {
|
|
10320
|
+
return Joi.object({
|
|
10321
|
+
isd_code: Joi.string().allow(""),
|
|
10322
|
+
|
|
10323
|
+
country_code: Joi.string().allow(""),
|
|
10320
10324
|
});
|
|
10321
10325
|
}
|
|
10322
10326
|
|
|
10323
|
-
static
|
|
10327
|
+
static PincodeMetaResponse() {
|
|
10324
10328
|
return Joi.object({
|
|
10325
|
-
|
|
10329
|
+
internal_zone_id: Joi.number(),
|
|
10326
10330
|
|
|
10327
|
-
|
|
10331
|
+
zone: Joi.string().allow(""),
|
|
10328
10332
|
});
|
|
10329
10333
|
}
|
|
10330
10334
|
|
|
10331
|
-
static
|
|
10335
|
+
static PincodeDataResponse() {
|
|
10332
10336
|
return Joi.object({
|
|
10337
|
+
parents: Joi.array().items(this.PincodeParentsResponse()),
|
|
10338
|
+
|
|
10333
10339
|
sub_type: Joi.string().allow(""),
|
|
10334
10340
|
|
|
10341
|
+
display_name: Joi.string().allow(""),
|
|
10342
|
+
|
|
10343
|
+
meta_code: this.CountryMetaResponse(),
|
|
10344
|
+
|
|
10335
10345
|
name: Joi.string().allow(""),
|
|
10336
10346
|
|
|
10337
|
-
|
|
10347
|
+
error: this.PincodeErrorSchemaResponse().required(),
|
|
10348
|
+
|
|
10349
|
+
meta: this.PincodeMetaResponse(),
|
|
10338
10350
|
|
|
10339
10351
|
uid: Joi.string().allow(""),
|
|
10340
10352
|
});
|
|
10341
10353
|
}
|
|
10342
10354
|
|
|
10343
|
-
static
|
|
10355
|
+
static PincodeApiResponse() {
|
|
10344
10356
|
return Joi.object({
|
|
10345
|
-
|
|
10357
|
+
error: this.PincodeErrorSchemaResponse().required(),
|
|
10346
10358
|
|
|
10347
|
-
|
|
10359
|
+
data: Joi.array().items(this.PincodeDataResponse()),
|
|
10348
10360
|
|
|
10349
|
-
|
|
10361
|
+
success: Joi.boolean().required(),
|
|
10350
10362
|
});
|
|
10351
10363
|
}
|
|
10352
10364
|
|
|
10353
|
-
static
|
|
10365
|
+
static TATCategoryRequest() {
|
|
10354
10366
|
return Joi.object({
|
|
10355
|
-
|
|
10367
|
+
id: Joi.number(),
|
|
10356
10368
|
|
|
10357
|
-
|
|
10369
|
+
level: Joi.string().allow(""),
|
|
10358
10370
|
});
|
|
10359
10371
|
}
|
|
10360
10372
|
|
|
10361
|
-
static
|
|
10373
|
+
static TATArticlesRequest() {
|
|
10362
10374
|
return Joi.object({
|
|
10363
|
-
|
|
10375
|
+
manufacturing_time: Joi.number(),
|
|
10364
10376
|
|
|
10365
|
-
|
|
10377
|
+
manufacturing_time_unit: Joi.string().allow(""),
|
|
10378
|
+
|
|
10379
|
+
category: this.TATCategoryRequest(),
|
|
10366
10380
|
});
|
|
10367
10381
|
}
|
|
10368
10382
|
|
|
10369
|
-
static
|
|
10383
|
+
static TATLocationDetailsRequest() {
|
|
10370
10384
|
return Joi.object({
|
|
10371
|
-
|
|
10385
|
+
articles: Joi.array().items(this.TATArticlesRequest()),
|
|
10372
10386
|
|
|
10373
|
-
|
|
10387
|
+
fulfillment_id: Joi.number(),
|
|
10374
10388
|
|
|
10375
|
-
|
|
10389
|
+
from_pincode: Joi.string().allow(""),
|
|
10376
10390
|
});
|
|
10377
10391
|
}
|
|
10378
10392
|
|
|
10379
|
-
static
|
|
10393
|
+
static TATViewRequest() {
|
|
10380
10394
|
return Joi.object({
|
|
10381
|
-
|
|
10395
|
+
source: Joi.string().allow(""),
|
|
10396
|
+
|
|
10397
|
+
action: Joi.string().allow(""),
|
|
10382
10398
|
|
|
10383
|
-
|
|
10399
|
+
journey: Joi.string().allow(""),
|
|
10384
10400
|
|
|
10385
|
-
|
|
10401
|
+
to_pincode: Joi.string().allow(""),
|
|
10402
|
+
|
|
10403
|
+
location_details: Joi.array().items(this.TATLocationDetailsRequest()),
|
|
10404
|
+
|
|
10405
|
+
identifier: Joi.string().allow(""),
|
|
10386
10406
|
});
|
|
10387
10407
|
}
|
|
10388
10408
|
|
|
10389
|
-
static
|
|
10409
|
+
static TATErrorSchemaResponse() {
|
|
10390
10410
|
return Joi.object({
|
|
10391
|
-
|
|
10411
|
+
message: Joi.string().allow("").allow(null),
|
|
10392
10412
|
|
|
10393
|
-
|
|
10413
|
+
value: Joi.string().allow("").allow(null),
|
|
10394
10414
|
|
|
10395
|
-
|
|
10415
|
+
type: Joi.string().allow("").allow(null),
|
|
10396
10416
|
});
|
|
10397
10417
|
}
|
|
10398
10418
|
|
|
10399
|
-
static
|
|
10419
|
+
static TATFormattedResponse() {
|
|
10400
10420
|
return Joi.object({
|
|
10401
|
-
|
|
10421
|
+
min: Joi.string().allow(""),
|
|
10402
10422
|
|
|
10403
|
-
|
|
10423
|
+
max: Joi.string().allow(""),
|
|
10404
10424
|
});
|
|
10405
10425
|
}
|
|
10406
10426
|
|
|
10407
|
-
static
|
|
10427
|
+
static TATTimestampResponse() {
|
|
10408
10428
|
return Joi.object({
|
|
10409
|
-
|
|
10429
|
+
min: Joi.number(),
|
|
10410
10430
|
|
|
10411
|
-
|
|
10431
|
+
max: Joi.number(),
|
|
10432
|
+
});
|
|
10433
|
+
}
|
|
10412
10434
|
|
|
10413
|
-
|
|
10435
|
+
static TATPromiseResponse() {
|
|
10436
|
+
return Joi.object({
|
|
10437
|
+
formatted: this.TATFormattedResponse(),
|
|
10414
10438
|
|
|
10415
|
-
|
|
10439
|
+
timestamp: this.TATTimestampResponse(),
|
|
10440
|
+
});
|
|
10441
|
+
}
|
|
10416
10442
|
|
|
10417
|
-
|
|
10443
|
+
static TATArticlesResponse() {
|
|
10444
|
+
return Joi.object({
|
|
10445
|
+
is_cod_available: Joi.boolean(),
|
|
10418
10446
|
|
|
10419
|
-
|
|
10447
|
+
error: this.TATErrorSchemaResponse(),
|
|
10420
10448
|
|
|
10421
|
-
|
|
10449
|
+
manufacturing_time_unit: Joi.string().allow(""),
|
|
10422
10450
|
|
|
10423
|
-
|
|
10451
|
+
_manufacturing_time_seconds: Joi.number(),
|
|
10424
10452
|
|
|
10425
|
-
|
|
10453
|
+
promise: this.TATPromiseResponse(),
|
|
10426
10454
|
|
|
10427
|
-
|
|
10455
|
+
manufacturing_time: Joi.number(),
|
|
10428
10456
|
|
|
10429
|
-
|
|
10457
|
+
category: this.TATCategoryRequest(),
|
|
10430
10458
|
});
|
|
10431
10459
|
}
|
|
10432
10460
|
|
|
10433
|
-
static
|
|
10461
|
+
static TATLocationDetailsResponse() {
|
|
10434
10462
|
return Joi.object({
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
articles: Joi.array().items(this.TatProductArticles()),
|
|
10463
|
+
articles: Joi.array().items(this.TATArticlesResponse()),
|
|
10438
10464
|
|
|
10439
10465
|
fulfillment_id: Joi.number(),
|
|
10466
|
+
|
|
10467
|
+
from_pincode: Joi.string().allow(""),
|
|
10440
10468
|
});
|
|
10441
10469
|
}
|
|
10442
10470
|
|
|
10443
|
-
static
|
|
10471
|
+
static TATViewResponse() {
|
|
10444
10472
|
return Joi.object({
|
|
10445
|
-
|
|
10473
|
+
to_city: Joi.string().allow(""),
|
|
10474
|
+
|
|
10475
|
+
source: Joi.string().allow(""),
|
|
10476
|
+
|
|
10477
|
+
stormbreaker_uuid: Joi.string().allow(""),
|
|
10478
|
+
|
|
10479
|
+
action: Joi.string().allow(""),
|
|
10480
|
+
|
|
10481
|
+
journey: Joi.string().allow(""),
|
|
10482
|
+
|
|
10483
|
+
to_pincode: Joi.string().allow(""),
|
|
10446
10484
|
|
|
10447
|
-
|
|
10485
|
+
error: this.TATErrorSchemaResponse(),
|
|
10448
10486
|
|
|
10449
|
-
|
|
10487
|
+
location_details: Joi.array().items(this.TATLocationDetailsResponse()),
|
|
10488
|
+
|
|
10489
|
+
is_cod_available: Joi.boolean(),
|
|
10490
|
+
|
|
10491
|
+
identifier: Joi.string().allow(""),
|
|
10492
|
+
|
|
10493
|
+
payment_mode: Joi.string().allow(""),
|
|
10494
|
+
|
|
10495
|
+
success: Joi.boolean(),
|
|
10496
|
+
|
|
10497
|
+
request_uuid: Joi.string().allow(""),
|
|
10450
10498
|
});
|
|
10451
10499
|
}
|
|
10452
10500
|
|
|
10453
|
-
static
|
|
10501
|
+
static DP() {
|
|
10454
10502
|
return Joi.object({
|
|
10455
|
-
|
|
10503
|
+
fm_priority: Joi.number().required(),
|
|
10456
10504
|
|
|
10457
|
-
|
|
10505
|
+
lm_priority: Joi.number().required(),
|
|
10506
|
+
|
|
10507
|
+
rvp_priority: Joi.number().required(),
|
|
10508
|
+
|
|
10509
|
+
payment_mode: Joi.string().allow("").required(),
|
|
10510
|
+
|
|
10511
|
+
operations: Joi.array().items(Joi.string().allow("")).required(),
|
|
10512
|
+
|
|
10513
|
+
area_code: Joi.string().allow("").allow(null),
|
|
10514
|
+
|
|
10515
|
+
assign_dp_from_sb: Joi.boolean(),
|
|
10516
|
+
|
|
10517
|
+
internal_account_id: Joi.string().allow(""),
|
|
10518
|
+
|
|
10519
|
+
external_account_id: Joi.string().allow("").allow(null),
|
|
10520
|
+
|
|
10521
|
+
transport_mode: Joi.string().allow(""),
|
|
10522
|
+
});
|
|
10523
|
+
}
|
|
10524
|
+
|
|
10525
|
+
static LogisticsResponse() {
|
|
10526
|
+
return Joi.object({
|
|
10527
|
+
dp: Joi.object().pattern(/\S/, this.DP()),
|
|
10458
10528
|
});
|
|
10459
10529
|
}
|
|
10460
10530
|
|
|
10461
|
-
static
|
|
10531
|
+
static CountryEntityResponse() {
|
|
10462
10532
|
return Joi.object({
|
|
10463
|
-
|
|
10533
|
+
sub_type: Joi.string().allow(""),
|
|
10534
|
+
|
|
10535
|
+
display_name: Joi.string().allow(""),
|
|
10536
|
+
|
|
10537
|
+
logistics: this.LogisticsResponse(),
|
|
10538
|
+
|
|
10539
|
+
is_active: Joi.boolean(),
|
|
10540
|
+
|
|
10541
|
+
name: Joi.string().allow(""),
|
|
10542
|
+
|
|
10543
|
+
parent_id: Joi.string().allow(""),
|
|
10464
10544
|
|
|
10465
|
-
|
|
10545
|
+
type: Joi.string().allow(""),
|
|
10546
|
+
|
|
10547
|
+
meta: this.CountryMetaResponse(),
|
|
10548
|
+
|
|
10549
|
+
uid: Joi.string().allow(""),
|
|
10466
10550
|
});
|
|
10467
10551
|
}
|
|
10468
10552
|
|
|
10469
|
-
static
|
|
10553
|
+
static CountryListResponse() {
|
|
10470
10554
|
return Joi.object({
|
|
10471
|
-
|
|
10555
|
+
results: Joi.array().items(this.CountryEntityResponse()),
|
|
10556
|
+
});
|
|
10557
|
+
}
|
|
10472
10558
|
|
|
10473
|
-
|
|
10559
|
+
static GetZoneFromPincodeViewRequest() {
|
|
10560
|
+
return Joi.object({
|
|
10561
|
+
country: Joi.string().allow("").required(),
|
|
10562
|
+
|
|
10563
|
+
pincode: Joi.string().allow("").required(),
|
|
10474
10564
|
});
|
|
10475
10565
|
}
|
|
10476
10566
|
|
|
10477
|
-
static
|
|
10567
|
+
static GetZoneFromPincodeViewResponse() {
|
|
10478
10568
|
return Joi.object({
|
|
10479
|
-
|
|
10569
|
+
zones: Joi.array().items(Joi.string().allow("")).required(),
|
|
10480
10570
|
|
|
10481
|
-
|
|
10571
|
+
serviceability_type: Joi.string().allow("").required(),
|
|
10482
10572
|
});
|
|
10483
10573
|
}
|
|
10484
10574
|
}
|
|
@@ -10486,8 +10576,9 @@ class Validator {
|
|
|
10486
10576
|
class LocationValidator {
|
|
10487
10577
|
static validateLocationObj() {
|
|
10488
10578
|
return Joi.object({
|
|
10489
|
-
pincode: Joi.string()
|
|
10490
|
-
country: Joi.string()
|
|
10579
|
+
pincode: Joi.string(),
|
|
10580
|
+
country: Joi.string(),
|
|
10581
|
+
country_iso_code: Joi.string(),
|
|
10491
10582
|
city: Joi.string(),
|
|
10492
10583
|
location: Joi.object({
|
|
10493
10584
|
longitude: Joi.string(),
|