amsdal 0.1.0__cp311-cp311-win_amd64.whl → 0.1.2__cp311-cp311-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (95) hide show
  1. amsdal/__about__.py +1 -1
  2. amsdal/__migrations__/0000_initial.py +203 -0
  3. amsdal/cloud/__init__.cp311-win_amd64.pyd +0 -0
  4. amsdal/cloud/client.cp311-win_amd64.pyd +0 -0
  5. amsdal/cloud/constants.cp311-win_amd64.pyd +0 -0
  6. amsdal/cloud/enums.cp311-win_amd64.pyd +0 -0
  7. amsdal/cloud/models/__init__.cp311-win_amd64.pyd +0 -0
  8. amsdal/cloud/models/base.cp311-win_amd64.pyd +0 -0
  9. amsdal/cloud/services/__init__.cp311-win_amd64.pyd +0 -0
  10. amsdal/cloud/services/actions/__init__.cp311-win_amd64.pyd +0 -0
  11. amsdal/cloud/services/actions/add_dependency.cp311-win_amd64.pyd +0 -0
  12. amsdal/cloud/services/actions/add_secret.cp311-win_amd64.pyd +0 -0
  13. amsdal/cloud/services/actions/base.cp311-win_amd64.pyd +0 -0
  14. amsdal/cloud/services/actions/create_deploy.cp311-win_amd64.pyd +0 -0
  15. amsdal/cloud/services/actions/create_session.cp311-win_amd64.pyd +0 -0
  16. amsdal/cloud/services/actions/delete_dependency.cp311-win_amd64.pyd +0 -0
  17. amsdal/cloud/services/actions/delete_secret.cp311-win_amd64.pyd +0 -0
  18. amsdal/cloud/services/actions/destroy_deploy.cp311-win_amd64.pyd +0 -0
  19. amsdal/cloud/services/actions/expose_db.cp311-win_amd64.pyd +0 -0
  20. amsdal/cloud/services/actions/list_dependencies.cp311-win_amd64.pyd +0 -0
  21. amsdal/cloud/services/actions/list_deploys.cp311-win_amd64.pyd +0 -0
  22. amsdal/cloud/services/actions/list_secrets.cp311-win_amd64.pyd +0 -0
  23. amsdal/cloud/services/actions/manager.cp311-win_amd64.pyd +0 -0
  24. amsdal/cloud/services/actions/signup_action.cp311-win_amd64.pyd +0 -0
  25. amsdal/cloud/services/actions/update_deploy.cp311-win_amd64.pyd +0 -0
  26. amsdal/cloud/services/auth/__init__.cp311-win_amd64.pyd +0 -0
  27. amsdal/cloud/services/auth/base.cp311-win_amd64.pyd +0 -0
  28. amsdal/cloud/services/auth/credentials.cp311-win_amd64.pyd +0 -0
  29. amsdal/cloud/services/auth/manager.cp311-win_amd64.pyd +0 -0
  30. amsdal/cloud/services/auth/signup_service.cp311-win_amd64.pyd +0 -0
  31. amsdal/cloud/services/auth/token.cp311-win_amd64.pyd +0 -0
  32. amsdal/contrib/__init__.cp311-win_amd64.pyd +0 -0
  33. amsdal/contrib/auth/migrations/0000_initial.py +49 -0
  34. amsdal/contrib/auth/models/login_session/hooks/pre_init.py +51 -0
  35. amsdal/contrib/auth/models/login_session/model.json +23 -0
  36. amsdal/contrib/auth/models/login_session/modifiers/display_name.py +3 -0
  37. amsdal/contrib/auth/models/permission/fixtures/basic_permissions.json +62 -0
  38. amsdal/contrib/auth/models/permission/model.json +18 -0
  39. amsdal/contrib/auth/models/permission/modifiers/display_name.py +3 -0
  40. amsdal/contrib/auth/models/user/hooks/pre_create.py +2 -0
  41. amsdal/contrib/auth/models/user/hooks/pre_init.py +25 -0
  42. amsdal/contrib/auth/models/user/model.json +25 -0
  43. amsdal/contrib/auth/models/user/modifiers/display_name.py +11 -0
  44. amsdal/contrib/frontend_configs/migrations/0000_initial.py +255 -0
  45. amsdal/contrib/frontend_configs/models/frontend_activator_config/model.json +11 -0
  46. amsdal/contrib/frontend_configs/models/frontend_config_async_validator/model.json +11 -0
  47. amsdal/contrib/frontend_configs/models/frontend_config_group_validator/model.json +52 -0
  48. amsdal/contrib/frontend_configs/models/frontend_config_option/model.json +15 -0
  49. amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/model.json +6 -0
  50. amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/properties/model_dump.py +13 -0
  51. amsdal/contrib/frontend_configs/models/frontend_config_slider_option/model.json +19 -0
  52. amsdal/contrib/frontend_configs/models/frontend_config_text_mask/model.json +26 -0
  53. amsdal/contrib/frontend_configs/models/frontend_config_validator/model.json +41 -0
  54. amsdal/contrib/frontend_configs/models/frontend_control_config/model.json +250 -0
  55. amsdal/contrib/frontend_configs/models/frontend_model_config/model.json +17 -0
  56. amsdal/contrib/frontend_configs/models/frontent_config_control_action/model.json +54 -0
  57. amsdal/contrib/frontend_configs/models/frontent_config_control_action/properties/action_validate.py +17 -0
  58. amsdal/fixtures/__init__.cp311-win_amd64.pyd +0 -0
  59. amsdal/fixtures/manager.cp311-win_amd64.pyd +0 -0
  60. amsdal/manager.cp311-win_amd64.pyd +0 -0
  61. amsdal/migration/__init__.cp311-win_amd64.pyd +0 -0
  62. amsdal/migration/base_migration_schemas.cp311-win_amd64.pyd +0 -0
  63. amsdal/migration/base_migration_schemas.pyi +2 -2
  64. amsdal/migration/data_classes.cp311-win_amd64.pyd +0 -0
  65. amsdal/migration/executors/__init__.cp311-win_amd64.pyd +0 -0
  66. amsdal/migration/executors/base.cp311-win_amd64.pyd +0 -0
  67. amsdal/migration/executors/default_executor.cp311-win_amd64.pyd +0 -0
  68. amsdal/migration/executors/state_executor.cp311-win_amd64.pyd +0 -0
  69. amsdal/migration/file_migration_executor.cp311-win_amd64.pyd +0 -0
  70. amsdal/migration/file_migration_generator.cp311-win_amd64.pyd +0 -0
  71. amsdal/migration/file_migration_store.cp311-win_amd64.pyd +0 -0
  72. amsdal/migration/file_migration_writer.cp311-win_amd64.pyd +0 -0
  73. amsdal/migration/migrations.cp311-win_amd64.pyd +0 -0
  74. amsdal/migration/migrations_loader.cp311-win_amd64.pyd +0 -0
  75. amsdal/migration/schemas_loaders.cp311-win_amd64.pyd +0 -0
  76. amsdal/migration/templates/data_migration.tmpl +18 -0
  77. amsdal/migration/templates/dict_validator.tmpl +4 -0
  78. amsdal/migration/templates/migration.tmpl +6 -0
  79. amsdal/migration/templates/model_class.tmpl +8 -0
  80. amsdal/migration/templates/model_class_layout.tmpl +21 -0
  81. amsdal/migration/templates/options_validator.tmpl +4 -0
  82. amsdal/migration/utils.cp311-win_amd64.pyd +0 -0
  83. amsdal/mixins/__init__.cp311-win_amd64.pyd +0 -0
  84. amsdal/mixins/build_mixin.cp311-win_amd64.pyd +0 -0
  85. amsdal/mixins/class_versions_mixin.cp311-win_amd64.pyd +0 -0
  86. amsdal/operations/__init__.cp311-win_amd64.pyd +0 -0
  87. amsdal/operations/manager.cp311-win_amd64.pyd +0 -0
  88. amsdal/schemas/manager.cp311-win_amd64.pyd +0 -0
  89. amsdal/services/__init__.cp311-win_amd64.pyd +0 -0
  90. amsdal/services/transaction_execution.cp311-win_amd64.pyd +0 -0
  91. {amsdal-0.1.0.dist-info → amsdal-0.1.2.dist-info}/METADATA +1 -1
  92. {amsdal-0.1.0.dist-info → amsdal-0.1.2.dist-info}/RECORD +95 -63
  93. {amsdal-0.1.0.dist-info → amsdal-0.1.2.dist-info}/LICENSE.txt +0 -0
  94. {amsdal-0.1.0.dist-info → amsdal-0.1.2.dist-info}/WHEEL +0 -0
  95. {amsdal-0.1.0.dist-info → amsdal-0.1.2.dist-info}/top_level.txt +0 -0
