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