@gofynd/fdk-client-javascript 1.2.0 → 1.3.0

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