amsdal 0.2.5__cp312-cp312-win_amd64.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.

Potentially problematic release.


This version of amsdal might be problematic. Click here for more details.

Files changed (254) hide show
  1. amsdal/Third-Party Materials - AMSDAL Dependencies - License Notices.md +1308 -0
  2. amsdal/__about__.py +4 -0
  3. amsdal/__about__.pyi +1 -0
  4. amsdal/__init__.py +3 -0
  5. amsdal/__init__.pyi +0 -0
  6. amsdal/__migrations__/0000_initial.py +203 -0
  7. amsdal/__migrations__/0001_datetime_type.py +18 -0
  8. amsdal/__migrations__/0002_fixture_order.py +40 -0
  9. amsdal/cloud/__init__.cp312-win_amd64.pyd +0 -0
  10. amsdal/cloud/__init__.pyi +0 -0
  11. amsdal/cloud/client.cp312-win_amd64.pyd +0 -0
  12. amsdal/cloud/client.pyi +57 -0
  13. amsdal/cloud/constants.cp312-win_amd64.pyd +0 -0
  14. amsdal/cloud/constants.pyi +13 -0
  15. amsdal/cloud/enums.cp312-win_amd64.pyd +0 -0
  16. amsdal/cloud/enums.pyi +68 -0
  17. amsdal/cloud/models/__init__.cp312-win_amd64.pyd +0 -0
  18. amsdal/cloud/models/__init__.pyi +0 -0
  19. amsdal/cloud/models/base.cp312-win_amd64.pyd +0 -0
  20. amsdal/cloud/models/base.pyi +247 -0
  21. amsdal/cloud/services/__init__.cp312-win_amd64.pyd +0 -0
  22. amsdal/cloud/services/__init__.pyi +0 -0
  23. amsdal/cloud/services/actions/__init__.cp312-win_amd64.pyd +0 -0
  24. amsdal/cloud/services/actions/__init__.pyi +0 -0
  25. amsdal/cloud/services/actions/add_allowlist_ip.cp312-win_amd64.pyd +0 -0
  26. amsdal/cloud/services/actions/add_allowlist_ip.pyi +19 -0
  27. amsdal/cloud/services/actions/add_basic_auth.cp312-win_amd64.pyd +0 -0
  28. amsdal/cloud/services/actions/add_basic_auth.pyi +21 -0
  29. amsdal/cloud/services/actions/add_dependency.cp312-win_amd64.pyd +0 -0
  30. amsdal/cloud/services/actions/add_dependency.pyi +19 -0
  31. amsdal/cloud/services/actions/add_secret.cp312-win_amd64.pyd +0 -0
  32. amsdal/cloud/services/actions/add_secret.pyi +20 -0
  33. amsdal/cloud/services/actions/base.cp312-win_amd64.pyd +0 -0
  34. amsdal/cloud/services/actions/base.pyi +122 -0
  35. amsdal/cloud/services/actions/create_deploy.cp312-win_amd64.pyd +0 -0
  36. amsdal/cloud/services/actions/create_deploy.pyi +41 -0
  37. amsdal/cloud/services/actions/create_env.cp312-win_amd64.pyd +0 -0
  38. amsdal/cloud/services/actions/create_env.pyi +19 -0
  39. amsdal/cloud/services/actions/create_session.cp312-win_amd64.pyd +0 -0
  40. amsdal/cloud/services/actions/create_session.pyi +17 -0
  41. amsdal/cloud/services/actions/delete_allowlist_ip.cp312-win_amd64.pyd +0 -0
  42. amsdal/cloud/services/actions/delete_allowlist_ip.pyi +19 -0
  43. amsdal/cloud/services/actions/delete_basic_auth.cp312-win_amd64.pyd +0 -0
  44. amsdal/cloud/services/actions/delete_basic_auth.pyi +20 -0
  45. amsdal/cloud/services/actions/delete_dependency.cp312-win_amd64.pyd +0 -0
  46. amsdal/cloud/services/actions/delete_dependency.pyi +21 -0
  47. amsdal/cloud/services/actions/delete_env.cp312-win_amd64.pyd +0 -0
  48. amsdal/cloud/services/actions/delete_env.pyi +21 -0
  49. amsdal/cloud/services/actions/delete_secret.cp312-win_amd64.pyd +0 -0
  50. amsdal/cloud/services/actions/delete_secret.pyi +21 -0
  51. amsdal/cloud/services/actions/destroy_deploy.cp312-win_amd64.pyd +0 -0
  52. amsdal/cloud/services/actions/destroy_deploy.pyi +18 -0
  53. amsdal/cloud/services/actions/expose_db.cp312-win_amd64.pyd +0 -0
  54. amsdal/cloud/services/actions/expose_db.pyi +22 -0
  55. amsdal/cloud/services/actions/get_basic_auth_credentials.cp312-win_amd64.pyd +0 -0
  56. amsdal/cloud/services/actions/get_basic_auth_credentials.pyi +21 -0
  57. amsdal/cloud/services/actions/get_monitoring_info.cp312-win_amd64.pyd +0 -0
  58. amsdal/cloud/services/actions/get_monitoring_info.pyi +21 -0
  59. amsdal/cloud/services/actions/list_dependencies.cp312-win_amd64.pyd +0 -0
  60. amsdal/cloud/services/actions/list_dependencies.pyi +21 -0
  61. amsdal/cloud/services/actions/list_deploys.cp312-win_amd64.pyd +0 -0
  62. amsdal/cloud/services/actions/list_deploys.pyi +19 -0
  63. amsdal/cloud/services/actions/list_envs.cp312-win_amd64.pyd +0 -0
  64. amsdal/cloud/services/actions/list_envs.pyi +20 -0
  65. amsdal/cloud/services/actions/list_secrets.cp312-win_amd64.pyd +0 -0
  66. amsdal/cloud/services/actions/list_secrets.pyi +22 -0
  67. amsdal/cloud/services/actions/manager.cp312-win_amd64.pyd +0 -0
  68. amsdal/cloud/services/actions/manager.pyi +278 -0
  69. amsdal/cloud/services/actions/signup_action.cp312-win_amd64.pyd +0 -0
  70. amsdal/cloud/services/actions/signup_action.pyi +20 -0
  71. amsdal/cloud/services/actions/update_deploy.cp312-win_amd64.pyd +0 -0
  72. amsdal/cloud/services/actions/update_deploy.pyi +19 -0
  73. amsdal/cloud/services/auth/__init__.cp312-win_amd64.pyd +0 -0
  74. amsdal/cloud/services/auth/__init__.pyi +0 -0
  75. amsdal/cloud/services/auth/base.cp312-win_amd64.pyd +0 -0
  76. amsdal/cloud/services/auth/base.pyi +6 -0
  77. amsdal/cloud/services/auth/credentials.cp312-win_amd64.pyd +0 -0
  78. amsdal/cloud/services/auth/credentials.pyi +31 -0
  79. amsdal/cloud/services/auth/manager.cp312-win_amd64.pyd +0 -0
  80. amsdal/cloud/services/auth/manager.pyi +26 -0
  81. amsdal/cloud/services/auth/signup_service.cp312-win_amd64.pyd +0 -0
  82. amsdal/cloud/services/auth/signup_service.pyi +32 -0
  83. amsdal/cloud/services/auth/token.cp312-win_amd64.pyd +0 -0
  84. amsdal/cloud/services/auth/token.pyi +28 -0
  85. amsdal/configs/__init__.py +0 -0
  86. amsdal/configs/__init__.pyi +0 -0
  87. amsdal/configs/constants.py +33 -0
  88. amsdal/configs/constants.pyi +22 -0
  89. amsdal/configs/main.py +254 -0
  90. amsdal/configs/main.pyi +177 -0
  91. amsdal/context/__init__.py +0 -0
  92. amsdal/context/__init__.pyi +0 -0
  93. amsdal/context/manager.py +69 -0
  94. amsdal/context/manager.pyi +50 -0
  95. amsdal/contrib/__init__.cp312-win_amd64.pyd +0 -0
  96. amsdal/contrib/__init__.pyi +0 -0
  97. amsdal/contrib/app_config.py +7 -0
  98. amsdal/contrib/app_config.pyi +6 -0
  99. amsdal/contrib/auth/__init__.py +0 -0
  100. amsdal/contrib/auth/__init__.pyi +0 -0
  101. amsdal/contrib/auth/app.py +27 -0
  102. amsdal/contrib/auth/app.pyi +15 -0
  103. amsdal/contrib/auth/decorators/__init__.py +20 -0
  104. amsdal/contrib/auth/decorators/__init__.pyi +6 -0
  105. amsdal/contrib/auth/errors.py +7 -0
  106. amsdal/contrib/auth/errors.pyi +4 -0
  107. amsdal/contrib/auth/lifecycle/__init__.py +0 -0
  108. amsdal/contrib/auth/lifecycle/__init__.pyi +0 -0
  109. amsdal/contrib/auth/lifecycle/consumer.py +222 -0
  110. amsdal/contrib/auth/lifecycle/consumer.pyi +69 -0
  111. amsdal/contrib/auth/migrations/0000_initial.py +49 -0
  112. amsdal/contrib/auth/models/login_session/hooks/pre_init.py +64 -0
  113. amsdal/contrib/auth/models/login_session/model.json +23 -0
  114. amsdal/contrib/auth/models/login_session/modifiers/display_name.py +11 -0
  115. amsdal/contrib/auth/models/permission/fixtures/basic_permissions.json +62 -0
  116. amsdal/contrib/auth/models/permission/model.json +18 -0
  117. amsdal/contrib/auth/models/permission/modifiers/display_name.py +11 -0
  118. amsdal/contrib/auth/models/user/hooks/post_init.py +58 -0
  119. amsdal/contrib/auth/models/user/hooks/pre_create.py +8 -0
  120. amsdal/contrib/auth/models/user/model.json +25 -0
  121. amsdal/contrib/auth/models/user/modifiers/display_name.py +19 -0
  122. amsdal/contrib/auth/settings.py +36 -0
  123. amsdal/contrib/auth/settings.pyi +26 -0
  124. amsdal/contrib/frontend_configs/__init__.py +0 -0
  125. amsdal/contrib/frontend_configs/__init__.pyi +0 -0
  126. amsdal/contrib/frontend_configs/app.py +24 -0
  127. amsdal/contrib/frontend_configs/app.pyi +19 -0
  128. amsdal/contrib/frontend_configs/constants.py +1 -0
  129. amsdal/contrib/frontend_configs/constants.pyi +1 -0
  130. amsdal/contrib/frontend_configs/conversion/__init__.py +5 -0
  131. amsdal/contrib/frontend_configs/conversion/__init__.pyi +3 -0
  132. amsdal/contrib/frontend_configs/conversion/convert.py +250 -0
  133. amsdal/contrib/frontend_configs/conversion/convert.pyi +23 -0
  134. amsdal/contrib/frontend_configs/lifecycle/__init__.py +0 -0
  135. amsdal/contrib/frontend_configs/lifecycle/__init__.pyi +0 -0
  136. amsdal/contrib/frontend_configs/lifecycle/consumer.py +242 -0
  137. amsdal/contrib/frontend_configs/lifecycle/consumer.pyi +86 -0
  138. amsdal/contrib/frontend_configs/migrations/0000_initial.py +255 -0
  139. amsdal/contrib/frontend_configs/models/frontend_activator_config/model.json +11 -0
  140. amsdal/contrib/frontend_configs/models/frontend_config_async_validator/model.json +11 -0
  141. amsdal/contrib/frontend_configs/models/frontend_config_group_validator/model.json +52 -0
  142. amsdal/contrib/frontend_configs/models/frontend_config_option/model.json +15 -0
  143. amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/model.json +6 -0
  144. amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/properties/model_dump.py +13 -0
  145. amsdal/contrib/frontend_configs/models/frontend_config_slider_option/model.json +19 -0
  146. amsdal/contrib/frontend_configs/models/frontend_config_text_mask/model.json +26 -0
  147. amsdal/contrib/frontend_configs/models/frontend_config_validator/model.json +41 -0
  148. amsdal/contrib/frontend_configs/models/frontend_control_config/model.json +250 -0
  149. amsdal/contrib/frontend_configs/models/frontend_model_config/fixtures/permissions.json +24 -0
  150. amsdal/contrib/frontend_configs/models/frontend_model_config/model.json +17 -0
  151. amsdal/contrib/frontend_configs/models/frontent_config_control_action/model.json +54 -0
  152. amsdal/contrib/frontend_configs/models/frontent_config_control_action/properties/action_validate.py +33 -0
  153. amsdal/contrib/frontend_configs/utils.py +29 -0
  154. amsdal/contrib/frontend_configs/utils.pyi +17 -0
  155. amsdal/errors.py +31 -0
  156. amsdal/errors.pyi +12 -0
  157. amsdal/fixtures/__init__.cp312-win_amd64.pyd +0 -0
  158. amsdal/fixtures/__init__.pyi +0 -0
  159. amsdal/fixtures/manager.cp312-win_amd64.pyd +0 -0
  160. amsdal/fixtures/manager.pyi +118 -0
  161. amsdal/manager.cp312-win_amd64.pyd +0 -0
  162. amsdal/manager.pyi +183 -0
  163. amsdal/migration/__init__.cp312-win_amd64.pyd +0 -0
  164. amsdal/migration/__init__.pyi +0 -0
  165. amsdal/migration/base_migration_schemas.cp312-win_amd64.pyd +0 -0
  166. amsdal/migration/base_migration_schemas.pyi +120 -0
  167. amsdal/migration/data_classes.cp312-win_amd64.pyd +0 -0
  168. amsdal/migration/data_classes.pyi +178 -0
  169. amsdal/migration/executors/__init__.cp312-win_amd64.pyd +0 -0
  170. amsdal/migration/executors/__init__.pyi +0 -0
  171. amsdal/migration/executors/base.cp312-win_amd64.pyd +0 -0
  172. amsdal/migration/executors/base.pyi +106 -0
  173. amsdal/migration/executors/default_executor.cp312-win_amd64.pyd +0 -0
  174. amsdal/migration/executors/default_executor.pyi +96 -0
  175. amsdal/migration/executors/state_executor.cp312-win_amd64.pyd +0 -0
  176. amsdal/migration/executors/state_executor.pyi +78 -0
  177. amsdal/migration/file_migration_executor.cp312-win_amd64.pyd +0 -0
  178. amsdal/migration/file_migration_executor.pyi +68 -0
  179. amsdal/migration/file_migration_generator.cp312-win_amd64.pyd +0 -0
  180. amsdal/migration/file_migration_generator.pyi +139 -0
  181. amsdal/migration/file_migration_store.cp312-win_amd64.pyd +0 -0
  182. amsdal/migration/file_migration_store.pyi +61 -0
  183. amsdal/migration/file_migration_writer.cp312-win_amd64.pyd +0 -0
  184. amsdal/migration/file_migration_writer.pyi +73 -0
  185. amsdal/migration/migrations.cp312-win_amd64.pyd +0 -0
  186. amsdal/migration/migrations.pyi +166 -0
  187. amsdal/migration/migrations_loader.cp312-win_amd64.pyd +0 -0
  188. amsdal/migration/migrations_loader.pyi +32 -0
  189. amsdal/migration/schemas_loaders.cp312-win_amd64.pyd +0 -0
  190. amsdal/migration/schemas_loaders.pyi +37 -0
  191. amsdal/migration/templates/data_migration.tmpl +18 -0
  192. amsdal/migration/templates/dict_validator.tmpl +4 -0
  193. amsdal/migration/templates/migration.tmpl +6 -0
  194. amsdal/migration/templates/model_class.tmpl +8 -0
  195. amsdal/migration/templates/model_class_layout.tmpl +24 -0
  196. amsdal/migration/templates/options_validator.tmpl +4 -0
  197. amsdal/migration/utils.cp312-win_amd64.pyd +0 -0
  198. amsdal/migration/utils.pyi +58 -0
  199. amsdal/mixins/__init__.cp312-win_amd64.pyd +0 -0
  200. amsdal/mixins/__init__.pyi +0 -0
  201. amsdal/mixins/build_mixin.cp312-win_amd64.pyd +0 -0
  202. amsdal/mixins/build_mixin.pyi +78 -0
  203. amsdal/mixins/class_versions_mixin.cp312-win_amd64.pyd +0 -0
  204. amsdal/mixins/class_versions_mixin.pyi +6 -0
  205. amsdal/py.typed +0 -0
  206. amsdal/schemas/__init__.py +0 -0
  207. amsdal/schemas/__init__.pyi +0 -0
  208. amsdal/schemas/core/class_object/model.json +31 -0
  209. amsdal/schemas/core/class_object/properties/display_name.py +9 -0
  210. amsdal/schemas/core/class_object_meta/model.json +55 -0
  211. amsdal/schemas/core/class_property/model.json +22 -0
  212. amsdal/schemas/core/class_property_meta/model.json +23 -0
  213. amsdal/schemas/core/file/hooks/pre_create.py +11 -0
  214. amsdal/schemas/core/file/hooks/pre_update.py +11 -0
  215. amsdal/schemas/core/file/model.json +23 -0
  216. amsdal/schemas/core/file/properties/from_file.py +34 -0
  217. amsdal/schemas/core/file/properties/mimetype.py +13 -0
  218. amsdal/schemas/core/file/properties/str.py +6 -0
  219. amsdal/schemas/core/file/properties/to_file.py +24 -0
  220. amsdal/schemas/core/file/properties/validate_data.py +32 -0
  221. amsdal/schemas/core/fixture/model.json +35 -0
  222. amsdal/schemas/core/option/model.json +19 -0
  223. amsdal/schemas/core/validator/model.json +19 -0
  224. amsdal/schemas/manager.cp312-win_amd64.pyd +0 -0
  225. amsdal/schemas/manager.py +116 -0
  226. amsdal/schemas/manager.pyi +65 -0
  227. amsdal/schemas/types/anything/model.json +7 -0
  228. amsdal/schemas/types/array/model.json +7 -0
  229. amsdal/schemas/types/binary/model.json +7 -0
  230. amsdal/schemas/types/boolean/model.json +17 -0
  231. amsdal/schemas/types/date/model.json +7 -0
  232. amsdal/schemas/types/datetime/model.json +7 -0
  233. amsdal/schemas/types/dictionary/model.json +8 -0
  234. amsdal/schemas/types/number/model.json +8 -0
  235. amsdal/schemas/types/object/model.json +53 -0
  236. amsdal/schemas/types/string/model.json +8 -0
  237. amsdal/services/__init__.cp312-win_amd64.pyd +0 -0
  238. amsdal/services/__init__.pyi +0 -0
  239. amsdal/services/transaction_execution.cp312-win_amd64.pyd +0 -0
  240. amsdal/services/transaction_execution.pyi +76 -0
  241. amsdal/utils/__init__.py +0 -0
  242. amsdal/utils/__init__.pyi +0 -0
  243. amsdal/utils/contrib_paths.py +23 -0
  244. amsdal/utils/contrib_paths.pyi +14 -0
  245. amsdal/utils/tests/__init__.py +0 -0
  246. amsdal/utils/tests/enums.py +18 -0
  247. amsdal/utils/tests/factories.py +49 -0
  248. amsdal/utils/tests/helpers.py +309 -0
  249. amsdal-0.2.5.dist-info/LICENSE.txt +107 -0
  250. amsdal-0.2.5.dist-info/METADATA +366 -0
  251. amsdal-0.2.5.dist-info/RECORD +254 -0
  252. amsdal-0.2.5.dist-info/WHEEL +5 -0
  253. amsdal-0.2.5.dist-info/license_check.py +35 -0
  254. amsdal-0.2.5.dist-info/top_level.txt +1 -0
