amsdal 0.4.13__cp312-cp312-macosx_10_13_universal2.whl → 0.5.33__cp312-cp312-macosx_10_13_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.
Files changed (156) hide show
  1. amsdal/Third-Party Materials - AMSDAL Dependencies - License Notices.md +28 -0
  2. amsdal/__about__.py +1 -1
  3. amsdal/__migrations__/0000_initial.py +22 -203
  4. amsdal/__migrations__/0001_create_class_file.py +61 -0
  5. amsdal/__migrations__/0002_create_class_file.py +109 -0
  6. amsdal/__migrations__/0003_update_class_file.py +91 -0
  7. amsdal/__migrations__/0004_update_class_file.py +45 -0
  8. amsdal/cloud/__init__.cpython-312-darwin.so +0 -0
  9. amsdal/cloud/client.cpython-312-darwin.so +0 -0
  10. amsdal/cloud/constants.cpython-312-darwin.so +0 -0
  11. amsdal/cloud/enums.cpython-312-darwin.so +0 -0
  12. amsdal/cloud/models/__init__.cpython-312-darwin.so +0 -0
  13. amsdal/cloud/models/base.cpython-312-darwin.so +0 -0
  14. amsdal/cloud/services/__init__.cpython-312-darwin.so +0 -0
  15. amsdal/cloud/services/actions/__init__.cpython-312-darwin.so +0 -0
  16. amsdal/cloud/services/actions/add_allowlist_ip.cpython-312-darwin.so +0 -0
  17. amsdal/cloud/services/actions/add_basic_auth.cpython-312-darwin.so +0 -0
  18. amsdal/cloud/services/actions/add_dependency.cpython-312-darwin.so +0 -0
  19. amsdal/cloud/services/actions/add_secret.cpython-312-darwin.so +0 -0
  20. amsdal/cloud/services/actions/base.cpython-312-darwin.so +0 -0
  21. amsdal/cloud/services/actions/create_deploy.cpython-312-darwin.so +0 -0
  22. amsdal/cloud/services/actions/create_env.cpython-312-darwin.so +0 -0
  23. amsdal/cloud/services/actions/create_session.cpython-312-darwin.so +0 -0
  24. amsdal/cloud/services/actions/delete_allowlist_ip.cpython-312-darwin.so +0 -0
  25. amsdal/cloud/services/actions/delete_basic_auth.cpython-312-darwin.so +0 -0
  26. amsdal/cloud/services/actions/delete_dependency.cpython-312-darwin.so +0 -0
  27. amsdal/cloud/services/actions/delete_env.cpython-312-darwin.so +0 -0
  28. amsdal/cloud/services/actions/delete_secret.cpython-312-darwin.so +0 -0
  29. amsdal/cloud/services/actions/destroy_deploy.cpython-312-darwin.so +0 -0
  30. amsdal/cloud/services/actions/expose_db.cpython-312-darwin.so +0 -0
  31. amsdal/cloud/services/actions/get_basic_auth_credentials.cpython-312-darwin.so +0 -0
  32. amsdal/cloud/services/actions/get_monitoring_info.cpython-312-darwin.so +0 -0
  33. amsdal/cloud/services/actions/list_dependencies.cpython-312-darwin.so +0 -0
  34. amsdal/cloud/services/actions/list_deploys.cpython-312-darwin.so +0 -0
  35. amsdal/cloud/services/actions/list_envs.cpython-312-darwin.so +0 -0
  36. amsdal/cloud/services/actions/list_secrets.cpython-312-darwin.so +0 -0
  37. amsdal/cloud/services/actions/manager.cpython-312-darwin.so +0 -0
  38. amsdal/cloud/services/actions/signup_action.cpython-312-darwin.so +0 -0
  39. amsdal/cloud/services/actions/update_deploy.cpython-312-darwin.so +0 -0
  40. amsdal/cloud/services/auth/__init__.cpython-312-darwin.so +0 -0
  41. amsdal/cloud/services/auth/base.cpython-312-darwin.so +0 -0
  42. amsdal/cloud/services/auth/credentials.cpython-312-darwin.so +0 -0
  43. amsdal/cloud/services/auth/manager.cpython-312-darwin.so +0 -0
  44. amsdal/cloud/services/auth/signup_service.cpython-312-darwin.so +0 -0
  45. amsdal/cloud/services/auth/token.cpython-312-darwin.so +0 -0
  46. amsdal/configs/main.py +17 -1
  47. amsdal/configs/main.pyi +6 -1
  48. amsdal/contrib/__init__.cpython-312-darwin.so +0 -0
  49. amsdal/contrib/auth/errors.py +36 -0
  50. amsdal/contrib/auth/errors.pyi +12 -0
  51. amsdal/contrib/auth/lifecycle/consumer.py +2 -2
  52. amsdal/contrib/auth/migrations/0000_initial.py +55 -52
  53. amsdal/contrib/auth/migrations/0001_add_mfa_support.py +188 -0
  54. amsdal/contrib/auth/models/__init__.py +1 -0
  55. amsdal/contrib/auth/models/backup_code.py +85 -0
  56. amsdal/contrib/auth/models/email_mfa_device.py +108 -0
  57. amsdal/contrib/auth/models/login_session.py +117 -0
  58. amsdal/contrib/auth/models/mfa_device.py +86 -0
  59. amsdal/contrib/auth/models/sms_device.py +113 -0
  60. amsdal/contrib/auth/models/totp_device.py +58 -0
  61. amsdal/contrib/auth/models/user.py +50 -0
  62. amsdal/contrib/auth/services/__init__.py +1 -0
  63. amsdal/contrib/auth/services/mfa_device_service.py +544 -0
  64. amsdal/contrib/auth/services/mfa_device_service.pyi +216 -0
  65. amsdal/contrib/auth/services/totp_service.py +358 -0
  66. amsdal/contrib/auth/services/totp_service.pyi +158 -0
  67. amsdal/contrib/auth/settings.py +8 -0
  68. amsdal/contrib/auth/settings.pyi +8 -0
  69. amsdal/contrib/auth/transactions/__init__.py +1 -0
  70. amsdal/contrib/auth/transactions/mfa_device_transactions.py +458 -0
  71. amsdal/contrib/auth/transactions/mfa_device_transactions.pyi +226 -0
  72. amsdal/contrib/auth/transactions/totp_transactions.py +203 -0
  73. amsdal/contrib/auth/transactions/totp_transactions.pyi +113 -0
  74. amsdal/contrib/auth/utils/mfa.py +257 -0
  75. amsdal/contrib/auth/utils/mfa.pyi +119 -0
  76. amsdal/contrib/frontend_configs/conversion/convert.py +24 -0
  77. amsdal/contrib/frontend_configs/migrations/0000_initial.py +154 -183
  78. amsdal/contrib/frontend_configs/migrations/0001_update_frontend_control_config.py +245 -0
  79. amsdal/contrib/frontend_configs/migrations/0002_add_button_and_invoke_actions.py +352 -0
  80. amsdal/contrib/frontend_configs/migrations/0003_create_class_frontendconfigdashboardelement.py +145 -0
  81. amsdal/contrib/frontend_configs/models/frontend_config_control_action.py +57 -1
  82. amsdal/contrib/frontend_configs/models/frontend_config_dashboard.py +51 -0
  83. amsdal/contrib/frontend_configs/models/frontend_control_config.py +69 -46
  84. amsdal/fixtures/__init__.cpython-312-darwin.so +0 -0
  85. amsdal/fixtures/manager.cpython-312-darwin.so +0 -0
  86. amsdal/fixtures/utils.cpython-312-darwin.so +0 -0
  87. amsdal/manager.cpython-312-darwin.so +0 -0
  88. amsdal/mixins/__init__.cpython-312-darwin.so +0 -0
  89. amsdal/mixins/class_versions_mixin.cpython-312-darwin.so +0 -0
  90. amsdal/models/core/class_object.py +7 -6
  91. amsdal/models/core/class_property.py +7 -1
  92. amsdal/models/core/file.py +168 -81
  93. amsdal/models/core/storage_metadata.py +15 -0
  94. amsdal/models/mixins.py +31 -0
  95. amsdal/models/types/object.py +3 -3
  96. amsdal/schemas/core/class_object/model.json +20 -0
  97. amsdal/schemas/core/class_property/model.json +19 -0
  98. amsdal/schemas/core/file/properties/validate_data.py +2 -3
  99. amsdal/schemas/core/storage_metadata/model.json +52 -0
  100. amsdal/schemas/manager.cpython-312-darwin.so +0 -0
  101. amsdal/schemas/mixins/check_dependencies_mixin.py +8 -3
  102. amsdal/services/__init__.py +11 -0
  103. amsdal/services/__init__.pyi +4 -0
  104. amsdal/services/external_connections.py +262 -0
  105. amsdal/services/external_connections.pyi +190 -0
  106. amsdal/services/external_model_generator.py +350 -0
  107. amsdal/services/external_model_generator.pyi +134 -0
  108. amsdal/services/transaction_execution.cpython-312-darwin.so +0 -0
  109. amsdal/storages/__init__.py +20 -0
  110. amsdal/storages/__init__.pyi +8 -0
  111. amsdal/storages/file_system.py +214 -0
  112. amsdal/storages/file_system.pyi +36 -0
  113. amsdal/utils/tests/enums.py +0 -2
  114. amsdal/utils/tests/helpers.py +213 -381
  115. amsdal/utils/tests/migrations.py +157 -0
  116. {amsdal-0.4.13.dist-info → amsdal-0.5.33.dist-info}/METADATA +17 -11
  117. {amsdal-0.4.13.dist-info → amsdal-0.5.33.dist-info}/RECORD +124 -117
  118. amsdal/__migrations__/0001_datetime_type.py +0 -18
  119. amsdal/__migrations__/0002_fixture_order.py +0 -44
  120. amsdal/__migrations__/0003_schema_type_in_class_meta.py +0 -44
  121. amsdal/contrib/auth/models/login_session.pyi +0 -37
  122. amsdal/contrib/auth/models/permission.pyi +0 -18
  123. amsdal/contrib/auth/models/user.pyi +0 -46
  124. amsdal/contrib/frontend_configs/models/frontend_activator_config.pyi +0 -12
  125. amsdal/contrib/frontend_configs/models/frontend_config_async_validator.pyi +0 -7
  126. amsdal/contrib/frontend_configs/models/frontend_config_control_action.pyi +0 -32
  127. amsdal/contrib/frontend_configs/models/frontend_config_group_validator.pyi +0 -11
  128. amsdal/contrib/frontend_configs/models/frontend_config_option.pyi +0 -8
  129. amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base.pyi +0 -8
  130. amsdal/contrib/frontend_configs/models/frontend_config_slider_option.pyi +0 -9
  131. amsdal/contrib/frontend_configs/models/frontend_config_text_mask.pyi +0 -10
  132. amsdal/contrib/frontend_configs/models/frontend_config_validator.pyi +0 -15
  133. amsdal/contrib/frontend_configs/models/frontend_control_config.pyi +0 -35
  134. amsdal/contrib/frontend_configs/models/frontend_model_config.pyi +0 -9
  135. amsdal/models/__init__.pyi +0 -9
  136. amsdal/models/core/class_object.pyi +0 -24
  137. amsdal/models/core/class_object_meta.py +0 -26
  138. amsdal/models/core/class_object_meta.pyi +0 -15
  139. amsdal/models/core/class_property.pyi +0 -11
  140. amsdal/models/core/class_property_meta.py +0 -15
  141. amsdal/models/core/class_property_meta.pyi +0 -10
  142. amsdal/models/core/file.pyi +0 -104
  143. amsdal/models/core/fixture.pyi +0 -14
  144. amsdal/models/core/option.pyi +0 -8
  145. amsdal/models/core/validator.pyi +0 -8
  146. amsdal/models/types/object.pyi +0 -16
  147. amsdal/schemas/core/class_object_meta/model.json +0 -59
  148. amsdal/schemas/core/class_property_meta/model.json +0 -23
  149. amsdal/services/__init__.cpython-312-darwin.so +0 -0
  150. /amsdal/contrib/auth/{models → services}/__init__.pyi +0 -0
  151. /amsdal/contrib/{frontend_configs/models → auth/transactions}/__init__.pyi +0 -0
  152. /amsdal/{models/core/__init__.pyi → contrib/auth/utils/__init__.py} +0 -0
  153. /amsdal/{models/types → contrib/auth/utils}/__init__.pyi +0 -0
  154. {amsdal-0.4.13.dist-info → amsdal-0.5.33.dist-info}/WHEEL +0 -0
  155. {amsdal-0.4.13.dist-info → amsdal-0.5.33.dist-info}/licenses/LICENSE.txt +0 -0
  156. {amsdal-0.4.13.dist-info → amsdal-0.5.33.dist-info}/top_level.txt +0 -0
