amsdal 0.5.34__cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

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 (276) hide show
  1. amsdal/Third-Party Materials - AMSDAL Dependencies - License Notices.md +1362 -0
  2. amsdal/__about__.py +4 -0
  3. amsdal/__about__.pyi +1 -0
  4. amsdal/__init__.py +23 -0
  5. amsdal/__init__.pyi +9 -0
  6. amsdal/__migrations__/0000_initial.py +36 -0
  7. amsdal/__migrations__/0001_create_class_file.py +61 -0
  8. amsdal/__migrations__/0002_create_class_file.py +109 -0
  9. amsdal/__migrations__/0003_update_class_file.py +91 -0
  10. amsdal/__migrations__/0004_update_class_file.py +45 -0
  11. amsdal/cloud/__init__.cpython-313-x86_64-linux-gnu.so +0 -0
  12. amsdal/cloud/__init__.pyi +0 -0
  13. amsdal/cloud/client.cpython-313-x86_64-linux-gnu.so +0 -0
  14. amsdal/cloud/client.pyi +57 -0
  15. amsdal/cloud/constants.cpython-313-x86_64-linux-gnu.so +0 -0
  16. amsdal/cloud/constants.pyi +13 -0
  17. amsdal/cloud/enums.cpython-313-x86_64-linux-gnu.so +0 -0
  18. amsdal/cloud/enums.pyi +68 -0
  19. amsdal/cloud/models/__init__.cpython-313-x86_64-linux-gnu.so +0 -0
  20. amsdal/cloud/models/__init__.pyi +0 -0
  21. amsdal/cloud/models/base.cpython-313-x86_64-linux-gnu.so +0 -0
  22. amsdal/cloud/models/base.pyi +247 -0
  23. amsdal/cloud/services/__init__.cpython-313-x86_64-linux-gnu.so +0 -0
  24. amsdal/cloud/services/__init__.pyi +0 -0
  25. amsdal/cloud/services/actions/__init__.cpython-313-x86_64-linux-gnu.so +0 -0
  26. amsdal/cloud/services/actions/__init__.pyi +0 -0
  27. amsdal/cloud/services/actions/add_allowlist_ip.cpython-313-x86_64-linux-gnu.so +0 -0
  28. amsdal/cloud/services/actions/add_allowlist_ip.pyi +19 -0
  29. amsdal/cloud/services/actions/add_basic_auth.cpython-313-x86_64-linux-gnu.so +0 -0
  30. amsdal/cloud/services/actions/add_basic_auth.pyi +21 -0
  31. amsdal/cloud/services/actions/add_dependency.cpython-313-x86_64-linux-gnu.so +0 -0
  32. amsdal/cloud/services/actions/add_dependency.pyi +19 -0
  33. amsdal/cloud/services/actions/add_secret.cpython-313-x86_64-linux-gnu.so +0 -0
  34. amsdal/cloud/services/actions/add_secret.pyi +20 -0
  35. amsdal/cloud/services/actions/base.cpython-313-x86_64-linux-gnu.so +0 -0
  36. amsdal/cloud/services/actions/base.pyi +122 -0
  37. amsdal/cloud/services/actions/create_deploy.cpython-313-x86_64-linux-gnu.so +0 -0
  38. amsdal/cloud/services/actions/create_deploy.pyi +41 -0
  39. amsdal/cloud/services/actions/create_env.cpython-313-x86_64-linux-gnu.so +0 -0
  40. amsdal/cloud/services/actions/create_env.pyi +19 -0
  41. amsdal/cloud/services/actions/create_session.cpython-313-x86_64-linux-gnu.so +0 -0
  42. amsdal/cloud/services/actions/create_session.pyi +17 -0
  43. amsdal/cloud/services/actions/delete_allowlist_ip.cpython-313-x86_64-linux-gnu.so +0 -0
  44. amsdal/cloud/services/actions/delete_allowlist_ip.pyi +19 -0
  45. amsdal/cloud/services/actions/delete_basic_auth.cpython-313-x86_64-linux-gnu.so +0 -0
  46. amsdal/cloud/services/actions/delete_basic_auth.pyi +20 -0
  47. amsdal/cloud/services/actions/delete_dependency.cpython-313-x86_64-linux-gnu.so +0 -0
  48. amsdal/cloud/services/actions/delete_dependency.pyi +21 -0
  49. amsdal/cloud/services/actions/delete_env.cpython-313-x86_64-linux-gnu.so +0 -0
  50. amsdal/cloud/services/actions/delete_env.pyi +21 -0
  51. amsdal/cloud/services/actions/delete_secret.cpython-313-x86_64-linux-gnu.so +0 -0
  52. amsdal/cloud/services/actions/delete_secret.pyi +21 -0
  53. amsdal/cloud/services/actions/destroy_deploy.cpython-313-x86_64-linux-gnu.so +0 -0
  54. amsdal/cloud/services/actions/destroy_deploy.pyi +18 -0
  55. amsdal/cloud/services/actions/expose_db.cpython-313-x86_64-linux-gnu.so +0 -0
  56. amsdal/cloud/services/actions/expose_db.pyi +22 -0
  57. amsdal/cloud/services/actions/get_basic_auth_credentials.cpython-313-x86_64-linux-gnu.so +0 -0
  58. amsdal/cloud/services/actions/get_basic_auth_credentials.pyi +21 -0
  59. amsdal/cloud/services/actions/get_monitoring_info.cpython-313-x86_64-linux-gnu.so +0 -0
  60. amsdal/cloud/services/actions/get_monitoring_info.pyi +21 -0
  61. amsdal/cloud/services/actions/list_dependencies.cpython-313-x86_64-linux-gnu.so +0 -0
  62. amsdal/cloud/services/actions/list_dependencies.pyi +21 -0
  63. amsdal/cloud/services/actions/list_deploys.cpython-313-x86_64-linux-gnu.so +0 -0
  64. amsdal/cloud/services/actions/list_deploys.pyi +19 -0
  65. amsdal/cloud/services/actions/list_envs.cpython-313-x86_64-linux-gnu.so +0 -0
  66. amsdal/cloud/services/actions/list_envs.pyi +20 -0
  67. amsdal/cloud/services/actions/list_secrets.cpython-313-x86_64-linux-gnu.so +0 -0
  68. amsdal/cloud/services/actions/list_secrets.pyi +22 -0
  69. amsdal/cloud/services/actions/manager.cpython-313-x86_64-linux-gnu.so +0 -0
  70. amsdal/cloud/services/actions/manager.pyi +278 -0
  71. amsdal/cloud/services/actions/signup_action.cpython-313-x86_64-linux-gnu.so +0 -0
  72. amsdal/cloud/services/actions/signup_action.pyi +20 -0
  73. amsdal/cloud/services/actions/update_deploy.cpython-313-x86_64-linux-gnu.so +0 -0
  74. amsdal/cloud/services/actions/update_deploy.pyi +19 -0
  75. amsdal/cloud/services/auth/__init__.cpython-313-x86_64-linux-gnu.so +0 -0
  76. amsdal/cloud/services/auth/__init__.pyi +0 -0
  77. amsdal/cloud/services/auth/base.cpython-313-x86_64-linux-gnu.so +0 -0
  78. amsdal/cloud/services/auth/base.pyi +6 -0
  79. amsdal/cloud/services/auth/credentials.cpython-313-x86_64-linux-gnu.so +0 -0
  80. amsdal/cloud/services/auth/credentials.pyi +30 -0
  81. amsdal/cloud/services/auth/manager.cpython-313-x86_64-linux-gnu.so +0 -0
  82. amsdal/cloud/services/auth/manager.pyi +26 -0
  83. amsdal/cloud/services/auth/signup_service.cpython-313-x86_64-linux-gnu.so +0 -0
  84. amsdal/cloud/services/auth/signup_service.pyi +32 -0
  85. amsdal/cloud/services/auth/token.cpython-313-x86_64-linux-gnu.so +0 -0
  86. amsdal/cloud/services/auth/token.pyi +27 -0
  87. amsdal/configs/__init__.py +0 -0
  88. amsdal/configs/__init__.pyi +0 -0
  89. amsdal/configs/constants.py +33 -0
  90. amsdal/configs/constants.pyi +22 -0
  91. amsdal/configs/main.py +274 -0
  92. amsdal/configs/main.pyi +178 -0
  93. amsdal/context/__init__.py +0 -0
  94. amsdal/context/__init__.pyi +0 -0
  95. amsdal/context/manager.py +69 -0
  96. amsdal/context/manager.pyi +50 -0
  97. amsdal/contrib/__init__.cpython-313-x86_64-linux-gnu.so +0 -0
  98. amsdal/contrib/__init__.pyi +0 -0
  99. amsdal/contrib/app_config.py +7 -0
  100. amsdal/contrib/app_config.pyi +6 -0
  101. amsdal/contrib/auth/__init__.py +0 -0
  102. amsdal/contrib/auth/__init__.pyi +0 -0
  103. amsdal/contrib/auth/app.py +27 -0
  104. amsdal/contrib/auth/app.pyi +15 -0
  105. amsdal/contrib/auth/decorators/__init__.py +35 -0
  106. amsdal/contrib/auth/decorators/__init__.pyi +6 -0
  107. amsdal/contrib/auth/errors.py +43 -0
  108. amsdal/contrib/auth/errors.pyi +16 -0
  109. amsdal/contrib/auth/fixtures/basic_permissions.json +64 -0
  110. amsdal/contrib/auth/lifecycle/__init__.py +0 -0
  111. amsdal/contrib/auth/lifecycle/__init__.pyi +0 -0
  112. amsdal/contrib/auth/lifecycle/consumer.py +394 -0
  113. amsdal/contrib/auth/lifecycle/consumer.pyi +108 -0
  114. amsdal/contrib/auth/migrations/0000_initial.py +87 -0
  115. amsdal/contrib/auth/migrations/0001_add_mfa_support.py +188 -0
  116. amsdal/contrib/auth/models/__init__.py +1 -0
  117. amsdal/contrib/auth/models/backup_code.py +85 -0
  118. amsdal/contrib/auth/models/email_mfa_device.py +108 -0
  119. amsdal/contrib/auth/models/login_session.py +235 -0
  120. amsdal/contrib/auth/models/mfa_device.py +86 -0
  121. amsdal/contrib/auth/models/permission.py +23 -0
  122. amsdal/contrib/auth/models/sms_device.py +113 -0
  123. amsdal/contrib/auth/models/totp_device.py +58 -0
  124. amsdal/contrib/auth/models/user.py +156 -0
  125. amsdal/contrib/auth/services/__init__.py +1 -0
  126. amsdal/contrib/auth/services/__init__.pyi +0 -0
  127. amsdal/contrib/auth/services/mfa_device_service.py +544 -0
  128. amsdal/contrib/auth/services/mfa_device_service.pyi +216 -0
  129. amsdal/contrib/auth/services/totp_service.py +358 -0
  130. amsdal/contrib/auth/services/totp_service.pyi +158 -0
  131. amsdal/contrib/auth/settings.py +44 -0
  132. amsdal/contrib/auth/settings.pyi +34 -0
  133. amsdal/contrib/auth/transactions/__init__.py +1 -0
  134. amsdal/contrib/auth/transactions/__init__.pyi +0 -0
  135. amsdal/contrib/auth/transactions/mfa_device_transactions.py +458 -0
  136. amsdal/contrib/auth/transactions/mfa_device_transactions.pyi +226 -0
  137. amsdal/contrib/auth/transactions/totp_transactions.py +203 -0
  138. amsdal/contrib/auth/transactions/totp_transactions.pyi +113 -0
  139. amsdal/contrib/auth/utils/__init__.py +0 -0
  140. amsdal/contrib/auth/utils/__init__.pyi +0 -0
  141. amsdal/contrib/auth/utils/mfa.py +257 -0
  142. amsdal/contrib/auth/utils/mfa.pyi +119 -0
  143. amsdal/contrib/frontend_configs/__init__.py +0 -0
  144. amsdal/contrib/frontend_configs/__init__.pyi +0 -0
  145. amsdal/contrib/frontend_configs/app.py +24 -0
  146. amsdal/contrib/frontend_configs/app.pyi +19 -0
  147. amsdal/contrib/frontend_configs/constants.py +1 -0
  148. amsdal/contrib/frontend_configs/constants.pyi +1 -0
  149. amsdal/contrib/frontend_configs/conversion/__init__.py +5 -0
  150. amsdal/contrib/frontend_configs/conversion/__init__.pyi +3 -0
  151. amsdal/contrib/frontend_configs/conversion/convert.py +310 -0
  152. amsdal/contrib/frontend_configs/conversion/convert.pyi +22 -0
  153. amsdal/contrib/frontend_configs/lifecycle/__init__.py +0 -0
  154. amsdal/contrib/frontend_configs/lifecycle/__init__.pyi +0 -0
  155. amsdal/contrib/frontend_configs/lifecycle/consumer.py +306 -0
  156. amsdal/contrib/frontend_configs/lifecycle/consumer.pyi +98 -0
  157. amsdal/contrib/frontend_configs/migrations/0000_initial.py +227 -0
  158. amsdal/contrib/frontend_configs/migrations/0001_update_frontend_control_config.py +245 -0
  159. amsdal/contrib/frontend_configs/migrations/0002_add_button_and_invoke_actions.py +352 -0
  160. amsdal/contrib/frontend_configs/migrations/0003_create_class_frontendconfigdashboardelement.py +145 -0
  161. amsdal/contrib/frontend_configs/models/__init__.py +0 -0
  162. amsdal/contrib/frontend_configs/models/frontend_activator_config.py +22 -0
  163. amsdal/contrib/frontend_configs/models/frontend_config_async_validator.py +11 -0
  164. amsdal/contrib/frontend_configs/models/frontend_config_control_action.py +110 -0
  165. amsdal/contrib/frontend_configs/models/frontend_config_dashboard.py +51 -0
  166. amsdal/contrib/frontend_configs/models/frontend_config_group_validator.py +21 -0
  167. amsdal/contrib/frontend_configs/models/frontend_config_option.py +12 -0
  168. amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base.py +17 -0
  169. amsdal/contrib/frontend_configs/models/frontend_config_slider_option.py +13 -0
  170. amsdal/contrib/frontend_configs/models/frontend_config_text_mask.py +14 -0
  171. amsdal/contrib/frontend_configs/models/frontend_config_validator.py +28 -0
  172. amsdal/contrib/frontend_configs/models/frontend_control_config.py +110 -0
  173. amsdal/contrib/frontend_configs/models/frontend_model_config.py +14 -0
  174. amsdal/contrib/frontend_configs/utils.py +29 -0
  175. amsdal/contrib/frontend_configs/utils.pyi +17 -0
  176. amsdal/errors.py +31 -0
  177. amsdal/errors.pyi +12 -0
  178. amsdal/fixtures/__init__.cpython-313-x86_64-linux-gnu.so +0 -0
  179. amsdal/fixtures/__init__.pyi +0 -0
  180. amsdal/fixtures/manager.cpython-313-x86_64-linux-gnu.so +0 -0
  181. amsdal/fixtures/manager.pyi +170 -0
  182. amsdal/fixtures/utils.cpython-313-x86_64-linux-gnu.so +0 -0
  183. amsdal/fixtures/utils.pyi +9 -0
  184. amsdal/manager.cpython-313-x86_64-linux-gnu.so +0 -0
  185. amsdal/manager.pyi +265 -0
  186. amsdal/mixins/__init__.cpython-313-x86_64-linux-gnu.so +0 -0
  187. amsdal/mixins/__init__.pyi +0 -0
  188. amsdal/mixins/class_versions_mixin.cpython-313-x86_64-linux-gnu.so +0 -0
  189. amsdal/mixins/class_versions_mixin.pyi +12 -0
  190. amsdal/models/__init__.py +19 -0
  191. amsdal/models/core/__init__.py +0 -0
  192. amsdal/models/core/class_object.py +38 -0
  193. amsdal/models/core/class_property.py +26 -0
  194. amsdal/models/core/file.py +243 -0
  195. amsdal/models/core/fixture.py +25 -0
  196. amsdal/models/core/option.py +11 -0
  197. amsdal/models/core/storage_metadata.py +15 -0
  198. amsdal/models/core/validator.py +12 -0
  199. amsdal/models/mixins.py +31 -0
  200. amsdal/models/types/__init__.py +0 -0
  201. amsdal/models/types/object.py +26 -0
  202. amsdal/py.typed +0 -0
  203. amsdal/queryset/__init__.py +21 -0
  204. amsdal/queryset/__init__.pyi +6 -0
  205. amsdal/schemas/__init__.py +0 -0
  206. amsdal/schemas/__init__.pyi +0 -0
  207. amsdal/schemas/core/class_object/model.json +51 -0
  208. amsdal/schemas/core/class_object/properties/display_name.py +9 -0
  209. amsdal/schemas/core/class_property/model.json +41 -0
  210. amsdal/schemas/core/file/hooks/pre_create.py +24 -0
  211. amsdal/schemas/core/file/hooks/pre_update.py +24 -0
  212. amsdal/schemas/core/file/model.json +23 -0
  213. amsdal/schemas/core/file/properties/from_file.py +34 -0
  214. amsdal/schemas/core/file/properties/mimetype.py +13 -0
  215. amsdal/schemas/core/file/properties/str.py +6 -0
  216. amsdal/schemas/core/file/properties/to_file.py +24 -0
  217. amsdal/schemas/core/file/properties/validate_data.py +31 -0
  218. amsdal/schemas/core/fixture/model.json +35 -0
  219. amsdal/schemas/core/option/model.json +19 -0
  220. amsdal/schemas/core/storage_metadata/model.json +52 -0
  221. amsdal/schemas/core/validator/model.json +19 -0
  222. amsdal/schemas/interfaces.py +25 -0
  223. amsdal/schemas/interfaces.pyi +20 -0
  224. amsdal/schemas/manager.cpython-313-x86_64-linux-gnu.so +0 -0
  225. amsdal/schemas/manager.py +0 -0
  226. amsdal/schemas/manager.pyi +0 -0
  227. amsdal/schemas/mixins/__init__.py +0 -0
  228. amsdal/schemas/mixins/__init__.pyi +0 -0
  229. amsdal/schemas/mixins/check_dependencies_mixin.py +130 -0
  230. amsdal/schemas/mixins/check_dependencies_mixin.pyi +45 -0
  231. amsdal/schemas/mixins/verify_schemas_mixin.py +96 -0
  232. amsdal/schemas/mixins/verify_schemas_mixin.pyi +33 -0
  233. amsdal/schemas/repository.py +84 -0
  234. amsdal/schemas/repository.pyi +22 -0
  235. amsdal/schemas/types/anything/model.json +7 -0
  236. amsdal/schemas/types/array/model.json +7 -0
  237. amsdal/schemas/types/binary/model.json +7 -0
  238. amsdal/schemas/types/boolean/model.json +17 -0
  239. amsdal/schemas/types/date/model.json +7 -0
  240. amsdal/schemas/types/datetime/model.json +7 -0
  241. amsdal/schemas/types/dictionary/model.json +8 -0
  242. amsdal/schemas/types/number/model.json +8 -0
  243. amsdal/schemas/types/object/model.json +53 -0
  244. amsdal/schemas/types/string/model.json +8 -0
  245. amsdal/schemas/utils.py +16 -0
  246. amsdal/schemas/utils.pyi +10 -0
  247. amsdal/services/__init__.py +11 -0
  248. amsdal/services/__init__.pyi +4 -0
  249. amsdal/services/external_connections.py +262 -0
  250. amsdal/services/external_connections.pyi +190 -0
  251. amsdal/services/external_model_generator.py +350 -0
  252. amsdal/services/external_model_generator.pyi +134 -0
  253. amsdal/services/transaction_execution.cpython-313-x86_64-linux-gnu.so +0 -0
  254. amsdal/services/transaction_execution.pyi +93 -0
  255. amsdal/storages/__init__.py +20 -0
  256. amsdal/storages/__init__.pyi +8 -0
  257. amsdal/storages/file_system.py +214 -0
  258. amsdal/storages/file_system.pyi +36 -0
  259. amsdal/transactions/__init__.py +13 -0
  260. amsdal/transactions/__init__.pyi +4 -0
  261. amsdal/utils/__init__.py +0 -0
  262. amsdal/utils/__init__.pyi +0 -0
  263. amsdal/utils/contrib_paths.py +23 -0
  264. amsdal/utils/contrib_paths.pyi +14 -0
  265. amsdal/utils/rollback/__init__.py +440 -0
  266. amsdal/utils/rollback/__init__.pyi +38 -0
  267. amsdal/utils/tests/__init__.py +0 -0
  268. amsdal/utils/tests/enums.py +16 -0
  269. amsdal/utils/tests/factories.py +49 -0
  270. amsdal/utils/tests/helpers.py +331 -0
  271. amsdal/utils/tests/migrations.py +157 -0
  272. amsdal-0.5.34.dist-info/METADATA +375 -0
  273. amsdal-0.5.34.dist-info/RECORD +276 -0
  274. amsdal-0.5.34.dist-info/WHEEL +6 -0
  275. amsdal-0.5.34.dist-info/licenses/LICENSE.txt +107 -0
  276. amsdal-0.5.34.dist-info/top_level.txt +1 -0
