supermemory 3.7.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.
- supermemory/__init__.py +102 -0
- supermemory/_base_client.py +1995 -0
- supermemory/_client.py +683 -0
- supermemory/_compat.py +219 -0
- supermemory/_constants.py +14 -0
- supermemory/_exceptions.py +108 -0
- supermemory/_files.py +123 -0
- supermemory/_models.py +857 -0
- supermemory/_qs.py +150 -0
- supermemory/_resource.py +43 -0
- supermemory/_response.py +832 -0
- supermemory/_streaming.py +331 -0
- supermemory/_types.py +260 -0
- supermemory/_utils/__init__.py +64 -0
- supermemory/_utils/_compat.py +45 -0
- supermemory/_utils/_datetime_parse.py +136 -0
- supermemory/_utils/_logs.py +25 -0
- supermemory/_utils/_proxy.py +65 -0
- supermemory/_utils/_reflection.py +42 -0
- supermemory/_utils/_resources_proxy.py +24 -0
- supermemory/_utils/_streams.py +12 -0
- supermemory/_utils/_sync.py +58 -0
- supermemory/_utils/_transform.py +457 -0
- supermemory/_utils/_typing.py +156 -0
- supermemory/_utils/_utils.py +421 -0
- supermemory/_version.py +4 -0
- supermemory/lib/.keep +4 -0
- supermemory/py.typed +0 -0
- supermemory/resources/__init__.py +75 -0
- supermemory/resources/connections.py +807 -0
- supermemory/resources/documents.py +830 -0
- supermemory/resources/memories.py +830 -0
- supermemory/resources/search.py +657 -0
- supermemory/resources/settings.py +278 -0
- supermemory/types/__init__.py +51 -0
- supermemory/types/add_response.py +13 -0
- supermemory/types/client_add_params.py +36 -0
- supermemory/types/client_profile_params.py +21 -0
- supermemory/types/connection_create_params.py +21 -0
- supermemory/types/connection_create_response.py +19 -0
- supermemory/types/connection_delete_by_id_response.py +11 -0
- supermemory/types/connection_delete_by_provider_params.py +15 -0
- supermemory/types/connection_delete_by_provider_response.py +11 -0
- supermemory/types/connection_get_by_id_response.py +25 -0
- supermemory/types/connection_get_by_tags_params.py +15 -0
- supermemory/types/connection_get_by_tags_response.py +25 -0
- supermemory/types/connection_import_params.py +15 -0
- supermemory/types/connection_import_response.py +7 -0
- supermemory/types/connection_list_documents_params.py +15 -0
- supermemory/types/connection_list_documents_response.py +29 -0
- supermemory/types/connection_list_params.py +15 -0
- supermemory/types/connection_list_response.py +29 -0
- supermemory/types/document_add_params.py +36 -0
- supermemory/types/document_add_response.py +13 -0
- supermemory/types/document_get_response.py +103 -0
- supermemory/types/document_list_params.py +52 -0
- supermemory/types/document_list_response.py +94 -0
- supermemory/types/document_update_params.py +55 -0
- supermemory/types/document_update_response.py +13 -0
- supermemory/types/document_upload_file_params.py +44 -0
- supermemory/types/document_upload_file_response.py +13 -0
- supermemory/types/memory_add_params.py +36 -0
- supermemory/types/memory_add_response.py +13 -0
- supermemory/types/memory_get_response.py +103 -0
- supermemory/types/memory_list_params.py +52 -0
- supermemory/types/memory_list_response.py +94 -0
- supermemory/types/memory_update_params.py +55 -0
- supermemory/types/memory_update_response.py +13 -0
- supermemory/types/memory_upload_file_params.py +44 -0
- supermemory/types/memory_upload_file_response.py +13 -0
- supermemory/types/profile_response.py +35 -0
- supermemory/types/search_documents_params.py +93 -0
- supermemory/types/search_documents_response.py +60 -0
- supermemory/types/search_execute_params.py +93 -0
- supermemory/types/search_execute_response.py +60 -0
- supermemory/types/search_memories_params.py +75 -0
- supermemory/types/search_memories_response.py +123 -0
- supermemory/types/setting_get_response.py +43 -0
- supermemory/types/setting_update_params.py +44 -0
- supermemory/types/setting_update_response.py +51 -0
- supermemory-3.7.0.dist-info/METADATA +447 -0
- supermemory-3.7.0.dist-info/RECORD +84 -0
- supermemory-3.7.0.dist-info/WHEEL +4 -0
- supermemory-3.7.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Union, Iterable, Optional
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ..types import setting_update_params
|
|
10
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
|
+
from .._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from .._compat import cached_property
|
|
13
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from .._response import (
|
|
15
|
+
to_raw_response_wrapper,
|
|
16
|
+
to_streamed_response_wrapper,
|
|
17
|
+
async_to_raw_response_wrapper,
|
|
18
|
+
async_to_streamed_response_wrapper,
|
|
19
|
+
)
|
|
20
|
+
from .._base_client import make_request_options
|
|
21
|
+
from ..types.setting_get_response import SettingGetResponse
|
|
22
|
+
from ..types.setting_update_response import SettingUpdateResponse
|
|
23
|
+
|
|
24
|
+
__all__ = ["SettingsResource", "AsyncSettingsResource"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class SettingsResource(SyncAPIResource):
|
|
28
|
+
@cached_property
|
|
29
|
+
def with_raw_response(self) -> SettingsResourceWithRawResponse:
|
|
30
|
+
"""
|
|
31
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
32
|
+
the raw response object instead of the parsed content.
|
|
33
|
+
|
|
34
|
+
For more information, see https://www.github.com/supermemoryai/python-sdk#accessing-raw-response-data-eg-headers
|
|
35
|
+
"""
|
|
36
|
+
return SettingsResourceWithRawResponse(self)
|
|
37
|
+
|
|
38
|
+
@cached_property
|
|
39
|
+
def with_streaming_response(self) -> SettingsResourceWithStreamingResponse:
|
|
40
|
+
"""
|
|
41
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
42
|
+
|
|
43
|
+
For more information, see https://www.github.com/supermemoryai/python-sdk#with_streaming_response
|
|
44
|
+
"""
|
|
45
|
+
return SettingsResourceWithStreamingResponse(self)
|
|
46
|
+
|
|
47
|
+
def update(
|
|
48
|
+
self,
|
|
49
|
+
*,
|
|
50
|
+
chunk_size: Optional[int] | Omit = omit,
|
|
51
|
+
exclude_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit,
|
|
52
|
+
filter_prompt: Optional[str] | Omit = omit,
|
|
53
|
+
google_drive_client_id: Optional[str] | Omit = omit,
|
|
54
|
+
google_drive_client_secret: Optional[str] | Omit = omit,
|
|
55
|
+
google_drive_custom_key_enabled: Optional[bool] | Omit = omit,
|
|
56
|
+
include_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit,
|
|
57
|
+
notion_client_id: Optional[str] | Omit = omit,
|
|
58
|
+
notion_client_secret: Optional[str] | Omit = omit,
|
|
59
|
+
notion_custom_key_enabled: Optional[bool] | Omit = omit,
|
|
60
|
+
onedrive_client_id: Optional[str] | Omit = omit,
|
|
61
|
+
onedrive_client_secret: Optional[str] | Omit = omit,
|
|
62
|
+
onedrive_custom_key_enabled: Optional[bool] | Omit = omit,
|
|
63
|
+
should_llm_filter: Optional[bool] | Omit = omit,
|
|
64
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
65
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
66
|
+
extra_headers: Headers | None = None,
|
|
67
|
+
extra_query: Query | None = None,
|
|
68
|
+
extra_body: Body | None = None,
|
|
69
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
70
|
+
) -> SettingUpdateResponse:
|
|
71
|
+
"""
|
|
72
|
+
Update settings for an organization
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
extra_headers: Send extra headers
|
|
76
|
+
|
|
77
|
+
extra_query: Add additional query parameters to the request
|
|
78
|
+
|
|
79
|
+
extra_body: Add additional JSON properties to the request
|
|
80
|
+
|
|
81
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
82
|
+
"""
|
|
83
|
+
return self._patch(
|
|
84
|
+
"/v3/settings",
|
|
85
|
+
body=maybe_transform(
|
|
86
|
+
{
|
|
87
|
+
"chunk_size": chunk_size,
|
|
88
|
+
"exclude_items": exclude_items,
|
|
89
|
+
"filter_prompt": filter_prompt,
|
|
90
|
+
"google_drive_client_id": google_drive_client_id,
|
|
91
|
+
"google_drive_client_secret": google_drive_client_secret,
|
|
92
|
+
"google_drive_custom_key_enabled": google_drive_custom_key_enabled,
|
|
93
|
+
"include_items": include_items,
|
|
94
|
+
"notion_client_id": notion_client_id,
|
|
95
|
+
"notion_client_secret": notion_client_secret,
|
|
96
|
+
"notion_custom_key_enabled": notion_custom_key_enabled,
|
|
97
|
+
"onedrive_client_id": onedrive_client_id,
|
|
98
|
+
"onedrive_client_secret": onedrive_client_secret,
|
|
99
|
+
"onedrive_custom_key_enabled": onedrive_custom_key_enabled,
|
|
100
|
+
"should_llm_filter": should_llm_filter,
|
|
101
|
+
},
|
|
102
|
+
setting_update_params.SettingUpdateParams,
|
|
103
|
+
),
|
|
104
|
+
options=make_request_options(
|
|
105
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
106
|
+
),
|
|
107
|
+
cast_to=SettingUpdateResponse,
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
def get(
|
|
111
|
+
self,
|
|
112
|
+
*,
|
|
113
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
114
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
115
|
+
extra_headers: Headers | None = None,
|
|
116
|
+
extra_query: Query | None = None,
|
|
117
|
+
extra_body: Body | None = None,
|
|
118
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
119
|
+
) -> SettingGetResponse:
|
|
120
|
+
"""Get settings for an organization"""
|
|
121
|
+
return self._get(
|
|
122
|
+
"/v3/settings",
|
|
123
|
+
options=make_request_options(
|
|
124
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
125
|
+
),
|
|
126
|
+
cast_to=SettingGetResponse,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class AsyncSettingsResource(AsyncAPIResource):
|
|
131
|
+
@cached_property
|
|
132
|
+
def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse:
|
|
133
|
+
"""
|
|
134
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
135
|
+
the raw response object instead of the parsed content.
|
|
136
|
+
|
|
137
|
+
For more information, see https://www.github.com/supermemoryai/python-sdk#accessing-raw-response-data-eg-headers
|
|
138
|
+
"""
|
|
139
|
+
return AsyncSettingsResourceWithRawResponse(self)
|
|
140
|
+
|
|
141
|
+
@cached_property
|
|
142
|
+
def with_streaming_response(self) -> AsyncSettingsResourceWithStreamingResponse:
|
|
143
|
+
"""
|
|
144
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
145
|
+
|
|
146
|
+
For more information, see https://www.github.com/supermemoryai/python-sdk#with_streaming_response
|
|
147
|
+
"""
|
|
148
|
+
return AsyncSettingsResourceWithStreamingResponse(self)
|
|
149
|
+
|
|
150
|
+
async def update(
|
|
151
|
+
self,
|
|
152
|
+
*,
|
|
153
|
+
chunk_size: Optional[int] | Omit = omit,
|
|
154
|
+
exclude_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit,
|
|
155
|
+
filter_prompt: Optional[str] | Omit = omit,
|
|
156
|
+
google_drive_client_id: Optional[str] | Omit = omit,
|
|
157
|
+
google_drive_client_secret: Optional[str] | Omit = omit,
|
|
158
|
+
google_drive_custom_key_enabled: Optional[bool] | Omit = omit,
|
|
159
|
+
include_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit,
|
|
160
|
+
notion_client_id: Optional[str] | Omit = omit,
|
|
161
|
+
notion_client_secret: Optional[str] | Omit = omit,
|
|
162
|
+
notion_custom_key_enabled: Optional[bool] | Omit = omit,
|
|
163
|
+
onedrive_client_id: Optional[str] | Omit = omit,
|
|
164
|
+
onedrive_client_secret: Optional[str] | Omit = omit,
|
|
165
|
+
onedrive_custom_key_enabled: Optional[bool] | Omit = omit,
|
|
166
|
+
should_llm_filter: Optional[bool] | Omit = omit,
|
|
167
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
168
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
169
|
+
extra_headers: Headers | None = None,
|
|
170
|
+
extra_query: Query | None = None,
|
|
171
|
+
extra_body: Body | None = None,
|
|
172
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
173
|
+
) -> SettingUpdateResponse:
|
|
174
|
+
"""
|
|
175
|
+
Update settings for an organization
|
|
176
|
+
|
|
177
|
+
Args:
|
|
178
|
+
extra_headers: Send extra headers
|
|
179
|
+
|
|
180
|
+
extra_query: Add additional query parameters to the request
|
|
181
|
+
|
|
182
|
+
extra_body: Add additional JSON properties to the request
|
|
183
|
+
|
|
184
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
185
|
+
"""
|
|
186
|
+
return await self._patch(
|
|
187
|
+
"/v3/settings",
|
|
188
|
+
body=await async_maybe_transform(
|
|
189
|
+
{
|
|
190
|
+
"chunk_size": chunk_size,
|
|
191
|
+
"exclude_items": exclude_items,
|
|
192
|
+
"filter_prompt": filter_prompt,
|
|
193
|
+
"google_drive_client_id": google_drive_client_id,
|
|
194
|
+
"google_drive_client_secret": google_drive_client_secret,
|
|
195
|
+
"google_drive_custom_key_enabled": google_drive_custom_key_enabled,
|
|
196
|
+
"include_items": include_items,
|
|
197
|
+
"notion_client_id": notion_client_id,
|
|
198
|
+
"notion_client_secret": notion_client_secret,
|
|
199
|
+
"notion_custom_key_enabled": notion_custom_key_enabled,
|
|
200
|
+
"onedrive_client_id": onedrive_client_id,
|
|
201
|
+
"onedrive_client_secret": onedrive_client_secret,
|
|
202
|
+
"onedrive_custom_key_enabled": onedrive_custom_key_enabled,
|
|
203
|
+
"should_llm_filter": should_llm_filter,
|
|
204
|
+
},
|
|
205
|
+
setting_update_params.SettingUpdateParams,
|
|
206
|
+
),
|
|
207
|
+
options=make_request_options(
|
|
208
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
209
|
+
),
|
|
210
|
+
cast_to=SettingUpdateResponse,
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
async def get(
|
|
214
|
+
self,
|
|
215
|
+
*,
|
|
216
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
217
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
218
|
+
extra_headers: Headers | None = None,
|
|
219
|
+
extra_query: Query | None = None,
|
|
220
|
+
extra_body: Body | None = None,
|
|
221
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
222
|
+
) -> SettingGetResponse:
|
|
223
|
+
"""Get settings for an organization"""
|
|
224
|
+
return await self._get(
|
|
225
|
+
"/v3/settings",
|
|
226
|
+
options=make_request_options(
|
|
227
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
228
|
+
),
|
|
229
|
+
cast_to=SettingGetResponse,
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
class SettingsResourceWithRawResponse:
|
|
234
|
+
def __init__(self, settings: SettingsResource) -> None:
|
|
235
|
+
self._settings = settings
|
|
236
|
+
|
|
237
|
+
self.update = to_raw_response_wrapper(
|
|
238
|
+
settings.update,
|
|
239
|
+
)
|
|
240
|
+
self.get = to_raw_response_wrapper(
|
|
241
|
+
settings.get,
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
class AsyncSettingsResourceWithRawResponse:
|
|
246
|
+
def __init__(self, settings: AsyncSettingsResource) -> None:
|
|
247
|
+
self._settings = settings
|
|
248
|
+
|
|
249
|
+
self.update = async_to_raw_response_wrapper(
|
|
250
|
+
settings.update,
|
|
251
|
+
)
|
|
252
|
+
self.get = async_to_raw_response_wrapper(
|
|
253
|
+
settings.get,
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
class SettingsResourceWithStreamingResponse:
|
|
258
|
+
def __init__(self, settings: SettingsResource) -> None:
|
|
259
|
+
self._settings = settings
|
|
260
|
+
|
|
261
|
+
self.update = to_streamed_response_wrapper(
|
|
262
|
+
settings.update,
|
|
263
|
+
)
|
|
264
|
+
self.get = to_streamed_response_wrapper(
|
|
265
|
+
settings.get,
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
class AsyncSettingsResourceWithStreamingResponse:
|
|
270
|
+
def __init__(self, settings: AsyncSettingsResource) -> None:
|
|
271
|
+
self._settings = settings
|
|
272
|
+
|
|
273
|
+
self.update = async_to_streamed_response_wrapper(
|
|
274
|
+
settings.update,
|
|
275
|
+
)
|
|
276
|
+
self.get = async_to_streamed_response_wrapper(
|
|
277
|
+
settings.get,
|
|
278
|
+
)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .add_response import AddResponse as AddResponse
|
|
6
|
+
from .profile_response import ProfileResponse as ProfileResponse
|
|
7
|
+
from .client_add_params import ClientAddParams as ClientAddParams
|
|
8
|
+
from .memory_add_params import MemoryAddParams as MemoryAddParams
|
|
9
|
+
from .memory_list_params import MemoryListParams as MemoryListParams
|
|
10
|
+
from .document_add_params import DocumentAddParams as DocumentAddParams
|
|
11
|
+
from .memory_add_response import MemoryAddResponse as MemoryAddResponse
|
|
12
|
+
from .memory_get_response import MemoryGetResponse as MemoryGetResponse
|
|
13
|
+
from .document_list_params import DocumentListParams as DocumentListParams
|
|
14
|
+
from .memory_list_response import MemoryListResponse as MemoryListResponse
|
|
15
|
+
from .memory_update_params import MemoryUpdateParams as MemoryUpdateParams
|
|
16
|
+
from .setting_get_response import SettingGetResponse as SettingGetResponse
|
|
17
|
+
from .client_profile_params import ClientProfileParams as ClientProfileParams
|
|
18
|
+
from .document_add_response import DocumentAddResponse as DocumentAddResponse
|
|
19
|
+
from .document_get_response import DocumentGetResponse as DocumentGetResponse
|
|
20
|
+
from .search_execute_params import SearchExecuteParams as SearchExecuteParams
|
|
21
|
+
from .setting_update_params import SettingUpdateParams as SettingUpdateParams
|
|
22
|
+
from .connection_list_params import ConnectionListParams as ConnectionListParams
|
|
23
|
+
from .document_list_response import DocumentListResponse as DocumentListResponse
|
|
24
|
+
from .document_update_params import DocumentUpdateParams as DocumentUpdateParams
|
|
25
|
+
from .memory_update_response import MemoryUpdateResponse as MemoryUpdateResponse
|
|
26
|
+
from .search_memories_params import SearchMemoriesParams as SearchMemoriesParams
|
|
27
|
+
from .search_documents_params import SearchDocumentsParams as SearchDocumentsParams
|
|
28
|
+
from .search_execute_response import SearchExecuteResponse as SearchExecuteResponse
|
|
29
|
+
from .setting_update_response import SettingUpdateResponse as SettingUpdateResponse
|
|
30
|
+
from .connection_create_params import ConnectionCreateParams as ConnectionCreateParams
|
|
31
|
+
from .connection_import_params import ConnectionImportParams as ConnectionImportParams
|
|
32
|
+
from .connection_list_response import ConnectionListResponse as ConnectionListResponse
|
|
33
|
+
from .document_update_response import DocumentUpdateResponse as DocumentUpdateResponse
|
|
34
|
+
from .search_memories_response import SearchMemoriesResponse as SearchMemoriesResponse
|
|
35
|
+
from .memory_upload_file_params import MemoryUploadFileParams as MemoryUploadFileParams
|
|
36
|
+
from .search_documents_response import SearchDocumentsResponse as SearchDocumentsResponse
|
|
37
|
+
from .connection_create_response import ConnectionCreateResponse as ConnectionCreateResponse
|
|
38
|
+
from .connection_import_response import ConnectionImportResponse as ConnectionImportResponse
|
|
39
|
+
from .document_upload_file_params import DocumentUploadFileParams as DocumentUploadFileParams
|
|
40
|
+
from .memory_upload_file_response import MemoryUploadFileResponse as MemoryUploadFileResponse
|
|
41
|
+
from .connection_get_by_id_response import ConnectionGetByIDResponse as ConnectionGetByIDResponse
|
|
42
|
+
from .connection_get_by_tags_params import ConnectionGetByTagsParams as ConnectionGetByTagsParams
|
|
43
|
+
from .document_upload_file_response import DocumentUploadFileResponse as DocumentUploadFileResponse
|
|
44
|
+
from .connection_get_by_tags_response import ConnectionGetByTagsResponse as ConnectionGetByTagsResponse
|
|
45
|
+
from .connection_delete_by_id_response import ConnectionDeleteByIDResponse as ConnectionDeleteByIDResponse
|
|
46
|
+
from .connection_list_documents_params import ConnectionListDocumentsParams as ConnectionListDocumentsParams
|
|
47
|
+
from .connection_list_documents_response import ConnectionListDocumentsResponse as ConnectionListDocumentsResponse
|
|
48
|
+
from .connection_delete_by_provider_params import ConnectionDeleteByProviderParams as ConnectionDeleteByProviderParams
|
|
49
|
+
from .connection_delete_by_provider_response import (
|
|
50
|
+
ConnectionDeleteByProviderResponse as ConnectionDeleteByProviderResponse,
|
|
51
|
+
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .._models import BaseModel
|
|
4
|
+
|
|
5
|
+
__all__ = ["AddResponse"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AddResponse(BaseModel):
|
|
9
|
+
id: str
|
|
10
|
+
"""Unique identifier of the document"""
|
|
11
|
+
|
|
12
|
+
status: str
|
|
13
|
+
"""Status of the document"""
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Union
|
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = ["ClientAddParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ClientAddParams(TypedDict, total=False):
|
|
15
|
+
content: Required[str]
|
|
16
|
+
"""The content to extract and process into a document.
|
|
17
|
+
|
|
18
|
+
This can be a URL to a website, a PDF, an image, or a video.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
|
|
22
|
+
"""Optional tag this document should be containerized by.
|
|
23
|
+
|
|
24
|
+
Max 100 characters, alphanumeric with hyphens and underscores only.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
|
|
28
|
+
|
|
29
|
+
custom_id: Annotated[str, PropertyInfo(alias="customId")]
|
|
30
|
+
"""Optional custom ID of the document.
|
|
31
|
+
|
|
32
|
+
Max 100 characters, alphanumeric with hyphens and underscores only.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
|
|
36
|
+
"""Optional metadata for the document."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["ClientProfileParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ClientProfileParams(TypedDict, total=False):
|
|
13
|
+
container_tag: Required[Annotated[str, PropertyInfo(alias="containerTag")]]
|
|
14
|
+
"""Tag to filter the profile by.
|
|
15
|
+
|
|
16
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
|
17
|
+
to use to filter memories.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
q: str
|
|
21
|
+
"""Optional search query to include search results in the response"""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Union, Optional
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = ["ConnectionCreateParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ConnectionCreateParams(TypedDict, total=False):
|
|
15
|
+
container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
|
|
16
|
+
|
|
17
|
+
document_limit: Annotated[int, PropertyInfo(alias="documentLimit")]
|
|
18
|
+
|
|
19
|
+
metadata: Optional[Dict[str, Union[str, float, bool]]]
|
|
20
|
+
|
|
21
|
+
redirect_url: Annotated[str, PropertyInfo(alias="redirectUrl")]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["ConnectionCreateResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ConnectionCreateResponse(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
|
|
15
|
+
auth_link: str = FieldInfo(alias="authLink")
|
|
16
|
+
|
|
17
|
+
expires_in: str = FieldInfo(alias="expiresIn")
|
|
18
|
+
|
|
19
|
+
redirects_to: Optional[str] = FieldInfo(alias="redirectsTo", default=None)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._types import SequenceNotStr
|
|
8
|
+
from .._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["ConnectionDeleteByProviderParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ConnectionDeleteByProviderParams(TypedDict, total=False):
|
|
14
|
+
container_tags: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]]
|
|
15
|
+
"""Optional comma-separated list of container tags to filter connections by"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .._models import BaseModel
|
|
4
|
+
|
|
5
|
+
__all__ = ["ConnectionDeleteByProviderResponse"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ConnectionDeleteByProviderResponse(BaseModel):
|
|
9
|
+
id: str
|
|
10
|
+
|
|
11
|
+
provider: str
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["ConnectionGetByIDResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ConnectionGetByIDResponse(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
|
|
15
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
16
|
+
|
|
17
|
+
provider: str
|
|
18
|
+
|
|
19
|
+
document_limit: Optional[float] = FieldInfo(alias="documentLimit", default=None)
|
|
20
|
+
|
|
21
|
+
email: Optional[str] = None
|
|
22
|
+
|
|
23
|
+
expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None)
|
|
24
|
+
|
|
25
|
+
metadata: Optional[Dict[str, object]] = None
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._types import SequenceNotStr
|
|
8
|
+
from .._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["ConnectionGetByTagsParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ConnectionGetByTagsParams(TypedDict, total=False):
|
|
14
|
+
container_tags: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]]
|
|
15
|
+
"""Comma-separated list of container tags to filter connection by"""
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["ConnectionGetByTagsResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ConnectionGetByTagsResponse(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
|
|
15
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
16
|
+
|
|
17
|
+
provider: str
|
|
18
|
+
|
|
19
|
+
document_limit: Optional[float] = FieldInfo(alias="documentLimit", default=None)
|
|
20
|
+
|
|
21
|
+
email: Optional[str] = None
|
|
22
|
+
|
|
23
|
+
expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None)
|
|
24
|
+
|
|
25
|
+
metadata: Optional[Dict[str, object]] = None
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._types import SequenceNotStr
|
|
8
|
+
from .._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["ConnectionImportParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ConnectionImportParams(TypedDict, total=False):
|
|
14
|
+
container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
|
|
15
|
+
"""Optional comma-separated list of container tags to filter connections by"""
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._types import SequenceNotStr
|
|
8
|
+
from .._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["ConnectionListDocumentsParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ConnectionListDocumentsParams(TypedDict, total=False):
|
|
14
|
+
container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
|
|
15
|
+
"""Optional comma-separated list of container tags to filter documents by"""
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["ConnectionListDocumentsResponse", "ConnectionListDocumentsResponseItem"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ConnectionListDocumentsResponseItem(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
|
|
16
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
17
|
+
|
|
18
|
+
status: str
|
|
19
|
+
|
|
20
|
+
summary: Optional[str] = None
|
|
21
|
+
|
|
22
|
+
title: Optional[str] = None
|
|
23
|
+
|
|
24
|
+
type: str
|
|
25
|
+
|
|
26
|
+
updated_at: str = FieldInfo(alias="updatedAt")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
ConnectionListDocumentsResponse: TypeAlias = List[ConnectionListDocumentsResponseItem]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._types import SequenceNotStr
|
|
8
|
+
from .._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["ConnectionListParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ConnectionListParams(TypedDict, total=False):
|
|
14
|
+
container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
|
|
15
|
+
"""Optional comma-separated list of container tags to filter documents by"""
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["ConnectionListResponse", "ConnectionListResponseItem"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ConnectionListResponseItem(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
|
|
16
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
17
|
+
|
|
18
|
+
provider: str
|
|
19
|
+
|
|
20
|
+
document_limit: Optional[float] = FieldInfo(alias="documentLimit", default=None)
|
|
21
|
+
|
|
22
|
+
email: Optional[str] = None
|
|
23
|
+
|
|
24
|
+
expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None)
|
|
25
|
+
|
|
26
|
+
metadata: Optional[Dict[str, object]] = None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
ConnectionListResponse: TypeAlias = List[ConnectionListResponseItem]
|