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