UncountablePythonSDK 0.0.72__py3-none-any.whl → 0.0.73__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.72.dist-info → UncountablePythonSDK-0.0.73.dist-info}/METADATA +1 -1
- {UncountablePythonSDK-0.0.72.dist-info → UncountablePythonSDK-0.0.73.dist-info}/RECORD +110 -110
- examples/integration-server/jobs/materials_auto/profile.yaml +1 -1
- pkgs/serialization/serial_class.py +5 -0
- pkgs/serialization/serial_union.py +3 -0
- pkgs/type_spec/builder.py +2 -1
- pkgs/type_spec/config.py +5 -0
- pkgs/type_spec/emit_python.py +36 -20
- pkgs/type_spec/load_types.py +3 -2
- uncountable/core/client.py +2 -2
- uncountable/integration/entrypoint.py +1 -9
- uncountable/integration/queue_runner/worker.py +9 -5
- uncountable/integration/server.py +63 -66
- uncountable/types/api/batch/execute_batch.py +8 -0
- uncountable/types/api/batch/execute_batch_load_async.py +7 -0
- uncountable/types/api/chemical/convert_chemical_formats.py +7 -0
- uncountable/types/api/entity/create_entities.py +11 -1
- uncountable/types/api/entity/create_entity.py +8 -1
- uncountable/types/api/entity/get_entities_data.py +10 -0
- uncountable/types/api/entity/list_entities.py +8 -0
- uncountable/types/api/entity/lock_entity.py +7 -0
- uncountable/types/api/entity/resolve_entity_ids.py +10 -0
- uncountable/types/api/entity/set_values.py +7 -0
- uncountable/types/api/entity/transition_entity_phase.py +8 -0
- uncountable/types/api/entity/unlock_entity.py +7 -0
- uncountable/types/api/equipment/associate_equipment_input.py +7 -0
- uncountable/types/api/field_options/upsert_field_options.py +10 -0
- uncountable/types/api/id_source/list_id_source.py +10 -0
- uncountable/types/api/id_source/match_id_source.py +10 -0
- uncountable/types/api/input_groups/get_input_group_names.py +10 -0
- uncountable/types/api/inputs/create_inputs.py +13 -0
- uncountable/types/api/inputs/get_input_data.py +19 -0
- uncountable/types/api/inputs/get_input_names.py +10 -0
- uncountable/types/api/inputs/get_inputs_data.py +19 -0
- uncountable/types/api/inputs/set_input_attribute_values.py +7 -0
- uncountable/types/api/inputs/set_input_category.py +7 -0
- uncountable/types/api/inputs/set_input_subcategories.py +7 -0
- uncountable/types/api/inputs/set_intermediate_type.py +7 -0
- uncountable/types/api/material_families/update_entity_material_families.py +7 -0
- uncountable/types/api/outputs/get_output_data.py +16 -0
- uncountable/types/api/outputs/get_output_names.py +10 -0
- uncountable/types/api/outputs/resolve_output_conditions.py +13 -0
- uncountable/types/api/permissions/set_core_permissions.py +10 -0
- uncountable/types/api/project/get_projects.py +10 -0
- uncountable/types/api/project/get_projects_data.py +10 -0
- uncountable/types/api/recipe_links/create_recipe_link.py +7 -0
- uncountable/types/api/recipe_links/remove_recipe_link.py +7 -0
- uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py +10 -0
- uncountable/types/api/recipes/add_recipe_to_project.py +7 -0
- uncountable/types/api/recipes/archive_recipes.py +7 -0
- uncountable/types/api/recipes/associate_recipe_as_input.py +7 -0
- uncountable/types/api/recipes/associate_recipe_as_lot.py +7 -0
- uncountable/types/api/recipes/clear_recipe_outputs.py +7 -0
- uncountable/types/api/recipes/create_recipe.py +7 -0
- uncountable/types/api/recipes/create_recipes.py +13 -0
- uncountable/types/api/recipes/disassociate_recipe_as_input.py +7 -0
- uncountable/types/api/recipes/edit_recipe_inputs.py +20 -0
- uncountable/types/api/recipes/get_curve.py +7 -0
- uncountable/types/api/recipes/get_recipe_calculations.py +7 -0
- uncountable/types/api/recipes/get_recipe_links.py +7 -0
- uncountable/types/api/recipes/get_recipe_names.py +10 -0
- uncountable/types/api/recipes/get_recipe_output_metadata.py +7 -0
- uncountable/types/api/recipes/get_recipes_data.py +25 -0
- uncountable/types/api/recipes/lock_recipes.py +10 -0
- uncountable/types/api/recipes/remove_recipe_from_project.py +7 -0
- uncountable/types/api/recipes/set_recipe_inputs.py +7 -0
- uncountable/types/api/recipes/set_recipe_metadata.py +7 -0
- uncountable/types/api/recipes/set_recipe_output_annotations.py +13 -0
- uncountable/types/api/recipes/set_recipe_output_file.py +10 -0
- uncountable/types/api/recipes/set_recipe_outputs.py +10 -0
- uncountable/types/api/recipes/set_recipe_tags.py +12 -0
- uncountable/types/api/recipes/unarchive_recipes.py +7 -0
- uncountable/types/api/recipes/unlock_recipes.py +7 -0
- uncountable/types/api/triggers/run_trigger.py +7 -0
- uncountable/types/api/uploader/invoke_uploader.py +7 -0
- uncountable/types/async_batch_t.py +10 -0
- uncountable/types/calculations_t.py +4 -0
- uncountable/types/chemical_structure_t.py +1 -0
- uncountable/types/client_base.py +2 -2
- uncountable/types/client_config_t.py +4 -0
- uncountable/types/curves_t.py +4 -0
- uncountable/types/entity_t.py +6 -0
- uncountable/types/experiment_groups_t.py +4 -0
- uncountable/types/field_values_t.py +4 -0
- uncountable/types/fields_t.py +4 -0
- uncountable/types/generic_upload_t.py +13 -0
- uncountable/types/id_source_t.py +13 -0
- uncountable/types/identifier_t.py +3 -0
- uncountable/types/input_attributes_t.py +1 -0
- uncountable/types/inputs_t.py +4 -0
- uncountable/types/job_definition_t.py +33 -0
- uncountable/types/outputs_t.py +4 -0
- uncountable/types/overrides_t.py +7 -0
- uncountable/types/phases_t.py +4 -0
- uncountable/types/queued_job_t.py +16 -0
- uncountable/types/recipe_identifiers_t.py +3 -0
- uncountable/types/recipe_links_t.py +4 -0
- uncountable/types/recipe_metadata_t.py +5 -0
- uncountable/types/recipe_output_metadata_t.py +4 -0
- uncountable/types/recipe_tags_t.py +4 -0
- uncountable/types/recipe_workflow_steps_t.py +7 -0
- uncountable/types/recipes_t.py +4 -0
- uncountable/types/response_t.py +1 -0
- uncountable/types/secret_retrieval_t.py +6 -0
- uncountable/types/units_t.py +4 -0
- uncountable/types/users_t.py +4 -0
- uncountable/types/webhook_job_t.py +4 -0
- uncountable/types/workflows_t.py +7 -0
- {UncountablePythonSDK-0.0.72.dist-info → UncountablePythonSDK-0.0.73.dist-info}/WHEEL +0 -0
- {UncountablePythonSDK-0.0.72.dist-info → UncountablePythonSDK-0.0.73.dist-info}/top_level.txt +0 -0
|
@@ -102,8 +102,12 @@ def run_queued_job(
|
|
|
102
102
|
payload=payload,
|
|
103
103
|
)
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
try:
|
|
106
|
+
return execute_job(
|
|
107
|
+
args=args,
|
|
108
|
+
profile_metadata=job_details.profile_metadata,
|
|
109
|
+
job_definition=job_details.job_definition,
|
|
110
|
+
)
|
|
111
|
+
except Exception as e:
|
|
112
|
+
job_logger.log_exception(e)
|
|
113
|
+
return job_definition_t.JobResult(success=False)
|
|
@@ -12,13 +12,11 @@ from opentelemetry.trace import get_current_span
|
|
|
12
12
|
from sqlalchemy.engine.base import Engine
|
|
13
13
|
|
|
14
14
|
from uncountable.integration.cron import CronJobArgs, cron_job_executor
|
|
15
|
+
from uncountable.integration.scan_profiles import ProfileDetails
|
|
15
16
|
from uncountable.integration.telemetry import Logger
|
|
16
17
|
from uncountable.types import base_t
|
|
17
|
-
from uncountable.types.client_config_t import ClientConfigOptions
|
|
18
18
|
from uncountable.types.job_definition_t import (
|
|
19
|
-
AuthRetrieval,
|
|
20
19
|
CronJobDefinition,
|
|
21
|
-
JobDefinition,
|
|
22
20
|
ProfileMetadata,
|
|
23
21
|
WebhookJobDefinition,
|
|
24
22
|
)
|
|
@@ -40,71 +38,70 @@ class IntegrationServer:
|
|
|
40
38
|
)
|
|
41
39
|
self._server_logger = Logger(get_current_span())
|
|
42
40
|
|
|
43
|
-
def
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
# Add to ap scheduler
|
|
62
|
-
job_kwargs = asdict(
|
|
63
|
-
CronJobArgs(
|
|
64
|
-
definition=job_defn, profile_metadata=profile_metadata
|
|
65
|
-
)
|
|
66
|
-
)
|
|
67
|
-
try:
|
|
68
|
-
existing_job = self._scheduler.get_job(job_defn.id)
|
|
69
|
-
except ValueError as e:
|
|
70
|
-
self._server_logger.log_warning(
|
|
71
|
-
f"could not reconstitute job {job_defn.id}: {e}"
|
|
41
|
+
def register_jobs(self, profiles: list[ProfileDetails]) -> None:
|
|
42
|
+
valid_job_ids = []
|
|
43
|
+
for profile in profiles:
|
|
44
|
+
for job_defn in profile.definition.jobs:
|
|
45
|
+
valid_job_ids.append(job_defn.id)
|
|
46
|
+
profile_metadata = ProfileMetadata(
|
|
47
|
+
name=profile.name,
|
|
48
|
+
auth_retrieval=profile.definition.auth_retrieval,
|
|
49
|
+
base_url=profile.definition.base_url,
|
|
50
|
+
client_options=profile.definition.client_options,
|
|
51
|
+
)
|
|
52
|
+
match job_defn:
|
|
53
|
+
case CronJobDefinition():
|
|
54
|
+
# Add to ap scheduler
|
|
55
|
+
job_kwargs = asdict(
|
|
56
|
+
CronJobArgs(
|
|
57
|
+
definition=job_defn, profile_metadata=profile_metadata
|
|
58
|
+
)
|
|
72
59
|
)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
existing_job
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
60
|
+
try:
|
|
61
|
+
existing_job = self._scheduler.get_job(job_defn.id)
|
|
62
|
+
except ValueError as e:
|
|
63
|
+
self._server_logger.log_warning(
|
|
64
|
+
f"could not reconstitute job {job_defn.id}: {e}"
|
|
65
|
+
)
|
|
66
|
+
self._scheduler.remove_job(job_defn.id)
|
|
67
|
+
existing_job = None
|
|
68
|
+
if existing_job is not None:
|
|
69
|
+
existing_job.modify(
|
|
70
|
+
name=job_defn.name,
|
|
71
|
+
kwargs=job_kwargs,
|
|
72
|
+
misfire_grace_time=None,
|
|
73
|
+
)
|
|
74
|
+
existing_job.reschedule(
|
|
75
|
+
CronTrigger.from_crontab(job_defn.cron_spec)
|
|
76
|
+
)
|
|
77
|
+
if not job_defn.enabled:
|
|
78
|
+
existing_job.pause()
|
|
79
|
+
else:
|
|
80
|
+
existing_job.resume()
|
|
86
81
|
else:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
82
|
+
job_opts: dict[str, base_t.JsonValue] = {}
|
|
83
|
+
if not job_defn.enabled:
|
|
84
|
+
job_opts["next_run_time"] = None
|
|
85
|
+
self._scheduler.add_job(
|
|
86
|
+
cron_job_executor,
|
|
87
|
+
# IMPROVE: reconsider these defaults
|
|
88
|
+
max_instances=1,
|
|
89
|
+
coalesce=True,
|
|
90
|
+
trigger=CronTrigger.from_crontab(job_defn.cron_spec),
|
|
91
|
+
name=job_defn.name,
|
|
92
|
+
id=job_defn.id,
|
|
93
|
+
kwargs=job_kwargs,
|
|
94
|
+
misfire_grace_time=None,
|
|
95
|
+
**job_opts,
|
|
96
|
+
)
|
|
97
|
+
case WebhookJobDefinition():
|
|
98
|
+
pass
|
|
99
|
+
case _:
|
|
100
|
+
assert_never(job_defn)
|
|
101
|
+
all_jobs = self._scheduler.get_jobs()
|
|
102
|
+
for job in all_jobs:
|
|
103
|
+
if job.id not in valid_job_ids:
|
|
104
|
+
self._scheduler.remove_job(job.id)
|
|
108
105
|
|
|
109
106
|
def serve_forever(self) -> None:
|
|
110
107
|
signal.pause()
|
|
@@ -41,6 +41,7 @@ class RequestMethod(StrEnum):
|
|
|
41
41
|
|
|
42
42
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
43
43
|
@serial_class(
|
|
44
|
+
named_type_path="sdk.api.batch.execute_batch.BatchRequest",
|
|
44
45
|
unconverted_values={"data"},
|
|
45
46
|
)
|
|
46
47
|
@dataclasses.dataclass(kw_only=True)
|
|
@@ -51,6 +52,9 @@ class BatchRequest:
|
|
|
51
52
|
|
|
52
53
|
|
|
53
54
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
55
|
+
@serial_class(
|
|
56
|
+
named_type_path="sdk.api.batch.execute_batch.Arguments",
|
|
57
|
+
)
|
|
54
58
|
@dataclasses.dataclass(kw_only=True)
|
|
55
59
|
class Arguments:
|
|
56
60
|
requests: list[BatchRequest]
|
|
@@ -58,6 +62,7 @@ class Arguments:
|
|
|
58
62
|
|
|
59
63
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
60
64
|
@serial_class(
|
|
65
|
+
named_type_path="sdk.api.batch.execute_batch.BatchResponse",
|
|
61
66
|
unconverted_values={"response"},
|
|
62
67
|
)
|
|
63
68
|
@dataclasses.dataclass(kw_only=True)
|
|
@@ -69,6 +74,9 @@ class BatchResponse:
|
|
|
69
74
|
|
|
70
75
|
|
|
71
76
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
77
|
+
@serial_class(
|
|
78
|
+
named_type_path="sdk.api.batch.execute_batch.Data",
|
|
79
|
+
)
|
|
72
80
|
@dataclasses.dataclass(kw_only=True)
|
|
73
81
|
class Data:
|
|
74
82
|
responses: list[BatchResponse]
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
import dataclasses
|
|
11
|
+
from pkgs.serialization import serial_class
|
|
11
12
|
from ... import async_batch_t
|
|
12
13
|
from ... import base_t
|
|
13
14
|
|
|
@@ -23,12 +24,18 @@ ENDPOINT_PATH = "api/external/batch/execute_batch_load_async"
|
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
27
|
+
@serial_class(
|
|
28
|
+
named_type_path="sdk.api.batch.execute_batch_load_async.Arguments",
|
|
29
|
+
)
|
|
26
30
|
@dataclasses.dataclass(kw_only=True)
|
|
27
31
|
class Arguments:
|
|
28
32
|
requests: list[async_batch_t.AsyncBatchRequest]
|
|
29
33
|
|
|
30
34
|
|
|
31
35
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
36
|
+
@serial_class(
|
|
37
|
+
named_type_path="sdk.api.batch.execute_batch_load_async.Data",
|
|
38
|
+
)
|
|
32
39
|
@dataclasses.dataclass(kw_only=True)
|
|
33
40
|
class Data:
|
|
34
41
|
job_id: base_t.ObjectId
|
|
@@ -25,12 +25,18 @@ ENDPOINT_PATH = "api/external/chemical/convert_chemical_formats"
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
28
|
+
@serial_class(
|
|
29
|
+
named_type_path="sdk.api.chemical.convert_chemical_formats.ChemicalStructureFile",
|
|
30
|
+
)
|
|
28
31
|
@dataclasses.dataclass(kw_only=True)
|
|
29
32
|
class ChemicalStructureFile:
|
|
30
33
|
struct_file: str
|
|
31
34
|
|
|
32
35
|
|
|
33
36
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
37
|
+
@serial_class(
|
|
38
|
+
named_type_path="sdk.api.chemical.convert_chemical_formats.Arguments",
|
|
39
|
+
)
|
|
34
40
|
@dataclasses.dataclass(kw_only=True)
|
|
35
41
|
class Arguments:
|
|
36
42
|
source_chemical_structures: list[ChemicalStructureFile]
|
|
@@ -42,6 +48,7 @@ UncountableChemicalStructure = dict[str, base_t.JsonValue]
|
|
|
42
48
|
|
|
43
49
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
44
50
|
@serial_class(
|
|
51
|
+
named_type_path="sdk.api.chemical.convert_chemical_formats.Data",
|
|
45
52
|
unconverted_values={"chemical_structures"},
|
|
46
53
|
)
|
|
47
54
|
@dataclasses.dataclass(kw_only=True)
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
import dataclasses
|
|
11
|
+
from pkgs.serialization import serial_class
|
|
11
12
|
from ... import base_t
|
|
12
13
|
from ... import entity_t
|
|
13
14
|
from ... import field_values_t
|
|
@@ -25,20 +26,29 @@ ENDPOINT_PATH = "api/external/entity/external_create_entities"
|
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
29
|
+
@serial_class(
|
|
30
|
+
named_type_path="sdk.api.entity.create_entities.EntityToCreate",
|
|
31
|
+
)
|
|
28
32
|
@dataclasses.dataclass(kw_only=True)
|
|
29
33
|
class EntityToCreate:
|
|
30
34
|
field_values: typing.Optional[typing.Optional[list[field_values_t.FieldRefNameValue]]] = None
|
|
31
35
|
|
|
32
36
|
|
|
33
37
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
38
|
+
@serial_class(
|
|
39
|
+
named_type_path="sdk.api.entity.create_entities.Arguments",
|
|
40
|
+
)
|
|
34
41
|
@dataclasses.dataclass(kw_only=True)
|
|
35
42
|
class Arguments:
|
|
36
43
|
definition_id: base_t.ObjectId
|
|
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.INVENTORY_AMOUNT], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT], typing.Literal[entity_t.EntityType.EQUIPMENT], typing.Literal[entity_t.EntityType.INV_LOCAL_LOCATIONS], typing.Literal[entity_t.EntityType.FIELD_OPTION_SET], typing.Literal[entity_t.EntityType.WEBHOOK], typing.Literal[entity_t.EntityType.SPECS], typing.Literal[entity_t.EntityType.GOAL], typing.Literal[entity_t.EntityType.INGREDIENT_TAG_MAP], typing.Literal[entity_t.EntityType.INGREDIENT_TAG]]
|
|
44
|
+
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.INVENTORY_AMOUNT], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT], typing.Literal[entity_t.EntityType.EQUIPMENT], typing.Literal[entity_t.EntityType.INV_LOCAL_LOCATIONS], typing.Literal[entity_t.EntityType.FIELD_OPTION_SET], typing.Literal[entity_t.EntityType.WEBHOOK], typing.Literal[entity_t.EntityType.SPECS], typing.Literal[entity_t.EntityType.GOAL], typing.Literal[entity_t.EntityType.INGREDIENT_TAG_MAP], typing.Literal[entity_t.EntityType.INGREDIENT_TAG], typing.Literal[entity_t.EntityType.OUTPUT]]
|
|
38
45
|
entities_to_create: list[EntityToCreate]
|
|
39
46
|
|
|
40
47
|
|
|
41
48
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
49
|
+
@serial_class(
|
|
50
|
+
named_type_path="sdk.api.entity.create_entities.Data",
|
|
51
|
+
)
|
|
42
52
|
@dataclasses.dataclass(kw_only=True)
|
|
43
53
|
class Data:
|
|
44
54
|
entities: list[entity_t.Entity]
|
|
@@ -27,6 +27,7 @@ ENDPOINT_PATH = "api/external/entity/external_create_entity"
|
|
|
27
27
|
|
|
28
28
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
29
29
|
@serial_class(
|
|
30
|
+
named_type_path="sdk.api.entity.create_entity.EntityFieldInitialValue",
|
|
30
31
|
unconverted_values={"value"},
|
|
31
32
|
)
|
|
32
33
|
@dataclasses.dataclass(kw_only=True)
|
|
@@ -37,14 +38,20 @@ class EntityFieldInitialValue:
|
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
41
|
+
@serial_class(
|
|
42
|
+
named_type_path="sdk.api.entity.create_entity.Arguments",
|
|
43
|
+
)
|
|
40
44
|
@dataclasses.dataclass(kw_only=True)
|
|
41
45
|
class Arguments:
|
|
42
46
|
definition_id: base_t.ObjectId
|
|
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.INVENTORY_AMOUNT], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT], typing.Literal[entity_t.EntityType.EQUIPMENT], typing.Literal[entity_t.EntityType.INV_LOCAL_LOCATIONS], typing.Literal[entity_t.EntityType.FIELD_OPTION_SET], typing.Literal[entity_t.EntityType.WEBHOOK], typing.Literal[entity_t.EntityType.SPECS], typing.Literal[entity_t.EntityType.GOAL], typing.Literal[entity_t.EntityType.INGREDIENT_TAG_MAP], typing.Literal[entity_t.EntityType.INGREDIENT_TAG]]
|
|
47
|
+
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.INVENTORY_AMOUNT], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT], typing.Literal[entity_t.EntityType.EQUIPMENT], typing.Literal[entity_t.EntityType.INV_LOCAL_LOCATIONS], typing.Literal[entity_t.EntityType.FIELD_OPTION_SET], typing.Literal[entity_t.EntityType.WEBHOOK], typing.Literal[entity_t.EntityType.SPECS], typing.Literal[entity_t.EntityType.GOAL], typing.Literal[entity_t.EntityType.INGREDIENT_TAG_MAP], typing.Literal[entity_t.EntityType.INGREDIENT_TAG], typing.Literal[entity_t.EntityType.OUTPUT]]
|
|
44
48
|
field_values: typing.Optional[typing.Optional[list[field_values_t.FieldRefNameValue]]] = None
|
|
45
49
|
|
|
46
50
|
|
|
47
51
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
52
|
+
@serial_class(
|
|
53
|
+
named_type_path="sdk.api.entity.create_entity.Data",
|
|
54
|
+
)
|
|
48
55
|
@dataclasses.dataclass(kw_only=True)
|
|
49
56
|
class Data:
|
|
50
57
|
entity: entity_t.Entity
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
import dataclasses
|
|
11
|
+
from pkgs.serialization import serial_class
|
|
11
12
|
from ... import base_t
|
|
12
13
|
from ... import entity_t
|
|
13
14
|
from ... import field_values_t
|
|
@@ -25,6 +26,9 @@ ENDPOINT_PATH = "api/external/entity/external_get_entities_data"
|
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
29
|
+
@serial_class(
|
|
30
|
+
named_type_path="sdk.api.entity.get_entities_data.Arguments",
|
|
31
|
+
)
|
|
28
32
|
@dataclasses.dataclass(kw_only=True)
|
|
29
33
|
class Arguments:
|
|
30
34
|
entity_ids: list[base_t.ObjectId]
|
|
@@ -32,6 +36,9 @@ class Arguments:
|
|
|
32
36
|
|
|
33
37
|
|
|
34
38
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
39
|
+
@serial_class(
|
|
40
|
+
named_type_path="sdk.api.entity.get_entities_data.EntityDetails",
|
|
41
|
+
)
|
|
35
42
|
@dataclasses.dataclass(kw_only=True)
|
|
36
43
|
class EntityDetails:
|
|
37
44
|
entity: entity_t.Entity
|
|
@@ -39,6 +46,9 @@ class EntityDetails:
|
|
|
39
46
|
|
|
40
47
|
|
|
41
48
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
49
|
+
@serial_class(
|
|
50
|
+
named_type_path="sdk.api.entity.get_entities_data.Data",
|
|
51
|
+
)
|
|
42
52
|
@dataclasses.dataclass(kw_only=True)
|
|
43
53
|
class Data:
|
|
44
54
|
entity_details: list[EntityDetails]
|
|
@@ -28,6 +28,7 @@ ENDPOINT_PATH = "api/external/entity/external_list_entities"
|
|
|
28
28
|
|
|
29
29
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
30
30
|
@serial_class(
|
|
31
|
+
named_type_path="sdk.api.entity.list_entities.Arguments",
|
|
31
32
|
unconverted_values={"attributes"},
|
|
32
33
|
)
|
|
33
34
|
@dataclasses.dataclass(kw_only=True)
|
|
@@ -41,6 +42,7 @@ class Arguments:
|
|
|
41
42
|
|
|
42
43
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
43
44
|
@serial_class(
|
|
45
|
+
named_type_path="sdk.api.entity.list_entities.EntityResult",
|
|
44
46
|
unconverted_values={"column_values"},
|
|
45
47
|
)
|
|
46
48
|
@dataclasses.dataclass(kw_only=True)
|
|
@@ -50,6 +52,9 @@ class EntityResult:
|
|
|
50
52
|
|
|
51
53
|
|
|
52
54
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
55
|
+
@serial_class(
|
|
56
|
+
named_type_path="sdk.api.entity.list_entities.ColumnAccess",
|
|
57
|
+
)
|
|
53
58
|
@dataclasses.dataclass(kw_only=True)
|
|
54
59
|
class ColumnAccess:
|
|
55
60
|
name: str
|
|
@@ -57,6 +62,9 @@ class ColumnAccess:
|
|
|
57
62
|
|
|
58
63
|
|
|
59
64
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
65
|
+
@serial_class(
|
|
66
|
+
named_type_path="sdk.api.entity.list_entities.Data",
|
|
67
|
+
)
|
|
60
68
|
@dataclasses.dataclass(kw_only=True)
|
|
61
69
|
class Data:
|
|
62
70
|
columns: list[ColumnAccess]
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
import dataclasses
|
|
11
|
+
from pkgs.serialization import serial_class
|
|
11
12
|
from ... import async_batch_t
|
|
12
13
|
from ... import entity_t
|
|
13
14
|
from ... import identifier_t
|
|
@@ -24,6 +25,9 @@ ENDPOINT_PATH = "api/external/entity/external_lock_entity"
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
28
|
+
@serial_class(
|
|
29
|
+
named_type_path="sdk.api.entity.lock_entity.Arguments",
|
|
30
|
+
)
|
|
27
31
|
@dataclasses.dataclass(kw_only=True)
|
|
28
32
|
class Arguments:
|
|
29
33
|
entity_key: identifier_t.IdentifierKey
|
|
@@ -32,6 +36,9 @@ class Arguments:
|
|
|
32
36
|
|
|
33
37
|
|
|
34
38
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
39
|
+
@serial_class(
|
|
40
|
+
named_type_path="sdk.api.entity.lock_entity.Data",
|
|
41
|
+
)
|
|
35
42
|
@dataclasses.dataclass(kw_only=True)
|
|
36
43
|
class Data(async_batch_t.AsyncBatchActionReturn):
|
|
37
44
|
pass
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
import dataclasses
|
|
11
|
+
from pkgs.serialization import serial_class
|
|
11
12
|
from ... import base_t
|
|
12
13
|
from ... import entity_t
|
|
13
14
|
|
|
@@ -24,6 +25,9 @@ ENDPOINT_PATH = "api/external/entity/external_resolve_entity_ids"
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
28
|
+
@serial_class(
|
|
29
|
+
named_type_path="sdk.api.entity.resolve_entity_ids.Arguments",
|
|
30
|
+
)
|
|
27
31
|
@dataclasses.dataclass(kw_only=True)
|
|
28
32
|
class Arguments:
|
|
29
33
|
entity_ids: list[typing.Union[str, base_t.ObjectId]]
|
|
@@ -31,6 +35,9 @@ class Arguments:
|
|
|
31
35
|
|
|
32
36
|
|
|
33
37
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
38
|
+
@serial_class(
|
|
39
|
+
named_type_path="sdk.api.entity.resolve_entity_ids.EntityNames",
|
|
40
|
+
)
|
|
34
41
|
@dataclasses.dataclass(kw_only=True)
|
|
35
42
|
class EntityNames:
|
|
36
43
|
id: typing.Union[str, int]
|
|
@@ -38,6 +45,9 @@ class EntityNames:
|
|
|
38
45
|
|
|
39
46
|
|
|
40
47
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
48
|
+
@serial_class(
|
|
49
|
+
named_type_path="sdk.api.entity.resolve_entity_ids.Data",
|
|
50
|
+
)
|
|
41
51
|
@dataclasses.dataclass(kw_only=True)
|
|
42
52
|
class Data:
|
|
43
53
|
items: list[EntityNames]
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
import dataclasses
|
|
11
|
+
from pkgs.serialization import serial_class
|
|
11
12
|
from ... import entity_t
|
|
12
13
|
from ... import field_values_t
|
|
13
14
|
from ... import response_t
|
|
@@ -24,6 +25,9 @@ ENDPOINT_PATH = "api/external/entity/external_set_values"
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
28
|
+
@serial_class(
|
|
29
|
+
named_type_path="sdk.api.entity.set_values.Arguments",
|
|
30
|
+
)
|
|
27
31
|
@dataclasses.dataclass(kw_only=True)
|
|
28
32
|
class Arguments:
|
|
29
33
|
entity: entity_t.Entity
|
|
@@ -31,6 +35,9 @@ class Arguments:
|
|
|
31
35
|
|
|
32
36
|
|
|
33
37
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
38
|
+
@serial_class(
|
|
39
|
+
named_type_path="sdk.api.entity.set_values.Data",
|
|
40
|
+
)
|
|
34
41
|
@dataclasses.dataclass(kw_only=True)
|
|
35
42
|
class Data(response_t.Response):
|
|
36
43
|
pass
|
|
@@ -29,6 +29,7 @@ ENDPOINT_PATH = "api/external/entity/transition_entity_phase"
|
|
|
29
29
|
|
|
30
30
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
31
31
|
@serial_class(
|
|
32
|
+
named_type_path="sdk.api.entity.transition_entity_phase.TransitionIdentifierPhases",
|
|
32
33
|
parse_require={"type"},
|
|
33
34
|
)
|
|
34
35
|
@dataclasses.dataclass(kw_only=True)
|
|
@@ -40,6 +41,7 @@ class TransitionIdentifierPhases:
|
|
|
40
41
|
|
|
41
42
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
42
43
|
@serial_class(
|
|
44
|
+
named_type_path="sdk.api.entity.transition_entity_phase.TransitionIdentifierTransition",
|
|
43
45
|
parse_require={"type"},
|
|
44
46
|
)
|
|
45
47
|
@dataclasses.dataclass(kw_only=True)
|
|
@@ -53,6 +55,9 @@ TransitionIdentifier = typing.Union[TransitionIdentifierPhases, TransitionIdenti
|
|
|
53
55
|
|
|
54
56
|
|
|
55
57
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
58
|
+
@serial_class(
|
|
59
|
+
named_type_path="sdk.api.entity.transition_entity_phase.Arguments",
|
|
60
|
+
)
|
|
56
61
|
@dataclasses.dataclass(kw_only=True)
|
|
57
62
|
class Arguments:
|
|
58
63
|
entity: entity_t.Entity
|
|
@@ -60,6 +65,9 @@ class Arguments:
|
|
|
60
65
|
|
|
61
66
|
|
|
62
67
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
68
|
+
@serial_class(
|
|
69
|
+
named_type_path="sdk.api.entity.transition_entity_phase.Data",
|
|
70
|
+
)
|
|
63
71
|
@dataclasses.dataclass(kw_only=True)
|
|
64
72
|
class Data(response_t.Response):
|
|
65
73
|
pass
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
import dataclasses
|
|
11
|
+
from pkgs.serialization import serial_class
|
|
11
12
|
from ... import async_batch_t
|
|
12
13
|
from ... import entity_t
|
|
13
14
|
from ... import identifier_t
|
|
@@ -24,6 +25,9 @@ ENDPOINT_PATH = "api/external/entity/external_unlock_entity"
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
28
|
+
@serial_class(
|
|
29
|
+
named_type_path="sdk.api.entity.unlock_entity.Arguments",
|
|
30
|
+
)
|
|
27
31
|
@dataclasses.dataclass(kw_only=True)
|
|
28
32
|
class Arguments:
|
|
29
33
|
entity_key: identifier_t.IdentifierKey
|
|
@@ -31,6 +35,9 @@ class Arguments:
|
|
|
31
35
|
|
|
32
36
|
|
|
33
37
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
38
|
+
@serial_class(
|
|
39
|
+
named_type_path="sdk.api.entity.unlock_entity.Data",
|
|
40
|
+
)
|
|
34
41
|
@dataclasses.dataclass(kw_only=True)
|
|
35
42
|
class Data(async_batch_t.AsyncBatchActionReturn):
|
|
36
43
|
pass
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
import dataclasses
|
|
11
|
+
from pkgs.serialization import serial_class
|
|
11
12
|
from ... import async_batch_t
|
|
12
13
|
from ... import base_t
|
|
13
14
|
from ... import identifier_t
|
|
@@ -24,6 +25,9 @@ ENDPOINT_PATH = "api/external/equipment/associate_equipment_input"
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
28
|
+
@serial_class(
|
|
29
|
+
named_type_path="sdk.api.equipment.associate_equipment_input.Arguments",
|
|
30
|
+
)
|
|
27
31
|
@dataclasses.dataclass(kw_only=True)
|
|
28
32
|
class Arguments:
|
|
29
33
|
equipment_key: identifier_t.IdentifierKey
|
|
@@ -31,6 +35,9 @@ class Arguments:
|
|
|
31
35
|
|
|
32
36
|
|
|
33
37
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
38
|
+
@serial_class(
|
|
39
|
+
named_type_path="sdk.api.equipment.associate_equipment_input.Data",
|
|
40
|
+
)
|
|
34
41
|
@dataclasses.dataclass(kw_only=True)
|
|
35
42
|
class Data(async_batch_t.AsyncBatchActionReturn):
|
|
36
43
|
pass
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
import dataclasses
|
|
11
|
+
from pkgs.serialization import serial_class
|
|
11
12
|
from ... import identifier_t
|
|
12
13
|
|
|
13
14
|
__all__: list[str] = [
|
|
@@ -23,6 +24,9 @@ ENDPOINT_PATH = "api/external/field_options/upsert_field_options"
|
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
27
|
+
@serial_class(
|
|
28
|
+
named_type_path="sdk.api.field_options.upsert_field_options.FieldOption",
|
|
29
|
+
)
|
|
26
30
|
@dataclasses.dataclass(kw_only=True)
|
|
27
31
|
class FieldOption:
|
|
28
32
|
option_id: str
|
|
@@ -32,6 +36,9 @@ class FieldOption:
|
|
|
32
36
|
|
|
33
37
|
|
|
34
38
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
39
|
+
@serial_class(
|
|
40
|
+
named_type_path="sdk.api.field_options.upsert_field_options.Arguments",
|
|
41
|
+
)
|
|
35
42
|
@dataclasses.dataclass(kw_only=True)
|
|
36
43
|
class Arguments:
|
|
37
44
|
option_set_key: identifier_t.IdentifierKey
|
|
@@ -39,6 +46,9 @@ class Arguments:
|
|
|
39
46
|
|
|
40
47
|
|
|
41
48
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
49
|
+
@serial_class(
|
|
50
|
+
named_type_path="sdk.api.field_options.upsert_field_options.Data",
|
|
51
|
+
)
|
|
42
52
|
@dataclasses.dataclass(kw_only=True)
|
|
43
53
|
class Data:
|
|
44
54
|
pass
|
|
@@ -8,6 +8,7 @@ import typing # noqa: F401
|
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
10
|
import dataclasses
|
|
11
|
+
from pkgs.serialization import serial_class
|
|
11
12
|
from ... import base_t
|
|
12
13
|
from ... import id_source_t
|
|
13
14
|
|
|
@@ -24,6 +25,9 @@ ENDPOINT_PATH = "api/external/id_source/list_id_source"
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
28
|
+
@serial_class(
|
|
29
|
+
named_type_path="sdk.api.id_source.list_id_source.Arguments",
|
|
30
|
+
)
|
|
27
31
|
@dataclasses.dataclass(kw_only=True)
|
|
28
32
|
class Arguments:
|
|
29
33
|
spec: id_source_t.IdSourceSpec
|
|
@@ -33,6 +37,9 @@ class Arguments:
|
|
|
33
37
|
|
|
34
38
|
|
|
35
39
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
40
|
+
@serial_class(
|
|
41
|
+
named_type_path="sdk.api.id_source.list_id_source.IdName",
|
|
42
|
+
)
|
|
36
43
|
@dataclasses.dataclass(kw_only=True)
|
|
37
44
|
class IdName:
|
|
38
45
|
id: typing.Union[base_t.ObjectId, str]
|
|
@@ -40,6 +47,9 @@ class IdName:
|
|
|
40
47
|
|
|
41
48
|
|
|
42
49
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
50
|
+
@serial_class(
|
|
51
|
+
named_type_path="sdk.api.id_source.list_id_source.Data",
|
|
52
|
+
)
|
|
43
53
|
@dataclasses.dataclass(kw_only=True)
|
|
44
54
|
class Data:
|
|
45
55
|
results: list[IdName]
|