@gofynd/fdk-client-javascript 1.4.2-beta.1 → 1.4.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
- package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
- package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
- package/sdk/application/Content/ContentApplicationModel.js +757 -757
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
- package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
- package/sdk/application/Order/OrderApplicationModel.d.ts +846 -846
- package/sdk/application/Order/OrderApplicationModel.js +822 -822
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +2155 -2150
- package/sdk/application/Payment/PaymentApplicationModel.js +1460 -1458
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
- package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
- package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
- package/sdk/application/User/UserApplicationModel.d.ts +762 -762
- package/sdk/application/User/UserApplicationModel.js +738 -738
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
- package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
- package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
- package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
- package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
- package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -1013
- package/sdk/platform/Catalog/CatalogPlatformModel.js +923 -923
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1833 -1833
- package/sdk/platform/Content/ContentPlatformModel.js +1837 -1837
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
- package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +865 -865
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +877 -877
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
- package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
- package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5180 -5176
- package/sdk/platform/Order/OrderPlatformModel.js +4740 -4736
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2670 -2660
- package/sdk/platform/Payment/PaymentPlatformModel.js +1831 -1827
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1505 -1507
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1532 -1536
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
- package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
- package/sdk/platform/User/UserPlatformModel.d.ts +758 -758
- package/sdk/platform/User/UserPlatformModel.js +643 -643
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
- package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
- package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
- package/sdk/public/Billing/BillingPublicModel.js +51 -51
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
- package/sdk/public/Content/ContentPublicModel.js +28 -28
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
- package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
|
@@ -1,389 +1,355 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {
|
|
6
|
-
*
|
|
7
|
-
* @property {string} [type]
|
|
4
|
+
* @typedef ThemeReq
|
|
5
|
+
* @property {string} [marketplace_theme_id] - The ID of the marketplace theme
|
|
6
|
+
* to apply to the company.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
|
-
* @typedef
|
|
12
|
-
* @property {
|
|
13
|
-
* @property {
|
|
14
|
-
* @property {
|
|
15
|
-
* @property {
|
|
10
|
+
* @typedef CompanyThemeSchema
|
|
11
|
+
* @property {string} [_id] - The unique identifier for the theme.
|
|
12
|
+
* @property {string} [name] - The name of the theme.
|
|
13
|
+
* @property {MarketplaceThemeId} [marketplace_theme_id]
|
|
14
|
+
* @property {number} [company_id] - The ID of the company that the theme belongs to.
|
|
15
|
+
* @property {CompanyThemeMeta} [meta]
|
|
16
|
+
* @property {string} [created_at] - The timestamp when the theme was created.
|
|
17
|
+
* @property {string} [updated_at] - The timestamp when the theme was last updated.
|
|
18
|
+
* @property {AppliedThemes[]} [applied_themes]
|
|
16
19
|
*/
|
|
17
20
|
|
|
18
21
|
/**
|
|
19
|
-
* @typedef
|
|
20
|
-
* @property {string} [
|
|
22
|
+
* @typedef MarketplaceThemeId
|
|
23
|
+
* @property {string} [_id] - The unique identifier for the marketplace theme.
|
|
24
|
+
* @property {boolean} [is_default] - Whether the theme is the default theme.
|
|
25
|
+
* @property {Release} [release]
|
|
26
|
+
* @property {string} [created_at] - Creation date of the theme
|
|
27
|
+
* @property {string} [updated_at] - Update date of the theme
|
|
21
28
|
*/
|
|
22
29
|
|
|
23
30
|
/**
|
|
24
|
-
* @typedef
|
|
25
|
-
* @property {
|
|
31
|
+
* @typedef CompanyThemeMeta
|
|
32
|
+
* @property {ThemePayment} [payment]
|
|
33
|
+
* @property {string[]} [industry] - A list of industry categories the theme is
|
|
34
|
+
* suitable for.
|
|
35
|
+
* @property {string} [description] - A description of the theme.
|
|
36
|
+
* @property {ThemeImages} [images]
|
|
37
|
+
* @property {string} [slug] - The slug for the theme.
|
|
26
38
|
*/
|
|
27
39
|
|
|
28
40
|
/**
|
|
29
|
-
* @typedef
|
|
30
|
-
* @property {
|
|
31
|
-
* @property {
|
|
41
|
+
* @typedef ThemePayment
|
|
42
|
+
* @property {boolean} [is_paid] - Whether the theme is a paid theme.
|
|
43
|
+
* @property {number} [amount] - The amount to be paid for the theme.
|
|
32
44
|
*/
|
|
33
45
|
|
|
34
46
|
/**
|
|
35
|
-
* @typedef
|
|
36
|
-
* @property {
|
|
37
|
-
* @property {
|
|
38
|
-
* @property {UMDJs} [umd_js]
|
|
47
|
+
* @typedef ThemeImages
|
|
48
|
+
* @property {string} [desktop] - The URL of the desktop image for the theme.
|
|
49
|
+
* @property {string} [mobile] - The URL of the mobile image for the theme.
|
|
39
50
|
*/
|
|
40
51
|
|
|
41
52
|
/**
|
|
42
|
-
* @typedef
|
|
43
|
-
* @property {
|
|
44
|
-
* @property {
|
|
45
|
-
* @property {
|
|
53
|
+
* @typedef AvailablePageSchema
|
|
54
|
+
* @property {string} [value]
|
|
55
|
+
* @property {string} [text]
|
|
56
|
+
* @property {string} [path]
|
|
57
|
+
* @property {string} [type]
|
|
58
|
+
* @property {AvailablePageSchemaSections[]} [sections]
|
|
59
|
+
* @property {AvailablePageSectionMetaAttributes[]} [sections_meta]
|
|
60
|
+
* @property {string} [theme]
|
|
61
|
+
* @property {AvailablePageSeo} [seo]
|
|
62
|
+
* @property {Object[]} [props]
|
|
63
|
+
* @property {string} [_id]
|
|
64
|
+
* @property {string} [created_at] - The creation timestamp of the page
|
|
65
|
+
* @property {string} [updated_at] - The last update timestamp of the page
|
|
46
66
|
*/
|
|
47
67
|
|
|
48
68
|
/**
|
|
49
|
-
* @typedef
|
|
50
|
-
* @property {
|
|
51
|
-
* @property {AvailablePageRoutePredicate} [route]
|
|
52
|
-
* @property {AvailablePageSchedulePredicate} [schedule]
|
|
53
|
-
* @property {AvailablePageScreenPredicate} [screen]
|
|
54
|
-
* @property {AvailablePageUserPredicate} [user]
|
|
55
|
-
* @property {string[]} [zones] - An array of zone ids associated with the section
|
|
69
|
+
* @typedef AvailablePageSectionMetaAttributes
|
|
70
|
+
* @property {Object} [attributes]
|
|
56
71
|
*/
|
|
57
72
|
|
|
58
73
|
/**
|
|
59
|
-
* @typedef
|
|
60
|
-
* @property {string} [
|
|
61
|
-
* @property {
|
|
62
|
-
* @property {string} [selected]
|
|
74
|
+
* @typedef SEOMetaItem
|
|
75
|
+
* @property {string} [title]
|
|
76
|
+
* @property {SEOMetaItems[]} [items]
|
|
63
77
|
*/
|
|
64
78
|
|
|
65
79
|
/**
|
|
66
|
-
* @typedef
|
|
67
|
-
* @property {string} [
|
|
68
|
-
* @property {string} [
|
|
69
|
-
* @property {string} [start]
|
|
80
|
+
* @typedef SEOMetaItems
|
|
81
|
+
* @property {string} [key]
|
|
82
|
+
* @property {string} [value]
|
|
70
83
|
*/
|
|
71
84
|
|
|
72
85
|
/**
|
|
73
|
-
* @typedef
|
|
74
|
-
* @property {
|
|
75
|
-
* @property {string} [
|
|
76
|
-
* @property {string} [path]
|
|
77
|
-
* @property {Object[]} [props]
|
|
78
|
-
* @property {AvailablePageSchemaSections[]} [sections]
|
|
79
|
-
* @property {AvailablePageSectionMetaAttributes[]} [sections_meta]
|
|
80
|
-
* @property {AvailablePageSeo} [seo]
|
|
81
|
-
* @property {string} [text]
|
|
82
|
-
* @property {string} [theme]
|
|
83
|
-
* @property {string} [type]
|
|
84
|
-
* @property {string} [updated_at] - The last update timestamp of the page
|
|
85
|
-
* @property {string} [value]
|
|
86
|
+
* @typedef SEOSitemap
|
|
87
|
+
* @property {number} [priority]
|
|
88
|
+
* @property {string} [frequency]
|
|
86
89
|
*/
|
|
87
90
|
|
|
88
91
|
/**
|
|
89
|
-
* @typedef
|
|
90
|
-
* @property {
|
|
91
|
-
* @property {
|
|
92
|
-
* @property {string} [name]
|
|
93
|
-
* @property {AvailablePagePredicate} [predicate]
|
|
94
|
-
* @property {Object} [preset]
|
|
95
|
-
* @property {Object} [props]
|
|
96
|
-
* @property {string} [source]
|
|
92
|
+
* @typedef SEObreadcrumb
|
|
93
|
+
* @property {string} [url]
|
|
94
|
+
* @property {Action} [action]
|
|
97
95
|
*/
|
|
98
96
|
|
|
99
97
|
/**
|
|
100
|
-
* @typedef
|
|
101
|
-
* @property {
|
|
102
|
-
* @property {
|
|
103
|
-
* @property {
|
|
98
|
+
* @typedef Action
|
|
99
|
+
* @property {ActionPage} [page]
|
|
100
|
+
* @property {ActionPage} [popup]
|
|
101
|
+
* @property {string} [type]
|
|
104
102
|
*/
|
|
105
103
|
|
|
106
104
|
/**
|
|
107
|
-
* @typedef
|
|
108
|
-
* @property {Object} [
|
|
105
|
+
* @typedef ActionPage
|
|
106
|
+
* @property {Object} [params]
|
|
107
|
+
* @property {Object} [query]
|
|
108
|
+
* @property {string} [url]
|
|
109
|
+
* @property {PageType} type
|
|
109
110
|
*/
|
|
110
111
|
|
|
111
112
|
/**
|
|
112
113
|
* @typedef AvailablePageSeo
|
|
113
|
-
* @property {string} [
|
|
114
|
-
* @property {SEObreadcrumb[]} [breadcrumb]
|
|
114
|
+
* @property {string} [title]
|
|
115
115
|
* @property {string} [description]
|
|
116
116
|
* @property {SEOMetaItem[]} [meta_tags]
|
|
117
117
|
* @property {SEOSitemap} [sitemap]
|
|
118
|
-
* @property {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @typedef AvailablePageUserPredicate
|
|
123
|
-
* @property {boolean} [anonymous]
|
|
124
|
-
* @property {boolean} [authenticated]
|
|
125
|
-
*/
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @typedef BlitzkriegApiErrorSchema
|
|
129
|
-
* @property {string} [message]
|
|
118
|
+
* @property {SEObreadcrumb[]} [breadcrumb]
|
|
119
|
+
* @property {string} [_id]
|
|
130
120
|
*/
|
|
131
121
|
|
|
132
122
|
/**
|
|
133
|
-
* @typedef
|
|
134
|
-
* @property {string} [
|
|
123
|
+
* @typedef AvailablePageSchemaSections
|
|
124
|
+
* @property {string} [name]
|
|
125
|
+
* @property {string} [label]
|
|
126
|
+
* @property {Object} [props]
|
|
127
|
+
* @property {Object[]} [blocks]
|
|
128
|
+
* @property {Object} [preset]
|
|
129
|
+
* @property {AvailablePagePredicate} [predicate]
|
|
130
|
+
* @property {string} [source]
|
|
135
131
|
*/
|
|
136
132
|
|
|
137
133
|
/**
|
|
138
|
-
* @typedef
|
|
139
|
-
* @property {
|
|
140
|
-
* @property {
|
|
141
|
-
* @property {
|
|
134
|
+
* @typedef AvailablePagePredicate
|
|
135
|
+
* @property {AvailablePageScreenPredicate} [screen]
|
|
136
|
+
* @property {AvailablePageUserPredicate} [user]
|
|
137
|
+
* @property {AvailablePageRoutePredicate} [route]
|
|
138
|
+
* @property {AvailablePageSchedulePredicate} [schedule]
|
|
139
|
+
* @property {AvailablePagePlatformPredicate} [platform]
|
|
140
|
+
* @property {string[]} [zones] - An array of zone ids associated with the section
|
|
142
141
|
*/
|
|
143
142
|
|
|
144
143
|
/**
|
|
145
|
-
* @typedef
|
|
146
|
-
* @property {
|
|
147
|
-
* @property {
|
|
144
|
+
* @typedef AvailablePageScreenPredicate
|
|
145
|
+
* @property {boolean} [mobile]
|
|
146
|
+
* @property {boolean} [desktop]
|
|
147
|
+
* @property {boolean} [tablet]
|
|
148
148
|
*/
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
|
-
* @typedef
|
|
152
|
-
* @property {
|
|
153
|
-
* @property {boolean} [
|
|
151
|
+
* @typedef AvailablePageUserPredicate
|
|
152
|
+
* @property {boolean} [authenticated]
|
|
153
|
+
* @property {boolean} [anonymous]
|
|
154
154
|
*/
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* @typedef
|
|
158
|
-
* @property {string} [
|
|
157
|
+
* @typedef AvailablePageRoutePredicate
|
|
158
|
+
* @property {string} [selected]
|
|
159
|
+
* @property {string} [exact_url]
|
|
160
|
+
* @property {Object} [query]
|
|
159
161
|
*/
|
|
160
162
|
|
|
161
163
|
/**
|
|
162
|
-
* @typedef
|
|
163
|
-
* @property {
|
|
164
|
-
* @property {
|
|
165
|
-
* @property {boolean} [
|
|
166
|
-
* @property {string} [created_at] - Date and time when the theme was created
|
|
167
|
-
* @property {boolean} [is_private] - Whether the theme is private or not
|
|
168
|
-
* @property {CompanyThemeMeta} [meta]
|
|
169
|
-
* @property {string} [name] - Name of the theme
|
|
170
|
-
* @property {string} [theme_type] - Type of the theme
|
|
171
|
-
* @property {string} [updated_at] - Date and time when the theme was last updated
|
|
172
|
-
* @property {string} [version] - Version of the theme
|
|
164
|
+
* @typedef AvailablePagePlatformPredicate
|
|
165
|
+
* @property {boolean} [ios] - Section visibility on ios platform
|
|
166
|
+
* @property {boolean} [android] - Section visibility on android platform
|
|
167
|
+
* @property {boolean} [web] - Section visibility on web platform
|
|
173
168
|
*/
|
|
174
169
|
|
|
175
170
|
/**
|
|
176
|
-
* @typedef
|
|
177
|
-
* @property {string} [
|
|
178
|
-
* @property {
|
|
179
|
-
* @property {string
|
|
180
|
-
* suitable for.
|
|
181
|
-
* @property {ThemePayment} [payment]
|
|
182
|
-
* @property {string} [slug] - The slug for the theme.
|
|
171
|
+
* @typedef AvailablePageSchedulePredicate
|
|
172
|
+
* @property {string} [cron]
|
|
173
|
+
* @property {string} [start]
|
|
174
|
+
* @property {string} [end]
|
|
183
175
|
*/
|
|
184
176
|
|
|
185
177
|
/**
|
|
186
|
-
* @typedef
|
|
187
|
-
* @property {
|
|
188
|
-
* @property {AppliedThemes[]} [applied_themes]
|
|
189
|
-
* @property {number} [company_id] - The ID of the company that the theme belongs to.
|
|
190
|
-
* @property {string} [created_at] - The timestamp when the theme was created.
|
|
191
|
-
* @property {MarketplaceThemeId} [marketplace_theme_id]
|
|
192
|
-
* @property {CompanyThemeMeta} [meta]
|
|
193
|
-
* @property {string} [name] - The name of the theme.
|
|
194
|
-
* @property {string} [updated_at] - The timestamp when the theme was last updated.
|
|
178
|
+
* @typedef AllAvailablePageSchema
|
|
179
|
+
* @property {AvailablePageSchema[]} [pages]
|
|
195
180
|
*/
|
|
196
181
|
|
|
197
182
|
/**
|
|
198
|
-
* @typedef
|
|
199
|
-
* @property {string}
|
|
200
|
-
* @property {GlobalSchema} [global_schema]
|
|
201
|
-
* @property {ThemeConfiguration[]} list - A list of configurations
|
|
202
|
-
* @property {Preset} [preset]
|
|
183
|
+
* @typedef AddThemeRequestSchema
|
|
184
|
+
* @property {string} [theme_id]
|
|
203
185
|
*/
|
|
204
186
|
|
|
205
187
|
/**
|
|
206
|
-
* @typedef
|
|
207
|
-
* @property {
|
|
208
|
-
* @property {string
|
|
188
|
+
* @typedef FontsSchema
|
|
189
|
+
* @property {FontsSchemaItems} [items]
|
|
190
|
+
* @property {string} [kind]
|
|
209
191
|
*/
|
|
210
192
|
|
|
211
193
|
/**
|
|
212
|
-
* @typedef
|
|
213
|
-
* @property {
|
|
194
|
+
* @typedef BlitzkriegApiErrorSchema
|
|
195
|
+
* @property {string} [message]
|
|
214
196
|
*/
|
|
215
197
|
|
|
216
198
|
/**
|
|
217
|
-
* @typedef
|
|
218
|
-
* @property {string} [
|
|
219
|
-
* @property {string} [button_add_to_cart_label_color] - The add to cart button
|
|
220
|
-
* label color
|
|
221
|
-
* @property {string} [button_primary_color] - The primary button color
|
|
222
|
-
* @property {string} [button_primary_label_color] - The primary button label color
|
|
223
|
-
* @property {string} [button_secondary_color] - The secondary button color
|
|
224
|
-
* @property {string} [button_secondary_label_color] - The secondary button label color
|
|
225
|
-
* @property {string} [button_tertiary_color] - The tertiary button color
|
|
226
|
-
* @property {string} [button_tertiary_hover_color] - The tertiary button hover color
|
|
227
|
-
* @property {string} [button_tertiary_hover_text_color] - The tertiary button
|
|
228
|
-
* hover text color
|
|
229
|
-
* @property {string} [button_tertiary_label_color] - The tertiary button label color
|
|
230
|
-
* @property {boolean} [disable_cart] - Whether to disable the cart or not
|
|
231
|
-
* @property {string} [footer_bg_color] - The footer background color
|
|
232
|
-
* @property {string} [footer_border_color] - The footer border color
|
|
233
|
-
* @property {string} [footer_nav_hover_color] - The footer navigation hover color
|
|
234
|
-
* @property {string} [footer_text_color] - The footer text color
|
|
235
|
-
* @property {string} [header_bg_color] - The header background color
|
|
236
|
-
* @property {string} [header_border_color] - The header border color
|
|
237
|
-
* @property {string} [header_cart_notification_bg_color] - The header cart
|
|
238
|
-
* notification background color
|
|
239
|
-
* @property {string} [header_cart_notification_text_color] - The header cart
|
|
240
|
-
* notification text color
|
|
241
|
-
* @property {string} [header_icon_color] - The header icon color
|
|
242
|
-
* @property {string} [header_nav_hover_color] - The header navigation hover color
|
|
243
|
-
* @property {string} [header_text_color] - The header text color
|
|
244
|
-
* @property {boolean} [is_menu_below_logo] - Whether the menu is below the logo or not
|
|
245
|
-
* @property {string} [menu_position] - The position of the menu
|
|
246
|
-
* @property {string} [text_body_color] - The text body color
|
|
247
|
-
* @property {string} [text_discount_color] - The text discount color
|
|
248
|
-
* @property {string} [text_heading_link_color] - The text heading link color
|
|
249
|
-
* @property {string} [text_price_color] - The text price color
|
|
250
|
-
* @property {string} [text_sale_price_color] - The text sale price color
|
|
251
|
-
* @property {string} [text_strikethrough_price_color] - The text strikethrough
|
|
252
|
-
* price color
|
|
199
|
+
* @typedef BlitzkriegInternalServerErrorSchema
|
|
200
|
+
* @property {string} [message]
|
|
253
201
|
*/
|
|
254
202
|
|
|
255
203
|
/**
|
|
256
|
-
* @typedef
|
|
257
|
-
* @property {string} [
|
|
258
|
-
* @property {string} [
|
|
204
|
+
* @typedef FontsSchemaItems
|
|
205
|
+
* @property {string} [family]
|
|
206
|
+
* @property {string[]} [variants]
|
|
207
|
+
* @property {string[]} [subsets]
|
|
208
|
+
* @property {string} [version]
|
|
209
|
+
* @property {string} [last_modified]
|
|
210
|
+
* @property {FontsSchemaItemsFiles} [files]
|
|
211
|
+
* @property {string} [category]
|
|
212
|
+
* @property {string} [kind]
|
|
259
213
|
*/
|
|
260
214
|
|
|
261
215
|
/**
|
|
262
|
-
* @typedef
|
|
263
|
-
* @property {string} [
|
|
216
|
+
* @typedef FontsSchemaItemsFiles
|
|
217
|
+
* @property {string} [regular]
|
|
218
|
+
* @property {string} [italic]
|
|
219
|
+
* @property {string} [bold]
|
|
264
220
|
*/
|
|
265
221
|
|
|
266
222
|
/**
|
|
267
|
-
* @typedef
|
|
268
|
-
* @property {
|
|
269
|
-
* @property {
|
|
223
|
+
* @typedef ThemesSchema
|
|
224
|
+
* @property {Font} [font]
|
|
225
|
+
* @property {Config} [config]
|
|
226
|
+
* @property {boolean} [applied] - Whether the theme has been applied or not
|
|
227
|
+
* @property {boolean} [is_private] - Whether the theme is private or not
|
|
228
|
+
* @property {string[]} [tags] - An array of tags associated with the theme
|
|
229
|
+
* @property {string} [_id] - The unique identifier of the theme
|
|
230
|
+
* @property {string} [application_id] - The ID of the application
|
|
231
|
+
* @property {string} [marketplace_theme_id] - The ID of the theme in the marketplace
|
|
232
|
+
* @property {ThemeMeta} [meta]
|
|
233
|
+
* @property {string} [name] - The name of the theme
|
|
234
|
+
* @property {string} [template_theme_id] - The ID of the template theme
|
|
235
|
+
* @property {string} [version] - The version of the theme
|
|
236
|
+
* @property {Object} [styles] - The styles associated with the theme
|
|
237
|
+
* @property {string} [created_at] - The creation timestamp of the theme
|
|
238
|
+
* @property {string} [updated_at] - The last update timestamp of the theme
|
|
239
|
+
* @property {Assets} [assets]
|
|
240
|
+
* @property {SectionItem[]} [available_sections] - Available sections information
|
|
241
|
+
* @property {string} [theme_type]
|
|
242
|
+
* @property {number} [company_id] - The company id in which sales channel exists
|
|
243
|
+
* @property {string} [src]
|
|
270
244
|
*/
|
|
271
245
|
|
|
272
246
|
/**
|
|
273
|
-
* @typedef
|
|
274
|
-
* @property {
|
|
275
|
-
* @property {
|
|
247
|
+
* @typedef ThemeUpgradableResponse
|
|
248
|
+
* @property {boolean} [upgrade] - Indicates if the theme is upgradable or not
|
|
249
|
+
* @property {ThemeVersions} [versions]
|
|
250
|
+
* @property {string} [message] - A message describing the theme upgrade status
|
|
276
251
|
*/
|
|
277
252
|
|
|
278
253
|
/**
|
|
279
|
-
* @typedef
|
|
280
|
-
* @property {string} [
|
|
281
|
-
* @property {string} [family]
|
|
282
|
-
* @property {FontsSchemaItemsFiles} [files]
|
|
283
|
-
* @property {string} [kind]
|
|
284
|
-
* @property {string} [last_modified]
|
|
285
|
-
* @property {string[]} [subsets]
|
|
286
|
-
* @property {string[]} [variants]
|
|
287
|
-
* @property {string} [version]
|
|
254
|
+
* @typedef UpdateThemeNameRequestBody
|
|
255
|
+
* @property {string} [name] - The new name of the theme.
|
|
288
256
|
*/
|
|
289
257
|
|
|
290
258
|
/**
|
|
291
|
-
* @typedef
|
|
292
|
-
* @property {
|
|
293
|
-
* @property {
|
|
294
|
-
* @property {string} [regular]
|
|
259
|
+
* @typedef UpdateThemeRequestBody
|
|
260
|
+
* @property {Config} [config]
|
|
261
|
+
* @property {Font} [font]
|
|
295
262
|
*/
|
|
296
263
|
|
|
297
264
|
/**
|
|
298
|
-
* @typedef
|
|
299
|
-
* @property {
|
|
300
|
-
* @property {string}
|
|
265
|
+
* @typedef Font
|
|
266
|
+
* @property {FontVariants} variants
|
|
267
|
+
* @property {string} family - The font family
|
|
301
268
|
*/
|
|
302
269
|
|
|
303
270
|
/**
|
|
304
271
|
* @typedef FontVariants
|
|
305
|
-
* @property {FontVariant} [bold]
|
|
306
272
|
* @property {FontVariant} [light]
|
|
307
|
-
* @property {FontVariant} [medium]
|
|
308
273
|
* @property {FontVariant} [regular]
|
|
274
|
+
* @property {FontVariant} [medium]
|
|
309
275
|
* @property {FontVariant} [semi_bold]
|
|
276
|
+
* @property {FontVariant} [bold]
|
|
310
277
|
*/
|
|
311
278
|
|
|
312
279
|
/**
|
|
313
|
-
* @typedef
|
|
314
|
-
* @property {
|
|
280
|
+
* @typedef FontVariant
|
|
281
|
+
* @property {string} name - The name of the font variant
|
|
282
|
+
* @property {string} file - The URL of the font file
|
|
315
283
|
*/
|
|
316
284
|
|
|
317
285
|
/**
|
|
318
|
-
* @typedef
|
|
319
|
-
* @property {string}
|
|
320
|
-
* @property {
|
|
286
|
+
* @typedef Config
|
|
287
|
+
* @property {string} current - The current configuration
|
|
288
|
+
* @property {ThemeConfiguration[]} list - A list of configurations
|
|
289
|
+
* @property {GlobalSchema} [global_schema]
|
|
290
|
+
* @property {Preset} [preset]
|
|
321
291
|
*/
|
|
322
292
|
|
|
323
293
|
/**
|
|
324
|
-
* @typedef
|
|
325
|
-
* @property {string} [
|
|
326
|
-
* @property {
|
|
294
|
+
* @typedef ThemeConfiguration
|
|
295
|
+
* @property {string} [name] - The name of the configuration
|
|
296
|
+
* @property {Object} [global_config]
|
|
297
|
+
* @property {ThemeConfigListPage[]} [page] - An array of pages
|
|
327
298
|
*/
|
|
328
299
|
|
|
329
300
|
/**
|
|
330
|
-
* @typedef
|
|
331
|
-
* @property {string} [
|
|
332
|
-
* @property {string} [
|
|
333
|
-
* @property {boolean} [is_default] - Whether the theme is the default theme.
|
|
334
|
-
* @property {Release} [release]
|
|
335
|
-
* @property {string} [updated_at] - Update date of the theme
|
|
301
|
+
* @typedef OverlayPopup
|
|
302
|
+
* @property {string} [dialog_backgroung]
|
|
303
|
+
* @property {string} [overlay]
|
|
336
304
|
*/
|
|
337
305
|
|
|
338
306
|
/**
|
|
339
|
-
* @typedef
|
|
340
|
-
* @property {
|
|
341
|
-
* @property {
|
|
307
|
+
* @typedef DividerStrokeHighlight
|
|
308
|
+
* @property {string} [divider_strokes]
|
|
309
|
+
* @property {string} [highlight]
|
|
342
310
|
*/
|
|
343
311
|
|
|
344
312
|
/**
|
|
345
|
-
* @typedef
|
|
346
|
-
* @property {string} [
|
|
347
|
-
* @property {string} [
|
|
313
|
+
* @typedef UserAlerts
|
|
314
|
+
* @property {string} [success_background]
|
|
315
|
+
* @property {string} [success_text]
|
|
316
|
+
* @property {string} [error_background]
|
|
317
|
+
* @property {string} [error_text]
|
|
318
|
+
* @property {string} [info_background]
|
|
319
|
+
* @property {string} [info_text]
|
|
348
320
|
*/
|
|
349
321
|
|
|
350
322
|
/**
|
|
351
|
-
* @typedef
|
|
352
|
-
* @property {
|
|
353
|
-
* @property {boolean} [
|
|
354
|
-
* @property {boolean} [has_previous]
|
|
355
|
-
* @property {number} [item_total]
|
|
356
|
-
* @property {string} [next_id]
|
|
357
|
-
* @property {number} [size]
|
|
358
|
-
* @property {string} type
|
|
323
|
+
* @typedef OrderTracking
|
|
324
|
+
* @property {boolean} [show_header]
|
|
325
|
+
* @property {boolean} [show_footer]
|
|
359
326
|
*/
|
|
360
327
|
|
|
361
328
|
/**
|
|
362
|
-
* @typedef
|
|
363
|
-
* @property {
|
|
364
|
-
* @property {
|
|
365
|
-
* @property {ThemeUserSchema} [user]
|
|
329
|
+
* @typedef ThemeConfigListPage
|
|
330
|
+
* @property {string} [page] - Name of the page
|
|
331
|
+
* @property {ThemeConfigListPageSettingsProps} [settings]
|
|
366
332
|
*/
|
|
367
333
|
|
|
368
334
|
/**
|
|
369
|
-
* @typedef
|
|
370
|
-
* @property {
|
|
335
|
+
* @typedef ThemeConfigListPageSettingsProps
|
|
336
|
+
* @property {Object} [props]
|
|
371
337
|
*/
|
|
372
338
|
|
|
373
339
|
/**
|
|
374
|
-
* @typedef
|
|
375
|
-
* @property {
|
|
376
|
-
* @property {string} [id] - The ID of the property
|
|
377
|
-
* @property {string} [info] - Additional information about the property
|
|
378
|
-
* @property {string} [label] - The label of the property
|
|
379
|
-
* @property {string} [type] - The type of the property
|
|
380
|
-
* @property {string} [value] - The value of the property
|
|
340
|
+
* @typedef CustomConfig
|
|
341
|
+
* @property {CustomProps} [props]
|
|
381
342
|
*/
|
|
382
343
|
|
|
383
344
|
/**
|
|
384
|
-
* @typedef
|
|
385
|
-
* @property {
|
|
386
|
-
* @property {
|
|
345
|
+
* @typedef ThemeMeta
|
|
346
|
+
* @property {ThemePayment} [payment]
|
|
347
|
+
* @property {string} [description] - The description of the theme
|
|
348
|
+
* @property {string[]} [industry] - An array of industries associated with the theme
|
|
349
|
+
* @property {Release} [release]
|
|
350
|
+
* @property {Images} [images]
|
|
351
|
+
* @property {string} [slug] - The slug of the theme
|
|
352
|
+
* @property {string} [name] - The name of the theme
|
|
387
353
|
*/
|
|
388
354
|
|
|
389
355
|
/**
|
|
@@ -393,199 +359,233 @@ const Joi = require("joi");
|
|
|
393
359
|
*/
|
|
394
360
|
|
|
395
361
|
/**
|
|
396
|
-
* @typedef
|
|
397
|
-
* @property {string} [
|
|
398
|
-
* @property {string} [
|
|
362
|
+
* @typedef Images
|
|
363
|
+
* @property {string} [desktop] - The URL of the desktop image
|
|
364
|
+
* @property {string} [mobile] - The URL of the mobile image
|
|
399
365
|
*/
|
|
400
366
|
|
|
401
367
|
/**
|
|
402
|
-
* @typedef
|
|
403
|
-
* @property {
|
|
404
|
-
* @property {
|
|
405
|
-
* @property {
|
|
368
|
+
* @typedef CustomProps
|
|
369
|
+
* @property {string} [header_bg_color] - The header background color
|
|
370
|
+
* @property {string} [header_text_color] - The header text color
|
|
371
|
+
* @property {string} [header_border_color] - The header border color
|
|
372
|
+
* @property {string} [header_icon_color] - The header icon color
|
|
373
|
+
* @property {string} [header_cart_notification_bg_color] - The header cart
|
|
374
|
+
* notification background color
|
|
375
|
+
* @property {string} [header_cart_notification_text_color] - The header cart
|
|
376
|
+
* notification text color
|
|
377
|
+
* @property {string} [header_nav_hover_color] - The header navigation hover color
|
|
378
|
+
* @property {string} [button_primary_color] - The primary button color
|
|
379
|
+
* @property {string} [button_primary_label_color] - The primary button label color
|
|
380
|
+
* @property {string} [button_add_to_cart_color] - The add to cart button color
|
|
381
|
+
* @property {string} [button_add_to_cart_label_color] - The add to cart button
|
|
382
|
+
* label color
|
|
383
|
+
* @property {string} [button_secondary_color] - The secondary button color
|
|
384
|
+
* @property {string} [button_secondary_label_color] - The secondary button label color
|
|
385
|
+
* @property {string} [button_tertiary_color] - The tertiary button color
|
|
386
|
+
* @property {string} [button_tertiary_label_color] - The tertiary button label color
|
|
387
|
+
* @property {string} [button_tertiary_hover_color] - The tertiary button hover color
|
|
388
|
+
* @property {string} [button_tertiary_hover_text_color] - The tertiary button
|
|
389
|
+
* hover text color
|
|
390
|
+
* @property {string} [text_heading_link_color] - The text heading link color
|
|
391
|
+
* @property {string} [text_body_color] - The text body color
|
|
392
|
+
* @property {string} [text_price_color] - The text price color
|
|
393
|
+
* @property {string} [text_sale_price_color] - The text sale price color
|
|
394
|
+
* @property {string} [text_strikethrough_price_color] - The text strikethrough
|
|
395
|
+
* price color
|
|
396
|
+
* @property {string} [text_discount_color] - The text discount color
|
|
397
|
+
* @property {string} [footer_bg_color] - The footer background color
|
|
398
|
+
* @property {string} [footer_text_color] - The footer text color
|
|
399
|
+
* @property {string} [footer_border_color] - The footer border color
|
|
400
|
+
* @property {string} [footer_nav_hover_color] - The footer navigation hover color
|
|
401
|
+
* @property {boolean} [disable_cart] - Whether to disable the cart or not
|
|
402
|
+
* @property {boolean} [is_menu_below_logo] - Whether the menu is below the logo or not
|
|
403
|
+
* @property {string} [menu_position] - The position of the menu
|
|
406
404
|
*/
|
|
407
405
|
|
|
408
406
|
/**
|
|
409
|
-
* @typedef
|
|
410
|
-
* @property {
|
|
411
|
-
* @property {string} [name] - The name of the section.
|
|
412
|
-
* @property {Predicate} [predicate]
|
|
413
|
-
* @property {SectionPreset} [preset]
|
|
414
|
-
* @property {SectionProps} [props]
|
|
407
|
+
* @typedef GlobalSchema
|
|
408
|
+
* @property {Prop[]} [props]
|
|
415
409
|
*/
|
|
416
410
|
|
|
417
411
|
/**
|
|
418
|
-
* @typedef
|
|
419
|
-
* @property {
|
|
420
|
-
* @property {string} [
|
|
421
|
-
* @property {string} [
|
|
422
|
-
* @property {
|
|
412
|
+
* @typedef Prop
|
|
413
|
+
* @property {string} [type] - The type of the property
|
|
414
|
+
* @property {string} [category] - The category of the property
|
|
415
|
+
* @property {string} [value] - The value of the property
|
|
416
|
+
* @property {string} [id] - The ID of the property
|
|
417
|
+
* @property {string} [label] - The label of the property
|
|
418
|
+
* @property {string} [info] - Additional information about the property
|
|
423
419
|
*/
|
|
424
420
|
|
|
425
421
|
/**
|
|
426
|
-
* @typedef
|
|
427
|
-
* @property {
|
|
422
|
+
* @typedef Assets
|
|
423
|
+
* @property {UMDJs} [umd_js]
|
|
424
|
+
* @property {CommonJS} [common_js]
|
|
425
|
+
* @property {CSS} [css]
|
|
428
426
|
*/
|
|
429
427
|
|
|
430
428
|
/**
|
|
431
|
-
* @typedef
|
|
432
|
-
* @property {
|
|
433
|
-
* @property {
|
|
434
|
-
* @property {RangeProp} [slide_interval]
|
|
435
|
-
* @property {TextProp} [title]
|
|
429
|
+
* @typedef UMDJs
|
|
430
|
+
* @property {string} [link]
|
|
431
|
+
* @property {string[]} [links] - An array of pages
|
|
436
432
|
*/
|
|
437
433
|
|
|
438
434
|
/**
|
|
439
|
-
* @typedef
|
|
440
|
-
* @property {
|
|
441
|
-
* @property {string} [url]
|
|
435
|
+
* @typedef CommonJS
|
|
436
|
+
* @property {string} [link]
|
|
442
437
|
*/
|
|
443
438
|
|
|
444
439
|
/**
|
|
445
|
-
* @typedef
|
|
446
|
-
* @property {
|
|
447
|
-
* @property {string} [
|
|
440
|
+
* @typedef CSS
|
|
441
|
+
* @property {string} [link]
|
|
442
|
+
* @property {string[]} [links]
|
|
448
443
|
*/
|
|
449
444
|
|
|
450
445
|
/**
|
|
451
|
-
* @typedef
|
|
452
|
-
* @property {
|
|
453
|
-
* @property {
|
|
446
|
+
* @typedef SectionItem
|
|
447
|
+
* @property {Object[]} [props]
|
|
448
|
+
* @property {Object[]} [blocks] - Blocks
|
|
449
|
+
* @property {string} [name] - Name of the section
|
|
450
|
+
* @property {string} [label] - Label for the section
|
|
451
|
+
*/
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* @typedef Preset
|
|
455
|
+
* @property {Page[]} [pages]
|
|
456
|
+
*/
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* @typedef Page
|
|
460
|
+
* @property {number} [item_total]
|
|
461
|
+
* @property {string} [next_id]
|
|
462
|
+
* @property {boolean} [has_previous]
|
|
463
|
+
* @property {boolean} [has_next]
|
|
464
|
+
* @property {number} [current]
|
|
465
|
+
* @property {string} type
|
|
466
|
+
* @property {number} [size]
|
|
454
467
|
*/
|
|
455
468
|
|
|
456
469
|
/**
|
|
457
|
-
* @typedef
|
|
458
|
-
* @property {
|
|
459
|
-
* @property {
|
|
470
|
+
* @typedef Section
|
|
471
|
+
* @property {Block[]} [blocks]
|
|
472
|
+
* @property {Predicate} [predicate]
|
|
473
|
+
* @property {string} [name] - The name of the section.
|
|
474
|
+
* @property {SectionProps} [props]
|
|
475
|
+
* @property {SectionPreset} [preset]
|
|
460
476
|
*/
|
|
461
477
|
|
|
462
478
|
/**
|
|
463
|
-
* @typedef
|
|
464
|
-
* @property {string} [type] - The type of the
|
|
465
|
-
* @property {string} [
|
|
479
|
+
* @typedef Block
|
|
480
|
+
* @property {string} [type] - The type of the block.
|
|
481
|
+
* @property {string} [name] - The name of the block.
|
|
482
|
+
* @property {BlockProps} [props]
|
|
466
483
|
*/
|
|
467
484
|
|
|
468
485
|
/**
|
|
469
|
-
* @typedef
|
|
470
|
-
* @property {
|
|
471
|
-
* @property {
|
|
486
|
+
* @typedef Predicate
|
|
487
|
+
* @property {Screen} [screen]
|
|
488
|
+
* @property {ThemeUserSchema} [user]
|
|
489
|
+
* @property {Route} [route]
|
|
472
490
|
*/
|
|
473
491
|
|
|
474
492
|
/**
|
|
475
|
-
* @typedef
|
|
476
|
-
* @property {
|
|
493
|
+
* @typedef Screen
|
|
494
|
+
* @property {boolean} [mobile] - True if the screen is a mobile device.
|
|
495
|
+
* @property {boolean} [desktop] - True if the screen is a desktop device.
|
|
496
|
+
* @property {boolean} [tablet] - True if the screen is a tablet device.
|
|
477
497
|
*/
|
|
478
498
|
|
|
479
499
|
/**
|
|
480
|
-
* @typedef
|
|
481
|
-
* @property {
|
|
482
|
-
* @property {
|
|
483
|
-
* @property {ThemeConfigListPage[]} [page] - An array of pages
|
|
500
|
+
* @typedef ThemeUserSchema
|
|
501
|
+
* @property {boolean} [authenticated] - True if the user is authenticated.
|
|
502
|
+
* @property {boolean} [anonymous] - True if the user is anonymous.
|
|
484
503
|
*/
|
|
485
504
|
|
|
486
505
|
/**
|
|
487
|
-
* @typedef
|
|
488
|
-
* @property {string} [
|
|
489
|
-
* @property {string} [
|
|
506
|
+
* @typedef Route
|
|
507
|
+
* @property {string} [selected] - The selected route.
|
|
508
|
+
* @property {string} [exact_url] - The exact URL of the route.
|
|
490
509
|
*/
|
|
491
510
|
|
|
492
511
|
/**
|
|
493
|
-
* @typedef
|
|
494
|
-
* @property {
|
|
495
|
-
* @property {
|
|
496
|
-
* @property {
|
|
497
|
-
* @property {
|
|
498
|
-
* @property {ThemePayment} [payment]
|
|
499
|
-
* @property {Release} [release]
|
|
500
|
-
* @property {string} [slug] - The slug of the theme
|
|
512
|
+
* @typedef SectionProps
|
|
513
|
+
* @property {TextProp} [title]
|
|
514
|
+
* @property {TextProp} [item_margin]
|
|
515
|
+
* @property {CheckboxProp} [autoplay]
|
|
516
|
+
* @property {RangeProp} [slide_interval]
|
|
501
517
|
*/
|
|
502
518
|
|
|
503
519
|
/**
|
|
504
|
-
* @typedef
|
|
505
|
-
* @property {
|
|
506
|
-
* @property {boolean} [is_paid] - Whether the theme is a paid theme.
|
|
520
|
+
* @typedef SectionPreset
|
|
521
|
+
* @property {Block[]} [blocks]
|
|
507
522
|
*/
|
|
508
523
|
|
|
509
524
|
/**
|
|
510
|
-
* @typedef
|
|
511
|
-
* @property {
|
|
512
|
-
*
|
|
525
|
+
* @typedef BlockProps
|
|
526
|
+
* @property {ImagePickerProp} [image]
|
|
527
|
+
* @property {UrlProp} [slide_link]
|
|
513
528
|
*/
|
|
514
529
|
|
|
515
530
|
/**
|
|
516
|
-
* @typedef
|
|
517
|
-
* @property {string} [
|
|
518
|
-
* @property {string} [
|
|
519
|
-
* @property {boolean} [applied] - Whether the theme has been applied or not
|
|
520
|
-
* @property {Assets} [assets]
|
|
521
|
-
* @property {SectionItem[]} [available_sections] - Available sections information
|
|
522
|
-
* @property {number} [company_id] - The company id in which sales channel exists
|
|
523
|
-
* @property {Config} [config]
|
|
524
|
-
* @property {string} [created_at] - The creation timestamp of the theme
|
|
525
|
-
* @property {Font} [font]
|
|
526
|
-
* @property {boolean} [is_private] - Whether the theme is private or not
|
|
527
|
-
* @property {string} [marketplace_theme_id] - The ID of the theme in the marketplace
|
|
528
|
-
* @property {ThemeMeta} [meta]
|
|
529
|
-
* @property {string} [name] - The name of the theme
|
|
530
|
-
* @property {string} [src]
|
|
531
|
-
* @property {Object} [styles] - The styles associated with the theme
|
|
532
|
-
* @property {string[]} [tags] - An array of tags associated with the theme
|
|
533
|
-
* @property {string} [template_theme_id] - The ID of the template theme
|
|
534
|
-
* @property {string} [theme_type]
|
|
535
|
-
* @property {string} [updated_at] - The last update timestamp of the theme
|
|
536
|
-
* @property {string} [version] - The version of the theme
|
|
531
|
+
* @typedef TextProp
|
|
532
|
+
* @property {string} [value] - The value of the text property.
|
|
533
|
+
* @property {string} [type] - The type of the property.
|
|
537
534
|
*/
|
|
538
535
|
|
|
539
536
|
/**
|
|
540
|
-
* @typedef
|
|
541
|
-
* @property {
|
|
542
|
-
* @property {
|
|
543
|
-
* @property {ThemeVersions} [versions]
|
|
537
|
+
* @typedef CheckboxProp
|
|
538
|
+
* @property {boolean} [value] - The value of the checkbox property.
|
|
539
|
+
* @property {string} [type] - The type of the property.
|
|
544
540
|
*/
|
|
545
541
|
|
|
546
542
|
/**
|
|
547
|
-
* @typedef
|
|
548
|
-
* @property {
|
|
549
|
-
* @property {
|
|
543
|
+
* @typedef RangeProp
|
|
544
|
+
* @property {number} [value] - The value of the range property.
|
|
545
|
+
* @property {string} [type] - The type of the property.
|
|
550
546
|
*/
|
|
551
547
|
|
|
552
548
|
/**
|
|
553
|
-
* @typedef
|
|
554
|
-
* @property {string} [
|
|
555
|
-
* @property {string} [
|
|
549
|
+
* @typedef ImagePickerProp
|
|
550
|
+
* @property {string} [type] - The type of the property.
|
|
551
|
+
* @property {string} [value] - The value of the image picker property.
|
|
556
552
|
*/
|
|
557
553
|
|
|
558
554
|
/**
|
|
559
|
-
* @typedef
|
|
560
|
-
* @property {string} [
|
|
561
|
-
* @property {string
|
|
555
|
+
* @typedef UrlProp
|
|
556
|
+
* @property {string} [type] - The type of the property.
|
|
557
|
+
* @property {string} [value] - The value of the URL property.
|
|
562
558
|
*/
|
|
563
559
|
|
|
564
560
|
/**
|
|
565
|
-
* @typedef
|
|
566
|
-
* @property {string} [
|
|
561
|
+
* @typedef ThemeVersions
|
|
562
|
+
* @property {string} [parent_theme] - The version of the parent theme
|
|
563
|
+
* @property {string} [applied_theme] - The version of the applied theme
|
|
567
564
|
*/
|
|
568
565
|
|
|
569
566
|
/**
|
|
570
|
-
* @typedef
|
|
571
|
-
* @property {
|
|
572
|
-
* @property {Font} [font]
|
|
567
|
+
* @typedef DummyResponse
|
|
568
|
+
* @property {string} [message]
|
|
573
569
|
*/
|
|
574
570
|
|
|
575
571
|
/**
|
|
576
|
-
* @typedef
|
|
577
|
-
* @property {string} [
|
|
578
|
-
* @property {string} [
|
|
572
|
+
* @typedef AppliedThemes
|
|
573
|
+
* @property {string} [_id] - ID of the application theme
|
|
574
|
+
* @property {string} [application_id] - ID of the application
|
|
579
575
|
*/
|
|
580
576
|
|
|
581
577
|
/**
|
|
582
|
-
* @typedef
|
|
583
|
-
* @property {string} [
|
|
584
|
-
* @property {string} [
|
|
585
|
-
* @property {string} [
|
|
586
|
-
* @property {string} [
|
|
587
|
-
* @property {string} [
|
|
588
|
-
* @property {string} [
|
|
578
|
+
* @typedef CompanyPrivateTheme
|
|
579
|
+
* @property {string} [theme_type] - Type of the theme
|
|
580
|
+
* @property {string} [_id] - Unique identifier for the theme
|
|
581
|
+
* @property {string} [name] - Name of the theme
|
|
582
|
+
* @property {string} [version] - Version of the theme
|
|
583
|
+
* @property {string} [application_id] - Identifier for the application
|
|
584
|
+
* @property {string} [created_at] - Date and time when the theme was created
|
|
585
|
+
* @property {string} [updated_at] - Date and time when the theme was last updated
|
|
586
|
+
* @property {boolean} [applied] - Whether the theme is applied or not
|
|
587
|
+
* @property {boolean} [is_private] - Whether the theme is private or not
|
|
588
|
+
* @property {CompanyThemeMeta} [meta]
|
|
589
589
|
*/
|
|
590
590
|
|
|
591
591
|
/**
|
|
@@ -638,748 +638,748 @@ const Joi = require("joi");
|
|
|
638
638
|
*/
|
|
639
639
|
|
|
640
640
|
class ThemePlatformModel {
|
|
641
|
-
/** @returns {
|
|
642
|
-
static
|
|
641
|
+
/** @returns {ThemeReq} */
|
|
642
|
+
static ThemeReq() {
|
|
643
643
|
return Joi.object({
|
|
644
|
-
|
|
645
|
-
popup: ThemePlatformModel.ActionPage(),
|
|
646
|
-
type: Joi.string().allow(""),
|
|
644
|
+
marketplace_theme_id: Joi.string().allow(""),
|
|
647
645
|
});
|
|
648
646
|
}
|
|
649
647
|
|
|
650
|
-
/** @returns {
|
|
651
|
-
static
|
|
648
|
+
/** @returns {CompanyThemeSchema} */
|
|
649
|
+
static CompanyThemeSchema() {
|
|
652
650
|
return Joi.object({
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
),
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
),
|
|
661
|
-
type: ThemePlatformModel.PageType().required(),
|
|
662
|
-
url: Joi.string().allow(""),
|
|
651
|
+
_id: Joi.string().allow(""),
|
|
652
|
+
name: Joi.string().allow(""),
|
|
653
|
+
marketplace_theme_id: ThemePlatformModel.MarketplaceThemeId(),
|
|
654
|
+
company_id: Joi.number(),
|
|
655
|
+
meta: ThemePlatformModel.CompanyThemeMeta(),
|
|
656
|
+
created_at: Joi.string().allow(""),
|
|
657
|
+
updated_at: Joi.string().allow(""),
|
|
658
|
+
applied_themes: Joi.array().items(ThemePlatformModel.AppliedThemes()),
|
|
663
659
|
});
|
|
664
660
|
}
|
|
665
661
|
|
|
666
|
-
/** @returns {
|
|
667
|
-
static
|
|
662
|
+
/** @returns {MarketplaceThemeId} */
|
|
663
|
+
static MarketplaceThemeId() {
|
|
668
664
|
return Joi.object({
|
|
669
|
-
|
|
665
|
+
_id: Joi.string().allow(""),
|
|
666
|
+
is_default: Joi.boolean(),
|
|
667
|
+
release: ThemePlatformModel.Release(),
|
|
668
|
+
created_at: Joi.string().allow(""),
|
|
669
|
+
updated_at: Joi.string().allow(""),
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
672
|
|
|
673
|
-
/** @returns {
|
|
674
|
-
static
|
|
673
|
+
/** @returns {CompanyThemeMeta} */
|
|
674
|
+
static CompanyThemeMeta() {
|
|
675
675
|
return Joi.object({
|
|
676
|
-
|
|
676
|
+
payment: ThemePlatformModel.ThemePayment(),
|
|
677
|
+
industry: Joi.array().items(Joi.string().allow("")),
|
|
678
|
+
description: Joi.string().allow(""),
|
|
679
|
+
images: ThemePlatformModel.ThemeImages(),
|
|
680
|
+
slug: Joi.string().allow(""),
|
|
677
681
|
});
|
|
678
682
|
}
|
|
679
683
|
|
|
680
|
-
/** @returns {
|
|
681
|
-
static
|
|
684
|
+
/** @returns {ThemePayment} */
|
|
685
|
+
static ThemePayment() {
|
|
682
686
|
return Joi.object({
|
|
683
|
-
|
|
684
|
-
|
|
687
|
+
is_paid: Joi.boolean(),
|
|
688
|
+
amount: Joi.number(),
|
|
685
689
|
});
|
|
686
690
|
}
|
|
687
691
|
|
|
688
|
-
/** @returns {
|
|
689
|
-
static
|
|
692
|
+
/** @returns {ThemeImages} */
|
|
693
|
+
static ThemeImages() {
|
|
690
694
|
return Joi.object({
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
umd_js: ThemePlatformModel.UMDJs(),
|
|
695
|
+
desktop: Joi.string().allow(""),
|
|
696
|
+
mobile: Joi.string().allow(""),
|
|
694
697
|
});
|
|
695
698
|
}
|
|
696
699
|
|
|
697
|
-
/** @returns {
|
|
698
|
-
static
|
|
700
|
+
/** @returns {AvailablePageSchema} */
|
|
701
|
+
static AvailablePageSchema() {
|
|
699
702
|
return Joi.object({
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
+
value: Joi.string().allow(""),
|
|
704
|
+
text: Joi.string().allow(""),
|
|
705
|
+
path: Joi.string().allow(""),
|
|
706
|
+
type: Joi.string().allow(""),
|
|
707
|
+
sections: Joi.array().items(
|
|
708
|
+
ThemePlatformModel.AvailablePageSchemaSections()
|
|
709
|
+
),
|
|
710
|
+
sections_meta: Joi.array().items(
|
|
711
|
+
ThemePlatformModel.AvailablePageSectionMetaAttributes()
|
|
712
|
+
),
|
|
713
|
+
theme: Joi.string().allow(""),
|
|
714
|
+
seo: ThemePlatformModel.AvailablePageSeo(),
|
|
715
|
+
props: Joi.array().items(Joi.any()),
|
|
716
|
+
_id: Joi.string().allow(""),
|
|
717
|
+
created_at: Joi.string().allow(""),
|
|
718
|
+
updated_at: Joi.string().allow(""),
|
|
703
719
|
});
|
|
704
720
|
}
|
|
705
721
|
|
|
706
|
-
/** @returns {
|
|
707
|
-
static
|
|
722
|
+
/** @returns {AvailablePageSectionMetaAttributes} */
|
|
723
|
+
static AvailablePageSectionMetaAttributes() {
|
|
708
724
|
return Joi.object({
|
|
709
|
-
|
|
710
|
-
route: ThemePlatformModel.AvailablePageRoutePredicate(),
|
|
711
|
-
schedule: ThemePlatformModel.AvailablePageSchedulePredicate(),
|
|
712
|
-
screen: ThemePlatformModel.AvailablePageScreenPredicate(),
|
|
713
|
-
user: ThemePlatformModel.AvailablePageUserPredicate(),
|
|
714
|
-
zones: Joi.array().items(Joi.string().allow("")),
|
|
725
|
+
attributes: Joi.any(),
|
|
715
726
|
});
|
|
716
727
|
}
|
|
717
728
|
|
|
718
|
-
/** @returns {
|
|
719
|
-
static
|
|
729
|
+
/** @returns {SEOMetaItem} */
|
|
730
|
+
static SEOMetaItem() {
|
|
720
731
|
return Joi.object({
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
selected: Joi.string().allow(""),
|
|
732
|
+
title: Joi.string().allow(""),
|
|
733
|
+
items: Joi.array().items(ThemePlatformModel.SEOMetaItems()),
|
|
724
734
|
});
|
|
725
735
|
}
|
|
726
736
|
|
|
727
|
-
/** @returns {
|
|
728
|
-
static
|
|
737
|
+
/** @returns {SEOMetaItems} */
|
|
738
|
+
static SEOMetaItems() {
|
|
729
739
|
return Joi.object({
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
start: Joi.string().allow(""),
|
|
740
|
+
key: Joi.string().allow(""),
|
|
741
|
+
value: Joi.string().allow(""),
|
|
733
742
|
});
|
|
734
743
|
}
|
|
735
744
|
|
|
736
|
-
/** @returns {
|
|
737
|
-
static
|
|
745
|
+
/** @returns {SEOSitemap} */
|
|
746
|
+
static SEOSitemap() {
|
|
738
747
|
return Joi.object({
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
path: Joi.string().allow(""),
|
|
742
|
-
props: Joi.array().items(Joi.any()),
|
|
743
|
-
sections: Joi.array().items(
|
|
744
|
-
ThemePlatformModel.AvailablePageSchemaSections()
|
|
745
|
-
),
|
|
746
|
-
sections_meta: Joi.array().items(
|
|
747
|
-
ThemePlatformModel.AvailablePageSectionMetaAttributes()
|
|
748
|
-
),
|
|
749
|
-
seo: ThemePlatformModel.AvailablePageSeo(),
|
|
750
|
-
text: Joi.string().allow(""),
|
|
751
|
-
theme: Joi.string().allow(""),
|
|
752
|
-
type: Joi.string().allow(""),
|
|
753
|
-
updated_at: Joi.string().allow(""),
|
|
754
|
-
value: Joi.string().allow(""),
|
|
748
|
+
priority: Joi.number(),
|
|
749
|
+
frequency: Joi.string().allow(""),
|
|
755
750
|
});
|
|
756
751
|
}
|
|
757
752
|
|
|
758
|
-
/** @returns {
|
|
759
|
-
static
|
|
753
|
+
/** @returns {SEObreadcrumb} */
|
|
754
|
+
static SEObreadcrumb() {
|
|
760
755
|
return Joi.object({
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
name: Joi.string().allow(""),
|
|
764
|
-
predicate: ThemePlatformModel.AvailablePagePredicate(),
|
|
765
|
-
preset: Joi.any(),
|
|
766
|
-
props: Joi.any(),
|
|
767
|
-
source: Joi.string().allow(""),
|
|
756
|
+
url: Joi.string().allow(""),
|
|
757
|
+
action: ThemePlatformModel.Action(),
|
|
768
758
|
});
|
|
769
759
|
}
|
|
770
760
|
|
|
771
|
-
/** @returns {
|
|
772
|
-
static
|
|
761
|
+
/** @returns {Action} */
|
|
762
|
+
static Action() {
|
|
773
763
|
return Joi.object({
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
764
|
+
page: ThemePlatformModel.ActionPage(),
|
|
765
|
+
popup: ThemePlatformModel.ActionPage(),
|
|
766
|
+
type: Joi.string().allow(""),
|
|
777
767
|
});
|
|
778
768
|
}
|
|
779
769
|
|
|
780
|
-
/** @returns {
|
|
781
|
-
static
|
|
770
|
+
/** @returns {ActionPage} */
|
|
771
|
+
static ActionPage() {
|
|
782
772
|
return Joi.object({
|
|
783
|
-
|
|
773
|
+
params: Joi.object().pattern(
|
|
774
|
+
/\S/,
|
|
775
|
+
Joi.array().items(Joi.string().allow(""))
|
|
776
|
+
),
|
|
777
|
+
query: Joi.object().pattern(
|
|
778
|
+
/\S/,
|
|
779
|
+
Joi.array().items(Joi.string().allow(""))
|
|
780
|
+
),
|
|
781
|
+
url: Joi.string().allow(""),
|
|
782
|
+
type: ThemePlatformModel.PageType().required(),
|
|
784
783
|
});
|
|
785
784
|
}
|
|
786
785
|
|
|
787
786
|
/** @returns {AvailablePageSeo} */
|
|
788
787
|
static AvailablePageSeo() {
|
|
789
788
|
return Joi.object({
|
|
790
|
-
|
|
791
|
-
breadcrumb: Joi.array().items(ThemePlatformModel.SEObreadcrumb()),
|
|
789
|
+
title: Joi.string().allow(""),
|
|
792
790
|
description: Joi.string().allow(""),
|
|
793
791
|
meta_tags: Joi.array().items(ThemePlatformModel.SEOMetaItem()),
|
|
794
792
|
sitemap: ThemePlatformModel.SEOSitemap(),
|
|
795
|
-
|
|
793
|
+
breadcrumb: Joi.array().items(ThemePlatformModel.SEObreadcrumb()),
|
|
794
|
+
_id: Joi.string().allow(""),
|
|
796
795
|
});
|
|
797
796
|
}
|
|
798
797
|
|
|
799
|
-
/** @returns {
|
|
800
|
-
static
|
|
798
|
+
/** @returns {AvailablePageSchemaSections} */
|
|
799
|
+
static AvailablePageSchemaSections() {
|
|
801
800
|
return Joi.object({
|
|
802
|
-
|
|
803
|
-
|
|
801
|
+
name: Joi.string().allow(""),
|
|
802
|
+
label: Joi.string().allow(""),
|
|
803
|
+
props: Joi.any(),
|
|
804
|
+
blocks: Joi.array().items(Joi.any()),
|
|
805
|
+
preset: Joi.any(),
|
|
806
|
+
predicate: ThemePlatformModel.AvailablePagePredicate(),
|
|
807
|
+
source: Joi.string().allow(""),
|
|
804
808
|
});
|
|
805
809
|
}
|
|
806
810
|
|
|
807
|
-
/** @returns {
|
|
808
|
-
static
|
|
811
|
+
/** @returns {AvailablePagePredicate} */
|
|
812
|
+
static AvailablePagePredicate() {
|
|
809
813
|
return Joi.object({
|
|
810
|
-
|
|
814
|
+
screen: ThemePlatformModel.AvailablePageScreenPredicate(),
|
|
815
|
+
user: ThemePlatformModel.AvailablePageUserPredicate(),
|
|
816
|
+
route: ThemePlatformModel.AvailablePageRoutePredicate(),
|
|
817
|
+
schedule: ThemePlatformModel.AvailablePageSchedulePredicate(),
|
|
818
|
+
platform: ThemePlatformModel.AvailablePagePlatformPredicate(),
|
|
819
|
+
zones: Joi.array().items(Joi.string().allow("")),
|
|
811
820
|
});
|
|
812
821
|
}
|
|
813
822
|
|
|
814
|
-
/** @returns {
|
|
815
|
-
static
|
|
823
|
+
/** @returns {AvailablePageScreenPredicate} */
|
|
824
|
+
static AvailablePageScreenPredicate() {
|
|
816
825
|
return Joi.object({
|
|
817
|
-
|
|
826
|
+
mobile: Joi.boolean(),
|
|
827
|
+
desktop: Joi.boolean(),
|
|
828
|
+
tablet: Joi.boolean(),
|
|
818
829
|
});
|
|
819
830
|
}
|
|
820
831
|
|
|
821
|
-
/** @returns {
|
|
822
|
-
static
|
|
832
|
+
/** @returns {AvailablePageUserPredicate} */
|
|
833
|
+
static AvailablePageUserPredicate() {
|
|
823
834
|
return Joi.object({
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
type: Joi.string().allow(""),
|
|
835
|
+
authenticated: Joi.boolean(),
|
|
836
|
+
anonymous: Joi.boolean(),
|
|
827
837
|
});
|
|
828
838
|
}
|
|
829
839
|
|
|
830
|
-
/** @returns {
|
|
831
|
-
static
|
|
840
|
+
/** @returns {AvailablePageRoutePredicate} */
|
|
841
|
+
static AvailablePageRoutePredicate() {
|
|
832
842
|
return Joi.object({
|
|
833
|
-
|
|
834
|
-
|
|
843
|
+
selected: Joi.string().allow(""),
|
|
844
|
+
exact_url: Joi.string().allow(""),
|
|
845
|
+
query: Joi.any(),
|
|
835
846
|
});
|
|
836
847
|
}
|
|
837
848
|
|
|
838
|
-
/** @returns {
|
|
839
|
-
static
|
|
849
|
+
/** @returns {AvailablePagePlatformPredicate} */
|
|
850
|
+
static AvailablePagePlatformPredicate() {
|
|
840
851
|
return Joi.object({
|
|
841
|
-
|
|
842
|
-
|
|
852
|
+
ios: Joi.boolean(),
|
|
853
|
+
android: Joi.boolean(),
|
|
854
|
+
web: Joi.boolean(),
|
|
843
855
|
});
|
|
844
856
|
}
|
|
845
857
|
|
|
846
|
-
/** @returns {
|
|
847
|
-
static
|
|
858
|
+
/** @returns {AvailablePageSchedulePredicate} */
|
|
859
|
+
static AvailablePageSchedulePredicate() {
|
|
848
860
|
return Joi.object({
|
|
849
|
-
|
|
861
|
+
cron: Joi.string().allow(""),
|
|
862
|
+
start: Joi.string().allow(""),
|
|
863
|
+
end: Joi.string().allow(""),
|
|
850
864
|
});
|
|
851
865
|
}
|
|
852
866
|
|
|
853
|
-
/** @returns {
|
|
854
|
-
static
|
|
867
|
+
/** @returns {AllAvailablePageSchema} */
|
|
868
|
+
static AllAvailablePageSchema() {
|
|
855
869
|
return Joi.object({
|
|
856
|
-
|
|
857
|
-
application_id: Joi.string().allow(""),
|
|
858
|
-
applied: Joi.boolean(),
|
|
859
|
-
created_at: Joi.string().allow(""),
|
|
860
|
-
is_private: Joi.boolean(),
|
|
861
|
-
meta: ThemePlatformModel.CompanyThemeMeta(),
|
|
862
|
-
name: Joi.string().allow(""),
|
|
863
|
-
theme_type: Joi.string().allow(""),
|
|
864
|
-
updated_at: Joi.string().allow(""),
|
|
865
|
-
version: Joi.string().allow(""),
|
|
870
|
+
pages: Joi.array().items(ThemePlatformModel.AvailablePageSchema()),
|
|
866
871
|
});
|
|
867
872
|
}
|
|
868
873
|
|
|
869
|
-
/** @returns {
|
|
870
|
-
static
|
|
874
|
+
/** @returns {AddThemeRequestSchema} */
|
|
875
|
+
static AddThemeRequestSchema() {
|
|
871
876
|
return Joi.object({
|
|
872
|
-
|
|
873
|
-
images: ThemePlatformModel.ThemeImages(),
|
|
874
|
-
industry: Joi.array().items(Joi.string().allow("")),
|
|
875
|
-
payment: ThemePlatformModel.ThemePayment(),
|
|
876
|
-
slug: Joi.string().allow(""),
|
|
877
|
+
theme_id: Joi.string().allow(""),
|
|
877
878
|
});
|
|
878
879
|
}
|
|
879
880
|
|
|
880
|
-
/** @returns {
|
|
881
|
-
static
|
|
881
|
+
/** @returns {FontsSchema} */
|
|
882
|
+
static FontsSchema() {
|
|
882
883
|
return Joi.object({
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
company_id: Joi.number(),
|
|
886
|
-
created_at: Joi.string().allow(""),
|
|
887
|
-
marketplace_theme_id: ThemePlatformModel.MarketplaceThemeId(),
|
|
888
|
-
meta: ThemePlatformModel.CompanyThemeMeta(),
|
|
889
|
-
name: Joi.string().allow(""),
|
|
890
|
-
updated_at: Joi.string().allow(""),
|
|
884
|
+
items: ThemePlatformModel.FontsSchemaItems(),
|
|
885
|
+
kind: Joi.string().allow(""),
|
|
891
886
|
});
|
|
892
887
|
}
|
|
893
888
|
|
|
894
|
-
/** @returns {
|
|
895
|
-
static
|
|
889
|
+
/** @returns {BlitzkriegApiErrorSchema} */
|
|
890
|
+
static BlitzkriegApiErrorSchema() {
|
|
896
891
|
return Joi.object({
|
|
897
|
-
|
|
898
|
-
global_schema: ThemePlatformModel.GlobalSchema(),
|
|
899
|
-
list: Joi.array()
|
|
900
|
-
.items(ThemePlatformModel.ThemeConfiguration())
|
|
901
|
-
.required(),
|
|
902
|
-
preset: ThemePlatformModel.Preset(),
|
|
892
|
+
message: Joi.string().allow(""),
|
|
903
893
|
});
|
|
904
894
|
}
|
|
905
895
|
|
|
906
|
-
/** @returns {
|
|
907
|
-
static
|
|
896
|
+
/** @returns {BlitzkriegInternalServerErrorSchema} */
|
|
897
|
+
static BlitzkriegInternalServerErrorSchema() {
|
|
908
898
|
return Joi.object({
|
|
909
|
-
|
|
910
|
-
links: Joi.array().items(Joi.string().allow("")),
|
|
899
|
+
message: Joi.string().allow(""),
|
|
911
900
|
});
|
|
912
901
|
}
|
|
913
902
|
|
|
914
|
-
/** @returns {
|
|
915
|
-
static
|
|
903
|
+
/** @returns {FontsSchemaItems} */
|
|
904
|
+
static FontsSchemaItems() {
|
|
916
905
|
return Joi.object({
|
|
917
|
-
|
|
906
|
+
family: Joi.string().allow(""),
|
|
907
|
+
variants: Joi.array().items(Joi.string().allow("")),
|
|
908
|
+
subsets: Joi.array().items(Joi.string().allow("")),
|
|
909
|
+
version: Joi.string().allow(""),
|
|
910
|
+
last_modified: Joi.string().allow(""),
|
|
911
|
+
files: ThemePlatformModel.FontsSchemaItemsFiles(),
|
|
912
|
+
category: Joi.string().allow(""),
|
|
913
|
+
kind: Joi.string().allow(""),
|
|
918
914
|
});
|
|
919
915
|
}
|
|
920
916
|
|
|
921
|
-
/** @returns {
|
|
922
|
-
static
|
|
923
|
-
return Joi.object({
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
button_primary_label_color: Joi.string().allow(""),
|
|
928
|
-
button_secondary_color: Joi.string().allow(""),
|
|
929
|
-
button_secondary_label_color: Joi.string().allow(""),
|
|
930
|
-
button_tertiary_color: Joi.string().allow(""),
|
|
931
|
-
button_tertiary_hover_color: Joi.string().allow(""),
|
|
932
|
-
button_tertiary_hover_text_color: Joi.string().allow(""),
|
|
933
|
-
button_tertiary_label_color: Joi.string().allow(""),
|
|
934
|
-
disable_cart: Joi.boolean(),
|
|
935
|
-
footer_bg_color: Joi.string().allow(""),
|
|
936
|
-
footer_border_color: Joi.string().allow(""),
|
|
937
|
-
footer_nav_hover_color: Joi.string().allow(""),
|
|
938
|
-
footer_text_color: Joi.string().allow(""),
|
|
939
|
-
header_bg_color: Joi.string().allow(""),
|
|
940
|
-
header_border_color: Joi.string().allow(""),
|
|
941
|
-
header_cart_notification_bg_color: Joi.string().allow(""),
|
|
942
|
-
header_cart_notification_text_color: Joi.string().allow(""),
|
|
943
|
-
header_icon_color: Joi.string().allow(""),
|
|
944
|
-
header_nav_hover_color: Joi.string().allow(""),
|
|
945
|
-
header_text_color: Joi.string().allow(""),
|
|
946
|
-
is_menu_below_logo: Joi.boolean(),
|
|
947
|
-
menu_position: Joi.string().allow(""),
|
|
948
|
-
text_body_color: Joi.string().allow(""),
|
|
949
|
-
text_discount_color: Joi.string().allow(""),
|
|
950
|
-
text_heading_link_color: Joi.string().allow(""),
|
|
951
|
-
text_price_color: Joi.string().allow(""),
|
|
952
|
-
text_sale_price_color: Joi.string().allow(""),
|
|
953
|
-
text_strikethrough_price_color: Joi.string().allow(""),
|
|
917
|
+
/** @returns {FontsSchemaItemsFiles} */
|
|
918
|
+
static FontsSchemaItemsFiles() {
|
|
919
|
+
return Joi.object({
|
|
920
|
+
regular: Joi.string().allow(""),
|
|
921
|
+
italic: Joi.string().allow(""),
|
|
922
|
+
bold: Joi.string().allow(""),
|
|
954
923
|
});
|
|
955
924
|
}
|
|
956
925
|
|
|
957
|
-
/** @returns {
|
|
958
|
-
static
|
|
926
|
+
/** @returns {ThemesSchema} */
|
|
927
|
+
static ThemesSchema() {
|
|
959
928
|
return Joi.object({
|
|
960
|
-
|
|
961
|
-
|
|
929
|
+
font: ThemePlatformModel.Font(),
|
|
930
|
+
config: ThemePlatformModel.Config(),
|
|
931
|
+
applied: Joi.boolean(),
|
|
932
|
+
is_private: Joi.boolean(),
|
|
933
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
934
|
+
_id: Joi.string().allow(""),
|
|
935
|
+
application_id: Joi.string().allow(""),
|
|
936
|
+
marketplace_theme_id: Joi.string().allow(""),
|
|
937
|
+
meta: ThemePlatformModel.ThemeMeta(),
|
|
938
|
+
name: Joi.string().allow(""),
|
|
939
|
+
template_theme_id: Joi.string().allow(""),
|
|
940
|
+
version: Joi.string().allow(""),
|
|
941
|
+
styles: Joi.any(),
|
|
942
|
+
created_at: Joi.string().allow(""),
|
|
943
|
+
updated_at: Joi.string().allow(""),
|
|
944
|
+
assets: ThemePlatformModel.Assets(),
|
|
945
|
+
available_sections: Joi.array().items(ThemePlatformModel.SectionItem()),
|
|
946
|
+
theme_type: Joi.string().allow(""),
|
|
947
|
+
company_id: Joi.number(),
|
|
948
|
+
src: Joi.string().allow(""),
|
|
962
949
|
});
|
|
963
950
|
}
|
|
964
951
|
|
|
965
|
-
/** @returns {
|
|
966
|
-
static
|
|
952
|
+
/** @returns {ThemeUpgradableResponse} */
|
|
953
|
+
static ThemeUpgradableResponse() {
|
|
967
954
|
return Joi.object({
|
|
955
|
+
upgrade: Joi.boolean(),
|
|
956
|
+
versions: ThemePlatformModel.ThemeVersions(),
|
|
968
957
|
message: Joi.string().allow(""),
|
|
969
958
|
});
|
|
970
959
|
}
|
|
971
960
|
|
|
972
|
-
/** @returns {
|
|
973
|
-
static
|
|
961
|
+
/** @returns {UpdateThemeNameRequestBody} */
|
|
962
|
+
static UpdateThemeNameRequestBody() {
|
|
974
963
|
return Joi.object({
|
|
975
|
-
|
|
976
|
-
variants: ThemePlatformModel.FontVariants().required(),
|
|
964
|
+
name: Joi.string().allow(""),
|
|
977
965
|
});
|
|
978
966
|
}
|
|
979
967
|
|
|
980
|
-
/** @returns {
|
|
981
|
-
static
|
|
968
|
+
/** @returns {UpdateThemeRequestBody} */
|
|
969
|
+
static UpdateThemeRequestBody() {
|
|
982
970
|
return Joi.object({
|
|
983
|
-
|
|
984
|
-
|
|
971
|
+
config: ThemePlatformModel.Config(),
|
|
972
|
+
font: ThemePlatformModel.Font(),
|
|
985
973
|
});
|
|
986
974
|
}
|
|
987
975
|
|
|
988
|
-
/** @returns {
|
|
989
|
-
static
|
|
976
|
+
/** @returns {Font} */
|
|
977
|
+
static Font() {
|
|
990
978
|
return Joi.object({
|
|
991
|
-
|
|
992
|
-
family: Joi.string().allow(""),
|
|
993
|
-
files: ThemePlatformModel.FontsSchemaItemsFiles(),
|
|
994
|
-
kind: Joi.string().allow(""),
|
|
995
|
-
last_modified: Joi.string().allow(""),
|
|
996
|
-
subsets: Joi.array().items(Joi.string().allow("")),
|
|
997
|
-
variants: Joi.array().items(Joi.string().allow("")),
|
|
998
|
-
version: Joi.string().allow(""),
|
|
979
|
+
variants: ThemePlatformModel.FontVariants().required(),
|
|
980
|
+
family: Joi.string().allow("").required(),
|
|
999
981
|
});
|
|
1000
982
|
}
|
|
1001
983
|
|
|
1002
|
-
/** @returns {
|
|
1003
|
-
static
|
|
984
|
+
/** @returns {FontVariants} */
|
|
985
|
+
static FontVariants() {
|
|
1004
986
|
return Joi.object({
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
987
|
+
light: ThemePlatformModel.FontVariant(),
|
|
988
|
+
regular: ThemePlatformModel.FontVariant(),
|
|
989
|
+
medium: ThemePlatformModel.FontVariant(),
|
|
990
|
+
semi_bold: ThemePlatformModel.FontVariant(),
|
|
991
|
+
bold: ThemePlatformModel.FontVariant(),
|
|
1008
992
|
});
|
|
1009
993
|
}
|
|
1010
994
|
|
|
1011
995
|
/** @returns {FontVariant} */
|
|
1012
996
|
static FontVariant() {
|
|
1013
997
|
return Joi.object({
|
|
1014
|
-
file: Joi.string().allow("").required(),
|
|
1015
998
|
name: Joi.string().allow("").required(),
|
|
999
|
+
file: Joi.string().allow("").required(),
|
|
1016
1000
|
});
|
|
1017
1001
|
}
|
|
1018
1002
|
|
|
1019
|
-
/** @returns {
|
|
1020
|
-
static
|
|
1003
|
+
/** @returns {Config} */
|
|
1004
|
+
static Config() {
|
|
1021
1005
|
return Joi.object({
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1006
|
+
current: Joi.string().allow("").required(),
|
|
1007
|
+
list: Joi.array()
|
|
1008
|
+
.items(ThemePlatformModel.ThemeConfiguration())
|
|
1009
|
+
.required(),
|
|
1010
|
+
global_schema: ThemePlatformModel.GlobalSchema(),
|
|
1011
|
+
preset: ThemePlatformModel.Preset(),
|
|
1027
1012
|
});
|
|
1028
1013
|
}
|
|
1029
1014
|
|
|
1030
|
-
/** @returns {
|
|
1031
|
-
static
|
|
1015
|
+
/** @returns {ThemeConfiguration} */
|
|
1016
|
+
static ThemeConfiguration() {
|
|
1032
1017
|
return Joi.object({
|
|
1033
|
-
|
|
1018
|
+
name: Joi.string().allow(""),
|
|
1019
|
+
global_config: Joi.any(),
|
|
1020
|
+
page: Joi.array().items(ThemePlatformModel.ThemeConfigListPage()),
|
|
1034
1021
|
});
|
|
1035
1022
|
}
|
|
1036
1023
|
|
|
1037
|
-
/** @returns {
|
|
1038
|
-
static
|
|
1024
|
+
/** @returns {OverlayPopup} */
|
|
1025
|
+
static OverlayPopup() {
|
|
1039
1026
|
return Joi.object({
|
|
1040
|
-
|
|
1041
|
-
|
|
1027
|
+
dialog_backgroung: Joi.string().allow(""),
|
|
1028
|
+
overlay: Joi.string().allow(""),
|
|
1042
1029
|
});
|
|
1043
1030
|
}
|
|
1044
1031
|
|
|
1045
|
-
/** @returns {
|
|
1046
|
-
static
|
|
1032
|
+
/** @returns {DividerStrokeHighlight} */
|
|
1033
|
+
static DividerStrokeHighlight() {
|
|
1047
1034
|
return Joi.object({
|
|
1048
|
-
|
|
1049
|
-
|
|
1035
|
+
divider_strokes: Joi.string().allow(""),
|
|
1036
|
+
highlight: Joi.string().allow(""),
|
|
1050
1037
|
});
|
|
1051
1038
|
}
|
|
1052
1039
|
|
|
1053
|
-
/** @returns {
|
|
1054
|
-
static
|
|
1040
|
+
/** @returns {UserAlerts} */
|
|
1041
|
+
static UserAlerts() {
|
|
1055
1042
|
return Joi.object({
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1043
|
+
success_background: Joi.string().allow(""),
|
|
1044
|
+
success_text: Joi.string().allow(""),
|
|
1045
|
+
error_background: Joi.string().allow(""),
|
|
1046
|
+
error_text: Joi.string().allow(""),
|
|
1047
|
+
info_background: Joi.string().allow(""),
|
|
1048
|
+
info_text: Joi.string().allow(""),
|
|
1061
1049
|
});
|
|
1062
1050
|
}
|
|
1063
1051
|
|
|
1064
1052
|
/** @returns {OrderTracking} */
|
|
1065
1053
|
static OrderTracking() {
|
|
1066
1054
|
return Joi.object({
|
|
1067
|
-
show_footer: Joi.boolean(),
|
|
1068
1055
|
show_header: Joi.boolean(),
|
|
1056
|
+
show_footer: Joi.boolean(),
|
|
1069
1057
|
});
|
|
1070
1058
|
}
|
|
1071
1059
|
|
|
1072
|
-
/** @returns {
|
|
1073
|
-
static
|
|
1060
|
+
/** @returns {ThemeConfigListPage} */
|
|
1061
|
+
static ThemeConfigListPage() {
|
|
1074
1062
|
return Joi.object({
|
|
1075
|
-
|
|
1076
|
-
|
|
1063
|
+
page: Joi.string().allow(""),
|
|
1064
|
+
settings: ThemePlatformModel.ThemeConfigListPageSettingsProps(),
|
|
1077
1065
|
});
|
|
1078
1066
|
}
|
|
1079
1067
|
|
|
1080
|
-
/** @returns {
|
|
1081
|
-
static
|
|
1068
|
+
/** @returns {ThemeConfigListPageSettingsProps} */
|
|
1069
|
+
static ThemeConfigListPageSettingsProps() {
|
|
1082
1070
|
return Joi.object({
|
|
1083
|
-
|
|
1084
|
-
has_next: Joi.boolean(),
|
|
1085
|
-
has_previous: Joi.boolean(),
|
|
1086
|
-
item_total: Joi.number(),
|
|
1087
|
-
next_id: Joi.string().allow(""),
|
|
1088
|
-
size: Joi.number(),
|
|
1089
|
-
type: Joi.string().allow("").required(),
|
|
1071
|
+
props: Joi.any(),
|
|
1090
1072
|
});
|
|
1091
1073
|
}
|
|
1092
1074
|
|
|
1093
|
-
/** @returns {
|
|
1094
|
-
static
|
|
1075
|
+
/** @returns {CustomConfig} */
|
|
1076
|
+
static CustomConfig() {
|
|
1095
1077
|
return Joi.object({
|
|
1096
|
-
|
|
1097
|
-
screen: ThemePlatformModel.Screen(),
|
|
1098
|
-
user: ThemePlatformModel.ThemeUserSchema(),
|
|
1078
|
+
props: ThemePlatformModel.CustomProps(),
|
|
1099
1079
|
});
|
|
1100
1080
|
}
|
|
1101
1081
|
|
|
1102
|
-
/** @returns {
|
|
1103
|
-
static
|
|
1082
|
+
/** @returns {ThemeMeta} */
|
|
1083
|
+
static ThemeMeta() {
|
|
1104
1084
|
return Joi.object({
|
|
1105
|
-
|
|
1085
|
+
payment: ThemePlatformModel.ThemePayment(),
|
|
1086
|
+
description: Joi.string().allow(""),
|
|
1087
|
+
industry: Joi.array().items(Joi.string().allow("")),
|
|
1088
|
+
release: ThemePlatformModel.Release(),
|
|
1089
|
+
images: ThemePlatformModel.Images(),
|
|
1090
|
+
slug: Joi.string().allow(""),
|
|
1091
|
+
name: Joi.string().allow(""),
|
|
1106
1092
|
});
|
|
1107
1093
|
}
|
|
1108
1094
|
|
|
1109
|
-
/** @returns {
|
|
1110
|
-
static
|
|
1095
|
+
/** @returns {Release} */
|
|
1096
|
+
static Release() {
|
|
1111
1097
|
return Joi.object({
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
info: Joi.string().allow(""),
|
|
1115
|
-
label: Joi.string().allow(""),
|
|
1116
|
-
type: Joi.string().allow(""),
|
|
1117
|
-
value: Joi.string().allow(""),
|
|
1098
|
+
notes: Joi.string().allow(""),
|
|
1099
|
+
version: Joi.string().allow(""),
|
|
1118
1100
|
});
|
|
1119
1101
|
}
|
|
1120
1102
|
|
|
1121
|
-
/** @returns {
|
|
1122
|
-
static
|
|
1103
|
+
/** @returns {Images} */
|
|
1104
|
+
static Images() {
|
|
1105
|
+
return Joi.object({
|
|
1106
|
+
desktop: Joi.string().allow(""),
|
|
1107
|
+
mobile: Joi.string().allow(""),
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
/** @returns {CustomProps} */
|
|
1112
|
+
static CustomProps() {
|
|
1113
|
+
return Joi.object({
|
|
1114
|
+
header_bg_color: Joi.string().allow(""),
|
|
1115
|
+
header_text_color: Joi.string().allow(""),
|
|
1116
|
+
header_border_color: Joi.string().allow(""),
|
|
1117
|
+
header_icon_color: Joi.string().allow(""),
|
|
1118
|
+
header_cart_notification_bg_color: Joi.string().allow(""),
|
|
1119
|
+
header_cart_notification_text_color: Joi.string().allow(""),
|
|
1120
|
+
header_nav_hover_color: Joi.string().allow(""),
|
|
1121
|
+
button_primary_color: Joi.string().allow(""),
|
|
1122
|
+
button_primary_label_color: Joi.string().allow(""),
|
|
1123
|
+
button_add_to_cart_color: Joi.string().allow(""),
|
|
1124
|
+
button_add_to_cart_label_color: Joi.string().allow(""),
|
|
1125
|
+
button_secondary_color: Joi.string().allow(""),
|
|
1126
|
+
button_secondary_label_color: Joi.string().allow(""),
|
|
1127
|
+
button_tertiary_color: Joi.string().allow(""),
|
|
1128
|
+
button_tertiary_label_color: Joi.string().allow(""),
|
|
1129
|
+
button_tertiary_hover_color: Joi.string().allow(""),
|
|
1130
|
+
button_tertiary_hover_text_color: Joi.string().allow(""),
|
|
1131
|
+
text_heading_link_color: Joi.string().allow(""),
|
|
1132
|
+
text_body_color: Joi.string().allow(""),
|
|
1133
|
+
text_price_color: Joi.string().allow(""),
|
|
1134
|
+
text_sale_price_color: Joi.string().allow(""),
|
|
1135
|
+
text_strikethrough_price_color: Joi.string().allow(""),
|
|
1136
|
+
text_discount_color: Joi.string().allow(""),
|
|
1137
|
+
footer_bg_color: Joi.string().allow(""),
|
|
1138
|
+
footer_text_color: Joi.string().allow(""),
|
|
1139
|
+
footer_border_color: Joi.string().allow(""),
|
|
1140
|
+
footer_nav_hover_color: Joi.string().allow(""),
|
|
1141
|
+
disable_cart: Joi.boolean(),
|
|
1142
|
+
is_menu_below_logo: Joi.boolean(),
|
|
1143
|
+
menu_position: Joi.string().allow(""),
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
/** @returns {GlobalSchema} */
|
|
1148
|
+
static GlobalSchema() {
|
|
1149
|
+
return Joi.object({
|
|
1150
|
+
props: Joi.array().items(ThemePlatformModel.Prop()),
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
/** @returns {Prop} */
|
|
1155
|
+
static Prop() {
|
|
1123
1156
|
return Joi.object({
|
|
1124
1157
|
type: Joi.string().allow(""),
|
|
1125
|
-
|
|
1158
|
+
category: Joi.string().allow(""),
|
|
1159
|
+
value: Joi.string().allow(""),
|
|
1160
|
+
id: Joi.string().allow(""),
|
|
1161
|
+
label: Joi.string().allow(""),
|
|
1162
|
+
info: Joi.string().allow(""),
|
|
1126
1163
|
});
|
|
1127
1164
|
}
|
|
1128
1165
|
|
|
1129
|
-
/** @returns {
|
|
1130
|
-
static
|
|
1166
|
+
/** @returns {Assets} */
|
|
1167
|
+
static Assets() {
|
|
1131
1168
|
return Joi.object({
|
|
1132
|
-
|
|
1133
|
-
|
|
1169
|
+
umd_js: ThemePlatformModel.UMDJs(),
|
|
1170
|
+
common_js: ThemePlatformModel.CommonJS(),
|
|
1171
|
+
css: ThemePlatformModel.CSS(),
|
|
1134
1172
|
});
|
|
1135
1173
|
}
|
|
1136
1174
|
|
|
1137
|
-
/** @returns {
|
|
1138
|
-
static
|
|
1175
|
+
/** @returns {UMDJs} */
|
|
1176
|
+
static UMDJs() {
|
|
1139
1177
|
return Joi.object({
|
|
1140
|
-
|
|
1141
|
-
|
|
1178
|
+
link: Joi.string().allow(""),
|
|
1179
|
+
links: Joi.array().items(Joi.string().allow("")),
|
|
1142
1180
|
});
|
|
1143
1181
|
}
|
|
1144
1182
|
|
|
1145
|
-
/** @returns {
|
|
1146
|
-
static
|
|
1183
|
+
/** @returns {CommonJS} */
|
|
1184
|
+
static CommonJS() {
|
|
1147
1185
|
return Joi.object({
|
|
1148
|
-
|
|
1149
|
-
mobile: Joi.boolean(),
|
|
1150
|
-
tablet: Joi.boolean(),
|
|
1186
|
+
link: Joi.string().allow(""),
|
|
1151
1187
|
});
|
|
1152
1188
|
}
|
|
1153
1189
|
|
|
1154
|
-
/** @returns {
|
|
1155
|
-
static
|
|
1190
|
+
/** @returns {CSS} */
|
|
1191
|
+
static CSS() {
|
|
1156
1192
|
return Joi.object({
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
predicate: ThemePlatformModel.Predicate(),
|
|
1160
|
-
preset: ThemePlatformModel.SectionPreset(),
|
|
1161
|
-
props: ThemePlatformModel.SectionProps(),
|
|
1193
|
+
link: Joi.string().allow(""),
|
|
1194
|
+
links: Joi.array().items(Joi.string().allow("")),
|
|
1162
1195
|
});
|
|
1163
1196
|
}
|
|
1164
1197
|
|
|
1165
1198
|
/** @returns {SectionItem} */
|
|
1166
1199
|
static SectionItem() {
|
|
1167
1200
|
return Joi.object({
|
|
1201
|
+
props: Joi.array().items(Joi.any()),
|
|
1168
1202
|
blocks: Joi.array().items(Joi.any()),
|
|
1169
|
-
label: Joi.string().allow(""),
|
|
1170
1203
|
name: Joi.string().allow(""),
|
|
1171
|
-
|
|
1172
|
-
});
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
/** @returns {SectionPreset} */
|
|
1176
|
-
static SectionPreset() {
|
|
1177
|
-
return Joi.object({
|
|
1178
|
-
blocks: Joi.array().items(ThemePlatformModel.Block()),
|
|
1204
|
+
label: Joi.string().allow(""),
|
|
1179
1205
|
});
|
|
1180
1206
|
}
|
|
1181
1207
|
|
|
1182
|
-
/** @returns {
|
|
1183
|
-
static
|
|
1208
|
+
/** @returns {Preset} */
|
|
1209
|
+
static Preset() {
|
|
1184
1210
|
return Joi.object({
|
|
1185
|
-
|
|
1186
|
-
item_margin: ThemePlatformModel.TextProp(),
|
|
1187
|
-
slide_interval: ThemePlatformModel.RangeProp(),
|
|
1188
|
-
title: ThemePlatformModel.TextProp(),
|
|
1211
|
+
pages: Joi.array().items(ThemePlatformModel.Page()),
|
|
1189
1212
|
});
|
|
1190
1213
|
}
|
|
1191
1214
|
|
|
1192
|
-
/** @returns {
|
|
1193
|
-
static
|
|
1215
|
+
/** @returns {Page} */
|
|
1216
|
+
static Page() {
|
|
1194
1217
|
return Joi.object({
|
|
1195
|
-
|
|
1196
|
-
|
|
1218
|
+
item_total: Joi.number(),
|
|
1219
|
+
next_id: Joi.string().allow(""),
|
|
1220
|
+
has_previous: Joi.boolean(),
|
|
1221
|
+
has_next: Joi.boolean(),
|
|
1222
|
+
current: Joi.number(),
|
|
1223
|
+
type: Joi.string().allow("").required(),
|
|
1224
|
+
size: Joi.number(),
|
|
1197
1225
|
});
|
|
1198
1226
|
}
|
|
1199
1227
|
|
|
1200
|
-
/** @returns {
|
|
1201
|
-
static
|
|
1228
|
+
/** @returns {Section} */
|
|
1229
|
+
static Section() {
|
|
1202
1230
|
return Joi.object({
|
|
1203
|
-
|
|
1204
|
-
|
|
1231
|
+
blocks: Joi.array().items(ThemePlatformModel.Block()),
|
|
1232
|
+
predicate: ThemePlatformModel.Predicate(),
|
|
1233
|
+
name: Joi.string().allow(""),
|
|
1234
|
+
props: ThemePlatformModel.SectionProps(),
|
|
1235
|
+
preset: ThemePlatformModel.SectionPreset(),
|
|
1205
1236
|
});
|
|
1206
1237
|
}
|
|
1207
1238
|
|
|
1208
|
-
/** @returns {
|
|
1209
|
-
static
|
|
1239
|
+
/** @returns {Block} */
|
|
1240
|
+
static Block() {
|
|
1210
1241
|
return Joi.object({
|
|
1211
|
-
|
|
1212
|
-
|
|
1242
|
+
type: Joi.string().allow(""),
|
|
1243
|
+
name: Joi.string().allow(""),
|
|
1244
|
+
props: ThemePlatformModel.BlockProps(),
|
|
1213
1245
|
});
|
|
1214
1246
|
}
|
|
1215
1247
|
|
|
1216
|
-
/** @returns {
|
|
1217
|
-
static
|
|
1248
|
+
/** @returns {Predicate} */
|
|
1249
|
+
static Predicate() {
|
|
1218
1250
|
return Joi.object({
|
|
1219
|
-
|
|
1220
|
-
|
|
1251
|
+
screen: ThemePlatformModel.Screen(),
|
|
1252
|
+
user: ThemePlatformModel.ThemeUserSchema(),
|
|
1253
|
+
route: ThemePlatformModel.Route(),
|
|
1221
1254
|
});
|
|
1222
1255
|
}
|
|
1223
1256
|
|
|
1224
|
-
/** @returns {
|
|
1225
|
-
static
|
|
1257
|
+
/** @returns {Screen} */
|
|
1258
|
+
static Screen() {
|
|
1226
1259
|
return Joi.object({
|
|
1227
|
-
|
|
1228
|
-
|
|
1260
|
+
mobile: Joi.boolean(),
|
|
1261
|
+
desktop: Joi.boolean(),
|
|
1262
|
+
tablet: Joi.boolean(),
|
|
1229
1263
|
});
|
|
1230
1264
|
}
|
|
1231
1265
|
|
|
1232
|
-
/** @returns {
|
|
1233
|
-
static
|
|
1266
|
+
/** @returns {ThemeUserSchema} */
|
|
1267
|
+
static ThemeUserSchema() {
|
|
1234
1268
|
return Joi.object({
|
|
1235
|
-
|
|
1236
|
-
|
|
1269
|
+
authenticated: Joi.boolean(),
|
|
1270
|
+
anonymous: Joi.boolean(),
|
|
1237
1271
|
});
|
|
1238
1272
|
}
|
|
1239
1273
|
|
|
1240
|
-
/** @returns {
|
|
1241
|
-
static
|
|
1274
|
+
/** @returns {Route} */
|
|
1275
|
+
static Route() {
|
|
1242
1276
|
return Joi.object({
|
|
1243
|
-
|
|
1277
|
+
selected: Joi.string().allow(""),
|
|
1278
|
+
exact_url: Joi.string().allow(""),
|
|
1244
1279
|
});
|
|
1245
1280
|
}
|
|
1246
1281
|
|
|
1247
|
-
/** @returns {
|
|
1248
|
-
static
|
|
1282
|
+
/** @returns {SectionProps} */
|
|
1283
|
+
static SectionProps() {
|
|
1249
1284
|
return Joi.object({
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1285
|
+
title: ThemePlatformModel.TextProp(),
|
|
1286
|
+
item_margin: ThemePlatformModel.TextProp(),
|
|
1287
|
+
autoplay: ThemePlatformModel.CheckboxProp(),
|
|
1288
|
+
slide_interval: ThemePlatformModel.RangeProp(),
|
|
1253
1289
|
});
|
|
1254
1290
|
}
|
|
1255
1291
|
|
|
1256
|
-
/** @returns {
|
|
1257
|
-
static
|
|
1292
|
+
/** @returns {SectionPreset} */
|
|
1293
|
+
static SectionPreset() {
|
|
1258
1294
|
return Joi.object({
|
|
1259
|
-
|
|
1260
|
-
mobile: Joi.string().allow(""),
|
|
1295
|
+
blocks: Joi.array().items(ThemePlatformModel.Block()),
|
|
1261
1296
|
});
|
|
1262
1297
|
}
|
|
1263
1298
|
|
|
1264
|
-
/** @returns {
|
|
1265
|
-
static
|
|
1299
|
+
/** @returns {BlockProps} */
|
|
1300
|
+
static BlockProps() {
|
|
1266
1301
|
return Joi.object({
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
industry: Joi.array().items(Joi.string().allow("")),
|
|
1270
|
-
name: Joi.string().allow(""),
|
|
1271
|
-
payment: ThemePlatformModel.ThemePayment(),
|
|
1272
|
-
release: ThemePlatformModel.Release(),
|
|
1273
|
-
slug: Joi.string().allow(""),
|
|
1302
|
+
image: ThemePlatformModel.ImagePickerProp(),
|
|
1303
|
+
slide_link: ThemePlatformModel.UrlProp(),
|
|
1274
1304
|
});
|
|
1275
1305
|
}
|
|
1276
1306
|
|
|
1277
|
-
/** @returns {
|
|
1278
|
-
static
|
|
1307
|
+
/** @returns {TextProp} */
|
|
1308
|
+
static TextProp() {
|
|
1279
1309
|
return Joi.object({
|
|
1280
|
-
|
|
1281
|
-
|
|
1310
|
+
value: Joi.string().allow(""),
|
|
1311
|
+
type: Joi.string().allow(""),
|
|
1282
1312
|
});
|
|
1283
1313
|
}
|
|
1284
1314
|
|
|
1285
|
-
/** @returns {
|
|
1286
|
-
static
|
|
1315
|
+
/** @returns {CheckboxProp} */
|
|
1316
|
+
static CheckboxProp() {
|
|
1287
1317
|
return Joi.object({
|
|
1288
|
-
|
|
1318
|
+
value: Joi.boolean(),
|
|
1319
|
+
type: Joi.string().allow(""),
|
|
1289
1320
|
});
|
|
1290
1321
|
}
|
|
1291
1322
|
|
|
1292
|
-
/** @returns {
|
|
1293
|
-
static
|
|
1323
|
+
/** @returns {RangeProp} */
|
|
1324
|
+
static RangeProp() {
|
|
1294
1325
|
return Joi.object({
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
applied: Joi.boolean(),
|
|
1298
|
-
assets: ThemePlatformModel.Assets(),
|
|
1299
|
-
available_sections: Joi.array().items(ThemePlatformModel.SectionItem()),
|
|
1300
|
-
company_id: Joi.number(),
|
|
1301
|
-
config: ThemePlatformModel.Config(),
|
|
1302
|
-
created_at: Joi.string().allow(""),
|
|
1303
|
-
font: ThemePlatformModel.Font(),
|
|
1304
|
-
is_private: Joi.boolean(),
|
|
1305
|
-
marketplace_theme_id: Joi.string().allow(""),
|
|
1306
|
-
meta: ThemePlatformModel.ThemeMeta(),
|
|
1307
|
-
name: Joi.string().allow(""),
|
|
1308
|
-
src: Joi.string().allow(""),
|
|
1309
|
-
styles: Joi.any(),
|
|
1310
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
1311
|
-
template_theme_id: Joi.string().allow(""),
|
|
1312
|
-
theme_type: Joi.string().allow(""),
|
|
1313
|
-
updated_at: Joi.string().allow(""),
|
|
1314
|
-
version: Joi.string().allow(""),
|
|
1326
|
+
value: Joi.number(),
|
|
1327
|
+
type: Joi.string().allow(""),
|
|
1315
1328
|
});
|
|
1316
1329
|
}
|
|
1317
1330
|
|
|
1318
|
-
/** @returns {
|
|
1319
|
-
static
|
|
1331
|
+
/** @returns {ImagePickerProp} */
|
|
1332
|
+
static ImagePickerProp() {
|
|
1320
1333
|
return Joi.object({
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
versions: ThemePlatformModel.ThemeVersions(),
|
|
1334
|
+
type: Joi.string().allow(""),
|
|
1335
|
+
value: Joi.string().allow(""),
|
|
1324
1336
|
});
|
|
1325
1337
|
}
|
|
1326
1338
|
|
|
1327
|
-
/** @returns {
|
|
1328
|
-
static
|
|
1339
|
+
/** @returns {UrlProp} */
|
|
1340
|
+
static UrlProp() {
|
|
1329
1341
|
return Joi.object({
|
|
1330
|
-
|
|
1331
|
-
|
|
1342
|
+
type: Joi.string().allow(""),
|
|
1343
|
+
value: Joi.string().allow(""),
|
|
1332
1344
|
});
|
|
1333
1345
|
}
|
|
1334
1346
|
|
|
1335
1347
|
/** @returns {ThemeVersions} */
|
|
1336
1348
|
static ThemeVersions() {
|
|
1337
1349
|
return Joi.object({
|
|
1338
|
-
applied_theme: Joi.string().allow(""),
|
|
1339
1350
|
parent_theme: Joi.string().allow(""),
|
|
1351
|
+
applied_theme: Joi.string().allow(""),
|
|
1340
1352
|
});
|
|
1341
1353
|
}
|
|
1342
1354
|
|
|
1343
|
-
/** @returns {
|
|
1344
|
-
static
|
|
1345
|
-
return Joi.object({
|
|
1346
|
-
link: Joi.string().allow(""),
|
|
1347
|
-
links: Joi.array().items(Joi.string().allow("")),
|
|
1348
|
-
});
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
/** @returns {UpdateThemeNameRequestBody} */
|
|
1352
|
-
static UpdateThemeNameRequestBody() {
|
|
1353
|
-
return Joi.object({
|
|
1354
|
-
name: Joi.string().allow(""),
|
|
1355
|
-
});
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
/** @returns {UpdateThemeRequestBody} */
|
|
1359
|
-
static UpdateThemeRequestBody() {
|
|
1355
|
+
/** @returns {DummyResponse} */
|
|
1356
|
+
static DummyResponse() {
|
|
1360
1357
|
return Joi.object({
|
|
1361
|
-
|
|
1362
|
-
font: ThemePlatformModel.Font(),
|
|
1358
|
+
message: Joi.string().allow(""),
|
|
1363
1359
|
});
|
|
1364
1360
|
}
|
|
1365
1361
|
|
|
1366
|
-
/** @returns {
|
|
1367
|
-
static
|
|
1362
|
+
/** @returns {AppliedThemes} */
|
|
1363
|
+
static AppliedThemes() {
|
|
1368
1364
|
return Joi.object({
|
|
1369
|
-
|
|
1370
|
-
|
|
1365
|
+
_id: Joi.string().allow(""),
|
|
1366
|
+
application_id: Joi.string().allow(""),
|
|
1371
1367
|
});
|
|
1372
1368
|
}
|
|
1373
1369
|
|
|
1374
|
-
/** @returns {
|
|
1375
|
-
static
|
|
1370
|
+
/** @returns {CompanyPrivateTheme} */
|
|
1371
|
+
static CompanyPrivateTheme() {
|
|
1376
1372
|
return Joi.object({
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1373
|
+
theme_type: Joi.string().allow(""),
|
|
1374
|
+
_id: Joi.string().allow(""),
|
|
1375
|
+
name: Joi.string().allow(""),
|
|
1376
|
+
version: Joi.string().allow(""),
|
|
1377
|
+
application_id: Joi.string().allow(""),
|
|
1378
|
+
created_at: Joi.string().allow(""),
|
|
1379
|
+
updated_at: Joi.string().allow(""),
|
|
1380
|
+
applied: Joi.boolean(),
|
|
1381
|
+
is_private: Joi.boolean(),
|
|
1382
|
+
meta: ThemePlatformModel.CompanyThemeMeta(),
|
|
1383
1383
|
});
|
|
1384
1384
|
}
|
|
1385
1385
|
|