@@ -1,18 +0,0 @@
1
- from amsdal_utils.models.enums import ModuleType
2
-
3
- from amsdal_models.migration import migrations
4
-
5
-
6
- class Migration(migrations.Migration):
7
- operations: list[migrations.Operation] = [
8
- migrations.CreateClass(
9
- module_type=ModuleType.TYPE,
10
- class_name='Date',
11
- new_schema={'title': 'Date', 'properties': {}, 'meta_class': 'TypeMeta'},
12
- ),
13
- migrations.CreateClass(
14
- module_type=ModuleType.TYPE,
15
- class_name='Datetime',
16
- new_schema={'title': 'Datetime', 'properties': {}, 'meta_class': 'TypeMeta'},
17
- ),
18
- ]
@@ -1,44 +0,0 @@
1
- from amsdal_models.migration import migrations
2
- from amsdal_utils.models.enums import ModuleType
3
-
4
-
5
- class Migration(migrations.Migration):
6
- operations: list[migrations.Operation] = [
7
- migrations.UpdateClass(
8
- module_type=ModuleType.CORE,
9
- class_name='Fixture',
10
- old_schema={
11
- 'title': 'Fixture',
12
- 'required': ['data', 'external_id'],
13
- 'properties': {
14
- 'class_name': {'type': 'string', 'title': 'Class Name'},
15
- 'external_id': {'type': 'string', 'title': 'External ID'},
16
- 'data': {
17
- 'type': 'dictionary',
18
- 'items': {'key': {'type': 'string'}, 'value': {'type': 'anything'}},
19
- 'title': 'Data',
20
- },
21
- },
22
- "primary_key": ["partition_key"],
23
- "table_name": "Fixture",
24
- 'unique': [['external_id']],
25
- },
26
- new_schema={
27
- 'title': 'Fixture',
28
- 'required': ['data', 'external_id'],
29
- 'properties': {
30
- 'class_name': {'type': 'string', 'title': 'Class Name'},
31
- 'order': {'type': 'number', 'title': 'Order'},
32
- 'external_id': {'type': 'string', 'title': 'External ID'},
33
- 'data': {
34
- 'type': 'dictionary',
35
- 'items': {'key': {'type': 'string'}, 'value': {'type': 'anything'}},
36
- 'title': 'Data',
37
- },
38
- },
39
- "primary_key": ["partition_key"],
40
- "table_name": "Fixture",
41
- 'unique': [['external_id']],
42
- },
43
- ),
44
- ]
@@ -1,44 +0,0 @@
1
- from amsdal_models.migration import migrations
2
- from amsdal_utils.models.enums import ModuleType
3
-
4
-
5
- class Migration(migrations.Migration):
6
- operations: list[migrations.Operation] = [
7
- migrations.UpdateClass(
8
- module_type=ModuleType.CORE,
9
- class_name='ClassObjectMeta',
10
- old_schema={
11
- "title": "ClassObjectMeta",
12
- "type": "object",
13
- "properties": {
14
- "title": {"title": "Title", "type": "string"},
15
- "type": {"title": "Type", "type": "string"},
16
- "default": {"title": "Default", "type": "anything"},
17
- "properties": {
18
- "title": "Properties",
19
- "type": "dictionary",
20
- "items": {"key": {"type": "string"}, "value": {"type": "ClassPropertyMeta"}},
21
- },
22
- "custom_code": {"title": "Custom Code", "type": "string"},
23
- },
24
- "required": ["title", "type"],
25
- },
26
- new_schema={
27
- "title": "ClassObjectMeta",
28
- "type": "object",
29
- "properties": {
30
- "title": {"title": "Title", "type": "string"},
31
- "type": {"title": "Type", "type": "string"},
32
- "default": {"title": "Default", "type": "anything"},
33
- "class_schema_type": {"title": "Schema Type", "type": "string"},
34
- "properties": {
35
- "title": "Properties",
36
- "type": "dictionary",
37
- "items": {"key": {"type": "string"}, "value": {"type": "ClassPropertyMeta"}},
38
- },
39
- "custom_code": {"title": "Custom Code", "type": "string"},
40
- },
41
- "required": ["title", "type"],
42
- },
43
- ),
44
- ]
@@ -1,37 +0,0 @@
1
- from amsdal_models.classes.model import Model
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import Any, ClassVar
4
-
5
- class LoginSession(Model):
6
- __module_type__: ClassVar[ModuleType] = ...
7
- email: str = ...
8
- password: str = ...
9
- token: str | None = ...
10
- @property
11
- def display_name(self) -> str:
12
- """
13
- Returns the display name of the user.
14
-
15
- This method returns the email of the user as their display name.
16
-
17
- Returns:
18
- str: The email of the user.
19
- """
20
- def pre_init(self, *, is_new_object: bool, kwargs: dict[str, Any]) -> None:
21
- """
22
- Pre-initializes a user object by validating email and password, and generating a JWT token.
23
-
24
- This method checks if the object is new and validates the provided email and password.
25
- If the email and password are valid, it generates a JWT token and adds it to the kwargs.
26
-
27
- Args:
28
- is_new_object (bool): Indicates if the object is new.
29
- kwargs (dict[str, Any]): The keyword arguments containing user details.
30
-
31
- Raises:
32
- AuthenticationError: If the email or password is invalid.
33
- """
34
- def pre_create(self) -> None: ...
35
- def pre_update(self) -> None: ...
36
- async def apre_create(self) -> None: ...
37
- async def apre_update(self) -> None: ...
@@ -1,18 +0,0 @@
1
- from amsdal_models.classes.model import Model
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import ClassVar
4
-
5
- class Permission(Model):
6
- __module_type__: ClassVar[ModuleType] = ...
7
- model: str = ...
8
- action: str = ...
9
- @property
10
- def display_name(self) -> str:
11
- """
12
- Returns the display name of the user.
13
-
14
- This method returns a formatted string combining the model and action of the user.
15
-
16
- Returns:
17
- str: The formatted display name in the format 'model:action'.
18
- """
@@ -1,46 +0,0 @@
1
- from amsdal.contrib.auth.models.permission import *
2
- from amsdal_models.classes.model import Model
3
- from amsdal_utils.models.enums import ModuleType
4
- from typing import Any, ClassVar
5
-
6
- class User(Model):
7
- __module_type__: ClassVar[ModuleType] = ...
8
- email: str = ...
9
- password: bytes = ...
10
- permissions: list['Permission'] | None = ...
11
- def __repr__(self) -> str: ...
12
- def __str__(self) -> str: ...
13
- async def apre_update(self) -> None: ...
14
- @property
15
- def display_name(self) -> str:
16
- """
17
- Returns the display name of the user.
18
-
19
- This method returns the email of the user as their display name.
20
-
21
- Returns:
22
- str: The email of the user.
23
- """
24
- _object_id = ...
25
- def post_init(self, *, is_new_object: bool, kwargs: dict[str, Any]) -> None:
26
- """
27
- Post-initializes a user object by validating email and password, and hashing the password.
28
-
29
- This method checks if the email and password are provided and valid. If the object is new,
30
- it hashes the password and sets the object ID to the lowercased email.
31
-
32
- Args:
33
- is_new_object (bool): Indicates if the object is new.
34
- kwargs (dict[str, Any]): The keyword arguments containing user details.
35
-
36
- Raises:
37
- UserCreationError: If the email or password is invalid.
38
- """
39
- def pre_create(self) -> None:
40
- """
41
- Pre-creates a user object.
42
-
43
- This method is a placeholder for any pre-creation logic that needs to be executed
44
- before a user object is created.
45
- """
46
- def pre_update(self) -> None: ...
@@ -1,12 +0,0 @@
1
- from amsdal.contrib.frontend_configs.models.frontend_config_group_validator import *
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import Any, ClassVar
4
-
5
- class FrontendActivatorConfig(FrontendConfigGroupValidator):
6
- __module_type__: ClassVar[ModuleType]
7
- mainControl: str | None
8
- dependentControls: list[str] | None
9
- condition: str | None
10
- value: Any | None
11
- @classmethod
12
- def validate_value_in_options_condition(cls, value: Any) -> Any: ...
@@ -1,7 +0,0 @@
1
- from amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import ClassVar
4
-
5
- class FrontendConfigAsyncValidator(FrontendConfigSkipNoneBase):
6
- __module_type__: ClassVar[ModuleType]
7
- endpoint: str | None
@@ -1,32 +0,0 @@
1
- from amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import Any, ClassVar
4
-
5
- class FrontendConfigControlAction(FrontendConfigSkipNoneBase):
6
- __module_type__: ClassVar[ModuleType]
7
- action: str
8
- text: str
9
- type: str
10
- dataLayerEvent: str | None
11
- activator: str | None
12
- icon: str | None
13
- @classmethod
14
- def validate_value_in_options_type(cls, value: Any) -> Any: ...
15
- @classmethod
16
- def validate_action(cls, v: str) -> str:
17
- """
18
- Validates the action string to ensure it is one of the allowed values.
19
-
20
- This method checks if the action string starts with 'navigate::' or is one of the predefined
21
- actions. If the action string is invalid, it raises a ValueError.
22
-
23
- Args:
24
- cls: The class this method is attached to.
25
- v (str): The action string to validate.
26
-
27
- Returns:
28
- str: The validated action string.
29
-
30
- Raises:
31
- ValueError: If the action string is not valid.
32
- """
@@ -1,11 +0,0 @@
1
- from amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import Any, ClassVar
4
-
5
- class FrontendConfigGroupValidator(FrontendConfigSkipNoneBase):
6
- __module_type__: ClassVar[ModuleType]
7
- mainControl: str | None
8
- dependentControls: list[str] | None
9
- condition: str | None
10
- @classmethod
11
- def validate_value_in_options_condition(cls, value: Any) -> Any: ...
@@ -1,8 +0,0 @@
1
- from amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import ClassVar
4
-
5
- class FrontendConfigOption(FrontendConfigSkipNoneBase):
6
- __module_type__: ClassVar[ModuleType]
7
- label: str | None
8
- value: str | None
@@ -1,8 +0,0 @@
1
- from amsdal_models.classes.model import TypeModel
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import Any, ClassVar
4
-
5
- class FrontendConfigSkipNoneBase(TypeModel):
6
- __module_type__: ClassVar[ModuleType]
7
- def model_dump(self, **kwargs: Any) -> dict[str, Any]: ...
8
- def model_dump_json(self, **kwargs: Any) -> str: ...
@@ -1,9 +0,0 @@
1
- from amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import ClassVar
4
-
5
- class FrontendConfigSliderOption(FrontendConfigSkipNoneBase):
6
- __module_type__: ClassVar[ModuleType]
7
- min: float | None
8
- max: float | None
9
- range: bool | None
@@ -1,10 +0,0 @@
1
- from amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import ClassVar
4
-
5
- class FrontendConfigTextMask(FrontendConfigSkipNoneBase):
6
- __module_type__: ClassVar[ModuleType]
7
- mask_string: str
8
- prefix: str | None
9
- suffix: str | None
10
- thousands_separator: str | None
@@ -1,15 +0,0 @@
1
- from amsdal.contrib.frontend_configs.models.frontend_config_group_validator import *
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import Any, ClassVar
4
-
5
- class FrontendConfigValidator(FrontendConfigGroupValidator):
6
- __module_type__: ClassVar[ModuleType]
7
- mainControl: str | None
8
- dependentControls: list[str] | None
9
- condition: str | None
10
- function: str | None
11
- value: str | None
12
- @classmethod
13
- def validate_value_in_options_condition(cls, value: Any) -> Any: ...
14
- @classmethod
15
- def validate_value_in_options_function(cls, value: Any) -> Any: ...
@@ -1,35 +0,0 @@
1
- from amsdal.contrib.frontend_configs.models.frontend_activator_config import *
2
- from amsdal.contrib.frontend_configs.models.frontend_config_async_validator import *
3
- from amsdal.contrib.frontend_configs.models.frontend_config_control_action import *
4
- from amsdal.contrib.frontend_configs.models.frontend_config_option import *
5
- from amsdal.contrib.frontend_configs.models.frontend_config_skip_none_base import *
6
- from amsdal.contrib.frontend_configs.models.frontend_config_slider_option import *
7
- from amsdal.contrib.frontend_configs.models.frontend_config_text_mask import *
8
- from amsdal.contrib.frontend_configs.models.frontend_config_validator import *
9
- from amsdal_utils.models.enums import ModuleType
10
- from typing import Any, ClassVar
11
-
12
- class FrontendControlConfig(FrontendConfigSkipNoneBase):
13
- __module_type__: ClassVar[ModuleType]
14
- type: str
15
- name: str
16
- label: str | None
17
- required: bool | None
18
- hideLabel: bool | None
19
- actions: list['FrontendConfigControlAction'] | None
20
- validators: list['FrontendConfigValidator'] | None
21
- asyncValidators: list['FrontendConfigAsyncValidator'] | None
22
- activators: list['FrontendActivatorConfig'] | None
23
- additionalText: str | None
24
- value: Any | None
25
- placeholder: str | None
26
- options: list['FrontendConfigOption'] | None
27
- mask: FrontendConfigTextMask | None
28
- controls: list['FrontendControlConfig'] | None
29
- showSearch: bool | None
30
- sliderOptions: FrontendConfigSliderOption | None
31
- customLabel: list[str] | None
32
- control: FrontendControlConfig | None
33
- entityType: str | None
34
- @classmethod
35
- def validate_value_in_options_type(cls, value: Any) -> Any: ...
@@ -1,9 +0,0 @@
1
- from amsdal.contrib.frontend_configs.models.frontend_control_config import *
2
- from amsdal_models.classes.model import Model
3
- from amsdal_utils.models.enums import ModuleType
4
- from typing import ClassVar
5
-
6
- class FrontendModelConfig(Model):
7
- __module_type__: ClassVar[ModuleType] = ...
8
- class_name: str = ...
9
- control: FrontendControlConfig | None = ...
@@ -1,9 +0,0 @@
1
- from amsdal_models.builder.validators.dict_validators import validate_non_empty_keys as validate_non_empty_keys
2
- from amsdal_models.builder.validators.options_validators import validate_options as validate_options
3
- from amsdal_models.classes.data_models.constraints import UniqueConstraint as UniqueConstraint
4
- from amsdal_models.classes.data_models.indexes import IndexInfo as IndexInfo
5
- from amsdal_models.classes.model import Model as Model, TypeModel as TypeModel
6
- from amsdal_models.classes.relationships.many_reference_field import ManyReferenceField as ManyReferenceField
7
- from amsdal_models.classes.relationships.reference_field import ReferenceField as ReferenceField
8
-
9
- __all__ = ['IndexInfo', 'ManyReferenceField', 'Model', 'ReferenceField', 'TypeModel', 'UniqueConstraint', 'validate_non_empty_keys', 'validate_options']
@@ -1,24 +0,0 @@
1
- from amsdal.models.core.class_property import *
2
- from amsdal_models.classes.model import Model
3
- from amsdal_utils.models.enums import ModuleType
4
- from typing import Any, ClassVar
5
-
6
- class ClassObject(Model):
7
- __module_type__: ClassVar[ModuleType] = ...
8
- properties: dict[str, ClassProperty | None] | None = ...
9
- table_name: str | None = ...
10
- primary_key: list[str] | None = ...
11
- indexed: list[str] | None = ...
12
- unique: list[list[str]] | None = ...
13
- required: list[str] | None = ...
14
- meta_class: str | None = ...
15
- @classmethod
16
- def _non_empty_keys_properties(cls, value: Any) -> Any: ...
17
- @property
18
- def display_name(self) -> str:
19
- """
20
- Returns the display name of the object.
21
-
22
- Returns:
23
- str: The display name, which is the title of the object.
24
- """
@@ -1,26 +0,0 @@
1
- from typing import Any
2
- from typing import ClassVar
3
- from typing import Optional
4
-
5
- from amsdal_models.builder.validators.dict_validators import validate_non_empty_keys
6
- from amsdal_models.classes.model import Model
7
- from amsdal_utils.models.enums import ModuleType
8
- from pydantic.fields import Field
9
- from pydantic.functional_validators import field_validator
10
-
11
- from amsdal.models.core.class_property_meta import * # noqa: F403
12
-
13
-
14
- class ClassObjectMeta(Model):
15
- __module_type__: ClassVar[ModuleType] = ModuleType.CORE
16
- title: str = Field(title='Title')
17
- type: str = Field(title='Type')
18
- default: Any | None = Field(None, title='Default')
19
- class_schema_type: str | None = Field(None, title='Schema Type')
20
- properties: dict[str, Optional['ClassPropertyMeta']] | None = Field(None, title='Properties') # noqa: F405
21
- custom_code: str | None = Field(None, title='Custom Code')
22
-
23
- @field_validator('properties')
24
- @classmethod
25
- def _non_empty_keys_properties(cls: type, value: Any) -> Any: # type: ignore # noqa: A003
26
- return validate_non_empty_keys(value)
@@ -1,15 +0,0 @@
1
- from amsdal.models.core.class_property_meta import *
2
- from amsdal_models.classes.model import Model
3
- from amsdal_utils.models.enums import ModuleType
4
- from typing import Any, ClassVar
5
-
6
- class ClassObjectMeta(Model):
7
- __module_type__: ClassVar[ModuleType] = ...
8
- title: str = ...
9
- type: str = ...
10
- default: Any | None = ...
11
- class_schema_type: str | None = ...
12
- properties: dict[str, ClassPropertyMeta | None] | None = ...
13
- custom_code: str | None = ...
14
- @classmethod
15
- def _non_empty_keys_properties(cls, value: Any) -> Any: ...
@@ -1,11 +0,0 @@
1
- from amsdal_models.classes.model import TypeModel
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import Any, ClassVar
4
-
5
- class ClassProperty(TypeModel):
6
- __module_type__: ClassVar[ModuleType]
7
- type: str
8
- items: dict[str, Any | None] | None
9
- db_field: list[str] | None
10
- @classmethod
11
- def _non_empty_keys_items(cls, value: Any) -> Any: ...
@@ -1,15 +0,0 @@
1
- from typing import Any
2
- from typing import ClassVar
3
-
4
- from amsdal_models.classes.model import TypeModel
5
- from amsdal_utils.models.enums import ModuleType
6
- from pydantic.fields import Field
7
-
8
- from amsdal.models.core.option import * # noqa: F403
9
-
10
-
11
- class ClassPropertyMeta(TypeModel):
12
- __module_type__: ClassVar[ModuleType] = ModuleType.CORE
13
- title: str | None = Field(None, title='Title')
14
- default: Any | None = Field(None, title='Default')
15
- options: list['Option'] | None = Field(None, title='Options') # noqa: F405
@@ -1,10 +0,0 @@
1
- from amsdal.models.core.option import *
2
- from amsdal_models.classes.model import TypeModel
3
- from amsdal_utils.models.enums import ModuleType
4
- from typing import Any, ClassVar
5
-
6
- class ClassPropertyMeta(TypeModel):
7
- __module_type__: ClassVar[ModuleType]
8
- title: str | None
9
- default: Any | None
10
- options: list['Option'] | None
@@ -1,104 +0,0 @@
1
- from amsdal_models.classes.model import Model
2
- from amsdal_utils.models.enums import ModuleType
3
- from pathlib import Path
4
- from typing import BinaryIO, ClassVar
5
-
6
- class File(Model):
7
- __module_type__: ClassVar[ModuleType] = ...
8
- filename: str = ...
9
- data: bytes = ...
10
- size: float | None = ...
11
- def __repr__(self) -> str: ...
12
- def __str__(self) -> str: ...
13
- async def apre_create(self) -> None:
14
- """
15
- Prepares the object for creation by setting its size attribute.
16
-
17
- This method calculates the size of the object's data and assigns it to the size attribute.
18
- If the data is None, it defaults to an empty byte string.
19
-
20
- Args:
21
- None
22
- """
23
- async def apre_update(self) -> None:
24
- """
25
- Prepares the object for update by setting its size attribute.
26
-
27
- This method calculates the size of the object's data and assigns it to the size attribute.
28
- If the data is None, it defaults to an empty byte string.
29
-
30
- Args:
31
- None
32
- """
33
- @classmethod
34
- def data_base64_decode(cls, v: bytes) -> bytes:
35
- """
36
- Decodes a base64-encoded byte string if it is base64-encoded.
37
-
38
- This method checks if the provided byte string is base64-encoded and decodes it if true.
39
- If the byte string is not base64-encoded, it returns the original byte string.
40
-
41
- Args:
42
- cls: The class this method belongs to.
43
- v (bytes): The byte string to be checked and potentially decoded.
44
-
45
- Returns:
46
- bytes: The decoded byte string if it was base64-encoded, otherwise the original byte string.
47
- """
48
- @classmethod
49
- def from_file(cls, file_or_path: Path | BinaryIO) -> File:
50
- """
51
- Creates a `File` object from a file path or a binary file object.
52
-
53
- Args:
54
- file_or_path (Path | BinaryIO): The file path or binary file object.
55
-
56
- Returns:
57
- File: The created `File` object.
58
-
59
- Raises:
60
- ValueError: If the provided path is a directory.
61
- """
62
- @property
63
- def mimetype(self) -> str | None:
64
- """
65
- Returns the MIME type of the file based on its filename.
66
-
67
- This method uses the `mimetypes` module to guess the MIME type of the file.
68
-
69
- Returns:
70
- str | None: The guessed MIME type of the file, or None if it cannot be determined.
71
- """
72
- def pre_create(self) -> None:
73
- """
74
- Prepares the object for creation by setting its size attribute.
75
-
76
- This method calculates the size of the object's data and assigns it to the size attribute.
77
- If the data is None, it defaults to an empty byte string.
78
-
79
- Args:
80
- None
81
- """
82
- def pre_update(self) -> None:
83
- """
84
- Prepares the object for update by setting its size attribute.
85
-
86
- This method calculates the size of the object's data and assigns it to the size attribute.
87
- If the data is None, it defaults to an empty byte string.
88
-
89
- Args:
90
- None
91
- """
92
- def to_file(self, file_or_path: Path | BinaryIO) -> None:
93
- """
94
- Writes the object's data to a file path or a binary file object.
95
-
96
- Args:
97
- file_or_path (Path | BinaryIO): The file path or binary file object where the data will be written.
98
-
99
- Returns:
100
- None
101
-
102
- Raises:
103
- ValueError: If the provided path is a directory.
104
- """
@@ -1,14 +0,0 @@
1
- from amsdal_models.classes.data_models.constraints import UniqueConstraint
2
- from amsdal_models.classes.model import Model
3
- from amsdal_utils.models.enums import ModuleType
4
- from typing import Any, ClassVar
5
-
6
- class Fixture(Model):
7
- __module_type__: ClassVar[ModuleType] = ...
8
- __constraints__: ClassVar[list[UniqueConstraint]] = ...
9
- class_name: str | None = ...
10
- order: float | None = ...
11
- external_id: str = ...
12
- data: dict[str, Any | None] = ...
13
- @classmethod
14
- def _non_empty_keys_data(cls, value: Any) -> Any: ...
@@ -1,8 +0,0 @@
1
- from amsdal_models.classes.model import TypeModel
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import ClassVar
4
-
5
- class Option(TypeModel):
6
- __module_type__: ClassVar[ModuleType]
7
- key: str
8
- value: str
@@ -1,8 +0,0 @@
1
- from amsdal_models.classes.model import TypeModel
2
- from amsdal_utils.models.enums import ModuleType
3
- from typing import Any, ClassVar
4
-
5
- class Validator(TypeModel):
6
- __module_type__: ClassVar[ModuleType]
7
- name: str
8
- data: Any