amsdal 0.3.3__cp311-cp311-macosx_10_9_universal2.whl → 0.5.29__cp311-cp311-macosx_10_9_universal2.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.
- amsdal/Third-Party Materials - AMSDAL Dependencies - License Notices.md +56 -2
- amsdal/__about__.py +1 -1
- amsdal/__init__.py +20 -0
- amsdal/__init__.pyi +9 -0
- amsdal/__migrations__/0000_initial.py +23 -190
- amsdal/__migrations__/0001_create_class_file.py +61 -0
- amsdal/__migrations__/0002_create_class_file.py +109 -0
- amsdal/__migrations__/0003_update_class_file.py +91 -0
- amsdal/__migrations__/0004_update_class_file.py +45 -0
- amsdal/cloud/__init__.cpython-311-darwin.so +0 -0
- amsdal/cloud/client.cpython-311-darwin.so +0 -0
- amsdal/cloud/constants.cpython-311-darwin.so +0 -0
- amsdal/cloud/enums.cpython-311-darwin.so +0 -0
- amsdal/cloud/models/__init__.cpython-311-darwin.so +0 -0
- amsdal/cloud/models/base.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/__init__.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/__init__.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/add_allowlist_ip.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/add_basic_auth.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/add_dependency.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/add_secret.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/base.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/create_deploy.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/create_env.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/create_session.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/delete_allowlist_ip.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/delete_basic_auth.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/delete_dependency.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/delete_env.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/delete_secret.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/destroy_deploy.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/expose_db.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/get_basic_auth_credentials.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/get_monitoring_info.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/list_dependencies.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/list_deploys.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/list_envs.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/list_secrets.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/manager.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/signup_action.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/actions/update_deploy.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/auth/__init__.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/auth/base.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/auth/credentials.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/auth/credentials.pyi +0 -1
- amsdal/cloud/services/auth/manager.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/auth/signup_service.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/auth/token.cpython-311-darwin.so +0 -0
- amsdal/cloud/services/auth/token.pyi +0 -1
- amsdal/configs/main.py +40 -20
- amsdal/configs/main.pyi +19 -18
- amsdal/contrib/__init__.cpython-311-darwin.so +0 -0
- amsdal/contrib/auth/errors.py +36 -0
- amsdal/contrib/auth/errors.pyi +12 -0
- amsdal/contrib/auth/fixtures/basic_permissions.json +64 -0
- amsdal/contrib/auth/lifecycle/consumer.py +13 -13
- amsdal/contrib/auth/lifecycle/consumer.pyi +3 -0
- amsdal/contrib/auth/migrations/0000_initial.py +69 -31
- amsdal/contrib/auth/migrations/0001_add_mfa_support.py +188 -0
- amsdal/contrib/auth/models/__init__.py +1 -0
- amsdal/contrib/auth/models/backup_code.py +85 -0
- amsdal/contrib/auth/models/email_mfa_device.py +108 -0
- amsdal/contrib/auth/models/login_session.py +235 -0
- amsdal/contrib/auth/models/mfa_device.py +86 -0
- amsdal/contrib/auth/models/permission.py +23 -0
- amsdal/contrib/auth/models/sms_device.py +113 -0
- amsdal/contrib/auth/models/totp_device.py +58 -0
- amsdal/contrib/auth/models/user.py +156 -0
- amsdal/contrib/auth/services/__init__.py +1 -0
- amsdal/contrib/auth/services/mfa_device_service.py +544 -0
- amsdal/contrib/auth/services/mfa_device_service.pyi +216 -0
- amsdal/contrib/auth/services/totp_service.py +358 -0
- amsdal/contrib/auth/services/totp_service.pyi +158 -0
- amsdal/contrib/auth/settings.py +8 -0
- amsdal/contrib/auth/settings.pyi +8 -0
- amsdal/contrib/auth/transactions/__init__.py +1 -0
- amsdal/contrib/auth/transactions/mfa_device_transactions.py +463 -0
- amsdal/contrib/auth/transactions/mfa_device_transactions.pyi +226 -0
- amsdal/contrib/auth/transactions/totp_transactions.py +206 -0
- amsdal/contrib/auth/transactions/totp_transactions.pyi +113 -0
- amsdal/contrib/auth/utils/__init__.py +0 -0
- amsdal/contrib/auth/utils/__init__.pyi +0 -0
- amsdal/contrib/auth/utils/mfa.py +257 -0
- amsdal/contrib/auth/utils/mfa.pyi +119 -0
- amsdal/contrib/frontend_configs/conversion/convert.py +85 -25
- amsdal/contrib/frontend_configs/conversion/convert.pyi +0 -1
- amsdal/contrib/frontend_configs/lifecycle/consumer.py +32 -13
- amsdal/contrib/frontend_configs/lifecycle/consumer.pyi +1 -1
- amsdal/contrib/frontend_configs/migrations/0000_initial.py +167 -195
- amsdal/contrib/frontend_configs/migrations/0001_update_frontend_control_config.py +245 -0
- amsdal/contrib/frontend_configs/migrations/0002_add_button_and_invoke_actions.py +352 -0
- amsdal/contrib/frontend_configs/migrations/0003_create_class_frontendconfigdashboardelement.py +145 -0
- amsdal/contrib/frontend_configs/models/__init__.py +0 -0
- amsdal/contrib/frontend_configs/models/frontend_activator_config.py +22 -0
- amsdal/contrib/frontend_configs/models/frontend_config_async_validator.py +11 -0
- amsdal/contrib/frontend_configs/models/frontend_config_control_action.py +110 -0
- amsdal/contrib/frontend_configs/models/frontend_config_dashboard.py +51 -0
- amsdal/contrib/frontend_configs/models/frontend_config_group_validator.py +21 -0
- amsdal/contrib/frontend_configs/models/frontend_config_option.py +12 -0
- amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base.py +17 -0
- amsdal/contrib/frontend_configs/models/frontend_config_slider_option.py +13 -0
- amsdal/contrib/frontend_configs/models/frontend_config_text_mask.py +14 -0
- amsdal/contrib/frontend_configs/models/frontend_config_validator.py +28 -0
- amsdal/contrib/frontend_configs/models/frontend_control_config.py +110 -0
- amsdal/contrib/frontend_configs/models/frontend_model_config.py +14 -0
- amsdal/errors.py +0 -3
- amsdal/errors.pyi +0 -1
- amsdal/fixtures/__init__.cpython-311-darwin.so +0 -0
- amsdal/fixtures/manager.cpython-311-darwin.so +0 -0
- amsdal/fixtures/manager.pyi +73 -123
- amsdal/fixtures/utils.cpython-311-darwin.so +0 -0
- amsdal/fixtures/utils.pyi +9 -0
- amsdal/manager.cpython-311-darwin.so +0 -0
- amsdal/manager.pyi +9 -96
- amsdal/mixins/__init__.cpython-311-darwin.so +0 -0
- amsdal/mixins/class_versions_mixin.cpython-311-darwin.so +0 -0
- amsdal/models/__init__.py +19 -0
- amsdal/models/core/__init__.py +0 -0
- amsdal/models/core/class_object.py +38 -0
- amsdal/models/core/class_property.py +26 -0
- amsdal/models/core/file.py +243 -0
- amsdal/models/core/fixture.py +25 -0
- amsdal/models/core/option.py +11 -0
- amsdal/models/core/storage_metadata.py +15 -0
- amsdal/models/core/validator.py +12 -0
- amsdal/models/mixins.py +31 -0
- amsdal/models/types/__init__.py +0 -0
- amsdal/models/types/object.py +26 -0
- amsdal/queryset/__init__.py +21 -0
- amsdal/queryset/__init__.pyi +6 -0
- amsdal/schemas/core/class_object/model.json +20 -0
- amsdal/schemas/core/class_property/model.json +19 -0
- amsdal/schemas/core/file/properties/from_file.py +1 -1
- amsdal/schemas/core/file/properties/validate_data.py +3 -4
- amsdal/schemas/core/storage_metadata/model.json +52 -0
- amsdal/schemas/interfaces.py +25 -0
- amsdal/schemas/interfaces.pyi +20 -0
- amsdal/schemas/manager.cpython-311-darwin.so +0 -0
- amsdal/schemas/manager.py +0 -116
- amsdal/schemas/manager.pyi +0 -65
- amsdal/schemas/mixins/__init__.py +0 -0
- amsdal/schemas/mixins/__init__.pyi +0 -0
- amsdal/schemas/mixins/check_dependencies_mixin.py +130 -0
- amsdal/schemas/mixins/check_dependencies_mixin.pyi +45 -0
- amsdal/schemas/mixins/verify_schemas_mixin.py +96 -0
- amsdal/schemas/mixins/verify_schemas_mixin.pyi +33 -0
- amsdal/schemas/repository.py +84 -0
- amsdal/schemas/repository.pyi +22 -0
- amsdal/schemas/utils.py +16 -0
- amsdal/schemas/utils.pyi +10 -0
- amsdal/services/__init__.py +11 -0
- amsdal/services/__init__.pyi +4 -0
- amsdal/services/external_connections.py +262 -0
- amsdal/services/external_connections.pyi +190 -0
- amsdal/services/external_model_generator.py +350 -0
- amsdal/services/external_model_generator.pyi +134 -0
- amsdal/services/transaction_execution.cpython-311-darwin.so +0 -0
- amsdal/services/transaction_execution.pyi +2 -1
- amsdal/storages/__init__.py +20 -0
- amsdal/storages/__init__.pyi +8 -0
- amsdal/storages/file_system.py +214 -0
- amsdal/storages/file_system.pyi +36 -0
- amsdal/transactions/__init__.py +13 -0
- amsdal/transactions/__init__.pyi +4 -0
- amsdal/utils/rollback/__init__.py +99 -54
- amsdal/utils/rollback/__init__.pyi +6 -0
- amsdal/utils/tests/enums.py +0 -2
- amsdal/utils/tests/helpers.py +253 -231
- amsdal/utils/tests/migrations.py +157 -0
- {amsdal-0.3.3.dist-info → amsdal-0.5.29.dist-info}/METADATA +17 -10
- amsdal-0.5.29.dist-info/RECORD +276 -0
- {amsdal-0.3.3.dist-info → amsdal-0.5.29.dist-info}/WHEEL +1 -1
- amsdal/__migrations__/0001_datetime_type.py +0 -18
- amsdal/__migrations__/0002_fixture_order.py +0 -40
- amsdal/__migrations__/0003_schema_type_in_class_meta.py +0 -56
- amsdal/contrib/auth/models/login_session/hooks/pre_init.py +0 -68
- amsdal/contrib/auth/models/login_session/model.json +0 -23
- amsdal/contrib/auth/models/login_session/modifiers/display_name.py +0 -11
- amsdal/contrib/auth/models/permission/fixtures/basic_permissions.json +0 -62
- amsdal/contrib/auth/models/permission/model.json +0 -18
- amsdal/contrib/auth/models/permission/modifiers/display_name.py +0 -11
- amsdal/contrib/auth/models/user/hooks/post_init.py +0 -76
- amsdal/contrib/auth/models/user/hooks/pre_create.py +0 -8
- amsdal/contrib/auth/models/user/model.json +0 -25
- amsdal/contrib/auth/models/user/modifiers/display_name.py +0 -19
- amsdal/contrib/frontend_configs/models/frontend_activator_config/model.json +0 -11
- amsdal/contrib/frontend_configs/models/frontend_config_async_validator/model.json +0 -11
- amsdal/contrib/frontend_configs/models/frontend_config_group_validator/model.json +0 -52
- amsdal/contrib/frontend_configs/models/frontend_config_option/model.json +0 -15
- amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/model.json +0 -6
- amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/properties/model_dump.py +0 -13
- amsdal/contrib/frontend_configs/models/frontend_config_slider_option/model.json +0 -19
- amsdal/contrib/frontend_configs/models/frontend_config_text_mask/model.json +0 -26
- amsdal/contrib/frontend_configs/models/frontend_config_validator/model.json +0 -41
- amsdal/contrib/frontend_configs/models/frontend_control_config/model.json +0 -250
- amsdal/contrib/frontend_configs/models/frontend_model_config/fixtures/permissions.json +0 -24
- amsdal/contrib/frontend_configs/models/frontend_model_config/model.json +0 -17
- amsdal/contrib/frontend_configs/models/frontent_config_control_action/model.json +0 -54
- amsdal/contrib/frontend_configs/models/frontent_config_control_action/properties/action_validate.py +0 -33
- amsdal/migration/__init__.cpython-311-darwin.so +0 -0
- amsdal/migration/base_migration_schemas.cpython-311-darwin.so +0 -0
- amsdal/migration/base_migration_schemas.pyi +0 -120
- amsdal/migration/data_classes.cpython-311-darwin.so +0 -0
- amsdal/migration/data_classes.pyi +0 -172
- amsdal/migration/executors/__init__.cpython-311-darwin.so +0 -0
- amsdal/migration/executors/base.cpython-311-darwin.so +0 -0
- amsdal/migration/executors/base.pyi +0 -118
- amsdal/migration/executors/default_executor.cpython-311-darwin.so +0 -0
- amsdal/migration/executors/default_executor.pyi +0 -184
- amsdal/migration/executors/state_executor.cpython-311-darwin.so +0 -0
- amsdal/migration/executors/state_executor.pyi +0 -78
- amsdal/migration/file_migration_executor.cpython-311-darwin.so +0 -0
- amsdal/migration/file_migration_executor.pyi +0 -68
- amsdal/migration/file_migration_generator.cpython-311-darwin.so +0 -0
- amsdal/migration/file_migration_generator.pyi +0 -139
- amsdal/migration/file_migration_store.cpython-311-darwin.so +0 -0
- amsdal/migration/file_migration_store.pyi +0 -61
- amsdal/migration/file_migration_writer.cpython-311-darwin.so +0 -0
- amsdal/migration/file_migration_writer.pyi +0 -73
- amsdal/migration/migrations.cpython-311-darwin.so +0 -0
- amsdal/migration/migrations.pyi +0 -166
- amsdal/migration/migrations_loader.cpython-311-darwin.so +0 -0
- amsdal/migration/migrations_loader.pyi +0 -32
- amsdal/migration/schemas_loaders.cpython-311-darwin.so +0 -0
- amsdal/migration/schemas_loaders.pyi +0 -37
- amsdal/migration/templates/data_migration.tmpl +0 -18
- amsdal/migration/templates/dict_validator.tmpl +0 -4
- amsdal/migration/templates/migration.tmpl +0 -6
- amsdal/migration/templates/model_class.tmpl +0 -8
- amsdal/migration/templates/model_class_layout.tmpl +0 -24
- amsdal/migration/templates/options_validator.tmpl +0 -4
- amsdal/migration/utils.cpython-311-darwin.so +0 -0
- amsdal/migration/utils.pyi +0 -58
- amsdal/mixins/build_mixin.cpython-311-darwin.so +0 -0
- amsdal/mixins/build_mixin.pyi +0 -78
- amsdal/schemas/core/class_object_meta/model.json +0 -59
- amsdal/schemas/core/class_property_meta/model.json +0 -23
- amsdal/services/__init__.cpython-311-darwin.so +0 -0
- amsdal-0.3.3.dist-info/RECORD +0 -257
- amsdal-0.3.3.dist-info/licenses/LICENSE.txt +0 -107
- /amsdal/{migration → contrib/auth/services}/__init__.pyi +0 -0
- /amsdal/{migration/executors → contrib/auth/transactions}/__init__.pyi +0 -0
- {amsdal-0.3.3.dist-info → amsdal-0.5.29.dist-info/licenses}/LICENSE.txt +0 -0
- {amsdal-0.3.3.dist-info → amsdal-0.5.29.dist-info}/top_level.txt +0 -0
|
@@ -1,254 +1,226 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
from amsdal.migration import migrations
|
|
1
|
+
from amsdal_models.migration import migrations
|
|
2
|
+
from amsdal_utils.models.enums import ModuleType
|
|
4
3
|
|
|
5
4
|
|
|
6
5
|
class Migration(migrations.Migration):
|
|
7
6
|
operations: list[migrations.Operation] = [
|
|
8
7
|
migrations.CreateClass(
|
|
9
|
-
|
|
10
|
-
class_name=
|
|
8
|
+
module_type=ModuleType.CONTRIB,
|
|
9
|
+
class_name="FrontendConfigSkipNoneBase",
|
|
11
10
|
new_schema={
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
16
|
},
|
|
17
17
|
),
|
|
18
18
|
migrations.CreateClass(
|
|
19
|
-
|
|
20
|
-
class_name=
|
|
19
|
+
module_type=ModuleType.CONTRIB,
|
|
20
|
+
class_name="FrontendConfigAsyncValidator",
|
|
21
21
|
new_schema={
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
'type': 'string',
|
|
29
|
-
'title': 'Condition',
|
|
30
|
-
'options': [
|
|
31
|
-
{'key': 'Less Than', 'value': 'lt'},
|
|
32
|
-
{'key': 'Less Than or Equal', 'value': 'lte'},
|
|
33
|
-
{'key': 'Greater Than', 'value': 'gt'},
|
|
34
|
-
{'key': 'Greater Than or Equal', 'value': 'gte'},
|
|
35
|
-
{'key': 'Equal', 'value': 'eq'},
|
|
36
|
-
{'key': 'Not Equal', 'value': 'neq'},
|
|
37
|
-
{'key': 'Exist', 'value': 'exist'},
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
'meta_class': 'TypeMeta',
|
|
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": {}},
|
|
42
28
|
},
|
|
43
29
|
),
|
|
44
30
|
migrations.CreateClass(
|
|
45
|
-
|
|
46
|
-
class_name=
|
|
31
|
+
module_type=ModuleType.CONTRIB,
|
|
32
|
+
class_name="FrontendConfigControlAction",
|
|
47
33
|
new_schema={
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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": {}},
|
|
52
48
|
},
|
|
53
49
|
),
|
|
54
50
|
migrations.CreateClass(
|
|
55
|
-
|
|
56
|
-
class_name=
|
|
51
|
+
module_type=ModuleType.CONTRIB,
|
|
52
|
+
class_name="FrontendConfigGroupValidator",
|
|
57
53
|
new_schema={
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
'suffix': {'type': 'string', 'title': 'Suffix'},
|
|
65
|
-
'thousands_separator': {'type': 'string', 'title': 'Thousands Separator'},
|
|
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"},
|
|
66
60
|
},
|
|
67
|
-
|
|
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": {}},
|
|
68
64
|
},
|
|
69
65
|
),
|
|
70
66
|
migrations.CreateClass(
|
|
71
|
-
|
|
72
|
-
class_name=
|
|
67
|
+
module_type=ModuleType.CONTRIB,
|
|
68
|
+
class_name="FrontendConfigOption",
|
|
73
69
|
new_schema={
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
'range': {'type': 'boolean', 'title': 'Range'},
|
|
70
|
+
"title": "FrontendConfigOption",
|
|
71
|
+
"type": "FrontendConfigSkipNoneBase",
|
|
72
|
+
"properties": {
|
|
73
|
+
"label": {"type": "string", "title": "Label"},
|
|
74
|
+
"value": {"type": "string", "title": "Value"},
|
|
80
75
|
},
|
|
81
|
-
|
|
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": {}},
|
|
82
79
|
},
|
|
83
80
|
),
|
|
84
81
|
migrations.CreateClass(
|
|
85
|
-
|
|
86
|
-
class_name=
|
|
82
|
+
module_type=ModuleType.CONTRIB,
|
|
83
|
+
class_name="FrontendConfigSliderOption",
|
|
87
84
|
new_schema={
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
'options': [
|
|
95
|
-
{'key': 'Minimum', 'value': 'min'},
|
|
96
|
-
{'key': 'Maximum', 'value': 'max'},
|
|
97
|
-
{'key': 'Minimum Length', 'value': 'minLength'},
|
|
98
|
-
{'key': 'Maximum Length', 'value': 'maxLength'},
|
|
99
|
-
{'key': 'Required', 'value': 'required'},
|
|
100
|
-
{'key': 'Pattern', 'value': 'pattern'},
|
|
101
|
-
],
|
|
102
|
-
},
|
|
103
|
-
'value': {'type': 'string', 'title': 'Value'},
|
|
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"},
|
|
104
91
|
},
|
|
105
|
-
|
|
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": {}},
|
|
106
95
|
},
|
|
107
96
|
),
|
|
108
97
|
migrations.CreateClass(
|
|
109
|
-
|
|
110
|
-
class_name=
|
|
98
|
+
module_type=ModuleType.CONTRIB,
|
|
99
|
+
class_name="FrontendConfigTextMask",
|
|
111
100
|
new_schema={
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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": {}},
|
|
116
113
|
},
|
|
117
114
|
),
|
|
118
115
|
migrations.CreateClass(
|
|
119
|
-
|
|
120
|
-
class_name=
|
|
116
|
+
module_type=ModuleType.CONTRIB,
|
|
117
|
+
class_name="FrontendActivatorConfig",
|
|
121
118
|
new_schema={
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
'type': 'string',
|
|
130
|
-
'title': 'Type',
|
|
131
|
-
'options': [
|
|
132
|
-
{'key': 'Arrow Next', 'value': 'arrow-next'},
|
|
133
|
-
{'key': 'Arrow Prev', 'value': 'arrow-prev'},
|
|
134
|
-
{'key': 'Action Button', 'value': 'action-button'},
|
|
135
|
-
{'key': 'Text Next', 'value': 'text-next'},
|
|
136
|
-
{'key': 'Text Prev', 'value': 'text-prev'},
|
|
137
|
-
],
|
|
138
|
-
},
|
|
139
|
-
'dataLayerEvent': {'type': 'string', 'title': 'Data Layer Event'},
|
|
140
|
-
'activator': {'type': 'string', 'title': 'Activator'},
|
|
141
|
-
'icon': {'type': 'string', 'title': 'Icon'},
|
|
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"},
|
|
142
126
|
},
|
|
143
|
-
|
|
144
|
-
|
|
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": {}},
|
|
145
130
|
},
|
|
146
131
|
),
|
|
147
132
|
migrations.CreateClass(
|
|
148
|
-
|
|
149
|
-
class_name=
|
|
133
|
+
module_type=ModuleType.CONTRIB,
|
|
134
|
+
class_name="FrontendConfigValidator",
|
|
150
135
|
new_schema={
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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"},
|
|
156
144
|
},
|
|
157
|
-
|
|
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": {}},
|
|
158
148
|
},
|
|
159
149
|
),
|
|
160
150
|
migrations.CreateClass(
|
|
161
|
-
|
|
162
|
-
class_name=
|
|
151
|
+
module_type=ModuleType.CONTRIB,
|
|
152
|
+
class_name="FrontendControlConfig",
|
|
163
153
|
new_schema={
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
{'key': 'Email', 'value': 'email'},
|
|
183
|
-
{'key': 'Phone', 'value': 'phone'},
|
|
184
|
-
{'key': 'textarea', 'value': 'textarea'},
|
|
185
|
-
{'key': 'Multiselect', 'value': 'multiselect'},
|
|
186
|
-
{'key': 'number_initial', 'value': 'number_initial'},
|
|
187
|
-
{'key': 'number_plus', 'value': 'number_plus'},
|
|
188
|
-
{'key': 'number_minus', 'value': 'number_minus'},
|
|
189
|
-
{'key': 'number_equals', 'value': 'number_equals'},
|
|
190
|
-
{'key': 'toggle', 'value': 'toggle'},
|
|
191
|
-
{'key': 'radio', 'value': 'radio'},
|
|
192
|
-
{'key': 'checkbox', 'value': 'checkbox'},
|
|
193
|
-
{'key': 'number-slider', 'value': 'number-slider'},
|
|
194
|
-
{'key': 'number-operations', 'value': 'number-operations'},
|
|
195
|
-
{'key': 'date', 'value': 'date'},
|
|
196
|
-
{'key': 'dateTriplet', 'value': 'dateTriplet'},
|
|
197
|
-
{'key': 'array', 'value': 'array'},
|
|
198
|
-
{'key': 'object', 'value': 'object'},
|
|
199
|
-
{'key': 'file', 'value': 'file'},
|
|
200
|
-
{'key': 'dropzone', 'value': 'dropzone'},
|
|
201
|
-
{'key': 'object_latest', 'value': 'object_latest'},
|
|
202
|
-
{'key': 'Dictionary', 'value': 'dict'},
|
|
203
|
-
{'key': 'Time', 'value': 'time'},
|
|
204
|
-
{'key': 'Datetime', 'value': 'datetime'},
|
|
205
|
-
{'key': 'Bytes', 'value': 'Bytes'},
|
|
206
|
-
],
|
|
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",
|
|
207
172
|
},
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
'actions': {'type': 'array', 'items': {'type': 'FrontendConfigControlAction'}, 'title': 'Actions'},
|
|
213
|
-
'validators': {
|
|
214
|
-
'type': 'array',
|
|
215
|
-
'items': {'type': 'FrontendConfigValidator'},
|
|
216
|
-
'title': 'Validators',
|
|
173
|
+
"asyncValidators": {
|
|
174
|
+
"type": "array",
|
|
175
|
+
"items": {"type": "FrontendConfigAsyncValidator", "title": "FrontendConfigAsyncValidator"},
|
|
176
|
+
"title": "Async Validators",
|
|
217
177
|
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
178
|
+
"activators": {
|
|
179
|
+
"type": "array",
|
|
180
|
+
"items": {"type": "FrontendActivatorConfig", "title": "FrontendActivatorConfig"},
|
|
181
|
+
"title": "Activators",
|
|
222
182
|
},
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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",
|
|
227
190
|
},
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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"},
|
|
239
202
|
},
|
|
240
|
-
|
|
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": {}},
|
|
241
206
|
},
|
|
242
207
|
),
|
|
243
208
|
migrations.CreateClass(
|
|
244
|
-
|
|
245
|
-
class_name=
|
|
209
|
+
module_type=ModuleType.CONTRIB,
|
|
210
|
+
class_name="FrontendModelConfig",
|
|
246
211
|
new_schema={
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
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": {},
|
|
252
224
|
},
|
|
253
225
|
},
|
|
254
226
|
),
|