@@ -0,0 +1,15 @@
1
+ {
2
+ "title": "FrontendConfigOption",
3
+ "type": "FrontendConfigSkipNoneBase",
4
+ "properties": {
5
+ "label": {
6
+ "title": "Label",
7
+ "type": "string"
8
+ },
9
+ "value": {
10
+ "title": "Value",
11
+ "type": "string"
12
+ }
13
+ },
14
+ "meta_class": "TypeMeta"
15
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "title": "FrontendConfigSkipNoneBase",
3
+ "type": "object",
4
+ "properties": {},
5
+ "meta_class": "TypeMeta"
6
+ }
@@ -0,0 +1,13 @@
1
+ from typing import Any
2
+
3
+
4
+ def model_dump(self, **kwargs: Any) -> dict[str, Any]: # type: ignore[no-untyped-def] # noqa: ARG001
5
+ kwargs['exclude_none'] = True
6
+
7
+ return super().model_dump(**kwargs) # type: ignore[misc]
8
+
9
+
10
+ def model_dump_json(self, **kwargs: Any) -> str: # type: ignore[no-untyped-def] # noqa: ARG001
11
+ kwargs['exclude_none'] = True
12
+
13
+ return super().model_dump_json(**kwargs) # type: ignore[misc]
@@ -0,0 +1,19 @@
1
+ {
2
+ "title": "FrontendConfigSliderOption",
3
+ "type": "FrontendConfigSkipNoneBase",
4
+ "properties": {
5
+ "min": {
6
+ "title": "Minimum",
7
+ "type": "number"
8
+ },
9
+ "max": {
10
+ "title": "Maximum",
11
+ "type": "number"
12
+ },
13
+ "range": {
14
+ "title": "Range",
15
+ "type": "boolean"
16
+ }
17
+ },
18
+ "meta_class": "TypeMeta"
19
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "title": "FrontendConfigTextMask",
3
+ "type": "FrontendConfigSkipNoneBase",
4
+ "properties": {
5
+ "mask_string": {
6
+ "title": "Mask String",
7
+ "type": "string"
8
+ },
9
+ "prefix": {
10
+ "title": "Prefix",
11
+ "type": "string"
12
+ },
13
+ "suffix": {
14
+ "title": "Suffix",
15
+ "type": "string"
16
+ },
17
+ "thousands_separator": {
18
+ "title": "Thousands Separator",
19
+ "type": "string"
20
+ }
21
+ },
22
+ "required": [
23
+ "mask_string"
24
+ ],
25
+ "meta_class": "TypeMeta"
26
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "title": "FrontendConfigValidator",
3
+ "type": "FrontendConfigGroupValidator",
4
+ "properties": {
5
+ "function": {
6
+ "title": "Function",
7
+ "type": "string",
8
+ "options": [
9
+ {
10
+ "key": "Minimum",
11
+ "value": "min"
12
+ },
13
+ {
14
+ "key": "Maximum",
15
+ "value": "max"
16
+ },
17
+ {
18
+ "key": "Minimum Length",
19
+ "value": "minLength"
20
+ },
21
+ {
22
+ "key": "Maximum Length",
23
+ "value": "maxLength"
24
+ },
25
+ {
26
+ "key": "Required",
27
+ "value": "required"
28
+ },
29
+ {
30
+ "key": "Pattern",
31
+ "value": "pattern"
32
+ }
33
+ ]
34
+ },
35
+ "value": {
36
+ "title": "Value",
37
+ "type": "string"
38
+ }
39
+ },
40
+ "meta_class": "TypeMeta"
41
+ }
@@ -0,0 +1,250 @@
1
+ {
2
+ "title": "FrontendControlConfig",
3
+ "type": "FrontendConfigSkipNoneBase",
4
+ "properties": {
5
+ "type": {
6
+ "title": "Type",
7
+ "type": "string",
8
+ "options": [
9
+ {
10
+ "key": "Infoscreen",
11
+ "value": "infoscreen"
12
+ },
13
+ {
14
+ "key": "Info Group",
15
+ "value": "info-group"
16
+ },
17
+ {
18
+ "key": "Text",
19
+ "value": "text"
20
+ },
21
+ {
22
+ "key": "Number",
23
+ "value": "number"
24
+ },
25
+ {
26
+ "key": "Select",
27
+ "value": "select"
28
+ },
29
+ {
30
+ "key": "Object Group",
31
+ "value": "object_group"
32
+ },
33
+ {
34
+ "key": "Group",
35
+ "value": "group"
36
+ },
37
+ {
38
+ "key": "Group Toggle",
39
+ "value": "group_toggle"
40
+ },
41
+ {
42
+ "key": "Group Switch",
43
+ "value": "group_switch"
44
+ },
45
+ {
46
+ "key": "Password",
47
+ "value": "password"
48
+ },
49
+ {
50
+ "key": "Email",
51
+ "value": "email"
52
+ },
53
+ {
54
+ "key": "Phone",
55
+ "value": "phone"
56
+ },
57
+ {
58
+ "key": "textarea",
59
+ "value": "textarea"
60
+ },
61
+ {
62
+ "key": "Multiselect",
63
+ "value": "multiselect"
64
+ },
65
+ {
66
+ "key": "number_initial",
67
+ "value": "number_initial"
68
+ },
69
+ {
70
+ "key": "number_plus",
71
+ "value": "number_plus"
72
+ },
73
+ {
74
+ "key": "number_minus",
75
+ "value": "number_minus"
76
+ },
77
+ {
78
+ "key": "number_equals",
79
+ "value": "number_equals"
80
+ },
81
+ {
82
+ "key": "toggle",
83
+ "value": "toggle"
84
+ },
85
+ {
86
+ "key": "radio",
87
+ "value": "radio"
88
+ },
89
+ {
90
+ "key": "checkbox",
91
+ "value": "checkbox"
92
+ },
93
+ {
94
+ "key": "number-slider",
95
+ "value": "number-slider"
96
+ },
97
+ {
98
+ "key": "number-operations",
99
+ "value": "number-operations"
100
+ },
101
+ {
102
+ "key": "date",
103
+ "value": "date"
104
+ },
105
+ {
106
+ "key": "dateTriplet",
107
+ "value": "dateTriplet"
108
+ },
109
+ {
110
+ "key": "array",
111
+ "value": "array"
112
+ },
113
+ {
114
+ "key": "object",
115
+ "value": "object"
116
+ },
117
+ {
118
+ "key": "file",
119
+ "value": "file"
120
+ },
121
+ {
122
+ "key": "dropzone",
123
+ "value": "dropzone"
124
+ },
125
+ {
126
+ "key": "object_latest",
127
+ "value": "object_latest"
128
+ },
129
+ {
130
+ "key": "Dictionary",
131
+ "value": "dict"
132
+ },
133
+ {
134
+ "key": "Time",
135
+ "value": "time"
136
+ },
137
+ {
138
+ "key": "Datetime",
139
+ "value": "datetime"
140
+ },
141
+ {
142
+ "key": "Bytes",
143
+ "value": "Bytes"
144
+ }
145
+ ]
146
+ },
147
+ "name": {
148
+ "title": "Name",
149
+ "type": "string"
150
+ },
151
+ "label": {
152
+ "title": "Label",
153
+ "type": "string"
154
+ },
155
+ "required": {
156
+ "title": "Required",
157
+ "type": "boolean"
158
+ },
159
+ "hideLabel": {
160
+ "title": "Hide Label",
161
+ "type": "boolean"
162
+ },
163
+ "actions": {
164
+ "title": "Actions",
165
+ "type": "array",
166
+ "items": {
167
+ "type": "FrontendConfigControlAction"
168
+ }
169
+ },
170
+ "validators": {
171
+ "title": "Validators",
172
+ "type": "array",
173
+ "items": {
174
+ "type": "FrontendConfigValidator"
175
+ }
176
+ },
177
+ "asyncValidators": {
178
+ "title": "Async Validators",
179
+ "type": "array",
180
+ "items": {
181
+ "type": "FrontendConfigAsyncValidator"
182
+ }
183
+ },
184
+ "activators": {
185
+ "title": "Activators",
186
+ "type": "array",
187
+ "items": {
188
+ "type": "FrontendActivatorConfig"
189
+ }
190
+ },
191
+ "additionalText": {
192
+ "title": "Additional Text",
193
+ "type": "string"
194
+ },
195
+ "value": {
196
+ "title": "Value",
197
+ "type": "anything"
198
+ },
199
+ "placeholder": {
200
+ "title": "Placeholder",
201
+ "type": "string"
202
+ },
203
+ "options": {
204
+ "title": "Options",
205
+ "type": "array",
206
+ "items": {
207
+ "type": "FrontendConfigOption"
208
+ }
209
+ },
210
+ "mask": {
211
+ "title": "Mask",
212
+ "type": "FrontendConfigTextMask"
213
+ },
214
+ "controls": {
215
+ "title": "Controls",
216
+ "type": "array",
217
+ "items": {
218
+ "type": "FrontendControlConfig"
219
+ }
220
+ },
221
+ "showSearch": {
222
+ "title": "Show Search",
223
+ "type": "boolean"
224
+ },
225
+ "sliderOptions": {
226
+ "title": "Slider Option",
227
+ "type": "FrontendConfigSliderOption"
228
+ },
229
+ "customLabel": {
230
+ "title": "Custom Label",
231
+ "type": "array",
232
+ "items": {
233
+ "type": "string"
234
+ }
235
+ },
236
+ "control": {
237
+ "title": "Control",
238
+ "type": "FrontendControlConfig"
239
+ },
240
+ "entityType": {
241
+ "title": "Entity Type",
242
+ "type": "string"
243
+ }
244
+ },
245
+ "required": [
246
+ "type",
247
+ "name"
248
+ ],
249
+ "meta_class": "TypeMeta"
250
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "Permission": [
3
+ {
4
+ "external_id": "frontend_model_config_read",
5
+ "model": "FrontendModelConfig",
6
+ "action": "read"
7
+ },
8
+ {
9
+ "external_id": "frontend_model_config_update",
10
+ "model": "FrontendModelConfig",
11
+ "action": "update"
12
+ },
13
+ {
14
+ "external_id": "frontend_model_config_delete",
15
+ "model": "FrontendModelConfig",
16
+ "action": "delete"
17
+ },
18
+ {
19
+ "external_id": "frontend_model_config_create",
20
+ "model": "FrontendModelConfig",
21
+ "action": "create"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "title": "FrontendModelConfig",
3
+ "type": "object",
4
+ "properties": {
5
+ "class_name": {
6
+ "title": "Class Name",
7
+ "type": "string"
8
+ },
9
+ "control": {
10
+ "title": "Control",
11
+ "type": "FrontendControlConfig"
12
+ }
13
+ },
14
+ "required": [
15
+ "class_name"
16
+ ]
17
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "title": "FrontendConfigControlAction",
3
+ "type": "FrontendConfigSkipNoneBase",
4
+ "properties": {
5
+ "action": {
6
+ "title": "Action",
7
+ "type": "string"
8
+ },
9
+ "text": {
10
+ "title": "Text",
11
+ "type": "string"
12
+ },
13
+ "type": {
14
+ "title": "Type",
15
+ "type": "string",
16
+ "options": [
17
+ {
18
+ "key": "Arrow Next",
19
+ "value": "arrow-next"
20
+ },
21
+ {
22
+ "key": "Arrow Prev",
23
+ "value": "arrow-prev"
24
+ },
25
+ {
26
+ "key": "Action Button",
27
+ "value": "action-button"
28
+ },
29
+ {
30
+ "key": "Text Next",
31
+ "value": "text-next"
32
+ },
33
+ {
34
+ "key": "Text Prev",
35
+ "value": "text-prev"
36
+ }
37
+ ]
38
+ },
39
+ "dataLayerEvent": {
40
+ "title": "Data Layer Event",
41
+ "type": "string"
42
+ },
43
+ "activator": {
44
+ "title": "Activator",
45
+ "type": "string"
46
+ },
47
+ "icon": {
48
+ "title": "Icon",
49
+ "type": "string"
50
+ }
51
+ },
52
+ "required": ["action", "text", "type"],
53
+ "meta_class": "TypeMeta"
54
+ }
@@ -0,0 +1,33 @@
1
+ from pydantic import field_validator
2
+
3
+
4
+ @field_validator('action', mode='after') # type: ignore[misc]
5
+ @classmethod
6
+ def validate_action(cls, v: str) -> str: # type: ignore[no-untyped-def] # noqa: ARG001
7
+ """
8
+ Validates the action string to ensure it is one of the allowed values.
9
+
10
+ This method checks if the action string starts with 'navigate::' or is one of the predefined
11
+ actions. If the action string is invalid, it raises a ValueError.
12
+
13
+ Args:
14
+ cls: The class this method is attached to.
15
+ v (str): The action string to validate.
16
+
17
+ Returns:
18
+ str: The validated action string.
19
+
20
+ Raises:
21
+ ValueError: If the action string is not valid.
22
+ """
23
+ if not v.startswith('navigate::') and v not in [
24
+ 'goPrev',
25
+ 'goNext',
26
+ 'goNextWithSubmit',
27
+ 'submit',
28
+ 'submitWithDataLayer',
29
+ ]:
30
+ msg = 'Action must be one of: goPrev, goNext, goNextWithSubmit, submit, submitWithDataLayer, navigate::{string}'
31
+ raise ValueError(msg)
32
+
33
+ return v
@@ -0,0 +1,29 @@
1
+ from typing import Any
2
+
3
+
4
+ def merge_ui_configs(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]:
5
+ """
6
+ Merges two UI configs together. The override config will take precedence over the base config.
7
+
8
+ This function recursively merges two dictionaries representing UI configurations.
9
+ If a key exists in both dictionaries, the value from the override dictionary will be used.
10
+ If the value is a dictionary or a list, the function will merge them recursively.
11
+
12
+ Args:
13
+ base (dict[str, Any]): The base UI configuration dictionary.
14
+ override (dict[str, Any]): The override UI configuration dictionary.
15
+
16
+ Returns:
17
+ dict[str, Any]: The merged UI configuration dictionary.
18
+ """
19
+ for key, value in override.items():
20
+ if key not in base:
21
+ base[key] = value
22
+ elif isinstance(value, dict):
23
+ base[key] = merge_ui_configs(base[key], value)
24
+ elif isinstance(value, list):
25
+ base[key] = [merge_ui_configs(base[key], item) for item in value]
26
+ else:
27
+ base[key] = value
28
+
29
+ return base
@@ -0,0 +1,17 @@
1
+ from typing import Any
2
+
3
+ def merge_ui_configs(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]:
4
+ """
5
+ Merges two UI configs together. The override config will take precedence over the base config.
6
+
7
+ This function recursively merges two dictionaries representing UI configurations.
8
+ If a key exists in both dictionaries, the value from the override dictionary will be used.
9
+ If the value is a dictionary or a list, the function will merge them recursively.
10
+
11
+ Args:
12
+ base (dict[str, Any]): The base UI configuration dictionary.
13
+ override (dict[str, Any]): The override UI configuration dictionary.
14
+
15
+ Returns:
16
+ dict[str, Any]: The merged UI configuration dictionary.
17
+ """
amsdal/errors.py ADDED
@@ -0,0 +1,31 @@
1
+ from amsdal_utils.errors import AmsdalError
2
+
3
+
4
+ class AmsdalRuntimeError(AmsdalError): ...
5
+
6
+
7
+ class TransactionNotFoundError(AmsdalError): ...
8
+
9
+
10
+ class AmsdalAuthenticationError(AmsdalRuntimeError): ...
11
+
12
+
13
+ class AmsdalDeployError(AmsdalRuntimeError): ...
14
+
15
+
16
+ class AmsdalCloudError(AmsdalRuntimeError): ...
17
+
18
+
19
+ class AmsdalCloudAlreadyDeployedError(AmsdalCloudError): ...
20
+
21
+
22
+ class AmsdalCloudCredentialsError(AmsdalCloudError): ...
23
+
24
+
25
+ class AmsdalMissingCredentialsError(AmsdalAuthenticationError): ...
26
+
27
+
28
+ class AmsdalAuthConnectionError(AmsdalAuthenticationError): ...
29
+
30
+
31
+ class AmsdalSignupError(AmsdalAuthenticationError): ...
amsdal/errors.pyi ADDED
@@ -0,0 +1,12 @@
1
+ from amsdal_utils.errors import AmsdalError
2
+
3
+ class AmsdalRuntimeError(AmsdalError): ...
4
+ class TransactionNotFoundError(AmsdalError): ...
5
+ class AmsdalAuthenticationError(AmsdalRuntimeError): ...
6
+ class AmsdalDeployError(AmsdalRuntimeError): ...
7
+ class AmsdalCloudError(AmsdalRuntimeError): ...
8
+ class AmsdalCloudAlreadyDeployedError(AmsdalCloudError): ...
9
+ class AmsdalCloudCredentialsError(AmsdalCloudError): ...
10
+ class AmsdalMissingCredentialsError(AmsdalAuthenticationError): ...
11
+ class AmsdalAuthConnectionError(AmsdalAuthenticationError): ...
12
+ class AmsdalSignupError(AmsdalAuthenticationError): ...
File without changes