UncountablePythonSDK 0.0.7__py3-none-any.whl → 0.0.9__py3-none-any.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 UncountablePythonSDK might be problematic. Click here for more details.
- {UncountablePythonSDK-0.0.7.dist-info → UncountablePythonSDK-0.0.9.dist-info}/METADATA +4 -2
- UncountablePythonSDK-0.0.9.dist-info/RECORD +145 -0
- pkgs/argument_parser/argument_parser.py +2 -2
- pkgs/serialization/missing_sentry.py +1 -1
- pkgs/serialization_util/serialization_helpers.py +3 -0
- pkgs/type_spec/emit_open_api.py +34 -17
- pkgs/type_spec/emit_open_api_util.py +4 -9
- pkgs/type_spec/emit_python.py +8 -5
- pkgs/type_spec/open_api_util.py +13 -12
- type_spec/external/api/entity/create_entities.yaml +1 -1
- type_spec/external/api/entity/create_entity.yaml +1 -1
- type_spec/external/api/entity/get_entities_data.yaml +4 -30
- type_spec/external/api/entity/list_entities.yaml +4 -14
- type_spec/external/api/entity/resolve_entity_ids.yaml +2 -2
- type_spec/external/api/entity/set_values.yaml +3 -30
- type_spec/external/api/input_groups/get_input_group_names.yaml +2 -2
- type_spec/external/api/inputs/create_inputs.yaml +6 -19
- type_spec/external/api/inputs/get_input_data.yaml +11 -24
- type_spec/external/api/inputs/get_input_names.yaml +4 -4
- type_spec/external/api/inputs/get_inputs_data.yaml +7 -20
- type_spec/external/api/inputs/set_input_attribute_values.yaml +3 -7
- type_spec/external/api/outputs/get_output_data.yaml +9 -20
- type_spec/external/api/outputs/get_output_names.yaml +2 -2
- type_spec/external/api/project/get_projects.yaml +6 -16
- type_spec/external/api/project/get_projects_data.yaml +10 -46
- type_spec/external/api/recipe_metadata/get_recipe_metadata_data.yaml +5 -5
- type_spec/external/api/recipes/create_recipes.yaml +5 -18
- type_spec/external/api/recipes/get_curve.yaml +2 -34
- type_spec/external/api/recipes/get_recipe_calculations.yaml +7 -17
- type_spec/external/api/recipes/get_recipe_links.yaml +1 -1
- type_spec/external/api/recipes/get_recipe_names.yaml +2 -2
- type_spec/external/api/recipes/get_recipe_output_metadata.yaml +4 -17
- type_spec/external/api/recipes/get_recipes_data.yaml +31 -165
- type_spec/external/api/recipes/set_recipe_inputs.yaml +3 -3
- type_spec/external/api/recipes/set_recipe_outputs.yaml +4 -8
- uncountable/integration/__init__.py +0 -0
- uncountable/integration/construct_client.py +30 -0
- uncountable/integration/cron.py +29 -0
- uncountable/integration/db/__init__.py +0 -0
- uncountable/integration/db/connect.py +8 -0
- uncountable/integration/entrypoint.py +41 -0
- uncountable/integration/executors/__init__.py +0 -0
- uncountable/integration/executors/script_executor.py +18 -0
- uncountable/integration/job.py +39 -0
- uncountable/integration/server.py +86 -0
- uncountable/integration/types.py +89 -0
- uncountable/types/__init__.py +30 -0
- uncountable/types/api/entity/create_entities.py +2 -1
- uncountable/types/api/entity/create_entity.py +1 -1
- uncountable/types/api/entity/get_entities_data.py +6 -26
- uncountable/types/api/entity/list_entities.py +5 -12
- uncountable/types/api/entity/resolve_entity_ids.py +4 -2
- uncountable/types/api/entity/set_values.py +7 -29
- uncountable/types/api/input_groups/get_input_group_names.py +3 -2
- uncountable/types/api/inputs/create_inputs.py +8 -20
- uncountable/types/api/inputs/get_input_data.py +12 -25
- uncountable/types/api/inputs/get_input_names.py +5 -4
- uncountable/types/api/inputs/get_inputs_data.py +8 -21
- uncountable/types/api/inputs/set_input_attribute_values.py +5 -7
- uncountable/types/api/outputs/get_output_data.py +10 -17
- uncountable/types/api/outputs/get_output_names.py +3 -2
- uncountable/types/api/project/get_projects.py +8 -14
- uncountable/types/api/project/get_projects_data.py +13 -40
- uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py +6 -5
- uncountable/types/api/recipes/create_recipes.py +6 -18
- uncountable/types/api/recipes/get_curve.py +4 -26
- uncountable/types/api/recipes/get_recipe_calculations.py +8 -15
- uncountable/types/api/recipes/get_recipe_links.py +2 -1
- uncountable/types/api/recipes/get_recipe_names.py +3 -2
- uncountable/types/api/recipes/get_recipe_output_metadata.py +5 -13
- uncountable/types/api/recipes/get_recipes_data.py +36 -122
- uncountable/types/api/recipes/set_recipe_inputs.py +4 -3
- uncountable/types/api/recipes/set_recipe_outputs.py +7 -8
- uncountable/types/calculations.py +23 -0
- uncountable/types/client_base.py +43 -43
- uncountable/types/curves.py +47 -0
- uncountable/types/entity.py +4 -1
- uncountable/types/experiment_groups.py +23 -0
- uncountable/types/field_values.py +37 -0
- uncountable/types/fields.py +24 -0
- uncountable/types/input_attributes.py +29 -0
- uncountable/types/inputs.py +61 -0
- uncountable/types/outputs.py +26 -0
- uncountable/types/phases.py +23 -0
- uncountable/types/recipe_links.py +3 -2
- uncountable/types/recipe_metadata.py +50 -0
- uncountable/types/recipe_output_metadata.py +24 -0
- uncountable/types/recipe_tags.py +23 -0
- uncountable/types/response.py +25 -0
- uncountable/types/units.py +23 -0
- uncountable/types/users.py +24 -0
- uncountable/types/workflows.py +32 -0
- UncountablePythonSDK-0.0.7.dist-info/RECORD +0 -119
- {UncountablePythonSDK-0.0.7.dist-info → UncountablePythonSDK-0.0.9.dist-info}/WHEEL +0 -0
- {UncountablePythonSDK-0.0.7.dist-info → UncountablePythonSDK-0.0.9.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# TODO: move to type spec
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
from enum import StrEnum
|
|
6
|
+
from typing import Literal
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class JobDefinitionType(StrEnum):
|
|
10
|
+
CRON = "cron"
|
|
11
|
+
# also imagine other job types like webhook-triggered or sftp-triggered,
|
|
12
|
+
# manual, etc
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class JobExecutorType(StrEnum):
|
|
16
|
+
SCRIPT = "script"
|
|
17
|
+
# also imagine builtin executors like 'sftp_sync'
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class AuthRetrievalType(StrEnum):
|
|
21
|
+
ENV = "env"
|
|
22
|
+
# also imagine secrets manager, keyvault, etc
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass
|
|
26
|
+
class JobExecutorBase:
|
|
27
|
+
type: JobExecutorType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@dataclass
|
|
31
|
+
class JobExecutorScript(JobExecutorBase):
|
|
32
|
+
type: Literal[JobExecutorType.SCRIPT]
|
|
33
|
+
import_path: str
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
JobExecutor = JobExecutorScript
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@dataclass
|
|
40
|
+
class JobDefinitionBase:
|
|
41
|
+
id: str
|
|
42
|
+
name: str
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@dataclass
|
|
46
|
+
class CronJobDefinition(JobDefinitionBase):
|
|
47
|
+
type: Literal[JobDefinitionType.CRON]
|
|
48
|
+
cron_spec: str
|
|
49
|
+
# Here we assert that the executor has to be a script, but we could add
|
|
50
|
+
# other builtin executor types that cron jobs can support later
|
|
51
|
+
executor: JobExecutorScript
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
JobDefinition = CronJobDefinition
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@dataclass
|
|
58
|
+
class AuthRetrievalBase:
|
|
59
|
+
type: AuthRetrievalType
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
@dataclass
|
|
63
|
+
class AuthRetrievalEnv:
|
|
64
|
+
# We don't really need any extra info here, we can enforce that the auth
|
|
65
|
+
# keys are named like UNC_PROFILE_{profile name}_API_SECRET_KEY. For
|
|
66
|
+
# supporting pulling secrets from secrets manager etc it will be nice to
|
|
67
|
+
# use dataclass properties to get the secret name, region etc.
|
|
68
|
+
type: Literal[AuthRetrievalType.ENV]
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
AuthRetrieval = AuthRetrievalEnv
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@dataclass
|
|
75
|
+
class ProfileDefinition:
|
|
76
|
+
# profile name (expected to be something like customer_name) will be
|
|
77
|
+
# obtained from the folder name instead of specified here. Forces jobs to
|
|
78
|
+
# be organized nicely in folders that separate their identities.
|
|
79
|
+
auth_retrieval: AuthRetrieval
|
|
80
|
+
base_url: str
|
|
81
|
+
jobs: list[JobDefinition]
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@dataclass
|
|
85
|
+
class ProfileMetadata:
|
|
86
|
+
# supplied by inspecting the folder name that the profile is in
|
|
87
|
+
name: str
|
|
88
|
+
base_url: str
|
|
89
|
+
auth_retrieval: AuthRetrieval
|
uncountable/types/__init__.py
CHANGED
|
@@ -4,13 +4,17 @@
|
|
|
4
4
|
# fmt: off
|
|
5
5
|
# isort: skip_file
|
|
6
6
|
from . import base as base_t
|
|
7
|
+
from . import calculations as calculations_t
|
|
7
8
|
from .api.entity import create_entities as create_entities_t
|
|
8
9
|
from .api.entity import create_entity as create_entity_t
|
|
9
10
|
from .api.inputs import create_inputs as create_inputs_t
|
|
10
11
|
from .api.recipes import create_recipes as create_recipes_t
|
|
12
|
+
from . import curves as curves_t
|
|
11
13
|
from . import entity as entity_t
|
|
12
14
|
from .api.batch import execute_batch as execute_batch_t
|
|
15
|
+
from . import experiment_groups as experiment_groups_t
|
|
13
16
|
from . import field_values as field_values_t
|
|
17
|
+
from . import fields as fields_t
|
|
14
18
|
from .api.recipes import get_curve as get_curve_t
|
|
15
19
|
from .api.entity import get_entities_data as get_entities_data_t
|
|
16
20
|
from .api.inputs import get_input_data as get_input_data_t
|
|
@@ -27,25 +31,40 @@ from .api.recipe_metadata import get_recipe_metadata_data as get_recipe_metadata
|
|
|
27
31
|
from .api.recipes import get_recipe_names as get_recipe_names_t
|
|
28
32
|
from .api.recipes import get_recipe_output_metadata as get_recipe_output_metadata_t
|
|
29
33
|
from .api.recipes import get_recipes_data as get_recipes_data_t
|
|
34
|
+
from . import input_attributes as input_attributes_t
|
|
35
|
+
from . import inputs as inputs_t
|
|
30
36
|
from .api.entity import list_entities as list_entities_t
|
|
37
|
+
from . import outputs as outputs_t
|
|
38
|
+
from . import phases as phases_t
|
|
31
39
|
from . import recipe_links as recipe_links_t
|
|
40
|
+
from . import recipe_metadata as recipe_metadata_t
|
|
41
|
+
from . import recipe_output_metadata as recipe_output_metadata_t
|
|
42
|
+
from . import recipe_tags as recipe_tags_t
|
|
32
43
|
from .api.entity import resolve_entity_ids as resolve_entity_ids_t
|
|
33
44
|
from .api.outputs import resolve_output_conditions as resolve_output_conditions_t
|
|
45
|
+
from . import response as response_t
|
|
34
46
|
from .api.inputs import set_input_attribute_values as set_input_attribute_values_t
|
|
35
47
|
from .api.recipes import set_recipe_inputs as set_recipe_inputs_t
|
|
36
48
|
from .api.recipes import set_recipe_outputs as set_recipe_outputs_t
|
|
37
49
|
from .api.entity import set_values as set_values_t
|
|
50
|
+
from . import units as units_t
|
|
51
|
+
from . import users as users_t
|
|
52
|
+
from . import workflows as workflows_t
|
|
38
53
|
|
|
39
54
|
|
|
40
55
|
__all__: list[str] = [
|
|
41
56
|
"base_t",
|
|
57
|
+
"calculations_t",
|
|
42
58
|
"create_entities_t",
|
|
43
59
|
"create_entity_t",
|
|
44
60
|
"create_inputs_t",
|
|
45
61
|
"create_recipes_t",
|
|
62
|
+
"curves_t",
|
|
46
63
|
"entity_t",
|
|
47
64
|
"execute_batch_t",
|
|
65
|
+
"experiment_groups_t",
|
|
48
66
|
"field_values_t",
|
|
67
|
+
"fields_t",
|
|
49
68
|
"get_curve_t",
|
|
50
69
|
"get_entities_data_t",
|
|
51
70
|
"get_input_data_t",
|
|
@@ -62,12 +81,23 @@ __all__: list[str] = [
|
|
|
62
81
|
"get_recipe_names_t",
|
|
63
82
|
"get_recipe_output_metadata_t",
|
|
64
83
|
"get_recipes_data_t",
|
|
84
|
+
"input_attributes_t",
|
|
85
|
+
"inputs_t",
|
|
65
86
|
"list_entities_t",
|
|
87
|
+
"outputs_t",
|
|
88
|
+
"phases_t",
|
|
66
89
|
"recipe_links_t",
|
|
90
|
+
"recipe_metadata_t",
|
|
91
|
+
"recipe_output_metadata_t",
|
|
92
|
+
"recipe_tags_t",
|
|
67
93
|
"resolve_entity_ids_t",
|
|
68
94
|
"resolve_output_conditions_t",
|
|
95
|
+
"response_t",
|
|
69
96
|
"set_input_attribute_values_t",
|
|
70
97
|
"set_recipe_inputs_t",
|
|
71
98
|
"set_recipe_outputs_t",
|
|
72
99
|
"set_values_t",
|
|
100
|
+
"units_t",
|
|
101
|
+
"users_t",
|
|
102
|
+
"workflows_t",
|
|
73
103
|
]
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
from dataclasses import dataclass
|
|
11
|
+
from ... import base as base_t
|
|
11
12
|
from ... import entity as entity_t
|
|
12
13
|
from ... import field_values as field_values_t
|
|
13
14
|
|
|
@@ -32,7 +33,7 @@ class EntityToCreate:
|
|
|
32
33
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
33
34
|
@dataclass(kw_only=True)
|
|
34
35
|
class Arguments:
|
|
35
|
-
definition_id:
|
|
36
|
+
definition_id: base_t.ObjectId
|
|
36
37
|
entity_type: typing.Union[typing.Literal[entity_t.EntityType.LAB_REQUEST], typing.Literal[entity_t.EntityType.APPROVAL], typing.Literal[entity_t.EntityType.CUSTOM_ENTITY], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT]]
|
|
37
38
|
entities_to_create: list[EntityToCreate]
|
|
38
39
|
|
|
@@ -39,7 +39,7 @@ class EntityFieldInitialValue:
|
|
|
39
39
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
40
40
|
@dataclass(kw_only=True)
|
|
41
41
|
class Arguments:
|
|
42
|
-
definition_id:
|
|
42
|
+
definition_id: base_t.ObjectId
|
|
43
43
|
entity_type: typing.Union[typing.Literal[entity_t.EntityType.LAB_REQUEST], typing.Literal[entity_t.EntityType.APPROVAL], typing.Literal[entity_t.EntityType.CUSTOM_ENTITY], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT]]
|
|
44
44
|
field_values: typing.Optional[typing.Optional[list[field_values_t.FieldRefNameValue]]] = None
|
|
45
45
|
|
|
@@ -8,17 +8,16 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
from dataclasses import dataclass
|
|
11
|
-
from pkgs.serialization import serial_class
|
|
12
11
|
from ... import base as base_t
|
|
12
|
+
from ... import entity as entity_t
|
|
13
|
+
from ... import field_values as field_values_t
|
|
13
14
|
|
|
14
15
|
__all__: list[str] = [
|
|
15
16
|
"Arguments",
|
|
16
17
|
"Data",
|
|
17
18
|
"ENDPOINT_METHOD",
|
|
18
19
|
"ENDPOINT_PATH",
|
|
19
|
-
"Entity",
|
|
20
20
|
"EntityDetails",
|
|
21
|
-
"EntityFieldValue",
|
|
22
21
|
]
|
|
23
22
|
|
|
24
23
|
ENDPOINT_METHOD = "GET"
|
|
@@ -28,34 +27,15 @@ ENDPOINT_PATH = "api/external/entity/external_get_entities_data"
|
|
|
28
27
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
29
28
|
@dataclass(kw_only=True)
|
|
30
29
|
class Arguments:
|
|
31
|
-
entity_ids: list[
|
|
32
|
-
entity_type:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
# DO NOT MODIFY -- This file is generated by type_spec
|
|
36
|
-
@serial_class(
|
|
37
|
-
unconverted_values={"value"},
|
|
38
|
-
)
|
|
39
|
-
@dataclass(kw_only=True)
|
|
40
|
-
class EntityFieldValue:
|
|
41
|
-
field_id: int
|
|
42
|
-
field_ref_name: str
|
|
43
|
-
row_index: typing.Optional[int]
|
|
44
|
-
value: base_t.JsonValue
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
# DO NOT MODIFY -- This file is generated by type_spec
|
|
48
|
-
@dataclass(kw_only=True)
|
|
49
|
-
class Entity:
|
|
50
|
-
id: int
|
|
51
|
-
type: str
|
|
30
|
+
entity_ids: list[base_t.ObjectId]
|
|
31
|
+
entity_type: entity_t.EntityType
|
|
52
32
|
|
|
53
33
|
|
|
54
34
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
55
35
|
@dataclass(kw_only=True)
|
|
56
36
|
class EntityDetails:
|
|
57
|
-
entity: Entity
|
|
58
|
-
field_values: list[
|
|
37
|
+
entity: entity_t.Entity
|
|
38
|
+
field_values: list[field_values_t.FieldRefIdNameValue]
|
|
59
39
|
|
|
60
40
|
|
|
61
41
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -10,6 +10,7 @@ from decimal import Decimal # noqa: F401
|
|
|
10
10
|
from dataclasses import dataclass
|
|
11
11
|
from pkgs.serialization import OpaqueKey
|
|
12
12
|
from ... import base as base_t
|
|
13
|
+
from ... import entity as entity_t
|
|
13
14
|
|
|
14
15
|
__all__: list[str] = [
|
|
15
16
|
"Arguments",
|
|
@@ -17,7 +18,6 @@ __all__: list[str] = [
|
|
|
17
18
|
"Data",
|
|
18
19
|
"ENDPOINT_METHOD",
|
|
19
20
|
"ENDPOINT_PATH",
|
|
20
|
-
"Entity",
|
|
21
21
|
"EntityResult",
|
|
22
22
|
]
|
|
23
23
|
|
|
@@ -28,24 +28,17 @@ ENDPOINT_PATH = "api/external/entity/external_list_entities"
|
|
|
28
28
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
29
29
|
@dataclass(kw_only=True)
|
|
30
30
|
class Arguments:
|
|
31
|
-
entity_type:
|
|
31
|
+
entity_type: entity_t.EntityType
|
|
32
32
|
config_reference: str
|
|
33
|
-
offset: typing.Optional[int]
|
|
34
|
-
limit: typing.Optional[int]
|
|
35
33
|
attributes: typing.Optional[dict[OpaqueKey, base_t.JsonValue]] = None
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# DO NOT MODIFY -- This file is generated by type_spec
|
|
39
|
-
@dataclass(kw_only=True)
|
|
40
|
-
class Entity:
|
|
41
|
-
id: int
|
|
42
|
-
type: str
|
|
34
|
+
offset: typing.Optional[typing.Optional[int]] = None
|
|
35
|
+
limit: typing.Optional[typing.Optional[int]] = None
|
|
43
36
|
|
|
44
37
|
|
|
45
38
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
46
39
|
@dataclass(kw_only=True)
|
|
47
40
|
class EntityResult:
|
|
48
|
-
entity: Entity
|
|
41
|
+
entity: entity_t.Entity
|
|
49
42
|
column_values: list[base_t.JsonValue]
|
|
50
43
|
|
|
51
44
|
|
|
@@ -8,6 +8,8 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
from dataclasses import dataclass
|
|
11
|
+
from ... import base as base_t
|
|
12
|
+
from ... import entity as entity_t
|
|
11
13
|
|
|
12
14
|
__all__: list[str] = [
|
|
13
15
|
"Arguments",
|
|
@@ -24,8 +26,8 @@ ENDPOINT_PATH = "api/external/entity/external_resolve_entity_ids"
|
|
|
24
26
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
25
27
|
@dataclass(kw_only=True)
|
|
26
28
|
class Arguments:
|
|
27
|
-
entity_ids: list[typing.Union[str,
|
|
28
|
-
entity_type:
|
|
29
|
+
entity_ids: list[typing.Union[str, base_t.ObjectId]]
|
|
30
|
+
entity_type: entity_t.EntityType
|
|
29
31
|
|
|
30
32
|
|
|
31
33
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -8,52 +8,30 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
from dataclasses import dataclass
|
|
11
|
-
from
|
|
12
|
-
from ... import
|
|
11
|
+
from ... import entity as entity_t
|
|
12
|
+
from ... import field_values as field_values_t
|
|
13
|
+
from ... import response as response_t
|
|
13
14
|
|
|
14
15
|
__all__: list[str] = [
|
|
15
16
|
"Arguments",
|
|
16
17
|
"Data",
|
|
17
18
|
"ENDPOINT_METHOD",
|
|
18
19
|
"ENDPOINT_PATH",
|
|
19
|
-
"Entity",
|
|
20
|
-
"EntityFieldValues",
|
|
21
20
|
]
|
|
22
21
|
|
|
23
22
|
ENDPOINT_METHOD = "POST"
|
|
24
23
|
ENDPOINT_PATH = "api/external/entity/external_set_values"
|
|
25
24
|
|
|
26
25
|
|
|
27
|
-
# DO NOT MODIFY -- This file is generated by type_spec
|
|
28
|
-
@serial_class(
|
|
29
|
-
unconverted_values={"value"},
|
|
30
|
-
)
|
|
31
|
-
@dataclass(kw_only=True)
|
|
32
|
-
class EntityFieldValues:
|
|
33
|
-
field_ref_name: str
|
|
34
|
-
value: base_t.JsonValue
|
|
35
|
-
row_index: typing.Optional[typing.Optional[int]] = None
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# DO NOT MODIFY -- This file is generated by type_spec
|
|
39
|
-
@dataclass(kw_only=True)
|
|
40
|
-
class Entity:
|
|
41
|
-
id: int
|
|
42
|
-
type: str
|
|
43
|
-
|
|
44
|
-
|
|
45
26
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
46
27
|
@dataclass(kw_only=True)
|
|
47
28
|
class Arguments:
|
|
48
|
-
entity: Entity
|
|
49
|
-
values: list[
|
|
29
|
+
entity: entity_t.Entity
|
|
30
|
+
values: list[field_values_t.ArgumentValueRefName]
|
|
50
31
|
|
|
51
32
|
|
|
52
33
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
53
|
-
@serial_class(
|
|
54
|
-
parse_require={"status"},
|
|
55
|
-
)
|
|
56
34
|
@dataclass(kw_only=True)
|
|
57
|
-
class Data:
|
|
58
|
-
|
|
35
|
+
class Data(response_t.Response):
|
|
36
|
+
pass
|
|
59
37
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
from dataclasses import dataclass
|
|
11
|
+
from ... import base as base_t
|
|
11
12
|
|
|
12
13
|
__all__: list[str] = [
|
|
13
14
|
"Arguments",
|
|
@@ -24,13 +25,13 @@ ENDPOINT_PATH = "api/external/input_groups/external_get_input_group_names"
|
|
|
24
25
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
25
26
|
@dataclass(kw_only=True)
|
|
26
27
|
class Arguments:
|
|
27
|
-
material_family_id:
|
|
28
|
+
material_family_id: base_t.ObjectId
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
31
32
|
@dataclass(kw_only=True)
|
|
32
33
|
class SimpleInputGroup:
|
|
33
|
-
input_group_id:
|
|
34
|
+
input_group_id: base_t.ObjectId
|
|
34
35
|
name: str
|
|
35
36
|
|
|
36
37
|
|
|
@@ -8,15 +8,15 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
from dataclasses import dataclass
|
|
11
|
-
from pkgs.serialization import serial_class
|
|
12
11
|
from ... import base as base_t
|
|
12
|
+
from ... import input_attributes as input_attributes_t
|
|
13
|
+
from ... import inputs as inputs_t
|
|
13
14
|
|
|
14
15
|
__all__: list[str] = [
|
|
15
16
|
"Arguments",
|
|
16
17
|
"Data",
|
|
17
18
|
"ENDPOINT_METHOD",
|
|
18
19
|
"ENDPOINT_PATH",
|
|
19
|
-
"InputAttributeValue",
|
|
20
20
|
"InputSimple",
|
|
21
21
|
"InputToCreate",
|
|
22
22
|
]
|
|
@@ -35,29 +35,17 @@ class Arguments:
|
|
|
35
35
|
@dataclass(kw_only=True)
|
|
36
36
|
class InputToCreate:
|
|
37
37
|
name: str
|
|
38
|
-
material_family_ids: list[
|
|
39
|
-
quantity_type: typing.Union[typing.Literal[
|
|
40
|
-
type: typing.Union[typing.Literal[
|
|
41
|
-
attributes: typing.Optional[list[InputAttributeValue]] = None
|
|
42
|
-
category_id: typing.Optional[
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
# DO NOT MODIFY -- This file is generated by type_spec
|
|
46
|
-
@serial_class(
|
|
47
|
-
unconverted_values={"quantity_json"},
|
|
48
|
-
to_string_values={"quantity_dec"},
|
|
49
|
-
)
|
|
50
|
-
@dataclass(kw_only=True)
|
|
51
|
-
class InputAttributeValue:
|
|
52
|
-
attribute_id: int
|
|
53
|
-
quantity_dec: typing.Optional[Decimal] = None
|
|
54
|
-
quantity_json: typing.Optional[base_t.JsonValue] = None
|
|
38
|
+
material_family_ids: list[base_t.ObjectId]
|
|
39
|
+
quantity_type: typing.Union[typing.Literal[inputs_t.IngredientQuantityType.NUMERIC], typing.Literal[inputs_t.IngredientQuantityType.TEXT]]
|
|
40
|
+
type: typing.Union[typing.Literal[inputs_t.IngredientType.INGREDIENT], typing.Literal[inputs_t.IngredientType.PROCESS_PARAMETER]]
|
|
41
|
+
attributes: typing.Optional[list[input_attributes_t.InputAttributeValue]] = None
|
|
42
|
+
category_id: typing.Optional[base_t.ObjectId] = None
|
|
55
43
|
|
|
56
44
|
|
|
57
45
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
58
46
|
@dataclass(kw_only=True)
|
|
59
47
|
class InputSimple:
|
|
60
|
-
input_id:
|
|
48
|
+
input_id: base_t.ObjectId
|
|
61
49
|
|
|
62
50
|
|
|
63
51
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -8,8 +8,8 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
from dataclasses import dataclass
|
|
11
|
-
from pkgs.serialization import serial_class
|
|
12
11
|
from ... import base as base_t
|
|
12
|
+
from ... import input_attributes as input_attributes_t
|
|
13
13
|
|
|
14
14
|
__all__: list[str] = [
|
|
15
15
|
"Arguments",
|
|
@@ -17,7 +17,6 @@ __all__: list[str] = [
|
|
|
17
17
|
"ENDPOINT_METHOD",
|
|
18
18
|
"ENDPOINT_PATH",
|
|
19
19
|
"FullInput",
|
|
20
|
-
"InputAttrVal",
|
|
21
20
|
"SimpleInputAttr",
|
|
22
21
|
"SimpleInputGlobalCategory",
|
|
23
22
|
"SimpleInputSubcategory",
|
|
@@ -30,29 +29,17 @@ ENDPOINT_PATH = "api/external/inputs/external_get_input_data"
|
|
|
30
29
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
31
30
|
@dataclass(kw_only=True)
|
|
32
31
|
class Arguments:
|
|
33
|
-
material_family_id:
|
|
34
|
-
input_ids: typing.Optional[list[
|
|
35
|
-
offset: typing.Optional[int]
|
|
32
|
+
material_family_id: base_t.ObjectId
|
|
33
|
+
input_ids: typing.Optional[list[base_t.ObjectId]]
|
|
36
34
|
is_parameter: typing.Optional[bool]
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
# DO NOT MODIFY -- This file is generated by type_spec
|
|
41
|
-
@serial_class(
|
|
42
|
-
unconverted_values={"quantity_json"},
|
|
43
|
-
to_string_values={"quantity_dec"},
|
|
44
|
-
)
|
|
45
|
-
@dataclass(kw_only=True)
|
|
46
|
-
class InputAttrVal:
|
|
47
|
-
attribute_id: int
|
|
48
|
-
quantity_dec: Decimal
|
|
49
|
-
quantity_json: base_t.JsonValue
|
|
35
|
+
offset: typing.Optional[typing.Optional[int]] = None
|
|
36
|
+
limit: typing.Optional[typing.Optional[int]] = None
|
|
50
37
|
|
|
51
38
|
|
|
52
39
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
53
40
|
@dataclass(kw_only=True)
|
|
54
41
|
class SimpleInputAttr:
|
|
55
|
-
attribute_id:
|
|
42
|
+
attribute_id: base_t.ObjectId
|
|
56
43
|
name: str
|
|
57
44
|
quantity_type: str
|
|
58
45
|
|
|
@@ -60,27 +47,27 @@ class SimpleInputAttr:
|
|
|
60
47
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
61
48
|
@dataclass(kw_only=True)
|
|
62
49
|
class SimpleInputGlobalCategory:
|
|
63
|
-
category_id:
|
|
50
|
+
category_id: base_t.ObjectId
|
|
64
51
|
name: str
|
|
65
52
|
|
|
66
53
|
|
|
67
54
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
68
55
|
@dataclass(kw_only=True)
|
|
69
56
|
class SimpleInputSubcategory:
|
|
70
|
-
subcategory_id:
|
|
57
|
+
subcategory_id: base_t.ObjectId
|
|
71
58
|
name: str
|
|
72
59
|
|
|
73
60
|
|
|
74
61
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
75
62
|
@dataclass(kw_only=True)
|
|
76
63
|
class FullInput:
|
|
77
|
-
input_id:
|
|
64
|
+
input_id: base_t.ObjectId
|
|
78
65
|
name: str
|
|
79
66
|
quantity_type: str
|
|
80
67
|
is_parameter: bool
|
|
81
|
-
attributes: list[
|
|
82
|
-
global_category_id:
|
|
83
|
-
subcategory_ids: list[
|
|
68
|
+
attributes: list[input_attributes_t.InputAttributeValue]
|
|
69
|
+
global_category_id: typing.Optional[base_t.ObjectId]
|
|
70
|
+
subcategory_ids: list[base_t.ObjectId]
|
|
84
71
|
|
|
85
72
|
|
|
86
73
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
from dataclasses import dataclass
|
|
11
|
+
from ... import base as base_t
|
|
11
12
|
|
|
12
13
|
__all__: list[str] = [
|
|
13
14
|
"Arguments",
|
|
@@ -24,16 +25,16 @@ ENDPOINT_PATH = "api/external/inputs/external_get_input_names"
|
|
|
24
25
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
25
26
|
@dataclass(kw_only=True)
|
|
26
27
|
class Arguments:
|
|
27
|
-
material_family_id:
|
|
28
|
-
offset: typing.Optional[int]
|
|
28
|
+
material_family_id: base_t.ObjectId
|
|
29
29
|
is_parameter: typing.Optional[bool]
|
|
30
|
-
|
|
30
|
+
offset: typing.Optional[typing.Optional[int]] = None
|
|
31
|
+
limit: typing.Optional[typing.Optional[int]] = None
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
34
35
|
@dataclass(kw_only=True)
|
|
35
36
|
class InputWithName:
|
|
36
|
-
input_id:
|
|
37
|
+
input_id: base_t.ObjectId
|
|
37
38
|
name: str
|
|
38
39
|
|
|
39
40
|
|
|
@@ -8,8 +8,8 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
from dataclasses import dataclass
|
|
11
|
-
from pkgs.serialization import serial_class
|
|
12
11
|
from ... import base as base_t
|
|
12
|
+
from ... import input_attributes as input_attributes_t
|
|
13
13
|
|
|
14
14
|
__all__: list[str] = [
|
|
15
15
|
"Arguments",
|
|
@@ -17,7 +17,6 @@ __all__: list[str] = [
|
|
|
17
17
|
"Data",
|
|
18
18
|
"ENDPOINT_METHOD",
|
|
19
19
|
"ENDPOINT_PATH",
|
|
20
|
-
"InputAttributeValue",
|
|
21
20
|
"InputCategory",
|
|
22
21
|
"InputDetails",
|
|
23
22
|
"InputTag",
|
|
@@ -30,52 +29,40 @@ ENDPOINT_PATH = "api/external/inputs/external_get_inputs_data"
|
|
|
30
29
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
31
30
|
@dataclass(kw_only=True)
|
|
32
31
|
class Arguments:
|
|
33
|
-
input_ids: list[
|
|
32
|
+
input_ids: list[base_t.ObjectId]
|
|
34
33
|
|
|
35
34
|
|
|
36
35
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
37
36
|
@dataclass(kw_only=True)
|
|
38
37
|
class AttributeDetails:
|
|
39
|
-
attribute_id:
|
|
38
|
+
attribute_id: base_t.ObjectId
|
|
40
39
|
name: str
|
|
41
40
|
quantity_type: str
|
|
42
41
|
|
|
43
42
|
|
|
44
|
-
# DO NOT MODIFY -- This file is generated by type_spec
|
|
45
|
-
@serial_class(
|
|
46
|
-
unconverted_values={"quantity_json"},
|
|
47
|
-
to_string_values={"quantity_dec"},
|
|
48
|
-
)
|
|
49
|
-
@dataclass(kw_only=True)
|
|
50
|
-
class InputAttributeValue:
|
|
51
|
-
attribute_id: int
|
|
52
|
-
quantity_dec: Decimal
|
|
53
|
-
quantity_json: base_t.JsonValue
|
|
54
|
-
|
|
55
|
-
|
|
56
43
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
57
44
|
@dataclass(kw_only=True)
|
|
58
45
|
class InputTag:
|
|
59
|
-
tag_id:
|
|
46
|
+
tag_id: base_t.ObjectId
|
|
60
47
|
tag_name: str
|
|
61
48
|
|
|
62
49
|
|
|
63
50
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
64
51
|
@dataclass(kw_only=True)
|
|
65
52
|
class InputCategory:
|
|
66
|
-
material_family_id:
|
|
67
|
-
category_id:
|
|
53
|
+
material_family_id: base_t.ObjectId
|
|
54
|
+
category_id: base_t.ObjectId
|
|
68
55
|
category_name: str
|
|
69
56
|
|
|
70
57
|
|
|
71
58
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
72
59
|
@dataclass(kw_only=True)
|
|
73
60
|
class InputDetails:
|
|
74
|
-
input_id:
|
|
61
|
+
input_id: base_t.ObjectId
|
|
75
62
|
name: str
|
|
76
63
|
quantity_type: str
|
|
77
64
|
type: str
|
|
78
|
-
attributes: list[InputAttributeValue]
|
|
65
|
+
attributes: list[input_attributes_t.InputAttributeValue]
|
|
79
66
|
categories: list[InputCategory]
|
|
80
67
|
tags: list[InputTag]
|
|
81
68
|
|
|
@@ -10,6 +10,7 @@ from decimal import Decimal # noqa: F401
|
|
|
10
10
|
from dataclasses import dataclass
|
|
11
11
|
from pkgs.serialization import serial_class
|
|
12
12
|
from ... import base as base_t
|
|
13
|
+
from ... import response as response_t
|
|
13
14
|
|
|
14
15
|
__all__: list[str] = [
|
|
15
16
|
"Arguments",
|
|
@@ -36,17 +37,14 @@ class Arguments:
|
|
|
36
37
|
)
|
|
37
38
|
@dataclass(kw_only=True)
|
|
38
39
|
class InputAttributeValue:
|
|
39
|
-
input_id:
|
|
40
|
-
attribute_id:
|
|
40
|
+
input_id: base_t.ObjectId
|
|
41
|
+
attribute_id: base_t.ObjectId
|
|
41
42
|
quantity_dec: typing.Optional[Decimal] = None
|
|
42
43
|
quantity_json: typing.Optional[base_t.JsonValue] = None
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
46
|
-
@serial_class(
|
|
47
|
-
parse_require={"status"},
|
|
48
|
-
)
|
|
49
47
|
@dataclass(kw_only=True)
|
|
50
|
-
class Data:
|
|
51
|
-
|
|
48
|
+
class Data(response_t.Response):
|
|
49
|
+
pass
|
|
52
50
|
# DO NOT MODIFY -- This file is generated by type_spec
|