UncountablePythonSDK 0.0.29__py3-none-any.whl → 0.0.31__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.29.dist-info → UncountablePythonSDK-0.0.31.dist-info}/METADATA +4 -4
- {UncountablePythonSDK-0.0.29.dist-info → UncountablePythonSDK-0.0.31.dist-info}/RECORD +38 -86
- {UncountablePythonSDK-0.0.29.dist-info → UncountablePythonSDK-0.0.31.dist-info}/top_level.txt +0 -1
- docs/conf.py +9 -4
- docs/requirements.txt +5 -5
- examples/async_batch.py +2 -3
- examples/create_entity.py +4 -7
- examples/upload_files.py +1 -1
- pkgs/argument_parser/case_convert.py +4 -3
- pkgs/serialization/serial_class.py +31 -37
- pkgs/type_spec/emit_python.py +0 -1
- pkgs/type_spec/type_info/emit_type_info.py +14 -6
- uncountable/__init__.py +1 -2
- uncountable/core/__init__.py +10 -3
- uncountable/core/async_batch.py +1 -1
- uncountable/core/client.py +27 -17
- uncountable/core/file_upload.py +3 -5
- uncountable/core/types.py +1 -1
- uncountable/integration/construct_client.py +1 -1
- uncountable/integration/cron.py +4 -2
- uncountable/integration/db/connect.py +1 -1
- uncountable/integration/entrypoint.py +4 -5
- uncountable/integration/executors/script_executor.py +11 -5
- uncountable/integration/job.py +5 -8
- uncountable/integration/server.py +5 -5
- uncountable/types/__init__.py +8 -0
- uncountable/types/api/entity/list_entities.py +7 -0
- uncountable/types/api/inputs/set_intermediate_type.py +43 -0
- uncountable/types/api/recipes/add_recipe_to_project.py +35 -0
- uncountable/types/api/recipes/associate_recipe_as_input.py +1 -0
- uncountable/types/api/recipes/edit_recipe_inputs.py +27 -1
- uncountable/types/api/recipes/remove_recipe_from_project.py +35 -0
- uncountable/types/api/recipes/set_recipe_outputs.py +2 -0
- uncountable/types/async_batch_processor.py +0 -1
- uncountable/types/client_base.py +72 -0
- uncountable/types/inputs.py +1 -0
- uncountable/types/recipes.py +21 -0
- examples/recipe-import/importer.py +0 -39
- type_spec/external/api/batch/execute_batch.yaml +0 -56
- type_spec/external/api/batch/execute_batch_load_async.yaml +0 -18
- type_spec/external/api/chemical/convert_chemical_formats.yaml +0 -33
- type_spec/external/api/entity/create_entities.yaml +0 -45
- type_spec/external/api/entity/create_entity.yaml +0 -51
- type_spec/external/api/entity/get_entities_data.yaml +0 -29
- type_spec/external/api/entity/list_entities.yaml +0 -52
- type_spec/external/api/entity/lock_entity.yaml +0 -21
- type_spec/external/api/entity/resolve_entity_ids.yaml +0 -29
- type_spec/external/api/entity/set_values.yaml +0 -18
- type_spec/external/api/entity/transition_entity_phase.yaml +0 -44
- type_spec/external/api/entity/unlock_entity.yaml +0 -18
- type_spec/external/api/field_options/upsert_field_options.yaml +0 -37
- type_spec/external/api/id_source/list_id_source.yaml +0 -35
- type_spec/external/api/id_source/match_id_source.yaml +0 -32
- type_spec/external/api/input_groups/get_input_group_names.yaml +0 -29
- type_spec/external/api/inputs/create_inputs.yaml +0 -48
- type_spec/external/api/inputs/get_input_data.yaml +0 -95
- type_spec/external/api/inputs/get_input_names.yaml +0 -38
- type_spec/external/api/inputs/get_inputs_data.yaml +0 -82
- type_spec/external/api/inputs/set_input_attribute_values.yaml +0 -33
- type_spec/external/api/inputs/set_input_category.yaml +0 -23
- type_spec/external/api/inputs/set_input_subcategories.yaml +0 -23
- type_spec/external/api/material_families/update_entity_material_families.yaml +0 -33
- type_spec/external/api/outputs/get_output_data.yaml +0 -92
- type_spec/external/api/outputs/get_output_names.yaml +0 -35
- type_spec/external/api/outputs/resolve_output_conditions.yaml +0 -50
- type_spec/external/api/permissions/set_core_permissions.yaml +0 -69
- type_spec/external/api/project/get_projects.yaml +0 -42
- type_spec/external/api/project/get_projects_data.yaml +0 -50
- type_spec/external/api/recipe_links/create_recipe_link.yaml +0 -25
- type_spec/external/api/recipe_metadata/get_recipe_metadata_data.yaml +0 -41
- type_spec/external/api/recipes/archive_recipes.yaml +0 -20
- type_spec/external/api/recipes/associate_recipe_as_input.yaml +0 -19
- type_spec/external/api/recipes/associate_recipe_as_lot.yaml +0 -19
- type_spec/external/api/recipes/create_recipe.yaml +0 -42
- type_spec/external/api/recipes/create_recipes.yaml +0 -47
- type_spec/external/api/recipes/disassociate_recipe_as_input.yaml +0 -16
- type_spec/external/api/recipes/edit_recipe_inputs.yaml +0 -85
- type_spec/external/api/recipes/get_curve.yaml +0 -21
- type_spec/external/api/recipes/get_recipe_calculations.yaml +0 -39
- type_spec/external/api/recipes/get_recipe_links.yaml +0 -26
- type_spec/external/api/recipes/get_recipe_names.yaml +0 -29
- type_spec/external/api/recipes/get_recipe_output_metadata.yaml +0 -36
- type_spec/external/api/recipes/get_recipes_data.yaml +0 -244
- type_spec/external/api/recipes/set_recipe_inputs.yaml +0 -42
- type_spec/external/api/recipes/set_recipe_metadata.yaml +0 -20
- type_spec/external/api/recipes/set_recipe_outputs.yaml +0 -52
- type_spec/external/api/recipes/set_recipe_tags.yaml +0 -62
- type_spec/external/api/recipes/unarchive_recipes.yaml +0 -17
- type_spec/external/api/triggers/run_trigger.yaml +0 -18
- {UncountablePythonSDK-0.0.29.dist-info → UncountablePythonSDK-0.0.31.dist-info}/WHEEL +0 -0
uncountable/types/client_base.py
CHANGED
|
@@ -9,6 +9,7 @@ import typing # noqa: F401
|
|
|
9
9
|
import datetime # noqa: F401
|
|
10
10
|
from decimal import Decimal # noqa: F401
|
|
11
11
|
from pkgs.serialization import OpaqueKey
|
|
12
|
+
import uncountable.types.api.recipes.add_recipe_to_project as add_recipe_to_project_t
|
|
12
13
|
import uncountable.types.api.recipes.archive_recipes as archive_recipes_t
|
|
13
14
|
import uncountable.types.api.recipes.associate_recipe_as_input as associate_recipe_as_input_t
|
|
14
15
|
import uncountable.types.api.recipes.associate_recipe_as_lot as associate_recipe_as_lot_t
|
|
@@ -55,6 +56,7 @@ from uncountable.types import recipe_identifiers as recipe_identifiers_t
|
|
|
55
56
|
from uncountable.types import recipe_links as recipe_links_t
|
|
56
57
|
from uncountable.types import recipe_metadata as recipe_metadata_t
|
|
57
58
|
from uncountable.types import recipe_workflow_steps as recipe_workflow_steps_t
|
|
59
|
+
import uncountable.types.api.recipes.remove_recipe_from_project as remove_recipe_from_project_t
|
|
58
60
|
import uncountable.types.api.entity.resolve_entity_ids as resolve_entity_ids_t
|
|
59
61
|
import uncountable.types.api.outputs.resolve_output_conditions as resolve_output_conditions_t
|
|
60
62
|
import uncountable.types.api.triggers.run_trigger as run_trigger_t
|
|
@@ -62,6 +64,7 @@ import uncountable.types.api.permissions.set_core_permissions as set_core_permis
|
|
|
62
64
|
import uncountable.types.api.inputs.set_input_attribute_values as set_input_attribute_values_t
|
|
63
65
|
import uncountable.types.api.inputs.set_input_category as set_input_category_t
|
|
64
66
|
import uncountable.types.api.inputs.set_input_subcategories as set_input_subcategories_t
|
|
67
|
+
import uncountable.types.api.inputs.set_intermediate_type as set_intermediate_type_t
|
|
65
68
|
import uncountable.types.api.recipes.set_recipe_inputs as set_recipe_inputs_t
|
|
66
69
|
import uncountable.types.api.recipes.set_recipe_metadata as set_recipe_metadata_t
|
|
67
70
|
import uncountable.types.api.recipes.set_recipe_outputs as set_recipe_outputs_t
|
|
@@ -91,6 +94,28 @@ class ClientMethods(ABC):
|
|
|
91
94
|
def do_request(self, *, api_request: APIRequest, return_type: type[DT]) -> DT:
|
|
92
95
|
...
|
|
93
96
|
|
|
97
|
+
def add_recipe_to_project(
|
|
98
|
+
self,
|
|
99
|
+
*,
|
|
100
|
+
recipe_key: identifier_t.IdentifierKey,
|
|
101
|
+
project_key: identifier_t.IdentifierKey,
|
|
102
|
+
) -> add_recipe_to_project_t.Data:
|
|
103
|
+
"""Adds a recipe to a project
|
|
104
|
+
|
|
105
|
+
:param recipe_key: The identifier key of the recipe to add to the project
|
|
106
|
+
:param project_key: The identifier key of the project to add the recipe to
|
|
107
|
+
"""
|
|
108
|
+
args = add_recipe_to_project_t.Arguments(
|
|
109
|
+
recipe_key=recipe_key,
|
|
110
|
+
project_key=project_key,
|
|
111
|
+
)
|
|
112
|
+
api_request = APIRequest(
|
|
113
|
+
method=add_recipe_to_project_t.ENDPOINT_METHOD,
|
|
114
|
+
endpoint=add_recipe_to_project_t.ENDPOINT_PATH,
|
|
115
|
+
args=args,
|
|
116
|
+
)
|
|
117
|
+
return self.do_request(api_request=api_request, return_type=add_recipe_to_project_t.Data)
|
|
118
|
+
|
|
94
119
|
def archive_recipes(
|
|
95
120
|
self,
|
|
96
121
|
*,
|
|
@@ -118,15 +143,18 @@ class ClientMethods(ABC):
|
|
|
118
143
|
*,
|
|
119
144
|
recipe_key: identifier_t.IdentifierKey,
|
|
120
145
|
input_key: typing.Optional[identifier_t.IdentifierKey] = None,
|
|
146
|
+
show_in_listings: typing.Optional[bool] = None,
|
|
121
147
|
) -> associate_recipe_as_input_t.Data:
|
|
122
148
|
"""Create or return the input association for a recipe
|
|
123
149
|
|
|
124
150
|
:param recipe_key: Identifier for the recipe
|
|
125
151
|
:param input_key: Identifier for an input to use for the association. Optionally supplied. If not supplied, one is created
|
|
152
|
+
:param show_in_listings: After associating the input should it be present in listings
|
|
126
153
|
"""
|
|
127
154
|
args = associate_recipe_as_input_t.Arguments(
|
|
128
155
|
recipe_key=recipe_key,
|
|
129
156
|
input_key=input_key,
|
|
157
|
+
show_in_listings=show_in_listings,
|
|
130
158
|
)
|
|
131
159
|
api_request = APIRequest(
|
|
132
160
|
method=associate_recipe_as_input_t.ENDPOINT_METHOD,
|
|
@@ -900,6 +928,28 @@ class ClientMethods(ABC):
|
|
|
900
928
|
)
|
|
901
929
|
return self.do_request(api_request=api_request, return_type=match_id_source_t.Data)
|
|
902
930
|
|
|
931
|
+
def remove_recipe_from_project(
|
|
932
|
+
self,
|
|
933
|
+
*,
|
|
934
|
+
recipe_key: identifier_t.IdentifierKey,
|
|
935
|
+
project_key: identifier_t.IdentifierKey,
|
|
936
|
+
) -> remove_recipe_from_project_t.Data:
|
|
937
|
+
"""Removes a recipe from a project
|
|
938
|
+
|
|
939
|
+
:param recipe_key: The identifier key of the recipe to remove from the project
|
|
940
|
+
:param project_key: The identifier key of the project to remove the recipe from
|
|
941
|
+
"""
|
|
942
|
+
args = remove_recipe_from_project_t.Arguments(
|
|
943
|
+
recipe_key=recipe_key,
|
|
944
|
+
project_key=project_key,
|
|
945
|
+
)
|
|
946
|
+
api_request = APIRequest(
|
|
947
|
+
method=remove_recipe_from_project_t.ENDPOINT_METHOD,
|
|
948
|
+
endpoint=remove_recipe_from_project_t.ENDPOINT_PATH,
|
|
949
|
+
args=args,
|
|
950
|
+
)
|
|
951
|
+
return self.do_request(api_request=api_request, return_type=remove_recipe_from_project_t.Data)
|
|
952
|
+
|
|
903
953
|
def resolve_entity_ids(
|
|
904
954
|
self,
|
|
905
955
|
*,
|
|
@@ -1059,6 +1109,28 @@ class ClientMethods(ABC):
|
|
|
1059
1109
|
)
|
|
1060
1110
|
return self.do_request(api_request=api_request, return_type=set_input_subcategories_t.Data)
|
|
1061
1111
|
|
|
1112
|
+
def set_intermediate_type(
|
|
1113
|
+
self,
|
|
1114
|
+
*,
|
|
1115
|
+
input_key: identifier_t.IdentifierKey,
|
|
1116
|
+
intermediate_type: set_intermediate_type_t.IntermediateType,
|
|
1117
|
+
) -> set_intermediate_type_t.Data:
|
|
1118
|
+
"""Sets the type of an intermediate ingredient.
|
|
1119
|
+
|
|
1120
|
+
:param input_key: The identifier key of the intermediate ingredient
|
|
1121
|
+
:param intermediate_type: The new type of the intermediate ingredient
|
|
1122
|
+
"""
|
|
1123
|
+
args = set_intermediate_type_t.Arguments(
|
|
1124
|
+
input_key=input_key,
|
|
1125
|
+
intermediate_type=intermediate_type,
|
|
1126
|
+
)
|
|
1127
|
+
api_request = APIRequest(
|
|
1128
|
+
method=set_intermediate_type_t.ENDPOINT_METHOD,
|
|
1129
|
+
endpoint=set_intermediate_type_t.ENDPOINT_PATH,
|
|
1130
|
+
args=args,
|
|
1131
|
+
)
|
|
1132
|
+
return self.do_request(api_request=api_request, return_type=set_intermediate_type_t.Data)
|
|
1133
|
+
|
|
1062
1134
|
def set_recipe_inputs(
|
|
1063
1135
|
self,
|
|
1064
1136
|
*,
|
uncountable/types/inputs.py
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
2
|
+
# flake8: noqa: F821
|
|
3
|
+
# ruff: noqa: E402
|
|
4
|
+
# fmt: off
|
|
5
|
+
# isort: skip_file
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
import typing # noqa: F401
|
|
8
|
+
import datetime # noqa: F401
|
|
9
|
+
from decimal import Decimal # noqa: F401
|
|
10
|
+
from dataclasses import dataclass
|
|
11
|
+
|
|
12
|
+
__all__: list[str] = [
|
|
13
|
+
"RecipeAttributeFormatting",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
18
|
+
@dataclass(kw_only=True)
|
|
19
|
+
class RecipeAttributeFormatting:
|
|
20
|
+
background_color: str
|
|
21
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
from typing import Iterable, Optional
|
|
2
|
-
import itertools
|
|
3
|
-
from dataclasses import dataclass
|
|
4
|
-
from src.client.requests_client import Client
|
|
5
|
-
from src.types.api.recipes.external_create_recipes import (
|
|
6
|
-
Arguments,
|
|
7
|
-
ExternalCreateRecipeDefinition,
|
|
8
|
-
)
|
|
9
|
-
from src.types.api.entity.external_resolve_entity_identifiers import (
|
|
10
|
-
EntityIdentifier
|
|
11
|
-
)
|
|
12
|
-
from src.types.base import ObjectId
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@dataclass(kw_only=True)
|
|
17
|
-
class RecipeIngredientData:
|
|
18
|
-
ingredient_identifier: EntityIdentifier
|
|
19
|
-
recipe_step_id: Optional[ObjectId] = None
|
|
20
|
-
value_numeric: Optional[str] = None
|
|
21
|
-
value_str: Optional[str] = None
|
|
22
|
-
set_actual_value: bool = False
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def import_recipes(
|
|
26
|
-
client: Client,
|
|
27
|
-
material_family_id: ObjectId,
|
|
28
|
-
project_id: Optional[ObjectId],
|
|
29
|
-
recipe_data: Iterable[ExternalCreateRecipeDefinition],
|
|
30
|
-
batch_size: int = 100,
|
|
31
|
-
) -> None:
|
|
32
|
-
for batch in itertools.batched(recipe_data, batch_size):
|
|
33
|
-
client.external_create_recipes(
|
|
34
|
-
Arguments(
|
|
35
|
-
material_family_id=material_family_id,
|
|
36
|
-
project_id=project_id,
|
|
37
|
-
recipe_definitions=list(batch),
|
|
38
|
-
)
|
|
39
|
-
)
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: post
|
|
4
|
-
path: ${external}/batch/execute_batch
|
|
5
|
-
function: main.site.app.external.batch.execute_batch.execute_batch
|
|
6
|
-
desc: Run multiple API calls via one request
|
|
7
|
-
|
|
8
|
-
RequestMethod:
|
|
9
|
-
type: StringEnum
|
|
10
|
-
values:
|
|
11
|
-
get: GET
|
|
12
|
-
head: HEAD
|
|
13
|
-
post: POST
|
|
14
|
-
put: PUT
|
|
15
|
-
delete: DELETE
|
|
16
|
-
connect: CONNECT
|
|
17
|
-
options: OPTIONS
|
|
18
|
-
trace: TRACE
|
|
19
|
-
patch: PATCH
|
|
20
|
-
|
|
21
|
-
BatchRequest:
|
|
22
|
-
type: Object
|
|
23
|
-
properties:
|
|
24
|
-
path:
|
|
25
|
-
type: String
|
|
26
|
-
method:
|
|
27
|
-
type: RequestMethod
|
|
28
|
-
data:
|
|
29
|
-
convert_value: no_convert
|
|
30
|
-
type: JsonValue
|
|
31
|
-
desc: JSON payload for the api call
|
|
32
|
-
|
|
33
|
-
Arguments:
|
|
34
|
-
type: Object
|
|
35
|
-
properties:
|
|
36
|
-
requests:
|
|
37
|
-
type: List<BatchRequest>
|
|
38
|
-
|
|
39
|
-
BatchResponse:
|
|
40
|
-
type: Object
|
|
41
|
-
properties:
|
|
42
|
-
path:
|
|
43
|
-
type: String
|
|
44
|
-
method:
|
|
45
|
-
type: RequestMethod
|
|
46
|
-
status_code:
|
|
47
|
-
type: Integer
|
|
48
|
-
response:
|
|
49
|
-
convert_value: no_convert
|
|
50
|
-
type: JsonValue
|
|
51
|
-
|
|
52
|
-
Data:
|
|
53
|
-
type: Object
|
|
54
|
-
properties:
|
|
55
|
-
responses:
|
|
56
|
-
type: List<BatchResponse>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: post
|
|
4
|
-
path: ${external}/batch/execute_batch_load_async
|
|
5
|
-
function: main.site.app.external.batch.execute_batch_load_async.execute_batch_load_async
|
|
6
|
-
desc: Run multiple API calls via one request
|
|
7
|
-
|
|
8
|
-
Arguments:
|
|
9
|
-
type: Object
|
|
10
|
-
properties:
|
|
11
|
-
requests:
|
|
12
|
-
type: List<async_batch.AsyncBatchRequest>
|
|
13
|
-
|
|
14
|
-
Data:
|
|
15
|
-
type: Object
|
|
16
|
-
properties:
|
|
17
|
-
job_id:
|
|
18
|
-
type: ObjectId
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: post
|
|
4
|
-
path: ${external}/chemical/convert_chemical_formats
|
|
5
|
-
function: main.site.app.external.chemical.convert_chemical_formats.convert_chemical_formats
|
|
6
|
-
desc: Converts chemical formats, into the format used by Uncountable and usable in other APIs for eg. set_input_attribute_values
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
ChemicalStructureFile:
|
|
10
|
-
type: Object
|
|
11
|
-
properties:
|
|
12
|
-
struct_file:
|
|
13
|
-
type: String
|
|
14
|
-
desc: Stringified chemical structure. MOL v2000/3000, SMILES, Part of SDF.
|
|
15
|
-
|
|
16
|
-
Arguments:
|
|
17
|
-
type: Object
|
|
18
|
-
properties:
|
|
19
|
-
source_chemical_structures:
|
|
20
|
-
type: List<ChemicalStructureFile>
|
|
21
|
-
|
|
22
|
-
UncountableChemicalStructure:
|
|
23
|
-
type: Alias
|
|
24
|
-
alias: Dict<String, JsonValue>
|
|
25
|
-
desc: Uncountable format for chemical structures compatible with set ingredient attributes api etc.
|
|
26
|
-
|
|
27
|
-
Data:
|
|
28
|
-
type: Object
|
|
29
|
-
properties:
|
|
30
|
-
chemical_structures:
|
|
31
|
-
type: List<UncountableChemicalStructure>
|
|
32
|
-
desc: The parsed chemical structures in the Uncountable format
|
|
33
|
-
convert_value: no_convert
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: post
|
|
4
|
-
path: ${external}/entity/external_create_entities
|
|
5
|
-
function: main.site.app.external.entity.create_entities.create_entities
|
|
6
|
-
desc: "Creates new Uncountable entities"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
EntityToCreate:
|
|
10
|
-
type: Object
|
|
11
|
-
properties:
|
|
12
|
-
field_values?:
|
|
13
|
-
type: Optional<List<field_values.FieldRefNameValue>>
|
|
14
|
-
|
|
15
|
-
Arguments:
|
|
16
|
-
type: Object
|
|
17
|
-
properties:
|
|
18
|
-
definition_id:
|
|
19
|
-
type: ObjectId
|
|
20
|
-
desc: "Definition id for the entities to create"
|
|
21
|
-
entity_type:
|
|
22
|
-
type: |
|
|
23
|
-
Union<
|
|
24
|
-
Literal<entity.EntityType.lab_request>,
|
|
25
|
-
Literal<entity.EntityType.approval>,
|
|
26
|
-
Literal<entity.EntityType.custom_entity>,
|
|
27
|
-
Literal<entity.EntityType.inventory_amount>,
|
|
28
|
-
Literal<entity.EntityType.task>,
|
|
29
|
-
Literal<entity.EntityType.project>,
|
|
30
|
-
Literal<entity.EntityType.equipment>,
|
|
31
|
-
Literal<entity.EntityType.inv_local_locations>,
|
|
32
|
-
Literal<entity.EntityType.field_option_set>,
|
|
33
|
-
Literal<entity.EntityType.webhook>
|
|
34
|
-
>
|
|
35
|
-
desc: "The type of the entities to create"
|
|
36
|
-
entities_to_create:
|
|
37
|
-
type: List<EntityToCreate>
|
|
38
|
-
desc: "A list of the entities to create"
|
|
39
|
-
|
|
40
|
-
Data:
|
|
41
|
-
type: Object
|
|
42
|
-
properties:
|
|
43
|
-
entities:
|
|
44
|
-
type: List<entity.Entity>
|
|
45
|
-
desc: The entities created
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: post
|
|
4
|
-
path: ${external}/entity/external_create_entity
|
|
5
|
-
function: main.site.app.external.entity.create_entity.create_entity
|
|
6
|
-
desc: "Creates a new Uncountable entity"
|
|
7
|
-
is_sdk: true
|
|
8
|
-
|
|
9
|
-
EntityFieldInitialValue:
|
|
10
|
-
type: Object
|
|
11
|
-
properties:
|
|
12
|
-
field_ref_name:
|
|
13
|
-
type: String
|
|
14
|
-
desc: "A unique identifer string for the field"
|
|
15
|
-
row_index?:
|
|
16
|
-
type: Optional<Integer>
|
|
17
|
-
desc: "The index in the table for the field"
|
|
18
|
-
value:
|
|
19
|
-
type: JsonValue
|
|
20
|
-
desc: "The value for the field"
|
|
21
|
-
|
|
22
|
-
Arguments:
|
|
23
|
-
type: Object
|
|
24
|
-
properties:
|
|
25
|
-
definition_id:
|
|
26
|
-
type: ObjectId
|
|
27
|
-
desc: "Definition id of the entity to create"
|
|
28
|
-
entity_type:
|
|
29
|
-
type: |
|
|
30
|
-
Union<
|
|
31
|
-
Literal<entity.EntityType.lab_request>,
|
|
32
|
-
Literal<entity.EntityType.approval>,
|
|
33
|
-
Literal<entity.EntityType.custom_entity>,
|
|
34
|
-
Literal<entity.EntityType.inventory_amount>,
|
|
35
|
-
Literal<entity.EntityType.task>,
|
|
36
|
-
Literal<entity.EntityType.project>,
|
|
37
|
-
Literal<entity.EntityType.equipment>,
|
|
38
|
-
Literal<entity.EntityType.inv_local_locations>,
|
|
39
|
-
Literal<entity.EntityType.field_option_set>,
|
|
40
|
-
Literal<entity.EntityType.webhook>
|
|
41
|
-
>
|
|
42
|
-
desc: "The type of the entities requested"
|
|
43
|
-
field_values?:
|
|
44
|
-
type: Optional<List<field_values.FieldRefNameValue>>
|
|
45
|
-
|
|
46
|
-
Data:
|
|
47
|
-
type: Object
|
|
48
|
-
properties:
|
|
49
|
-
entity:
|
|
50
|
-
type: entity.Entity
|
|
51
|
-
desc: The entity created
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: get
|
|
4
|
-
path: ${external}/entity/external_get_entities_data
|
|
5
|
-
function: main.site.app.external.entity.get_entities_data.get_entities_data
|
|
6
|
-
desc: "Gets the details for a passed entity"
|
|
7
|
-
Arguments:
|
|
8
|
-
type: Object
|
|
9
|
-
properties:
|
|
10
|
-
entity_ids:
|
|
11
|
-
type: List<ObjectId>
|
|
12
|
-
desc: "Ids of the entity to retrieve"
|
|
13
|
-
entity_type:
|
|
14
|
-
type: entity.EntityType
|
|
15
|
-
desc: "The type of the entities requested, e.g. lab_request or approval"
|
|
16
|
-
|
|
17
|
-
EntityDetails:
|
|
18
|
-
type: Object
|
|
19
|
-
properties:
|
|
20
|
-
entity:
|
|
21
|
-
type: entity.Entity
|
|
22
|
-
field_values:
|
|
23
|
-
type: List<field_values.FieldRefIdNameValue>
|
|
24
|
-
|
|
25
|
-
Data:
|
|
26
|
-
type: Object
|
|
27
|
-
properties:
|
|
28
|
-
entity_details:
|
|
29
|
-
type: List<EntityDetails>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: get
|
|
4
|
-
path: ${external}/entity/external_list_entities
|
|
5
|
-
function: main.site.app.external.entity.list_entities.list_entities
|
|
6
|
-
desc: "Uses a structured loading configuration to list entities in the system"
|
|
7
|
-
Arguments:
|
|
8
|
-
type: Object
|
|
9
|
-
properties:
|
|
10
|
-
entity_type:
|
|
11
|
-
type: entity.EntityType
|
|
12
|
-
desc: "The type of the entities requested, e.g. lab_request, recipe"
|
|
13
|
-
config_reference:
|
|
14
|
-
type: String
|
|
15
|
-
desc: "The configuration reference name for the listing config"
|
|
16
|
-
attributes?:
|
|
17
|
-
type: Dict<OpaqueKey, JsonValue>
|
|
18
|
-
desc: "Attributes to pass to the configuration for parameterizing filters"
|
|
19
|
-
offset?:
|
|
20
|
-
type: Optional<Integer>
|
|
21
|
-
desc: Used for pagination. Pagination is done based on the sorting of the config. [Pagination More Info](#pagination)
|
|
22
|
-
limit?:
|
|
23
|
-
type: Optional<Integer>
|
|
24
|
-
desc: The number of data points to return. If not filled in, it will be set to 100, and cannot be set higher than 100. [Pagination More Info](#pagination)
|
|
25
|
-
|
|
26
|
-
EntityResult:
|
|
27
|
-
type: Object
|
|
28
|
-
properties:
|
|
29
|
-
entity:
|
|
30
|
-
type: entity.Entity
|
|
31
|
-
desc: "The entity represented by the record"
|
|
32
|
-
column_values:
|
|
33
|
-
type: List<JsonValue>
|
|
34
|
-
desc: "The column values loaded from the configuration"
|
|
35
|
-
|
|
36
|
-
ColumnAccess:
|
|
37
|
-
type: Object
|
|
38
|
-
properties:
|
|
39
|
-
name:
|
|
40
|
-
type: String
|
|
41
|
-
desc: "The name for the identifier for this column. Note that this will be replaced with the label in the future"
|
|
42
|
-
table_label:
|
|
43
|
-
type: Optional<String>
|
|
44
|
-
desc: "The name manually set for the column"
|
|
45
|
-
|
|
46
|
-
Data:
|
|
47
|
-
type: Object
|
|
48
|
-
properties:
|
|
49
|
-
columns:
|
|
50
|
-
type: List<ColumnAccess>
|
|
51
|
-
results:
|
|
52
|
-
type: List<EntityResult>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: post
|
|
4
|
-
path: ${external}/entity/external_lock_entity
|
|
5
|
-
function: main.site.app.external.entity.external_lock_entity.external_lock_entity
|
|
6
|
-
desc: Lock an entity
|
|
7
|
-
|
|
8
|
-
Arguments:
|
|
9
|
-
type: Object
|
|
10
|
-
properties:
|
|
11
|
-
entity_key:
|
|
12
|
-
type: identifier.IdentifierKey
|
|
13
|
-
desc: "Identifier for the entity"
|
|
14
|
-
entity_type:
|
|
15
|
-
type: entity.EntityType
|
|
16
|
-
globally_removable?:
|
|
17
|
-
type: Boolean
|
|
18
|
-
desc: "Should the lock be removable by any user or just admins"
|
|
19
|
-
|
|
20
|
-
Data:
|
|
21
|
-
type: async_batch.AsyncBatchActionReturn
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: get
|
|
4
|
-
path: ${external}/entity/external_resolve_entity_ids
|
|
5
|
-
function: main.site.app.external.entity.resolve_entity_ids.resolve_entity_ids
|
|
6
|
-
desc: "Gets the names for passed in ids"
|
|
7
|
-
Arguments:
|
|
8
|
-
type: Object
|
|
9
|
-
properties:
|
|
10
|
-
entity_ids:
|
|
11
|
-
type: List<Union<String, ObjectId>>
|
|
12
|
-
desc: "Ids of the entity to retrieve"
|
|
13
|
-
entity_type:
|
|
14
|
-
type: entity.EntityType
|
|
15
|
-
desc: "The type of the entities requested"
|
|
16
|
-
|
|
17
|
-
EntityNames:
|
|
18
|
-
type: Object
|
|
19
|
-
properties:
|
|
20
|
-
id:
|
|
21
|
-
type: Union<String, Integer>
|
|
22
|
-
name:
|
|
23
|
-
type: String
|
|
24
|
-
|
|
25
|
-
Data:
|
|
26
|
-
type: Object
|
|
27
|
-
properties:
|
|
28
|
-
items:
|
|
29
|
-
type: List<EntityNames>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: post
|
|
4
|
-
path: ${external}/entity/external_set_values
|
|
5
|
-
function: main.site.app.external.entity.set_values.set_values
|
|
6
|
-
desc: "Sets field values for an entity"
|
|
7
|
-
|
|
8
|
-
Arguments:
|
|
9
|
-
type: Object
|
|
10
|
-
properties:
|
|
11
|
-
entity:
|
|
12
|
-
type: entity.Entity
|
|
13
|
-
values:
|
|
14
|
-
type: List<field_values.ArgumentValueRefName>
|
|
15
|
-
|
|
16
|
-
Data:
|
|
17
|
-
type: response.Response
|
|
18
|
-
properties:
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: post
|
|
4
|
-
path: ${external}/entity/transition_entity_phase
|
|
5
|
-
function: main.site.app.external.entity.transition_entity_phase.transition_entity_phase
|
|
6
|
-
desc: "Transitions an entity from one phase to another"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
TransitionIdentifierPhases:
|
|
10
|
-
type: Object
|
|
11
|
-
properties:
|
|
12
|
-
type:
|
|
13
|
-
type: Literal<'phases'>
|
|
14
|
-
phase_from_key:
|
|
15
|
-
type: identifier.IdentifierKey
|
|
16
|
-
phase_to_key:
|
|
17
|
-
type: identifier.IdentifierKey
|
|
18
|
-
|
|
19
|
-
TransitionIdentifierTransition:
|
|
20
|
-
type: Object
|
|
21
|
-
properties:
|
|
22
|
-
type:
|
|
23
|
-
type: Literal<'transition'>
|
|
24
|
-
transition_key:
|
|
25
|
-
type: identifier.IdentifierKey
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
TransitionIdentifier:
|
|
29
|
-
type: Alias
|
|
30
|
-
alias: |
|
|
31
|
-
Union<TransitionIdentifierPhases, TransitionIdentifierTransition>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Arguments:
|
|
35
|
-
type: Object
|
|
36
|
-
properties:
|
|
37
|
-
entity:
|
|
38
|
-
type: entity.Entity
|
|
39
|
-
transition:
|
|
40
|
-
type: TransitionIdentifier
|
|
41
|
-
|
|
42
|
-
Data:
|
|
43
|
-
type: response.Response
|
|
44
|
-
properties:
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: post
|
|
4
|
-
path: ${external}/entity/external_unlock_entity
|
|
5
|
-
function: main.site.app.external.entity.external_unlock_entity.external_unlock_entity
|
|
6
|
-
desc: Unlock an entity
|
|
7
|
-
|
|
8
|
-
Arguments:
|
|
9
|
-
type: Object
|
|
10
|
-
properties:
|
|
11
|
-
entity_key:
|
|
12
|
-
type: identifier.IdentifierKey
|
|
13
|
-
desc: "Identifier for the entity"
|
|
14
|
-
entity_type:
|
|
15
|
-
type: entity.EntityType
|
|
16
|
-
|
|
17
|
-
Data:
|
|
18
|
-
type: async_batch.AsyncBatchActionReturn
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: post
|
|
4
|
-
path: ${external}/field_options/upsert_field_options
|
|
5
|
-
function: main.site.app.external.field_options.upsert_field_options.upsert_field_options
|
|
6
|
-
desc: "Creates or updates field options for an option set"
|
|
7
|
-
is_sdk: true
|
|
8
|
-
|
|
9
|
-
FieldOption:
|
|
10
|
-
type: Object
|
|
11
|
-
properties:
|
|
12
|
-
option_id:
|
|
13
|
-
type: String
|
|
14
|
-
desc: "A unique identifer for the option. This is required to be a string with no symbols"
|
|
15
|
-
option_value?:
|
|
16
|
-
type: String
|
|
17
|
-
desc: "The label for the option. If none is set, then the existing value will be used. If there is no existing value, then the option id will be used."
|
|
18
|
-
archived?:
|
|
19
|
-
type: Boolean
|
|
20
|
-
desc: "If included, whether to set the option to be archived or unarchived"
|
|
21
|
-
subsets?:
|
|
22
|
-
type: List<String>
|
|
23
|
-
desc: "If included, what subsets to include the option in"
|
|
24
|
-
|
|
25
|
-
Arguments:
|
|
26
|
-
type: Object
|
|
27
|
-
properties:
|
|
28
|
-
option_set_key:
|
|
29
|
-
type: identifier.IdentifierKey
|
|
30
|
-
desc: "Identifier for the field option set"
|
|
31
|
-
field_options:
|
|
32
|
-
type: List<FieldOption>
|
|
33
|
-
desc: Field options to upsert
|
|
34
|
-
|
|
35
|
-
Data:
|
|
36
|
-
type: Object
|
|
37
|
-
properties:
|