@gofynd/fdk-client-javascript 1.4.0-beta.1 → 1.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationModel.d.ts +2 -0
- package/sdk/application/Cart/CartApplicationModel.js +2 -0
- package/sdk/application/Order/OrderApplicationModel.d.ts +2 -0
- package/sdk/application/Order/OrderApplicationModel.js +2 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +185 -315
- package/sdk/partner/Theme/ThemePartnerModel.js +182 -222
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -12
- package/sdk/platform/Catalog/CatalogPlatformClient.js +17 -87
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +11 -25
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +4 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +4 -1
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +2 -0
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +2 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -44
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +120 -54
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -12
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -85
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -12
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -14
- package/sdk/platform/Order/OrderPlatformClient.d.ts +11 -61
- package/sdk/platform/Order/OrderPlatformClient.js +87 -481
- package/sdk/platform/Order/OrderPlatformModel.d.ts +442 -171
- package/sdk/platform/Order/OrderPlatformModel.js +483 -169
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +22 -69
- package/sdk/platform/Order/OrderPlatformValidator.js +17 -79
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -21
- package/sdk/platform/Theme/ThemePlatformModel.js +108 -20
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +2 -2
- package/sdk/platform/Webhook/WebhookPlatformClient.js +4 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +21 -27
- package/sdk/platform/Webhook/WebhookPlatformModel.js +30 -27
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {
|
|
6
|
-
* @property {
|
|
7
|
-
* @property {
|
|
4
|
+
* @typedef Action
|
|
5
|
+
* @property {ActionPage} [page]
|
|
6
|
+
* @property {ActionPage} [popup]
|
|
7
|
+
* @property {string} [type]
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @typedef ActionPage
|
|
12
|
+
* @property {Object} [params]
|
|
13
|
+
* @property {Object} [query]
|
|
14
|
+
* @property {string} [type]
|
|
15
|
+
* @property {string} [url]
|
|
8
16
|
*/
|
|
9
17
|
|
|
10
18
|
/**
|
|
@@ -20,16 +28,20 @@ const Joi = require("joi");
|
|
|
20
28
|
*/
|
|
21
29
|
|
|
22
30
|
/**
|
|
23
|
-
* @typedef
|
|
24
|
-
* @property {boolean} [
|
|
25
|
-
* @property {boolean} [
|
|
31
|
+
* @typedef AvailablePagePlatformPredicate
|
|
32
|
+
* @property {boolean} [android] - Section visibility on android platform
|
|
33
|
+
* @property {boolean} [ios] - Section visibility on ios platform
|
|
34
|
+
* @property {boolean} [web] - Section visibility on web platform
|
|
26
35
|
*/
|
|
27
36
|
|
|
28
37
|
/**
|
|
29
38
|
* @typedef AvailablePagePredicate
|
|
39
|
+
* @property {AvailablePagePlatformPredicate} [platform]
|
|
30
40
|
* @property {AvailablePageRoutePredicate} [route]
|
|
41
|
+
* @property {AvailablePageSchedulePredicate} [schedule]
|
|
31
42
|
* @property {AvailablePageScreenPredicate} [screen]
|
|
32
43
|
* @property {AvailablePageUserPredicate} [user]
|
|
44
|
+
* @property {string[]} [zones] - An array of zone ids associated with the section
|
|
33
45
|
*/
|
|
34
46
|
|
|
35
47
|
/**
|
|
@@ -39,9 +51,17 @@ const Joi = require("joi");
|
|
|
39
51
|
* @property {string} [selected]
|
|
40
52
|
*/
|
|
41
53
|
|
|
54
|
+
/**
|
|
55
|
+
* @typedef AvailablePageSchedulePredicate
|
|
56
|
+
* @property {string} [cron]
|
|
57
|
+
* @property {string} [end]
|
|
58
|
+
* @property {string} [start]
|
|
59
|
+
*/
|
|
60
|
+
|
|
42
61
|
/**
|
|
43
62
|
* @typedef AvailablePageSchema
|
|
44
63
|
* @property {string} [_id]
|
|
64
|
+
* @property {string} [created_at] - The creation timestamp of the page
|
|
45
65
|
* @property {string} [path]
|
|
46
66
|
* @property {Object[]} [props]
|
|
47
67
|
* @property {AvailablePageSchemaSections[]} [sections]
|
|
@@ -50,6 +70,7 @@ const Joi = require("joi");
|
|
|
50
70
|
* @property {string} [text]
|
|
51
71
|
* @property {string} [theme]
|
|
52
72
|
* @property {string} [type]
|
|
73
|
+
* @property {string} [updated_at] - The last update timestamp of the page
|
|
53
74
|
* @property {string} [value]
|
|
54
75
|
*/
|
|
55
76
|
|
|
@@ -61,6 +82,7 @@ const Joi = require("joi");
|
|
|
61
82
|
* @property {AvailablePagePredicate} [predicate]
|
|
62
83
|
* @property {Object} [preset]
|
|
63
84
|
* @property {Object} [props]
|
|
85
|
+
* @property {string} [source]
|
|
64
86
|
*/
|
|
65
87
|
|
|
66
88
|
/**
|
|
@@ -78,7 +100,10 @@ const Joi = require("joi");
|
|
|
78
100
|
/**
|
|
79
101
|
* @typedef AvailablePageSeo
|
|
80
102
|
* @property {string} [_id]
|
|
103
|
+
* @property {SEObreadcrumb[]} [breadcrumb]
|
|
81
104
|
* @property {string} [description]
|
|
105
|
+
* @property {SEOMetaItem[]} [meta_tags]
|
|
106
|
+
* @property {SEOSitemap} [sitemap]
|
|
82
107
|
* @property {string} [title]
|
|
83
108
|
*/
|
|
84
109
|
|
|
@@ -111,13 +136,6 @@ const Joi = require("joi");
|
|
|
111
136
|
* @property {UrlProp} [slide_link]
|
|
112
137
|
*/
|
|
113
138
|
|
|
114
|
-
/**
|
|
115
|
-
* @typedef ButtonSetting
|
|
116
|
-
* @property {string} [button_link] - The button link color
|
|
117
|
-
* @property {string} [button_primary] - The primary button color
|
|
118
|
-
* @property {string} [button_secondary] - The secondary button color
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
139
|
/**
|
|
122
140
|
* @typedef CarouselItem
|
|
123
141
|
* @property {string} [desktop] - Desktop carousel image URL
|
|
@@ -136,16 +154,6 @@ const Joi = require("joi");
|
|
|
136
154
|
* @property {boolean} [value] - The value of the checkbox property.
|
|
137
155
|
*/
|
|
138
156
|
|
|
139
|
-
/**
|
|
140
|
-
* @typedef Colors
|
|
141
|
-
* @property {string} [accent_color] - The accent color
|
|
142
|
-
* @property {string} [bg_color] - The background color
|
|
143
|
-
* @property {string} [button_secondary_color] - The secondary button color
|
|
144
|
-
* @property {string} [link_color] - The link color
|
|
145
|
-
* @property {string} [primary_color] - The primary color
|
|
146
|
-
* @property {string} [secondary_color] - The secondary color
|
|
147
|
-
*/
|
|
148
|
-
|
|
149
157
|
/**
|
|
150
158
|
* @typedef Comments
|
|
151
159
|
* @property {string} [developer_remark] - Developer remark
|
|
@@ -186,6 +194,7 @@ const Joi = require("joi");
|
|
|
186
194
|
|
|
187
195
|
/**
|
|
188
196
|
* @typedef CSS
|
|
197
|
+
* @property {string} [link]
|
|
189
198
|
* @property {string[]} [links]
|
|
190
199
|
*/
|
|
191
200
|
|
|
@@ -234,9 +243,9 @@ const Joi = require("joi");
|
|
|
234
243
|
*/
|
|
235
244
|
|
|
236
245
|
/**
|
|
237
|
-
* @typedef
|
|
238
|
-
* @property {string} [divider_strokes]
|
|
239
|
-
* @property {string} [highlight]
|
|
246
|
+
* @typedef DividerStrokeHighlight
|
|
247
|
+
* @property {string} [divider_strokes]
|
|
248
|
+
* @property {string} [highlight]
|
|
240
249
|
*/
|
|
241
250
|
|
|
242
251
|
/**
|
|
@@ -284,44 +293,11 @@ const Joi = require("joi");
|
|
|
284
293
|
* @property {FontVariant} [semi_bold]
|
|
285
294
|
*/
|
|
286
295
|
|
|
287
|
-
/**
|
|
288
|
-
* @typedef FooterSetting
|
|
289
|
-
* @property {string} [footer_background] - The footer background color
|
|
290
|
-
* @property {string} [footer_body_text] - The footer body text color
|
|
291
|
-
* @property {string} [footer_bottom_background] - The footer bottom background color
|
|
292
|
-
* @property {string} [footer_heading_text] - The footer heading text color
|
|
293
|
-
* @property {string} [footer_icon] - The footer icon color
|
|
294
|
-
*/
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* @typedef GeneralSetting
|
|
298
|
-
* @property {ButtonSetting} [button]
|
|
299
|
-
* @property {FooterSetting} [footer]
|
|
300
|
-
* @property {HeaderSetting} [header]
|
|
301
|
-
* @property {SaleDiscountSetting} [sale_discount]
|
|
302
|
-
* @property {TextSetting} [text]
|
|
303
|
-
* @property {ThemeSetting} [theme]
|
|
304
|
-
*/
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* @typedef GlobalConfig
|
|
308
|
-
* @property {AuthConfig} [auth]
|
|
309
|
-
* @property {PaletteConfig} [palette]
|
|
310
|
-
* @property {StaticConfig} [statics]
|
|
311
|
-
*/
|
|
312
|
-
|
|
313
296
|
/**
|
|
314
297
|
* @typedef GlobalSchema
|
|
315
298
|
* @property {Prop[]} [props]
|
|
316
299
|
*/
|
|
317
300
|
|
|
318
|
-
/**
|
|
319
|
-
* @typedef HeaderSetting
|
|
320
|
-
* @property {string} [header_background] - The header background color
|
|
321
|
-
* @property {string} [header_icon] - The header icon color
|
|
322
|
-
* @property {string} [header_nav] - The header navigation color
|
|
323
|
-
*/
|
|
324
|
-
|
|
325
301
|
/**
|
|
326
302
|
* @typedef Highlight
|
|
327
303
|
* @property {string} [description] - Highlight description
|
|
@@ -386,9 +362,15 @@ const Joi = require("joi");
|
|
|
386
362
|
*/
|
|
387
363
|
|
|
388
364
|
/**
|
|
389
|
-
* @typedef
|
|
390
|
-
* @property {
|
|
391
|
-
* @property {
|
|
365
|
+
* @typedef OrderTracking
|
|
366
|
+
* @property {boolean} [show_footer]
|
|
367
|
+
* @property {boolean} [show_header]
|
|
368
|
+
*/
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* @typedef OverlayPopup
|
|
372
|
+
* @property {string} [dialog_backgroung]
|
|
373
|
+
* @property {string} [overlay]
|
|
392
374
|
*/
|
|
393
375
|
|
|
394
376
|
/**
|
|
@@ -411,12 +393,6 @@ const Joi = require("joi");
|
|
|
411
393
|
* @property {string} [type]
|
|
412
394
|
*/
|
|
413
395
|
|
|
414
|
-
/**
|
|
415
|
-
* @typedef PaletteConfig
|
|
416
|
-
* @property {AdvanceSetting} [advance_setting]
|
|
417
|
-
* @property {GeneralSetting} [general_setting]
|
|
418
|
-
*/
|
|
419
|
-
|
|
420
396
|
/**
|
|
421
397
|
* @typedef PaymentInfo
|
|
422
398
|
* @property {number} [amount] - Amount of payment
|
|
@@ -442,6 +418,7 @@ const Joi = require("joi");
|
|
|
442
418
|
* @property {string} [info] - Additional information about the property
|
|
443
419
|
* @property {string} [label] - The label of the property
|
|
444
420
|
* @property {string} [type] - The type of the property
|
|
421
|
+
* @property {string} [value] - The value of the property
|
|
445
422
|
*/
|
|
446
423
|
|
|
447
424
|
/**
|
|
@@ -462,14 +439,6 @@ const Joi = require("joi");
|
|
|
462
439
|
* @property {string} [selected] - The selected route.
|
|
463
440
|
*/
|
|
464
441
|
|
|
465
|
-
/**
|
|
466
|
-
* @typedef SaleDiscountSetting
|
|
467
|
-
* @property {string} [sale_badge_background] - The sale badge background color
|
|
468
|
-
* @property {string} [sale_badge_text] - The sale badge text color
|
|
469
|
-
* @property {string} [sale_discount_text] - The sale discount text color
|
|
470
|
-
* @property {string} [sale_timer] - The sale timer color
|
|
471
|
-
*/
|
|
472
|
-
|
|
473
442
|
/**
|
|
474
443
|
* @typedef Screen
|
|
475
444
|
* @property {boolean} [desktop] - True if the screen is a desktop device.
|
|
@@ -508,14 +477,27 @@ const Joi = require("joi");
|
|
|
508
477
|
*/
|
|
509
478
|
|
|
510
479
|
/**
|
|
511
|
-
* @typedef
|
|
512
|
-
* @property {
|
|
480
|
+
* @typedef SEObreadcrumb
|
|
481
|
+
* @property {Action} [action]
|
|
482
|
+
* @property {string} [url]
|
|
483
|
+
*/
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* @typedef SEOMetaItem
|
|
487
|
+
* @property {SEOMetaItems[]} [items]
|
|
488
|
+
* @property {string} [title]
|
|
489
|
+
*/
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* @typedef SEOMetaItems
|
|
493
|
+
* @property {string} [key]
|
|
494
|
+
* @property {string} [value]
|
|
513
495
|
*/
|
|
514
496
|
|
|
515
497
|
/**
|
|
516
|
-
* @typedef
|
|
517
|
-
* @property {
|
|
518
|
-
* @property {
|
|
498
|
+
* @typedef SEOSitemap
|
|
499
|
+
* @property {string} [frequency]
|
|
500
|
+
* @property {number} [priority]
|
|
519
501
|
*/
|
|
520
502
|
|
|
521
503
|
/**
|
|
@@ -525,19 +507,21 @@ const Joi = require("joi");
|
|
|
525
507
|
*/
|
|
526
508
|
|
|
527
509
|
/**
|
|
528
|
-
* @typedef
|
|
529
|
-
* @property {string} [
|
|
530
|
-
* @property {
|
|
531
|
-
|
|
532
|
-
|
|
510
|
+
* @typedef ThemeConfigListPage
|
|
511
|
+
* @property {string} [page] - Name of the page
|
|
512
|
+
* @property {ThemeConfigListPageSettingsProps} [settings]
|
|
513
|
+
*/
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* @typedef ThemeConfigListPageSettingsProps
|
|
517
|
+
* @property {Object} [props]
|
|
533
518
|
*/
|
|
534
519
|
|
|
535
520
|
/**
|
|
536
521
|
* @typedef ThemeConfiguration
|
|
537
|
-
* @property {
|
|
538
|
-
* @property {GlobalConfig} [global_config]
|
|
522
|
+
* @property {Object} [global_config]
|
|
539
523
|
* @property {string} [name] - The name of the configuration
|
|
540
|
-
* @property {
|
|
524
|
+
* @property {ThemeConfigListPage[]} [page] - An array of pages
|
|
541
525
|
*/
|
|
542
526
|
|
|
543
527
|
/**
|
|
@@ -573,12 +557,6 @@ const Joi = require("joi");
|
|
|
573
557
|
* @property {string} user_id - The ID of the user who submitted the theme
|
|
574
558
|
*/
|
|
575
559
|
|
|
576
|
-
/**
|
|
577
|
-
* @typedef ThemeSetting
|
|
578
|
-
* @property {string} [page_background] - The page background color
|
|
579
|
-
* @property {string} [theme_accent] - The theme accent color
|
|
580
|
-
*/
|
|
581
|
-
|
|
582
560
|
/**
|
|
583
561
|
* @typedef ThemesSchema
|
|
584
562
|
* @property {string} [_id] - The unique identifier of the theme
|
|
@@ -594,6 +572,7 @@ const Joi = require("joi");
|
|
|
594
572
|
* @property {string} [marketplace_theme_id] - The ID of the theme in the marketplace
|
|
595
573
|
* @property {ThemeMeta} [meta]
|
|
596
574
|
* @property {string} [name] - The name of the theme
|
|
575
|
+
* @property {string} [src]
|
|
597
576
|
* @property {Object} [styles] - The styles associated with the theme
|
|
598
577
|
* @property {string[]} [tags] - An array of tags associated with the theme
|
|
599
578
|
* @property {string} [template_theme_id] - The ID of the template theme
|
|
@@ -610,6 +589,7 @@ const Joi = require("joi");
|
|
|
610
589
|
|
|
611
590
|
/**
|
|
612
591
|
* @typedef UMDJs
|
|
592
|
+
* @property {string} [link]
|
|
613
593
|
* @property {string[]} [links]
|
|
614
594
|
*/
|
|
615
595
|
|
|
@@ -626,13 +606,13 @@ const Joi = require("joi");
|
|
|
626
606
|
*/
|
|
627
607
|
|
|
628
608
|
/**
|
|
629
|
-
* @typedef
|
|
630
|
-
* @property {string} [error_background]
|
|
631
|
-
* @property {string} [error_text]
|
|
632
|
-
* @property {string} [info_background]
|
|
633
|
-
* @property {string} [info_text]
|
|
634
|
-
* @property {string} [success_background]
|
|
635
|
-
* @property {string} [success_text]
|
|
609
|
+
* @typedef UserAlerts
|
|
610
|
+
* @property {string} [error_background]
|
|
611
|
+
* @property {string} [error_text]
|
|
612
|
+
* @property {string} [info_background]
|
|
613
|
+
* @property {string} [info_text]
|
|
614
|
+
* @property {string} [success_background]
|
|
615
|
+
* @property {string} [success_text]
|
|
636
616
|
*/
|
|
637
617
|
|
|
638
618
|
/**
|
|
@@ -644,12 +624,28 @@ const Joi = require("joi");
|
|
|
644
624
|
*/
|
|
645
625
|
|
|
646
626
|
class ThemePartnerModel {
|
|
647
|
-
/** @returns {
|
|
648
|
-
static
|
|
627
|
+
/** @returns {Action} */
|
|
628
|
+
static Action() {
|
|
629
|
+
return Joi.object({
|
|
630
|
+
page: ThemePartnerModel.ActionPage(),
|
|
631
|
+
popup: ThemePartnerModel.ActionPage(),
|
|
632
|
+
type: Joi.string().allow(""),
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/** @returns {ActionPage} */
|
|
637
|
+
static ActionPage() {
|
|
649
638
|
return Joi.object({
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
639
|
+
params: Joi.object().pattern(
|
|
640
|
+
/\S/,
|
|
641
|
+
Joi.array().items(Joi.string().allow(""))
|
|
642
|
+
),
|
|
643
|
+
query: Joi.object().pattern(
|
|
644
|
+
/\S/,
|
|
645
|
+
Joi.array().items(Joi.string().allow(""))
|
|
646
|
+
),
|
|
647
|
+
type: Joi.string().allow(""),
|
|
648
|
+
url: Joi.string().allow(""),
|
|
653
649
|
});
|
|
654
650
|
}
|
|
655
651
|
|
|
@@ -669,20 +665,24 @@ class ThemePartnerModel {
|
|
|
669
665
|
});
|
|
670
666
|
}
|
|
671
667
|
|
|
672
|
-
/** @returns {
|
|
673
|
-
static
|
|
668
|
+
/** @returns {AvailablePagePlatformPredicate} */
|
|
669
|
+
static AvailablePagePlatformPredicate() {
|
|
674
670
|
return Joi.object({
|
|
675
|
-
|
|
676
|
-
|
|
671
|
+
android: Joi.boolean(),
|
|
672
|
+
ios: Joi.boolean(),
|
|
673
|
+
web: Joi.boolean(),
|
|
677
674
|
});
|
|
678
675
|
}
|
|
679
676
|
|
|
680
677
|
/** @returns {AvailablePagePredicate} */
|
|
681
678
|
static AvailablePagePredicate() {
|
|
682
679
|
return Joi.object({
|
|
680
|
+
platform: ThemePartnerModel.AvailablePagePlatformPredicate(),
|
|
683
681
|
route: ThemePartnerModel.AvailablePageRoutePredicate(),
|
|
682
|
+
schedule: ThemePartnerModel.AvailablePageSchedulePredicate(),
|
|
684
683
|
screen: ThemePartnerModel.AvailablePageScreenPredicate(),
|
|
685
684
|
user: ThemePartnerModel.AvailablePageUserPredicate(),
|
|
685
|
+
zones: Joi.array().items(Joi.string().allow("")),
|
|
686
686
|
});
|
|
687
687
|
}
|
|
688
688
|
|
|
@@ -695,10 +695,20 @@ class ThemePartnerModel {
|
|
|
695
695
|
});
|
|
696
696
|
}
|
|
697
697
|
|
|
698
|
+
/** @returns {AvailablePageSchedulePredicate} */
|
|
699
|
+
static AvailablePageSchedulePredicate() {
|
|
700
|
+
return Joi.object({
|
|
701
|
+
cron: Joi.string().allow(""),
|
|
702
|
+
end: Joi.string().allow(""),
|
|
703
|
+
start: Joi.string().allow(""),
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
|
|
698
707
|
/** @returns {AvailablePageSchema} */
|
|
699
708
|
static AvailablePageSchema() {
|
|
700
709
|
return Joi.object({
|
|
701
710
|
_id: Joi.string().allow(""),
|
|
711
|
+
created_at: Joi.string().allow(""),
|
|
702
712
|
path: Joi.string().allow(""),
|
|
703
713
|
props: Joi.array().items(Joi.any()),
|
|
704
714
|
sections: Joi.array().items(
|
|
@@ -711,6 +721,7 @@ class ThemePartnerModel {
|
|
|
711
721
|
text: Joi.string().allow(""),
|
|
712
722
|
theme: Joi.string().allow(""),
|
|
713
723
|
type: Joi.string().allow(""),
|
|
724
|
+
updated_at: Joi.string().allow(""),
|
|
714
725
|
value: Joi.string().allow(""),
|
|
715
726
|
});
|
|
716
727
|
}
|
|
@@ -724,6 +735,7 @@ class ThemePartnerModel {
|
|
|
724
735
|
predicate: ThemePartnerModel.AvailablePagePredicate(),
|
|
725
736
|
preset: Joi.any(),
|
|
726
737
|
props: Joi.any(),
|
|
738
|
+
source: Joi.string().allow(""),
|
|
727
739
|
});
|
|
728
740
|
}
|
|
729
741
|
|
|
@@ -747,7 +759,10 @@ class ThemePartnerModel {
|
|
|
747
759
|
static AvailablePageSeo() {
|
|
748
760
|
return Joi.object({
|
|
749
761
|
_id: Joi.string().allow(""),
|
|
762
|
+
breadcrumb: Joi.array().items(ThemePartnerModel.SEObreadcrumb()),
|
|
750
763
|
description: Joi.string().allow(""),
|
|
764
|
+
meta_tags: Joi.array().items(ThemePartnerModel.SEOMetaItem()),
|
|
765
|
+
sitemap: ThemePartnerModel.SEOSitemap(),
|
|
751
766
|
title: Joi.string().allow(""),
|
|
752
767
|
});
|
|
753
768
|
}
|
|
@@ -791,15 +806,6 @@ class ThemePartnerModel {
|
|
|
791
806
|
});
|
|
792
807
|
}
|
|
793
808
|
|
|
794
|
-
/** @returns {ButtonSetting} */
|
|
795
|
-
static ButtonSetting() {
|
|
796
|
-
return Joi.object({
|
|
797
|
-
button_link: Joi.string().allow(""),
|
|
798
|
-
button_primary: Joi.string().allow(""),
|
|
799
|
-
button_secondary: Joi.string().allow(""),
|
|
800
|
-
});
|
|
801
|
-
}
|
|
802
|
-
|
|
803
809
|
/** @returns {CarouselItem} */
|
|
804
810
|
static CarouselItem() {
|
|
805
811
|
return Joi.object({
|
|
@@ -824,18 +830,6 @@ class ThemePartnerModel {
|
|
|
824
830
|
});
|
|
825
831
|
}
|
|
826
832
|
|
|
827
|
-
/** @returns {Colors} */
|
|
828
|
-
static Colors() {
|
|
829
|
-
return Joi.object({
|
|
830
|
-
accent_color: Joi.string().allow(""),
|
|
831
|
-
bg_color: Joi.string().allow(""),
|
|
832
|
-
button_secondary_color: Joi.string().allow(""),
|
|
833
|
-
link_color: Joi.string().allow(""),
|
|
834
|
-
primary_color: Joi.string().allow(""),
|
|
835
|
-
secondary_color: Joi.string().allow(""),
|
|
836
|
-
});
|
|
837
|
-
}
|
|
838
|
-
|
|
839
833
|
/** @returns {Comments} */
|
|
840
834
|
static Comments() {
|
|
841
835
|
return Joi.object({
|
|
@@ -891,6 +885,7 @@ class ThemePartnerModel {
|
|
|
891
885
|
/** @returns {CSS} */
|
|
892
886
|
static CSS() {
|
|
893
887
|
return Joi.object({
|
|
888
|
+
link: Joi.string().allow(""),
|
|
894
889
|
links: Joi.array().items(Joi.string().allow("")),
|
|
895
890
|
});
|
|
896
891
|
}
|
|
@@ -938,8 +933,8 @@ class ThemePartnerModel {
|
|
|
938
933
|
});
|
|
939
934
|
}
|
|
940
935
|
|
|
941
|
-
/** @returns {
|
|
942
|
-
static
|
|
936
|
+
/** @returns {DividerStrokeHighlight} */
|
|
937
|
+
static DividerStrokeHighlight() {
|
|
943
938
|
return Joi.object({
|
|
944
939
|
divider_strokes: Joi.string().allow(""),
|
|
945
940
|
highlight: Joi.string().allow(""),
|
|
@@ -1005,38 +1000,6 @@ class ThemePartnerModel {
|
|
|
1005
1000
|
});
|
|
1006
1001
|
}
|
|
1007
1002
|
|
|
1008
|
-
/** @returns {FooterSetting} */
|
|
1009
|
-
static FooterSetting() {
|
|
1010
|
-
return Joi.object({
|
|
1011
|
-
footer_background: Joi.string().allow(""),
|
|
1012
|
-
footer_body_text: Joi.string().allow(""),
|
|
1013
|
-
footer_bottom_background: Joi.string().allow(""),
|
|
1014
|
-
footer_heading_text: Joi.string().allow(""),
|
|
1015
|
-
footer_icon: Joi.string().allow(""),
|
|
1016
|
-
});
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
/** @returns {GeneralSetting} */
|
|
1020
|
-
static GeneralSetting() {
|
|
1021
|
-
return Joi.object({
|
|
1022
|
-
button: ThemePartnerModel.ButtonSetting(),
|
|
1023
|
-
footer: ThemePartnerModel.FooterSetting(),
|
|
1024
|
-
header: ThemePartnerModel.HeaderSetting(),
|
|
1025
|
-
sale_discount: ThemePartnerModel.SaleDiscountSetting(),
|
|
1026
|
-
text: ThemePartnerModel.TextSetting(),
|
|
1027
|
-
theme: ThemePartnerModel.ThemeSetting(),
|
|
1028
|
-
});
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
/** @returns {GlobalConfig} */
|
|
1032
|
-
static GlobalConfig() {
|
|
1033
|
-
return Joi.object({
|
|
1034
|
-
auth: ThemePartnerModel.AuthConfig(),
|
|
1035
|
-
palette: ThemePartnerModel.PaletteConfig(),
|
|
1036
|
-
statics: ThemePartnerModel.StaticConfig(),
|
|
1037
|
-
});
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
1003
|
/** @returns {GlobalSchema} */
|
|
1041
1004
|
static GlobalSchema() {
|
|
1042
1005
|
return Joi.object({
|
|
@@ -1044,15 +1007,6 @@ class ThemePartnerModel {
|
|
|
1044
1007
|
});
|
|
1045
1008
|
}
|
|
1046
1009
|
|
|
1047
|
-
/** @returns {HeaderSetting} */
|
|
1048
|
-
static HeaderSetting() {
|
|
1049
|
-
return Joi.object({
|
|
1050
|
-
header_background: Joi.string().allow(""),
|
|
1051
|
-
header_icon: Joi.string().allow(""),
|
|
1052
|
-
header_nav: Joi.string().allow(""),
|
|
1053
|
-
});
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
1010
|
/** @returns {Highlight} */
|
|
1057
1011
|
static Highlight() {
|
|
1058
1012
|
return Joi.object({
|
|
@@ -1128,8 +1082,16 @@ class ThemePartnerModel {
|
|
|
1128
1082
|
});
|
|
1129
1083
|
}
|
|
1130
1084
|
|
|
1131
|
-
/** @returns {
|
|
1132
|
-
static
|
|
1085
|
+
/** @returns {OrderTracking} */
|
|
1086
|
+
static OrderTracking() {
|
|
1087
|
+
return Joi.object({
|
|
1088
|
+
show_footer: Joi.boolean(),
|
|
1089
|
+
show_header: Joi.boolean(),
|
|
1090
|
+
});
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
/** @returns {OverlayPopup} */
|
|
1094
|
+
static OverlayPopup() {
|
|
1133
1095
|
return Joi.object({
|
|
1134
1096
|
dialog_backgroung: Joi.string().allow(""),
|
|
1135
1097
|
overlay: Joi.string().allow(""),
|
|
@@ -1160,14 +1122,6 @@ class ThemePartnerModel {
|
|
|
1160
1122
|
});
|
|
1161
1123
|
}
|
|
1162
1124
|
|
|
1163
|
-
/** @returns {PaletteConfig} */
|
|
1164
|
-
static PaletteConfig() {
|
|
1165
|
-
return Joi.object({
|
|
1166
|
-
advance_setting: ThemePartnerModel.AdvanceSetting(),
|
|
1167
|
-
general_setting: ThemePartnerModel.GeneralSetting(),
|
|
1168
|
-
});
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
1125
|
/** @returns {PaymentInfo} */
|
|
1172
1126
|
static PaymentInfo() {
|
|
1173
1127
|
return Joi.object({
|
|
@@ -1200,6 +1154,7 @@ class ThemePartnerModel {
|
|
|
1200
1154
|
info: Joi.string().allow(""),
|
|
1201
1155
|
label: Joi.string().allow(""),
|
|
1202
1156
|
type: Joi.string().allow(""),
|
|
1157
|
+
value: Joi.string().allow(""),
|
|
1203
1158
|
});
|
|
1204
1159
|
}
|
|
1205
1160
|
|
|
@@ -1227,16 +1182,6 @@ class ThemePartnerModel {
|
|
|
1227
1182
|
});
|
|
1228
1183
|
}
|
|
1229
1184
|
|
|
1230
|
-
/** @returns {SaleDiscountSetting} */
|
|
1231
|
-
static SaleDiscountSetting() {
|
|
1232
|
-
return Joi.object({
|
|
1233
|
-
sale_badge_background: Joi.string().allow(""),
|
|
1234
|
-
sale_badge_text: Joi.string().allow(""),
|
|
1235
|
-
sale_discount_text: Joi.string().allow(""),
|
|
1236
|
-
sale_timer: Joi.string().allow(""),
|
|
1237
|
-
});
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
1185
|
/** @returns {Screen} */
|
|
1241
1186
|
static Screen() {
|
|
1242
1187
|
return Joi.object({
|
|
@@ -1284,18 +1229,35 @@ class ThemePartnerModel {
|
|
|
1284
1229
|
});
|
|
1285
1230
|
}
|
|
1286
1231
|
|
|
1287
|
-
/** @returns {
|
|
1288
|
-
static
|
|
1232
|
+
/** @returns {SEObreadcrumb} */
|
|
1233
|
+
static SEObreadcrumb() {
|
|
1234
|
+
return Joi.object({
|
|
1235
|
+
action: ThemePartnerModel.Action(),
|
|
1236
|
+
url: Joi.string().allow(""),
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
/** @returns {SEOMetaItem} */
|
|
1241
|
+
static SEOMetaItem() {
|
|
1242
|
+
return Joi.object({
|
|
1243
|
+
items: Joi.array().items(ThemePartnerModel.SEOMetaItems()),
|
|
1244
|
+
title: Joi.string().allow(""),
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/** @returns {SEOMetaItems} */
|
|
1249
|
+
static SEOMetaItems() {
|
|
1289
1250
|
return Joi.object({
|
|
1290
|
-
|
|
1251
|
+
key: Joi.string().allow(""),
|
|
1252
|
+
value: Joi.string().allow(""),
|
|
1291
1253
|
});
|
|
1292
1254
|
}
|
|
1293
1255
|
|
|
1294
|
-
/** @returns {
|
|
1295
|
-
static
|
|
1256
|
+
/** @returns {SEOSitemap} */
|
|
1257
|
+
static SEOSitemap() {
|
|
1296
1258
|
return Joi.object({
|
|
1297
|
-
|
|
1298
|
-
|
|
1259
|
+
frequency: Joi.string().allow(""),
|
|
1260
|
+
priority: Joi.number(),
|
|
1299
1261
|
});
|
|
1300
1262
|
}
|
|
1301
1263
|
|
|
@@ -1307,23 +1269,27 @@ class ThemePartnerModel {
|
|
|
1307
1269
|
});
|
|
1308
1270
|
}
|
|
1309
1271
|
|
|
1310
|
-
/** @returns {
|
|
1311
|
-
static
|
|
1272
|
+
/** @returns {ThemeConfigListPage} */
|
|
1273
|
+
static ThemeConfigListPage() {
|
|
1274
|
+
return Joi.object({
|
|
1275
|
+
page: Joi.string().allow(""),
|
|
1276
|
+
settings: ThemePartnerModel.ThemeConfigListPageSettingsProps(),
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
/** @returns {ThemeConfigListPageSettingsProps} */
|
|
1281
|
+
static ThemeConfigListPageSettingsProps() {
|
|
1312
1282
|
return Joi.object({
|
|
1313
|
-
|
|
1314
|
-
text_heading: Joi.string().allow(""),
|
|
1315
|
-
text_label: Joi.string().allow(""),
|
|
1316
|
-
text_secondary: Joi.string().allow(""),
|
|
1283
|
+
props: Joi.any(),
|
|
1317
1284
|
});
|
|
1318
1285
|
}
|
|
1319
1286
|
|
|
1320
1287
|
/** @returns {ThemeConfiguration} */
|
|
1321
1288
|
static ThemeConfiguration() {
|
|
1322
1289
|
return Joi.object({
|
|
1323
|
-
|
|
1324
|
-
global_config: ThemePartnerModel.GlobalConfig(),
|
|
1290
|
+
global_config: Joi.any(),
|
|
1325
1291
|
name: Joi.string().allow(""),
|
|
1326
|
-
page: Joi.array().items(
|
|
1292
|
+
page: Joi.array().items(ThemePartnerModel.ThemeConfigListPage()),
|
|
1327
1293
|
});
|
|
1328
1294
|
}
|
|
1329
1295
|
|
|
@@ -1364,14 +1330,6 @@ class ThemePartnerModel {
|
|
|
1364
1330
|
});
|
|
1365
1331
|
}
|
|
1366
1332
|
|
|
1367
|
-
/** @returns {ThemeSetting} */
|
|
1368
|
-
static ThemeSetting() {
|
|
1369
|
-
return Joi.object({
|
|
1370
|
-
page_background: Joi.string().allow(""),
|
|
1371
|
-
theme_accent: Joi.string().allow(""),
|
|
1372
|
-
});
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
1333
|
/** @returns {ThemesSchema} */
|
|
1376
1334
|
static ThemesSchema() {
|
|
1377
1335
|
return Joi.object({
|
|
@@ -1388,6 +1346,7 @@ class ThemePartnerModel {
|
|
|
1388
1346
|
marketplace_theme_id: Joi.string().allow(""),
|
|
1389
1347
|
meta: ThemePartnerModel.ThemeMeta(),
|
|
1390
1348
|
name: Joi.string().allow(""),
|
|
1349
|
+
src: Joi.string().allow(""),
|
|
1391
1350
|
styles: Joi.any(),
|
|
1392
1351
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1393
1352
|
template_theme_id: Joi.string().allow(""),
|
|
@@ -1408,6 +1367,7 @@ class ThemePartnerModel {
|
|
|
1408
1367
|
/** @returns {UMDJs} */
|
|
1409
1368
|
static UMDJs() {
|
|
1410
1369
|
return Joi.object({
|
|
1370
|
+
link: Joi.string().allow(""),
|
|
1411
1371
|
links: Joi.array().items(Joi.string().allow("")),
|
|
1412
1372
|
});
|
|
1413
1373
|
}
|
|
@@ -1428,8 +1388,8 @@ class ThemePartnerModel {
|
|
|
1428
1388
|
});
|
|
1429
1389
|
}
|
|
1430
1390
|
|
|
1431
|
-
/** @returns {
|
|
1432
|
-
static
|
|
1391
|
+
/** @returns {UserAlerts} */
|
|
1392
|
+
static UserAlerts() {
|
|
1433
1393
|
return Joi.object({
|
|
1434
1394
|
error_background: Joi.string().allow(""),
|
|
1435
1395
|
error_text: Joi.string().allow(""),
|