@@ -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,17 @@
1
+ {
2
+ "title": "FrontendModelConfig",
3
+ "type": "object",
4
+ "properties": {
5
+ "class_name": {
6
+ "title": "Class Name",
7
+ "type": "string"
8
+ },
9
+ "control": {
10
+ "title": "Control",
11
+ "type": "FrontendControlConfig"
12
+ }
13
+ },
14
+ "required": [
15
+ "class_name"
16
+ ]
17
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "title": "FrontendConfigControlAction",
3
+ "type": "FrontendConfigSkipNoneBase",
4
+ "properties": {
5
+ "action": {
6
+ "title": "Action",
7
+ "type": "string"
8
+ },
9
+ "text": {
10
+ "title": "Text",
11
+ "type": "string"
12
+ },
13
+ "type": {
14
+ "title": "Type",
15
+ "type": "string",
16
+ "options": [
17
+ {
18
+ "key": "Arrow Next",
19
+ "value": "arrow-next"
20
+ },
21
+ {
22
+ "key": "Arrow Prev",
23
+ "value": "arrow-prev"
24
+ },
25
+ {
26
+ "key": "Action Button",
27
+ "value": "action-button"
28
+ },
29
+ {
30
+ "key": "Text Next",
31
+ "value": "text-next"
32
+ },
33
+ {
34
+ "key": "Text Prev",
35
+ "value": "text-prev"
36
+ }
37
+ ]
38
+ },
39
+ "dataLayerEvent": {
40
+ "title": "Data Layer Event",
41
+ "type": "string"
42
+ },
43
+ "activator": {
44
+ "title": "Activator",
45
+ "type": "string"
46
+ },
47
+ "icon": {
48
+ "title": "Icon",
49
+ "type": "string"
50
+ }
51
+ },
52
+ "required": ["action", "text", "type"],
53
+ "meta_class": "TypeMeta"
54
+ }
@@ -0,0 +1,17 @@
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
+ if not v.startswith('navigate::') and v not in [
8
+ 'goPrev',
9
+ 'goNext',
10
+ 'goNextWithSubmit',
11
+ 'submit',
12
+ 'submitWithDataLayer',
13
+ ]:
14
+ msg = 'Action must be one of: goPrev, goNext, goNextWithSubmit, submit, submitWithDataLayer, navigate::{string}'
15
+ raise ValueError(msg)
16
+
17
+ return v
Binary file
Binary file
@@ -5,7 +5,7 @@ from amsdal.configs.constants import BASE_DIR as BASE_DIR
5
5
  from amsdal_models.classes.model import Model
