@gofynd/fdk-client-javascript 1.2.0 → 1.3.1-beta.1
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 +44 -7
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +3 -3
- package/sdk/application/ApplicationAPIClient.js +6 -4
- package/sdk/application/ApplicationClient.d.ts +2 -3
- package/sdk/application/ApplicationClient.js +1 -45
- package/sdk/application/ApplicationConfig.d.ts +46 -6
- package/sdk/application/ApplicationConfig.js +15 -16
- package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
- package/sdk/application/Cart/CartApplicationClient.js +225 -134
- package/sdk/application/Cart/CartApplicationModel.d.ts +6 -4
- package/sdk/application/Cart/CartApplicationModel.js +6 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
- package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
- package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
- package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
- package/sdk/application/Common/CommonApplicationClient.js +13 -11
- package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
- package/sdk/application/Common/CommonApplicationModel.js +2 -58
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
- package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
- package/sdk/application/Content/ContentApplicationClient.js +159 -80
- package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
- package/sdk/application/Content/ContentApplicationModel.js +11 -763
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
- package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
- package/sdk/application/Lead/LeadApplicationClient.js +50 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
- package/sdk/application/Lead/LeadApplicationModel.js +21 -481
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
- package/sdk/application/Order/OrderApplicationClient.js +88 -56
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
- package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
- package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
- package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
- package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
- package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
- package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
- package/sdk/application/Share/ShareApplicationClient.js +51 -31
- package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
- package/sdk/application/Share/ShareApplicationModel.js +0 -38
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
- package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
- package/sdk/application/User/UserApplicationClient.d.ts +74 -35
- package/sdk/application/User/UserApplicationClient.js +252 -161
- package/sdk/application/User/UserApplicationModel.d.ts +3 -401
- package/sdk/application/User/UserApplicationModel.js +2 -490
- package/sdk/common/AxiosHelper.js +1 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +5 -4
- package/sdk/partner/PartnerAPIClient.js +7 -4
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
- package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
- package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
- package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
- package/sdk/platform/Cart/CartPlatformModel.js +104 -54
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
- package/sdk/platform/Common/CommonPlatformClient.js +13 -11
- package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
- package/sdk/platform/Common/CommonPlatformModel.js +23 -57
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
- package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
- package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
- package/sdk/platform/Content/ContentPlatformModel.js +8 -231
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
- package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
- package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
- package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
- package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
- package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
- package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
- package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
- package/sdk/platform/Order/OrderPlatformClient.js +738 -205
- package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
- package/sdk/platform/Order/OrderPlatformModel.js +225 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
- package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
- package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
- package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
- package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
- package/sdk/platform/PlatformAPIClient.d.ts +3 -3
- package/sdk/platform/PlatformAPIClient.js +2 -2
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/PlatformClient.js +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
- package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
- package/sdk/platform/Share/SharePlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
- package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
- package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
- package/sdk/platform/User/UserPlatformModel.js +3 -899
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
- package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
- package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +90 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +113 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
- package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
- package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
- package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -48
- package/sdk/application/ApplicationModels.js +0 -38
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {
|
|
4
|
+
* @typedef AdvanceSetting
|
|
5
|
+
* @property {DividerStrokeHighlightSetting} [divider_stroke_highlight]
|
|
6
|
+
* @property {OverlayPopupSetting} [overlay_popup]
|
|
7
|
+
* @property {UserAlertsSetting} [user_alerts]
|
|
6
8
|
*/
|
|
7
9
|
|
|
8
10
|
/**
|
|
@@ -11,10 +13,16 @@ const Joi = require("joi");
|
|
|
11
13
|
*/
|
|
12
14
|
|
|
13
15
|
/**
|
|
14
|
-
* @typedef
|
|
15
|
-
* @property {
|
|
16
|
-
* @property {
|
|
17
|
-
* @property {
|
|
16
|
+
* @typedef Assets
|
|
17
|
+
* @property {CommonJS} [common_js]
|
|
18
|
+
* @property {CSS} [css]
|
|
19
|
+
* @property {UMDJs} [umd_js]
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @typedef AuthConfig
|
|
24
|
+
* @property {boolean} [show_footer_auth] - Whether to show footer authentication or not
|
|
25
|
+
* @property {boolean} [show_header_auth] - Whether to show header authentication or not
|
|
18
26
|
*/
|
|
19
27
|
|
|
20
28
|
/**
|
|
@@ -80,14 +88,6 @@ const Joi = require("joi");
|
|
|
80
88
|
* @property {boolean} [authenticated]
|
|
81
89
|
*/
|
|
82
90
|
|
|
83
|
-
/**
|
|
84
|
-
* @typedef availableSectionSchema
|
|
85
|
-
* @property {Blocks[]} [blocks]
|
|
86
|
-
* @property {string} [label]
|
|
87
|
-
* @property {string} [name]
|
|
88
|
-
* @property {BlocksProps[]} [props]
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
91
|
/**
|
|
92
92
|
* @typedef BlitzkriegApiErrorSchema
|
|
93
93
|
* @property {string} [message]
|
|
@@ -99,243 +99,398 @@ const Joi = require("joi");
|
|
|
99
99
|
*/
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
* @typedef
|
|
103
|
-
* @property {string} [
|
|
102
|
+
* @typedef Block
|
|
103
|
+
* @property {string} [name] - The name of the block.
|
|
104
|
+
* @property {BlockProps} [props]
|
|
105
|
+
* @property {string} [type] - The type of the block.
|
|
104
106
|
*/
|
|
105
107
|
|
|
106
108
|
/**
|
|
107
|
-
* @typedef
|
|
108
|
-
* @property {
|
|
109
|
-
* @property {
|
|
110
|
-
* @property {string} [type]
|
|
109
|
+
* @typedef BlockProps
|
|
110
|
+
* @property {ImagePickerProp} [image]
|
|
111
|
+
* @property {UrlProp} [slide_link]
|
|
111
112
|
*/
|
|
112
113
|
|
|
113
114
|
/**
|
|
114
|
-
* @typedef
|
|
115
|
-
* @property {string} [
|
|
116
|
-
* @property {string} [
|
|
117
|
-
* @property {string} [
|
|
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
|
|
118
119
|
*/
|
|
119
120
|
|
|
120
121
|
/**
|
|
121
|
-
* @typedef
|
|
122
|
-
* @property {string} [
|
|
123
|
-
* @property {
|
|
122
|
+
* @typedef CheckboxProp
|
|
123
|
+
* @property {string} [type] - The type of the property.
|
|
124
|
+
* @property {boolean} [value] - The value of the checkbox property.
|
|
124
125
|
*/
|
|
125
126
|
|
|
126
127
|
/**
|
|
127
128
|
* @typedef Colors
|
|
128
|
-
* @property {string} [accent_color]
|
|
129
|
-
* @property {string} [bg_color]
|
|
130
|
-
* @property {string} [button_secondary_color]
|
|
131
|
-
* @property {string} [link_color]
|
|
132
|
-
* @property {string} [primary_color]
|
|
133
|
-
* @property {string} [secondary_color]
|
|
129
|
+
* @property {string} [accent_color] - The accent color
|
|
130
|
+
* @property {string} [bg_color] - The background color
|
|
131
|
+
* @property {string} [button_secondary_color] - The secondary button color
|
|
132
|
+
* @property {string} [link_color] - The link color
|
|
133
|
+
* @property {string} [primary_color] - The primary color
|
|
134
|
+
* @property {string} [secondary_color] - The secondary color
|
|
134
135
|
*/
|
|
135
136
|
|
|
136
137
|
/**
|
|
137
|
-
* @typedef
|
|
138
|
+
* @typedef CommonJS
|
|
138
139
|
* @property {string} [link]
|
|
139
140
|
*/
|
|
140
141
|
|
|
141
142
|
/**
|
|
142
143
|
* @typedef Config
|
|
143
|
-
* @property {string}
|
|
144
|
+
* @property {string} current - The current configuration
|
|
144
145
|
* @property {GlobalSchema} [global_schema]
|
|
145
|
-
* @property {
|
|
146
|
+
* @property {ThemeConfiguration[]} list - A list of configurations
|
|
146
147
|
* @property {Preset} [preset]
|
|
147
148
|
*/
|
|
148
149
|
|
|
149
150
|
/**
|
|
150
|
-
* @typedef
|
|
151
|
-
* @property {string} [
|
|
152
|
-
* @property {Object} [settings]
|
|
151
|
+
* @typedef CSS
|
|
152
|
+
* @property {string[]} [links]
|
|
153
153
|
*/
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
|
-
* @typedef
|
|
157
|
-
* @property {
|
|
158
|
-
* @property {string[]} [links]
|
|
156
|
+
* @typedef CustomConfig
|
|
157
|
+
* @property {CustomProps} [props]
|
|
159
158
|
*/
|
|
160
159
|
|
|
161
160
|
/**
|
|
162
|
-
* @typedef
|
|
163
|
-
* @property {
|
|
161
|
+
* @typedef CustomProps
|
|
162
|
+
* @property {string} [button_add_to_cart_color] - The add to cart button color
|
|
163
|
+
* @property {string} [button_add_to_cart_label_color] - The add to cart button
|
|
164
|
+
* label color
|
|
165
|
+
* @property {string} [button_primary_color] - The primary button color
|
|
166
|
+
* @property {string} [button_primary_label_color] - The primary button label color
|
|
167
|
+
* @property {string} [button_secondary_color] - The secondary button color
|
|
168
|
+
* @property {string} [button_secondary_label_color] - The secondary button label color
|
|
169
|
+
* @property {string} [button_tertiary_color] - The tertiary button color
|
|
170
|
+
* @property {string} [button_tertiary_hover_color] - The tertiary button hover color
|
|
171
|
+
* @property {string} [button_tertiary_hover_text_color] - The tertiary button
|
|
172
|
+
* hover text color
|
|
173
|
+
* @property {string} [button_tertiary_label_color] - The tertiary button label color
|
|
174
|
+
* @property {boolean} [disable_cart] - Whether to disable the cart or not
|
|
175
|
+
* @property {string} [footer_bg_color] - The footer background color
|
|
176
|
+
* @property {string} [footer_border_color] - The footer border color
|
|
177
|
+
* @property {string} [footer_nav_hover_color] - The footer navigation hover color
|
|
178
|
+
* @property {string} [footer_text_color] - The footer text color
|
|
179
|
+
* @property {string} [header_bg_color] - The header background color
|
|
180
|
+
* @property {string} [header_border_color] - The header border color
|
|
181
|
+
* @property {string} [header_cart_notification_bg_color] - The header cart
|
|
182
|
+
* notification background color
|
|
183
|
+
* @property {string} [header_cart_notification_text_color] - The header cart
|
|
184
|
+
* notification text color
|
|
185
|
+
* @property {string} [header_icon_color] - The header icon color
|
|
186
|
+
* @property {string} [header_nav_hover_color] - The header navigation hover color
|
|
187
|
+
* @property {string} [header_text_color] - The header text color
|
|
188
|
+
* @property {boolean} [is_menu_below_logo] - Whether the menu is below the logo or not
|
|
189
|
+
* @property {string} [menu_position] - The position of the menu
|
|
190
|
+
* @property {string} [text_body_color] - The text body color
|
|
191
|
+
* @property {string} [text_discount_color] - The text discount color
|
|
192
|
+
* @property {string} [text_heading_link_color] - The text heading link color
|
|
193
|
+
* @property {string} [text_price_color] - The text price color
|
|
194
|
+
* @property {string} [text_sale_price_color] - The text sale price color
|
|
195
|
+
* @property {string} [text_strikethrough_price_color] - The text strikethrough
|
|
196
|
+
* price color
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @typedef DividerStrokeHighlightSetting
|
|
201
|
+
* @property {string} [divider_strokes] - The divider strokes color
|
|
202
|
+
* @property {string} [highlight] - The highlight color
|
|
164
203
|
*/
|
|
165
204
|
|
|
166
205
|
/**
|
|
167
206
|
* @typedef Font
|
|
168
|
-
* @property {string}
|
|
169
|
-
* @property {
|
|
207
|
+
* @property {string} family - The font family
|
|
208
|
+
* @property {FontVariants} variants
|
|
170
209
|
*/
|
|
171
210
|
|
|
172
211
|
/**
|
|
173
|
-
* @typedef
|
|
174
|
-
* @property {
|
|
175
|
-
* @property {string}
|
|
212
|
+
* @typedef FontVariant
|
|
213
|
+
* @property {string} file - The URL of the font file
|
|
214
|
+
* @property {string} name - The name of the font variant
|
|
176
215
|
*/
|
|
177
216
|
|
|
178
217
|
/**
|
|
179
|
-
* @typedef
|
|
180
|
-
* @property {
|
|
181
|
-
* @property {
|
|
182
|
-
* @property {
|
|
183
|
-
* @property {
|
|
184
|
-
* @property {
|
|
185
|
-
* @property {string[]} [subsets]
|
|
186
|
-
* @property {string[]} [variants]
|
|
187
|
-
* @property {string} [version]
|
|
218
|
+
* @typedef FontVariants
|
|
219
|
+
* @property {FontVariant} [bold]
|
|
220
|
+
* @property {FontVariant} [light]
|
|
221
|
+
* @property {FontVariant} [medium]
|
|
222
|
+
* @property {FontVariant} [regular]
|
|
223
|
+
* @property {FontVariant} [semi_bold]
|
|
188
224
|
*/
|
|
189
225
|
|
|
190
226
|
/**
|
|
191
|
-
* @typedef
|
|
192
|
-
* @property {string} [
|
|
193
|
-
* @property {string} [
|
|
194
|
-
* @property {string} [
|
|
227
|
+
* @typedef FooterSetting
|
|
228
|
+
* @property {string} [footer_background] - The footer background color
|
|
229
|
+
* @property {string} [footer_body_text] - The footer body text color
|
|
230
|
+
* @property {string} [footer_bottom_background] - The footer bottom background color
|
|
231
|
+
* @property {string} [footer_heading_text] - The footer heading text color
|
|
232
|
+
* @property {string} [footer_icon] - The footer icon color
|
|
195
233
|
*/
|
|
196
234
|
|
|
197
235
|
/**
|
|
198
|
-
* @typedef
|
|
199
|
-
* @property {
|
|
236
|
+
* @typedef GeneralSetting
|
|
237
|
+
* @property {ButtonSetting} [button]
|
|
238
|
+
* @property {FooterSetting} [footer]
|
|
239
|
+
* @property {HeaderSetting} [header]
|
|
240
|
+
* @property {SaleDiscountSetting} [sale_discount]
|
|
241
|
+
* @property {TextSetting} [text]
|
|
242
|
+
* @property {ThemeSetting} [theme]
|
|
200
243
|
*/
|
|
201
244
|
|
|
202
245
|
/**
|
|
203
|
-
* @typedef
|
|
204
|
-
* @property {
|
|
205
|
-
* @property {
|
|
206
|
-
* @property {
|
|
207
|
-
* @property {string} [type]
|
|
246
|
+
* @typedef GlobalConfig
|
|
247
|
+
* @property {AuthConfig} [auth]
|
|
248
|
+
* @property {PaletteConfig} [palette]
|
|
249
|
+
* @property {StaticConfig} [statics]
|
|
208
250
|
*/
|
|
209
251
|
|
|
210
252
|
/**
|
|
211
|
-
* @typedef
|
|
212
|
-
* @property {
|
|
213
|
-
* @property {string[]} [desktop]
|
|
214
|
-
* @property {string[]} [ios]
|
|
215
|
-
* @property {string[]} [thumbnail]
|
|
253
|
+
* @typedef GlobalSchema
|
|
254
|
+
* @property {Prop[]} [props]
|
|
216
255
|
*/
|
|
217
256
|
|
|
218
257
|
/**
|
|
219
|
-
* @typedef
|
|
220
|
-
* @property {string} [
|
|
221
|
-
* @property {string
|
|
222
|
-
* @property {
|
|
223
|
-
* @property {string} [name]
|
|
258
|
+
* @typedef HeaderSetting
|
|
259
|
+
* @property {string} [header_background] - The header background color
|
|
260
|
+
* @property {string} [header_icon] - The header icon color
|
|
261
|
+
* @property {string} [header_nav] - The header navigation color
|
|
224
262
|
*/
|
|
225
263
|
|
|
226
264
|
/**
|
|
227
|
-
* @typedef
|
|
228
|
-
* @property {string} [
|
|
229
|
-
* @property {string} [
|
|
265
|
+
* @typedef ImagePickerProp
|
|
266
|
+
* @property {string} [type] - The type of the property.
|
|
267
|
+
* @property {string} [value] - The value of the image picker property.
|
|
230
268
|
*/
|
|
231
269
|
|
|
232
270
|
/**
|
|
233
|
-
* @typedef
|
|
234
|
-
* @property {
|
|
235
|
-
* @property {string} [
|
|
236
|
-
* @property {ConfigPage[]} [page]
|
|
271
|
+
* @typedef Images
|
|
272
|
+
* @property {string} [desktop] - The URL of the desktop image
|
|
273
|
+
* @property {string} [mobile] - The URL of the mobile image
|
|
237
274
|
*/
|
|
238
275
|
|
|
239
276
|
/**
|
|
240
|
-
* @typedef
|
|
241
|
-
* @property {string} [
|
|
242
|
-
* @property {
|
|
277
|
+
* @typedef Meta
|
|
278
|
+
* @property {string} [description] - The description of the theme
|
|
279
|
+
* @property {Images} [images]
|
|
280
|
+
* @property {string[]} [industry] - An array of industries associated with the theme
|
|
281
|
+
* @property {string} [name] - The name of the theme
|
|
282
|
+
* @property {ThemePayment} [payment]
|
|
283
|
+
* @property {Release} [release]
|
|
284
|
+
* @property {string} [slug] - The slug of the theme
|
|
285
|
+
*/
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* @typedef OverlayPopupSetting
|
|
289
|
+
* @property {string} [dialog_backgroung] - The dialog background color
|
|
290
|
+
* @property {string} [overlay] - The overlay color
|
|
243
291
|
*/
|
|
244
292
|
|
|
245
293
|
/**
|
|
246
|
-
* @typedef
|
|
294
|
+
* @typedef Page
|
|
247
295
|
* @property {number} [current]
|
|
248
296
|
* @property {boolean} [has_next]
|
|
297
|
+
* @property {boolean} [has_previous]
|
|
249
298
|
* @property {number} [item_total]
|
|
299
|
+
* @property {string} [next_id]
|
|
250
300
|
* @property {number} [size]
|
|
251
|
-
* @property {string}
|
|
301
|
+
* @property {string} type
|
|
302
|
+
*/
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* @typedef PaletteConfig
|
|
306
|
+
* @property {AdvanceSetting} [advance_setting]
|
|
307
|
+
* @property {GeneralSetting} [general_setting]
|
|
308
|
+
*/
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @typedef Predicate
|
|
312
|
+
* @property {Route} [route]
|
|
313
|
+
* @property {Screen} [screen]
|
|
314
|
+
* @property {ThemeUserSchema} [user]
|
|
252
315
|
*/
|
|
253
316
|
|
|
254
317
|
/**
|
|
255
318
|
* @typedef Preset
|
|
256
|
-
* @property {
|
|
319
|
+
* @property {Page[]} [pages]
|
|
257
320
|
*/
|
|
258
321
|
|
|
259
322
|
/**
|
|
260
|
-
* @typedef
|
|
261
|
-
* @property {string} [
|
|
262
|
-
* @property {string} [
|
|
323
|
+
* @typedef Prop
|
|
324
|
+
* @property {string} [category] - The category of the property
|
|
325
|
+
* @property {string} [id] - The ID of the property
|
|
326
|
+
* @property {string} [info] - Additional information about the property
|
|
327
|
+
* @property {string} [label] - The label of the property
|
|
328
|
+
* @property {string} [type] - The type of the property
|
|
263
329
|
*/
|
|
264
330
|
|
|
265
331
|
/**
|
|
266
|
-
* @typedef
|
|
267
|
-
* @property {string} [
|
|
332
|
+
* @typedef RangeProp
|
|
333
|
+
* @property {string} [type] - The type of the property.
|
|
334
|
+
* @property {number} [value] - The value of the range property.
|
|
268
335
|
*/
|
|
269
336
|
|
|
270
337
|
/**
|
|
271
|
-
* @typedef
|
|
272
|
-
* @property {string} [
|
|
273
|
-
* @property {string} [
|
|
338
|
+
* @typedef Release
|
|
339
|
+
* @property {string} [notes] - The release notes of the theme
|
|
340
|
+
* @property {string} [version] - The version of the theme
|
|
274
341
|
*/
|
|
275
342
|
|
|
276
343
|
/**
|
|
277
|
-
* @typedef
|
|
278
|
-
* @property {string} [
|
|
344
|
+
* @typedef Route
|
|
345
|
+
* @property {string} [exact_url] - The exact URL of the route.
|
|
346
|
+
* @property {string} [selected] - The selected route.
|
|
279
347
|
*/
|
|
280
348
|
|
|
281
349
|
/**
|
|
282
|
-
* @typedef
|
|
283
|
-
* @property {
|
|
284
|
-
* @property {
|
|
350
|
+
* @typedef SaleDiscountSetting
|
|
351
|
+
* @property {string} [sale_badge_background] - The sale badge background color
|
|
352
|
+
* @property {string} [sale_badge_text] - The sale badge text color
|
|
353
|
+
* @property {string} [sale_discount_text] - The sale discount text color
|
|
354
|
+
* @property {string} [sale_timer] - The sale timer color
|
|
285
355
|
*/
|
|
286
356
|
|
|
287
357
|
/**
|
|
288
|
-
* @typedef
|
|
289
|
-
* @property {
|
|
290
|
-
* @property {
|
|
291
|
-
* @property {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
* @
|
|
358
|
+
* @typedef Screen
|
|
359
|
+
* @property {boolean} [desktop] - True if the screen is a desktop device.
|
|
360
|
+
* @property {boolean} [mobile] - True if the screen is a mobile device.
|
|
361
|
+
* @property {boolean} [tablet] - True if the screen is a tablet device.
|
|
362
|
+
*/
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* @typedef Section
|
|
366
|
+
* @property {Block[]} [blocks]
|
|
367
|
+
* @property {string} [name] - The name of the section.
|
|
368
|
+
* @property {Predicate} [predicate]
|
|
369
|
+
* @property {SectionPreset} [preset]
|
|
370
|
+
* @property {SectionProps} [props]
|
|
371
|
+
*/
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @typedef SectionItem
|
|
375
|
+
* @property {Object[]} [blocks] - Blocks
|
|
376
|
+
* @property {string} [label] - Label for the section
|
|
377
|
+
* @property {string} [name] - Name of the section
|
|
378
|
+
* @property {Object[]} [props]
|
|
379
|
+
*/
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* @typedef SectionPreset
|
|
383
|
+
* @property {Block[]} [blocks]
|
|
384
|
+
*/
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* @typedef SectionProps
|
|
388
|
+
* @property {CheckboxProp} [autoplay]
|
|
389
|
+
* @property {TextProp} [item_margin]
|
|
390
|
+
* @property {RangeProp} [slide_interval]
|
|
391
|
+
* @property {TextProp} [title]
|
|
392
|
+
*/
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* @typedef StaticConfig
|
|
396
|
+
* @property {StaticProps} [props]
|
|
397
|
+
*/
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* @typedef StaticProps
|
|
401
|
+
* @property {AuthConfig} [auth]
|
|
296
402
|
* @property {Colors} [colors]
|
|
403
|
+
*/
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* @typedef TextProp
|
|
407
|
+
* @property {string} [type] - The type of the property.
|
|
408
|
+
* @property {string} [value] - The value of the text property.
|
|
409
|
+
*/
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* @typedef TextSetting
|
|
413
|
+
* @property {string} [text_body] - The text body color
|
|
414
|
+
* @property {string} [text_heading] - The text heading color
|
|
415
|
+
* @property {string} [text_label] - The text label color
|
|
416
|
+
* @property {string} [text_secondary] - The secondary text color
|
|
417
|
+
*/
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* @typedef ThemeConfiguration
|
|
421
|
+
* @property {CustomConfig} [custom]
|
|
422
|
+
* @property {GlobalConfig} [global_config]
|
|
423
|
+
* @property {string} [name] - The name of the configuration
|
|
424
|
+
* @property {string[]} [page] - An array of pages
|
|
425
|
+
*/
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* @typedef ThemePayment
|
|
429
|
+
* @property {number} [amount] - The amount of the theme
|
|
430
|
+
* @property {boolean} [is_paid] - Whether the theme is paid or not
|
|
431
|
+
*/
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* @typedef ThemeSetting
|
|
435
|
+
* @property {string} [page_background] - The page background color
|
|
436
|
+
* @property {string} [theme_accent] - The theme accent color
|
|
437
|
+
*/
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* @typedef ThemesSchema
|
|
441
|
+
* @property {string} [_id] - The unique identifier of the theme
|
|
442
|
+
* @property {string} [application_id] - The ID of the application
|
|
443
|
+
* @property {boolean} [applied] - Whether the theme has been applied or not
|
|
444
|
+
* @property {Assets} [assets]
|
|
445
|
+
* @property {SectionItem[]} [available_sections] - Available sections information
|
|
297
446
|
* @property {Config} [config]
|
|
298
|
-
* @property {string} [created_at]
|
|
299
|
-
* @property {boolean} [customized]
|
|
447
|
+
* @property {string} [created_at] - The creation timestamp of the theme
|
|
300
448
|
* @property {Font} [font]
|
|
301
|
-
* @property {
|
|
302
|
-
* @property {string} [
|
|
303
|
-
* @property {
|
|
304
|
-
* @property {
|
|
305
|
-
* @property {
|
|
306
|
-
* @property {
|
|
307
|
-
* @property {string
|
|
308
|
-
* @property {string} [updated_at]
|
|
309
|
-
* @property {string} [version]
|
|
449
|
+
* @property {boolean} [is_private] - Whether the theme is private or not
|
|
450
|
+
* @property {string} [marketplace_theme_id] - The ID of the theme in the marketplace
|
|
451
|
+
* @property {Meta} [meta]
|
|
452
|
+
* @property {string} [name] - The name of the theme
|
|
453
|
+
* @property {Object} [styles] - The styles associated with the theme
|
|
454
|
+
* @property {string[]} [tags] - An array of tags associated with the theme
|
|
455
|
+
* @property {string} [template_theme_id] - The ID of the template theme
|
|
456
|
+
* @property {string} [updated_at] - The last update timestamp of the theme
|
|
457
|
+
* @property {string} [version] - The version of the theme
|
|
310
458
|
*/
|
|
311
459
|
|
|
312
460
|
/**
|
|
313
|
-
* @typedef
|
|
314
|
-
* @property {
|
|
461
|
+
* @typedef ThemeUserSchema
|
|
462
|
+
* @property {boolean} [anonymous] - True if the user is anonymous.
|
|
463
|
+
* @property {boolean} [authenticated] - True if the user is authenticated.
|
|
464
|
+
*/
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* @typedef UMDJs
|
|
315
468
|
* @property {string[]} [links]
|
|
316
469
|
*/
|
|
317
470
|
|
|
318
471
|
/**
|
|
319
|
-
* @typedef
|
|
320
|
-
* @property {string} [
|
|
321
|
-
* @property {string} [
|
|
322
|
-
* @property {boolean} [upgrade]
|
|
472
|
+
* @typedef UrlProp
|
|
473
|
+
* @property {string} [type] - The type of the property.
|
|
474
|
+
* @property {string} [value] - The value of the URL property.
|
|
323
475
|
*/
|
|
324
476
|
|
|
325
477
|
/**
|
|
326
|
-
* @typedef
|
|
327
|
-
* @property {
|
|
328
|
-
* @property {
|
|
329
|
-
* @property {
|
|
330
|
-
* @property {
|
|
331
|
-
* @property {
|
|
478
|
+
* @typedef UserAlertsSetting
|
|
479
|
+
* @property {string} [error_background] - The error background color
|
|
480
|
+
* @property {string} [error_text] - The error text color
|
|
481
|
+
* @property {string} [info_background] - The info background color
|
|
482
|
+
* @property {string} [info_text] - The info text color
|
|
483
|
+
* @property {string} [success_background] - The success background color
|
|
484
|
+
* @property {string} [success_text] - The success text color
|
|
332
485
|
*/
|
|
333
486
|
|
|
334
487
|
class ThemeApplicationModel {
|
|
335
|
-
/** @returns {
|
|
336
|
-
static
|
|
488
|
+
/** @returns {AdvanceSetting} */
|
|
489
|
+
static AdvanceSetting() {
|
|
337
490
|
return Joi.object({
|
|
338
|
-
|
|
491
|
+
divider_stroke_highlight: ThemeApplicationModel.DividerStrokeHighlightSetting(),
|
|
492
|
+
overlay_popup: ThemeApplicationModel.OverlayPopupSetting(),
|
|
493
|
+
user_alerts: ThemeApplicationModel.UserAlertsSetting(),
|
|
339
494
|
});
|
|
340
495
|
}
|
|
341
496
|
|
|
@@ -346,12 +501,20 @@ class ThemeApplicationModel {
|
|
|
346
501
|
});
|
|
347
502
|
}
|
|
348
503
|
|
|
349
|
-
/** @returns {
|
|
350
|
-
static
|
|
504
|
+
/** @returns {Assets} */
|
|
505
|
+
static Assets() {
|
|
506
|
+
return Joi.object({
|
|
507
|
+
common_js: ThemeApplicationModel.CommonJS(),
|
|
508
|
+
css: ThemeApplicationModel.CSS(),
|
|
509
|
+
umd_js: ThemeApplicationModel.UMDJs(),
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/** @returns {AuthConfig} */
|
|
514
|
+
static AuthConfig() {
|
|
351
515
|
return Joi.object({
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
umd_js: ThemeApplicationModel.UmdJs(),
|
|
516
|
+
show_footer_auth: Joi.boolean(),
|
|
517
|
+
show_header_auth: Joi.boolean(),
|
|
355
518
|
});
|
|
356
519
|
}
|
|
357
520
|
|
|
@@ -438,16 +601,6 @@ class ThemeApplicationModel {
|
|
|
438
601
|
});
|
|
439
602
|
}
|
|
440
603
|
|
|
441
|
-
/** @returns {availableSectionSchema} */
|
|
442
|
-
static availableSectionSchema() {
|
|
443
|
-
return Joi.object({
|
|
444
|
-
blocks: Joi.array().items(ThemeApplicationModel.Blocks()),
|
|
445
|
-
label: Joi.string().allow(""),
|
|
446
|
-
name: Joi.string().allow(""),
|
|
447
|
-
props: Joi.array().items(ThemeApplicationModel.BlocksProps()),
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
|
|
451
604
|
/** @returns {BlitzkriegApiErrorSchema} */
|
|
452
605
|
static BlitzkriegApiErrorSchema() {
|
|
453
606
|
return Joi.object({
|
|
@@ -462,36 +615,37 @@ class ThemeApplicationModel {
|
|
|
462
615
|
});
|
|
463
616
|
}
|
|
464
617
|
|
|
465
|
-
/** @returns {
|
|
466
|
-
static
|
|
618
|
+
/** @returns {Block} */
|
|
619
|
+
static Block() {
|
|
467
620
|
return Joi.object({
|
|
468
|
-
|
|
621
|
+
name: Joi.string().allow(""),
|
|
622
|
+
props: ThemeApplicationModel.BlockProps(),
|
|
623
|
+
type: Joi.string().allow(""),
|
|
469
624
|
});
|
|
470
625
|
}
|
|
471
626
|
|
|
472
|
-
/** @returns {
|
|
473
|
-
static
|
|
627
|
+
/** @returns {BlockProps} */
|
|
628
|
+
static BlockProps() {
|
|
474
629
|
return Joi.object({
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
type: Joi.string().allow(""),
|
|
630
|
+
image: ThemeApplicationModel.ImagePickerProp(),
|
|
631
|
+
slide_link: ThemeApplicationModel.UrlProp(),
|
|
478
632
|
});
|
|
479
633
|
}
|
|
480
634
|
|
|
481
|
-
/** @returns {
|
|
482
|
-
static
|
|
635
|
+
/** @returns {ButtonSetting} */
|
|
636
|
+
static ButtonSetting() {
|
|
483
637
|
return Joi.object({
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
638
|
+
button_link: Joi.string().allow(""),
|
|
639
|
+
button_primary: Joi.string().allow(""),
|
|
640
|
+
button_secondary: Joi.string().allow(""),
|
|
487
641
|
});
|
|
488
642
|
}
|
|
489
643
|
|
|
490
|
-
/** @returns {
|
|
491
|
-
static
|
|
644
|
+
/** @returns {CheckboxProp} */
|
|
645
|
+
static CheckboxProp() {
|
|
492
646
|
return Joi.object({
|
|
493
|
-
|
|
494
|
-
|
|
647
|
+
type: Joi.string().allow(""),
|
|
648
|
+
value: Joi.boolean(),
|
|
495
649
|
});
|
|
496
650
|
}
|
|
497
651
|
|
|
@@ -507,8 +661,8 @@ class ThemeApplicationModel {
|
|
|
507
661
|
});
|
|
508
662
|
}
|
|
509
663
|
|
|
510
|
-
/** @returns {
|
|
511
|
-
static
|
|
664
|
+
/** @returns {CommonJS} */
|
|
665
|
+
static CommonJS() {
|
|
512
666
|
return Joi.object({
|
|
513
667
|
link: Joi.string().allow(""),
|
|
514
668
|
});
|
|
@@ -517,247 +671,430 @@ class ThemeApplicationModel {
|
|
|
517
671
|
/** @returns {Config} */
|
|
518
672
|
static Config() {
|
|
519
673
|
return Joi.object({
|
|
520
|
-
current: Joi.string().allow(""),
|
|
674
|
+
current: Joi.string().allow("").required(),
|
|
521
675
|
global_schema: ThemeApplicationModel.GlobalSchema(),
|
|
522
|
-
list: Joi.array()
|
|
676
|
+
list: Joi.array()
|
|
677
|
+
.items(ThemeApplicationModel.ThemeConfiguration())
|
|
678
|
+
.required(),
|
|
523
679
|
preset: ThemeApplicationModel.Preset(),
|
|
524
680
|
});
|
|
525
681
|
}
|
|
526
682
|
|
|
527
|
-
/** @returns {
|
|
528
|
-
static
|
|
683
|
+
/** @returns {CSS} */
|
|
684
|
+
static CSS() {
|
|
529
685
|
return Joi.object({
|
|
530
|
-
|
|
531
|
-
settings: Joi.any(),
|
|
686
|
+
links: Joi.array().items(Joi.string().allow("")),
|
|
532
687
|
});
|
|
533
688
|
}
|
|
534
689
|
|
|
535
|
-
/** @returns {
|
|
536
|
-
static
|
|
690
|
+
/** @returns {CustomConfig} */
|
|
691
|
+
static CustomConfig() {
|
|
537
692
|
return Joi.object({
|
|
538
|
-
|
|
539
|
-
links: Joi.array().items(Joi.string().allow("")),
|
|
693
|
+
props: ThemeApplicationModel.CustomProps(),
|
|
540
694
|
});
|
|
541
695
|
}
|
|
542
696
|
|
|
543
|
-
/** @returns {
|
|
544
|
-
static
|
|
697
|
+
/** @returns {CustomProps} */
|
|
698
|
+
static CustomProps() {
|
|
545
699
|
return Joi.object({
|
|
546
|
-
|
|
700
|
+
button_add_to_cart_color: Joi.string().allow(""),
|
|
701
|
+
button_add_to_cart_label_color: Joi.string().allow(""),
|
|
702
|
+
button_primary_color: Joi.string().allow(""),
|
|
703
|
+
button_primary_label_color: Joi.string().allow(""),
|
|
704
|
+
button_secondary_color: Joi.string().allow(""),
|
|
705
|
+
button_secondary_label_color: Joi.string().allow(""),
|
|
706
|
+
button_tertiary_color: Joi.string().allow(""),
|
|
707
|
+
button_tertiary_hover_color: Joi.string().allow(""),
|
|
708
|
+
button_tertiary_hover_text_color: Joi.string().allow(""),
|
|
709
|
+
button_tertiary_label_color: Joi.string().allow(""),
|
|
710
|
+
disable_cart: Joi.boolean(),
|
|
711
|
+
footer_bg_color: Joi.string().allow(""),
|
|
712
|
+
footer_border_color: Joi.string().allow(""),
|
|
713
|
+
footer_nav_hover_color: Joi.string().allow(""),
|
|
714
|
+
footer_text_color: Joi.string().allow(""),
|
|
715
|
+
header_bg_color: Joi.string().allow(""),
|
|
716
|
+
header_border_color: Joi.string().allow(""),
|
|
717
|
+
header_cart_notification_bg_color: Joi.string().allow(""),
|
|
718
|
+
header_cart_notification_text_color: Joi.string().allow(""),
|
|
719
|
+
header_icon_color: Joi.string().allow(""),
|
|
720
|
+
header_nav_hover_color: Joi.string().allow(""),
|
|
721
|
+
header_text_color: Joi.string().allow(""),
|
|
722
|
+
is_menu_below_logo: Joi.boolean(),
|
|
723
|
+
menu_position: Joi.string().allow(""),
|
|
724
|
+
text_body_color: Joi.string().allow(""),
|
|
725
|
+
text_discount_color: Joi.string().allow(""),
|
|
726
|
+
text_heading_link_color: Joi.string().allow(""),
|
|
727
|
+
text_price_color: Joi.string().allow(""),
|
|
728
|
+
text_sale_price_color: Joi.string().allow(""),
|
|
729
|
+
text_strikethrough_price_color: Joi.string().allow(""),
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/** @returns {DividerStrokeHighlightSetting} */
|
|
734
|
+
static DividerStrokeHighlightSetting() {
|
|
735
|
+
return Joi.object({
|
|
736
|
+
divider_strokes: Joi.string().allow(""),
|
|
737
|
+
highlight: Joi.string().allow(""),
|
|
547
738
|
});
|
|
548
739
|
}
|
|
549
740
|
|
|
550
741
|
/** @returns {Font} */
|
|
551
742
|
static Font() {
|
|
552
743
|
return Joi.object({
|
|
553
|
-
family: Joi.string().allow(""),
|
|
554
|
-
variants: ThemeApplicationModel.
|
|
744
|
+
family: Joi.string().allow("").required(),
|
|
745
|
+
variants: ThemeApplicationModel.FontVariants().required(),
|
|
555
746
|
});
|
|
556
747
|
}
|
|
557
748
|
|
|
558
|
-
/** @returns {
|
|
559
|
-
static
|
|
749
|
+
/** @returns {FontVariant} */
|
|
750
|
+
static FontVariant() {
|
|
560
751
|
return Joi.object({
|
|
561
|
-
|
|
562
|
-
|
|
752
|
+
file: Joi.string().allow("").required(),
|
|
753
|
+
name: Joi.string().allow("").required(),
|
|
563
754
|
});
|
|
564
755
|
}
|
|
565
756
|
|
|
566
|
-
/** @returns {
|
|
567
|
-
static
|
|
757
|
+
/** @returns {FontVariants} */
|
|
758
|
+
static FontVariants() {
|
|
568
759
|
return Joi.object({
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
subsets: Joi.array().items(Joi.string().allow("")),
|
|
575
|
-
variants: Joi.array().items(Joi.string().allow("")),
|
|
576
|
-
version: Joi.string().allow(""),
|
|
760
|
+
bold: ThemeApplicationModel.FontVariant(),
|
|
761
|
+
light: ThemeApplicationModel.FontVariant(),
|
|
762
|
+
medium: ThemeApplicationModel.FontVariant(),
|
|
763
|
+
regular: ThemeApplicationModel.FontVariant(),
|
|
764
|
+
semi_bold: ThemeApplicationModel.FontVariant(),
|
|
577
765
|
});
|
|
578
766
|
}
|
|
579
767
|
|
|
580
|
-
/** @returns {
|
|
581
|
-
static
|
|
768
|
+
/** @returns {FooterSetting} */
|
|
769
|
+
static FooterSetting() {
|
|
582
770
|
return Joi.object({
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
771
|
+
footer_background: Joi.string().allow(""),
|
|
772
|
+
footer_body_text: Joi.string().allow(""),
|
|
773
|
+
footer_bottom_background: Joi.string().allow(""),
|
|
774
|
+
footer_heading_text: Joi.string().allow(""),
|
|
775
|
+
footer_icon: Joi.string().allow(""),
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
/** @returns {GeneralSetting} */
|
|
780
|
+
static GeneralSetting() {
|
|
781
|
+
return Joi.object({
|
|
782
|
+
button: ThemeApplicationModel.ButtonSetting(),
|
|
783
|
+
footer: ThemeApplicationModel.FooterSetting(),
|
|
784
|
+
header: ThemeApplicationModel.HeaderSetting(),
|
|
785
|
+
sale_discount: ThemeApplicationModel.SaleDiscountSetting(),
|
|
786
|
+
text: ThemeApplicationModel.TextSetting(),
|
|
787
|
+
theme: ThemeApplicationModel.ThemeSetting(),
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
/** @returns {GlobalConfig} */
|
|
792
|
+
static GlobalConfig() {
|
|
793
|
+
return Joi.object({
|
|
794
|
+
auth: ThemeApplicationModel.AuthConfig(),
|
|
795
|
+
palette: ThemeApplicationModel.PaletteConfig(),
|
|
796
|
+
statics: ThemeApplicationModel.StaticConfig(),
|
|
586
797
|
});
|
|
587
798
|
}
|
|
588
799
|
|
|
589
800
|
/** @returns {GlobalSchema} */
|
|
590
801
|
static GlobalSchema() {
|
|
591
802
|
return Joi.object({
|
|
592
|
-
props: Joi.array().items(ThemeApplicationModel.
|
|
803
|
+
props: Joi.array().items(ThemeApplicationModel.Prop()),
|
|
593
804
|
});
|
|
594
805
|
}
|
|
595
806
|
|
|
596
|
-
/** @returns {
|
|
597
|
-
static
|
|
807
|
+
/** @returns {HeaderSetting} */
|
|
808
|
+
static HeaderSetting() {
|
|
809
|
+
return Joi.object({
|
|
810
|
+
header_background: Joi.string().allow(""),
|
|
811
|
+
header_icon: Joi.string().allow(""),
|
|
812
|
+
header_nav: Joi.string().allow(""),
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
/** @returns {ImagePickerProp} */
|
|
817
|
+
static ImagePickerProp() {
|
|
598
818
|
return Joi.object({
|
|
599
|
-
category: Joi.string().allow(""),
|
|
600
|
-
id: Joi.string().allow(""),
|
|
601
|
-
label: Joi.string().allow(""),
|
|
602
819
|
type: Joi.string().allow(""),
|
|
820
|
+
value: Joi.string().allow(""),
|
|
603
821
|
});
|
|
604
822
|
}
|
|
605
823
|
|
|
606
824
|
/** @returns {Images} */
|
|
607
825
|
static Images() {
|
|
608
826
|
return Joi.object({
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
ios: Joi.array().items(Joi.string().allow("")),
|
|
612
|
-
thumbnail: Joi.array().items(Joi.string().allow("")),
|
|
827
|
+
desktop: Joi.string().allow(""),
|
|
828
|
+
mobile: Joi.string().allow(""),
|
|
613
829
|
});
|
|
614
830
|
}
|
|
615
831
|
|
|
616
|
-
/** @returns {
|
|
617
|
-
static
|
|
832
|
+
/** @returns {Meta} */
|
|
833
|
+
static Meta() {
|
|
618
834
|
return Joi.object({
|
|
619
835
|
description: Joi.string().allow(""),
|
|
620
|
-
features: Joi.array().items(Joi.string().allow("")),
|
|
621
836
|
images: ThemeApplicationModel.Images(),
|
|
837
|
+
industry: Joi.array().items(Joi.string().allow("")),
|
|
622
838
|
name: Joi.string().allow(""),
|
|
839
|
+
payment: ThemeApplicationModel.ThemePayment(),
|
|
840
|
+
release: ThemeApplicationModel.Release(),
|
|
841
|
+
slug: Joi.string().allow(""),
|
|
623
842
|
});
|
|
624
843
|
}
|
|
625
844
|
|
|
626
|
-
/** @returns {
|
|
627
|
-
static
|
|
845
|
+
/** @returns {OverlayPopupSetting} */
|
|
846
|
+
static OverlayPopupSetting() {
|
|
628
847
|
return Joi.object({
|
|
629
|
-
|
|
630
|
-
|
|
848
|
+
dialog_backgroung: Joi.string().allow(""),
|
|
849
|
+
overlay: Joi.string().allow(""),
|
|
631
850
|
});
|
|
632
851
|
}
|
|
633
852
|
|
|
634
|
-
/** @returns {
|
|
635
|
-
static
|
|
853
|
+
/** @returns {Page} */
|
|
854
|
+
static Page() {
|
|
636
855
|
return Joi.object({
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
856
|
+
current: Joi.number(),
|
|
857
|
+
has_next: Joi.boolean(),
|
|
858
|
+
has_previous: Joi.boolean(),
|
|
859
|
+
item_total: Joi.number(),
|
|
860
|
+
next_id: Joi.string().allow(""),
|
|
861
|
+
size: Joi.number(),
|
|
862
|
+
type: Joi.string().allow("").required(),
|
|
640
863
|
});
|
|
641
864
|
}
|
|
642
865
|
|
|
643
|
-
/** @returns {
|
|
644
|
-
static
|
|
866
|
+
/** @returns {PaletteConfig} */
|
|
867
|
+
static PaletteConfig() {
|
|
645
868
|
return Joi.object({
|
|
646
|
-
|
|
647
|
-
|
|
869
|
+
advance_setting: ThemeApplicationModel.AdvanceSetting(),
|
|
870
|
+
general_setting: ThemeApplicationModel.GeneralSetting(),
|
|
648
871
|
});
|
|
649
872
|
}
|
|
650
873
|
|
|
651
|
-
/** @returns {
|
|
652
|
-
static
|
|
874
|
+
/** @returns {Predicate} */
|
|
875
|
+
static Predicate() {
|
|
653
876
|
return Joi.object({
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
size: Joi.number(),
|
|
658
|
-
type: Joi.string().allow(""),
|
|
877
|
+
route: ThemeApplicationModel.Route(),
|
|
878
|
+
screen: ThemeApplicationModel.Screen(),
|
|
879
|
+
user: ThemeApplicationModel.ThemeUserSchema(),
|
|
659
880
|
});
|
|
660
881
|
}
|
|
661
882
|
|
|
662
883
|
/** @returns {Preset} */
|
|
663
884
|
static Preset() {
|
|
664
885
|
return Joi.object({
|
|
665
|
-
pages: Joi.array().items(ThemeApplicationModel.
|
|
886
|
+
pages: Joi.array().items(ThemeApplicationModel.Page()),
|
|
666
887
|
});
|
|
667
888
|
}
|
|
668
889
|
|
|
669
|
-
/** @returns {
|
|
670
|
-
static
|
|
890
|
+
/** @returns {Prop} */
|
|
891
|
+
static Prop() {
|
|
671
892
|
return Joi.object({
|
|
672
|
-
|
|
893
|
+
category: Joi.string().allow(""),
|
|
894
|
+
id: Joi.string().allow(""),
|
|
895
|
+
info: Joi.string().allow(""),
|
|
896
|
+
label: Joi.string().allow(""),
|
|
897
|
+
type: Joi.string().allow(""),
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
/** @returns {RangeProp} */
|
|
902
|
+
static RangeProp() {
|
|
903
|
+
return Joi.object({
|
|
904
|
+
type: Joi.string().allow(""),
|
|
905
|
+
value: Joi.number(),
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/** @returns {Release} */
|
|
910
|
+
static Release() {
|
|
911
|
+
return Joi.object({
|
|
912
|
+
notes: Joi.string().allow(""),
|
|
913
|
+
version: Joi.string().allow(""),
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
/** @returns {Route} */
|
|
918
|
+
static Route() {
|
|
919
|
+
return Joi.object({
|
|
920
|
+
exact_url: Joi.string().allow(""),
|
|
921
|
+
selected: Joi.string().allow(""),
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
/** @returns {SaleDiscountSetting} */
|
|
926
|
+
static SaleDiscountSetting() {
|
|
927
|
+
return Joi.object({
|
|
928
|
+
sale_badge_background: Joi.string().allow(""),
|
|
929
|
+
sale_badge_text: Joi.string().allow(""),
|
|
930
|
+
sale_discount_text: Joi.string().allow(""),
|
|
931
|
+
sale_timer: Joi.string().allow(""),
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/** @returns {Screen} */
|
|
936
|
+
static Screen() {
|
|
937
|
+
return Joi.object({
|
|
938
|
+
desktop: Joi.boolean(),
|
|
939
|
+
mobile: Joi.boolean(),
|
|
940
|
+
tablet: Joi.boolean(),
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
/** @returns {Section} */
|
|
945
|
+
static Section() {
|
|
946
|
+
return Joi.object({
|
|
947
|
+
blocks: Joi.array().items(ThemeApplicationModel.Block()),
|
|
673
948
|
name: Joi.string().allow(""),
|
|
949
|
+
predicate: ThemeApplicationModel.Predicate(),
|
|
950
|
+
preset: ThemeApplicationModel.SectionPreset(),
|
|
951
|
+
props: ThemeApplicationModel.SectionProps(),
|
|
674
952
|
});
|
|
675
953
|
}
|
|
676
954
|
|
|
677
|
-
/** @returns {
|
|
678
|
-
static
|
|
955
|
+
/** @returns {SectionItem} */
|
|
956
|
+
static SectionItem() {
|
|
679
957
|
return Joi.object({
|
|
680
|
-
|
|
958
|
+
blocks: Joi.array().items(Joi.any()),
|
|
959
|
+
label: Joi.string().allow(""),
|
|
960
|
+
name: Joi.string().allow(""),
|
|
961
|
+
props: Joi.array().items(Joi.any()),
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/** @returns {SectionPreset} */
|
|
966
|
+
static SectionPreset() {
|
|
967
|
+
return Joi.object({
|
|
968
|
+
blocks: Joi.array().items(ThemeApplicationModel.Block()),
|
|
681
969
|
});
|
|
682
970
|
}
|
|
683
971
|
|
|
684
|
-
/** @returns {
|
|
685
|
-
static
|
|
972
|
+
/** @returns {SectionProps} */
|
|
973
|
+
static SectionProps() {
|
|
686
974
|
return Joi.object({
|
|
687
|
-
|
|
975
|
+
autoplay: ThemeApplicationModel.CheckboxProp(),
|
|
976
|
+
item_margin: ThemeApplicationModel.TextProp(),
|
|
977
|
+
slide_interval: ThemeApplicationModel.RangeProp(),
|
|
978
|
+
title: ThemeApplicationModel.TextProp(),
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
/** @returns {StaticConfig} */
|
|
983
|
+
static StaticConfig() {
|
|
984
|
+
return Joi.object({
|
|
985
|
+
props: ThemeApplicationModel.StaticProps(),
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
/** @returns {StaticProps} */
|
|
990
|
+
static StaticProps() {
|
|
991
|
+
return Joi.object({
|
|
992
|
+
auth: ThemeApplicationModel.AuthConfig(),
|
|
993
|
+
colors: ThemeApplicationModel.Colors(),
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
/** @returns {TextProp} */
|
|
998
|
+
static TextProp() {
|
|
999
|
+
return Joi.object({
|
|
1000
|
+
type: Joi.string().allow(""),
|
|
1001
|
+
value: Joi.string().allow(""),
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
/** @returns {TextSetting} */
|
|
1006
|
+
static TextSetting() {
|
|
1007
|
+
return Joi.object({
|
|
1008
|
+
text_body: Joi.string().allow(""),
|
|
1009
|
+
text_heading: Joi.string().allow(""),
|
|
1010
|
+
text_label: Joi.string().allow(""),
|
|
1011
|
+
text_secondary: Joi.string().allow(""),
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/** @returns {ThemeConfiguration} */
|
|
1016
|
+
static ThemeConfiguration() {
|
|
1017
|
+
return Joi.object({
|
|
1018
|
+
custom: ThemeApplicationModel.CustomConfig(),
|
|
1019
|
+
global_config: ThemeApplicationModel.GlobalConfig(),
|
|
688
1020
|
name: Joi.string().allow(""),
|
|
1021
|
+
page: Joi.array().items(Joi.string().allow("")),
|
|
689
1022
|
});
|
|
690
1023
|
}
|
|
691
1024
|
|
|
692
|
-
/** @returns {
|
|
693
|
-
static
|
|
1025
|
+
/** @returns {ThemePayment} */
|
|
1026
|
+
static ThemePayment() {
|
|
694
1027
|
return Joi.object({
|
|
695
|
-
|
|
1028
|
+
amount: Joi.number(),
|
|
1029
|
+
is_paid: Joi.boolean(),
|
|
696
1030
|
});
|
|
697
1031
|
}
|
|
698
1032
|
|
|
699
|
-
/** @returns {
|
|
700
|
-
static
|
|
1033
|
+
/** @returns {ThemeSetting} */
|
|
1034
|
+
static ThemeSetting() {
|
|
701
1035
|
return Joi.object({
|
|
702
|
-
|
|
703
|
-
|
|
1036
|
+
page_background: Joi.string().allow(""),
|
|
1037
|
+
theme_accent: Joi.string().allow(""),
|
|
704
1038
|
});
|
|
705
1039
|
}
|
|
706
1040
|
|
|
707
1041
|
/** @returns {ThemesSchema} */
|
|
708
1042
|
static ThemesSchema() {
|
|
709
1043
|
return Joi.object({
|
|
710
|
-
__v: Joi.number(),
|
|
711
1044
|
_id: Joi.string().allow(""),
|
|
712
|
-
|
|
1045
|
+
application_id: Joi.string().allow(""),
|
|
713
1046
|
applied: Joi.boolean(),
|
|
714
|
-
|
|
715
|
-
assets: ThemeApplicationModel.AssetsSchema(),
|
|
1047
|
+
assets: ThemeApplicationModel.Assets(),
|
|
716
1048
|
available_sections: Joi.array().items(
|
|
717
|
-
ThemeApplicationModel.
|
|
1049
|
+
ThemeApplicationModel.SectionItem()
|
|
718
1050
|
),
|
|
719
|
-
colors: ThemeApplicationModel.Colors(),
|
|
720
1051
|
config: ThemeApplicationModel.Config(),
|
|
721
1052
|
created_at: Joi.string().allow(""),
|
|
722
|
-
customized: Joi.boolean(),
|
|
723
1053
|
font: ThemeApplicationModel.Font(),
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
src: ThemeApplicationModel.Src(),
|
|
1054
|
+
is_private: Joi.boolean(),
|
|
1055
|
+
marketplace_theme_id: Joi.string().allow(""),
|
|
1056
|
+
meta: ThemeApplicationModel.Meta(),
|
|
1057
|
+
name: Joi.string().allow(""),
|
|
729
1058
|
styles: Joi.any(),
|
|
730
1059
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1060
|
+
template_theme_id: Joi.string().allow(""),
|
|
731
1061
|
updated_at: Joi.string().allow(""),
|
|
732
1062
|
version: Joi.string().allow(""),
|
|
733
1063
|
});
|
|
734
1064
|
}
|
|
735
1065
|
|
|
736
|
-
/** @returns {
|
|
737
|
-
static
|
|
1066
|
+
/** @returns {ThemeUserSchema} */
|
|
1067
|
+
static ThemeUserSchema() {
|
|
1068
|
+
return Joi.object({
|
|
1069
|
+
anonymous: Joi.boolean(),
|
|
1070
|
+
authenticated: Joi.boolean(),
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/** @returns {UMDJs} */
|
|
1075
|
+
static UMDJs() {
|
|
738
1076
|
return Joi.object({
|
|
739
|
-
link: Joi.string().allow(""),
|
|
740
1077
|
links: Joi.array().items(Joi.string().allow("")),
|
|
741
1078
|
});
|
|
742
1079
|
}
|
|
743
1080
|
|
|
744
|
-
/** @returns {
|
|
745
|
-
static
|
|
1081
|
+
/** @returns {UrlProp} */
|
|
1082
|
+
static UrlProp() {
|
|
746
1083
|
return Joi.object({
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
upgrade: Joi.boolean(),
|
|
1084
|
+
type: Joi.string().allow(""),
|
|
1085
|
+
value: Joi.string().allow(""),
|
|
750
1086
|
});
|
|
751
1087
|
}
|
|
752
1088
|
|
|
753
|
-
/** @returns {
|
|
754
|
-
static
|
|
1089
|
+
/** @returns {UserAlertsSetting} */
|
|
1090
|
+
static UserAlertsSetting() {
|
|
755
1091
|
return Joi.object({
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
1092
|
+
error_background: Joi.string().allow(""),
|
|
1093
|
+
error_text: Joi.string().allow(""),
|
|
1094
|
+
info_background: Joi.string().allow(""),
|
|
1095
|
+
info_text: Joi.string().allow(""),
|
|
1096
|
+
success_background: Joi.string().allow(""),
|
|
1097
|
+
success_text: Joi.string().allow(""),
|
|
761
1098
|
});
|
|
762
1099
|
}
|
|
763
1100
|
}
|