@@ -0,0 +1,98 @@
1
+ from _typeshed import Incomplete
2
+ from amsdal_utils.lifecycle.consumer import LifecycleConsumer
3
+ from amsdal_utils.schemas.schema import PropertyData
4
+ from typing import Any
5
+
6
+ logger: Incomplete
7
+ core_to_frontend_types: Incomplete
8
+
9
+ def process_property(field_name: str, property_data: PropertyData) -> dict[str, Any]:
10
+ """
11
+ Processes a property and converts it to a frontend configuration dictionary.
12
+
13
+ This function takes a field name and property data, and converts them into a dictionary
14
+ that represents the configuration for a frontend form control. It handles various types
15
+ such as core types, arrays, dictionaries, and files.
16
+
17
+ Args:
18
+ field_name (str): The name of the field to be processed.
19
+ property_data (PropertyData): The property data to be processed.
20
+
21
+ Returns:
22
+ dict[str, Any]: A dictionary representing the frontend configuration for the given property.
23
+ """
24
+ def populate_frontend_config_with_values(config: dict[str, Any], values: dict[str, Any]) -> dict[str, Any]:
25
+ """
26
+ Populates a frontend configuration dictionary with values.
27
+
28
+ This function takes a frontend configuration dictionary and a dictionary of values,
29
+ and populates the configuration with the corresponding values. It recursively processes
30
+ nested controls to ensure all values are populated.
31
+
32
+ Args:
33
+ config (dict[str, Any]): The frontend configuration dictionary to be populated.
34
+ values (dict[str, Any]): The dictionary of values to populate the configuration with.
35
+
36
+ Returns:
37
+ dict[str, Any]: The populated frontend configuration dictionary.
38
+ """
39
+ def get_values_from_response(response: dict[str, Any] | list[dict[str, Any]]) -> dict[str, Any]:
40
+ """
41
+ Extracts values from a response dictionary or list of dictionaries.
42
+
43
+ This function processes a response to extract the relevant values. It checks if the response
44
+ is a dictionary containing a 'rows' key and processes the rows to find the appropriate values.
45
+ If the response is not in the expected format, it returns an empty dictionary.
46
+
47
+ Args:
48
+ response (dict[str, Any] | list[dict[str, Any]]): The response to extract values from.
49
+
50
+ Returns:
51
+ dict[str, Any]: A dictionary containing the extracted values.
52
+ """
53
+ def get_default_control(class_name: str) -> dict[str, Any]:
54
+ """
55
+ Retrieves the default frontend control configuration for a given class name.
56
+
57
+ This function attempts to import a class by its name from various schema types.
58
+ If the class is found, it converts it to a frontend configuration dictionary
59
+ and returns it. If the class is not found, it returns an empty dictionary.
60
+
61
+ Args:
62
+ class_name (str): The name of the class to retrieve the default control for.
63
+
64
+ Returns:
65
+ dict[str, Any]: A dictionary representing the frontend control configuration for the given class.
66
+ """
67
+
68
+ class ProcessResponseConsumer(LifecycleConsumer):
69
+ """
70
+ Consumer class for processing responses and populating frontend configurations.
71
+
72
+ This class extends the LifecycleConsumer and processes responses to populate
73
+ frontend configurations based on the class name and values extracted from the response.
74
+ """
75
+ def on_event(self, request: Any, response: dict[str, Any]) -> None:
76
+ """
77
+ Handles the event by extracting the class name and values from the request and response,
78
+ and populates the frontend configuration accordingly.
79
+
80
+ Args:
81
+ request (Any): The request object containing query and path parameters.
82
+ response (dict[str, Any]): The response dictionary to be processed.
83
+
84
+ Returns:
85
+ None
86
+ """
87
+ async def on_event_async(self, request: Any, response: dict[str, Any]) -> None:
88
+ """
89
+ Handles the event by extracting the class name and values from the request and response,
90
+ and populates the frontend configuration accordingly.
91
+
92
+ Args:
93
+ request (Any): The request object containing query and path parameters.
94
+ response (dict[str, Any]): The response dictionary to be processed.
95
+
96
+ Returns:
97
+ None
98
+ """
@@ -0,0 +1,227 @@
1
+ from amsdal_models.migration import migrations
2
+ from amsdal_utils.models.enums import ModuleType
3
+
4
+
5
+ class Migration(migrations.Migration):
6
+ operations: list[migrations.Operation] = [
7
+ migrations.CreateClass(
8
+ module_type=ModuleType.CONTRIB,
9
+ class_name="FrontendConfigSkipNoneBase",
10
+ new_schema={
11
+ "title": "FrontendConfigSkipNoneBase",
12
+ "properties": {},
13
+ "meta_class": "TypeMeta",
14
+ "custom_code": "from typing import Any\n\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
15
+ "storage_metadata": {"table_name": "FrontendConfigSkipNoneBase", "db_fields": {}, "foreign_keys": {}},
16
+ },
17
+ ),
18
+ migrations.CreateClass(
19
+ module_type=ModuleType.CONTRIB,
20
+ class_name="FrontendConfigAsyncValidator",
21
+ new_schema={
22
+ "title": "FrontendConfigAsyncValidator",
23
+ "type": "FrontendConfigSkipNoneBase",
24
+ "properties": {"endpoint": {"type": "string", "title": "Endpoint"}},
25
+ "meta_class": "TypeMeta",
26
+ "custom_code": "from typing import Any\n\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\n\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
27
+ "storage_metadata": {"table_name": "FrontendConfigAsyncValidator", "db_fields": {}, "foreign_keys": {}},
28
+ },
29
+ ),
30
+ migrations.CreateClass(
31
+ module_type=ModuleType.CONTRIB,
32
+ class_name="FrontendConfigControlAction",
33
+ new_schema={
34
+ "title": "FrontendConfigControlAction",
35
+ "type": "FrontendConfigSkipNoneBase",
36
+ "required": ["action", "text", "type"],
37
+ "properties": {
38
+ "action": {"type": "string", "title": "Action"},
39
+ "text": {"type": "string", "title": "Text"},
40
+ "type": {"type": "string", "title": "Type"},
41
+ "dataLayerEvent": {"type": "string", "title": "Data Layer Event"},
42
+ "activator": {"type": "string", "title": "Activator"},
43
+ "icon": {"type": "string", "title": "Icon"},
44
+ },
45
+ "meta_class": "TypeMeta",
46
+ "custom_code": "from typing import Any\n\nfrom amsdal_models.builder.validators.options_validators import validate_options\nfrom pydantic import field_validator\n\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\n\n\n@field_validator('action', mode='after')\n@classmethod\ndef validate_action(cls, v: str) -> str:\n \"\"\"\n Validates the action string to ensure it is one of the allowed values.\n\n This method checks if the action string starts with 'navigate::' or is one of the predefined\n actions. If the action string is invalid, it raises a ValueError.\n\n Args:\n cls: The class this method is attached to.\n v (str): The action string to validate.\n\n Returns:\n str: The validated action string.\n\n Raises:\n ValueError: If the action string is not valid.\n \"\"\"\n if not v.startswith('navigate::') and v not in ['goPrev', 'goNext', 'goNextWithSubmit', 'submit', 'submitWithDataLayer']:\n msg = 'Action must be one of: goPrev, goNext, goNextWithSubmit, submit, submitWithDataLayer, navigate::{string}'\n raise ValueError(msg)\n return v\n\n@field_validator('type')\n@classmethod\ndef validate_value_in_options_type(cls: type, value: Any) -> Any:\n return validate_options(value, options=['action-button', 'arrow-next', 'arrow-prev', 'text-next', 'text-prev'])\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
47
+ "storage_metadata": {"table_name": "FrontendConfigControlAction", "db_fields": {}, "foreign_keys": {}},
48
+ },
49
+ ),
50
+ migrations.CreateClass(
51
+ module_type=ModuleType.CONTRIB,
52
+ class_name="FrontendConfigGroupValidator",
53
+ new_schema={
54
+ "title": "FrontendConfigGroupValidator",
55
+ "type": "FrontendConfigSkipNoneBase",
56
+ "properties": {
57
+ "mainControl": {"type": "string", "title": "Main Control"},
58
+ "dependentControls": {"type": "array", "items": {"type": "string"}, "title": "Dependent Controls"},
59
+ "condition": {"type": "string", "title": "Condition"},
60
+ },
61
+ "meta_class": "TypeMeta",
62
+ "custom_code": "from typing import Any\n\nfrom amsdal_models.builder.validators.options_validators import validate_options\nfrom pydantic.functional_validators import field_validator\n\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\n\n\n@field_validator('condition')\n@classmethod\ndef validate_value_in_options_condition(cls: type, value: Any) -> Any:\n return validate_options(value, options=['eq', 'exist', 'gt', 'gte', 'lt', 'lte', 'neq'])\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
63
+ "storage_metadata": {"table_name": "FrontendConfigGroupValidator", "db_fields": {}, "foreign_keys": {}},
64
+ },
65
+ ),
66
+ migrations.CreateClass(
67
+ module_type=ModuleType.CONTRIB,
68
+ class_name="FrontendConfigOption",
69
+ new_schema={
70
+ "title": "FrontendConfigOption",
71
+ "type": "FrontendConfigSkipNoneBase",
72
+ "properties": {
73
+ "label": {"type": "string", "title": "Label"},
74
+ "value": {"type": "string", "title": "Value"},
75
+ },
76
+ "meta_class": "TypeMeta",
77
+ "custom_code": "from typing import Any\n\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\n\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
78
+ "storage_metadata": {"table_name": "FrontendConfigOption", "db_fields": {}, "foreign_keys": {}},
79
+ },
80
+ ),
81
+ migrations.CreateClass(
82
+ module_type=ModuleType.CONTRIB,
83
+ class_name="FrontendConfigSliderOption",
84
+ new_schema={
85
+ "title": "FrontendConfigSliderOption",
86
+ "type": "FrontendConfigSkipNoneBase",
87
+ "properties": {
88
+ "min": {"type": "number", "title": "Minimum"},
89
+ "max": {"type": "number", "title": "Maximum"},
90
+ "range": {"type": "boolean", "title": "Range"},
91
+ },
92
+ "meta_class": "TypeMeta",
93
+ "custom_code": "from typing import Any\n\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\n\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
94
+ "storage_metadata": {"table_name": "FrontendConfigSliderOption", "db_fields": {}, "foreign_keys": {}},
95
+ },
96
+ ),
97
+ migrations.CreateClass(
98
+ module_type=ModuleType.CONTRIB,
99
+ class_name="FrontendConfigTextMask",
100
+ new_schema={
101
+ "title": "FrontendConfigTextMask",
102
+ "type": "FrontendConfigSkipNoneBase",
103
+ "required": ["mask_string"],
104
+ "properties": {
105
+ "mask_string": {"type": "string", "title": "Mask String"},
106
+ "prefix": {"type": "string", "title": "Prefix"},
107
+ "suffix": {"type": "string", "title": "Suffix"},
108
+ "thousands_separator": {"type": "string", "title": "Thousands Separator"},
109
+ },
110
+ "meta_class": "TypeMeta",
111
+ "custom_code": "from typing import Any\n\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\n\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
112
+ "storage_metadata": {"table_name": "FrontendConfigTextMask", "db_fields": {}, "foreign_keys": {}},
113
+ },
114
+ ),
115
+ migrations.CreateClass(
116
+ module_type=ModuleType.CONTRIB,
117
+ class_name="FrontendActivatorConfig",
118
+ new_schema={
119
+ "title": "FrontendActivatorConfig",
120
+ "type": "FrontendConfigGroupValidator",
121
+ "properties": {
122
+ "mainControl": {"type": "string", "title": "Main Control"},
123
+ "dependentControls": {"type": "array", "items": {"type": "string"}, "title": "Dependent Controls"},
124
+ "condition": {"type": "string", "title": "Condition"},
125
+ "value": {"type": "anything", "title": "Value"},
126
+ },
127
+ "meta_class": "TypeMeta",
128
+ "custom_code": "from typing import Any\n\nfrom amsdal_models.builder.validators.options_validators import validate_options\nfrom pydantic.functional_validators import field_validator\n\nfrom amsdal.contrib.frontend_configs.models.frontend_config_group_validator import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\n\n\n@field_validator('condition')\n@classmethod\ndef validate_value_in_options_condition(cls: type, value: Any) -> Any:\n return validate_options(value, options=['eq', 'exist', 'gt', 'gte', 'lt', 'lte', 'neq'])\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
129
+ "storage_metadata": {"table_name": "FrontendActivatorConfig", "db_fields": {}, "foreign_keys": {}},
130
+ },
131
+ ),
132
+ migrations.CreateClass(
133
+ module_type=ModuleType.CONTRIB,
134
+ class_name="FrontendConfigValidator",
135
+ new_schema={
136
+ "title": "FrontendConfigValidator",
137
+ "type": "FrontendConfigGroupValidator",
138
+ "properties": {
139
+ "mainControl": {"type": "string", "title": "Main Control"},
140
+ "dependentControls": {"type": "array", "items": {"type": "string"}, "title": "Dependent Controls"},
141
+ "condition": {"type": "string", "title": "Condition"},
142
+ "function": {"type": "string", "title": "Function"},
143
+ "value": {"type": "string", "title": "Value"},
144
+ },
145
+ "meta_class": "TypeMeta",
146
+ "custom_code": "from typing import Any\n\nfrom amsdal_models.builder.validators.options_validators import validate_options\nfrom pydantic.functional_validators import field_validator\n\nfrom amsdal.contrib.frontend_configs.models.frontend_config_group_validator import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\n\n\n@field_validator('condition')\n@classmethod\ndef validate_value_in_options_condition(cls: type, value: Any) -> Any:\n return validate_options(value, options=['eq', 'exist', 'gt', 'gte', 'lt', 'lte', 'neq'])\n\n@field_validator('function')\n@classmethod\ndef validate_value_in_options_function(cls: type, value: Any) -> Any:\n return validate_options(value, options=['max', 'maxLength', 'min', 'minLength', 'pattern', 'required'])\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
147
+ "storage_metadata": {"table_name": "FrontendConfigValidator", "db_fields": {}, "foreign_keys": {}},
148
+ },
149
+ ),
150
+ migrations.CreateClass(
151
+ module_type=ModuleType.CONTRIB,
152
+ class_name="FrontendControlConfig",
153
+ new_schema={
154
+ "title": "FrontendControlConfig",
155
+ "type": "FrontendConfigSkipNoneBase",
156
+ "required": ["type", "name"],
157
+ "properties": {
158
+ "type": {"type": "string", "title": "Type"},
159
+ "name": {"type": "string", "title": "Name"},
160
+ "label": {"type": "string", "title": "Label"},
161
+ "required": {"type": "boolean", "title": "Required"},
162
+ "hideLabel": {"type": "boolean", "title": "Hide Label"},
163
+ "actions": {
164
+ "type": "array",
165
+ "items": {"type": "FrontendConfigControlAction", "title": "FrontendConfigControlAction"},
166
+ "title": "Actions",
167
+ },
168
+ "validators": {
169
+ "type": "array",
170
+ "items": {"type": "FrontendConfigValidator", "title": "FrontendConfigValidator"},
171
+ "title": "Validators",
172
+ },
173
+ "asyncValidators": {
174
+ "type": "array",
175
+ "items": {"type": "FrontendConfigAsyncValidator", "title": "FrontendConfigAsyncValidator"},
176
+ "title": "Async Validators",
177
+ },
178
+ "activators": {
179
+ "type": "array",
180
+ "items": {"type": "FrontendActivatorConfig", "title": "FrontendActivatorConfig"},
181
+ "title": "Activators",
182
+ },
183
+ "additionalText": {"type": "string", "title": "Additional Text"},
184
+ "value": {"type": "anything", "title": "Value"},
185
+ "placeholder": {"type": "string", "title": "Placeholder"},
186
+ "options": {
187
+ "type": "array",
188
+ "items": {"type": "FrontendConfigOption", "title": "FrontendConfigOption"},
189
+ "title": "Options",
190
+ },
191
+ "mask": {"type": "FrontendConfigTextMask", "title": "Mask"},
192
+ "controls": {
193
+ "type": "array",
194
+ "items": {"type": "FrontendControlConfig", "title": "FrontendControlConfig"},
195
+ "title": "Controls",
196
+ },
197
+ "showSearch": {"type": "boolean", "title": "Show Search"},
198
+ "sliderOptions": {"type": "FrontendConfigSliderOption", "title": "Slider Option"},
199
+ "customLabel": {"type": "array", "items": {"type": "string"}, "title": "Custom Label"},
200
+ "control": {"type": "FrontendControlConfig", "title": "Control"},
201
+ "entityType": {"type": "string", "title": "Entity Type"},
202
+ },
203
+ "meta_class": "TypeMeta",
204
+ "custom_code": "from typing import Any\n\nfrom amsdal_models.builder.validators.options_validators import validate_options\nfrom pydantic.functional_validators import field_validator\n\nfrom amsdal.contrib.frontend_configs.models.frontend_activator_config import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_async_validator import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_control_action import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_option import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_slider_option import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_text_mask import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_validator import *\n\n\n@field_validator('type')\n@classmethod\ndef validate_value_in_options_type(cls: type, value: Any) -> Any:\n return validate_options(value, options=['Bytes', 'array', 'checkbox', 'date', 'dateTriplet', 'datetime', 'dict', 'dropzone', 'email', 'file', 'group', 'group_switch', 'group_toggle', 'info-group', 'infoscreen', 'multiselect', 'number', 'number-operations', 'number-slider', 'number_equals', 'number_initial', 'number_minus', 'number_plus', 'object', 'object_group', 'object_latest', 'password', 'phone', 'radio', 'select', 'text', 'textarea', 'time', 'toggle'])\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
205
+ "storage_metadata": {"table_name": "FrontendControlConfig", "db_fields": {}, "foreign_keys": {}},
206
+ },
207
+ ),
208
+ migrations.CreateClass(
209
+ module_type=ModuleType.CONTRIB,
210
+ class_name="FrontendModelConfig",
211
+ new_schema={
212
+ "title": "FrontendModelConfig",
213
+ "required": ["class_name"],
214
+ "properties": {
215
+ "class_name": {"type": "string", "title": "Class Name"},
216
+ "control": {"type": "FrontendControlConfig", "title": "Control"},
217
+ },
218
+ "custom_code": "from amsdal.contrib.frontend_configs.models.frontend_control_config import *",
219
+ "storage_metadata": {
220
+ "table_name": "FrontendModelConfig",
221
+ "db_fields": {},
222
+ "primary_key": ["partition_key"],
223
+ "foreign_keys": {},
224
+ },
225
+ },
226
+ ),
227
+ ]
@@ -0,0 +1,245 @@
1
+ from amsdal_models.migration import migrations
2
+ from amsdal_utils.models.enums import ModuleType
3
+
4
+
5
+ class Migration(migrations.Migration):
6
+ operations: list[migrations.Operation] = [
7
+ migrations.CreateClass(
8
+ module_type=ModuleType.CONTRIB,
9
+ class_name="Condition",
10
+ new_schema={
11
+ "title": "Condition",
12
+ "type": "FrontendConfigSkipNoneBase",
13
+ "required": ["operation", "conditions"],
14
+ "properties": {
15
+ "operation": {
16
+ "type": "string",
17
+ "options": [
18
+ {"key": "and", "value": "and"},
19
+ {"key": "or", "value": "or"},
20
+ {"key": "not", "value": "not"},
21
+ ],
22
+ "title": "Operation",
23
+ "enum": ["and", "or", "not"],
24
+ },
25
+ "conditions": {
26
+ "type": "array",
27
+ "items": {"type": "ConditionItem", "title": "ConditionItem"},
28
+ "title": "Conditions",
29
+ },
30
+ },
31
+ "meta_class": "TypeMeta",
32
+ "custom_code": "from typing import Any\n\nfrom amsdal.contrib.frontend_configs.models.frontend_activator_config import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_async_validator import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_control_action import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_option import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_slider_option import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_text_mask import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_validator import *\n\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
33
+ "storage_metadata": {"table_name": "Condition", "db_fields": {}, "foreign_keys": {}},
34
+ },
35
+ ),
36
+ migrations.CreateClass(
37
+ module_type=ModuleType.CONTRIB,
38
+ class_name="ConditionItem",
39
+ new_schema={
40
+ "title": "ConditionItem",
41
+ "type": "FrontendConfigSkipNoneBase",
42
+ "required": ["path", "condition"],
43
+ "properties": {
44
+ "path": {"type": "string", "title": "Path"},
45
+ "condition": {"type": "string", "title": "Condition"},
46
+ "value": {"type": "anything", "title": "Value"},
47
+ },
48
+ "meta_class": "TypeMeta",
49
+ "custom_code": "from typing import Any\n\nfrom amsdal.contrib.frontend_configs.models.frontend_activator_config import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_async_validator import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_control_action import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_option import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_slider_option import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_text_mask import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_validator import *\n\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
50
+ "storage_metadata": {"table_name": "ConditionItem", "db_fields": {}, "foreign_keys": {}},
51
+ },
52
+ ),
53
+ migrations.UpdateClass(
54
+ module_type=ModuleType.CONTRIB,
55
+ class_name="FrontendControlConfig",
56
+ old_schema={
57
+ "title": "FrontendControlConfig",
58
+ "type": "FrontendConfigSkipNoneBase",
59
+ "required": ["type", "name"],
60
+ "properties": {
61
+ "type": {"type": "string", "title": "Type"},
62
+ "name": {"type": "string", "title": "Name"},
63
+ "label": {"type": "string", "title": "Label"},
64
+ "required": {"type": "boolean", "title": "Required"},
65
+ "hideLabel": {"type": "boolean", "title": "Hide Label"},
66
+ "actions": {
67
+ "type": "array",
68
+ "items": {"type": "FrontendConfigControlAction", "title": "FrontendConfigControlAction"},
69
+ "title": "Actions",
70
+ },
71
+ "validators": {
72
+ "type": "array",
73
+ "items": {"type": "FrontendConfigValidator", "title": "FrontendConfigValidator"},
74
+ "title": "Validators",
75
+ },
76
+ "asyncValidators": {
77
+ "type": "array",
78
+ "items": {"type": "FrontendConfigAsyncValidator", "title": "FrontendConfigAsyncValidator"},
79
+ "title": "Async Validators",
80
+ },
81
+ "activators": {
82
+ "type": "array",
83
+ "items": {"type": "FrontendActivatorConfig", "title": "FrontendActivatorConfig"},
84
+ "title": "Activators",
85
+ },
86
+ "additionalText": {"type": "string", "title": "Additional Text"},
87
+ "value": {"type": "anything", "title": "Value"},
88
+ "placeholder": {"type": "string", "title": "Placeholder"},
89
+ "options": {
90
+ "type": "array",
91
+ "items": {"type": "FrontendConfigOption", "title": "FrontendConfigOption"},
92
+ "title": "Options",
93
+ },
94
+ "mask": {"type": "FrontendConfigTextMask", "title": "Mask"},
95
+ "controls": {
96
+ "type": "array",
97
+ "items": {"type": "FrontendControlConfig", "title": "FrontendControlConfig"},
98
+ "title": "Controls",
99
+ },
100
+ "showSearch": {"type": "boolean", "title": "Show Search"},
101
+ "sliderOptions": {"type": "FrontendConfigSliderOption", "title": "Slider Option"},
102
+ "customLabel": {"type": "array", "items": {"type": "string"}, "title": "Custom Label"},
103
+ "control": {"type": "FrontendControlConfig", "title": "Control"},
104
+ "entityType": {"type": "string", "title": "Entity Type"},
105
+ },
106
+ "meta_class": "TypeMeta",
107
+ "custom_code": "from typing import Any\n\nfrom amsdal_models.builder.validators.options_validators import validate_options\nfrom pydantic.functional_validators import field_validator\n\nfrom amsdal.contrib.frontend_configs.models.frontend_activator_config import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_async_validator import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_control_action import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_option import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_slider_option import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_text_mask import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_validator import *\n\n\n@field_validator('type')\n@classmethod\ndef validate_value_in_options_type(cls: type, value: Any) -> Any:\n return validate_options(value, options=['Bytes', 'array', 'checkbox', 'date', 'dateTriplet', 'datetime', 'dict', 'dropzone', 'email', 'file', 'group', 'group_switch', 'group_toggle', 'info-group', 'infoscreen', 'multiselect', 'number', 'number-operations', 'number-slider', 'number_equals', 'number_initial', 'number_minus', 'number_plus', 'object', 'object_group', 'object_latest', 'password', 'phone', 'radio', 'select', 'text', 'textarea', 'time', 'toggle'])\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
108
+ "storage_metadata": {"table_name": "FrontendControlConfig", "db_fields": {}, "foreign_keys": {}},
109
+ },
110
+ new_schema={
111
+ "title": "FrontendControlConfig",
112
+ "type": "FrontendConfigSkipNoneBase",
113
+ "required": ["type", "name"],
114
+ "properties": {
115
+ "type": {
116
+ "type": "string",
117
+ "options": [
118
+ {"key": "Bytes", "value": "Bytes"},
119
+ {"key": "array", "value": "array"},
120
+ {"key": "checkbox", "value": "checkbox"},
121
+ {"key": "date", "value": "date"},
122
+ {"key": "dateTriplet", "value": "dateTriplet"},
123
+ {"key": "datetime", "value": "datetime"},
124
+ {"key": "dict", "value": "dict"},
125
+ {"key": "dropzone", "value": "dropzone"},
126
+ {"key": "email", "value": "email"},
127
+ {"key": "file", "value": "file"},
128
+ {"key": "group", "value": "group"},
129
+ {"key": "group_switch", "value": "group_switch"},
130
+ {"key": "group_toggle", "value": "group_toggle"},
131
+ {"key": "info-group", "value": "info-group"},
132
+ {"key": "infoscreen", "value": "infoscreen"},
133
+ {"key": "multiselect", "value": "multiselect"},
134
+ {"key": "number", "value": "number"},
135
+ {"key": "number-operations", "value": "number-operations"},
136
+ {"key": "number-slider", "value": "number-slider"},
137
+ {"key": "number_equals", "value": "number_equals"},
138
+ {"key": "number_initial", "value": "number_initial"},
139
+ {"key": "number_minus", "value": "number_minus"},
140
+ {"key": "number_plus", "value": "number_plus"},
141
+ {"key": "object", "value": "object"},
142
+ {"key": "object_group", "value": "object_group"},
143
+ {"key": "object_latest", "value": "object_latest"},
144
+ {"key": "password", "value": "password"},
145
+ {"key": "phone", "value": "phone"},
146
+ {"key": "radio", "value": "radio"},
147
+ {"key": "select", "value": "select"},
148
+ {"key": "text", "value": "text"},
149
+ {"key": "textarea", "value": "textarea"},
150
+ {"key": "time", "value": "time"},
151
+ {"key": "toggle", "value": "toggle"},
152
+ {"key": "sections", "value": "sections"},
153
+ {"key": "section", "value": "section"},
154
+ ],
155
+ "title": "Type",
156
+ "enum": [
157
+ "Bytes",
158
+ "array",
159
+ "checkbox",
160
+ "date",
161
+ "dateTriplet",
162
+ "datetime",
163
+ "dict",
164
+ "dropzone",
165
+ "email",
166
+ "file",
167
+ "group",
168
+ "group_switch",
169
+ "group_toggle",
170
+ "info-group",
171
+ "infoscreen",
172
+ "multiselect",
173
+ "number",
174
+ "number-operations",
175
+ "number-slider",
176
+ "number_equals",
177
+ "number_initial",
178
+ "number_minus",
179
+ "number_plus",
180
+ "object",
181
+ "object_group",
182
+ "object_latest",
183
+ "password",
184
+ "phone",
185
+ "radio",
186
+ "select",
187
+ "text",
188
+ "textarea",
189
+ "time",
190
+ "toggle",
191
+ "sections",
192
+ "section",
193
+ ],
194
+ },
195
+ "name": {"type": "string", "title": "Name"},
196
+ "label": {"type": "string", "title": "Label"},
197
+ "required": {"type": "boolean", "title": "Required"},
198
+ "hideLabel": {"type": "boolean", "title": "Hide Label"},
199
+ "actions": {
200
+ "type": "array",
201
+ "items": {"type": "FrontendConfigControlAction", "title": "FrontendConfigControlAction"},
202
+ "title": "Actions",
203
+ },
204
+ "validators": {
205
+ "type": "array",
206
+ "items": {"type": "FrontendConfigValidator", "title": "FrontendConfigValidator"},
207
+ "title": "Validators",
208
+ },
209
+ "asyncValidators": {
210
+ "type": "array",
211
+ "items": {"type": "FrontendConfigAsyncValidator", "title": "FrontendConfigAsyncValidator"},
212
+ "title": "Async Validators",
213
+ },
214
+ "activators": {
215
+ "type": "array",
216
+ "items": {"type": "FrontendActivatorConfig", "title": "FrontendActivatorConfig"},
217
+ "title": "Activators",
218
+ },
219
+ "additionalText": {"type": "string", "title": "Additional Text"},
220
+ "value": {"type": "anything", "title": "Value"},
221
+ "placeholder": {"type": "string", "title": "Placeholder"},
222
+ "options": {
223
+ "type": "array",
224
+ "items": {"type": "FrontendConfigOption", "title": "FrontendConfigOption"},
225
+ "title": "Options",
226
+ },
227
+ "mask": {"type": "FrontendConfigTextMask", "title": "Mask"},
228
+ "controls": {
229
+ "type": "array",
230
+ "items": {"type": "FrontendControlConfig", "title": "FrontendControlConfig"},
231
+ "title": "Controls",
232
+ },
233
+ "showSearch": {"type": "boolean", "title": "Show Search"},
234
+ "sliderOptions": {"type": "FrontendConfigSliderOption", "title": "Slider Option"},
235
+ "customLabel": {"type": "array", "items": {"type": "string"}, "title": "Custom Label"},
236
+ "control": {"type": "FrontendControlConfig", "title": "Control"},
237
+ "entityType": {"type": "string", "title": "Entity Type"},
238
+ "condition": {"type": "Condition", "title": "Condition"},
239
+ },
240
+ "meta_class": "TypeMeta",
241
+ "custom_code": "from typing import Any\n\nfrom amsdal.contrib.frontend_configs.models.frontend_activator_config import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_async_validator import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_control_action import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_option import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_slider_option import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_text_mask import *\nfrom amsdal.contrib.frontend_configs.models.frontend_config_validator import *\n\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]:\n kwargs['exclude_none'] = True\n return super().model_dump(**kwargs)\n\ndef model_dump_json(self, **kwargs: Any) -> str:\n kwargs['exclude_none'] = True\n return super().model_dump_json(**kwargs)",
242
+ "storage_metadata": {"table_name": "FrontendControlConfig", "db_fields": {}, "foreign_keys": {}},
243
+ },
244
+ ),
245
+ ]