UncountablePythonSDK 0.0.122__py3-none-any.whl → 0.0.124__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.
- docs/conf.py +23 -4
- docs/index.md +105 -5
- docs/integration_examples/create_ingredient.md +43 -0
- docs/integration_examples/create_output.md +56 -0
- docs/integration_examples/index.md +6 -0
- docs/requirements.txt +1 -1
- examples/basic_auth.py +7 -0
- examples/integration-server/pyproject.toml +1 -1
- examples/oauth.py +7 -0
- pkgs/argument_parser/_is_namedtuple.py +3 -0
- pkgs/type_spec/type_info/emit_type_info.py +10 -1
- uncountable/integration/http_server/types.py +3 -1
- uncountable/integration/scheduler.py +62 -17
- uncountable/integration/telemetry.py +9 -1
- uncountable/types/__init__.py +10 -0
- uncountable/types/api/entity/export_entities.py +13 -0
- uncountable/types/api/integrations/push_notification.py +47 -0
- uncountable/types/api/outputs/get_output_organization.py +173 -0
- uncountable/types/async_batch_processor.py +41 -0
- uncountable/types/async_batch_t.py +1 -0
- uncountable/types/client_base.py +30 -0
- uncountable/types/integration_session.py +10 -0
- uncountable/types/integration_session_t.py +60 -0
- uncountable/types/notifications.py +11 -0
- uncountable/types/notifications_t.py +74 -0
- uncountable/types/sockets.py +11 -0
- uncountable/types/sockets_t.py +70 -0
- {uncountablepythonsdk-0.0.122.dist-info → uncountablepythonsdk-0.0.124.dist-info}/METADATA +2 -2
- {uncountablepythonsdk-0.0.122.dist-info → uncountablepythonsdk-0.0.124.dist-info}/RECORD +31 -19
- docs/quickstart.md +0 -19
- {uncountablepythonsdk-0.0.122.dist-info → uncountablepythonsdk-0.0.124.dist-info}/WHEEL +0 -0
- {uncountablepythonsdk-0.0.122.dist-info → uncountablepythonsdk-0.0.124.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
from ... import notifications_t
|
|
15
|
+
|
|
16
|
+
__all__: list[str] = [
|
|
17
|
+
"Arguments",
|
|
18
|
+
"Data",
|
|
19
|
+
"ENDPOINT_METHOD",
|
|
20
|
+
"ENDPOINT_PATH",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
ENDPOINT_METHOD = "POST"
|
|
24
|
+
ENDPOINT_PATH = "api/external/integrations/push_notification"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
28
|
+
@serial_class(
|
|
29
|
+
named_type_path="sdk.api.integrations.push_notification.Arguments",
|
|
30
|
+
)
|
|
31
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
32
|
+
class Arguments:
|
|
33
|
+
notification_targets: list[notifications_t.NotificationTarget]
|
|
34
|
+
subject: str
|
|
35
|
+
message: str
|
|
36
|
+
display_notice: bool = False
|
|
37
|
+
entity: entity_t.EntityIdentifier | None = None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
41
|
+
@serial_class(
|
|
42
|
+
named_type_path="sdk.api.integrations.push_notification.Data",
|
|
43
|
+
)
|
|
44
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
45
|
+
class Data(async_batch_t.AsyncBatchActionReturn):
|
|
46
|
+
pass
|
|
47
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -0,0 +1,173 @@
|
|
|
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 ... import base_t
|
|
15
|
+
|
|
16
|
+
__all__: list[str] = [
|
|
17
|
+
"Arguments",
|
|
18
|
+
"Data",
|
|
19
|
+
"ENDPOINT_METHOD",
|
|
20
|
+
"ENDPOINT_PATH",
|
|
21
|
+
"OrganizationParameter",
|
|
22
|
+
"OrganizationParameterBase",
|
|
23
|
+
"OrganizationParameterCategory",
|
|
24
|
+
"OrganizationParameterConditionParameter",
|
|
25
|
+
"OrganizationParameterRecipeInput",
|
|
26
|
+
"OrganizationParameterType",
|
|
27
|
+
"OutputOrganizationRequest",
|
|
28
|
+
"OutputOrganizationRequestMaterialFamily",
|
|
29
|
+
"OutputOrganizationRequestProject",
|
|
30
|
+
"OutputOrganizationRequestScope",
|
|
31
|
+
"OutputOrganizationRequestUser",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
ENDPOINT_METHOD = "GET"
|
|
35
|
+
ENDPOINT_PATH = "api/external/outputs/get_output_organization"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
39
|
+
class OutputOrganizationRequestScope(StrEnum):
|
|
40
|
+
MATERIAL_FAMILY = "material_family"
|
|
41
|
+
PROJECT = "project"
|
|
42
|
+
USER = "user"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
46
|
+
@serial_class(
|
|
47
|
+
named_type_path="sdk.api.outputs.get_output_organization.OutputOrganizationRequestMaterialFamily",
|
|
48
|
+
parse_require={"scope"},
|
|
49
|
+
)
|
|
50
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
51
|
+
class OutputOrganizationRequestMaterialFamily:
|
|
52
|
+
scope: typing.Literal[OutputOrganizationRequestScope.MATERIAL_FAMILY] = OutputOrganizationRequestScope.MATERIAL_FAMILY
|
|
53
|
+
material_family_id: base_t.ObjectId
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
57
|
+
@serial_class(
|
|
58
|
+
named_type_path="sdk.api.outputs.get_output_organization.OutputOrganizationRequestProject",
|
|
59
|
+
parse_require={"scope"},
|
|
60
|
+
)
|
|
61
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
62
|
+
class OutputOrganizationRequestProject:
|
|
63
|
+
scope: typing.Literal[OutputOrganizationRequestScope.PROJECT] = OutputOrganizationRequestScope.PROJECT
|
|
64
|
+
project_id: base_t.ObjectId
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
68
|
+
@serial_class(
|
|
69
|
+
named_type_path="sdk.api.outputs.get_output_organization.OutputOrganizationRequestUser",
|
|
70
|
+
parse_require={"scope"},
|
|
71
|
+
)
|
|
72
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
73
|
+
class OutputOrganizationRequestUser:
|
|
74
|
+
scope: typing.Literal[OutputOrganizationRequestScope.USER] = OutputOrganizationRequestScope.USER
|
|
75
|
+
material_family_id: base_t.ObjectId
|
|
76
|
+
user_id: base_t.ObjectId
|
|
77
|
+
project_id: base_t.ObjectId | None = None
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
81
|
+
OutputOrganizationRequest = typing.Annotated[
|
|
82
|
+
OutputOrganizationRequestMaterialFamily | OutputOrganizationRequestProject | OutputOrganizationRequestUser,
|
|
83
|
+
serial_alias_annotation(
|
|
84
|
+
named_type_path="sdk.api.outputs.get_output_organization.OutputOrganizationRequest",
|
|
85
|
+
),
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
90
|
+
@serial_class(
|
|
91
|
+
named_type_path="sdk.api.outputs.get_output_organization.Arguments",
|
|
92
|
+
)
|
|
93
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
94
|
+
class Arguments:
|
|
95
|
+
request: OutputOrganizationRequest
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
99
|
+
class OrganizationParameterType(StrEnum):
|
|
100
|
+
CATEGORY = "category"
|
|
101
|
+
RECIPE_INPUT = "recipe_input"
|
|
102
|
+
CONDITION_PARAMETER = "condition_parameter"
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
106
|
+
@serial_class(
|
|
107
|
+
named_type_path="sdk.api.outputs.get_output_organization.OrganizationParameterBase",
|
|
108
|
+
)
|
|
109
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
110
|
+
class OrganizationParameterBase:
|
|
111
|
+
output_organization_parameter_id: base_t.ObjectId
|
|
112
|
+
null_on_top: bool
|
|
113
|
+
sort_asc: bool
|
|
114
|
+
type: OrganizationParameterType
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
118
|
+
@serial_class(
|
|
119
|
+
named_type_path="sdk.api.outputs.get_output_organization.OrganizationParameterCategory",
|
|
120
|
+
parse_require={"type"},
|
|
121
|
+
)
|
|
122
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
123
|
+
class OrganizationParameterCategory(OrganizationParameterBase):
|
|
124
|
+
type: typing.Literal[OrganizationParameterType.CATEGORY] = OrganizationParameterType.CATEGORY
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
128
|
+
@serial_class(
|
|
129
|
+
named_type_path="sdk.api.outputs.get_output_organization.OrganizationParameterRecipeInput",
|
|
130
|
+
parse_require={"type"},
|
|
131
|
+
)
|
|
132
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
133
|
+
class OrganizationParameterRecipeInput(OrganizationParameterBase):
|
|
134
|
+
input_id: base_t.ObjectId
|
|
135
|
+
type: typing.Literal[OrganizationParameterType.RECIPE_INPUT] = OrganizationParameterType.RECIPE_INPUT
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
139
|
+
@serial_class(
|
|
140
|
+
named_type_path="sdk.api.outputs.get_output_organization.OrganizationParameterConditionParameter",
|
|
141
|
+
parse_require={"type"},
|
|
142
|
+
)
|
|
143
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
144
|
+
class OrganizationParameterConditionParameter(OrganizationParameterBase):
|
|
145
|
+
condition_parameter_id: base_t.ObjectId
|
|
146
|
+
type: typing.Literal[OrganizationParameterType.CONDITION_PARAMETER] = OrganizationParameterType.CONDITION_PARAMETER
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
150
|
+
OrganizationParameter = typing.Annotated[
|
|
151
|
+
OrganizationParameterCategory | OrganizationParameterRecipeInput | OrganizationParameterConditionParameter,
|
|
152
|
+
serial_union_annotation(
|
|
153
|
+
named_type_path="sdk.api.outputs.get_output_organization.OrganizationParameter",
|
|
154
|
+
discriminator="type",
|
|
155
|
+
discriminator_map={
|
|
156
|
+
"category": OrganizationParameterCategory,
|
|
157
|
+
"recipe_input": OrganizationParameterRecipeInput,
|
|
158
|
+
"condition_parameter": OrganizationParameterConditionParameter,
|
|
159
|
+
},
|
|
160
|
+
),
|
|
161
|
+
]
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
165
|
+
@serial_class(
|
|
166
|
+
named_type_path="sdk.api.outputs.get_output_organization.Data",
|
|
167
|
+
)
|
|
168
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
169
|
+
class Data:
|
|
170
|
+
organization_id: base_t.ObjectId
|
|
171
|
+
column_definitions: list[OrganizationParameter]
|
|
172
|
+
table_definitions: list[OrganizationParameter]
|
|
173
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -25,6 +25,8 @@ import uncountable.types.api.entity.grant_entity_permissions as grant_entity_per
|
|
|
25
25
|
from uncountable.types import identifier_t
|
|
26
26
|
import uncountable.types.api.uploader.invoke_uploader as invoke_uploader_t
|
|
27
27
|
import uncountable.types.api.entity.lookup_entity as lookup_entity_t
|
|
28
|
+
from uncountable.types import notifications_t
|
|
29
|
+
import uncountable.types.api.integrations.push_notification as push_notification_t
|
|
28
30
|
from uncountable.types import recipe_identifiers_t
|
|
29
31
|
from uncountable.types import recipe_metadata_t
|
|
30
32
|
from uncountable.types import recipe_workflow_steps_t
|
|
@@ -492,6 +494,45 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
492
494
|
batch_reference=req.batch_reference,
|
|
493
495
|
)
|
|
494
496
|
|
|
497
|
+
def push_notification(
|
|
498
|
+
self,
|
|
499
|
+
*,
|
|
500
|
+
notification_targets: list[notifications_t.NotificationTarget],
|
|
501
|
+
subject: str,
|
|
502
|
+
message: str,
|
|
503
|
+
display_notice: bool = False,
|
|
504
|
+
entity: entity_t.EntityIdentifier | None = None,
|
|
505
|
+
depends_on: list[str] | None = None,
|
|
506
|
+
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
507
|
+
"""Push a notification to a user or user group
|
|
508
|
+
|
|
509
|
+
:param depends_on: A list of batch reference keys to process before processing this request
|
|
510
|
+
"""
|
|
511
|
+
args = push_notification_t.Arguments(
|
|
512
|
+
notification_targets=notification_targets,
|
|
513
|
+
subject=subject,
|
|
514
|
+
message=message,
|
|
515
|
+
entity=entity,
|
|
516
|
+
display_notice=display_notice,
|
|
517
|
+
)
|
|
518
|
+
json_data = serialize_for_api(args)
|
|
519
|
+
|
|
520
|
+
batch_reference = str(uuid.uuid4())
|
|
521
|
+
|
|
522
|
+
req = async_batch_t.AsyncBatchRequest(
|
|
523
|
+
path=async_batch_t.AsyncBatchRequestPath.PUSH_NOTIFICATION,
|
|
524
|
+
data=json_data,
|
|
525
|
+
depends_on=depends_on,
|
|
526
|
+
batch_reference=batch_reference,
|
|
527
|
+
)
|
|
528
|
+
|
|
529
|
+
self._enqueue(req)
|
|
530
|
+
|
|
531
|
+
return async_batch_t.QueuedAsyncBatchRequest(
|
|
532
|
+
path=req.path,
|
|
533
|
+
batch_reference=req.batch_reference,
|
|
534
|
+
)
|
|
535
|
+
|
|
495
536
|
def set_entity_field_values(
|
|
496
537
|
self,
|
|
497
538
|
*,
|
|
@@ -45,6 +45,7 @@ class AsyncBatchRequestPath(StrEnum):
|
|
|
45
45
|
UPSERT_CONDITION_MATCH = "condition_parameters/upsert_condition_match"
|
|
46
46
|
COMPLETE_ASYNC_UPLOAD = "runsheet/complete_async_upload"
|
|
47
47
|
CREATE_MIX_ORDER = "recipes/create_mix_order"
|
|
48
|
+
PUSH_NOTIFICATION = "integrations/push_notification"
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
# DO NOT MODIFY -- This file is generated by type_spec
|
uncountable/types/client_base.py
CHANGED
|
@@ -64,8 +64,10 @@ import uncountable.types.api.entity.lock_entity as lock_entity_t
|
|
|
64
64
|
import uncountable.types.api.recipes.lock_recipes as lock_recipes_t
|
|
65
65
|
import uncountable.types.api.entity.lookup_entity as lookup_entity_t
|
|
66
66
|
import uncountable.types.api.id_source.match_id_source as match_id_source_t
|
|
67
|
+
from uncountable.types import notifications_t
|
|
67
68
|
from uncountable.types import permissions_t
|
|
68
69
|
from uncountable.types import post_base_t
|
|
70
|
+
import uncountable.types.api.integrations.push_notification as push_notification_t
|
|
69
71
|
from uncountable.types import recipe_identifiers_t
|
|
70
72
|
from uncountable.types import recipe_links_t
|
|
71
73
|
from uncountable.types import recipe_metadata_t
|
|
@@ -610,6 +612,7 @@ class ClientMethods(ABC):
|
|
|
610
612
|
type: exports_t.ExportType = exports_t.ExportType.EXCEL,
|
|
611
613
|
client_timezone: exports_t.ListingExportUserTimezone | None = None,
|
|
612
614
|
limit: int | None = None,
|
|
615
|
+
attributes: list[export_entities_t.ListingAttribute] | None = None,
|
|
613
616
|
) -> export_entities_t.Data:
|
|
614
617
|
"""Uses a structured loading configuration to export entities in the system. This endpoint is asynchronous, and returns the job ID that can be used to query the status of the export.
|
|
615
618
|
|
|
@@ -621,6 +624,7 @@ class ClientMethods(ABC):
|
|
|
621
624
|
client_timezone=client_timezone,
|
|
622
625
|
limit=limit,
|
|
623
626
|
type=type,
|
|
627
|
+
attributes=attributes,
|
|
624
628
|
)
|
|
625
629
|
api_request = APIRequest(
|
|
626
630
|
method=export_entities_t.ENDPOINT_METHOD,
|
|
@@ -1256,6 +1260,32 @@ class ClientMethods(ABC):
|
|
|
1256
1260
|
)
|
|
1257
1261
|
return self.do_request(api_request=api_request, return_type=match_id_source_t.Data)
|
|
1258
1262
|
|
|
1263
|
+
def push_notification(
|
|
1264
|
+
self,
|
|
1265
|
+
*,
|
|
1266
|
+
notification_targets: list[notifications_t.NotificationTarget],
|
|
1267
|
+
subject: str,
|
|
1268
|
+
message: str,
|
|
1269
|
+
display_notice: bool = False,
|
|
1270
|
+
entity: entity_t.EntityIdentifier | None = None,
|
|
1271
|
+
) -> push_notification_t.Data:
|
|
1272
|
+
"""Push a notification to a user or user group
|
|
1273
|
+
|
|
1274
|
+
"""
|
|
1275
|
+
args = push_notification_t.Arguments(
|
|
1276
|
+
notification_targets=notification_targets,
|
|
1277
|
+
subject=subject,
|
|
1278
|
+
message=message,
|
|
1279
|
+
entity=entity,
|
|
1280
|
+
display_notice=display_notice,
|
|
1281
|
+
)
|
|
1282
|
+
api_request = APIRequest(
|
|
1283
|
+
method=push_notification_t.ENDPOINT_METHOD,
|
|
1284
|
+
endpoint=push_notification_t.ENDPOINT_PATH,
|
|
1285
|
+
args=args,
|
|
1286
|
+
)
|
|
1287
|
+
return self.do_request(api_request=api_request, return_type=push_notification_t.Data)
|
|
1288
|
+
|
|
1259
1289
|
def remove_recipe_from_project(
|
|
1260
1290
|
self,
|
|
1261
1291
|
*,
|
|
@@ -0,0 +1,10 @@
|
|
|
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 .integration_session_t import IntegrationSessionType as IntegrationSessionType
|
|
7
|
+
from .integration_session_t import IntegrationSessionBase as IntegrationSessionBase
|
|
8
|
+
from .integration_session_t import IntegrationSessionInstrument as IntegrationSessionInstrument
|
|
9
|
+
from .integration_session_t import IntegrationSession as IntegrationSession
|
|
10
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
"IntegrationSession",
|
|
18
|
+
"IntegrationSessionBase",
|
|
19
|
+
"IntegrationSessionInstrument",
|
|
20
|
+
"IntegrationSessionType",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
25
|
+
class IntegrationSessionType(StrEnum):
|
|
26
|
+
INSTRUMENT = "instrument"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
30
|
+
@serial_class(
|
|
31
|
+
named_type_path="sdk.integration_session.IntegrationSessionBase",
|
|
32
|
+
)
|
|
33
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
34
|
+
class IntegrationSessionBase:
|
|
35
|
+
type: IntegrationSessionType
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
39
|
+
@serial_class(
|
|
40
|
+
named_type_path="sdk.integration_session.IntegrationSessionInstrument",
|
|
41
|
+
parse_require={"type"},
|
|
42
|
+
)
|
|
43
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
44
|
+
class IntegrationSessionInstrument(IntegrationSessionBase):
|
|
45
|
+
type: typing.Literal[IntegrationSessionType.INSTRUMENT] = IntegrationSessionType.INSTRUMENT
|
|
46
|
+
equipment_key: identifier_t.IdentifierKey
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
50
|
+
IntegrationSession = typing.Annotated[
|
|
51
|
+
typing.Union[IntegrationSessionInstrument],
|
|
52
|
+
serial_union_annotation(
|
|
53
|
+
named_type_path="sdk.integration_session.IntegrationSession",
|
|
54
|
+
discriminator="type",
|
|
55
|
+
discriminator_map={
|
|
56
|
+
"instrument": IntegrationSessionInstrument,
|
|
57
|
+
},
|
|
58
|
+
),
|
|
59
|
+
]
|
|
60
|
+
# 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
|
|
@@ -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 .sockets_t import SocketRequestBase as SocketRequestBase
|
|
7
|
+
from .sockets_t import SocketRequestType as SocketRequestType
|
|
8
|
+
from .sockets_t import SocketRequestIntegrationSession as SocketRequestIntegrationSession
|
|
9
|
+
from .sockets_t import SocketTokenRequest as SocketTokenRequest
|
|
10
|
+
from .sockets_t import SocketTokenResponse as SocketTokenResponse
|
|
11
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -0,0 +1,70 @@
|
|
|
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 integration_session_t
|
|
15
|
+
|
|
16
|
+
__all__: list[str] = [
|
|
17
|
+
"SocketRequestBase",
|
|
18
|
+
"SocketRequestIntegrationSession",
|
|
19
|
+
"SocketRequestType",
|
|
20
|
+
"SocketTokenRequest",
|
|
21
|
+
"SocketTokenResponse",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
26
|
+
@serial_class(
|
|
27
|
+
named_type_path="sdk.sockets.SocketRequestBase",
|
|
28
|
+
)
|
|
29
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
30
|
+
class SocketRequestBase:
|
|
31
|
+
type: SocketRequestType
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
35
|
+
class SocketRequestType(StrEnum):
|
|
36
|
+
INTEGRATION_SESSION = "integration_session"
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
40
|
+
@serial_class(
|
|
41
|
+
named_type_path="sdk.sockets.SocketRequestIntegrationSession",
|
|
42
|
+
parse_require={"type"},
|
|
43
|
+
)
|
|
44
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
45
|
+
class SocketRequestIntegrationSession(SocketRequestBase):
|
|
46
|
+
type: typing.Literal[SocketRequestType.INTEGRATION_SESSION] = SocketRequestType.INTEGRATION_SESSION
|
|
47
|
+
integration_session: integration_session_t.IntegrationSession
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
51
|
+
SocketTokenRequest = typing.Annotated[
|
|
52
|
+
typing.Union[SocketRequestIntegrationSession],
|
|
53
|
+
serial_union_annotation(
|
|
54
|
+
named_type_path="sdk.sockets.SocketTokenRequest",
|
|
55
|
+
discriminator="type",
|
|
56
|
+
discriminator_map={
|
|
57
|
+
"integration_session": SocketRequestIntegrationSession,
|
|
58
|
+
},
|
|
59
|
+
),
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
64
|
+
@serial_class(
|
|
65
|
+
named_type_path="sdk.sockets.SocketTokenResponse",
|
|
66
|
+
)
|
|
67
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
68
|
+
class SocketTokenResponse:
|
|
69
|
+
token: str
|
|
70
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: UncountablePythonSDK
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.124
|
|
4
4
|
Summary: Uncountable SDK
|
|
5
5
|
Project-URL: Homepage, https://github.com/uncountableinc/uncountable-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/uncountableinc/uncountable-python-sdk.git
|
|
@@ -31,7 +31,7 @@ Requires-Dist: opentelemetry-api==1.*
|
|
|
31
31
|
Requires-Dist: opentelemetry-exporter-otlp-proto-common==1.*
|
|
32
32
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.*
|
|
33
33
|
Requires-Dist: opentelemetry-sdk==1.*
|
|
34
|
-
Requires-Dist: paramiko==
|
|
34
|
+
Requires-Dist: paramiko==4.*
|
|
35
35
|
Requires-Dist: boto3==1.*
|
|
36
36
|
Requires-Dist: flask==3.*
|
|
37
37
|
Requires-Dist: simplejson==3.*
|