amsdal 0.2.5__cp312-cp312-manylinux_2_17_x86_64.manylinux2014_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.
Potentially problematic release.
This version of amsdal might be problematic. Click here for more details.
- amsdal/Third-Party Materials - AMSDAL Dependencies - License Notices.md +1308 -0
- amsdal/__about__.py +4 -0
- amsdal/__about__.pyi +1 -0
- amsdal/__init__.py +3 -0
- amsdal/__init__.pyi +0 -0
- amsdal/__migrations__/0000_initial.py +203 -0
- amsdal/__migrations__/0001_datetime_type.py +18 -0
- amsdal/__migrations__/0002_fixture_order.py +40 -0
- amsdal/cloud/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/__init__.pyi +0 -0
- amsdal/cloud/client.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/client.pyi +57 -0
- amsdal/cloud/constants.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/constants.pyi +13 -0
- amsdal/cloud/enums.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/enums.pyi +68 -0
- amsdal/cloud/models/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/models/__init__.pyi +0 -0
- amsdal/cloud/models/base.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/models/base.pyi +247 -0
- amsdal/cloud/services/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/__init__.pyi +0 -0
- amsdal/cloud/services/actions/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/__init__.pyi +0 -0
- amsdal/cloud/services/actions/add_allowlist_ip.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/add_allowlist_ip.pyi +19 -0
- amsdal/cloud/services/actions/add_basic_auth.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/add_basic_auth.pyi +21 -0
- amsdal/cloud/services/actions/add_dependency.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/add_dependency.pyi +19 -0
- amsdal/cloud/services/actions/add_secret.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/add_secret.pyi +20 -0
- amsdal/cloud/services/actions/base.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/base.pyi +122 -0
- amsdal/cloud/services/actions/create_deploy.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/create_deploy.pyi +41 -0
- amsdal/cloud/services/actions/create_env.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/create_env.pyi +19 -0
- amsdal/cloud/services/actions/create_session.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/create_session.pyi +17 -0
- amsdal/cloud/services/actions/delete_allowlist_ip.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/delete_allowlist_ip.pyi +19 -0
- amsdal/cloud/services/actions/delete_basic_auth.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/delete_basic_auth.pyi +20 -0
- amsdal/cloud/services/actions/delete_dependency.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/delete_dependency.pyi +21 -0
- amsdal/cloud/services/actions/delete_env.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/delete_env.pyi +21 -0
- amsdal/cloud/services/actions/delete_secret.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/delete_secret.pyi +21 -0
- amsdal/cloud/services/actions/destroy_deploy.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/destroy_deploy.pyi +18 -0
- amsdal/cloud/services/actions/expose_db.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/expose_db.pyi +22 -0
- amsdal/cloud/services/actions/get_basic_auth_credentials.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/get_basic_auth_credentials.pyi +21 -0
- amsdal/cloud/services/actions/get_monitoring_info.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/get_monitoring_info.pyi +21 -0
- amsdal/cloud/services/actions/list_dependencies.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/list_dependencies.pyi +21 -0
- amsdal/cloud/services/actions/list_deploys.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/list_deploys.pyi +19 -0
- amsdal/cloud/services/actions/list_envs.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/list_envs.pyi +20 -0
- amsdal/cloud/services/actions/list_secrets.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/list_secrets.pyi +22 -0
- amsdal/cloud/services/actions/manager.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/manager.pyi +278 -0
- amsdal/cloud/services/actions/signup_action.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/signup_action.pyi +20 -0
- amsdal/cloud/services/actions/update_deploy.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/update_deploy.pyi +19 -0
- amsdal/cloud/services/auth/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/__init__.pyi +0 -0
- amsdal/cloud/services/auth/base.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/base.pyi +6 -0
- amsdal/cloud/services/auth/credentials.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/credentials.pyi +31 -0
- amsdal/cloud/services/auth/manager.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/manager.pyi +26 -0
- amsdal/cloud/services/auth/signup_service.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/signup_service.pyi +32 -0
- amsdal/cloud/services/auth/token.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/token.pyi +28 -0
- amsdal/configs/__init__.py +0 -0
- amsdal/configs/__init__.pyi +0 -0
- amsdal/configs/constants.py +33 -0
- amsdal/configs/constants.pyi +22 -0
- amsdal/configs/main.py +254 -0
- amsdal/configs/main.pyi +177 -0
- amsdal/context/__init__.py +0 -0
- amsdal/context/__init__.pyi +0 -0
- amsdal/context/manager.py +69 -0
- amsdal/context/manager.pyi +50 -0
- amsdal/contrib/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/contrib/__init__.pyi +0 -0
- amsdal/contrib/app_config.py +7 -0
- amsdal/contrib/app_config.pyi +6 -0
- amsdal/contrib/auth/__init__.py +0 -0
- amsdal/contrib/auth/__init__.pyi +0 -0
- amsdal/contrib/auth/app.py +27 -0
- amsdal/contrib/auth/app.pyi +15 -0
- amsdal/contrib/auth/decorators/__init__.py +20 -0
- amsdal/contrib/auth/decorators/__init__.pyi +6 -0
- amsdal/contrib/auth/errors.py +7 -0
- amsdal/contrib/auth/errors.pyi +4 -0
- amsdal/contrib/auth/lifecycle/__init__.py +0 -0
- amsdal/contrib/auth/lifecycle/__init__.pyi +0 -0
- amsdal/contrib/auth/lifecycle/consumer.py +222 -0
- amsdal/contrib/auth/lifecycle/consumer.pyi +69 -0
- amsdal/contrib/auth/migrations/0000_initial.py +49 -0
- amsdal/contrib/auth/models/login_session/hooks/pre_init.py +64 -0
- amsdal/contrib/auth/models/login_session/model.json +23 -0
- amsdal/contrib/auth/models/login_session/modifiers/display_name.py +11 -0
- amsdal/contrib/auth/models/permission/fixtures/basic_permissions.json +62 -0
- amsdal/contrib/auth/models/permission/model.json +18 -0
- amsdal/contrib/auth/models/permission/modifiers/display_name.py +11 -0
- amsdal/contrib/auth/models/user/hooks/post_init.py +58 -0
- amsdal/contrib/auth/models/user/hooks/pre_create.py +8 -0
- amsdal/contrib/auth/models/user/model.json +25 -0
- amsdal/contrib/auth/models/user/modifiers/display_name.py +19 -0
- amsdal/contrib/auth/settings.py +36 -0
- amsdal/contrib/auth/settings.pyi +26 -0
- amsdal/contrib/frontend_configs/__init__.py +0 -0
- amsdal/contrib/frontend_configs/__init__.pyi +0 -0
- amsdal/contrib/frontend_configs/app.py +24 -0
- amsdal/contrib/frontend_configs/app.pyi +19 -0
- amsdal/contrib/frontend_configs/constants.py +1 -0
- amsdal/contrib/frontend_configs/constants.pyi +1 -0
- amsdal/contrib/frontend_configs/conversion/__init__.py +5 -0
- amsdal/contrib/frontend_configs/conversion/__init__.pyi +3 -0
- amsdal/contrib/frontend_configs/conversion/convert.py +250 -0
- amsdal/contrib/frontend_configs/conversion/convert.pyi +23 -0
- amsdal/contrib/frontend_configs/lifecycle/__init__.py +0 -0
- amsdal/contrib/frontend_configs/lifecycle/__init__.pyi +0 -0
- amsdal/contrib/frontend_configs/lifecycle/consumer.py +242 -0
- amsdal/contrib/frontend_configs/lifecycle/consumer.pyi +86 -0
- amsdal/contrib/frontend_configs/migrations/0000_initial.py +255 -0
- amsdal/contrib/frontend_configs/models/frontend_activator_config/model.json +11 -0
- amsdal/contrib/frontend_configs/models/frontend_config_async_validator/model.json +11 -0
- amsdal/contrib/frontend_configs/models/frontend_config_group_validator/model.json +52 -0
- amsdal/contrib/frontend_configs/models/frontend_config_option/model.json +15 -0
- amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/model.json +6 -0
- amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/properties/model_dump.py +13 -0
- amsdal/contrib/frontend_configs/models/frontend_config_slider_option/model.json +19 -0
- amsdal/contrib/frontend_configs/models/frontend_config_text_mask/model.json +26 -0
- amsdal/contrib/frontend_configs/models/frontend_config_validator/model.json +41 -0
- amsdal/contrib/frontend_configs/models/frontend_control_config/model.json +250 -0
- amsdal/contrib/frontend_configs/models/frontend_model_config/fixtures/permissions.json +24 -0
- amsdal/contrib/frontend_configs/models/frontend_model_config/model.json +17 -0
- amsdal/contrib/frontend_configs/models/frontent_config_control_action/model.json +54 -0
- amsdal/contrib/frontend_configs/models/frontent_config_control_action/properties/action_validate.py +33 -0
- amsdal/contrib/frontend_configs/utils.py +29 -0
- amsdal/contrib/frontend_configs/utils.pyi +17 -0
- amsdal/errors.py +31 -0
- amsdal/errors.pyi +12 -0
- amsdal/fixtures/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/fixtures/__init__.pyi +0 -0
- amsdal/fixtures/manager.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/fixtures/manager.pyi +118 -0
- amsdal/manager.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/manager.pyi +183 -0
- amsdal/migration/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/__init__.pyi +0 -0
- amsdal/migration/base_migration_schemas.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/base_migration_schemas.pyi +120 -0
- amsdal/migration/data_classes.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/data_classes.pyi +178 -0
- amsdal/migration/executors/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/executors/__init__.pyi +0 -0
- amsdal/migration/executors/base.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/executors/base.pyi +106 -0
- amsdal/migration/executors/default_executor.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/executors/default_executor.pyi +96 -0
- amsdal/migration/executors/state_executor.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/executors/state_executor.pyi +78 -0
- amsdal/migration/file_migration_executor.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/file_migration_executor.pyi +68 -0
- amsdal/migration/file_migration_generator.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/file_migration_generator.pyi +139 -0
- amsdal/migration/file_migration_store.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/file_migration_store.pyi +61 -0
- amsdal/migration/file_migration_writer.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/file_migration_writer.pyi +73 -0
- amsdal/migration/migrations.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/migrations.pyi +166 -0
- amsdal/migration/migrations_loader.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/migrations_loader.pyi +32 -0
- amsdal/migration/schemas_loaders.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/schemas_loaders.pyi +37 -0
- amsdal/migration/templates/data_migration.tmpl +18 -0
- amsdal/migration/templates/dict_validator.tmpl +4 -0
- amsdal/migration/templates/migration.tmpl +6 -0
- amsdal/migration/templates/model_class.tmpl +8 -0
- amsdal/migration/templates/model_class_layout.tmpl +24 -0
- amsdal/migration/templates/options_validator.tmpl +4 -0
- amsdal/migration/utils.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/migration/utils.pyi +58 -0
- amsdal/mixins/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/mixins/__init__.pyi +0 -0
- amsdal/mixins/build_mixin.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/mixins/build_mixin.pyi +78 -0
- amsdal/mixins/class_versions_mixin.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/mixins/class_versions_mixin.pyi +6 -0
- amsdal/py.typed +0 -0
- amsdal/schemas/__init__.py +0 -0
- amsdal/schemas/__init__.pyi +0 -0
- amsdal/schemas/core/class_object/model.json +31 -0
- amsdal/schemas/core/class_object/properties/display_name.py +9 -0
- amsdal/schemas/core/class_object_meta/model.json +55 -0
- amsdal/schemas/core/class_property/model.json +22 -0
- amsdal/schemas/core/class_property_meta/model.json +23 -0
- amsdal/schemas/core/file/hooks/pre_create.py +11 -0
- amsdal/schemas/core/file/hooks/pre_update.py +11 -0
- amsdal/schemas/core/file/model.json +23 -0
- amsdal/schemas/core/file/properties/from_file.py +34 -0
- amsdal/schemas/core/file/properties/mimetype.py +13 -0
- amsdal/schemas/core/file/properties/str.py +6 -0
- amsdal/schemas/core/file/properties/to_file.py +24 -0
- amsdal/schemas/core/file/properties/validate_data.py +32 -0
- amsdal/schemas/core/fixture/model.json +35 -0
- amsdal/schemas/core/option/model.json +19 -0
- amsdal/schemas/core/validator/model.json +19 -0
- amsdal/schemas/manager.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/schemas/manager.py +116 -0
- amsdal/schemas/manager.pyi +65 -0
- amsdal/schemas/types/anything/model.json +7 -0
- amsdal/schemas/types/array/model.json +7 -0
- amsdal/schemas/types/binary/model.json +7 -0
- amsdal/schemas/types/boolean/model.json +17 -0
- amsdal/schemas/types/date/model.json +7 -0
- amsdal/schemas/types/datetime/model.json +7 -0
- amsdal/schemas/types/dictionary/model.json +8 -0
- amsdal/schemas/types/number/model.json +8 -0
- amsdal/schemas/types/object/model.json +53 -0
- amsdal/schemas/types/string/model.json +8 -0
- amsdal/services/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/services/__init__.pyi +0 -0
- amsdal/services/transaction_execution.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/services/transaction_execution.pyi +76 -0
- amsdal/utils/__init__.py +0 -0
- amsdal/utils/__init__.pyi +0 -0
- amsdal/utils/contrib_paths.py +23 -0
- amsdal/utils/contrib_paths.pyi +14 -0
- amsdal/utils/tests/__init__.py +0 -0
- amsdal/utils/tests/enums.py +18 -0
- amsdal/utils/tests/factories.py +49 -0
- amsdal/utils/tests/helpers.py +309 -0
- amsdal-0.2.5.dist-info/LICENSE.txt +107 -0
- amsdal-0.2.5.dist-info/METADATA +365 -0
- amsdal-0.2.5.dist-info/RECORD +253 -0
- amsdal-0.2.5.dist-info/WHEEL +6 -0
- amsdal-0.2.5.dist-info/top_level.txt +1 -0
amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/properties/model_dump.py
ADDED
|
@@ -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
|
+
}
|
amsdal/contrib/frontend_configs/models/frontent_config_control_action/properties/action_validate.py
ADDED
|
@@ -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): ...
|
|
Binary file
|
|
File without changes
|
|
Binary file
|