@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
|
@@ -5,16 +5,29 @@ const Joi = require("joi");
|
|
|
5
5
|
* @property {string} [theme_id]
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @typedef AdvanceSetting
|
|
10
|
+
* @property {DividerStrokeHighlightSetting} [divider_stroke_highlight]
|
|
11
|
+
* @property {OverlayPopupSetting} [overlay_popup]
|
|
12
|
+
* @property {UserAlertsSetting} [user_alerts]
|
|
13
|
+
*/
|
|
14
|
+
|
|
8
15
|
/**
|
|
9
16
|
* @typedef AllAvailablePageSchema
|
|
10
17
|
* @property {AvailablePageSchema[]} [pages]
|
|
11
18
|
*/
|
|
12
19
|
|
|
13
20
|
/**
|
|
14
|
-
* @typedef
|
|
15
|
-
* @property {
|
|
16
|
-
* @property {
|
|
17
|
-
* @property {
|
|
21
|
+
* @typedef Assets
|
|
22
|
+
* @property {CommonJS} [common_js]
|
|
23
|
+
* @property {CSS} [css]
|
|
24
|
+
* @property {UMDJs} [umd_js]
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @typedef AuthConfig
|
|
29
|
+
* @property {boolean} [show_footer_auth] - Whether to show footer authentication or not
|
|
30
|
+
* @property {boolean} [show_header_auth] - Whether to show header authentication or not
|
|
18
31
|
*/
|
|
19
32
|
|
|
20
33
|
/**
|
|
@@ -80,14 +93,6 @@ const Joi = require("joi");
|
|
|
80
93
|
* @property {boolean} [authenticated]
|
|
81
94
|
*/
|
|
82
95
|
|
|
83
|
-
/**
|
|
84
|
-
* @typedef availableSectionSchema
|
|
85
|
-
* @property {Blocks[]} [blocks]
|
|
86
|
-
* @property {string} [label]
|
|
87
|
-
* @property {string} [name]
|
|
88
|
-
* @property {BlocksProps[]} [props]
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
96
|
/**
|
|
92
97
|
* @typedef BlitzkriegApiErrorSchema
|
|
93
98
|
* @property {string} [message]
|
|
@@ -99,74 +104,129 @@ const Joi = require("joi");
|
|
|
99
104
|
*/
|
|
100
105
|
|
|
101
106
|
/**
|
|
102
|
-
* @typedef
|
|
103
|
-
* @property {string} [
|
|
107
|
+
* @typedef Block
|
|
108
|
+
* @property {string} [name] - The name of the block.
|
|
109
|
+
* @property {BlockProps} [props]
|
|
110
|
+
* @property {string} [type] - The type of the block.
|
|
104
111
|
*/
|
|
105
112
|
|
|
106
113
|
/**
|
|
107
|
-
* @typedef
|
|
108
|
-
* @property {
|
|
109
|
-
* @property {
|
|
110
|
-
* @property {string} [type]
|
|
114
|
+
* @typedef BlockProps
|
|
115
|
+
* @property {ImagePickerProp} [image]
|
|
116
|
+
* @property {UrlProp} [slide_link]
|
|
111
117
|
*/
|
|
112
118
|
|
|
113
119
|
/**
|
|
114
|
-
* @typedef
|
|
115
|
-
* @property {string} [
|
|
116
|
-
* @property {string} [
|
|
117
|
-
* @property {string} [
|
|
120
|
+
* @typedef ButtonSetting
|
|
121
|
+
* @property {string} [button_link] - The button link color
|
|
122
|
+
* @property {string} [button_primary] - The primary button color
|
|
123
|
+
* @property {string} [button_secondary] - The secondary button color
|
|
118
124
|
*/
|
|
119
125
|
|
|
120
126
|
/**
|
|
121
|
-
* @typedef
|
|
122
|
-
* @property {string} [
|
|
123
|
-
* @property {
|
|
127
|
+
* @typedef CheckboxProp
|
|
128
|
+
* @property {string} [type] - The type of the property.
|
|
129
|
+
* @property {boolean} [value] - The value of the checkbox property.
|
|
124
130
|
*/
|
|
125
131
|
|
|
126
132
|
/**
|
|
127
133
|
* @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]
|
|
134
|
+
* @property {string} [accent_color] - The accent color
|
|
135
|
+
* @property {string} [bg_color] - The background color
|
|
136
|
+
* @property {string} [button_secondary_color] - The secondary button color
|
|
137
|
+
* @property {string} [link_color] - The link color
|
|
138
|
+
* @property {string} [primary_color] - The primary color
|
|
139
|
+
* @property {string} [secondary_color] - The secondary color
|
|
134
140
|
*/
|
|
135
141
|
|
|
136
142
|
/**
|
|
137
|
-
* @typedef
|
|
143
|
+
* @typedef CommonJS
|
|
138
144
|
* @property {string} [link]
|
|
139
145
|
*/
|
|
140
146
|
|
|
147
|
+
/**
|
|
148
|
+
* @typedef CompanyThemeSchema
|
|
149
|
+
* @property {string} [_id] - The unique identifier for the theme.
|
|
150
|
+
* @property {number} [company_id] - The ID of the company that the theme belongs to.
|
|
151
|
+
* @property {string} [created_at] - The timestamp when the theme was created.
|
|
152
|
+
* @property {MarketplaceThemeId} [marketplace_theme_id]
|
|
153
|
+
* @property {ThemeMeta} [meta]
|
|
154
|
+
* @property {string} [name] - The name of the theme.
|
|
155
|
+
* @property {string} [updated_at] - The timestamp when the theme was last updated.
|
|
156
|
+
*/
|
|
157
|
+
|
|
141
158
|
/**
|
|
142
159
|
* @typedef Config
|
|
143
|
-
* @property {string}
|
|
160
|
+
* @property {string} current - The current configuration
|
|
144
161
|
* @property {GlobalSchema} [global_schema]
|
|
145
|
-
* @property {
|
|
162
|
+
* @property {ThemeConfiguration[]} list - A list of configurations
|
|
146
163
|
* @property {Preset} [preset]
|
|
147
164
|
*/
|
|
148
165
|
|
|
149
166
|
/**
|
|
150
|
-
* @typedef
|
|
151
|
-
* @property {string} [
|
|
152
|
-
* @property {Object} [settings]
|
|
167
|
+
* @typedef CSS
|
|
168
|
+
* @property {string[]} [links]
|
|
153
169
|
*/
|
|
154
170
|
|
|
155
171
|
/**
|
|
156
|
-
* @typedef
|
|
157
|
-
* @property {
|
|
158
|
-
* @property {string[]} [links]
|
|
172
|
+
* @typedef CustomConfig
|
|
173
|
+
* @property {CustomProps} [props]
|
|
159
174
|
*/
|
|
160
175
|
|
|
161
176
|
/**
|
|
162
|
-
* @typedef
|
|
163
|
-
* @property {
|
|
177
|
+
* @typedef CustomProps
|
|
178
|
+
* @property {string} [button_add_to_cart_color] - The add to cart button color
|
|
179
|
+
* @property {string} [button_add_to_cart_label_color] - The add to cart button
|
|
180
|
+
* label color
|
|
181
|
+
* @property {string} [button_primary_color] - The primary button color
|
|
182
|
+
* @property {string} [button_primary_label_color] - The primary button label color
|
|
183
|
+
* @property {string} [button_secondary_color] - The secondary button color
|
|
184
|
+
* @property {string} [button_secondary_label_color] - The secondary button label color
|
|
185
|
+
* @property {string} [button_tertiary_color] - The tertiary button color
|
|
186
|
+
* @property {string} [button_tertiary_hover_color] - The tertiary button hover color
|
|
187
|
+
* @property {string} [button_tertiary_hover_text_color] - The tertiary button
|
|
188
|
+
* hover text color
|
|
189
|
+
* @property {string} [button_tertiary_label_color] - The tertiary button label color
|
|
190
|
+
* @property {boolean} [disable_cart] - Whether to disable the cart or not
|
|
191
|
+
* @property {string} [footer_bg_color] - The footer background color
|
|
192
|
+
* @property {string} [footer_border_color] - The footer border color
|
|
193
|
+
* @property {string} [footer_nav_hover_color] - The footer navigation hover color
|
|
194
|
+
* @property {string} [footer_text_color] - The footer text color
|
|
195
|
+
* @property {string} [header_bg_color] - The header background color
|
|
196
|
+
* @property {string} [header_border_color] - The header border color
|
|
197
|
+
* @property {string} [header_cart_notification_bg_color] - The header cart
|
|
198
|
+
* notification background color
|
|
199
|
+
* @property {string} [header_cart_notification_text_color] - The header cart
|
|
200
|
+
* notification text color
|
|
201
|
+
* @property {string} [header_icon_color] - The header icon color
|
|
202
|
+
* @property {string} [header_nav_hover_color] - The header navigation hover color
|
|
203
|
+
* @property {string} [header_text_color] - The header text color
|
|
204
|
+
* @property {boolean} [is_menu_below_logo] - Whether the menu is below the logo or not
|
|
205
|
+
* @property {string} [menu_position] - The position of the menu
|
|
206
|
+
* @property {string} [text_body_color] - The text body color
|
|
207
|
+
* @property {string} [text_discount_color] - The text discount color
|
|
208
|
+
* @property {string} [text_heading_link_color] - The text heading link color
|
|
209
|
+
* @property {string} [text_price_color] - The text price color
|
|
210
|
+
* @property {string} [text_sale_price_color] - The text sale price color
|
|
211
|
+
* @property {string} [text_strikethrough_price_color] - The text strikethrough
|
|
212
|
+
* price color
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* @typedef DividerStrokeHighlightSetting
|
|
217
|
+
* @property {string} [divider_strokes] - The divider strokes color
|
|
218
|
+
* @property {string} [highlight] - The highlight color
|
|
219
|
+
*/
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @typedef DummyResponse
|
|
223
|
+
* @property {string} [message]
|
|
164
224
|
*/
|
|
165
225
|
|
|
166
226
|
/**
|
|
167
227
|
* @typedef Font
|
|
168
|
-
* @property {string}
|
|
169
|
-
* @property {
|
|
228
|
+
* @property {string} family - The font family
|
|
229
|
+
* @property {FontVariants} variants
|
|
170
230
|
*/
|
|
171
231
|
|
|
172
232
|
/**
|
|
@@ -194,141 +254,332 @@ const Joi = require("joi");
|
|
|
194
254
|
* @property {string} [regular]
|
|
195
255
|
*/
|
|
196
256
|
|
|
257
|
+
/**
|
|
258
|
+
* @typedef FontVariant
|
|
259
|
+
* @property {string} file - The URL of the font file
|
|
260
|
+
* @property {string} name - The name of the font variant
|
|
261
|
+
*/
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @typedef FontVariants
|
|
265
|
+
* @property {FontVariant} [bold]
|
|
266
|
+
* @property {FontVariant} [light]
|
|
267
|
+
* @property {FontVariant} [medium]
|
|
268
|
+
* @property {FontVariant} [regular]
|
|
269
|
+
* @property {FontVariant} [semi_bold]
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* @typedef FooterSetting
|
|
274
|
+
* @property {string} [footer_background] - The footer background color
|
|
275
|
+
* @property {string} [footer_body_text] - The footer body text color
|
|
276
|
+
* @property {string} [footer_bottom_background] - The footer bottom background color
|
|
277
|
+
* @property {string} [footer_heading_text] - The footer heading text color
|
|
278
|
+
* @property {string} [footer_icon] - The footer icon color
|
|
279
|
+
*/
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @typedef GeneralSetting
|
|
283
|
+
* @property {ButtonSetting} [button]
|
|
284
|
+
* @property {FooterSetting} [footer]
|
|
285
|
+
* @property {HeaderSetting} [header]
|
|
286
|
+
* @property {SaleDiscountSetting} [sale_discount]
|
|
287
|
+
* @property {TextSetting} [text]
|
|
288
|
+
* @property {ThemeSetting} [theme]
|
|
289
|
+
*/
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* @typedef GlobalConfig
|
|
293
|
+
* @property {CustomConfig} [custom]
|
|
294
|
+
* @property {StaticConfig} [statics]
|
|
295
|
+
*/
|
|
296
|
+
|
|
197
297
|
/**
|
|
198
298
|
* @typedef GlobalSchema
|
|
199
|
-
* @property {
|
|
299
|
+
* @property {Prop[]} [props]
|
|
200
300
|
*/
|
|
201
301
|
|
|
202
302
|
/**
|
|
203
|
-
* @typedef
|
|
204
|
-
* @property {string} [
|
|
205
|
-
* @property {string} [
|
|
206
|
-
* @property {string} [
|
|
207
|
-
* @property {string} [type]
|
|
303
|
+
* @typedef HeaderSetting
|
|
304
|
+
* @property {string} [header_background] - The header background color
|
|
305
|
+
* @property {string} [header_icon] - The header icon color
|
|
306
|
+
* @property {string} [header_nav] - The header navigation color
|
|
208
307
|
*/
|
|
209
308
|
|
|
210
309
|
/**
|
|
211
|
-
* @typedef
|
|
212
|
-
* @property {string
|
|
213
|
-
* @property {string
|
|
214
|
-
* @property {string[]} [ios]
|
|
215
|
-
* @property {string[]} [thumbnail]
|
|
310
|
+
* @typedef ImagePickerProp
|
|
311
|
+
* @property {string} [type] - The type of the property.
|
|
312
|
+
* @property {string} [value] - The value of the image picker property.
|
|
216
313
|
*/
|
|
217
314
|
|
|
218
315
|
/**
|
|
219
|
-
* @typedef
|
|
220
|
-
* @property {string} [
|
|
221
|
-
* @property {string
|
|
222
|
-
* @property {Images} [images]
|
|
223
|
-
* @property {string} [name]
|
|
316
|
+
* @typedef Images
|
|
317
|
+
* @property {string} [desktop] - The URL of the desktop image
|
|
318
|
+
* @property {string} [mobile] - The URL of the mobile image
|
|
224
319
|
*/
|
|
225
320
|
|
|
226
321
|
/**
|
|
227
|
-
* @typedef
|
|
228
|
-
* @property {string} [
|
|
229
|
-
* @property {
|
|
322
|
+
* @typedef MarketplaceThemeId
|
|
323
|
+
* @property {string} [_id] - The unique identifier for the marketplace theme.
|
|
324
|
+
* @property {boolean} [is_default] - Whether the theme is the default theme.
|
|
230
325
|
*/
|
|
231
326
|
|
|
232
327
|
/**
|
|
233
|
-
* @typedef
|
|
234
|
-
* @property {
|
|
235
|
-
* @property {
|
|
236
|
-
* @property {
|
|
328
|
+
* @typedef Meta
|
|
329
|
+
* @property {string} [description] - The description of the theme
|
|
330
|
+
* @property {Images} [images]
|
|
331
|
+
* @property {string[]} [industry] - An array of industries associated with the theme
|
|
332
|
+
* @property {string} [name] - The name of the theme
|
|
333
|
+
* @property {ThemePayment} [payment]
|
|
334
|
+
* @property {Release} [release]
|
|
335
|
+
* @property {string} [slug] - The slug of the theme
|
|
237
336
|
*/
|
|
238
337
|
|
|
239
338
|
/**
|
|
240
|
-
* @typedef
|
|
241
|
-
* @property {string} [
|
|
242
|
-
* @property {string} [
|
|
339
|
+
* @typedef OverlayPopupSetting
|
|
340
|
+
* @property {string} [dialog_backgroung] - The dialog background color
|
|
341
|
+
* @property {string} [overlay] - The overlay color
|
|
243
342
|
*/
|
|
244
343
|
|
|
245
344
|
/**
|
|
246
|
-
* @typedef
|
|
345
|
+
* @typedef Page
|
|
247
346
|
* @property {number} [current]
|
|
248
347
|
* @property {boolean} [has_next]
|
|
348
|
+
* @property {boolean} [has_previous]
|
|
249
349
|
* @property {number} [item_total]
|
|
350
|
+
* @property {string} [next_id]
|
|
250
351
|
* @property {number} [size]
|
|
251
|
-
* @property {string}
|
|
352
|
+
* @property {string} type
|
|
353
|
+
*/
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* @typedef PaletteConfig
|
|
357
|
+
* @property {AdvanceSetting} [advance_setting]
|
|
358
|
+
* @property {GeneralSetting} [general_setting]
|
|
359
|
+
*/
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* @typedef Predicate
|
|
363
|
+
* @property {Route} [route]
|
|
364
|
+
* @property {Screen} [screen]
|
|
365
|
+
* @property {ThemeUserSchema} [user]
|
|
252
366
|
*/
|
|
253
367
|
|
|
254
368
|
/**
|
|
255
369
|
* @typedef Preset
|
|
256
|
-
* @property {
|
|
370
|
+
* @property {Page[]} [pages]
|
|
257
371
|
*/
|
|
258
372
|
|
|
259
373
|
/**
|
|
260
|
-
* @typedef
|
|
261
|
-
* @property {string} [
|
|
262
|
-
* @property {string} [
|
|
374
|
+
* @typedef Prop
|
|
375
|
+
* @property {string} [category] - The category of the 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
|
|
263
380
|
*/
|
|
264
381
|
|
|
265
382
|
/**
|
|
266
|
-
* @typedef
|
|
267
|
-
* @property {string} [
|
|
383
|
+
* @typedef RangeProp
|
|
384
|
+
* @property {string} [type] - The type of the property.
|
|
385
|
+
* @property {number} [value] - The value of the range property.
|
|
268
386
|
*/
|
|
269
387
|
|
|
270
388
|
/**
|
|
271
|
-
* @typedef
|
|
272
|
-
* @property {string} [
|
|
273
|
-
* @property {string} [
|
|
389
|
+
* @typedef Release
|
|
390
|
+
* @property {string} [notes] - The release notes of the theme
|
|
391
|
+
* @property {string} [version] - The version of the theme
|
|
274
392
|
*/
|
|
275
393
|
|
|
276
394
|
/**
|
|
277
|
-
* @typedef
|
|
278
|
-
* @property {string} [
|
|
395
|
+
* @typedef Route
|
|
396
|
+
* @property {string} [exact_url] - The exact URL of the route.
|
|
397
|
+
* @property {string} [selected] - The selected route.
|
|
279
398
|
*/
|
|
280
399
|
|
|
281
400
|
/**
|
|
282
|
-
* @typedef
|
|
283
|
-
* @property {
|
|
284
|
-
* @property {
|
|
401
|
+
* @typedef SaleDiscountSetting
|
|
402
|
+
* @property {string} [sale_badge_background] - The sale badge background color
|
|
403
|
+
* @property {string} [sale_badge_text] - The sale badge text color
|
|
404
|
+
* @property {string} [sale_discount_text] - The sale discount text color
|
|
405
|
+
* @property {string} [sale_timer] - The sale timer color
|
|
285
406
|
*/
|
|
286
407
|
|
|
287
408
|
/**
|
|
288
|
-
* @typedef
|
|
289
|
-
* @property {
|
|
290
|
-
* @property {
|
|
291
|
-
* @property {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
* @
|
|
409
|
+
* @typedef Screen
|
|
410
|
+
* @property {boolean} [desktop] - True if the screen is a desktop device.
|
|
411
|
+
* @property {boolean} [mobile] - True if the screen is a mobile device.
|
|
412
|
+
* @property {boolean} [tablet] - True if the screen is a tablet device.
|
|
413
|
+
*/
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* @typedef Section
|
|
417
|
+
* @property {Block[]} [blocks]
|
|
418
|
+
* @property {string} [name] - The name of the section.
|
|
419
|
+
* @property {Predicate} [predicate]
|
|
420
|
+
* @property {SectionPreset} [preset]
|
|
421
|
+
* @property {SectionProps} [props]
|
|
422
|
+
*/
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* @typedef SectionItem
|
|
426
|
+
* @property {Object[]} [blocks] - Blocks
|
|
427
|
+
* @property {string} [label] - Label for the section
|
|
428
|
+
* @property {string} [name] - Name of the section
|
|
429
|
+
* @property {Object[]} [props]
|
|
430
|
+
*/
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* @typedef SectionPreset
|
|
434
|
+
* @property {Block[]} [blocks]
|
|
435
|
+
*/
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* @typedef SectionProps
|
|
439
|
+
* @property {CheckboxProp} [autoplay]
|
|
440
|
+
* @property {TextProp} [item_margin]
|
|
441
|
+
* @property {RangeProp} [slide_interval]
|
|
442
|
+
* @property {TextProp} [title]
|
|
443
|
+
*/
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* @typedef StaticConfig
|
|
447
|
+
* @property {StaticProps} [props]
|
|
448
|
+
*/
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* @typedef StaticProps
|
|
452
|
+
* @property {AuthConfig} [auth]
|
|
296
453
|
* @property {Colors} [colors]
|
|
454
|
+
* @property {PaletteConfig} [palette]
|
|
455
|
+
*/
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* @typedef TextProp
|
|
459
|
+
* @property {string} [type] - The type of the property.
|
|
460
|
+
* @property {string} [value] - The value of the text property.
|
|
461
|
+
*/
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* @typedef TextSetting
|
|
465
|
+
* @property {string} [text_body] - The text body color
|
|
466
|
+
* @property {string} [text_heading] - The text heading color
|
|
467
|
+
* @property {string} [text_label] - The text label color
|
|
468
|
+
* @property {string} [text_secondary] - The secondary text color
|
|
469
|
+
*/
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* @typedef ThemeConfiguration
|
|
473
|
+
* @property {CustomConfig} [custom]
|
|
474
|
+
* @property {Object} [global_config]
|
|
475
|
+
* @property {string} [name] - The name of the configuration
|
|
476
|
+
* @property {string[]} [page] - An array of pages
|
|
477
|
+
*/
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* @typedef ThemeImages
|
|
481
|
+
* @property {string} [desktop] - The URL of the desktop image for the theme.
|
|
482
|
+
* @property {string} [mobile] - The URL of the mobile image for the theme.
|
|
483
|
+
*/
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* @typedef ThemeMeta
|
|
487
|
+
* @property {string} [description] - A description of the theme.
|
|
488
|
+
* @property {ThemeImages} [images]
|
|
489
|
+
* @property {string[]} [industry] - A list of industry categories the theme is
|
|
490
|
+
* suitable for.
|
|
491
|
+
* @property {ThemePayment} [payment]
|
|
492
|
+
* @property {string} [slug] - The slug for the theme.
|
|
493
|
+
*/
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* @typedef ThemePayment
|
|
497
|
+
* @property {number} [amount] - The amount to be paid for the theme.
|
|
498
|
+
* @property {boolean} [is_paid] - Whether the theme is a paid theme.
|
|
499
|
+
*/
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* @typedef ThemeReq
|
|
503
|
+
* @property {string} [marketplace_theme_id] - The ID of the marketplace theme
|
|
504
|
+
* to apply to the company.
|
|
505
|
+
*/
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* @typedef ThemeSetting
|
|
509
|
+
* @property {string} [page_background] - The page background color
|
|
510
|
+
* @property {string} [theme_accent] - The theme accent color
|
|
511
|
+
*/
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* @typedef ThemesSchema
|
|
515
|
+
* @property {string} [_id] - The unique identifier of the theme
|
|
516
|
+
* @property {string} [application_id] - The ID of the application
|
|
517
|
+
* @property {boolean} [applied] - Whether the theme has been applied or not
|
|
518
|
+
* @property {Assets} [assets]
|
|
519
|
+
* @property {SectionItem[]} [available_sections] - Available sections information
|
|
297
520
|
* @property {Config} [config]
|
|
298
|
-
* @property {string} [created_at]
|
|
299
|
-
* @property {boolean} [customized]
|
|
521
|
+
* @property {string} [created_at] - The creation timestamp of the theme
|
|
300
522
|
* @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]
|
|
523
|
+
* @property {boolean} [is_private] - Whether the theme is private or not
|
|
524
|
+
* @property {string} [marketplace_theme_id] - The ID of the theme in the marketplace
|
|
525
|
+
* @property {Meta} [meta]
|
|
526
|
+
* @property {string} [name] - The name of the theme
|
|
527
|
+
* @property {Object} [styles] - The styles associated with the theme
|
|
528
|
+
* @property {string[]} [tags] - An array of tags associated with the theme
|
|
529
|
+
* @property {string} [template_theme_id] - The ID of the template theme
|
|
530
|
+
* @property {string} [updated_at] - The last update timestamp of the theme
|
|
531
|
+
* @property {string} [version] - The version of the theme
|
|
310
532
|
*/
|
|
311
533
|
|
|
312
534
|
/**
|
|
313
|
-
* @typedef
|
|
314
|
-
* @property {string} [
|
|
535
|
+
* @typedef ThemeUpgradableResponse
|
|
536
|
+
* @property {string} [message] - A message describing the theme upgrade status
|
|
537
|
+
* @property {boolean} [upgrade] - Indicates if the theme is upgradable or not
|
|
538
|
+
* @property {ThemeVersions} [versions]
|
|
539
|
+
*/
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* @typedef ThemeUserSchema
|
|
543
|
+
* @property {boolean} [anonymous] - True if the user is anonymous.
|
|
544
|
+
* @property {boolean} [authenticated] - True if the user is authenticated.
|
|
545
|
+
*/
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* @typedef ThemeVersions
|
|
549
|
+
* @property {string} [applied_theme] - The version of the applied theme
|
|
550
|
+
* @property {string} [parent_theme] - The version of the parent theme
|
|
551
|
+
*/
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* @typedef UMDJs
|
|
315
555
|
* @property {string[]} [links]
|
|
316
556
|
*/
|
|
317
557
|
|
|
318
558
|
/**
|
|
319
|
-
* @typedef
|
|
320
|
-
* @property {string} [
|
|
321
|
-
* @property {string} [parent_theme]
|
|
322
|
-
* @property {boolean} [upgrade]
|
|
559
|
+
* @typedef UpdateThemeNameRequestBody
|
|
560
|
+
* @property {string} [name] - The new name of the theme.
|
|
323
561
|
*/
|
|
324
562
|
|
|
325
563
|
/**
|
|
326
|
-
* @typedef
|
|
327
|
-
* @property {
|
|
328
|
-
* @property {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
564
|
+
* @typedef UpdateThemeRequestBody
|
|
565
|
+
* @property {Config} [config]
|
|
566
|
+
* @property {Font} [font]
|
|
567
|
+
*/
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* @typedef UrlProp
|
|
571
|
+
* @property {string} [type] - The type of the property.
|
|
572
|
+
* @property {string} [value] - The value of the URL property.
|
|
573
|
+
*/
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* @typedef UserAlertsSetting
|
|
577
|
+
* @property {string} [error_background] - The error background color
|
|
578
|
+
* @property {string} [error_text] - The error text color
|
|
579
|
+
* @property {string} [info_background] - The info background color
|
|
580
|
+
* @property {string} [info_text] - The info text color
|
|
581
|
+
* @property {string} [success_background] - The success background color
|
|
582
|
+
* @property {string} [success_text] - The success text color
|
|
332
583
|
*/
|
|
333
584
|
|
|
334
585
|
class ThemePlatformModel {
|
|
@@ -339,6 +590,15 @@ class ThemePlatformModel {
|
|
|
339
590
|
});
|
|
340
591
|
}
|
|
341
592
|
|
|
593
|
+
/** @returns {AdvanceSetting} */
|
|
594
|
+
static AdvanceSetting() {
|
|
595
|
+
return Joi.object({
|
|
596
|
+
divider_stroke_highlight: ThemePlatformModel.DividerStrokeHighlightSetting(),
|
|
597
|
+
overlay_popup: ThemePlatformModel.OverlayPopupSetting(),
|
|
598
|
+
user_alerts: ThemePlatformModel.UserAlertsSetting(),
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
|
|
342
602
|
/** @returns {AllAvailablePageSchema} */
|
|
343
603
|
static AllAvailablePageSchema() {
|
|
344
604
|
return Joi.object({
|
|
@@ -346,12 +606,20 @@ class ThemePlatformModel {
|
|
|
346
606
|
});
|
|
347
607
|
}
|
|
348
608
|
|
|
349
|
-
/** @returns {
|
|
350
|
-
static
|
|
609
|
+
/** @returns {Assets} */
|
|
610
|
+
static Assets() {
|
|
611
|
+
return Joi.object({
|
|
612
|
+
common_js: ThemePlatformModel.CommonJS(),
|
|
613
|
+
css: ThemePlatformModel.CSS(),
|
|
614
|
+
umd_js: ThemePlatformModel.UMDJs(),
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/** @returns {AuthConfig} */
|
|
619
|
+
static AuthConfig() {
|
|
351
620
|
return Joi.object({
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
umd_js: ThemePlatformModel.UmdJs(),
|
|
621
|
+
show_footer_auth: Joi.boolean(),
|
|
622
|
+
show_header_auth: Joi.boolean(),
|
|
355
623
|
});
|
|
356
624
|
}
|
|
357
625
|
|
|
@@ -438,16 +706,6 @@ class ThemePlatformModel {
|
|
|
438
706
|
});
|
|
439
707
|
}
|
|
440
708
|
|
|
441
|
-
/** @returns {availableSectionSchema} */
|
|
442
|
-
static availableSectionSchema() {
|
|
443
|
-
return Joi.object({
|
|
444
|
-
blocks: Joi.array().items(ThemePlatformModel.Blocks()),
|
|
445
|
-
label: Joi.string().allow(""),
|
|
446
|
-
name: Joi.string().allow(""),
|
|
447
|
-
props: Joi.array().items(ThemePlatformModel.BlocksProps()),
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
|
|
451
709
|
/** @returns {BlitzkriegApiErrorSchema} */
|
|
452
710
|
static BlitzkriegApiErrorSchema() {
|
|
453
711
|
return Joi.object({
|
|
@@ -462,36 +720,37 @@ class ThemePlatformModel {
|
|
|
462
720
|
});
|
|
463
721
|
}
|
|
464
722
|
|
|
465
|
-
/** @returns {
|
|
466
|
-
static
|
|
723
|
+
/** @returns {Block} */
|
|
724
|
+
static Block() {
|
|
467
725
|
return Joi.object({
|
|
468
|
-
|
|
726
|
+
name: Joi.string().allow(""),
|
|
727
|
+
props: ThemePlatformModel.BlockProps(),
|
|
728
|
+
type: Joi.string().allow(""),
|
|
469
729
|
});
|
|
470
730
|
}
|
|
471
731
|
|
|
472
|
-
/** @returns {
|
|
473
|
-
static
|
|
732
|
+
/** @returns {BlockProps} */
|
|
733
|
+
static BlockProps() {
|
|
474
734
|
return Joi.object({
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
type: Joi.string().allow(""),
|
|
735
|
+
image: ThemePlatformModel.ImagePickerProp(),
|
|
736
|
+
slide_link: ThemePlatformModel.UrlProp(),
|
|
478
737
|
});
|
|
479
738
|
}
|
|
480
739
|
|
|
481
|
-
/** @returns {
|
|
482
|
-
static
|
|
740
|
+
/** @returns {ButtonSetting} */
|
|
741
|
+
static ButtonSetting() {
|
|
483
742
|
return Joi.object({
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
743
|
+
button_link: Joi.string().allow(""),
|
|
744
|
+
button_primary: Joi.string().allow(""),
|
|
745
|
+
button_secondary: Joi.string().allow(""),
|
|
487
746
|
});
|
|
488
747
|
}
|
|
489
748
|
|
|
490
|
-
/** @returns {
|
|
491
|
-
static
|
|
749
|
+
/** @returns {CheckboxProp} */
|
|
750
|
+
static CheckboxProp() {
|
|
492
751
|
return Joi.object({
|
|
493
|
-
|
|
494
|
-
|
|
752
|
+
type: Joi.string().allow(""),
|
|
753
|
+
value: Joi.boolean(),
|
|
495
754
|
});
|
|
496
755
|
}
|
|
497
756
|
|
|
@@ -507,51 +766,108 @@ class ThemePlatformModel {
|
|
|
507
766
|
});
|
|
508
767
|
}
|
|
509
768
|
|
|
510
|
-
/** @returns {
|
|
511
|
-
static
|
|
769
|
+
/** @returns {CommonJS} */
|
|
770
|
+
static CommonJS() {
|
|
512
771
|
return Joi.object({
|
|
513
772
|
link: Joi.string().allow(""),
|
|
514
773
|
});
|
|
515
774
|
}
|
|
516
775
|
|
|
776
|
+
/** @returns {CompanyThemeSchema} */
|
|
777
|
+
static CompanyThemeSchema() {
|
|
778
|
+
return Joi.object({
|
|
779
|
+
_id: Joi.string().allow(""),
|
|
780
|
+
company_id: Joi.number(),
|
|
781
|
+
created_at: Joi.string().allow(""),
|
|
782
|
+
marketplace_theme_id: ThemePlatformModel.MarketplaceThemeId(),
|
|
783
|
+
meta: ThemePlatformModel.ThemeMeta(),
|
|
784
|
+
name: Joi.string().allow(""),
|
|
785
|
+
updated_at: Joi.string().allow(""),
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
|
|
517
789
|
/** @returns {Config} */
|
|
518
790
|
static Config() {
|
|
519
791
|
return Joi.object({
|
|
520
|
-
current: Joi.string().allow(""),
|
|
792
|
+
current: Joi.string().allow("").required(),
|
|
521
793
|
global_schema: ThemePlatformModel.GlobalSchema(),
|
|
522
|
-
list: Joi.array()
|
|
794
|
+
list: Joi.array()
|
|
795
|
+
.items(ThemePlatformModel.ThemeConfiguration())
|
|
796
|
+
.required(),
|
|
523
797
|
preset: ThemePlatformModel.Preset(),
|
|
524
798
|
});
|
|
525
799
|
}
|
|
526
800
|
|
|
527
|
-
/** @returns {
|
|
528
|
-
static
|
|
801
|
+
/** @returns {CSS} */
|
|
802
|
+
static CSS() {
|
|
529
803
|
return Joi.object({
|
|
530
|
-
|
|
531
|
-
settings: Joi.any(),
|
|
804
|
+
links: Joi.array().items(Joi.string().allow("")),
|
|
532
805
|
});
|
|
533
806
|
}
|
|
534
807
|
|
|
535
|
-
/** @returns {
|
|
536
|
-
static
|
|
808
|
+
/** @returns {CustomConfig} */
|
|
809
|
+
static CustomConfig() {
|
|
537
810
|
return Joi.object({
|
|
538
|
-
|
|
539
|
-
links: Joi.array().items(Joi.string().allow("")),
|
|
811
|
+
props: ThemePlatformModel.CustomProps(),
|
|
540
812
|
});
|
|
541
813
|
}
|
|
542
814
|
|
|
543
|
-
/** @returns {
|
|
544
|
-
static
|
|
815
|
+
/** @returns {CustomProps} */
|
|
816
|
+
static CustomProps() {
|
|
545
817
|
return Joi.object({
|
|
546
|
-
|
|
818
|
+
button_add_to_cart_color: Joi.string().allow(""),
|
|
819
|
+
button_add_to_cart_label_color: Joi.string().allow(""),
|
|
820
|
+
button_primary_color: Joi.string().allow(""),
|
|
821
|
+
button_primary_label_color: Joi.string().allow(""),
|
|
822
|
+
button_secondary_color: Joi.string().allow(""),
|
|
823
|
+
button_secondary_label_color: Joi.string().allow(""),
|
|
824
|
+
button_tertiary_color: Joi.string().allow(""),
|
|
825
|
+
button_tertiary_hover_color: Joi.string().allow(""),
|
|
826
|
+
button_tertiary_hover_text_color: Joi.string().allow(""),
|
|
827
|
+
button_tertiary_label_color: Joi.string().allow(""),
|
|
828
|
+
disable_cart: Joi.boolean(),
|
|
829
|
+
footer_bg_color: Joi.string().allow(""),
|
|
830
|
+
footer_border_color: Joi.string().allow(""),
|
|
831
|
+
footer_nav_hover_color: Joi.string().allow(""),
|
|
832
|
+
footer_text_color: Joi.string().allow(""),
|
|
833
|
+
header_bg_color: Joi.string().allow(""),
|
|
834
|
+
header_border_color: Joi.string().allow(""),
|
|
835
|
+
header_cart_notification_bg_color: Joi.string().allow(""),
|
|
836
|
+
header_cart_notification_text_color: Joi.string().allow(""),
|
|
837
|
+
header_icon_color: Joi.string().allow(""),
|
|
838
|
+
header_nav_hover_color: Joi.string().allow(""),
|
|
839
|
+
header_text_color: Joi.string().allow(""),
|
|
840
|
+
is_menu_below_logo: Joi.boolean(),
|
|
841
|
+
menu_position: Joi.string().allow(""),
|
|
842
|
+
text_body_color: Joi.string().allow(""),
|
|
843
|
+
text_discount_color: Joi.string().allow(""),
|
|
844
|
+
text_heading_link_color: Joi.string().allow(""),
|
|
845
|
+
text_price_color: Joi.string().allow(""),
|
|
846
|
+
text_sale_price_color: Joi.string().allow(""),
|
|
847
|
+
text_strikethrough_price_color: Joi.string().allow(""),
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
/** @returns {DividerStrokeHighlightSetting} */
|
|
852
|
+
static DividerStrokeHighlightSetting() {
|
|
853
|
+
return Joi.object({
|
|
854
|
+
divider_strokes: Joi.string().allow(""),
|
|
855
|
+
highlight: Joi.string().allow(""),
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/** @returns {DummyResponse} */
|
|
860
|
+
static DummyResponse() {
|
|
861
|
+
return Joi.object({
|
|
862
|
+
message: Joi.string().allow(""),
|
|
547
863
|
});
|
|
548
864
|
}
|
|
549
865
|
|
|
550
866
|
/** @returns {Font} */
|
|
551
867
|
static Font() {
|
|
552
868
|
return Joi.object({
|
|
553
|
-
family: Joi.string().allow(""),
|
|
554
|
-
variants: ThemePlatformModel.
|
|
869
|
+
family: Joi.string().allow("").required(),
|
|
870
|
+
variants: ThemePlatformModel.FontVariants().required(),
|
|
555
871
|
});
|
|
556
872
|
}
|
|
557
873
|
|
|
@@ -586,178 +902,419 @@ class ThemePlatformModel {
|
|
|
586
902
|
});
|
|
587
903
|
}
|
|
588
904
|
|
|
905
|
+
/** @returns {FontVariant} */
|
|
906
|
+
static FontVariant() {
|
|
907
|
+
return Joi.object({
|
|
908
|
+
file: Joi.string().allow("").required(),
|
|
909
|
+
name: Joi.string().allow("").required(),
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/** @returns {FontVariants} */
|
|
914
|
+
static FontVariants() {
|
|
915
|
+
return Joi.object({
|
|
916
|
+
bold: ThemePlatformModel.FontVariant(),
|
|
917
|
+
light: ThemePlatformModel.FontVariant(),
|
|
918
|
+
medium: ThemePlatformModel.FontVariant(),
|
|
919
|
+
regular: ThemePlatformModel.FontVariant(),
|
|
920
|
+
semi_bold: ThemePlatformModel.FontVariant(),
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/** @returns {FooterSetting} */
|
|
925
|
+
static FooterSetting() {
|
|
926
|
+
return Joi.object({
|
|
927
|
+
footer_background: Joi.string().allow(""),
|
|
928
|
+
footer_body_text: Joi.string().allow(""),
|
|
929
|
+
footer_bottom_background: Joi.string().allow(""),
|
|
930
|
+
footer_heading_text: Joi.string().allow(""),
|
|
931
|
+
footer_icon: Joi.string().allow(""),
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/** @returns {GeneralSetting} */
|
|
936
|
+
static GeneralSetting() {
|
|
937
|
+
return Joi.object({
|
|
938
|
+
button: ThemePlatformModel.ButtonSetting(),
|
|
939
|
+
footer: ThemePlatformModel.FooterSetting(),
|
|
940
|
+
header: ThemePlatformModel.HeaderSetting(),
|
|
941
|
+
sale_discount: ThemePlatformModel.SaleDiscountSetting(),
|
|
942
|
+
text: ThemePlatformModel.TextSetting(),
|
|
943
|
+
theme: ThemePlatformModel.ThemeSetting(),
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
/** @returns {GlobalConfig} */
|
|
948
|
+
static GlobalConfig() {
|
|
949
|
+
return Joi.object({
|
|
950
|
+
custom: ThemePlatformModel.CustomConfig(),
|
|
951
|
+
statics: ThemePlatformModel.StaticConfig(),
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
|
|
589
955
|
/** @returns {GlobalSchema} */
|
|
590
956
|
static GlobalSchema() {
|
|
591
957
|
return Joi.object({
|
|
592
|
-
props: Joi.array().items(ThemePlatformModel.
|
|
958
|
+
props: Joi.array().items(ThemePlatformModel.Prop()),
|
|
593
959
|
});
|
|
594
960
|
}
|
|
595
961
|
|
|
596
|
-
/** @returns {
|
|
597
|
-
static
|
|
962
|
+
/** @returns {HeaderSetting} */
|
|
963
|
+
static HeaderSetting() {
|
|
964
|
+
return Joi.object({
|
|
965
|
+
header_background: Joi.string().allow(""),
|
|
966
|
+
header_icon: Joi.string().allow(""),
|
|
967
|
+
header_nav: Joi.string().allow(""),
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
/** @returns {ImagePickerProp} */
|
|
972
|
+
static ImagePickerProp() {
|
|
598
973
|
return Joi.object({
|
|
599
|
-
category: Joi.string().allow(""),
|
|
600
|
-
id: Joi.string().allow(""),
|
|
601
|
-
label: Joi.string().allow(""),
|
|
602
974
|
type: Joi.string().allow(""),
|
|
975
|
+
value: Joi.string().allow(""),
|
|
603
976
|
});
|
|
604
977
|
}
|
|
605
978
|
|
|
606
979
|
/** @returns {Images} */
|
|
607
980
|
static Images() {
|
|
608
981
|
return Joi.object({
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
982
|
+
desktop: Joi.string().allow(""),
|
|
983
|
+
mobile: Joi.string().allow(""),
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
/** @returns {MarketplaceThemeId} */
|
|
988
|
+
static MarketplaceThemeId() {
|
|
989
|
+
return Joi.object({
|
|
990
|
+
_id: Joi.string().allow(""),
|
|
991
|
+
is_default: Joi.boolean(),
|
|
613
992
|
});
|
|
614
993
|
}
|
|
615
994
|
|
|
616
|
-
/** @returns {
|
|
617
|
-
static
|
|
995
|
+
/** @returns {Meta} */
|
|
996
|
+
static Meta() {
|
|
618
997
|
return Joi.object({
|
|
619
998
|
description: Joi.string().allow(""),
|
|
620
|
-
features: Joi.array().items(Joi.string().allow("")),
|
|
621
999
|
images: ThemePlatformModel.Images(),
|
|
1000
|
+
industry: Joi.array().items(Joi.string().allow("")),
|
|
622
1001
|
name: Joi.string().allow(""),
|
|
1002
|
+
payment: ThemePlatformModel.ThemePayment(),
|
|
1003
|
+
release: ThemePlatformModel.Release(),
|
|
1004
|
+
slug: Joi.string().allow(""),
|
|
623
1005
|
});
|
|
624
1006
|
}
|
|
625
1007
|
|
|
626
|
-
/** @returns {
|
|
627
|
-
static
|
|
1008
|
+
/** @returns {OverlayPopupSetting} */
|
|
1009
|
+
static OverlayPopupSetting() {
|
|
628
1010
|
return Joi.object({
|
|
629
|
-
|
|
630
|
-
|
|
1011
|
+
dialog_backgroung: Joi.string().allow(""),
|
|
1012
|
+
overlay: Joi.string().allow(""),
|
|
631
1013
|
});
|
|
632
1014
|
}
|
|
633
1015
|
|
|
634
|
-
/** @returns {
|
|
635
|
-
static
|
|
1016
|
+
/** @returns {Page} */
|
|
1017
|
+
static Page() {
|
|
636
1018
|
return Joi.object({
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
1019
|
+
current: Joi.number(),
|
|
1020
|
+
has_next: Joi.boolean(),
|
|
1021
|
+
has_previous: Joi.boolean(),
|
|
1022
|
+
item_total: Joi.number(),
|
|
1023
|
+
next_id: Joi.string().allow(""),
|
|
1024
|
+
size: Joi.number(),
|
|
1025
|
+
type: Joi.string().allow("").required(),
|
|
640
1026
|
});
|
|
641
1027
|
}
|
|
642
1028
|
|
|
643
|
-
/** @returns {
|
|
644
|
-
static
|
|
1029
|
+
/** @returns {PaletteConfig} */
|
|
1030
|
+
static PaletteConfig() {
|
|
645
1031
|
return Joi.object({
|
|
646
|
-
|
|
647
|
-
|
|
1032
|
+
advance_setting: ThemePlatformModel.AdvanceSetting(),
|
|
1033
|
+
general_setting: ThemePlatformModel.GeneralSetting(),
|
|
648
1034
|
});
|
|
649
1035
|
}
|
|
650
1036
|
|
|
651
|
-
/** @returns {
|
|
652
|
-
static
|
|
1037
|
+
/** @returns {Predicate} */
|
|
1038
|
+
static Predicate() {
|
|
653
1039
|
return Joi.object({
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
size: Joi.number(),
|
|
658
|
-
type: Joi.string().allow(""),
|
|
1040
|
+
route: ThemePlatformModel.Route(),
|
|
1041
|
+
screen: ThemePlatformModel.Screen(),
|
|
1042
|
+
user: ThemePlatformModel.ThemeUserSchema(),
|
|
659
1043
|
});
|
|
660
1044
|
}
|
|
661
1045
|
|
|
662
1046
|
/** @returns {Preset} */
|
|
663
1047
|
static Preset() {
|
|
664
1048
|
return Joi.object({
|
|
665
|
-
pages: Joi.array().items(ThemePlatformModel.
|
|
1049
|
+
pages: Joi.array().items(ThemePlatformModel.Page()),
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
/** @returns {Prop} */
|
|
1054
|
+
static Prop() {
|
|
1055
|
+
return Joi.object({
|
|
1056
|
+
category: Joi.string().allow(""),
|
|
1057
|
+
id: Joi.string().allow(""),
|
|
1058
|
+
info: Joi.string().allow(""),
|
|
1059
|
+
label: Joi.string().allow(""),
|
|
1060
|
+
type: Joi.string().allow(""),
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
/** @returns {RangeProp} */
|
|
1065
|
+
static RangeProp() {
|
|
1066
|
+
return Joi.object({
|
|
1067
|
+
type: Joi.string().allow(""),
|
|
1068
|
+
value: Joi.number(),
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/** @returns {Release} */
|
|
1073
|
+
static Release() {
|
|
1074
|
+
return Joi.object({
|
|
1075
|
+
notes: Joi.string().allow(""),
|
|
1076
|
+
version: Joi.string().allow(""),
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
/** @returns {Route} */
|
|
1081
|
+
static Route() {
|
|
1082
|
+
return Joi.object({
|
|
1083
|
+
exact_url: Joi.string().allow(""),
|
|
1084
|
+
selected: Joi.string().allow(""),
|
|
1085
|
+
});
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
/** @returns {SaleDiscountSetting} */
|
|
1089
|
+
static SaleDiscountSetting() {
|
|
1090
|
+
return Joi.object({
|
|
1091
|
+
sale_badge_background: Joi.string().allow(""),
|
|
1092
|
+
sale_badge_text: Joi.string().allow(""),
|
|
1093
|
+
sale_discount_text: Joi.string().allow(""),
|
|
1094
|
+
sale_timer: Joi.string().allow(""),
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
/** @returns {Screen} */
|
|
1099
|
+
static Screen() {
|
|
1100
|
+
return Joi.object({
|
|
1101
|
+
desktop: Joi.boolean(),
|
|
1102
|
+
mobile: Joi.boolean(),
|
|
1103
|
+
tablet: Joi.boolean(),
|
|
666
1104
|
});
|
|
667
1105
|
}
|
|
668
1106
|
|
|
669
|
-
/** @returns {
|
|
670
|
-
static
|
|
1107
|
+
/** @returns {Section} */
|
|
1108
|
+
static Section() {
|
|
671
1109
|
return Joi.object({
|
|
672
|
-
|
|
1110
|
+
blocks: Joi.array().items(ThemePlatformModel.Block()),
|
|
1111
|
+
name: Joi.string().allow(""),
|
|
1112
|
+
predicate: ThemePlatformModel.Predicate(),
|
|
1113
|
+
preset: ThemePlatformModel.SectionPreset(),
|
|
1114
|
+
props: ThemePlatformModel.SectionProps(),
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
/** @returns {SectionItem} */
|
|
1119
|
+
static SectionItem() {
|
|
1120
|
+
return Joi.object({
|
|
1121
|
+
blocks: Joi.array().items(Joi.any()),
|
|
1122
|
+
label: Joi.string().allow(""),
|
|
673
1123
|
name: Joi.string().allow(""),
|
|
1124
|
+
props: Joi.array().items(Joi.any()),
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
/** @returns {SectionPreset} */
|
|
1129
|
+
static SectionPreset() {
|
|
1130
|
+
return Joi.object({
|
|
1131
|
+
blocks: Joi.array().items(ThemePlatformModel.Block()),
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/** @returns {SectionProps} */
|
|
1136
|
+
static SectionProps() {
|
|
1137
|
+
return Joi.object({
|
|
1138
|
+
autoplay: ThemePlatformModel.CheckboxProp(),
|
|
1139
|
+
item_margin: ThemePlatformModel.TextProp(),
|
|
1140
|
+
slide_interval: ThemePlatformModel.RangeProp(),
|
|
1141
|
+
title: ThemePlatformModel.TextProp(),
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
/** @returns {StaticConfig} */
|
|
1146
|
+
static StaticConfig() {
|
|
1147
|
+
return Joi.object({
|
|
1148
|
+
props: ThemePlatformModel.StaticProps(),
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
/** @returns {StaticProps} */
|
|
1153
|
+
static StaticProps() {
|
|
1154
|
+
return Joi.object({
|
|
1155
|
+
auth: ThemePlatformModel.AuthConfig(),
|
|
1156
|
+
colors: ThemePlatformModel.Colors(),
|
|
1157
|
+
palette: ThemePlatformModel.PaletteConfig(),
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
/** @returns {TextProp} */
|
|
1162
|
+
static TextProp() {
|
|
1163
|
+
return Joi.object({
|
|
1164
|
+
type: Joi.string().allow(""),
|
|
1165
|
+
value: Joi.string().allow(""),
|
|
674
1166
|
});
|
|
675
1167
|
}
|
|
676
1168
|
|
|
677
|
-
/** @returns {
|
|
678
|
-
static
|
|
1169
|
+
/** @returns {TextSetting} */
|
|
1170
|
+
static TextSetting() {
|
|
679
1171
|
return Joi.object({
|
|
680
|
-
|
|
1172
|
+
text_body: Joi.string().allow(""),
|
|
1173
|
+
text_heading: Joi.string().allow(""),
|
|
1174
|
+
text_label: Joi.string().allow(""),
|
|
1175
|
+
text_secondary: Joi.string().allow(""),
|
|
681
1176
|
});
|
|
682
1177
|
}
|
|
683
1178
|
|
|
684
|
-
/** @returns {
|
|
685
|
-
static
|
|
1179
|
+
/** @returns {ThemeConfiguration} */
|
|
1180
|
+
static ThemeConfiguration() {
|
|
686
1181
|
return Joi.object({
|
|
687
|
-
|
|
1182
|
+
custom: ThemePlatformModel.CustomConfig(),
|
|
1183
|
+
global_config: Joi.any(),
|
|
688
1184
|
name: Joi.string().allow(""),
|
|
1185
|
+
page: Joi.array().items(Joi.string().allow("")),
|
|
689
1186
|
});
|
|
690
1187
|
}
|
|
691
1188
|
|
|
692
|
-
/** @returns {
|
|
693
|
-
static
|
|
1189
|
+
/** @returns {ThemeImages} */
|
|
1190
|
+
static ThemeImages() {
|
|
694
1191
|
return Joi.object({
|
|
695
|
-
|
|
1192
|
+
desktop: Joi.string().allow(""),
|
|
1193
|
+
mobile: Joi.string().allow(""),
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
/** @returns {ThemeMeta} */
|
|
1198
|
+
static ThemeMeta() {
|
|
1199
|
+
return Joi.object({
|
|
1200
|
+
description: Joi.string().allow(""),
|
|
1201
|
+
images: ThemePlatformModel.ThemeImages(),
|
|
1202
|
+
industry: Joi.array().items(Joi.string().allow("")),
|
|
1203
|
+
payment: ThemePlatformModel.ThemePayment(),
|
|
1204
|
+
slug: Joi.string().allow(""),
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
/** @returns {ThemePayment} */
|
|
1209
|
+
static ThemePayment() {
|
|
1210
|
+
return Joi.object({
|
|
1211
|
+
amount: Joi.number(),
|
|
1212
|
+
is_paid: Joi.boolean(),
|
|
696
1213
|
});
|
|
697
1214
|
}
|
|
698
1215
|
|
|
699
|
-
/** @returns {
|
|
700
|
-
static
|
|
1216
|
+
/** @returns {ThemeReq} */
|
|
1217
|
+
static ThemeReq() {
|
|
701
1218
|
return Joi.object({
|
|
702
|
-
|
|
703
|
-
|
|
1219
|
+
marketplace_theme_id: Joi.string().allow(""),
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/** @returns {ThemeSetting} */
|
|
1224
|
+
static ThemeSetting() {
|
|
1225
|
+
return Joi.object({
|
|
1226
|
+
page_background: Joi.string().allow(""),
|
|
1227
|
+
theme_accent: Joi.string().allow(""),
|
|
704
1228
|
});
|
|
705
1229
|
}
|
|
706
1230
|
|
|
707
1231
|
/** @returns {ThemesSchema} */
|
|
708
1232
|
static ThemesSchema() {
|
|
709
1233
|
return Joi.object({
|
|
710
|
-
__v: Joi.number(),
|
|
711
1234
|
_id: Joi.string().allow(""),
|
|
712
|
-
|
|
1235
|
+
application_id: Joi.string().allow(""),
|
|
713
1236
|
applied: Joi.boolean(),
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
available_sections: Joi.array().items(
|
|
717
|
-
ThemePlatformModel.availableSectionSchema()
|
|
718
|
-
),
|
|
719
|
-
colors: ThemePlatformModel.Colors(),
|
|
1237
|
+
assets: ThemePlatformModel.Assets(),
|
|
1238
|
+
available_sections: Joi.array().items(ThemePlatformModel.SectionItem()),
|
|
720
1239
|
config: ThemePlatformModel.Config(),
|
|
721
1240
|
created_at: Joi.string().allow(""),
|
|
722
|
-
customized: Joi.boolean(),
|
|
723
1241
|
font: ThemePlatformModel.Font(),
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
src: ThemePlatformModel.Src(),
|
|
1242
|
+
is_private: Joi.boolean(),
|
|
1243
|
+
marketplace_theme_id: Joi.string().allow(""),
|
|
1244
|
+
meta: ThemePlatformModel.Meta(),
|
|
1245
|
+
name: Joi.string().allow(""),
|
|
729
1246
|
styles: Joi.any(),
|
|
730
1247
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1248
|
+
template_theme_id: Joi.string().allow(""),
|
|
731
1249
|
updated_at: Joi.string().allow(""),
|
|
732
1250
|
version: Joi.string().allow(""),
|
|
733
1251
|
});
|
|
734
1252
|
}
|
|
735
1253
|
|
|
736
|
-
/** @returns {
|
|
737
|
-
static
|
|
1254
|
+
/** @returns {ThemeUpgradableResponse} */
|
|
1255
|
+
static ThemeUpgradableResponse() {
|
|
738
1256
|
return Joi.object({
|
|
739
|
-
|
|
740
|
-
|
|
1257
|
+
message: Joi.string().allow(""),
|
|
1258
|
+
upgrade: Joi.boolean(),
|
|
1259
|
+
versions: ThemePlatformModel.ThemeVersions(),
|
|
741
1260
|
});
|
|
742
1261
|
}
|
|
743
1262
|
|
|
744
|
-
/** @returns {
|
|
745
|
-
static
|
|
1263
|
+
/** @returns {ThemeUserSchema} */
|
|
1264
|
+
static ThemeUserSchema() {
|
|
1265
|
+
return Joi.object({
|
|
1266
|
+
anonymous: Joi.boolean(),
|
|
1267
|
+
authenticated: Joi.boolean(),
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
/** @returns {ThemeVersions} */
|
|
1272
|
+
static ThemeVersions() {
|
|
746
1273
|
return Joi.object({
|
|
747
1274
|
applied_theme: Joi.string().allow(""),
|
|
748
1275
|
parent_theme: Joi.string().allow(""),
|
|
749
|
-
upgrade: Joi.boolean(),
|
|
750
1276
|
});
|
|
751
1277
|
}
|
|
752
1278
|
|
|
753
|
-
/** @returns {
|
|
754
|
-
static
|
|
1279
|
+
/** @returns {UMDJs} */
|
|
1280
|
+
static UMDJs() {
|
|
1281
|
+
return Joi.object({
|
|
1282
|
+
links: Joi.array().items(Joi.string().allow("")),
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
/** @returns {UpdateThemeNameRequestBody} */
|
|
1287
|
+
static UpdateThemeNameRequestBody() {
|
|
1288
|
+
return Joi.object({
|
|
1289
|
+
name: Joi.string().allow(""),
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
/** @returns {UpdateThemeRequestBody} */
|
|
1294
|
+
static UpdateThemeRequestBody() {
|
|
1295
|
+
return Joi.object({
|
|
1296
|
+
config: ThemePlatformModel.Config(),
|
|
1297
|
+
font: ThemePlatformModel.Font(),
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
/** @returns {UrlProp} */
|
|
1302
|
+
static UrlProp() {
|
|
1303
|
+
return Joi.object({
|
|
1304
|
+
type: Joi.string().allow(""),
|
|
1305
|
+
value: Joi.string().allow(""),
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
/** @returns {UserAlertsSetting} */
|
|
1310
|
+
static UserAlertsSetting() {
|
|
755
1311
|
return Joi.object({
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
1312
|
+
error_background: Joi.string().allow(""),
|
|
1313
|
+
error_text: Joi.string().allow(""),
|
|
1314
|
+
info_background: Joi.string().allow(""),
|
|
1315
|
+
info_text: Joi.string().allow(""),
|
|
1316
|
+
success_background: Joi.string().allow(""),
|
|
1317
|
+
success_text: Joi.string().allow(""),
|
|
761
1318
|
});
|
|
762
1319
|
}
|
|
763
1320
|
}
|