UncountablePythonSDK 0.0.115__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 (119) hide show
  1. docs/conf.py +52 -5
  2. docs/index.md +107 -4
  3. docs/integration_examples/create_ingredient.md +43 -0
  4. docs/integration_examples/create_output.md +56 -0
  5. docs/integration_examples/index.md +6 -0
  6. docs/justfile +1 -1
  7. docs/requirements.txt +3 -2
  8. examples/basic_auth.py +7 -0
  9. examples/integration-server/jobs/materials_auto/example_cron.py +3 -0
  10. examples/integration-server/jobs/materials_auto/example_http.py +19 -7
  11. examples/integration-server/jobs/materials_auto/example_instrument.py +100 -0
  12. examples/integration-server/jobs/materials_auto/example_parse.py +140 -0
  13. examples/integration-server/jobs/materials_auto/example_predictions.py +61 -0
  14. examples/integration-server/jobs/materials_auto/example_runsheet_wh.py +57 -16
  15. examples/integration-server/jobs/materials_auto/profile.yaml +27 -0
  16. examples/integration-server/pyproject.toml +4 -4
  17. examples/oauth.py +7 -0
  18. pkgs/argument_parser/__init__.py +1 -0
  19. pkgs/argument_parser/_is_namedtuple.py +3 -0
  20. pkgs/argument_parser/argument_parser.py +22 -3
  21. pkgs/serialization_util/serialization_helpers.py +3 -1
  22. pkgs/type_spec/builder.py +66 -19
  23. pkgs/type_spec/builder_types.py +9 -0
  24. pkgs/type_spec/config.py +26 -5
  25. pkgs/type_spec/cross_output_links.py +10 -16
  26. pkgs/type_spec/emit_open_api.py +72 -22
  27. pkgs/type_spec/emit_open_api_util.py +1 -0
  28. pkgs/type_spec/emit_python.py +76 -12
  29. pkgs/type_spec/emit_typescript.py +48 -32
  30. pkgs/type_spec/emit_typescript_util.py +44 -6
  31. pkgs/type_spec/load_types.py +2 -2
  32. pkgs/type_spec/open_api_util.py +16 -1
  33. pkgs/type_spec/parts/base.ts.prepart +4 -0
  34. pkgs/type_spec/type_info/emit_type_info.py +37 -4
  35. pkgs/type_spec/ui_entry_actions/generate_ui_entry_actions.py +1 -0
  36. pkgs/type_spec/value_spec/__main__.py +2 -2
  37. pkgs/type_spec/value_spec/emit_python.py +6 -1
  38. uncountable/core/client.py +10 -3
  39. uncountable/integration/cli.py +175 -23
  40. uncountable/integration/executors/executors.py +1 -2
  41. uncountable/integration/executors/generic_upload_executor.py +1 -1
  42. uncountable/integration/http_server/types.py +3 -1
  43. uncountable/integration/job.py +35 -3
  44. uncountable/integration/queue_runner/command_server/__init__.py +4 -0
  45. uncountable/integration/queue_runner/command_server/command_client.py +89 -0
  46. uncountable/integration/queue_runner/command_server/command_server.py +117 -5
  47. uncountable/integration/queue_runner/command_server/constants.py +4 -0
  48. uncountable/integration/queue_runner/command_server/protocol/command_server.proto +51 -0
  49. uncountable/integration/queue_runner/command_server/protocol/command_server_pb2.py +34 -11
  50. uncountable/integration/queue_runner/command_server/protocol/command_server_pb2.pyi +102 -1
  51. uncountable/integration/queue_runner/command_server/protocol/command_server_pb2_grpc.py +180 -0
  52. uncountable/integration/queue_runner/command_server/types.py +44 -1
  53. uncountable/integration/queue_runner/datastore/datastore_sqlite.py +189 -8
  54. uncountable/integration/queue_runner/datastore/interface.py +13 -0
  55. uncountable/integration/queue_runner/datastore/model.py +8 -1
  56. uncountable/integration/queue_runner/job_scheduler.py +85 -21
  57. uncountable/integration/queue_runner/queue_runner.py +10 -2
  58. uncountable/integration/queue_runner/types.py +2 -0
  59. uncountable/integration/queue_runner/worker.py +28 -29
  60. uncountable/integration/scheduler.py +121 -23
  61. uncountable/integration/server.py +36 -6
  62. uncountable/integration/telemetry.py +129 -8
  63. uncountable/integration/webhook_server/entrypoint.py +2 -0
  64. uncountable/types/__init__.py +38 -0
  65. uncountable/types/api/entity/create_or_update_entity.py +1 -0
  66. uncountable/types/api/entity/export_entities.py +13 -0
  67. uncountable/types/api/entity/list_aggregate.py +79 -0
  68. uncountable/types/api/entity/list_entities.py +25 -0
  69. uncountable/types/api/entity/set_barcode.py +43 -0
  70. uncountable/types/api/entity/transition_entity_phase.py +2 -1
  71. uncountable/types/api/files/download_file.py +15 -1
  72. uncountable/types/api/integrations/__init__.py +1 -0
  73. uncountable/types/api/integrations/publish_realtime_data.py +41 -0
  74. uncountable/types/api/integrations/push_notification.py +49 -0
  75. uncountable/types/api/integrations/register_sockets_token.py +41 -0
  76. uncountable/types/api/listing/__init__.py +1 -0
  77. uncountable/types/api/listing/fetch_listing.py +57 -0
  78. uncountable/types/api/notebooks/__init__.py +1 -0
  79. uncountable/types/api/notebooks/add_notebook_content.py +119 -0
  80. uncountable/types/api/outputs/get_output_organization.py +173 -0
  81. uncountable/types/api/recipes/edit_recipe_inputs.py +1 -1
  82. uncountable/types/api/recipes/get_recipe_output_metadata.py +2 -2
  83. uncountable/types/api/recipes/get_recipes_data.py +29 -0
  84. uncountable/types/api/recipes/lock_recipes.py +2 -1
  85. uncountable/types/api/recipes/set_recipe_total.py +59 -0
  86. uncountable/types/api/recipes/unlock_recipes.py +2 -1
  87. uncountable/types/api/runsheet/export_default_runsheet.py +44 -0
  88. uncountable/types/api/uploader/complete_async_parse.py +46 -0
  89. uncountable/types/api/user/__init__.py +1 -0
  90. uncountable/types/api/user/get_current_user_info.py +40 -0
  91. uncountable/types/async_batch_processor.py +266 -0
  92. uncountable/types/async_batch_t.py +5 -0
  93. uncountable/types/client_base.py +432 -2
  94. uncountable/types/client_config.py +1 -0
  95. uncountable/types/client_config_t.py +10 -0
  96. uncountable/types/entity_t.py +9 -1
  97. uncountable/types/exports_t.py +1 -0
  98. uncountable/types/integration_server_t.py +2 -0
  99. uncountable/types/integration_session.py +10 -0
  100. uncountable/types/integration_session_t.py +60 -0
  101. uncountable/types/integrations.py +10 -0
  102. uncountable/types/integrations_t.py +62 -0
  103. uncountable/types/listing.py +46 -0
  104. uncountable/types/listing_t.py +533 -0
  105. uncountable/types/notices.py +8 -0
  106. uncountable/types/notices_t.py +37 -0
  107. uncountable/types/notifications.py +11 -0
  108. uncountable/types/notifications_t.py +74 -0
  109. uncountable/types/queued_job.py +2 -0
  110. uncountable/types/queued_job_t.py +20 -2
  111. uncountable/types/sockets.py +20 -0
  112. uncountable/types/sockets_t.py +169 -0
  113. uncountable/types/uploader.py +24 -0
  114. uncountable/types/uploader_t.py +222 -0
  115. {uncountablepythonsdk-0.0.115.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/METADATA +5 -2
  116. {uncountablepythonsdk-0.0.115.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/RECORD +118 -79
  117. docs/quickstart.md +0 -19
  118. {uncountablepythonsdk-0.0.115.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/WHEEL +0 -0
  119. {uncountablepythonsdk-0.0.115.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,533 @@
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_alias_annotation
14
+ from pkgs.serialization import serial_string_enum
15
+ from . import base_t
16
+ from . import entity_t
17
+
18
+ __all__: list[str] = [
19
+ "AggregateLoadTypes",
20
+ "ColumnIdentifier",
21
+ "ColumnIdentifierEntityRefName",
22
+ "ColumnIdentifierTransitive",
23
+ "ColumnIdentifierTransitiveAggregate",
24
+ "ColumnType",
25
+ "DateGroupType",
26
+ "FilterIdType",
27
+ "FilterNode",
28
+ "FilterNodeBase",
29
+ "FilterNodeColumnAnd",
30
+ "FilterNodeType",
31
+ "FilterRelation",
32
+ "FilterScalarType",
33
+ "FilterSpec",
34
+ "FilterSpecBase",
35
+ "FilterSpecEquals",
36
+ "FilterSpecExists",
37
+ "FilterSpecGeq",
38
+ "FilterSpecGreater",
39
+ "FilterSpecIStrContains",
40
+ "FilterSpecIStrStartsWith",
41
+ "FilterSpecInclude",
42
+ "FilterSpecLeq",
43
+ "FilterSpecLess",
44
+ "LoadAggregateCollect",
45
+ "LoadAggregateCollectDistinct",
46
+ "LoadAggregateCount",
47
+ "LoadAggregateCountDistinct",
48
+ "LoadAggregateFirst",
49
+ "LoadAggregateGroupBy",
50
+ "LoadAggregateGroupByDate",
51
+ "LoadAggregateMax",
52
+ "LoadAggregateMean",
53
+ "LoadAggregateMin",
54
+ "LoadAggregateStddev",
55
+ "LoadAggregateSum",
56
+ "LoadAggregateType",
57
+ "LoadAggregateUniqueValue",
58
+ "StringFilterValue",
59
+ ]
60
+
61
+
62
+ # DO NOT MODIFY -- This file is generated by type_spec
63
+ class ColumnType(StrEnum):
64
+ ENTITY_REF_NAME = "entity_ref_name"
65
+ TRANSITIVE = "transitive"
66
+ TRANSITIVE_AGGREGATE = "transitive_aggregate"
67
+
68
+
69
+ # DO NOT MODIFY -- This file is generated by type_spec
70
+ @serial_class(
71
+ named_type_path="sdk.listing.ColumnIdentifierEntityRefName",
72
+ parse_require={"type"},
73
+ )
74
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
75
+ class ColumnIdentifierEntityRefName:
76
+ type: typing.Literal[ColumnType.ENTITY_REF_NAME] = ColumnType.ENTITY_REF_NAME
77
+ entity_type: entity_t.EntityType
78
+ ref_name: str
79
+
80
+
81
+ # DO NOT MODIFY -- This file is generated by type_spec
82
+ @serial_class(
83
+ named_type_path="sdk.listing.ColumnIdentifierTransitive",
84
+ parse_require={"type"},
85
+ )
86
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
87
+ class ColumnIdentifierTransitive:
88
+ type: typing.Literal[ColumnType.TRANSITIVE] = ColumnType.TRANSITIVE
89
+ entity_type: entity_t.EntityType
90
+ via: ColumnIdentifier
91
+ target: ColumnIdentifier
92
+
93
+
94
+ # DO NOT MODIFY -- This file is generated by type_spec
95
+ @serial_string_enum(
96
+ labels={
97
+ "group_by": "Group By",
98
+ "group_by_date": "Group By Date",
99
+ "collect": "Collect",
100
+ "collect_distinct": "Distinct",
101
+ "count": "Count",
102
+ "count_distinct": "Count Distinct",
103
+ "first": "First",
104
+ "unique_value": "Unique Value",
105
+ "min": "Minimum",
106
+ "max": "Maximum",
107
+ "mean": "Mean",
108
+ "stddev": "Standard Deviation",
109
+ "sum": "Sum",
110
+ },
111
+ )
112
+ class LoadAggregateType(StrEnum):
113
+ GROUP_BY = "group_by"
114
+ GROUP_BY_DATE = "group_by_date"
115
+ COLLECT = "collect"
116
+ COLLECT_DISTINCT = "collect_distinct"
117
+ COUNT = "count"
118
+ COUNT_DISTINCT = "count_distinct"
119
+ FIRST = "first"
120
+ UNIQUE_VALUE = "unique_value"
121
+ MIN = "min"
122
+ MAX = "max"
123
+ MEAN = "mean"
124
+ STDDEV = "stddev"
125
+ SUM = "sum"
126
+
127
+
128
+ # DO NOT MODIFY -- This file is generated by type_spec
129
+ @serial_class(
130
+ named_type_path="sdk.listing.LoadAggregateGroupBy",
131
+ parse_require={"type"},
132
+ )
133
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
134
+ class LoadAggregateGroupBy:
135
+ type: typing.Literal[LoadAggregateType.GROUP_BY] = LoadAggregateType.GROUP_BY
136
+
137
+
138
+ # DO NOT MODIFY -- This file is generated by type_spec
139
+ @serial_class(
140
+ named_type_path="sdk.listing.LoadAggregateCollect",
141
+ parse_require={"type"},
142
+ )
143
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
144
+ class LoadAggregateCollect:
145
+ type: typing.Literal[LoadAggregateType.COLLECT] = LoadAggregateType.COLLECT
146
+
147
+
148
+ # DO NOT MODIFY -- This file is generated by type_spec
149
+ @serial_class(
150
+ named_type_path="sdk.listing.LoadAggregateCollectDistinct",
151
+ parse_require={"type"},
152
+ )
153
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
154
+ class LoadAggregateCollectDistinct:
155
+ type: typing.Literal[LoadAggregateType.COLLECT_DISTINCT] = LoadAggregateType.COLLECT_DISTINCT
156
+
157
+
158
+ # DO NOT MODIFY -- This file is generated by type_spec
159
+ @serial_class(
160
+ named_type_path="sdk.listing.LoadAggregateCount",
161
+ parse_require={"type"},
162
+ )
163
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
164
+ class LoadAggregateCount:
165
+ type: typing.Literal[LoadAggregateType.COUNT] = LoadAggregateType.COUNT
166
+
167
+
168
+ # DO NOT MODIFY -- This file is generated by type_spec
169
+ @serial_class(
170
+ named_type_path="sdk.listing.LoadAggregateCountDistinct",
171
+ parse_require={"type"},
172
+ )
173
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
174
+ class LoadAggregateCountDistinct:
175
+ type: typing.Literal[LoadAggregateType.COUNT_DISTINCT] = LoadAggregateType.COUNT_DISTINCT
176
+
177
+
178
+ # DO NOT MODIFY -- This file is generated by type_spec
179
+ @serial_class(
180
+ named_type_path="sdk.listing.LoadAggregateFirst",
181
+ parse_require={"type"},
182
+ )
183
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
184
+ class LoadAggregateFirst:
185
+ type: typing.Literal[LoadAggregateType.FIRST] = LoadAggregateType.FIRST
186
+
187
+
188
+ # DO NOT MODIFY -- This file is generated by type_spec
189
+ @serial_class(
190
+ named_type_path="sdk.listing.LoadAggregateUniqueValue",
191
+ parse_require={"type"},
192
+ )
193
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
194
+ class LoadAggregateUniqueValue:
195
+ type: typing.Literal[LoadAggregateType.UNIQUE_VALUE] = LoadAggregateType.UNIQUE_VALUE
196
+
197
+
198
+ # DO NOT MODIFY -- This file is generated by type_spec
199
+ @serial_class(
200
+ named_type_path="sdk.listing.LoadAggregateMin",
201
+ parse_require={"type"},
202
+ )
203
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
204
+ class LoadAggregateMin:
205
+ type: typing.Literal[LoadAggregateType.MIN] = LoadAggregateType.MIN
206
+
207
+
208
+ # DO NOT MODIFY -- This file is generated by type_spec
209
+ @serial_class(
210
+ named_type_path="sdk.listing.LoadAggregateMax",
211
+ parse_require={"type"},
212
+ )
213
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
214
+ class LoadAggregateMax:
215
+ type: typing.Literal[LoadAggregateType.MAX] = LoadAggregateType.MAX
216
+
217
+
218
+ # DO NOT MODIFY -- This file is generated by type_spec
219
+ @serial_class(
220
+ named_type_path="sdk.listing.LoadAggregateMean",
221
+ parse_require={"type"},
222
+ )
223
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
224
+ class LoadAggregateMean:
225
+ type: typing.Literal[LoadAggregateType.MEAN] = LoadAggregateType.MEAN
226
+
227
+
228
+ # DO NOT MODIFY -- This file is generated by type_spec
229
+ @serial_class(
230
+ named_type_path="sdk.listing.LoadAggregateStddev",
231
+ parse_require={"type"},
232
+ )
233
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
234
+ class LoadAggregateStddev:
235
+ type: typing.Literal[LoadAggregateType.STDDEV] = LoadAggregateType.STDDEV
236
+
237
+
238
+ # DO NOT MODIFY -- This file is generated by type_spec
239
+ @serial_class(
240
+ named_type_path="sdk.listing.LoadAggregateSum",
241
+ parse_require={"type"},
242
+ )
243
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
244
+ class LoadAggregateSum:
245
+ type: typing.Literal[LoadAggregateType.SUM] = LoadAggregateType.SUM
246
+
247
+
248
+ # DO NOT MODIFY -- This file is generated by type_spec
249
+ class DateGroupType(StrEnum):
250
+ DAY = "day"
251
+ WEEK = "week"
252
+ MONTH = "month"
253
+ QUARTER = "quarter"
254
+ YEAR = "year"
255
+
256
+
257
+ # DO NOT MODIFY -- This file is generated by type_spec
258
+ @serial_class(
259
+ named_type_path="sdk.listing.LoadAggregateGroupByDate",
260
+ parse_require={"type"},
261
+ )
262
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
263
+ class LoadAggregateGroupByDate:
264
+ type: typing.Literal[LoadAggregateType.GROUP_BY_DATE] = LoadAggregateType.GROUP_BY_DATE
265
+ date_group: DateGroupType
266
+ user_timezone: str | None = None
267
+
268
+
269
+ # DO NOT MODIFY -- This file is generated by type_spec
270
+ AggregateLoadTypes = typing.Annotated[
271
+ LoadAggregateGroupByDate | LoadAggregateGroupBy | LoadAggregateCollect | LoadAggregateCollectDistinct | LoadAggregateCount | LoadAggregateCountDistinct | LoadAggregateFirst | LoadAggregateUniqueValue | LoadAggregateMin | LoadAggregateMax | LoadAggregateMean | LoadAggregateStddev | LoadAggregateSum,
272
+ serial_union_annotation(
273
+ named_type_path="sdk.listing.AggregateLoadTypes",
274
+ discriminator="type",
275
+ discriminator_map={
276
+ "group_by_date": LoadAggregateGroupByDate,
277
+ "group_by": LoadAggregateGroupBy,
278
+ "collect": LoadAggregateCollect,
279
+ "collect_distinct": LoadAggregateCollectDistinct,
280
+ "count": LoadAggregateCount,
281
+ "count_distinct": LoadAggregateCountDistinct,
282
+ "first": LoadAggregateFirst,
283
+ "unique_value": LoadAggregateUniqueValue,
284
+ "min": LoadAggregateMin,
285
+ "max": LoadAggregateMax,
286
+ "mean": LoadAggregateMean,
287
+ "stddev": LoadAggregateStddev,
288
+ "sum": LoadAggregateSum,
289
+ },
290
+ ),
291
+ ]
292
+
293
+
294
+ # DO NOT MODIFY -- This file is generated by type_spec
295
+ @serial_class(
296
+ named_type_path="sdk.listing.ColumnIdentifierTransitiveAggregate",
297
+ parse_require={"type"},
298
+ )
299
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
300
+ class ColumnIdentifierTransitiveAggregate:
301
+ type: typing.Literal[ColumnType.TRANSITIVE_AGGREGATE] = ColumnType.TRANSITIVE_AGGREGATE
302
+ entity_type: entity_t.EntityType
303
+ via: ColumnIdentifier
304
+ target: ColumnIdentifier
305
+ aggregate: AggregateLoadTypes
306
+ filters: FilterNode | None = None
307
+
308
+
309
+ # DO NOT MODIFY -- This file is generated by type_spec
310
+ ColumnIdentifier = typing.Annotated[
311
+ ColumnIdentifierEntityRefName | ColumnIdentifierTransitive | ColumnIdentifierTransitiveAggregate,
312
+ serial_union_annotation(
313
+ named_type_path="sdk.listing.ColumnIdentifier",
314
+ discriminator="type",
315
+ discriminator_map={
316
+ "entity_ref_name": ColumnIdentifierEntityRefName,
317
+ "transitive": ColumnIdentifierTransitive,
318
+ "transitive_aggregate": ColumnIdentifierTransitiveAggregate,
319
+ },
320
+ ),
321
+ ]
322
+
323
+
324
+ # DO NOT MODIFY -- This file is generated by type_spec
325
+ class FilterRelation(StrEnum):
326
+ EQUALS = "equals"
327
+ GREATER = "greater"
328
+ GEQ = "geq"
329
+ LESS = "less"
330
+ LEQ = "leq"
331
+ ISTR_CONTAINS = "istr_contains"
332
+ ISTR_STARTS_WITH = "istr_starts_with"
333
+ INCLUDE = "include"
334
+ EXISTS = "exists"
335
+
336
+
337
+ # DO NOT MODIFY -- This file is generated by type_spec
338
+ @serial_class(
339
+ named_type_path="sdk.listing.FilterSpecBase",
340
+ )
341
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
342
+ class FilterSpecBase:
343
+ relation: FilterRelation
344
+ column: ColumnIdentifier
345
+
346
+
347
+ # DO NOT MODIFY -- This file is generated by type_spec
348
+ FilterScalarType = typing.Annotated[
349
+ str | int | Decimal,
350
+ serial_alias_annotation(
351
+ named_type_path="sdk.listing.FilterScalarType",
352
+ ),
353
+ ]
354
+
355
+
356
+ # DO NOT MODIFY -- This file is generated by type_spec
357
+ FilterIdType = typing.Annotated[
358
+ base_t.ObjectId | str,
359
+ serial_alias_annotation(
360
+ named_type_path="sdk.listing.FilterIdType",
361
+ ),
362
+ ]
363
+
364
+
365
+ # DO NOT MODIFY -- This file is generated by type_spec
366
+ StringFilterValue = typing.Annotated[
367
+ typing.Union[str],
368
+ serial_alias_annotation(
369
+ named_type_path="sdk.listing.StringFilterValue",
370
+ ),
371
+ ]
372
+
373
+
374
+ # DO NOT MODIFY -- This file is generated by type_spec
375
+ @serial_class(
376
+ named_type_path="sdk.listing.FilterSpecEquals",
377
+ parse_require={"relation"},
378
+ )
379
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
380
+ class FilterSpecEquals(FilterSpecBase):
381
+ relation: typing.Literal[FilterRelation.EQUALS] = FilterRelation.EQUALS
382
+ value: FilterScalarType
383
+
384
+
385
+ # DO NOT MODIFY -- This file is generated by type_spec
386
+ @serial_class(
387
+ named_type_path="sdk.listing.FilterSpecInclude",
388
+ parse_require={"relation"},
389
+ )
390
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
391
+ class FilterSpecInclude(FilterSpecBase):
392
+ relation: typing.Literal[FilterRelation.INCLUDE] = FilterRelation.INCLUDE
393
+ value: FilterIdType | tuple[FilterIdType, ...]
394
+
395
+
396
+ # DO NOT MODIFY -- This file is generated by type_spec
397
+ @serial_class(
398
+ named_type_path="sdk.listing.FilterSpecIStrContains",
399
+ parse_require={"relation"},
400
+ )
401
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
402
+ class FilterSpecIStrContains(FilterSpecBase):
403
+ relation: typing.Literal[FilterRelation.ISTR_CONTAINS] = FilterRelation.ISTR_CONTAINS
404
+ value: str
405
+
406
+
407
+ # DO NOT MODIFY -- This file is generated by type_spec
408
+ @serial_class(
409
+ named_type_path="sdk.listing.FilterSpecIStrStartsWith",
410
+ parse_require={"relation"},
411
+ )
412
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
413
+ class FilterSpecIStrStartsWith(FilterSpecBase):
414
+ relation: typing.Literal[FilterRelation.ISTR_STARTS_WITH] = FilterRelation.ISTR_STARTS_WITH
415
+ value: str
416
+
417
+
418
+ # DO NOT MODIFY -- This file is generated by type_spec
419
+ @serial_class(
420
+ named_type_path="sdk.listing.FilterSpecExists",
421
+ parse_require={"relation"},
422
+ )
423
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
424
+ class FilterSpecExists(FilterSpecBase):
425
+ relation: typing.Literal[FilterRelation.EXISTS] = FilterRelation.EXISTS
426
+
427
+
428
+ # DO NOT MODIFY -- This file is generated by type_spec
429
+ @serial_class(
430
+ named_type_path="sdk.listing.FilterSpecGreater",
431
+ to_string_values={"value"},
432
+ parse_require={"relation"},
433
+ )
434
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
435
+ class FilterSpecGreater(FilterSpecBase):
436
+ relation: typing.Literal[FilterRelation.GREATER] = FilterRelation.GREATER
437
+ value: Decimal
438
+
439
+
440
+ # DO NOT MODIFY -- This file is generated by type_spec
441
+ @serial_class(
442
+ named_type_path="sdk.listing.FilterSpecLess",
443
+ to_string_values={"value"},
444
+ parse_require={"relation"},
445
+ )
446
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
447
+ class FilterSpecLess(FilterSpecBase):
448
+ relation: typing.Literal[FilterRelation.LESS] = FilterRelation.LESS
449
+ value: Decimal
450
+
451
+
452
+ # DO NOT MODIFY -- This file is generated by type_spec
453
+ @serial_class(
454
+ named_type_path="sdk.listing.FilterSpecGeq",
455
+ to_string_values={"value"},
456
+ parse_require={"relation"},
457
+ )
458
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
459
+ class FilterSpecGeq(FilterSpecBase):
460
+ relation: typing.Literal[FilterRelation.GEQ] = FilterRelation.GEQ
461
+ value: Decimal
462
+
463
+
464
+ # DO NOT MODIFY -- This file is generated by type_spec
465
+ @serial_class(
466
+ named_type_path="sdk.listing.FilterSpecLeq",
467
+ to_string_values={"value"},
468
+ parse_require={"relation"},
469
+ )
470
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
471
+ class FilterSpecLeq(FilterSpecBase):
472
+ relation: typing.Literal[FilterRelation.LEQ] = FilterRelation.LEQ
473
+ value: Decimal
474
+
475
+
476
+ # DO NOT MODIFY -- This file is generated by type_spec
477
+ FilterSpec = typing.Annotated[
478
+ FilterSpecEquals | FilterSpecGreater | FilterSpecGeq | FilterSpecLeq | FilterSpecIStrContains | FilterSpecIStrStartsWith | FilterSpecInclude | FilterSpecExists | FilterSpecLess,
479
+ serial_union_annotation(
480
+ named_type_path="sdk.listing.FilterSpec",
481
+ discriminator="relation",
482
+ discriminator_map={
483
+ "equals": FilterSpecEquals,
484
+ "greater": FilterSpecGreater,
485
+ "geq": FilterSpecGeq,
486
+ "leq": FilterSpecLeq,
487
+ "istr_contains": FilterSpecIStrContains,
488
+ "istr_starts_with": FilterSpecIStrStartsWith,
489
+ "include": FilterSpecInclude,
490
+ "exists": FilterSpecExists,
491
+ "less": FilterSpecLess,
492
+ },
493
+ ),
494
+ ]
495
+
496
+
497
+ # DO NOT MODIFY -- This file is generated by type_spec
498
+ class FilterNodeType(StrEnum):
499
+ COLUMN_AND = "column_and"
500
+
501
+
502
+ # DO NOT MODIFY -- This file is generated by type_spec
503
+ @serial_class(
504
+ named_type_path="sdk.listing.FilterNodeBase",
505
+ )
506
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
507
+ class FilterNodeBase:
508
+ type: FilterNodeType
509
+
510
+
511
+ # DO NOT MODIFY -- This file is generated by type_spec
512
+ @serial_class(
513
+ named_type_path="sdk.listing.FilterNodeColumnAnd",
514
+ parse_require={"type"},
515
+ )
516
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
517
+ class FilterNodeColumnAnd:
518
+ type: typing.Literal[FilterNodeType.COLUMN_AND] = FilterNodeType.COLUMN_AND
519
+ filters: tuple[FilterSpec, ...]
520
+
521
+
522
+ # DO NOT MODIFY -- This file is generated by type_spec
523
+ FilterNode = typing.Annotated[
524
+ typing.Union[FilterNodeColumnAnd],
525
+ serial_union_annotation(
526
+ named_type_path="sdk.listing.FilterNode",
527
+ discriminator="type",
528
+ discriminator_map={
529
+ "column_and": FilterNodeColumnAnd,
530
+ },
531
+ ),
532
+ ]
533
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,8 @@
1
+ # ruff: noqa: E402 Q003
2
+ # fmt: off
3
+ # isort: skip_file
4
+ # DO NOT MODIFY -- This file is generated by type_spec
5
+ # Kept only for SDK backwards compatibility
6
+ from .notices_t import NoticeType as NoticeType
7
+ from .notices_t import NotificationNoticeConfiguration as NotificationNoticeConfiguration
8
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,37 @@
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 . import base_t
13
+
14
+ __all__: list[str] = [
15
+ "NoticeType",
16
+ "NotificationNoticeConfiguration",
17
+ ]
18
+
19
+
20
+ # DO NOT MODIFY -- This file is generated by type_spec
21
+ class NoticeType(StrEnum):
22
+ ERROR = "error"
23
+ WARNING = "warning"
24
+ INFO = "info"
25
+ SUCCESS = "success"
26
+ DEBUG = "debug"
27
+ PLAIN = "plain"
28
+
29
+
30
+ # DO NOT MODIFY -- This file is generated by type_spec
31
+ @serial_class(
32
+ named_type_path="sdk.notices.NotificationNoticeConfiguration",
33
+ )
34
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
35
+ class NotificationNoticeConfiguration:
36
+ notice_type: NoticeType | None = None
37
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,11 @@
1
+ # ruff: noqa: E402 Q003
2
+ # fmt: off
3
+ # isort: skip_file
4
+ # DO NOT MODIFY -- This file is generated by type_spec
5
+ # Kept only for SDK backwards compatibility
6
+ from .notifications_t import NotificationTargetType as NotificationTargetType
7
+ from .notifications_t import NotificationTargetBase as NotificationTargetBase
8
+ from .notifications_t import NotificationTargetUser as NotificationTargetUser
9
+ from .notifications_t import NotificationTargetUserGroup as NotificationTargetUserGroup
10
+ from .notifications_t import NotificationTarget as NotificationTarget
11
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,74 @@
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 . import base_t
14
+ from . import identifier_t
15
+
16
+ __all__: list[str] = [
17
+ "NotificationTarget",
18
+ "NotificationTargetBase",
19
+ "NotificationTargetType",
20
+ "NotificationTargetUser",
21
+ "NotificationTargetUserGroup",
22
+ ]
23
+
24
+
25
+ # DO NOT MODIFY -- This file is generated by type_spec
26
+ class NotificationTargetType(StrEnum):
27
+ USER = "user"
28
+ USER_GROUP = "user_group"
29
+
30
+
31
+ # DO NOT MODIFY -- This file is generated by type_spec
32
+ @serial_class(
33
+ named_type_path="sdk.notifications.NotificationTargetBase",
34
+ )
35
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
36
+ class NotificationTargetBase:
37
+ type: NotificationTargetType
38
+
39
+
40
+ # DO NOT MODIFY -- This file is generated by type_spec
41
+ @serial_class(
42
+ named_type_path="sdk.notifications.NotificationTargetUser",
43
+ parse_require={"type"},
44
+ )
45
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
46
+ class NotificationTargetUser(NotificationTargetBase):
47
+ type: typing.Literal[NotificationTargetType.USER] = NotificationTargetType.USER
48
+ user_key: identifier_t.IdentifierKey
49
+
50
+
51
+ # DO NOT MODIFY -- This file is generated by type_spec
52
+ @serial_class(
53
+ named_type_path="sdk.notifications.NotificationTargetUserGroup",
54
+ parse_require={"type"},
55
+ )
56
+ @dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
57
+ class NotificationTargetUserGroup(NotificationTargetBase):
58
+ type: typing.Literal[NotificationTargetType.USER_GROUP] = NotificationTargetType.USER_GROUP
59
+ user_group_key: identifier_t.IdentifierKey
60
+
61
+
62
+ # DO NOT MODIFY -- This file is generated by type_spec
63
+ NotificationTarget = typing.Annotated[
64
+ NotificationTargetUser | NotificationTargetUserGroup,
65
+ serial_union_annotation(
66
+ named_type_path="sdk.notifications.NotificationTarget",
67
+ discriminator="type",
68
+ discriminator_map={
69
+ "user": NotificationTargetUser,
70
+ "user_group": NotificationTargetUserGroup,
71
+ },
72
+ ),
73
+ ]
74
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -11,5 +11,7 @@ from .queued_job_t import InvocationContextWebhook as InvocationContextWebhook
11
11
  from .queued_job_t import InvocationContext as InvocationContext
12
12
  from .queued_job_t import QueuedJobPayload as QueuedJobPayload
13
13
  from .queued_job_t import QueuedJobResult as QueuedJobResult
14
+ from .queued_job_t import QueuedJobMetadata as QueuedJobMetadata
14
15
  from .queued_job_t import QueuedJob as QueuedJob
16
+ from .queued_job_t import JobStatus as JobStatus
15
17
  # DO NOT MODIFY -- This file is generated by type_spec