UncountablePythonSDK 0.0.126__py3-none-any.whl → 0.0.142.dev0__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.

Files changed (84) hide show
  1. docs/requirements.txt +1 -1
  2. examples/integration-server/jobs/materials_auto/example_cron.py +1 -1
  3. examples/integration-server/jobs/materials_auto/example_instrument.py +68 -38
  4. examples/integration-server/jobs/materials_auto/example_parse.py +140 -0
  5. examples/integration-server/jobs/materials_auto/example_predictions.py +61 -0
  6. examples/integration-server/jobs/materials_auto/example_runsheet_wh.py +57 -16
  7. examples/integration-server/jobs/materials_auto/profile.yaml +18 -0
  8. examples/integration-server/pyproject.toml +4 -4
  9. pkgs/argument_parser/argument_parser.py +20 -1
  10. pkgs/serialization_util/serialization_helpers.py +3 -1
  11. pkgs/type_spec/builder.py +43 -13
  12. pkgs/type_spec/builder_types.py +9 -0
  13. pkgs/type_spec/cross_output_links.py +2 -10
  14. pkgs/type_spec/emit_open_api.py +0 -12
  15. pkgs/type_spec/emit_python.py +72 -11
  16. pkgs/type_spec/emit_typescript.py +2 -2
  17. pkgs/type_spec/emit_typescript_util.py +28 -6
  18. pkgs/type_spec/load_types.py +1 -1
  19. pkgs/type_spec/parts/base.ts.prepart +3 -0
  20. pkgs/type_spec/type_info/emit_type_info.py +27 -3
  21. pkgs/type_spec/value_spec/__main__.py +2 -2
  22. uncountable/core/client.py +10 -3
  23. uncountable/integration/cli.py +89 -2
  24. uncountable/integration/executors/executors.py +1 -2
  25. uncountable/integration/executors/generic_upload_executor.py +1 -1
  26. uncountable/integration/job.py +3 -3
  27. uncountable/integration/queue_runner/command_server/__init__.py +4 -0
  28. uncountable/integration/queue_runner/command_server/command_client.py +63 -0
  29. uncountable/integration/queue_runner/command_server/command_server.py +77 -5
  30. uncountable/integration/queue_runner/command_server/protocol/command_server.proto +33 -0
  31. uncountable/integration/queue_runner/command_server/protocol/command_server_pb2.py +27 -13
  32. uncountable/integration/queue_runner/command_server/protocol/command_server_pb2.pyi +53 -1
  33. uncountable/integration/queue_runner/command_server/protocol/command_server_pb2_grpc.py +135 -0
  34. uncountable/integration/queue_runner/command_server/types.py +44 -1
  35. uncountable/integration/queue_runner/datastore/datastore_sqlite.py +132 -8
  36. uncountable/integration/queue_runner/datastore/interface.py +3 -0
  37. uncountable/integration/queue_runner/datastore/model.py +8 -1
  38. uncountable/integration/queue_runner/job_scheduler.py +78 -3
  39. uncountable/integration/queue_runner/types.py +2 -0
  40. uncountable/integration/queue_runner/worker.py +28 -26
  41. uncountable/integration/scheduler.py +64 -13
  42. uncountable/integration/server.py +36 -6
  43. uncountable/integration/telemetry.py +120 -7
  44. uncountable/integration/webhook_server/entrypoint.py +2 -0
  45. uncountable/types/__init__.py +18 -0
  46. uncountable/types/api/entity/list_aggregate.py +79 -0
  47. uncountable/types/api/entity/list_entities.py +25 -0
  48. uncountable/types/api/entity/set_barcode.py +43 -0
  49. uncountable/types/api/entity/transition_entity_phase.py +2 -1
  50. uncountable/types/api/files/download_file.py +15 -1
  51. uncountable/types/api/integrations/push_notification.py +2 -0
  52. uncountable/types/api/integrations/register_sockets_token.py +41 -0
  53. uncountable/types/api/listing/__init__.py +1 -0
  54. uncountable/types/api/listing/fetch_listing.py +57 -0
  55. uncountable/types/api/notebooks/__init__.py +1 -0
  56. uncountable/types/api/notebooks/add_notebook_content.py +119 -0
  57. uncountable/types/api/outputs/get_output_organization.py +1 -1
  58. uncountable/types/api/recipes/edit_recipe_inputs.py +1 -1
  59. uncountable/types/api/recipes/get_recipes_data.py +29 -0
  60. uncountable/types/api/recipes/lock_recipes.py +2 -1
  61. uncountable/types/api/recipes/set_recipe_total.py +59 -0
  62. uncountable/types/api/recipes/unlock_recipes.py +2 -1
  63. uncountable/types/api/runsheet/export_default_runsheet.py +44 -0
  64. uncountable/types/api/uploader/complete_async_parse.py +4 -0
  65. uncountable/types/async_batch_processor.py +222 -0
  66. uncountable/types/async_batch_t.py +4 -0
  67. uncountable/types/client_base.py +367 -2
  68. uncountable/types/client_config.py +1 -0
  69. uncountable/types/client_config_t.py +10 -0
  70. uncountable/types/entity_t.py +3 -1
  71. uncountable/types/integration_server_t.py +2 -0
  72. uncountable/types/listing.py +46 -0
  73. uncountable/types/listing_t.py +533 -0
  74. uncountable/types/notices.py +8 -0
  75. uncountable/types/notices_t.py +37 -0
  76. uncountable/types/queued_job.py +1 -0
  77. uncountable/types/queued_job_t.py +9 -0
  78. uncountable/types/sockets.py +9 -0
  79. uncountable/types/sockets_t.py +99 -0
  80. uncountable/types/uploader_t.py +3 -2
  81. {uncountablepythonsdk-0.0.126.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/METADATA +4 -2
  82. {uncountablepythonsdk-0.0.126.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/RECORD +84 -68
  83. {uncountablepythonsdk-0.0.126.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/WHEEL +0 -0
  84. {uncountablepythonsdk-0.0.126.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/top_level.txt +0 -0
@@ -11,9 +11,12 @@ from pkgs.serialization import serial_class
11
11
  from pkgs.serialization import OpaqueKey
12
12
  from ... import base_t
13
13
  from ... import entity_t
14
+ from ... import identifier_t
14
15
 
15
16
  __all__: list[str] = [
17
+ "AdditionalFilterConfig",
16
18
  "Arguments",
19
+ "AttributeValue",
17
20
  "ColumnAccess",
18
21
  "Data",
19
22
  "ENDPOINT_METHOD",
@@ -25,6 +28,27 @@ ENDPOINT_METHOD = "GET"
25
28
  ENDPOINT_PATH = "api/external/entity/external_list_entities"
26
29
 
27
30
 
31
+ # DO NOT MODIFY -- This file is generated by type_spec
32
+ @serial_class(
33
+ named_type_path="sdk.api.entity.list_entities.AttributeValue",
34
+ unconverted_values={"value"},
35
+ )
36
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
37
+ class AttributeValue:
38
+ name: str
39
+ value: base_t.JsonValue
40
+
41
+
42
+ # DO NOT MODIFY -- This file is generated by type_spec
43
+ @serial_class(
44
+ named_type_path="sdk.api.entity.list_entities.AdditionalFilterConfig",
45
+ )
46
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
47
+ class AdditionalFilterConfig:
48
+ config_key: identifier_t.IdentifierKey
49
+ attribute_values: list[AttributeValue] | None = None
50
+
51
+
28
52
  # DO NOT MODIFY -- This file is generated by type_spec
29
53
  @serial_class(
30
54
  named_type_path="sdk.api.entity.list_entities.Arguments",
@@ -37,6 +61,7 @@ class Arguments:
37
61
  attributes: dict[OpaqueKey, base_t.JsonValue] | None = None
38
62
  offset: int | None = None
39
63
  limit: int | None = None
64
+ additional_filter_configs: list[AdditionalFilterConfig] | None = None
40
65
 
41
66
 
42
67
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,43 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # ruff: noqa: E402 Q003
3
+ # fmt: off
4
+ # isort: skip_file
5
+ from __future__ import annotations
6
+ import typing # noqa: F401
7
+ import datetime # noqa: F401
8
+ from decimal import Decimal # noqa: F401
9
+ import dataclasses
10
+ from pkgs.serialization import serial_class
11
+ from ... import async_batch_t
12
+ from ... import base_t
13
+ from ... import entity_t
14
+
15
+ __all__: list[str] = [
16
+ "Arguments",
17
+ "Data",
18
+ "ENDPOINT_METHOD",
19
+ "ENDPOINT_PATH",
20
+ ]
21
+
22
+ ENDPOINT_METHOD = "POST"
23
+ ENDPOINT_PATH = "api/external/entity/set_barcode"
24
+
25
+
26
+ # DO NOT MODIFY -- This file is generated by type_spec
27
+ @serial_class(
28
+ named_type_path="sdk.api.entity.set_barcode.Arguments",
29
+ )
30
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
31
+ class Arguments:
32
+ entity_key: entity_t.EntityIdentifier
33
+ barcode_value: str
34
+
35
+
36
+ # DO NOT MODIFY -- This file is generated by type_spec
37
+ @serial_class(
38
+ named_type_path="sdk.api.entity.set_barcode.Data",
39
+ )
40
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
41
+ class Data(async_batch_t.AsyncBatchActionReturn):
42
+ pass
43
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -66,8 +66,9 @@ TransitionIdentifier = typing.Annotated[
66
66
  )
67
67
  @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
68
68
  class Arguments:
69
- entity: entity_t.Entity
70
69
  transition: TransitionIdentifier
70
+ entity: entity_t.Entity | None = None
71
+ entity_identifier: entity_t.EntityIdentifier | None = None
71
72
 
72
73
 
73
74
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -21,6 +21,7 @@ __all__: list[str] = [
21
21
  "FileDownloadQuery",
22
22
  "FileDownloadQueryBase",
23
23
  "FileDownloadQueryEntityField",
24
+ "FileDownloadQueryTextDocumentId",
24
25
  "FileDownloadQueryType",
25
26
  ]
26
27
 
@@ -31,6 +32,7 @@ ENDPOINT_PATH = "api/external/files/download_file"
31
32
  # DO NOT MODIFY -- This file is generated by type_spec
32
33
  class FileDownloadQueryType(StrEnum):
33
34
  ENTITY_FIELD = "entity_field"
35
+ TEXT_DOCUMENT_ID = "text_document_id"
34
36
 
35
37
 
36
38
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -54,14 +56,26 @@ class FileDownloadQueryEntityField(FileDownloadQueryBase):
54
56
  field_key: identifier_t.IdentifierKey
55
57
 
56
58
 
59
+ # DO NOT MODIFY -- This file is generated by type_spec
60
+ @serial_class(
61
+ named_type_path="sdk.api.files.download_file.FileDownloadQueryTextDocumentId",
62
+ parse_require={"type"},
63
+ )
64
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
65
+ class FileDownloadQueryTextDocumentId(FileDownloadQueryBase):
66
+ type: typing.Literal[FileDownloadQueryType.TEXT_DOCUMENT_ID] = FileDownloadQueryType.TEXT_DOCUMENT_ID
67
+ text_document_id: base_t.ObjectId
68
+
69
+
57
70
  # DO NOT MODIFY -- This file is generated by type_spec
58
71
  FileDownloadQuery = typing.Annotated[
59
- typing.Union[FileDownloadQueryEntityField],
72
+ FileDownloadQueryEntityField | FileDownloadQueryTextDocumentId,
60
73
  serial_union_annotation(
61
74
  named_type_path="sdk.api.files.download_file.FileDownloadQuery",
62
75
  discriminator="type",
63
76
  discriminator_map={
64
77
  "entity_field": FileDownloadQueryEntityField,
78
+ "text_document_id": FileDownloadQueryTextDocumentId,
65
79
  },
66
80
  ),
67
81
  ]
@@ -11,6 +11,7 @@ from pkgs.serialization import serial_class
11
11
  from ... import async_batch_t
12
12
  from ... import base_t
13
13
  from ... import entity_t
14
+ from ... import notices_t
14
15
  from ... import notifications_t
15
16
 
16
17
  __all__: list[str] = [
@@ -35,6 +36,7 @@ class Arguments:
35
36
  message: str
36
37
  display_notice: bool = False
37
38
  entity: entity_t.EntityIdentifier | None = None
39
+ notice_configuration: notices_t.NotificationNoticeConfiguration | None = None
38
40
 
39
41
 
40
42
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,41 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # ruff: noqa: E402 Q003
3
+ # fmt: off
4
+ # isort: skip_file
5
+ from __future__ import annotations
6
+ import typing # noqa: F401
7
+ import datetime # noqa: F401
8
+ from decimal import Decimal # noqa: F401
9
+ import dataclasses
10
+ from pkgs.serialization import serial_class
11
+ from ... import base_t
12
+ from ... import sockets_t
13
+
14
+ __all__: list[str] = [
15
+ "Arguments",
16
+ "Data",
17
+ "ENDPOINT_METHOD",
18
+ "ENDPOINT_PATH",
19
+ ]
20
+
21
+ ENDPOINT_METHOD = "POST"
22
+ ENDPOINT_PATH = "api/external/integrations/register_sockets_token"
23
+
24
+
25
+ # DO NOT MODIFY -- This file is generated by type_spec
26
+ @serial_class(
27
+ named_type_path="sdk.api.integrations.register_sockets_token.Arguments",
28
+ )
29
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
30
+ class Arguments:
31
+ socket_request: sockets_t.SocketTokenRequest
32
+
33
+
34
+ # DO NOT MODIFY -- This file is generated by type_spec
35
+ @serial_class(
36
+ named_type_path="sdk.api.integrations.register_sockets_token.Data",
37
+ )
38
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
39
+ class Data:
40
+ response: sockets_t.SocketTokenResponse
41
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,57 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # ruff: noqa: E402 Q003
3
+ # fmt: off
4
+ # isort: skip_file
5
+ from __future__ import annotations
6
+ import typing # noqa: F401
7
+ import datetime # noqa: F401
8
+ from decimal import Decimal # noqa: F401
9
+ import dataclasses
10
+ from pkgs.serialization import serial_class
11
+ from ... import base_t
12
+ from ... import entity_t
13
+ from ... import listing_t
14
+
15
+ __all__: list[str] = [
16
+ "Arguments",
17
+ "Data",
18
+ "ENDPOINT_METHOD",
19
+ "ENDPOINT_PATH",
20
+ "ListingRow",
21
+ ]
22
+
23
+ ENDPOINT_METHOD = "POST"
24
+ ENDPOINT_PATH = "api/external/listing/fetch_listing"
25
+
26
+
27
+ # DO NOT MODIFY -- This file is generated by type_spec
28
+ @serial_class(
29
+ named_type_path="sdk.api.listing.fetch_listing.Arguments",
30
+ )
31
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
32
+ class Arguments:
33
+ entity_type: entity_t.EntityType
34
+ columns: list[listing_t.ColumnIdentifier]
35
+ filters: listing_t.FilterNode | None = None
36
+ limit: int | None = None
37
+ offset: int | None = None
38
+
39
+
40
+ # DO NOT MODIFY -- This file is generated by type_spec
41
+ @serial_class(
42
+ named_type_path="sdk.api.listing.fetch_listing.ListingRow",
43
+ unconverted_values={"column_values"},
44
+ )
45
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
46
+ class ListingRow:
47
+ column_values: list[base_t.JsonValue]
48
+
49
+
50
+ # DO NOT MODIFY -- This file is generated by type_spec
51
+ @serial_class(
52
+ named_type_path="sdk.api.listing.fetch_listing.Data",
53
+ )
54
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
55
+ class Data:
56
+ results: list[ListingRow]
57
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,119 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # ruff: noqa: E402 Q003
3
+ # fmt: off
4
+ # isort: skip_file
5
+ from __future__ import annotations
6
+ import typing # noqa: F401
7
+ import datetime # noqa: F401
8
+ from decimal import Decimal # noqa: F401
9
+ from enum import StrEnum
10
+ import dataclasses
11
+ from pkgs.serialization import serial_class
12
+ from pkgs.serialization import serial_union_annotation
13
+ from pkgs.serialization import serial_string_enum
14
+ from ... import base_t
15
+ from ... import identifier_t
16
+
17
+ __all__: list[str] = [
18
+ "Arguments",
19
+ "Data",
20
+ "ENDPOINT_METHOD",
21
+ "ENDPOINT_PATH",
22
+ "InputContent",
23
+ "InputContentTextMarkdown",
24
+ "InputContentType",
25
+ "Location",
26
+ "LocationAppendToFirstPage",
27
+ "LocationType",
28
+ ]
29
+
30
+ ENDPOINT_METHOD = "POST"
31
+ ENDPOINT_PATH = "api/external/notebooks/add_notebook_content"
32
+
33
+
34
+ # DO NOT MODIFY -- This file is generated by type_spec
35
+ @serial_string_enum(
36
+ labels={
37
+ "append_to_first_page": "Append To First Page",
38
+ },
39
+ )
40
+ class LocationType(StrEnum):
41
+ APPEND_TO_FIRST_PAGE = "append_to_first_page"
42
+
43
+
44
+ # DO NOT MODIFY -- This file is generated by type_spec
45
+ @serial_class(
46
+ named_type_path="sdk.api.notebooks.add_notebook_content.LocationAppendToFirstPage",
47
+ parse_require={"type"},
48
+ )
49
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
50
+ class LocationAppendToFirstPage:
51
+ type: typing.Literal[LocationType.APPEND_TO_FIRST_PAGE] = LocationType.APPEND_TO_FIRST_PAGE
52
+
53
+
54
+ # DO NOT MODIFY -- This file is generated by type_spec
55
+ Location = typing.Annotated[
56
+ typing.Union[LocationAppendToFirstPage],
57
+ serial_union_annotation(
58
+ named_type_path="sdk.api.notebooks.add_notebook_content.Location",
59
+ discriminator="type",
60
+ discriminator_map={
61
+ "append_to_first_page": LocationAppendToFirstPage,
62
+ },
63
+ ),
64
+ ]
65
+
66
+
67
+ # DO NOT MODIFY -- This file is generated by type_spec
68
+ @serial_string_enum(
69
+ labels={
70
+ "text_markdown": "Text Markdown",
71
+ },
72
+ )
73
+ class InputContentType(StrEnum):
74
+ TEXT_MARKDOWN = "text_markdown"
75
+
76
+
77
+ # DO NOT MODIFY -- This file is generated by type_spec
78
+ @serial_class(
79
+ named_type_path="sdk.api.notebooks.add_notebook_content.InputContentTextMarkdown",
80
+ parse_require={"type"},
81
+ )
82
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
83
+ class InputContentTextMarkdown:
84
+ type: typing.Literal[InputContentType.TEXT_MARKDOWN] = InputContentType.TEXT_MARKDOWN
85
+ text_markdown: str
86
+
87
+
88
+ # DO NOT MODIFY -- This file is generated by type_spec
89
+ InputContent = typing.Annotated[
90
+ typing.Union[InputContentTextMarkdown],
91
+ serial_union_annotation(
92
+ named_type_path="sdk.api.notebooks.add_notebook_content.InputContent",
93
+ discriminator="type",
94
+ discriminator_map={
95
+ "text_markdown": InputContentTextMarkdown,
96
+ },
97
+ ),
98
+ ]
99
+
100
+
101
+ # DO NOT MODIFY -- This file is generated by type_spec
102
+ @serial_class(
103
+ named_type_path="sdk.api.notebooks.add_notebook_content.Arguments",
104
+ )
105
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
106
+ class Arguments:
107
+ notebook_key: identifier_t.IdentifierKey
108
+ location: Location
109
+ contents: list[InputContent]
110
+
111
+
112
+ # DO NOT MODIFY -- This file is generated by type_spec
113
+ @serial_class(
114
+ named_type_path="sdk.api.notebooks.add_notebook_content.Data",
115
+ )
116
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
117
+ class Data:
118
+ pass
119
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -167,7 +167,7 @@ OrganizationParameter = typing.Annotated[
167
167
  )
168
168
  @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
169
169
  class Data:
170
- organization_id: base_t.ObjectId
170
+ organization_id: base_t.ObjectId | None
171
171
  column_definitions: list[OrganizationParameter]
172
172
  table_definitions: list[OrganizationParameter]
173
173
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -93,7 +93,7 @@ class RecipeInputEditClearInputs(RecipeInputEditBase):
93
93
  @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
94
94
  class RecipeInputEditInputBase(RecipeInputEditBase):
95
95
  ingredient_key: identifier_t.IdentifierKey
96
- quantity_basis: recipe_inputs_t.QuantityBasis = recipe_inputs_t.QuantityBasis.MASS
96
+ quantity_basis: recipe_inputs_t.QuantityBasis | None = recipe_inputs_t.QuantityBasis.MASS
97
97
  input_value_type: recipe_inputs_t.InputValueType = recipe_inputs_t.InputValueType.VALUE
98
98
  value_numeric: Decimal | None = None
99
99
  value_str: str | None = None
@@ -6,8 +6,10 @@ from __future__ import annotations
6
6
  import typing # noqa: F401
7
7
  import datetime # noqa: F401
8
8
  from decimal import Decimal # noqa: F401
9
+ from enum import StrEnum
9
10
  import dataclasses
10
11
  from pkgs.serialization import serial_class
12
+ from pkgs.serialization import serial_string_enum
11
13
  from ... import base_t
12
14
  from ... import experiment_groups_t
13
15
  from ... import inputs_t
@@ -24,7 +26,9 @@ __all__: list[str] = [
24
26
  "ENDPOINT_PATH",
25
27
  "Recipe",
26
28
  "RecipeInput",
29
+ "RecipeLockStatus",
27
30
  "RecipeOutput",
31
+ "RecipeOutputInclusion",
28
32
  "RecipeStep",
29
33
  "RecipeStepGroup",
30
34
  "RecipeStepRelationship",
@@ -46,6 +50,19 @@ class Arguments:
46
50
  project_id: base_t.ObjectId | None = None
47
51
  offset: int | None = None
48
52
  limit: int | None = None
53
+ empty_output_behavior: RecipeOutputInclusion | None = None
54
+
55
+
56
+ # DO NOT MODIFY -- This file is generated by type_spec
57
+ @serial_string_enum(
58
+ labels={
59
+ "include_null": "Include Outputs without values",
60
+ "exclude_null": "Exclude Outputs without values",
61
+ },
62
+ )
63
+ class RecipeOutputInclusion(StrEnum):
64
+ INCLUDE_NULL = "include_null"
65
+ EXCLUDE_NULL = "exclude_null"
49
66
 
50
67
 
51
68
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -138,6 +155,7 @@ class RecipeStepGroup:
138
155
  )
139
156
  @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
140
157
  class RecipeWorkflowStep:
158
+ recipe_workflow_step_name: str | None
141
159
  recipe_workflow_step_id: base_t.ObjectId
142
160
  workflow_step_id: base_t.ObjectId
143
161
  recipe_step_groups: list[RecipeStepGroup]
@@ -158,6 +176,16 @@ class RecipeStepRelationship:
158
176
  actual_quantity_dec: Decimal | None = None
159
177
 
160
178
 
179
+ # DO NOT MODIFY -- This file is generated by type_spec
180
+ @serial_class(
181
+ named_type_path="sdk.api.recipes.get_recipes_data.RecipeLockStatus",
182
+ )
183
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
184
+ class RecipeLockStatus:
185
+ has_locked_inputs: bool
186
+ has_locked_outputs: bool
187
+
188
+
161
189
  # DO NOT MODIFY -- This file is generated by type_spec
162
190
  @serial_class(
163
191
  named_type_path="sdk.api.recipes.get_recipes_data.Recipe",
@@ -177,6 +205,7 @@ class Recipe:
177
205
  tag_ids: list[base_t.ObjectId]
178
206
  experiment_group_ids: list[base_t.ObjectId]
179
207
  step_relationships: list[RecipeStepRelationship]
208
+ recipe_lock_status: RecipeLockStatus
180
209
  creating_user_id: base_t.ObjectId | None = None
181
210
  barcode_value: str | None = None
182
211
 
@@ -9,6 +9,7 @@ from decimal import Decimal # noqa: F401
9
9
  from enum import StrEnum
10
10
  import dataclasses
11
11
  from pkgs.serialization import serial_class
12
+ from ... import async_batch_t
12
13
  from ... import base_t
13
14
  from ... import identifier_t
14
15
 
@@ -58,6 +59,6 @@ class Arguments:
58
59
  named_type_path="sdk.api.recipes.lock_recipes.Data",
59
60
  )
60
61
  @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
61
- class Data:
62
+ class Data(async_batch_t.AsyncBatchActionReturn):
62
63
  pass
63
64
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,59 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # ruff: noqa: E402 Q003
3
+ # fmt: off
4
+ # isort: skip_file
5
+ from __future__ import annotations
6
+ import typing # noqa: F401
7
+ import datetime # noqa: F401
8
+ from decimal import Decimal # noqa: F401
9
+ import dataclasses
10
+ from pkgs.serialization import serial_class
11
+ from ... import async_batch_t
12
+ from ... import base_t
13
+ from ... import identifier_t
14
+ from ... import recipe_inputs_t
15
+ from ... import recipe_workflow_steps_t
16
+
17
+ __all__: list[str] = [
18
+ "Arguments",
19
+ "Data",
20
+ "ENDPOINT_METHOD",
21
+ "ENDPOINT_PATH",
22
+ "ValueNumeric",
23
+ ]
24
+
25
+ ENDPOINT_METHOD = "POST"
26
+ ENDPOINT_PATH = "api/external/recipes/set_recipe_total"
27
+
28
+
29
+ # DO NOT MODIFY -- This file is generated by type_spec
30
+ @serial_class(
31
+ named_type_path="sdk.api.recipes.set_recipe_total.ValueNumeric",
32
+ to_string_values={"value"},
33
+ )
34
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
35
+ class ValueNumeric:
36
+ value: Decimal
37
+ quantity_basis: recipe_inputs_t.QuantityBasis
38
+
39
+
40
+ # DO NOT MODIFY -- This file is generated by type_spec
41
+ @serial_class(
42
+ named_type_path="sdk.api.recipes.set_recipe_total.Arguments",
43
+ )
44
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
45
+ class Arguments:
46
+ recipe_key: identifier_t.IdentifierKey
47
+ value: ValueNumeric
48
+ recipe_workflow_step_identifier: recipe_workflow_steps_t.RecipeWorkflowStepIdentifier | None = None
49
+ calculation_key: identifier_t.IdentifierKey | None = None
50
+
51
+
52
+ # DO NOT MODIFY -- This file is generated by type_spec
53
+ @serial_class(
54
+ named_type_path="sdk.api.recipes.set_recipe_total.Data",
55
+ )
56
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
57
+ class Data(async_batch_t.AsyncBatchActionReturn):
58
+ pass
59
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -9,6 +9,7 @@ from decimal import Decimal # noqa: F401
9
9
  from enum import StrEnum
10
10
  import dataclasses
11
11
  from pkgs.serialization import serial_class
12
+ from ... import async_batch_t
12
13
  from ... import base_t
13
14
  from ... import identifier_t
14
15
 
@@ -45,6 +46,6 @@ class Arguments:
45
46
  named_type_path="sdk.api.recipes.unlock_recipes.Data",
46
47
  )
47
48
  @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
48
- class Data:
49
+ class Data(async_batch_t.AsyncBatchActionReturn):
49
50
  pass
50
51
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,44 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # ruff: noqa: E402 Q003
3
+ # fmt: off
4
+ # isort: skip_file
5
+ from __future__ import annotations
6
+ import typing # noqa: F401
7
+ import datetime # noqa: F401
8
+ from decimal import Decimal # noqa: F401
9
+ import dataclasses
10
+ from pkgs.serialization import serial_class
11
+ from ... import base_t
12
+ from ... import entity_t
13
+ from ... import identifier_t
14
+
15
+ __all__: list[str] = [
16
+ "Arguments",
17
+ "Data",
18
+ "ENDPOINT_METHOD",
19
+ "ENDPOINT_PATH",
20
+ ]
21
+
22
+ ENDPOINT_METHOD = "POST"
23
+ ENDPOINT_PATH = "api/external/runsheet/export_default_runsheet"
24
+
25
+
26
+ # DO NOT MODIFY -- This file is generated by type_spec
27
+ @serial_class(
28
+ named_type_path="sdk.api.runsheet.export_default_runsheet.Arguments",
29
+ )
30
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
31
+ class Arguments:
32
+ entities: list[identifier_t.IdentifierKey]
33
+ entity_type: entity_t.EntityType = entity_t.EntityType.RECIPE
34
+ runsheet_key: identifier_t.IdentifierKey
35
+
36
+
37
+ # DO NOT MODIFY -- This file is generated by type_spec
38
+ @serial_class(
39
+ named_type_path="sdk.api.runsheet.export_default_runsheet.Data",
40
+ )
41
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
42
+ class Data:
43
+ text_document_id: base_t.ObjectId
44
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -10,6 +10,8 @@ import dataclasses
10
10
  from pkgs.serialization import serial_class
11
11
  from ... import async_batch_t
12
12
  from ... import base_t
13
+ from ... import generic_upload_t
14
+ from ... import identifier_t
13
15
  from ... import uploader_t
14
16
 
15
17
  __all__: list[str] = [
@@ -30,6 +32,8 @@ ENDPOINT_PATH = "api/external/uploader/complete_async_parse"
30
32
  @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
31
33
  class Arguments:
32
34
  parsed_file_data: list[uploader_t.ParsedFileData]
35
+ async_job_key: identifier_t.IdentifierKey
36
+ upload_destination: generic_upload_t.UploadDestinationRecipe
33
37
 
34
38
 
35
39
  # DO NOT MODIFY -- This file is generated by type_spec