UncountablePythonSDK 0.0.5__py3-none-any.whl → 0.0.7__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.5.dist-info → UncountablePythonSDK-0.0.7.dist-info}/METADATA +1 -1
- UncountablePythonSDK-0.0.7.dist-info/RECORD +119 -0
- {UncountablePythonSDK-0.0.5.dist-info → UncountablePythonSDK-0.0.7.dist-info}/WHEEL +1 -1
- pkgs/type_spec/builder.py +0 -61
- pkgs/type_spec/config.py +3 -0
- pkgs/type_spec/emit_open_api.py +33 -22
- pkgs/type_spec/emit_open_api_util.py +6 -2
- pkgs/type_spec/emit_python.py +3 -2
- type_spec/external/api/entity/create_entities.yaml +33 -0
- type_spec/external/api/entity/{external_create_entity.yaml → create_entity.yaml} +4 -14
- type_spec/external/api/entity/{external_get_entities_data.yaml → get_entities_data.yaml} +6 -6
- type_spec/external/api/entity/{external_list_entities.yaml → list_entities.yaml} +6 -6
- type_spec/external/api/entity/{external_resolve_entity_ids.yaml → resolve_entity_ids.yaml} +2 -2
- type_spec/external/api/entity/{external_set_values.yaml → set_values.yaml} +4 -4
- type_spec/external/api/input_groups/{external_get_input_group_names.yaml → get_input_group_names.yaml} +2 -2
- type_spec/external/api/inputs/{external_create_inputs.yaml → create_inputs.yaml} +4 -4
- type_spec/external/api/inputs/{external_get_input_data.yaml → get_input_data.yaml} +10 -10
- type_spec/external/api/inputs/{external_get_input_names.yaml → get_input_names.yaml} +2 -2
- type_spec/external/api/inputs/{external_get_inputs_data.yaml → get_inputs_data.yaml} +10 -10
- type_spec/external/api/inputs/{external_set_input_attribute_values.yaml → set_input_attribute_values.yaml} +2 -2
- type_spec/external/api/outputs/{external_get_output_data.yaml → get_output_data.yaml} +10 -10
- type_spec/external/api/outputs/{external_get_output_names.yaml → get_output_names.yaml} +2 -2
- type_spec/external/api/project/{external_get_projects.yaml → get_projects.yaml} +4 -4
- type_spec/external/api/project/{external_get_projects_data.yaml → get_projects_data.yaml} +8 -8
- type_spec/external/api/recipe_metadata/{external_get_recipe_metadata_data.yaml → get_recipe_metadata_data.yaml} +2 -2
- type_spec/external/api/recipes/{external_create_recipes.yaml → create_recipes.yaml} +6 -6
- type_spec/external/api/recipes/{external_get_curve.yaml → get_curve.yaml} +5 -5
- type_spec/external/api/recipes/{external_get_recipe_calculations.yaml → get_recipe_calculations.yaml} +4 -4
- type_spec/external/api/recipes/get_recipe_links.yaml +26 -0
- type_spec/external/api/recipes/{external_get_recipe_names.yaml → get_recipe_names.yaml} +2 -2
- type_spec/external/api/recipes/{external_get_recipe_output_metadata.yaml → get_recipe_output_metadata.yaml} +4 -4
- type_spec/external/api/recipes/{external_get_recipes_data.yaml → get_recipes_data.yaml} +38 -38
- uncountable/types/__init__.py +60 -54
- uncountable/types/api/entity/{external_create_entities.py → create_entities.py} +5 -25
- uncountable/types/api/entity/{external_create_entity.py → create_entity.py} +7 -13
- uncountable/types/api/entity/{external_get_entities_data.py → get_entities_data.py} +9 -9
- uncountable/types/api/entity/{external_list_entities.py → list_entities.py} +9 -9
- uncountable/types/api/entity/{external_resolve_entity_ids.py → resolve_entity_ids.py} +3 -3
- uncountable/types/api/entity/{external_set_values.py → set_values.py} +6 -6
- uncountable/types/api/input_groups/{external_get_input_group_names.py → get_input_group_names.py} +3 -3
- uncountable/types/api/inputs/{external_create_inputs.py → create_inputs.py} +6 -6
- uncountable/types/api/inputs/{external_get_input_data.py → get_input_data.py} +15 -15
- uncountable/types/api/inputs/{external_get_input_names.py → get_input_names.py} +3 -3
- uncountable/types/api/inputs/{external_get_inputs_data.py → get_inputs_data.py} +15 -15
- uncountable/types/api/inputs/{external_set_input_attribute_values.py → set_input_attribute_values.py} +3 -3
- uncountable/types/api/outputs/{external_get_output_data.py → get_output_data.py} +15 -15
- uncountable/types/api/outputs/{external_get_output_names.py → get_output_names.py} +3 -3
- uncountable/types/api/project/{external_get_projects.py → get_projects.py} +6 -6
- uncountable/types/api/project/{external_get_projects_data.py → get_projects_data.py} +12 -12
- uncountable/types/api/recipe_metadata/{external_get_recipe_metadata_data.py → get_recipe_metadata_data.py} +3 -3
- uncountable/types/api/recipes/{external_create_recipes.py → create_recipes.py} +9 -9
- uncountable/types/api/recipes/{external_get_curve.py → get_curve.py} +7 -7
- uncountable/types/api/recipes/{external_get_recipe_calculations.py → get_recipe_calculations.py} +6 -6
- uncountable/types/api/recipes/get_recipe_links.py +36 -0
- uncountable/types/api/recipes/{external_get_recipe_names.py → get_recipe_names.py} +3 -3
- uncountable/types/api/recipes/{external_get_recipe_output_metadata.py → get_recipe_output_metadata.py} +6 -6
- uncountable/types/api/recipes/{external_get_recipes_data.py → get_recipes_data.py} +57 -57
- uncountable/types/client_base.py +220 -217
- uncountable/types/entity.py +271 -0
- uncountable/types/field_values.py +28 -0
- uncountable/types/{api/recipes/external_get_recipe_links.py → recipe_links.py} +4 -25
- UncountablePythonSDK-0.0.5.dist-info/RECORD +0 -116
- type_spec/external/api/entity/external_create_entities.yaml +0 -55
- type_spec/external/api/recipes/external_get_recipe_links.yaml +0 -61
- {UncountablePythonSDK-0.0.5.dist-info → UncountablePythonSDK-0.0.7.dist-info}/top_level.txt +0 -0
- /type_spec/external/api/outputs/{external_resolve_output_conditions.yaml → resolve_output_conditions.yaml} +0 -0
- /type_spec/external/api/recipes/{external_set_recipe_inputs.yaml → set_recipe_inputs.yaml} +0 -0
- /type_spec/external/api/recipes/{external_set_recipe_outputs.yaml → set_recipe_outputs.yaml} +0 -0
- /uncountable/types/api/outputs/{external_resolve_output_conditions.py → resolve_output_conditions.py} +0 -0
- /uncountable/types/api/recipes/{external_set_recipe_inputs.py → set_recipe_inputs.py} +0 -0
- /uncountable/types/api/recipes/{external_set_recipe_outputs.py → set_recipe_outputs.py} +0 -0
uncountable/types/client_base.py
CHANGED
|
@@ -10,34 +10,37 @@ import datetime # noqa: F401
|
|
|
10
10
|
from decimal import Decimal # noqa: F401
|
|
11
11
|
from pkgs.serialization import OpaqueKey
|
|
12
12
|
from . import base as base_t
|
|
13
|
+
import uncountable.types.api.entity.create_entities as create_entities_t
|
|
14
|
+
import uncountable.types.api.entity.create_entity as create_entity_t
|
|
15
|
+
import uncountable.types.api.inputs.create_inputs as create_inputs_t
|
|
16
|
+
import uncountable.types.api.recipes.create_recipes as create_recipes_t
|
|
17
|
+
from . import entity as entity_t
|
|
13
18
|
import uncountable.types.api.batch.execute_batch as execute_batch_t
|
|
14
|
-
|
|
15
|
-
import uncountable.types.api.
|
|
16
|
-
import uncountable.types.api.
|
|
17
|
-
import uncountable.types.api.
|
|
18
|
-
import uncountable.types.api.
|
|
19
|
-
import uncountable.types.api.
|
|
20
|
-
import uncountable.types.api.inputs.
|
|
21
|
-
import uncountable.types.api.
|
|
22
|
-
import uncountable.types.api.
|
|
23
|
-
import uncountable.types.api.
|
|
24
|
-
import uncountable.types.api.
|
|
25
|
-
import uncountable.types.api.
|
|
26
|
-
import uncountable.types.api.
|
|
27
|
-
import uncountable.types.api.
|
|
28
|
-
import uncountable.types.api.recipes.
|
|
29
|
-
import uncountable.types.api.recipes.
|
|
30
|
-
import uncountable.types.api.
|
|
31
|
-
import uncountable.types.api.
|
|
32
|
-
|
|
33
|
-
import uncountable.types.api.
|
|
34
|
-
import uncountable.types.api.
|
|
35
|
-
import uncountable.types.api.
|
|
36
|
-
import uncountable.types.api.
|
|
37
|
-
import uncountable.types.api.
|
|
38
|
-
import uncountable.types.api.
|
|
39
|
-
import uncountable.types.api.recipes.external_set_recipe_outputs as external_set_recipe_outputs_t
|
|
40
|
-
import uncountable.types.api.entity.external_set_values as external_set_values_t
|
|
19
|
+
from . import field_values as field_values_t
|
|
20
|
+
import uncountable.types.api.recipes.get_curve as get_curve_t
|
|
21
|
+
import uncountable.types.api.entity.get_entities_data as get_entities_data_t
|
|
22
|
+
import uncountable.types.api.inputs.get_input_data as get_input_data_t
|
|
23
|
+
import uncountable.types.api.input_groups.get_input_group_names as get_input_group_names_t
|
|
24
|
+
import uncountable.types.api.inputs.get_input_names as get_input_names_t
|
|
25
|
+
import uncountable.types.api.inputs.get_inputs_data as get_inputs_data_t
|
|
26
|
+
import uncountable.types.api.outputs.get_output_data as get_output_data_t
|
|
27
|
+
import uncountable.types.api.outputs.get_output_names as get_output_names_t
|
|
28
|
+
import uncountable.types.api.project.get_projects as get_projects_t
|
|
29
|
+
import uncountable.types.api.project.get_projects_data as get_projects_data_t
|
|
30
|
+
import uncountable.types.api.recipes.get_recipe_calculations as get_recipe_calculations_t
|
|
31
|
+
import uncountable.types.api.recipes.get_recipe_links as get_recipe_links_t
|
|
32
|
+
import uncountable.types.api.recipe_metadata.get_recipe_metadata_data as get_recipe_metadata_data_t
|
|
33
|
+
import uncountable.types.api.recipes.get_recipe_names as get_recipe_names_t
|
|
34
|
+
import uncountable.types.api.recipes.get_recipe_output_metadata as get_recipe_output_metadata_t
|
|
35
|
+
import uncountable.types.api.recipes.get_recipes_data as get_recipes_data_t
|
|
36
|
+
import uncountable.types.api.entity.list_entities as list_entities_t
|
|
37
|
+
from . import recipe_links as recipe_links_t
|
|
38
|
+
import uncountable.types.api.entity.resolve_entity_ids as resolve_entity_ids_t
|
|
39
|
+
import uncountable.types.api.outputs.resolve_output_conditions as resolve_output_conditions_t
|
|
40
|
+
import uncountable.types.api.inputs.set_input_attribute_values as set_input_attribute_values_t
|
|
41
|
+
import uncountable.types.api.recipes.set_recipe_inputs as set_recipe_inputs_t
|
|
42
|
+
import uncountable.types.api.recipes.set_recipe_outputs as set_recipe_outputs_t
|
|
43
|
+
import uncountable.types.api.entity.set_values as set_values_t
|
|
41
44
|
from abc import ABC, abstractmethod
|
|
42
45
|
from dataclasses import dataclass
|
|
43
46
|
|
|
@@ -58,133 +61,133 @@ class ClientMethods(ABC):
|
|
|
58
61
|
...
|
|
59
62
|
|
|
60
63
|
|
|
61
|
-
def
|
|
62
|
-
self,
|
|
63
|
-
*,
|
|
64
|
-
requests: list[execute_batch_t.BatchRequest],
|
|
65
|
-
) -> execute_batch_t.Data:
|
|
66
|
-
args = execute_batch_t.Arguments(
|
|
67
|
-
requests=requests,
|
|
68
|
-
)
|
|
69
|
-
api_request = APIRequest(
|
|
70
|
-
method=execute_batch_t.ENDPOINT_METHOD,
|
|
71
|
-
endpoint=execute_batch_t.ENDPOINT_PATH,
|
|
72
|
-
args=args,
|
|
73
|
-
)
|
|
74
|
-
return self.do_request(api_request=api_request, return_type=execute_batch_t.Data)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
def external_create_entities(
|
|
64
|
+
def create_entities(
|
|
78
65
|
self,
|
|
79
66
|
*,
|
|
80
67
|
definition_id: int,
|
|
81
|
-
entity_type: typing.Union[typing.Literal[
|
|
82
|
-
entities_to_create: list[
|
|
83
|
-
) ->
|
|
84
|
-
args =
|
|
68
|
+
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]],
|
|
69
|
+
entities_to_create: list[create_entities_t.EntityToCreate],
|
|
70
|
+
) -> create_entities_t.Data:
|
|
71
|
+
args = create_entities_t.Arguments(
|
|
85
72
|
definition_id=definition_id,
|
|
86
73
|
entity_type=entity_type,
|
|
87
74
|
entities_to_create=entities_to_create,
|
|
88
75
|
)
|
|
89
76
|
api_request = APIRequest(
|
|
90
|
-
method=
|
|
91
|
-
endpoint=
|
|
77
|
+
method=create_entities_t.ENDPOINT_METHOD,
|
|
78
|
+
endpoint=create_entities_t.ENDPOINT_PATH,
|
|
92
79
|
args=args,
|
|
93
80
|
)
|
|
94
|
-
return self.do_request(api_request=api_request, return_type=
|
|
81
|
+
return self.do_request(api_request=api_request, return_type=create_entities_t.Data)
|
|
95
82
|
|
|
96
83
|
|
|
97
|
-
def
|
|
84
|
+
def create_entity(
|
|
98
85
|
self,
|
|
99
86
|
*,
|
|
100
87
|
definition_id: int,
|
|
101
|
-
entity_type: typing.Union[typing.Literal[
|
|
102
|
-
field_values: typing.Optional[typing.Optional[list[
|
|
103
|
-
) ->
|
|
104
|
-
args =
|
|
88
|
+
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]],
|
|
89
|
+
field_values: typing.Optional[typing.Optional[list[field_values_t.FieldRefNameValue]]] = None,
|
|
90
|
+
) -> create_entity_t.Data:
|
|
91
|
+
args = create_entity_t.Arguments(
|
|
105
92
|
definition_id=definition_id,
|
|
106
93
|
entity_type=entity_type,
|
|
107
94
|
field_values=field_values,
|
|
108
95
|
)
|
|
109
96
|
api_request = APIRequest(
|
|
110
|
-
method=
|
|
111
|
-
endpoint=
|
|
97
|
+
method=create_entity_t.ENDPOINT_METHOD,
|
|
98
|
+
endpoint=create_entity_t.ENDPOINT_PATH,
|
|
112
99
|
args=args,
|
|
113
100
|
)
|
|
114
|
-
return self.do_request(api_request=api_request, return_type=
|
|
101
|
+
return self.do_request(api_request=api_request, return_type=create_entity_t.Data)
|
|
115
102
|
|
|
116
103
|
|
|
117
104
|
def external_create_inputs(
|
|
118
105
|
self,
|
|
119
106
|
*,
|
|
120
|
-
inputs_to_create: list[
|
|
121
|
-
) ->
|
|
122
|
-
args =
|
|
107
|
+
inputs_to_create: list[create_inputs_t.InputToCreate],
|
|
108
|
+
) -> create_inputs_t.Data:
|
|
109
|
+
args = create_inputs_t.Arguments(
|
|
123
110
|
inputs_to_create=inputs_to_create,
|
|
124
111
|
)
|
|
125
112
|
api_request = APIRequest(
|
|
126
|
-
method=
|
|
127
|
-
endpoint=
|
|
113
|
+
method=create_inputs_t.ENDPOINT_METHOD,
|
|
114
|
+
endpoint=create_inputs_t.ENDPOINT_PATH,
|
|
128
115
|
args=args,
|
|
129
116
|
)
|
|
130
|
-
return self.do_request(api_request=api_request, return_type=
|
|
117
|
+
return self.do_request(api_request=api_request, return_type=create_inputs_t.Data)
|
|
131
118
|
|
|
132
119
|
|
|
133
|
-
def
|
|
120
|
+
def create_recipes(
|
|
134
121
|
self,
|
|
135
122
|
*,
|
|
136
123
|
material_family_id: int,
|
|
137
|
-
recipe_definitions: list[
|
|
124
|
+
recipe_definitions: list[create_recipes_t.CreateRecipeDefinition],
|
|
138
125
|
project_id: typing.Optional[int] = None,
|
|
139
|
-
) ->
|
|
140
|
-
args =
|
|
126
|
+
) -> create_recipes_t.Data:
|
|
127
|
+
args = create_recipes_t.Arguments(
|
|
141
128
|
material_family_id=material_family_id,
|
|
142
129
|
project_id=project_id,
|
|
143
130
|
recipe_definitions=recipe_definitions,
|
|
144
131
|
)
|
|
145
132
|
api_request = APIRequest(
|
|
146
|
-
method=
|
|
147
|
-
endpoint=
|
|
133
|
+
method=create_recipes_t.ENDPOINT_METHOD,
|
|
134
|
+
endpoint=create_recipes_t.ENDPOINT_PATH,
|
|
148
135
|
args=args,
|
|
149
136
|
)
|
|
150
|
-
return self.do_request(api_request=api_request, return_type=
|
|
137
|
+
return self.do_request(api_request=api_request, return_type=create_recipes_t.Data)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def execute_batch(
|
|
141
|
+
self,
|
|
142
|
+
*,
|
|
143
|
+
requests: list[execute_batch_t.BatchRequest],
|
|
144
|
+
) -> execute_batch_t.Data:
|
|
145
|
+
args = execute_batch_t.Arguments(
|
|
146
|
+
requests=requests,
|
|
147
|
+
)
|
|
148
|
+
api_request = APIRequest(
|
|
149
|
+
method=execute_batch_t.ENDPOINT_METHOD,
|
|
150
|
+
endpoint=execute_batch_t.ENDPOINT_PATH,
|
|
151
|
+
args=args,
|
|
152
|
+
)
|
|
153
|
+
return self.do_request(api_request=api_request, return_type=execute_batch_t.Data)
|
|
151
154
|
|
|
152
155
|
|
|
153
|
-
def
|
|
156
|
+
def get_curve(
|
|
154
157
|
self,
|
|
155
158
|
*,
|
|
156
159
|
recipe_output_id: int,
|
|
157
|
-
) ->
|
|
158
|
-
args =
|
|
160
|
+
) -> get_curve_t.Data:
|
|
161
|
+
args = get_curve_t.Arguments(
|
|
159
162
|
recipe_output_id=recipe_output_id,
|
|
160
163
|
)
|
|
161
164
|
api_request = APIRequest(
|
|
162
|
-
method=
|
|
163
|
-
endpoint=
|
|
165
|
+
method=get_curve_t.ENDPOINT_METHOD,
|
|
166
|
+
endpoint=get_curve_t.ENDPOINT_PATH,
|
|
164
167
|
args=args,
|
|
165
168
|
)
|
|
166
|
-
return self.do_request(api_request=api_request, return_type=
|
|
169
|
+
return self.do_request(api_request=api_request, return_type=get_curve_t.Data)
|
|
167
170
|
|
|
168
171
|
|
|
169
|
-
def
|
|
172
|
+
def get_entities_data(
|
|
170
173
|
self,
|
|
171
174
|
*,
|
|
172
175
|
entity_ids: list[int],
|
|
173
176
|
entity_type: str,
|
|
174
|
-
) ->
|
|
175
|
-
args =
|
|
177
|
+
) -> get_entities_data_t.Data:
|
|
178
|
+
args = get_entities_data_t.Arguments(
|
|
176
179
|
entity_ids=entity_ids,
|
|
177
180
|
entity_type=entity_type,
|
|
178
181
|
)
|
|
179
182
|
api_request = APIRequest(
|
|
180
|
-
method=
|
|
181
|
-
endpoint=
|
|
183
|
+
method=get_entities_data_t.ENDPOINT_METHOD,
|
|
184
|
+
endpoint=get_entities_data_t.ENDPOINT_PATH,
|
|
182
185
|
args=args,
|
|
183
186
|
)
|
|
184
|
-
return self.do_request(api_request=api_request, return_type=
|
|
187
|
+
return self.do_request(api_request=api_request, return_type=get_entities_data_t.Data)
|
|
185
188
|
|
|
186
189
|
|
|
187
|
-
def
|
|
190
|
+
def get_input_data(
|
|
188
191
|
self,
|
|
189
192
|
*,
|
|
190
193
|
material_family_id: int,
|
|
@@ -192,8 +195,8 @@ class ClientMethods(ABC):
|
|
|
192
195
|
offset: typing.Optional[int],
|
|
193
196
|
is_parameter: typing.Optional[bool],
|
|
194
197
|
limit: typing.Optional[int],
|
|
195
|
-
) ->
|
|
196
|
-
args =
|
|
198
|
+
) -> get_input_data_t.Data:
|
|
199
|
+
args = get_input_data_t.Arguments(
|
|
197
200
|
material_family_id=material_family_id,
|
|
198
201
|
input_ids=input_ids,
|
|
199
202
|
offset=offset,
|
|
@@ -201,262 +204,262 @@ class ClientMethods(ABC):
|
|
|
201
204
|
limit=limit,
|
|
202
205
|
)
|
|
203
206
|
api_request = APIRequest(
|
|
204
|
-
method=
|
|
205
|
-
endpoint=
|
|
207
|
+
method=get_input_data_t.ENDPOINT_METHOD,
|
|
208
|
+
endpoint=get_input_data_t.ENDPOINT_PATH,
|
|
206
209
|
args=args,
|
|
207
210
|
)
|
|
208
|
-
return self.do_request(api_request=api_request, return_type=
|
|
211
|
+
return self.do_request(api_request=api_request, return_type=get_input_data_t.Data)
|
|
209
212
|
|
|
210
213
|
|
|
211
|
-
def
|
|
214
|
+
def get_input_group_names(
|
|
212
215
|
self,
|
|
213
216
|
*,
|
|
214
217
|
material_family_id: int,
|
|
215
|
-
) ->
|
|
216
|
-
args =
|
|
218
|
+
) -> get_input_group_names_t.Data:
|
|
219
|
+
args = get_input_group_names_t.Arguments(
|
|
217
220
|
material_family_id=material_family_id,
|
|
218
221
|
)
|
|
219
222
|
api_request = APIRequest(
|
|
220
|
-
method=
|
|
221
|
-
endpoint=
|
|
223
|
+
method=get_input_group_names_t.ENDPOINT_METHOD,
|
|
224
|
+
endpoint=get_input_group_names_t.ENDPOINT_PATH,
|
|
222
225
|
args=args,
|
|
223
226
|
)
|
|
224
|
-
return self.do_request(api_request=api_request, return_type=
|
|
227
|
+
return self.do_request(api_request=api_request, return_type=get_input_group_names_t.Data)
|
|
225
228
|
|
|
226
229
|
|
|
227
|
-
def
|
|
230
|
+
def get_input_names(
|
|
228
231
|
self,
|
|
229
232
|
*,
|
|
230
233
|
material_family_id: int,
|
|
231
234
|
offset: typing.Optional[int],
|
|
232
235
|
is_parameter: typing.Optional[bool],
|
|
233
236
|
limit: typing.Optional[int],
|
|
234
|
-
) ->
|
|
235
|
-
args =
|
|
237
|
+
) -> get_input_names_t.Data:
|
|
238
|
+
args = get_input_names_t.Arguments(
|
|
236
239
|
material_family_id=material_family_id,
|
|
237
240
|
offset=offset,
|
|
238
241
|
is_parameter=is_parameter,
|
|
239
242
|
limit=limit,
|
|
240
243
|
)
|
|
241
244
|
api_request = APIRequest(
|
|
242
|
-
method=
|
|
243
|
-
endpoint=
|
|
245
|
+
method=get_input_names_t.ENDPOINT_METHOD,
|
|
246
|
+
endpoint=get_input_names_t.ENDPOINT_PATH,
|
|
244
247
|
args=args,
|
|
245
248
|
)
|
|
246
|
-
return self.do_request(api_request=api_request, return_type=
|
|
249
|
+
return self.do_request(api_request=api_request, return_type=get_input_names_t.Data)
|
|
247
250
|
|
|
248
251
|
|
|
249
|
-
def
|
|
252
|
+
def get_inputs_data(
|
|
250
253
|
self,
|
|
251
254
|
*,
|
|
252
255
|
input_ids: list[int],
|
|
253
|
-
) ->
|
|
254
|
-
args =
|
|
256
|
+
) -> get_inputs_data_t.Data:
|
|
257
|
+
args = get_inputs_data_t.Arguments(
|
|
255
258
|
input_ids=input_ids,
|
|
256
259
|
)
|
|
257
260
|
api_request = APIRequest(
|
|
258
|
-
method=
|
|
259
|
-
endpoint=
|
|
261
|
+
method=get_inputs_data_t.ENDPOINT_METHOD,
|
|
262
|
+
endpoint=get_inputs_data_t.ENDPOINT_PATH,
|
|
260
263
|
args=args,
|
|
261
264
|
)
|
|
262
|
-
return self.do_request(api_request=api_request, return_type=
|
|
265
|
+
return self.do_request(api_request=api_request, return_type=get_inputs_data_t.Data)
|
|
263
266
|
|
|
264
267
|
|
|
265
|
-
def
|
|
268
|
+
def get_output_data(
|
|
266
269
|
self,
|
|
267
270
|
*,
|
|
268
271
|
material_family_id: int,
|
|
269
272
|
output_ids: typing.Optional[list[int]] = None,
|
|
270
273
|
offset: typing.Optional[int] = None,
|
|
271
274
|
limit: typing.Optional[int] = None,
|
|
272
|
-
) ->
|
|
273
|
-
args =
|
|
275
|
+
) -> get_output_data_t.Data:
|
|
276
|
+
args = get_output_data_t.Arguments(
|
|
274
277
|
material_family_id=material_family_id,
|
|
275
278
|
output_ids=output_ids,
|
|
276
279
|
offset=offset,
|
|
277
280
|
limit=limit,
|
|
278
281
|
)
|
|
279
282
|
api_request = APIRequest(
|
|
280
|
-
method=
|
|
281
|
-
endpoint=
|
|
283
|
+
method=get_output_data_t.ENDPOINT_METHOD,
|
|
284
|
+
endpoint=get_output_data_t.ENDPOINT_PATH,
|
|
282
285
|
args=args,
|
|
283
286
|
)
|
|
284
|
-
return self.do_request(api_request=api_request, return_type=
|
|
287
|
+
return self.do_request(api_request=api_request, return_type=get_output_data_t.Data)
|
|
285
288
|
|
|
286
289
|
|
|
287
|
-
def
|
|
290
|
+
def get_output_names(
|
|
288
291
|
self,
|
|
289
292
|
*,
|
|
290
293
|
material_family_id: int,
|
|
291
294
|
offset: typing.Optional[int] = None,
|
|
292
295
|
limit: typing.Optional[int] = None,
|
|
293
|
-
) ->
|
|
294
|
-
args =
|
|
296
|
+
) -> get_output_names_t.Data:
|
|
297
|
+
args = get_output_names_t.Arguments(
|
|
295
298
|
material_family_id=material_family_id,
|
|
296
299
|
offset=offset,
|
|
297
300
|
limit=limit,
|
|
298
301
|
)
|
|
299
302
|
api_request = APIRequest(
|
|
300
|
-
method=
|
|
301
|
-
endpoint=
|
|
303
|
+
method=get_output_names_t.ENDPOINT_METHOD,
|
|
304
|
+
endpoint=get_output_names_t.ENDPOINT_PATH,
|
|
302
305
|
args=args,
|
|
303
306
|
)
|
|
304
|
-
return self.do_request(api_request=api_request, return_type=
|
|
307
|
+
return self.do_request(api_request=api_request, return_type=get_output_names_t.Data)
|
|
305
308
|
|
|
306
309
|
|
|
307
|
-
def
|
|
310
|
+
def get_projects(
|
|
308
311
|
self,
|
|
309
312
|
*,
|
|
310
313
|
all_material_families: bool,
|
|
311
314
|
material_family_id: typing.Optional[int],
|
|
312
|
-
) ->
|
|
313
|
-
args =
|
|
315
|
+
) -> get_projects_t.Data:
|
|
316
|
+
args = get_projects_t.Arguments(
|
|
314
317
|
all_material_families=all_material_families,
|
|
315
318
|
material_family_id=material_family_id,
|
|
316
319
|
)
|
|
317
320
|
api_request = APIRequest(
|
|
318
|
-
method=
|
|
319
|
-
endpoint=
|
|
321
|
+
method=get_projects_t.ENDPOINT_METHOD,
|
|
322
|
+
endpoint=get_projects_t.ENDPOINT_PATH,
|
|
320
323
|
args=args,
|
|
321
324
|
)
|
|
322
|
-
return self.do_request(api_request=api_request, return_type=
|
|
325
|
+
return self.do_request(api_request=api_request, return_type=get_projects_t.Data)
|
|
323
326
|
|
|
324
327
|
|
|
325
|
-
def
|
|
328
|
+
def get_projects_data(
|
|
326
329
|
self,
|
|
327
330
|
*,
|
|
328
331
|
project_ids: list[int],
|
|
329
332
|
offset: typing.Optional[int],
|
|
330
333
|
limit: typing.Optional[int],
|
|
331
|
-
) ->
|
|
332
|
-
args =
|
|
334
|
+
) -> get_projects_data_t.Data:
|
|
335
|
+
args = get_projects_data_t.Arguments(
|
|
333
336
|
project_ids=project_ids,
|
|
334
337
|
offset=offset,
|
|
335
338
|
limit=limit,
|
|
336
339
|
)
|
|
337
340
|
api_request = APIRequest(
|
|
338
|
-
method=
|
|
339
|
-
endpoint=
|
|
341
|
+
method=get_projects_data_t.ENDPOINT_METHOD,
|
|
342
|
+
endpoint=get_projects_data_t.ENDPOINT_PATH,
|
|
340
343
|
args=args,
|
|
341
344
|
)
|
|
342
|
-
return self.do_request(api_request=api_request, return_type=
|
|
345
|
+
return self.do_request(api_request=api_request, return_type=get_projects_data_t.Data)
|
|
343
346
|
|
|
344
347
|
|
|
345
|
-
def
|
|
348
|
+
def get_recipe_calculations(
|
|
346
349
|
self,
|
|
347
350
|
*,
|
|
348
351
|
recipe_ids: list[int],
|
|
349
352
|
calculation_ids: typing.Optional[list[int]] = None,
|
|
350
|
-
) ->
|
|
351
|
-
args =
|
|
353
|
+
) -> get_recipe_calculations_t.Data:
|
|
354
|
+
args = get_recipe_calculations_t.Arguments(
|
|
352
355
|
recipe_ids=recipe_ids,
|
|
353
356
|
calculation_ids=calculation_ids,
|
|
354
357
|
)
|
|
355
358
|
api_request = APIRequest(
|
|
356
|
-
method=
|
|
357
|
-
endpoint=
|
|
359
|
+
method=get_recipe_calculations_t.ENDPOINT_METHOD,
|
|
360
|
+
endpoint=get_recipe_calculations_t.ENDPOINT_PATH,
|
|
358
361
|
args=args,
|
|
359
362
|
)
|
|
360
|
-
return self.do_request(api_request=api_request, return_type=
|
|
363
|
+
return self.do_request(api_request=api_request, return_type=get_recipe_calculations_t.Data)
|
|
361
364
|
|
|
362
365
|
|
|
363
|
-
def
|
|
366
|
+
def get_recipe_links(
|
|
364
367
|
self,
|
|
365
368
|
*,
|
|
366
369
|
recipe_ids: list[int],
|
|
367
370
|
depth: int = 1,
|
|
368
|
-
link_types: typing.Optional[list[
|
|
369
|
-
) ->
|
|
370
|
-
args =
|
|
371
|
+
link_types: typing.Optional[list[recipe_links_t.RecipeLinkType]],
|
|
372
|
+
) -> get_recipe_links_t.Data:
|
|
373
|
+
args = get_recipe_links_t.Arguments(
|
|
371
374
|
recipe_ids=recipe_ids,
|
|
372
375
|
depth=depth,
|
|
373
376
|
link_types=link_types,
|
|
374
377
|
)
|
|
375
378
|
api_request = APIRequest(
|
|
376
|
-
method=
|
|
377
|
-
endpoint=
|
|
379
|
+
method=get_recipe_links_t.ENDPOINT_METHOD,
|
|
380
|
+
endpoint=get_recipe_links_t.ENDPOINT_PATH,
|
|
378
381
|
args=args,
|
|
379
382
|
)
|
|
380
|
-
return self.do_request(api_request=api_request, return_type=
|
|
383
|
+
return self.do_request(api_request=api_request, return_type=get_recipe_links_t.Data)
|
|
381
384
|
|
|
382
385
|
|
|
383
|
-
def
|
|
386
|
+
def get_recipe_metadata_data(
|
|
384
387
|
self,
|
|
385
388
|
*,
|
|
386
389
|
material_family_id: int,
|
|
387
390
|
recipe_metadata_ids: typing.Optional[list[int]],
|
|
388
391
|
offset: typing.Optional[int],
|
|
389
392
|
limit: typing.Optional[int],
|
|
390
|
-
) ->
|
|
391
|
-
args =
|
|
393
|
+
) -> get_recipe_metadata_data_t.Data:
|
|
394
|
+
args = get_recipe_metadata_data_t.Arguments(
|
|
392
395
|
material_family_id=material_family_id,
|
|
393
396
|
recipe_metadata_ids=recipe_metadata_ids,
|
|
394
397
|
offset=offset,
|
|
395
398
|
limit=limit,
|
|
396
399
|
)
|
|
397
400
|
api_request = APIRequest(
|
|
398
|
-
method=
|
|
399
|
-
endpoint=
|
|
401
|
+
method=get_recipe_metadata_data_t.ENDPOINT_METHOD,
|
|
402
|
+
endpoint=get_recipe_metadata_data_t.ENDPOINT_PATH,
|
|
400
403
|
args=args,
|
|
401
404
|
)
|
|
402
|
-
return self.do_request(api_request=api_request, return_type=
|
|
405
|
+
return self.do_request(api_request=api_request, return_type=get_recipe_metadata_data_t.Data)
|
|
403
406
|
|
|
404
407
|
|
|
405
|
-
def
|
|
408
|
+
def get_recipe_names(
|
|
406
409
|
self,
|
|
407
410
|
*,
|
|
408
411
|
project_id: int,
|
|
409
|
-
) ->
|
|
410
|
-
args =
|
|
412
|
+
) -> get_recipe_names_t.Data:
|
|
413
|
+
args = get_recipe_names_t.Arguments(
|
|
411
414
|
project_id=project_id,
|
|
412
415
|
)
|
|
413
416
|
api_request = APIRequest(
|
|
414
|
-
method=
|
|
415
|
-
endpoint=
|
|
417
|
+
method=get_recipe_names_t.ENDPOINT_METHOD,
|
|
418
|
+
endpoint=get_recipe_names_t.ENDPOINT_PATH,
|
|
416
419
|
args=args,
|
|
417
420
|
)
|
|
418
|
-
return self.do_request(api_request=api_request, return_type=
|
|
421
|
+
return self.do_request(api_request=api_request, return_type=get_recipe_names_t.Data)
|
|
419
422
|
|
|
420
423
|
|
|
421
|
-
def
|
|
424
|
+
def get_recipe_output_metadata(
|
|
422
425
|
self,
|
|
423
426
|
*,
|
|
424
427
|
recipe_output_ids: list[int],
|
|
425
|
-
) ->
|
|
426
|
-
args =
|
|
428
|
+
) -> get_recipe_output_metadata_t.Data:
|
|
429
|
+
args = get_recipe_output_metadata_t.Arguments(
|
|
427
430
|
recipe_output_ids=recipe_output_ids,
|
|
428
431
|
)
|
|
429
432
|
api_request = APIRequest(
|
|
430
|
-
method=
|
|
431
|
-
endpoint=
|
|
433
|
+
method=get_recipe_output_metadata_t.ENDPOINT_METHOD,
|
|
434
|
+
endpoint=get_recipe_output_metadata_t.ENDPOINT_PATH,
|
|
432
435
|
args=args,
|
|
433
436
|
)
|
|
434
|
-
return self.do_request(api_request=api_request, return_type=
|
|
437
|
+
return self.do_request(api_request=api_request, return_type=get_recipe_output_metadata_t.Data)
|
|
435
438
|
|
|
436
439
|
|
|
437
|
-
def
|
|
440
|
+
def get_recipes_data(
|
|
438
441
|
self,
|
|
439
442
|
*,
|
|
440
443
|
recipe_ids: typing.Optional[list[int]],
|
|
441
444
|
project_id: typing.Optional[int],
|
|
442
445
|
offset: typing.Optional[int],
|
|
443
446
|
limit: typing.Optional[int],
|
|
444
|
-
) ->
|
|
445
|
-
args =
|
|
447
|
+
) -> get_recipes_data_t.Data:
|
|
448
|
+
args = get_recipes_data_t.Arguments(
|
|
446
449
|
recipe_ids=recipe_ids,
|
|
447
450
|
project_id=project_id,
|
|
448
451
|
offset=offset,
|
|
449
452
|
limit=limit,
|
|
450
453
|
)
|
|
451
454
|
api_request = APIRequest(
|
|
452
|
-
method=
|
|
453
|
-
endpoint=
|
|
455
|
+
method=get_recipes_data_t.ENDPOINT_METHOD,
|
|
456
|
+
endpoint=get_recipes_data_t.ENDPOINT_PATH,
|
|
454
457
|
args=args,
|
|
455
458
|
)
|
|
456
|
-
return self.do_request(api_request=api_request, return_type=
|
|
459
|
+
return self.do_request(api_request=api_request, return_type=get_recipes_data_t.Data)
|
|
457
460
|
|
|
458
461
|
|
|
459
|
-
def
|
|
462
|
+
def list_entities(
|
|
460
463
|
self,
|
|
461
464
|
*,
|
|
462
465
|
entity_type: str,
|
|
@@ -464,8 +467,8 @@ class ClientMethods(ABC):
|
|
|
464
467
|
offset: typing.Optional[int],
|
|
465
468
|
limit: typing.Optional[int],
|
|
466
469
|
attributes: typing.Optional[dict[OpaqueKey, base_t.JsonValue]] = None,
|
|
467
|
-
) ->
|
|
468
|
-
args =
|
|
470
|
+
) -> list_entities_t.Data:
|
|
471
|
+
args = list_entities_t.Arguments(
|
|
469
472
|
entity_type=entity_type,
|
|
470
473
|
config_reference=config_reference,
|
|
471
474
|
attributes=attributes,
|
|
@@ -473,108 +476,108 @@ class ClientMethods(ABC):
|
|
|
473
476
|
limit=limit,
|
|
474
477
|
)
|
|
475
478
|
api_request = APIRequest(
|
|
476
|
-
method=
|
|
477
|
-
endpoint=
|
|
479
|
+
method=list_entities_t.ENDPOINT_METHOD,
|
|
480
|
+
endpoint=list_entities_t.ENDPOINT_PATH,
|
|
478
481
|
args=args,
|
|
479
482
|
)
|
|
480
|
-
return self.do_request(api_request=api_request, return_type=
|
|
483
|
+
return self.do_request(api_request=api_request, return_type=list_entities_t.Data)
|
|
481
484
|
|
|
482
485
|
|
|
483
|
-
def
|
|
486
|
+
def resolve_entity_ids(
|
|
484
487
|
self,
|
|
485
488
|
*,
|
|
486
489
|
entity_ids: list[typing.Union[str, int]],
|
|
487
490
|
entity_type: str,
|
|
488
|
-
) ->
|
|
489
|
-
args =
|
|
491
|
+
) -> resolve_entity_ids_t.Data:
|
|
492
|
+
args = resolve_entity_ids_t.Arguments(
|
|
490
493
|
entity_ids=entity_ids,
|
|
491
494
|
entity_type=entity_type,
|
|
492
495
|
)
|
|
493
496
|
api_request = APIRequest(
|
|
494
|
-
method=
|
|
495
|
-
endpoint=
|
|
497
|
+
method=resolve_entity_ids_t.ENDPOINT_METHOD,
|
|
498
|
+
endpoint=resolve_entity_ids_t.ENDPOINT_PATH,
|
|
496
499
|
args=args,
|
|
497
500
|
)
|
|
498
|
-
return self.do_request(api_request=api_request, return_type=
|
|
501
|
+
return self.do_request(api_request=api_request, return_type=resolve_entity_ids_t.Data)
|
|
499
502
|
|
|
500
503
|
|
|
501
|
-
def
|
|
504
|
+
def resolve_output_conditions(
|
|
502
505
|
self,
|
|
503
506
|
*,
|
|
504
|
-
requested_conditions: list[
|
|
505
|
-
) ->
|
|
506
|
-
args =
|
|
507
|
+
requested_conditions: list[resolve_output_conditions_t.ConditionRequest],
|
|
508
|
+
) -> resolve_output_conditions_t.Data:
|
|
509
|
+
args = resolve_output_conditions_t.Arguments(
|
|
507
510
|
requested_conditions=requested_conditions,
|
|
508
511
|
)
|
|
509
512
|
api_request = APIRequest(
|
|
510
|
-
method=
|
|
511
|
-
endpoint=
|
|
513
|
+
method=resolve_output_conditions_t.ENDPOINT_METHOD,
|
|
514
|
+
endpoint=resolve_output_conditions_t.ENDPOINT_PATH,
|
|
512
515
|
args=args,
|
|
513
516
|
)
|
|
514
|
-
return self.do_request(api_request=api_request, return_type=
|
|
517
|
+
return self.do_request(api_request=api_request, return_type=resolve_output_conditions_t.Data)
|
|
515
518
|
|
|
516
519
|
|
|
517
|
-
def
|
|
520
|
+
def set_input_attribute_values(
|
|
518
521
|
self,
|
|
519
522
|
*,
|
|
520
|
-
attribute_values: list[
|
|
521
|
-
) ->
|
|
522
|
-
args =
|
|
523
|
+
attribute_values: list[set_input_attribute_values_t.InputAttributeValue],
|
|
524
|
+
) -> set_input_attribute_values_t.Data:
|
|
525
|
+
args = set_input_attribute_values_t.Arguments(
|
|
523
526
|
attribute_values=attribute_values,
|
|
524
527
|
)
|
|
525
528
|
api_request = APIRequest(
|
|
526
|
-
method=
|
|
527
|
-
endpoint=
|
|
529
|
+
method=set_input_attribute_values_t.ENDPOINT_METHOD,
|
|
530
|
+
endpoint=set_input_attribute_values_t.ENDPOINT_PATH,
|
|
528
531
|
args=args,
|
|
529
532
|
)
|
|
530
|
-
return self.do_request(api_request=api_request, return_type=
|
|
533
|
+
return self.do_request(api_request=api_request, return_type=set_input_attribute_values_t.Data)
|
|
531
534
|
|
|
532
535
|
|
|
533
|
-
def
|
|
536
|
+
def set_recipe_inputs(
|
|
534
537
|
self,
|
|
535
538
|
*,
|
|
536
|
-
input_data: list[
|
|
537
|
-
) ->
|
|
538
|
-
args =
|
|
539
|
+
input_data: list[set_recipe_inputs_t.RecipeInputValue],
|
|
540
|
+
) -> set_recipe_inputs_t.Data:
|
|
541
|
+
args = set_recipe_inputs_t.Arguments(
|
|
539
542
|
input_data=input_data,
|
|
540
543
|
)
|
|
541
544
|
api_request = APIRequest(
|
|
542
|
-
method=
|
|
543
|
-
endpoint=
|
|
545
|
+
method=set_recipe_inputs_t.ENDPOINT_METHOD,
|
|
546
|
+
endpoint=set_recipe_inputs_t.ENDPOINT_PATH,
|
|
544
547
|
args=args,
|
|
545
548
|
)
|
|
546
|
-
return self.do_request(api_request=api_request, return_type=
|
|
549
|
+
return self.do_request(api_request=api_request, return_type=set_recipe_inputs_t.Data)
|
|
547
550
|
|
|
548
551
|
|
|
549
|
-
def
|
|
552
|
+
def set_recipe_outputs(
|
|
550
553
|
self,
|
|
551
554
|
*,
|
|
552
|
-
output_data: list[
|
|
553
|
-
) ->
|
|
554
|
-
args =
|
|
555
|
+
output_data: list[set_recipe_outputs_t.RecipeOutputValue],
|
|
556
|
+
) -> set_recipe_outputs_t.Data:
|
|
557
|
+
args = set_recipe_outputs_t.Arguments(
|
|
555
558
|
output_data=output_data,
|
|
556
559
|
)
|
|
557
560
|
api_request = APIRequest(
|
|
558
|
-
method=
|
|
559
|
-
endpoint=
|
|
561
|
+
method=set_recipe_outputs_t.ENDPOINT_METHOD,
|
|
562
|
+
endpoint=set_recipe_outputs_t.ENDPOINT_PATH,
|
|
560
563
|
args=args,
|
|
561
564
|
)
|
|
562
|
-
return self.do_request(api_request=api_request, return_type=
|
|
565
|
+
return self.do_request(api_request=api_request, return_type=set_recipe_outputs_t.Data)
|
|
563
566
|
|
|
564
567
|
|
|
565
|
-
def
|
|
568
|
+
def set_values(
|
|
566
569
|
self,
|
|
567
570
|
*,
|
|
568
|
-
entity:
|
|
569
|
-
values: list[
|
|
570
|
-
) ->
|
|
571
|
-
args =
|
|
571
|
+
entity: set_values_t.Entity,
|
|
572
|
+
values: list[set_values_t.EntityFieldValues],
|
|
573
|
+
) -> set_values_t.Data:
|
|
574
|
+
args = set_values_t.Arguments(
|
|
572
575
|
entity=entity,
|
|
573
576
|
values=values,
|
|
574
577
|
)
|
|
575
578
|
api_request = APIRequest(
|
|
576
|
-
method=
|
|
577
|
-
endpoint=
|
|
579
|
+
method=set_values_t.ENDPOINT_METHOD,
|
|
580
|
+
endpoint=set_values_t.ENDPOINT_PATH,
|
|
578
581
|
args=args,
|
|
579
582
|
)
|
|
580
|
-
return self.do_request(api_request=api_request, return_type=
|
|
583
|
+
return self.do_request(api_request=api_request, return_type=set_values_t.Data)
|