structifyai 1.180.0__py3-none-any.whl → 1.182.0__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.
- structify/_base_client.py +5 -2
- structify/_compat.py +3 -3
- structify/_utils/_json.py +35 -0
- structify/_version.py +1 -1
- structify/resources/__init__.py +0 -2
- structify/resources/connector_catalog/admin.py +76 -0
- structify/resources/polars.py +2 -7
- structify/resources/sessions.py +83 -0
- structify/resources/teams.py +12 -76
- structify/resources/wiki.py +9 -10
- structify/resources/workflow.py +7 -1
- structify/types/__init__.py +5 -4
- structify/types/admin/admin_sandbox.py +0 -2
- structify/types/{team_create_link_code_params.py → cell_edit_param.py} +7 -3
- structify/types/chat_create_session_params.py +1 -0
- structify/types/code_generate_code_params.py +1 -0
- structify/types/dashboard_component.py +7 -45
- structify/types/dashboard_component_param.py +8 -52
- structify/types/dashboard_page.py +3 -3
- structify/types/dashboard_page_param.py +3 -3
- structify/types/job_event_body.py +4 -0
- structify/types/parquet_edit_param.py +29 -0
- structify/types/session_edit_node_output_params.py +14 -0
- structify/types/session_edit_node_output_response.py +11 -0
- structify/types/team_update_params.py +6 -0
- structify/types/usage_group_key.py +1 -0
- structify/types/user_info.py +4 -0
- structify/types/wiki_list_response.py +3 -22
- structify/types/{wiki_create_response.py → wiki_page.py} +2 -2
- structify/types/wiki_page_with_references.py +2 -18
- structify/types/workflow_run_params.py +3 -0
- structify/types/workflow_session_node.py +2 -0
- {structifyai-1.180.0.dist-info → structifyai-1.182.0.dist-info}/METADATA +1 -1
- {structifyai-1.180.0.dist-info → structifyai-1.182.0.dist-info}/RECORD +36 -36
- structify/resources/external.py +0 -99
- structify/resources/external_dataframe_proxy.py +0 -290
- structify/types/teams_link_code_response.py +0 -13
- structify/types/wiki_update_response.py +0 -23
- {structifyai-1.180.0.dist-info → structifyai-1.182.0.dist-info}/WHEEL +0 -0
- {structifyai-1.180.0.dist-info → structifyai-1.182.0.dist-info}/licenses/LICENSE +0 -0
structify/_base_client.py
CHANGED
|
@@ -86,6 +86,7 @@ from ._exceptions import (
|
|
|
86
86
|
APIConnectionError,
|
|
87
87
|
APIResponseValidationError,
|
|
88
88
|
)
|
|
89
|
+
from ._utils._json import openapi_dumps
|
|
89
90
|
|
|
90
91
|
log: logging.Logger = logging.getLogger(__name__)
|
|
91
92
|
|
|
@@ -554,8 +555,10 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
554
555
|
kwargs["content"] = options.content
|
|
555
556
|
elif isinstance(json_data, bytes):
|
|
556
557
|
kwargs["content"] = json_data
|
|
557
|
-
|
|
558
|
-
|
|
558
|
+
elif not files:
|
|
559
|
+
# Don't set content when JSON is sent as multipart/form-data,
|
|
560
|
+
# since httpx's content param overrides other body arguments
|
|
561
|
+
kwargs["content"] = openapi_dumps(json_data) if is_given(json_data) and json_data is not None else None
|
|
559
562
|
kwargs["files"] = files
|
|
560
563
|
else:
|
|
561
564
|
headers.pop("Content-Type", None)
|
structify/_compat.py
CHANGED
|
@@ -139,6 +139,7 @@ def model_dump(
|
|
|
139
139
|
exclude_defaults: bool = False,
|
|
140
140
|
warnings: bool = True,
|
|
141
141
|
mode: Literal["json", "python"] = "python",
|
|
142
|
+
by_alias: bool | None = None,
|
|
142
143
|
) -> dict[str, Any]:
|
|
143
144
|
if (not PYDANTIC_V1) or hasattr(model, "model_dump"):
|
|
144
145
|
return model.model_dump(
|
|
@@ -148,13 +149,12 @@ def model_dump(
|
|
|
148
149
|
exclude_defaults=exclude_defaults,
|
|
149
150
|
# warnings are not supported in Pydantic v1
|
|
150
151
|
warnings=True if PYDANTIC_V1 else warnings,
|
|
152
|
+
by_alias=by_alias,
|
|
151
153
|
)
|
|
152
154
|
return cast(
|
|
153
155
|
"dict[str, Any]",
|
|
154
156
|
model.dict( # pyright: ignore[reportDeprecated, reportUnnecessaryCast]
|
|
155
|
-
exclude=exclude,
|
|
156
|
-
exclude_unset=exclude_unset,
|
|
157
|
-
exclude_defaults=exclude_defaults,
|
|
157
|
+
exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, by_alias=bool(by_alias)
|
|
158
158
|
),
|
|
159
159
|
)
|
|
160
160
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from typing import Any
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from typing_extensions import override
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
from .._compat import model_dump
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def openapi_dumps(obj: Any) -> bytes:
|
|
12
|
+
"""
|
|
13
|
+
Serialize an object to UTF-8 encoded JSON bytes.
|
|
14
|
+
|
|
15
|
+
Extends the standard json.dumps with support for additional types
|
|
16
|
+
commonly used in the SDK, such as `datetime`, `pydantic.BaseModel`, etc.
|
|
17
|
+
"""
|
|
18
|
+
return json.dumps(
|
|
19
|
+
obj,
|
|
20
|
+
cls=_CustomEncoder,
|
|
21
|
+
# Uses the same defaults as httpx's JSON serialization
|
|
22
|
+
ensure_ascii=False,
|
|
23
|
+
separators=(",", ":"),
|
|
24
|
+
allow_nan=False,
|
|
25
|
+
).encode()
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class _CustomEncoder(json.JSONEncoder):
|
|
29
|
+
@override
|
|
30
|
+
def default(self, o: Any) -> Any:
|
|
31
|
+
if isinstance(o, datetime):
|
|
32
|
+
return o.isoformat()
|
|
33
|
+
if isinstance(o, pydantic.BaseModel):
|
|
34
|
+
return model_dump(o, exclude_unset=True, mode="json", by_alias=True)
|
|
35
|
+
return super().default(o)
|
structify/_version.py
CHANGED
structify/resources/__init__.py
CHANGED
|
@@ -133,7 +133,6 @@ from .entities import (
|
|
|
133
133
|
EntitiesResourceWithStreamingResponse,
|
|
134
134
|
AsyncEntitiesResourceWithStreamingResponse,
|
|
135
135
|
)
|
|
136
|
-
from .external import ExternalResource
|
|
137
136
|
from .projects import (
|
|
138
137
|
ProjectsResource,
|
|
139
138
|
AsyncProjectsResource,
|
|
@@ -357,7 +356,6 @@ __all__ = [
|
|
|
357
356
|
"PolarsResource",
|
|
358
357
|
"PolarsResourceWithRawResponse",
|
|
359
358
|
"PolarsResourceWithStreamingResponse",
|
|
360
|
-
"ExternalResource",
|
|
361
359
|
"PublicSessionsResource",
|
|
362
360
|
"AsyncPublicSessionsResource",
|
|
363
361
|
"PublicSessionsResourceWithRawResponse",
|
|
@@ -332,6 +332,38 @@ class AdminResource(SyncAPIResource):
|
|
|
332
332
|
cast_to=ConnectorAuthMethodScope,
|
|
333
333
|
)
|
|
334
334
|
|
|
335
|
+
def delete_catalog(
|
|
336
|
+
self,
|
|
337
|
+
id: str,
|
|
338
|
+
*,
|
|
339
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
340
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
341
|
+
extra_headers: Headers | None = None,
|
|
342
|
+
extra_query: Query | None = None,
|
|
343
|
+
extra_body: Body | None = None,
|
|
344
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
345
|
+
) -> None:
|
|
346
|
+
"""
|
|
347
|
+
Args:
|
|
348
|
+
extra_headers: Send extra headers
|
|
349
|
+
|
|
350
|
+
extra_query: Add additional query parameters to the request
|
|
351
|
+
|
|
352
|
+
extra_body: Add additional JSON properties to the request
|
|
353
|
+
|
|
354
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
355
|
+
"""
|
|
356
|
+
if not id:
|
|
357
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
358
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
359
|
+
return self._delete(
|
|
360
|
+
f"/admin/connector-catalog/{id}",
|
|
361
|
+
options=make_request_options(
|
|
362
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
363
|
+
),
|
|
364
|
+
cast_to=NoneType,
|
|
365
|
+
)
|
|
366
|
+
|
|
335
367
|
def delete_credential_field(
|
|
336
368
|
self,
|
|
337
369
|
id: str,
|
|
@@ -956,6 +988,38 @@ class AsyncAdminResource(AsyncAPIResource):
|
|
|
956
988
|
cast_to=ConnectorAuthMethodScope,
|
|
957
989
|
)
|
|
958
990
|
|
|
991
|
+
async def delete_catalog(
|
|
992
|
+
self,
|
|
993
|
+
id: str,
|
|
994
|
+
*,
|
|
995
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
996
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
997
|
+
extra_headers: Headers | None = None,
|
|
998
|
+
extra_query: Query | None = None,
|
|
999
|
+
extra_body: Body | None = None,
|
|
1000
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1001
|
+
) -> None:
|
|
1002
|
+
"""
|
|
1003
|
+
Args:
|
|
1004
|
+
extra_headers: Send extra headers
|
|
1005
|
+
|
|
1006
|
+
extra_query: Add additional query parameters to the request
|
|
1007
|
+
|
|
1008
|
+
extra_body: Add additional JSON properties to the request
|
|
1009
|
+
|
|
1010
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1011
|
+
"""
|
|
1012
|
+
if not id:
|
|
1013
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
1014
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
1015
|
+
return await self._delete(
|
|
1016
|
+
f"/admin/connector-catalog/{id}",
|
|
1017
|
+
options=make_request_options(
|
|
1018
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1019
|
+
),
|
|
1020
|
+
cast_to=NoneType,
|
|
1021
|
+
)
|
|
1022
|
+
|
|
959
1023
|
async def delete_credential_field(
|
|
960
1024
|
self,
|
|
961
1025
|
id: str,
|
|
@@ -1328,6 +1392,9 @@ class AdminResourceWithRawResponse:
|
|
|
1328
1392
|
self.create_scope = to_raw_response_wrapper(
|
|
1329
1393
|
admin.create_scope,
|
|
1330
1394
|
)
|
|
1395
|
+
self.delete_catalog = to_raw_response_wrapper(
|
|
1396
|
+
admin.delete_catalog,
|
|
1397
|
+
)
|
|
1331
1398
|
self.delete_credential_field = to_raw_response_wrapper(
|
|
1332
1399
|
admin.delete_credential_field,
|
|
1333
1400
|
)
|
|
@@ -1379,6 +1446,9 @@ class AsyncAdminResourceWithRawResponse:
|
|
|
1379
1446
|
self.create_scope = async_to_raw_response_wrapper(
|
|
1380
1447
|
admin.create_scope,
|
|
1381
1448
|
)
|
|
1449
|
+
self.delete_catalog = async_to_raw_response_wrapper(
|
|
1450
|
+
admin.delete_catalog,
|
|
1451
|
+
)
|
|
1382
1452
|
self.delete_credential_field = async_to_raw_response_wrapper(
|
|
1383
1453
|
admin.delete_credential_field,
|
|
1384
1454
|
)
|
|
@@ -1430,6 +1500,9 @@ class AdminResourceWithStreamingResponse:
|
|
|
1430
1500
|
self.create_scope = to_streamed_response_wrapper(
|
|
1431
1501
|
admin.create_scope,
|
|
1432
1502
|
)
|
|
1503
|
+
self.delete_catalog = to_streamed_response_wrapper(
|
|
1504
|
+
admin.delete_catalog,
|
|
1505
|
+
)
|
|
1433
1506
|
self.delete_credential_field = to_streamed_response_wrapper(
|
|
1434
1507
|
admin.delete_credential_field,
|
|
1435
1508
|
)
|
|
@@ -1481,6 +1554,9 @@ class AsyncAdminResourceWithStreamingResponse:
|
|
|
1481
1554
|
self.create_scope = async_to_streamed_response_wrapper(
|
|
1482
1555
|
admin.create_scope,
|
|
1483
1556
|
)
|
|
1557
|
+
self.delete_catalog = async_to_streamed_response_wrapper(
|
|
1558
|
+
admin.delete_catalog,
|
|
1559
|
+
)
|
|
1484
1560
|
self.delete_credential_field = async_to_streamed_response_wrapper(
|
|
1485
1561
|
admin.delete_credential_field,
|
|
1486
1562
|
)
|
structify/resources/polars.py
CHANGED
|
@@ -26,7 +26,6 @@ from .._response import (
|
|
|
26
26
|
)
|
|
27
27
|
from ..types.table_param import Property
|
|
28
28
|
from ..lib.cost_confirmation import request_cost_confirmation_if_needed
|
|
29
|
-
from .external_dataframe_proxy import ServicesProxy
|
|
30
29
|
from ..types.save_requirement_param import RequiredEntity, RequiredProperty
|
|
31
30
|
from ..types.dataset_descriptor_param import DatasetDescriptorParam
|
|
32
31
|
from ..types.structure_run_async_params import SourceWebWeb
|
|
@@ -48,11 +47,6 @@ def _collect_entities_with_job_ids(entities: Any) -> List[Dict[str, Any]]:
|
|
|
48
47
|
|
|
49
48
|
|
|
50
49
|
class PolarsResource(SyncAPIResource):
|
|
51
|
-
@cached_property
|
|
52
|
-
def external(self) -> ServicesProxy:
|
|
53
|
-
"""Access external whitelabel services with DataFrame batch processing."""
|
|
54
|
-
return ServicesProxy(self._client)
|
|
55
|
-
|
|
56
50
|
@cached_property
|
|
57
51
|
def with_raw_response(self) -> PolarsResourceWithRawResponse:
|
|
58
52
|
"""
|
|
@@ -1130,7 +1124,8 @@ class PolarsResource(SyncAPIResource):
|
|
|
1130
1124
|
while True:
|
|
1131
1125
|
remaining_embeddings = self._client.datasets.count_missing_embeddings(name=dataset_name).count
|
|
1132
1126
|
count_history.append(remaining_embeddings)
|
|
1133
|
-
tqdm_marker.
|
|
1127
|
+
tqdm_marker.n = total_embeddings - remaining_embeddings
|
|
1128
|
+
tqdm_marker.refresh()
|
|
1134
1129
|
if remaining_embeddings == 0:
|
|
1135
1130
|
break
|
|
1136
1131
|
# If we haven't updated any entities in a while, consider the embeddings as not updating and break
|
structify/resources/sessions.py
CHANGED
|
@@ -17,6 +17,7 @@ from ..types import (
|
|
|
17
17
|
session_finalize_dag_params,
|
|
18
18
|
session_mark_errored_params,
|
|
19
19
|
session_create_session_params,
|
|
20
|
+
session_edit_node_output_params,
|
|
20
21
|
session_request_confirmation_params,
|
|
21
22
|
session_update_node_progress_params,
|
|
22
23
|
session_upload_dashboard_layout_params,
|
|
@@ -49,12 +50,14 @@ from ..types.edge_spec_param import EdgeSpecParam
|
|
|
49
50
|
from ..types.node_spec_param import NodeSpecParam
|
|
50
51
|
from ..types.workflow_session import WorkflowSession
|
|
51
52
|
from ..types.get_node_response import GetNodeResponse
|
|
53
|
+
from ..types.parquet_edit_param import ParquetEditParam
|
|
52
54
|
from ..types.finalize_dag_response import FinalizeDagResponse
|
|
53
55
|
from ..types.workflow_session_node import WorkflowSessionNode
|
|
54
56
|
from ..types.get_node_logs_response import GetNodeLogsResponse
|
|
55
57
|
from ..types.session_kill_jobs_response import SessionKillJobsResponse
|
|
56
58
|
from ..types.session_get_events_response import SessionGetEventsResponse
|
|
57
59
|
from ..types.workflow_node_execution_status import WorkflowNodeExecutionStatus
|
|
60
|
+
from ..types.session_edit_node_output_response import SessionEditNodeOutputResponse
|
|
58
61
|
from ..types.session_get_node_progress_response import SessionGetNodeProgressResponse
|
|
59
62
|
|
|
60
63
|
__all__ = ["SessionsResource", "AsyncSessionsResource"]
|
|
@@ -150,6 +153,39 @@ class SessionsResource(SyncAPIResource):
|
|
|
150
153
|
cast_to=WorkflowSession,
|
|
151
154
|
)
|
|
152
155
|
|
|
156
|
+
def edit_node_output(
|
|
157
|
+
self,
|
|
158
|
+
node_id: str,
|
|
159
|
+
*,
|
|
160
|
+
edits: Iterable[ParquetEditParam],
|
|
161
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
162
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
163
|
+
extra_headers: Headers | None = None,
|
|
164
|
+
extra_query: Query | None = None,
|
|
165
|
+
extra_body: Body | None = None,
|
|
166
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
167
|
+
) -> SessionEditNodeOutputResponse:
|
|
168
|
+
"""
|
|
169
|
+
Args:
|
|
170
|
+
extra_headers: Send extra headers
|
|
171
|
+
|
|
172
|
+
extra_query: Add additional query parameters to the request
|
|
173
|
+
|
|
174
|
+
extra_body: Add additional JSON properties to the request
|
|
175
|
+
|
|
176
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
177
|
+
"""
|
|
178
|
+
if not node_id:
|
|
179
|
+
raise ValueError(f"Expected a non-empty value for `node_id` but received {node_id!r}")
|
|
180
|
+
return self._post(
|
|
181
|
+
f"/sessions/nodes/{node_id}/edit_output",
|
|
182
|
+
body=maybe_transform({"edits": edits}, session_edit_node_output_params.SessionEditNodeOutputParams),
|
|
183
|
+
options=make_request_options(
|
|
184
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
185
|
+
),
|
|
186
|
+
cast_to=SessionEditNodeOutputResponse,
|
|
187
|
+
)
|
|
188
|
+
|
|
153
189
|
def finalize_dag(
|
|
154
190
|
self,
|
|
155
191
|
session_id: str,
|
|
@@ -823,6 +859,41 @@ class AsyncSessionsResource(AsyncAPIResource):
|
|
|
823
859
|
cast_to=WorkflowSession,
|
|
824
860
|
)
|
|
825
861
|
|
|
862
|
+
async def edit_node_output(
|
|
863
|
+
self,
|
|
864
|
+
node_id: str,
|
|
865
|
+
*,
|
|
866
|
+
edits: Iterable[ParquetEditParam],
|
|
867
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
868
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
869
|
+
extra_headers: Headers | None = None,
|
|
870
|
+
extra_query: Query | None = None,
|
|
871
|
+
extra_body: Body | None = None,
|
|
872
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
873
|
+
) -> SessionEditNodeOutputResponse:
|
|
874
|
+
"""
|
|
875
|
+
Args:
|
|
876
|
+
extra_headers: Send extra headers
|
|
877
|
+
|
|
878
|
+
extra_query: Add additional query parameters to the request
|
|
879
|
+
|
|
880
|
+
extra_body: Add additional JSON properties to the request
|
|
881
|
+
|
|
882
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
883
|
+
"""
|
|
884
|
+
if not node_id:
|
|
885
|
+
raise ValueError(f"Expected a non-empty value for `node_id` but received {node_id!r}")
|
|
886
|
+
return await self._post(
|
|
887
|
+
f"/sessions/nodes/{node_id}/edit_output",
|
|
888
|
+
body=await async_maybe_transform(
|
|
889
|
+
{"edits": edits}, session_edit_node_output_params.SessionEditNodeOutputParams
|
|
890
|
+
),
|
|
891
|
+
options=make_request_options(
|
|
892
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
893
|
+
),
|
|
894
|
+
cast_to=SessionEditNodeOutputResponse,
|
|
895
|
+
)
|
|
896
|
+
|
|
826
897
|
async def finalize_dag(
|
|
827
898
|
self,
|
|
828
899
|
session_id: str,
|
|
@@ -1416,6 +1487,9 @@ class SessionsResourceWithRawResponse:
|
|
|
1416
1487
|
self.create_session = to_raw_response_wrapper(
|
|
1417
1488
|
sessions.create_session,
|
|
1418
1489
|
)
|
|
1490
|
+
self.edit_node_output = to_raw_response_wrapper(
|
|
1491
|
+
sessions.edit_node_output,
|
|
1492
|
+
)
|
|
1419
1493
|
self.finalize_dag = to_raw_response_wrapper(
|
|
1420
1494
|
sessions.finalize_dag,
|
|
1421
1495
|
)
|
|
@@ -1474,6 +1548,9 @@ class AsyncSessionsResourceWithRawResponse:
|
|
|
1474
1548
|
self.create_session = async_to_raw_response_wrapper(
|
|
1475
1549
|
sessions.create_session,
|
|
1476
1550
|
)
|
|
1551
|
+
self.edit_node_output = async_to_raw_response_wrapper(
|
|
1552
|
+
sessions.edit_node_output,
|
|
1553
|
+
)
|
|
1477
1554
|
self.finalize_dag = async_to_raw_response_wrapper(
|
|
1478
1555
|
sessions.finalize_dag,
|
|
1479
1556
|
)
|
|
@@ -1532,6 +1609,9 @@ class SessionsResourceWithStreamingResponse:
|
|
|
1532
1609
|
self.create_session = to_streamed_response_wrapper(
|
|
1533
1610
|
sessions.create_session,
|
|
1534
1611
|
)
|
|
1612
|
+
self.edit_node_output = to_streamed_response_wrapper(
|
|
1613
|
+
sessions.edit_node_output,
|
|
1614
|
+
)
|
|
1535
1615
|
self.finalize_dag = to_streamed_response_wrapper(
|
|
1536
1616
|
sessions.finalize_dag,
|
|
1537
1617
|
)
|
|
@@ -1590,6 +1670,9 @@ class AsyncSessionsResourceWithStreamingResponse:
|
|
|
1590
1670
|
self.create_session = async_to_streamed_response_wrapper(
|
|
1591
1671
|
sessions.create_session,
|
|
1592
1672
|
)
|
|
1673
|
+
self.edit_node_output = async_to_streamed_response_wrapper(
|
|
1674
|
+
sessions.edit_node_output,
|
|
1675
|
+
)
|
|
1593
1676
|
self.finalize_dag = async_to_streamed_response_wrapper(
|
|
1594
1677
|
sessions.finalize_dag,
|
|
1595
1678
|
)
|
structify/resources/teams.py
CHANGED
|
@@ -15,7 +15,6 @@ from ..types import (
|
|
|
15
15
|
team_add_member_params,
|
|
16
16
|
team_credits_usage_params,
|
|
17
17
|
team_create_project_params,
|
|
18
|
-
team_create_link_code_params,
|
|
19
18
|
team_accept_invitation_params,
|
|
20
19
|
team_update_member_role_params,
|
|
21
20
|
)
|
|
@@ -44,7 +43,6 @@ from ..types.list_members_response import ListMembersResponse
|
|
|
44
43
|
from ..types.credits_usage_response import CreditsUsageResponse
|
|
45
44
|
from ..types.list_projects_response import ListProjectsResponse
|
|
46
45
|
from ..types.remove_member_response import RemoveMemberResponse
|
|
47
|
-
from ..types.teams_link_code_response import TeamsLinkCodeResponse
|
|
48
46
|
from ..types.accept_invitation_response import AcceptInvitationResponse
|
|
49
47
|
from ..types.invitation_details_response import InvitationDetailsResponse
|
|
50
48
|
from ..types.update_member_role_response import UpdateMemberRoleResponse
|
|
@@ -120,6 +118,9 @@ class TeamsResource(SyncAPIResource):
|
|
|
120
118
|
slack_team_icon: Optional[str] | Omit = omit,
|
|
121
119
|
slack_team_id: Optional[str] | Omit = omit,
|
|
122
120
|
slack_team_name: Optional[str] | Omit = omit,
|
|
121
|
+
teams_app_id: Optional[str] | Omit = omit,
|
|
122
|
+
teams_app_password: Optional[str] | Omit = omit,
|
|
123
|
+
teams_tenant_id: Optional[str] | Omit = omit,
|
|
123
124
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
124
125
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
125
126
|
extra_headers: Headers | None = None,
|
|
@@ -150,6 +151,9 @@ class TeamsResource(SyncAPIResource):
|
|
|
150
151
|
"slack_team_icon": slack_team_icon,
|
|
151
152
|
"slack_team_id": slack_team_id,
|
|
152
153
|
"slack_team_name": slack_team_name,
|
|
154
|
+
"teams_app_id": teams_app_id,
|
|
155
|
+
"teams_app_password": teams_app_password,
|
|
156
|
+
"teams_tenant_id": teams_tenant_id,
|
|
153
157
|
},
|
|
154
158
|
team_update_params.TeamUpdateParams,
|
|
155
159
|
),
|
|
@@ -278,36 +282,6 @@ class TeamsResource(SyncAPIResource):
|
|
|
278
282
|
cast_to=AddMemberResponse,
|
|
279
283
|
)
|
|
280
284
|
|
|
281
|
-
def create_link_code(
|
|
282
|
-
self,
|
|
283
|
-
*,
|
|
284
|
-
team_id: str,
|
|
285
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
286
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
287
|
-
extra_headers: Headers | None = None,
|
|
288
|
-
extra_query: Query | None = None,
|
|
289
|
-
extra_body: Body | None = None,
|
|
290
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
291
|
-
) -> TeamsLinkCodeResponse:
|
|
292
|
-
"""
|
|
293
|
-
Args:
|
|
294
|
-
extra_headers: Send extra headers
|
|
295
|
-
|
|
296
|
-
extra_query: Add additional query parameters to the request
|
|
297
|
-
|
|
298
|
-
extra_body: Add additional JSON properties to the request
|
|
299
|
-
|
|
300
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
301
|
-
"""
|
|
302
|
-
return self._post(
|
|
303
|
-
"/teams/link-code",
|
|
304
|
-
body=maybe_transform({"team_id": team_id}, team_create_link_code_params.TeamCreateLinkCodeParams),
|
|
305
|
-
options=make_request_options(
|
|
306
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
307
|
-
),
|
|
308
|
-
cast_to=TeamsLinkCodeResponse,
|
|
309
|
-
)
|
|
310
|
-
|
|
311
285
|
def create_project(
|
|
312
286
|
self,
|
|
313
287
|
team_id: str,
|
|
@@ -697,6 +671,9 @@ class AsyncTeamsResource(AsyncAPIResource):
|
|
|
697
671
|
slack_team_icon: Optional[str] | Omit = omit,
|
|
698
672
|
slack_team_id: Optional[str] | Omit = omit,
|
|
699
673
|
slack_team_name: Optional[str] | Omit = omit,
|
|
674
|
+
teams_app_id: Optional[str] | Omit = omit,
|
|
675
|
+
teams_app_password: Optional[str] | Omit = omit,
|
|
676
|
+
teams_tenant_id: Optional[str] | Omit = omit,
|
|
700
677
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
701
678
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
702
679
|
extra_headers: Headers | None = None,
|
|
@@ -727,6 +704,9 @@ class AsyncTeamsResource(AsyncAPIResource):
|
|
|
727
704
|
"slack_team_icon": slack_team_icon,
|
|
728
705
|
"slack_team_id": slack_team_id,
|
|
729
706
|
"slack_team_name": slack_team_name,
|
|
707
|
+
"teams_app_id": teams_app_id,
|
|
708
|
+
"teams_app_password": teams_app_password,
|
|
709
|
+
"teams_tenant_id": teams_tenant_id,
|
|
730
710
|
},
|
|
731
711
|
team_update_params.TeamUpdateParams,
|
|
732
712
|
),
|
|
@@ -857,38 +837,6 @@ class AsyncTeamsResource(AsyncAPIResource):
|
|
|
857
837
|
cast_to=AddMemberResponse,
|
|
858
838
|
)
|
|
859
839
|
|
|
860
|
-
async def create_link_code(
|
|
861
|
-
self,
|
|
862
|
-
*,
|
|
863
|
-
team_id: str,
|
|
864
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
865
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
866
|
-
extra_headers: Headers | None = None,
|
|
867
|
-
extra_query: Query | None = None,
|
|
868
|
-
extra_body: Body | None = None,
|
|
869
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
870
|
-
) -> TeamsLinkCodeResponse:
|
|
871
|
-
"""
|
|
872
|
-
Args:
|
|
873
|
-
extra_headers: Send extra headers
|
|
874
|
-
|
|
875
|
-
extra_query: Add additional query parameters to the request
|
|
876
|
-
|
|
877
|
-
extra_body: Add additional JSON properties to the request
|
|
878
|
-
|
|
879
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
880
|
-
"""
|
|
881
|
-
return await self._post(
|
|
882
|
-
"/teams/link-code",
|
|
883
|
-
body=await async_maybe_transform(
|
|
884
|
-
{"team_id": team_id}, team_create_link_code_params.TeamCreateLinkCodeParams
|
|
885
|
-
),
|
|
886
|
-
options=make_request_options(
|
|
887
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
888
|
-
),
|
|
889
|
-
cast_to=TeamsLinkCodeResponse,
|
|
890
|
-
)
|
|
891
|
-
|
|
892
840
|
async def create_project(
|
|
893
841
|
self,
|
|
894
842
|
team_id: str,
|
|
@@ -1232,9 +1180,6 @@ class TeamsResourceWithRawResponse:
|
|
|
1232
1180
|
self.add_member = to_raw_response_wrapper(
|
|
1233
1181
|
teams.add_member,
|
|
1234
1182
|
)
|
|
1235
|
-
self.create_link_code = to_raw_response_wrapper(
|
|
1236
|
-
teams.create_link_code,
|
|
1237
|
-
)
|
|
1238
1183
|
self.create_project = to_raw_response_wrapper(
|
|
1239
1184
|
teams.create_project,
|
|
1240
1185
|
)
|
|
@@ -1286,9 +1231,6 @@ class AsyncTeamsResourceWithRawResponse:
|
|
|
1286
1231
|
self.add_member = async_to_raw_response_wrapper(
|
|
1287
1232
|
teams.add_member,
|
|
1288
1233
|
)
|
|
1289
|
-
self.create_link_code = async_to_raw_response_wrapper(
|
|
1290
|
-
teams.create_link_code,
|
|
1291
|
-
)
|
|
1292
1234
|
self.create_project = async_to_raw_response_wrapper(
|
|
1293
1235
|
teams.create_project,
|
|
1294
1236
|
)
|
|
@@ -1340,9 +1282,6 @@ class TeamsResourceWithStreamingResponse:
|
|
|
1340
1282
|
self.add_member = to_streamed_response_wrapper(
|
|
1341
1283
|
teams.add_member,
|
|
1342
1284
|
)
|
|
1343
|
-
self.create_link_code = to_streamed_response_wrapper(
|
|
1344
|
-
teams.create_link_code,
|
|
1345
|
-
)
|
|
1346
1285
|
self.create_project = to_streamed_response_wrapper(
|
|
1347
1286
|
teams.create_project,
|
|
1348
1287
|
)
|
|
@@ -1394,9 +1333,6 @@ class AsyncTeamsResourceWithStreamingResponse:
|
|
|
1394
1333
|
self.add_member = async_to_streamed_response_wrapper(
|
|
1395
1334
|
teams.add_member,
|
|
1396
1335
|
)
|
|
1397
|
-
self.create_link_code = async_to_streamed_response_wrapper(
|
|
1398
|
-
teams.create_link_code,
|
|
1399
|
-
)
|
|
1400
1336
|
self.create_project = async_to_streamed_response_wrapper(
|
|
1401
1337
|
teams.create_project,
|
|
1402
1338
|
)
|
structify/resources/wiki.py
CHANGED
|
@@ -18,9 +18,8 @@ from .._response import (
|
|
|
18
18
|
async_to_streamed_response_wrapper,
|
|
19
19
|
)
|
|
20
20
|
from .._base_client import make_request_options
|
|
21
|
+
from ..types.wiki_page import WikiPage
|
|
21
22
|
from ..types.wiki_list_response import WikiListResponse
|
|
22
|
-
from ..types.wiki_create_response import WikiCreateResponse
|
|
23
|
-
from ..types.wiki_update_response import WikiUpdateResponse
|
|
24
23
|
from ..types.wiki_page_with_references import WikiPageWithReferences
|
|
25
24
|
|
|
26
25
|
__all__ = ["WikiResource", "AsyncWikiResource"]
|
|
@@ -59,7 +58,7 @@ class WikiResource(SyncAPIResource):
|
|
|
59
58
|
extra_query: Query | None = None,
|
|
60
59
|
extra_body: Body | None = None,
|
|
61
60
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
62
|
-
) ->
|
|
61
|
+
) -> WikiPage:
|
|
63
62
|
"""
|
|
64
63
|
Args:
|
|
65
64
|
extra_headers: Send extra headers
|
|
@@ -85,7 +84,7 @@ class WikiResource(SyncAPIResource):
|
|
|
85
84
|
options=make_request_options(
|
|
86
85
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
87
86
|
),
|
|
88
|
-
cast_to=
|
|
87
|
+
cast_to=WikiPage,
|
|
89
88
|
)
|
|
90
89
|
|
|
91
90
|
def update(
|
|
@@ -102,7 +101,7 @@ class WikiResource(SyncAPIResource):
|
|
|
102
101
|
extra_query: Query | None = None,
|
|
103
102
|
extra_body: Body | None = None,
|
|
104
103
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
105
|
-
) ->
|
|
104
|
+
) -> WikiPage:
|
|
106
105
|
"""
|
|
107
106
|
Args:
|
|
108
107
|
extra_headers: Send extra headers
|
|
@@ -130,7 +129,7 @@ class WikiResource(SyncAPIResource):
|
|
|
130
129
|
options=make_request_options(
|
|
131
130
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
132
131
|
),
|
|
133
|
-
cast_to=
|
|
132
|
+
cast_to=WikiPage,
|
|
134
133
|
)
|
|
135
134
|
|
|
136
135
|
def list(
|
|
@@ -267,7 +266,7 @@ class AsyncWikiResource(AsyncAPIResource):
|
|
|
267
266
|
extra_query: Query | None = None,
|
|
268
267
|
extra_body: Body | None = None,
|
|
269
268
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
270
|
-
) ->
|
|
269
|
+
) -> WikiPage:
|
|
271
270
|
"""
|
|
272
271
|
Args:
|
|
273
272
|
extra_headers: Send extra headers
|
|
@@ -293,7 +292,7 @@ class AsyncWikiResource(AsyncAPIResource):
|
|
|
293
292
|
options=make_request_options(
|
|
294
293
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
295
294
|
),
|
|
296
|
-
cast_to=
|
|
295
|
+
cast_to=WikiPage,
|
|
297
296
|
)
|
|
298
297
|
|
|
299
298
|
async def update(
|
|
@@ -310,7 +309,7 @@ class AsyncWikiResource(AsyncAPIResource):
|
|
|
310
309
|
extra_query: Query | None = None,
|
|
311
310
|
extra_body: Body | None = None,
|
|
312
311
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
313
|
-
) ->
|
|
312
|
+
) -> WikiPage:
|
|
314
313
|
"""
|
|
315
314
|
Args:
|
|
316
315
|
extra_headers: Send extra headers
|
|
@@ -338,7 +337,7 @@ class AsyncWikiResource(AsyncAPIResource):
|
|
|
338
337
|
options=make_request_options(
|
|
339
338
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
340
339
|
),
|
|
341
|
-
cast_to=
|
|
340
|
+
cast_to=WikiPage,
|
|
342
341
|
)
|
|
343
342
|
|
|
344
343
|
async def list(
|