6
6
  from amsdal_models.schemas.data_models.core import DictSchema, LegacyDictSchema, TypeData
7
7
  from amsdal_models.schemas.data_models.schema import ObjectSchema, PropertyData
8
- from amsdal_utils.models.enums import SchemaTypes as SchemaTypes
8
+ from amsdal_utils.models.enums import SchemaTypes as SchemaTypes, Versions
9
9
  from pathlib import Path
10
10
 
11
11
  class BaseMigrationSchemas(ABC, metaclass=abc.ABCMeta):
@@ -21,7 +21,7 @@ class BaseMigrationSchemas(ABC, metaclass=abc.ABCMeta):
21
21
  @abstractmethod
22
22
  def compile_buffered_classes(self) -> None: ...
23
23
  @staticmethod
24
- def register_model_version(class_name: str, class_version: str) -> None: ...
24
+ def register_model_version(class_name: str, class_version: str | Versions) -> None: ...
25
25
 
26
26
  class DefaultMigrationSchemas(BaseMigrationSchemas):
27
27
  model_class_template_layout: Path
@@ -0,0 +1,18 @@
1
+ from amsdal.migration import migrations
2
+
3
+
4
+ def forward_migration(schemas: migrations.MigrationSchemas) -> None:
5
+ ...
6
+
7
+
8
+ def backward_migration(schemas: migrations.MigrationSchemas) -> None:
9
+ ...
10
+
11
+
12
+ class Migration(migrations.Migration):
13
+ operations: list[migrations.Operation] = [
14
+ migrations.MigrateData(
15
+ forward_migration=forward_migration,
16
+ backward_migration=backward_migration,
17
+ ),
18
+ ]
@@ -0,0 +1,4 @@
1
+ @field_validator('{{property_name}}')
2
+ @classmethod
3
+ def _non_empty_keys_properties_{{property_name}}(cls: type, value: Any) -> Any:
4
+ return validate_non_empty_keys(value)
@@ -0,0 +1,6 @@
1
+ from amsdal.migration import migrations
2
+ from amsdal_utils.models.enums import SchemaTypes
3
+
4
+
5
+ class Migration(migrations.Migration):
6
+ operations: list[migrations.Operation] = [{{operations}}]
@@ -0,0 +1,8 @@
1
+ class {{class_name}}({{class_inheritance}}):
2
+ schema_type: ClassVar[SchemaTypes] = {{schema_type}}
3
+ class_fingerprint: ClassVar[str] = '{{class_fingerprint}}'
4
+ {{properties}}
5
+
6
+ {{validators}}
7
+
8
+ {{custom_code}}
@@ -0,0 +1,21 @@
1
+ from typing import ClassVar
2
+ from typing import Optional
3
+ from typing import Union
4
+ from typing import List
5
+ from typing import Dict
6
+ from typing import Any
7
+
8
+ from amsdal_models.classes.builder.validators.dict_validators import validate_non_empty_keys
9
+ from amsdal_models.classes.builder.validators.options_validators import validate_options
10
+ from amsdal_models.classes.model import LegacyModel
11
+ from amsdal_models.classes.model import Model
12
+ from amsdal_models.classes.model import TypeModel
13
+ from amsdal_utils.models.data_models.reference import Reference
14
+ from amsdal_utils.models.enums import SchemaTypes
15
+ from pydantic.functional_validators import field_validator
16
+
17
+ {{imports}}
18
+
19
+ {{classes}}
20
+
21
+ {{classes_model_rebuild}}
@@ -0,0 +1,4 @@
1
+ @field_validator('{{property_name}}')
2
+ @classmethod
3
+ def validate_value_in_options_condition_{{property_name}}(cls: type, value: Any) -> Any:
4
+ return validate_options(value, options={{property_options}})
Binary file
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: amsdal
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: AMSDAL
5
5
  License: AMSDAL End User License Agreement
6
6