airweave-sdk 0.8.64__py3-none-any.whl → 0.8.66__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.
- airweave/__init__.py +44 -38
- airweave/client.py +19 -16
- airweave/collections/__init__.py +3 -6
- airweave/collections/client.py +273 -113
- airweave/collections/raw_client.py +633 -94
- airweave/collections/types/__init__.py +2 -4
- airweave/core/client_wrapper.py +4 -30
- airweave/errors/__init__.py +10 -2
- airweave/errors/conflict_error.py +11 -0
- airweave/errors/not_found_error.py +11 -0
- airweave/errors/too_many_requests_error.py +11 -0
- airweave/errors/unprocessable_entity_error.py +1 -2
- airweave/{types/message_status.py → events/__init__.py} +2 -1
- airweave/events/client.py +919 -0
- airweave/events/raw_client.py +1435 -0
- airweave/source_connections/client.py +210 -162
- airweave/source_connections/raw_client.py +574 -137
- airweave/sources/client.py +42 -18
- airweave/sources/raw_client.py +118 -17
- airweave/types/__init__.py +33 -33
- airweave/types/{create_subscription_request.py → conflict_error_response.py} +9 -6
- airweave/types/delivery_attempt.py +61 -0
- airweave/types/event_message.py +55 -0
- airweave/types/event_message_with_attempts.py +59 -0
- airweave/types/{endpoint_secret_out.py → not_found_error_response.py} +9 -2
- airweave/types/{subscription_with_attempts_out.py → rate_limit_error_response.py} +9 -6
- airweave/types/recovery_task.py +35 -0
- airweave/types/search_request.py +13 -10
- airweave/types/search_response.py +6 -3
- airweave/types/source_connection.py +73 -18
- airweave/types/source_connection_job.py +65 -15
- airweave/types/source_connection_list_item.py +45 -10
- airweave/types/sync_event_payload.py +72 -0
- airweave/types/{patch_subscription_request.py → validation_error_detail.py} +16 -5
- airweave/types/validation_error_response.py +30 -0
- airweave/types/webhook_subscription.py +68 -0
- {airweave_sdk-0.8.64.dist-info → airweave_sdk-0.8.66.dist-info}/METADATA +1 -5
- {airweave_sdk-0.8.64.dist-info → airweave_sdk-0.8.66.dist-info}/RECORD +39 -34
- airweave/collections/types/search_collections_readable_id_search_post_response.py +0 -8
- airweave/types/collection_update.py +0 -35
- airweave/types/endpoint_out.py +0 -35
- airweave/types/message_attempt_out.py +0 -37
- airweave/types/message_attempt_trigger_type.py +0 -3
- airweave/types/message_out.py +0 -29
- airweave/types/message_status_text.py +0 -5
- {airweave_sdk-0.8.64.dist-info → airweave_sdk-0.8.66.dist-info}/WHEEL +0 -0
|
@@ -10,8 +10,13 @@ from ..core.jsonable_encoder import jsonable_encoder
|
|
|
10
10
|
from ..core.pydantic_utilities import parse_obj_as
|
|
11
11
|
from ..core.request_options import RequestOptions
|
|
12
12
|
from ..core.serialization import convert_and_respect_annotation_metadata
|
|
13
|
+
from ..errors.conflict_error import ConflictError
|
|
14
|
+
from ..errors.not_found_error import NotFoundError
|
|
15
|
+
from ..errors.too_many_requests_error import TooManyRequestsError
|
|
13
16
|
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
14
|
-
from ..types.
|
|
17
|
+
from ..types.conflict_error_response import ConflictErrorResponse
|
|
18
|
+
from ..types.not_found_error_response import NotFoundErrorResponse
|
|
19
|
+
from ..types.rate_limit_error_response import RateLimitErrorResponse
|
|
15
20
|
from ..types.schedule_config import ScheduleConfig
|
|
16
21
|
from ..types.source_connection import SourceConnection
|
|
17
22
|
from ..types.source_connection_job import SourceConnectionJob
|
|
@@ -35,7 +40,13 @@ class RawSourceConnectionsClient:
|
|
|
35
40
|
request_options: typing.Optional[RequestOptions] = None,
|
|
36
41
|
) -> HttpResponse[typing.List[SourceConnectionListItem]]:
|
|
37
42
|
"""
|
|
38
|
-
|
|
43
|
+
Retrieve all source connections for your organization.
|
|
44
|
+
|
|
45
|
+
Returns a lightweight list of source connections with essential fields for
|
|
46
|
+
display and navigation. Use the collection filter to see connections within
|
|
47
|
+
a specific collection.
|
|
48
|
+
|
|
49
|
+
For full connection details including sync history, use the GET /{id} endpoint.
|
|
39
50
|
|
|
40
51
|
Parameters
|
|
41
52
|
----------
|
|
@@ -43,8 +54,10 @@ class RawSourceConnectionsClient:
|
|
|
43
54
|
Filter by collection readable ID
|
|
44
55
|
|
|
45
56
|
skip : typing.Optional[int]
|
|
57
|
+
Number of connections to skip for pagination
|
|
46
58
|
|
|
47
59
|
limit : typing.Optional[int]
|
|
60
|
+
Maximum number of connections to return (1-1000)
|
|
48
61
|
|
|
49
62
|
request_options : typing.Optional[RequestOptions]
|
|
50
63
|
Request-specific configuration.
|
|
@@ -52,7 +65,7 @@ class RawSourceConnectionsClient:
|
|
|
52
65
|
Returns
|
|
53
66
|
-------
|
|
54
67
|
HttpResponse[typing.List[SourceConnectionListItem]]
|
|
55
|
-
|
|
68
|
+
List of source connections
|
|
56
69
|
"""
|
|
57
70
|
_response = self._client_wrapper.httpx_client.request(
|
|
58
71
|
"source-connections",
|
|
@@ -78,9 +91,20 @@ class RawSourceConnectionsClient:
|
|
|
78
91
|
raise UnprocessableEntityError(
|
|
79
92
|
headers=dict(_response.headers),
|
|
80
93
|
body=typing.cast(
|
|
81
|
-
|
|
94
|
+
typing.Optional[typing.Any],
|
|
95
|
+
parse_obj_as(
|
|
96
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
97
|
+
object_=_response.json(),
|
|
98
|
+
),
|
|
99
|
+
),
|
|
100
|
+
)
|
|
101
|
+
if _response.status_code == 429:
|
|
102
|
+
raise TooManyRequestsError(
|
|
103
|
+
headers=dict(_response.headers),
|
|
104
|
+
body=typing.cast(
|
|
105
|
+
RateLimitErrorResponse,
|
|
82
106
|
parse_obj_as(
|
|
83
|
-
type_=
|
|
107
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
84
108
|
object_=_response.json(),
|
|
85
109
|
),
|
|
86
110
|
),
|
|
@@ -105,45 +129,42 @@ class RawSourceConnectionsClient:
|
|
|
105
129
|
request_options: typing.Optional[RequestOptions] = None,
|
|
106
130
|
) -> HttpResponse[SourceConnection]:
|
|
107
131
|
"""
|
|
108
|
-
Create a new source connection.
|
|
132
|
+
Create a new source connection to sync data from an external source.
|
|
109
133
|
|
|
110
|
-
The authentication
|
|
111
|
-
- DirectAuthentication: Immediate creation with provided credentials
|
|
112
|
-
- OAuthBrowserAuthentication: Returns shell with authentication URL
|
|
113
|
-
- OAuthTokenAuthentication: Immediate creation with provided token
|
|
114
|
-
- AuthProviderAuthentication: Using external auth provider
|
|
134
|
+
The authentication method determines the creation flow:
|
|
115
135
|
|
|
116
|
-
|
|
117
|
-
|
|
136
|
+
- **Direct**: Provide credentials (API key, token) directly. Connection is created immediately.
|
|
137
|
+
- **OAuth Browser**: Returns a connection with an `auth_url` to redirect users for authentication.
|
|
138
|
+
- **OAuth Token**: Provide an existing OAuth token. Connection is created immediately.
|
|
139
|
+
- **Auth Provider**: Use a pre-configured auth provider (e.g., Composio, Pipedream).
|
|
118
140
|
|
|
119
|
-
|
|
120
|
-
- True for: direct, oauth_token, auth_provider
|
|
121
|
-
- False for: oauth_browser, oauth_byoc (these sync after authentication)
|
|
141
|
+
After successful authentication, data sync can begin automatically or on-demand.
|
|
122
142
|
|
|
123
143
|
Parameters
|
|
124
144
|
----------
|
|
125
145
|
short_name : str
|
|
126
|
-
Source identifier (e.g., 'slack', 'github')
|
|
146
|
+
Source type identifier (e.g., 'slack', 'github', 'notion')
|
|
127
147
|
|
|
128
148
|
readable_collection_id : str
|
|
129
|
-
|
|
149
|
+
The readable ID of the collection to add this connection to
|
|
130
150
|
|
|
131
151
|
name : typing.Optional[str]
|
|
132
|
-
|
|
152
|
+
Display name for the connection. If not provided, defaults to '{Source Name} Connection'.
|
|
133
153
|
|
|
134
154
|
description : typing.Optional[str]
|
|
135
|
-
|
|
155
|
+
Optional description of what this connection is used for
|
|
136
156
|
|
|
137
157
|
config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
138
|
-
Source-specific configuration
|
|
158
|
+
Source-specific configuration (e.g., repository name, filters)
|
|
139
159
|
|
|
140
160
|
schedule : typing.Optional[ScheduleConfig]
|
|
161
|
+
Optional sync schedule configuration
|
|
141
162
|
|
|
142
163
|
sync_immediately : typing.Optional[bool]
|
|
143
164
|
Run initial sync after creation. Defaults to True for direct/token/auth_provider, False for OAuth browser/BYOC flows (which sync after authentication)
|
|
144
165
|
|
|
145
166
|
authentication : typing.Optional[Authentication]
|
|
146
|
-
Authentication
|
|
167
|
+
Authentication configuration. Type is auto-detected from provided fields.
|
|
147
168
|
|
|
148
169
|
redirect_url : typing.Optional[str]
|
|
149
170
|
URL to redirect to after OAuth flow completes (only used for OAuth flows)
|
|
@@ -154,7 +175,7 @@ class RawSourceConnectionsClient:
|
|
|
154
175
|
Returns
|
|
155
176
|
-------
|
|
156
177
|
HttpResponse[SourceConnection]
|
|
157
|
-
|
|
178
|
+
Created source connection
|
|
158
179
|
"""
|
|
159
180
|
_response = self._client_wrapper.httpx_client.request(
|
|
160
181
|
"source-connections",
|
|
@@ -194,9 +215,20 @@ class RawSourceConnectionsClient:
|
|
|
194
215
|
raise UnprocessableEntityError(
|
|
195
216
|
headers=dict(_response.headers),
|
|
196
217
|
body=typing.cast(
|
|
197
|
-
|
|
218
|
+
typing.Optional[typing.Any],
|
|
219
|
+
parse_obj_as(
|
|
220
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
221
|
+
object_=_response.json(),
|
|
222
|
+
),
|
|
223
|
+
),
|
|
224
|
+
)
|
|
225
|
+
if _response.status_code == 429:
|
|
226
|
+
raise TooManyRequestsError(
|
|
227
|
+
headers=dict(_response.headers),
|
|
228
|
+
body=typing.cast(
|
|
229
|
+
RateLimitErrorResponse,
|
|
198
230
|
parse_obj_as(
|
|
199
|
-
type_=
|
|
231
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
200
232
|
object_=_response.json(),
|
|
201
233
|
),
|
|
202
234
|
),
|
|
@@ -210,11 +242,18 @@ class RawSourceConnectionsClient:
|
|
|
210
242
|
self, source_connection_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
211
243
|
) -> HttpResponse[SourceConnection]:
|
|
212
244
|
"""
|
|
213
|
-
|
|
245
|
+
Retrieve details of a specific source connection.
|
|
246
|
+
|
|
247
|
+
Returns complete information about the connection including:
|
|
248
|
+
- Configuration settings
|
|
249
|
+
- Authentication status
|
|
250
|
+
- Sync schedule and history
|
|
251
|
+
- Entity statistics
|
|
214
252
|
|
|
215
253
|
Parameters
|
|
216
254
|
----------
|
|
217
255
|
source_connection_id : str
|
|
256
|
+
Unique identifier of the source connection (UUID)
|
|
218
257
|
|
|
219
258
|
request_options : typing.Optional[RequestOptions]
|
|
220
259
|
Request-specific configuration.
|
|
@@ -222,7 +261,7 @@ class RawSourceConnectionsClient:
|
|
|
222
261
|
Returns
|
|
223
262
|
-------
|
|
224
263
|
HttpResponse[SourceConnection]
|
|
225
|
-
|
|
264
|
+
Source connection details
|
|
226
265
|
"""
|
|
227
266
|
_response = self._client_wrapper.httpx_client.request(
|
|
228
267
|
f"source-connections/{jsonable_encoder(source_connection_id)}",
|
|
@@ -239,13 +278,35 @@ class RawSourceConnectionsClient:
|
|
|
239
278
|
),
|
|
240
279
|
)
|
|
241
280
|
return HttpResponse(response=_response, data=_data)
|
|
281
|
+
if _response.status_code == 404:
|
|
282
|
+
raise NotFoundError(
|
|
283
|
+
headers=dict(_response.headers),
|
|
284
|
+
body=typing.cast(
|
|
285
|
+
NotFoundErrorResponse,
|
|
286
|
+
parse_obj_as(
|
|
287
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
288
|
+
object_=_response.json(),
|
|
289
|
+
),
|
|
290
|
+
),
|
|
291
|
+
)
|
|
242
292
|
if _response.status_code == 422:
|
|
243
293
|
raise UnprocessableEntityError(
|
|
244
294
|
headers=dict(_response.headers),
|
|
245
295
|
body=typing.cast(
|
|
246
|
-
|
|
296
|
+
typing.Optional[typing.Any],
|
|
297
|
+
parse_obj_as(
|
|
298
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
299
|
+
object_=_response.json(),
|
|
300
|
+
),
|
|
301
|
+
),
|
|
302
|
+
)
|
|
303
|
+
if _response.status_code == 429:
|
|
304
|
+
raise TooManyRequestsError(
|
|
305
|
+
headers=dict(_response.headers),
|
|
306
|
+
body=typing.cast(
|
|
307
|
+
RateLimitErrorResponse,
|
|
247
308
|
parse_obj_as(
|
|
248
|
-
type_=
|
|
309
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
249
310
|
object_=_response.json(),
|
|
250
311
|
),
|
|
251
312
|
),
|
|
@@ -259,11 +320,19 @@ class RawSourceConnectionsClient:
|
|
|
259
320
|
self, source_connection_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
260
321
|
) -> HttpResponse[SourceConnection]:
|
|
261
322
|
"""
|
|
262
|
-
|
|
323
|
+
Permanently delete a source connection and all its synced data.
|
|
324
|
+
|
|
325
|
+
This operation:
|
|
326
|
+
- Removes all entities synced from this source from the vector database
|
|
327
|
+
- Cancels any scheduled or running sync jobs
|
|
328
|
+
- Deletes the connection configuration and credentials
|
|
329
|
+
|
|
330
|
+
**Warning**: This action cannot be undone. All synced data will be permanently deleted.
|
|
263
331
|
|
|
264
332
|
Parameters
|
|
265
333
|
----------
|
|
266
334
|
source_connection_id : str
|
|
335
|
+
Unique identifier of the source connection to delete (UUID)
|
|
267
336
|
|
|
268
337
|
request_options : typing.Optional[RequestOptions]
|
|
269
338
|
Request-specific configuration.
|
|
@@ -271,7 +340,7 @@ class RawSourceConnectionsClient:
|
|
|
271
340
|
Returns
|
|
272
341
|
-------
|
|
273
342
|
HttpResponse[SourceConnection]
|
|
274
|
-
|
|
343
|
+
Deleted source connection
|
|
275
344
|
"""
|
|
276
345
|
_response = self._client_wrapper.httpx_client.request(
|
|
277
346
|
f"source-connections/{jsonable_encoder(source_connection_id)}",
|
|
@@ -288,13 +357,35 @@ class RawSourceConnectionsClient:
|
|
|
288
357
|
),
|
|
289
358
|
)
|
|
290
359
|
return HttpResponse(response=_response, data=_data)
|
|
360
|
+
if _response.status_code == 404:
|
|
361
|
+
raise NotFoundError(
|
|
362
|
+
headers=dict(_response.headers),
|
|
363
|
+
body=typing.cast(
|
|
364
|
+
NotFoundErrorResponse,
|
|
365
|
+
parse_obj_as(
|
|
366
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
367
|
+
object_=_response.json(),
|
|
368
|
+
),
|
|
369
|
+
),
|
|
370
|
+
)
|
|
291
371
|
if _response.status_code == 422:
|
|
292
372
|
raise UnprocessableEntityError(
|
|
293
373
|
headers=dict(_response.headers),
|
|
294
374
|
body=typing.cast(
|
|
295
|
-
|
|
375
|
+
typing.Optional[typing.Any],
|
|
376
|
+
parse_obj_as(
|
|
377
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
378
|
+
object_=_response.json(),
|
|
379
|
+
),
|
|
380
|
+
),
|
|
381
|
+
)
|
|
382
|
+
if _response.status_code == 429:
|
|
383
|
+
raise TooManyRequestsError(
|
|
384
|
+
headers=dict(_response.headers),
|
|
385
|
+
body=typing.cast(
|
|
386
|
+
RateLimitErrorResponse,
|
|
296
387
|
parse_obj_as(
|
|
297
|
-
type_=
|
|
388
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
298
389
|
object_=_response.json(),
|
|
299
390
|
),
|
|
300
391
|
),
|
|
@@ -316,29 +407,35 @@ class RawSourceConnectionsClient:
|
|
|
316
407
|
request_options: typing.Optional[RequestOptions] = None,
|
|
317
408
|
) -> HttpResponse[SourceConnection]:
|
|
318
409
|
"""
|
|
319
|
-
Update
|
|
410
|
+
Update an existing source connection's configuration.
|
|
411
|
+
|
|
412
|
+
You can modify:
|
|
413
|
+
- **Name and description**: Display information
|
|
414
|
+
- **Configuration**: Source-specific settings (e.g., repository name, filters)
|
|
415
|
+
- **Schedule**: Cron expression for automatic syncs
|
|
416
|
+
- **Authentication**: Update credentials (direct auth only)
|
|
320
417
|
|
|
321
|
-
|
|
322
|
-
- name, description
|
|
323
|
-
- config_fields
|
|
324
|
-
- cron_schedule
|
|
325
|
-
- auth_fields (direct auth only)
|
|
418
|
+
Only include the fields you want to change; omitted fields retain their current values.
|
|
326
419
|
|
|
327
420
|
Parameters
|
|
328
421
|
----------
|
|
329
422
|
source_connection_id : str
|
|
423
|
+
Unique identifier of the source connection to update (UUID)
|
|
330
424
|
|
|
331
425
|
name : typing.Optional[str]
|
|
426
|
+
Updated display name for the connection
|
|
332
427
|
|
|
333
428
|
description : typing.Optional[str]
|
|
429
|
+
Updated description
|
|
334
430
|
|
|
335
431
|
config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
336
|
-
|
|
432
|
+
Updated source-specific configuration
|
|
337
433
|
|
|
338
434
|
schedule : typing.Optional[ScheduleConfig]
|
|
435
|
+
Updated sync schedule configuration
|
|
339
436
|
|
|
340
437
|
authentication : typing.Optional[Authentication]
|
|
341
|
-
|
|
438
|
+
Updated authentication credentials (direct auth only)
|
|
342
439
|
|
|
343
440
|
request_options : typing.Optional[RequestOptions]
|
|
344
441
|
Request-specific configuration.
|
|
@@ -346,7 +443,7 @@ class RawSourceConnectionsClient:
|
|
|
346
443
|
Returns
|
|
347
444
|
-------
|
|
348
445
|
HttpResponse[SourceConnection]
|
|
349
|
-
|
|
446
|
+
Updated source connection
|
|
350
447
|
"""
|
|
351
448
|
_response = self._client_wrapper.httpx_client.request(
|
|
352
449
|
f"source-connections/{jsonable_encoder(source_connection_id)}",
|
|
@@ -378,13 +475,35 @@ class RawSourceConnectionsClient:
|
|
|
378
475
|
),
|
|
379
476
|
)
|
|
380
477
|
return HttpResponse(response=_response, data=_data)
|
|
478
|
+
if _response.status_code == 404:
|
|
479
|
+
raise NotFoundError(
|
|
480
|
+
headers=dict(_response.headers),
|
|
481
|
+
body=typing.cast(
|
|
482
|
+
NotFoundErrorResponse,
|
|
483
|
+
parse_obj_as(
|
|
484
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
485
|
+
object_=_response.json(),
|
|
486
|
+
),
|
|
487
|
+
),
|
|
488
|
+
)
|
|
381
489
|
if _response.status_code == 422:
|
|
382
490
|
raise UnprocessableEntityError(
|
|
383
491
|
headers=dict(_response.headers),
|
|
384
492
|
body=typing.cast(
|
|
385
|
-
|
|
493
|
+
typing.Optional[typing.Any],
|
|
386
494
|
parse_obj_as(
|
|
387
|
-
type_=
|
|
495
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
496
|
+
object_=_response.json(),
|
|
497
|
+
),
|
|
498
|
+
),
|
|
499
|
+
)
|
|
500
|
+
if _response.status_code == 429:
|
|
501
|
+
raise TooManyRequestsError(
|
|
502
|
+
headers=dict(_response.headers),
|
|
503
|
+
body=typing.cast(
|
|
504
|
+
RateLimitErrorResponse,
|
|
505
|
+
parse_obj_as(
|
|
506
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
388
507
|
object_=_response.json(),
|
|
389
508
|
),
|
|
390
509
|
),
|
|
@@ -402,25 +521,22 @@ class RawSourceConnectionsClient:
|
|
|
402
521
|
request_options: typing.Optional[RequestOptions] = None,
|
|
403
522
|
) -> HttpResponse[SourceConnectionJob]:
|
|
404
523
|
"""
|
|
405
|
-
Trigger a
|
|
524
|
+
Trigger a data synchronization job for a source connection.
|
|
406
525
|
|
|
407
|
-
|
|
526
|
+
Starts an asynchronous sync job that pulls the latest data from the connected
|
|
527
|
+
source. The job runs in the background and you can monitor its progress using
|
|
528
|
+
the jobs endpoint.
|
|
408
529
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
source_connection_id: ID of the source connection to run
|
|
412
|
-
ctx: API context with organization and user information
|
|
413
|
-
guard_rail: Guard rail service for usage limits
|
|
414
|
-
force_full_sync: If True, forces a full sync with orphaned entity cleanup
|
|
415
|
-
for continuous syncs. Raises 400 error if used on
|
|
416
|
-
non-continuous syncs (which are always full syncs).
|
|
530
|
+
For continuous sync connections, this performs an incremental sync by default.
|
|
531
|
+
Use `force_full_sync=true` to perform a complete re-sync of all data.
|
|
417
532
|
|
|
418
533
|
Parameters
|
|
419
534
|
----------
|
|
420
535
|
source_connection_id : str
|
|
536
|
+
Unique identifier of the source connection to sync (UUID)
|
|
421
537
|
|
|
422
538
|
force_full_sync : typing.Optional[bool]
|
|
423
|
-
Force a full sync ignoring cursor data
|
|
539
|
+
Force a full sync ignoring cursor data. Only applies to continuous sync connections. Non-continuous connections always perform full syncs.
|
|
424
540
|
|
|
425
541
|
request_options : typing.Optional[RequestOptions]
|
|
426
542
|
Request-specific configuration.
|
|
@@ -428,7 +544,7 @@ class RawSourceConnectionsClient:
|
|
|
428
544
|
Returns
|
|
429
545
|
-------
|
|
430
546
|
HttpResponse[SourceConnectionJob]
|
|
431
|
-
|
|
547
|
+
Created sync job
|
|
432
548
|
"""
|
|
433
549
|
_response = self._client_wrapper.httpx_client.request(
|
|
434
550
|
f"source-connections/{jsonable_encoder(source_connection_id)}/run",
|
|
@@ -448,13 +564,46 @@ class RawSourceConnectionsClient:
|
|
|
448
564
|
),
|
|
449
565
|
)
|
|
450
566
|
return HttpResponse(response=_response, data=_data)
|
|
567
|
+
if _response.status_code == 404:
|
|
568
|
+
raise NotFoundError(
|
|
569
|
+
headers=dict(_response.headers),
|
|
570
|
+
body=typing.cast(
|
|
571
|
+
NotFoundErrorResponse,
|
|
572
|
+
parse_obj_as(
|
|
573
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
574
|
+
object_=_response.json(),
|
|
575
|
+
),
|
|
576
|
+
),
|
|
577
|
+
)
|
|
578
|
+
if _response.status_code == 409:
|
|
579
|
+
raise ConflictError(
|
|
580
|
+
headers=dict(_response.headers),
|
|
581
|
+
body=typing.cast(
|
|
582
|
+
ConflictErrorResponse,
|
|
583
|
+
parse_obj_as(
|
|
584
|
+
type_=ConflictErrorResponse, # type: ignore
|
|
585
|
+
object_=_response.json(),
|
|
586
|
+
),
|
|
587
|
+
),
|
|
588
|
+
)
|
|
451
589
|
if _response.status_code == 422:
|
|
452
590
|
raise UnprocessableEntityError(
|
|
453
591
|
headers=dict(_response.headers),
|
|
454
592
|
body=typing.cast(
|
|
455
|
-
|
|
593
|
+
typing.Optional[typing.Any],
|
|
456
594
|
parse_obj_as(
|
|
457
|
-
type_=
|
|
595
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
596
|
+
object_=_response.json(),
|
|
597
|
+
),
|
|
598
|
+
),
|
|
599
|
+
)
|
|
600
|
+
if _response.status_code == 429:
|
|
601
|
+
raise TooManyRequestsError(
|
|
602
|
+
headers=dict(_response.headers),
|
|
603
|
+
body=typing.cast(
|
|
604
|
+
RateLimitErrorResponse,
|
|
605
|
+
parse_obj_as(
|
|
606
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
458
607
|
object_=_response.json(),
|
|
459
608
|
),
|
|
460
609
|
),
|
|
@@ -472,13 +621,26 @@ class RawSourceConnectionsClient:
|
|
|
472
621
|
request_options: typing.Optional[RequestOptions] = None,
|
|
473
622
|
) -> HttpResponse[typing.List[SourceConnectionJob]]:
|
|
474
623
|
"""
|
|
475
|
-
|
|
624
|
+
Retrieve the sync job history for a source connection.
|
|
625
|
+
|
|
626
|
+
Returns a list of sync jobs ordered by creation time (newest first). Each job
|
|
627
|
+
includes status, timing information, and entity counts.
|
|
628
|
+
|
|
629
|
+
Job statuses:
|
|
630
|
+
- **PENDING**: Job is queued and waiting to start
|
|
631
|
+
- **RUNNING**: Sync is actively pulling and processing data
|
|
632
|
+
- **COMPLETED**: Sync finished successfully
|
|
633
|
+
- **FAILED**: Sync encountered an error
|
|
634
|
+
- **CANCELLED**: Sync was manually cancelled
|
|
635
|
+
- **CANCELLING**: Cancellation has been requested
|
|
476
636
|
|
|
477
637
|
Parameters
|
|
478
638
|
----------
|
|
479
639
|
source_connection_id : str
|
|
640
|
+
Unique identifier of the source connection (UUID)
|
|
480
641
|
|
|
481
642
|
limit : typing.Optional[int]
|
|
643
|
+
Maximum number of jobs to return (1-1000)
|
|
482
644
|
|
|
483
645
|
request_options : typing.Optional[RequestOptions]
|
|
484
646
|
Request-specific configuration.
|
|
@@ -486,7 +648,7 @@ class RawSourceConnectionsClient:
|
|
|
486
648
|
Returns
|
|
487
649
|
-------
|
|
488
650
|
HttpResponse[typing.List[SourceConnectionJob]]
|
|
489
|
-
|
|
651
|
+
List of sync jobs
|
|
490
652
|
"""
|
|
491
653
|
_response = self._client_wrapper.httpx_client.request(
|
|
492
654
|
f"source-connections/{jsonable_encoder(source_connection_id)}/jobs",
|
|
@@ -506,13 +668,35 @@ class RawSourceConnectionsClient:
|
|
|
506
668
|
),
|
|
507
669
|
)
|
|
508
670
|
return HttpResponse(response=_response, data=_data)
|
|
671
|
+
if _response.status_code == 404:
|
|
672
|
+
raise NotFoundError(
|
|
673
|
+
headers=dict(_response.headers),
|
|
674
|
+
body=typing.cast(
|
|
675
|
+
NotFoundErrorResponse,
|
|
676
|
+
parse_obj_as(
|
|
677
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
678
|
+
object_=_response.json(),
|
|
679
|
+
),
|
|
680
|
+
),
|
|
681
|
+
)
|
|
509
682
|
if _response.status_code == 422:
|
|
510
683
|
raise UnprocessableEntityError(
|
|
511
684
|
headers=dict(_response.headers),
|
|
512
685
|
body=typing.cast(
|
|
513
|
-
|
|
686
|
+
typing.Optional[typing.Any],
|
|
687
|
+
parse_obj_as(
|
|
688
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
689
|
+
object_=_response.json(),
|
|
690
|
+
),
|
|
691
|
+
),
|
|
692
|
+
)
|
|
693
|
+
if _response.status_code == 429:
|
|
694
|
+
raise TooManyRequestsError(
|
|
695
|
+
headers=dict(_response.headers),
|
|
696
|
+
body=typing.cast(
|
|
697
|
+
RateLimitErrorResponse,
|
|
514
698
|
parse_obj_as(
|
|
515
|
-
type_=
|
|
699
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
516
700
|
object_=_response.json(),
|
|
517
701
|
),
|
|
518
702
|
),
|
|
@@ -526,17 +710,21 @@ class RawSourceConnectionsClient:
|
|
|
526
710
|
self, source_connection_id: str, job_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
527
711
|
) -> HttpResponse[SourceConnectionJob]:
|
|
528
712
|
"""
|
|
529
|
-
|
|
713
|
+
Request cancellation of a running sync job.
|
|
530
714
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
715
|
+
The job will be marked as CANCELLING and the sync workflow will stop at the
|
|
716
|
+
next checkpoint. Already-processed entities are retained.
|
|
717
|
+
|
|
718
|
+
**Note**: Cancellation is asynchronous. The job status will change to CANCELLED
|
|
719
|
+
once the workflow has fully stopped.
|
|
534
720
|
|
|
535
721
|
Parameters
|
|
536
722
|
----------
|
|
537
723
|
source_connection_id : str
|
|
724
|
+
Unique identifier of the source connection (UUID)
|
|
538
725
|
|
|
539
726
|
job_id : str
|
|
727
|
+
Unique identifier of the sync job to cancel (UUID)
|
|
540
728
|
|
|
541
729
|
request_options : typing.Optional[RequestOptions]
|
|
542
730
|
Request-specific configuration.
|
|
@@ -544,7 +732,7 @@ class RawSourceConnectionsClient:
|
|
|
544
732
|
Returns
|
|
545
733
|
-------
|
|
546
734
|
HttpResponse[SourceConnectionJob]
|
|
547
|
-
|
|
735
|
+
Job with cancellation status
|
|
548
736
|
"""
|
|
549
737
|
_response = self._client_wrapper.httpx_client.request(
|
|
550
738
|
f"source-connections/{jsonable_encoder(source_connection_id)}/jobs/{jsonable_encoder(job_id)}/cancel",
|
|
@@ -561,13 +749,46 @@ class RawSourceConnectionsClient:
|
|
|
561
749
|
),
|
|
562
750
|
)
|
|
563
751
|
return HttpResponse(response=_response, data=_data)
|
|
752
|
+
if _response.status_code == 404:
|
|
753
|
+
raise NotFoundError(
|
|
754
|
+
headers=dict(_response.headers),
|
|
755
|
+
body=typing.cast(
|
|
756
|
+
NotFoundErrorResponse,
|
|
757
|
+
parse_obj_as(
|
|
758
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
759
|
+
object_=_response.json(),
|
|
760
|
+
),
|
|
761
|
+
),
|
|
762
|
+
)
|
|
763
|
+
if _response.status_code == 409:
|
|
764
|
+
raise ConflictError(
|
|
765
|
+
headers=dict(_response.headers),
|
|
766
|
+
body=typing.cast(
|
|
767
|
+
ConflictErrorResponse,
|
|
768
|
+
parse_obj_as(
|
|
769
|
+
type_=ConflictErrorResponse, # type: ignore
|
|
770
|
+
object_=_response.json(),
|
|
771
|
+
),
|
|
772
|
+
),
|
|
773
|
+
)
|
|
564
774
|
if _response.status_code == 422:
|
|
565
775
|
raise UnprocessableEntityError(
|
|
566
776
|
headers=dict(_response.headers),
|
|
567
777
|
body=typing.cast(
|
|
568
|
-
|
|
778
|
+
typing.Optional[typing.Any],
|
|
779
|
+
parse_obj_as(
|
|
780
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
781
|
+
object_=_response.json(),
|
|
782
|
+
),
|
|
783
|
+
),
|
|
784
|
+
)
|
|
785
|
+
if _response.status_code == 429:
|
|
786
|
+
raise TooManyRequestsError(
|
|
787
|
+
headers=dict(_response.headers),
|
|
788
|
+
body=typing.cast(
|
|
789
|
+
RateLimitErrorResponse,
|
|
569
790
|
parse_obj_as(
|
|
570
|
-
type_=
|
|
791
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
571
792
|
object_=_response.json(),
|
|
572
793
|
),
|
|
573
794
|
),
|
|
@@ -591,7 +812,13 @@ class AsyncRawSourceConnectionsClient:
|
|
|
591
812
|
request_options: typing.Optional[RequestOptions] = None,
|
|
592
813
|
) -> AsyncHttpResponse[typing.List[SourceConnectionListItem]]:
|
|
593
814
|
"""
|
|
594
|
-
|
|
815
|
+
Retrieve all source connections for your organization.
|
|
816
|
+
|
|
817
|
+
Returns a lightweight list of source connections with essential fields for
|
|
818
|
+
display and navigation. Use the collection filter to see connections within
|
|
819
|
+
a specific collection.
|
|
820
|
+
|
|
821
|
+
For full connection details including sync history, use the GET /{id} endpoint.
|
|
595
822
|
|
|
596
823
|
Parameters
|
|
597
824
|
----------
|
|
@@ -599,8 +826,10 @@ class AsyncRawSourceConnectionsClient:
|
|
|
599
826
|
Filter by collection readable ID
|
|
600
827
|
|
|
601
828
|
skip : typing.Optional[int]
|
|
829
|
+
Number of connections to skip for pagination
|
|
602
830
|
|
|
603
831
|
limit : typing.Optional[int]
|
|
832
|
+
Maximum number of connections to return (1-1000)
|
|
604
833
|
|
|
605
834
|
request_options : typing.Optional[RequestOptions]
|
|
606
835
|
Request-specific configuration.
|
|
@@ -608,7 +837,7 @@ class AsyncRawSourceConnectionsClient:
|
|
|
608
837
|
Returns
|
|
609
838
|
-------
|
|
610
839
|
AsyncHttpResponse[typing.List[SourceConnectionListItem]]
|
|
611
|
-
|
|
840
|
+
List of source connections
|
|
612
841
|
"""
|
|
613
842
|
_response = await self._client_wrapper.httpx_client.request(
|
|
614
843
|
"source-connections",
|
|
@@ -634,9 +863,20 @@ class AsyncRawSourceConnectionsClient:
|
|
|
634
863
|
raise UnprocessableEntityError(
|
|
635
864
|
headers=dict(_response.headers),
|
|
636
865
|
body=typing.cast(
|
|
637
|
-
|
|
866
|
+
typing.Optional[typing.Any],
|
|
867
|
+
parse_obj_as(
|
|
868
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
869
|
+
object_=_response.json(),
|
|
870
|
+
),
|
|
871
|
+
),
|
|
872
|
+
)
|
|
873
|
+
if _response.status_code == 429:
|
|
874
|
+
raise TooManyRequestsError(
|
|
875
|
+
headers=dict(_response.headers),
|
|
876
|
+
body=typing.cast(
|
|
877
|
+
RateLimitErrorResponse,
|
|
638
878
|
parse_obj_as(
|
|
639
|
-
type_=
|
|
879
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
640
880
|
object_=_response.json(),
|
|
641
881
|
),
|
|
642
882
|
),
|
|
@@ -661,45 +901,42 @@ class AsyncRawSourceConnectionsClient:
|
|
|
661
901
|
request_options: typing.Optional[RequestOptions] = None,
|
|
662
902
|
) -> AsyncHttpResponse[SourceConnection]:
|
|
663
903
|
"""
|
|
664
|
-
Create a new source connection.
|
|
904
|
+
Create a new source connection to sync data from an external source.
|
|
665
905
|
|
|
666
|
-
The authentication
|
|
667
|
-
- DirectAuthentication: Immediate creation with provided credentials
|
|
668
|
-
- OAuthBrowserAuthentication: Returns shell with authentication URL
|
|
669
|
-
- OAuthTokenAuthentication: Immediate creation with provided token
|
|
670
|
-
- AuthProviderAuthentication: Using external auth provider
|
|
906
|
+
The authentication method determines the creation flow:
|
|
671
907
|
|
|
672
|
-
|
|
673
|
-
|
|
908
|
+
- **Direct**: Provide credentials (API key, token) directly. Connection is created immediately.
|
|
909
|
+
- **OAuth Browser**: Returns a connection with an `auth_url` to redirect users for authentication.
|
|
910
|
+
- **OAuth Token**: Provide an existing OAuth token. Connection is created immediately.
|
|
911
|
+
- **Auth Provider**: Use a pre-configured auth provider (e.g., Composio, Pipedream).
|
|
674
912
|
|
|
675
|
-
|
|
676
|
-
- True for: direct, oauth_token, auth_provider
|
|
677
|
-
- False for: oauth_browser, oauth_byoc (these sync after authentication)
|
|
913
|
+
After successful authentication, data sync can begin automatically or on-demand.
|
|
678
914
|
|
|
679
915
|
Parameters
|
|
680
916
|
----------
|
|
681
917
|
short_name : str
|
|
682
|
-
Source identifier (e.g., 'slack', 'github')
|
|
918
|
+
Source type identifier (e.g., 'slack', 'github', 'notion')
|
|
683
919
|
|
|
684
920
|
readable_collection_id : str
|
|
685
|
-
|
|
921
|
+
The readable ID of the collection to add this connection to
|
|
686
922
|
|
|
687
923
|
name : typing.Optional[str]
|
|
688
|
-
|
|
924
|
+
Display name for the connection. If not provided, defaults to '{Source Name} Connection'.
|
|
689
925
|
|
|
690
926
|
description : typing.Optional[str]
|
|
691
|
-
|
|
927
|
+
Optional description of what this connection is used for
|
|
692
928
|
|
|
693
929
|
config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
694
|
-
Source-specific configuration
|
|
930
|
+
Source-specific configuration (e.g., repository name, filters)
|
|
695
931
|
|
|
696
932
|
schedule : typing.Optional[ScheduleConfig]
|
|
933
|
+
Optional sync schedule configuration
|
|
697
934
|
|
|
698
935
|
sync_immediately : typing.Optional[bool]
|
|
699
936
|
Run initial sync after creation. Defaults to True for direct/token/auth_provider, False for OAuth browser/BYOC flows (which sync after authentication)
|
|
700
937
|
|
|
701
938
|
authentication : typing.Optional[Authentication]
|
|
702
|
-
Authentication
|
|
939
|
+
Authentication configuration. Type is auto-detected from provided fields.
|
|
703
940
|
|
|
704
941
|
redirect_url : typing.Optional[str]
|
|
705
942
|
URL to redirect to after OAuth flow completes (only used for OAuth flows)
|
|
@@ -710,7 +947,7 @@ class AsyncRawSourceConnectionsClient:
|
|
|
710
947
|
Returns
|
|
711
948
|
-------
|
|
712
949
|
AsyncHttpResponse[SourceConnection]
|
|
713
|
-
|
|
950
|
+
Created source connection
|
|
714
951
|
"""
|
|
715
952
|
_response = await self._client_wrapper.httpx_client.request(
|
|
716
953
|
"source-connections",
|
|
@@ -750,9 +987,20 @@ class AsyncRawSourceConnectionsClient:
|
|
|
750
987
|
raise UnprocessableEntityError(
|
|
751
988
|
headers=dict(_response.headers),
|
|
752
989
|
body=typing.cast(
|
|
753
|
-
|
|
990
|
+
typing.Optional[typing.Any],
|
|
991
|
+
parse_obj_as(
|
|
992
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
993
|
+
object_=_response.json(),
|
|
994
|
+
),
|
|
995
|
+
),
|
|
996
|
+
)
|
|
997
|
+
if _response.status_code == 429:
|
|
998
|
+
raise TooManyRequestsError(
|
|
999
|
+
headers=dict(_response.headers),
|
|
1000
|
+
body=typing.cast(
|
|
1001
|
+
RateLimitErrorResponse,
|
|
754
1002
|
parse_obj_as(
|
|
755
|
-
type_=
|
|
1003
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
756
1004
|
object_=_response.json(),
|
|
757
1005
|
),
|
|
758
1006
|
),
|
|
@@ -766,11 +1014,18 @@ class AsyncRawSourceConnectionsClient:
|
|
|
766
1014
|
self, source_connection_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
767
1015
|
) -> AsyncHttpResponse[SourceConnection]:
|
|
768
1016
|
"""
|
|
769
|
-
|
|
1017
|
+
Retrieve details of a specific source connection.
|
|
1018
|
+
|
|
1019
|
+
Returns complete information about the connection including:
|
|
1020
|
+
- Configuration settings
|
|
1021
|
+
- Authentication status
|
|
1022
|
+
- Sync schedule and history
|
|
1023
|
+
- Entity statistics
|
|
770
1024
|
|
|
771
1025
|
Parameters
|
|
772
1026
|
----------
|
|
773
1027
|
source_connection_id : str
|
|
1028
|
+
Unique identifier of the source connection (UUID)
|
|
774
1029
|
|
|
775
1030
|
request_options : typing.Optional[RequestOptions]
|
|
776
1031
|
Request-specific configuration.
|
|
@@ -778,7 +1033,7 @@ class AsyncRawSourceConnectionsClient:
|
|
|
778
1033
|
Returns
|
|
779
1034
|
-------
|
|
780
1035
|
AsyncHttpResponse[SourceConnection]
|
|
781
|
-
|
|
1036
|
+
Source connection details
|
|
782
1037
|
"""
|
|
783
1038
|
_response = await self._client_wrapper.httpx_client.request(
|
|
784
1039
|
f"source-connections/{jsonable_encoder(source_connection_id)}",
|
|
@@ -795,13 +1050,35 @@ class AsyncRawSourceConnectionsClient:
|
|
|
795
1050
|
),
|
|
796
1051
|
)
|
|
797
1052
|
return AsyncHttpResponse(response=_response, data=_data)
|
|
1053
|
+
if _response.status_code == 404:
|
|
1054
|
+
raise NotFoundError(
|
|
1055
|
+
headers=dict(_response.headers),
|
|
1056
|
+
body=typing.cast(
|
|
1057
|
+
NotFoundErrorResponse,
|
|
1058
|
+
parse_obj_as(
|
|
1059
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
1060
|
+
object_=_response.json(),
|
|
1061
|
+
),
|
|
1062
|
+
),
|
|
1063
|
+
)
|
|
798
1064
|
if _response.status_code == 422:
|
|
799
1065
|
raise UnprocessableEntityError(
|
|
800
1066
|
headers=dict(_response.headers),
|
|
801
1067
|
body=typing.cast(
|
|
802
|
-
|
|
1068
|
+
typing.Optional[typing.Any],
|
|
1069
|
+
parse_obj_as(
|
|
1070
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1071
|
+
object_=_response.json(),
|
|
1072
|
+
),
|
|
1073
|
+
),
|
|
1074
|
+
)
|
|
1075
|
+
if _response.status_code == 429:
|
|
1076
|
+
raise TooManyRequestsError(
|
|
1077
|
+
headers=dict(_response.headers),
|
|
1078
|
+
body=typing.cast(
|
|
1079
|
+
RateLimitErrorResponse,
|
|
803
1080
|
parse_obj_as(
|
|
804
|
-
type_=
|
|
1081
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
805
1082
|
object_=_response.json(),
|
|
806
1083
|
),
|
|
807
1084
|
),
|
|
@@ -815,11 +1092,19 @@ class AsyncRawSourceConnectionsClient:
|
|
|
815
1092
|
self, source_connection_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
816
1093
|
) -> AsyncHttpResponse[SourceConnection]:
|
|
817
1094
|
"""
|
|
818
|
-
|
|
1095
|
+
Permanently delete a source connection and all its synced data.
|
|
1096
|
+
|
|
1097
|
+
This operation:
|
|
1098
|
+
- Removes all entities synced from this source from the vector database
|
|
1099
|
+
- Cancels any scheduled or running sync jobs
|
|
1100
|
+
- Deletes the connection configuration and credentials
|
|
1101
|
+
|
|
1102
|
+
**Warning**: This action cannot be undone. All synced data will be permanently deleted.
|
|
819
1103
|
|
|
820
1104
|
Parameters
|
|
821
1105
|
----------
|
|
822
1106
|
source_connection_id : str
|
|
1107
|
+
Unique identifier of the source connection to delete (UUID)
|
|
823
1108
|
|
|
824
1109
|
request_options : typing.Optional[RequestOptions]
|
|
825
1110
|
Request-specific configuration.
|
|
@@ -827,7 +1112,7 @@ class AsyncRawSourceConnectionsClient:
|
|
|
827
1112
|
Returns
|
|
828
1113
|
-------
|
|
829
1114
|
AsyncHttpResponse[SourceConnection]
|
|
830
|
-
|
|
1115
|
+
Deleted source connection
|
|
831
1116
|
"""
|
|
832
1117
|
_response = await self._client_wrapper.httpx_client.request(
|
|
833
1118
|
f"source-connections/{jsonable_encoder(source_connection_id)}",
|
|
@@ -844,13 +1129,35 @@ class AsyncRawSourceConnectionsClient:
|
|
|
844
1129
|
),
|
|
845
1130
|
)
|
|
846
1131
|
return AsyncHttpResponse(response=_response, data=_data)
|
|
1132
|
+
if _response.status_code == 404:
|
|
1133
|
+
raise NotFoundError(
|
|
1134
|
+
headers=dict(_response.headers),
|
|
1135
|
+
body=typing.cast(
|
|
1136
|
+
NotFoundErrorResponse,
|
|
1137
|
+
parse_obj_as(
|
|
1138
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
1139
|
+
object_=_response.json(),
|
|
1140
|
+
),
|
|
1141
|
+
),
|
|
1142
|
+
)
|
|
847
1143
|
if _response.status_code == 422:
|
|
848
1144
|
raise UnprocessableEntityError(
|
|
849
1145
|
headers=dict(_response.headers),
|
|
850
1146
|
body=typing.cast(
|
|
851
|
-
|
|
1147
|
+
typing.Optional[typing.Any],
|
|
1148
|
+
parse_obj_as(
|
|
1149
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1150
|
+
object_=_response.json(),
|
|
1151
|
+
),
|
|
1152
|
+
),
|
|
1153
|
+
)
|
|
1154
|
+
if _response.status_code == 429:
|
|
1155
|
+
raise TooManyRequestsError(
|
|
1156
|
+
headers=dict(_response.headers),
|
|
1157
|
+
body=typing.cast(
|
|
1158
|
+
RateLimitErrorResponse,
|
|
852
1159
|
parse_obj_as(
|
|
853
|
-
type_=
|
|
1160
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
854
1161
|
object_=_response.json(),
|
|
855
1162
|
),
|
|
856
1163
|
),
|
|
@@ -872,29 +1179,35 @@ class AsyncRawSourceConnectionsClient:
|
|
|
872
1179
|
request_options: typing.Optional[RequestOptions] = None,
|
|
873
1180
|
) -> AsyncHttpResponse[SourceConnection]:
|
|
874
1181
|
"""
|
|
875
|
-
Update
|
|
1182
|
+
Update an existing source connection's configuration.
|
|
1183
|
+
|
|
1184
|
+
You can modify:
|
|
1185
|
+
- **Name and description**: Display information
|
|
1186
|
+
- **Configuration**: Source-specific settings (e.g., repository name, filters)
|
|
1187
|
+
- **Schedule**: Cron expression for automatic syncs
|
|
1188
|
+
- **Authentication**: Update credentials (direct auth only)
|
|
876
1189
|
|
|
877
|
-
|
|
878
|
-
- name, description
|
|
879
|
-
- config_fields
|
|
880
|
-
- cron_schedule
|
|
881
|
-
- auth_fields (direct auth only)
|
|
1190
|
+
Only include the fields you want to change; omitted fields retain their current values.
|
|
882
1191
|
|
|
883
1192
|
Parameters
|
|
884
1193
|
----------
|
|
885
1194
|
source_connection_id : str
|
|
1195
|
+
Unique identifier of the source connection to update (UUID)
|
|
886
1196
|
|
|
887
1197
|
name : typing.Optional[str]
|
|
1198
|
+
Updated display name for the connection
|
|
888
1199
|
|
|
889
1200
|
description : typing.Optional[str]
|
|
1201
|
+
Updated description
|
|
890
1202
|
|
|
891
1203
|
config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
892
|
-
|
|
1204
|
+
Updated source-specific configuration
|
|
893
1205
|
|
|
894
1206
|
schedule : typing.Optional[ScheduleConfig]
|
|
1207
|
+
Updated sync schedule configuration
|
|
895
1208
|
|
|
896
1209
|
authentication : typing.Optional[Authentication]
|
|
897
|
-
|
|
1210
|
+
Updated authentication credentials (direct auth only)
|
|
898
1211
|
|
|
899
1212
|
request_options : typing.Optional[RequestOptions]
|
|
900
1213
|
Request-specific configuration.
|
|
@@ -902,7 +1215,7 @@ class AsyncRawSourceConnectionsClient:
|
|
|
902
1215
|
Returns
|
|
903
1216
|
-------
|
|
904
1217
|
AsyncHttpResponse[SourceConnection]
|
|
905
|
-
|
|
1218
|
+
Updated source connection
|
|
906
1219
|
"""
|
|
907
1220
|
_response = await self._client_wrapper.httpx_client.request(
|
|
908
1221
|
f"source-connections/{jsonable_encoder(source_connection_id)}",
|
|
@@ -934,13 +1247,35 @@ class AsyncRawSourceConnectionsClient:
|
|
|
934
1247
|
),
|
|
935
1248
|
)
|
|
936
1249
|
return AsyncHttpResponse(response=_response, data=_data)
|
|
1250
|
+
if _response.status_code == 404:
|
|
1251
|
+
raise NotFoundError(
|
|
1252
|
+
headers=dict(_response.headers),
|
|
1253
|
+
body=typing.cast(
|
|
1254
|
+
NotFoundErrorResponse,
|
|
1255
|
+
parse_obj_as(
|
|
1256
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
1257
|
+
object_=_response.json(),
|
|
1258
|
+
),
|
|
1259
|
+
),
|
|
1260
|
+
)
|
|
937
1261
|
if _response.status_code == 422:
|
|
938
1262
|
raise UnprocessableEntityError(
|
|
939
1263
|
headers=dict(_response.headers),
|
|
940
1264
|
body=typing.cast(
|
|
941
|
-
|
|
1265
|
+
typing.Optional[typing.Any],
|
|
942
1266
|
parse_obj_as(
|
|
943
|
-
type_=
|
|
1267
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1268
|
+
object_=_response.json(),
|
|
1269
|
+
),
|
|
1270
|
+
),
|
|
1271
|
+
)
|
|
1272
|
+
if _response.status_code == 429:
|
|
1273
|
+
raise TooManyRequestsError(
|
|
1274
|
+
headers=dict(_response.headers),
|
|
1275
|
+
body=typing.cast(
|
|
1276
|
+
RateLimitErrorResponse,
|
|
1277
|
+
parse_obj_as(
|
|
1278
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
944
1279
|
object_=_response.json(),
|
|
945
1280
|
),
|
|
946
1281
|
),
|
|
@@ -958,25 +1293,22 @@ class AsyncRawSourceConnectionsClient:
|
|
|
958
1293
|
request_options: typing.Optional[RequestOptions] = None,
|
|
959
1294
|
) -> AsyncHttpResponse[SourceConnectionJob]:
|
|
960
1295
|
"""
|
|
961
|
-
Trigger a
|
|
1296
|
+
Trigger a data synchronization job for a source connection.
|
|
962
1297
|
|
|
963
|
-
|
|
1298
|
+
Starts an asynchronous sync job that pulls the latest data from the connected
|
|
1299
|
+
source. The job runs in the background and you can monitor its progress using
|
|
1300
|
+
the jobs endpoint.
|
|
964
1301
|
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
source_connection_id: ID of the source connection to run
|
|
968
|
-
ctx: API context with organization and user information
|
|
969
|
-
guard_rail: Guard rail service for usage limits
|
|
970
|
-
force_full_sync: If True, forces a full sync with orphaned entity cleanup
|
|
971
|
-
for continuous syncs. Raises 400 error if used on
|
|
972
|
-
non-continuous syncs (which are always full syncs).
|
|
1302
|
+
For continuous sync connections, this performs an incremental sync by default.
|
|
1303
|
+
Use `force_full_sync=true` to perform a complete re-sync of all data.
|
|
973
1304
|
|
|
974
1305
|
Parameters
|
|
975
1306
|
----------
|
|
976
1307
|
source_connection_id : str
|
|
1308
|
+
Unique identifier of the source connection to sync (UUID)
|
|
977
1309
|
|
|
978
1310
|
force_full_sync : typing.Optional[bool]
|
|
979
|
-
Force a full sync ignoring cursor data
|
|
1311
|
+
Force a full sync ignoring cursor data. Only applies to continuous sync connections. Non-continuous connections always perform full syncs.
|
|
980
1312
|
|
|
981
1313
|
request_options : typing.Optional[RequestOptions]
|
|
982
1314
|
Request-specific configuration.
|
|
@@ -984,7 +1316,7 @@ class AsyncRawSourceConnectionsClient:
|
|
|
984
1316
|
Returns
|
|
985
1317
|
-------
|
|
986
1318
|
AsyncHttpResponse[SourceConnectionJob]
|
|
987
|
-
|
|
1319
|
+
Created sync job
|
|
988
1320
|
"""
|
|
989
1321
|
_response = await self._client_wrapper.httpx_client.request(
|
|
990
1322
|
f"source-connections/{jsonable_encoder(source_connection_id)}/run",
|
|
@@ -1004,13 +1336,46 @@ class AsyncRawSourceConnectionsClient:
|
|
|
1004
1336
|
),
|
|
1005
1337
|
)
|
|
1006
1338
|
return AsyncHttpResponse(response=_response, data=_data)
|
|
1339
|
+
if _response.status_code == 404:
|
|
1340
|
+
raise NotFoundError(
|
|
1341
|
+
headers=dict(_response.headers),
|
|
1342
|
+
body=typing.cast(
|
|
1343
|
+
NotFoundErrorResponse,
|
|
1344
|
+
parse_obj_as(
|
|
1345
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
1346
|
+
object_=_response.json(),
|
|
1347
|
+
),
|
|
1348
|
+
),
|
|
1349
|
+
)
|
|
1350
|
+
if _response.status_code == 409:
|
|
1351
|
+
raise ConflictError(
|
|
1352
|
+
headers=dict(_response.headers),
|
|
1353
|
+
body=typing.cast(
|
|
1354
|
+
ConflictErrorResponse,
|
|
1355
|
+
parse_obj_as(
|
|
1356
|
+
type_=ConflictErrorResponse, # type: ignore
|
|
1357
|
+
object_=_response.json(),
|
|
1358
|
+
),
|
|
1359
|
+
),
|
|
1360
|
+
)
|
|
1007
1361
|
if _response.status_code == 422:
|
|
1008
1362
|
raise UnprocessableEntityError(
|
|
1009
1363
|
headers=dict(_response.headers),
|
|
1010
1364
|
body=typing.cast(
|
|
1011
|
-
|
|
1365
|
+
typing.Optional[typing.Any],
|
|
1012
1366
|
parse_obj_as(
|
|
1013
|
-
type_=
|
|
1367
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1368
|
+
object_=_response.json(),
|
|
1369
|
+
),
|
|
1370
|
+
),
|
|
1371
|
+
)
|
|
1372
|
+
if _response.status_code == 429:
|
|
1373
|
+
raise TooManyRequestsError(
|
|
1374
|
+
headers=dict(_response.headers),
|
|
1375
|
+
body=typing.cast(
|
|
1376
|
+
RateLimitErrorResponse,
|
|
1377
|
+
parse_obj_as(
|
|
1378
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
1014
1379
|
object_=_response.json(),
|
|
1015
1380
|
),
|
|
1016
1381
|
),
|
|
@@ -1028,13 +1393,26 @@ class AsyncRawSourceConnectionsClient:
|
|
|
1028
1393
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1029
1394
|
) -> AsyncHttpResponse[typing.List[SourceConnectionJob]]:
|
|
1030
1395
|
"""
|
|
1031
|
-
|
|
1396
|
+
Retrieve the sync job history for a source connection.
|
|
1397
|
+
|
|
1398
|
+
Returns a list of sync jobs ordered by creation time (newest first). Each job
|
|
1399
|
+
includes status, timing information, and entity counts.
|
|
1400
|
+
|
|
1401
|
+
Job statuses:
|
|
1402
|
+
- **PENDING**: Job is queued and waiting to start
|
|
1403
|
+
- **RUNNING**: Sync is actively pulling and processing data
|
|
1404
|
+
- **COMPLETED**: Sync finished successfully
|
|
1405
|
+
- **FAILED**: Sync encountered an error
|
|
1406
|
+
- **CANCELLED**: Sync was manually cancelled
|
|
1407
|
+
- **CANCELLING**: Cancellation has been requested
|
|
1032
1408
|
|
|
1033
1409
|
Parameters
|
|
1034
1410
|
----------
|
|
1035
1411
|
source_connection_id : str
|
|
1412
|
+
Unique identifier of the source connection (UUID)
|
|
1036
1413
|
|
|
1037
1414
|
limit : typing.Optional[int]
|
|
1415
|
+
Maximum number of jobs to return (1-1000)
|
|
1038
1416
|
|
|
1039
1417
|
request_options : typing.Optional[RequestOptions]
|
|
1040
1418
|
Request-specific configuration.
|
|
@@ -1042,7 +1420,7 @@ class AsyncRawSourceConnectionsClient:
|
|
|
1042
1420
|
Returns
|
|
1043
1421
|
-------
|
|
1044
1422
|
AsyncHttpResponse[typing.List[SourceConnectionJob]]
|
|
1045
|
-
|
|
1423
|
+
List of sync jobs
|
|
1046
1424
|
"""
|
|
1047
1425
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1048
1426
|
f"source-connections/{jsonable_encoder(source_connection_id)}/jobs",
|
|
@@ -1062,13 +1440,35 @@ class AsyncRawSourceConnectionsClient:
|
|
|
1062
1440
|
),
|
|
1063
1441
|
)
|
|
1064
1442
|
return AsyncHttpResponse(response=_response, data=_data)
|
|
1443
|
+
if _response.status_code == 404:
|
|
1444
|
+
raise NotFoundError(
|
|
1445
|
+
headers=dict(_response.headers),
|
|
1446
|
+
body=typing.cast(
|
|
1447
|
+
NotFoundErrorResponse,
|
|
1448
|
+
parse_obj_as(
|
|
1449
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
1450
|
+
object_=_response.json(),
|
|
1451
|
+
),
|
|
1452
|
+
),
|
|
1453
|
+
)
|
|
1065
1454
|
if _response.status_code == 422:
|
|
1066
1455
|
raise UnprocessableEntityError(
|
|
1067
1456
|
headers=dict(_response.headers),
|
|
1068
1457
|
body=typing.cast(
|
|
1069
|
-
|
|
1458
|
+
typing.Optional[typing.Any],
|
|
1459
|
+
parse_obj_as(
|
|
1460
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1461
|
+
object_=_response.json(),
|
|
1462
|
+
),
|
|
1463
|
+
),
|
|
1464
|
+
)
|
|
1465
|
+
if _response.status_code == 429:
|
|
1466
|
+
raise TooManyRequestsError(
|
|
1467
|
+
headers=dict(_response.headers),
|
|
1468
|
+
body=typing.cast(
|
|
1469
|
+
RateLimitErrorResponse,
|
|
1070
1470
|
parse_obj_as(
|
|
1071
|
-
type_=
|
|
1471
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
1072
1472
|
object_=_response.json(),
|
|
1073
1473
|
),
|
|
1074
1474
|
),
|
|
@@ -1082,17 +1482,21 @@ class AsyncRawSourceConnectionsClient:
|
|
|
1082
1482
|
self, source_connection_id: str, job_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1083
1483
|
) -> AsyncHttpResponse[SourceConnectionJob]:
|
|
1084
1484
|
"""
|
|
1085
|
-
|
|
1485
|
+
Request cancellation of a running sync job.
|
|
1086
1486
|
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1487
|
+
The job will be marked as CANCELLING and the sync workflow will stop at the
|
|
1488
|
+
next checkpoint. Already-processed entities are retained.
|
|
1489
|
+
|
|
1490
|
+
**Note**: Cancellation is asynchronous. The job status will change to CANCELLED
|
|
1491
|
+
once the workflow has fully stopped.
|
|
1090
1492
|
|
|
1091
1493
|
Parameters
|
|
1092
1494
|
----------
|
|
1093
1495
|
source_connection_id : str
|
|
1496
|
+
Unique identifier of the source connection (UUID)
|
|
1094
1497
|
|
|
1095
1498
|
job_id : str
|
|
1499
|
+
Unique identifier of the sync job to cancel (UUID)
|
|
1096
1500
|
|
|
1097
1501
|
request_options : typing.Optional[RequestOptions]
|
|
1098
1502
|
Request-specific configuration.
|
|
@@ -1100,7 +1504,7 @@ class AsyncRawSourceConnectionsClient:
|
|
|
1100
1504
|
Returns
|
|
1101
1505
|
-------
|
|
1102
1506
|
AsyncHttpResponse[SourceConnectionJob]
|
|
1103
|
-
|
|
1507
|
+
Job with cancellation status
|
|
1104
1508
|
"""
|
|
1105
1509
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1106
1510
|
f"source-connections/{jsonable_encoder(source_connection_id)}/jobs/{jsonable_encoder(job_id)}/cancel",
|
|
@@ -1117,13 +1521,46 @@ class AsyncRawSourceConnectionsClient:
|
|
|
1117
1521
|
),
|
|
1118
1522
|
)
|
|
1119
1523
|
return AsyncHttpResponse(response=_response, data=_data)
|
|
1524
|
+
if _response.status_code == 404:
|
|
1525
|
+
raise NotFoundError(
|
|
1526
|
+
headers=dict(_response.headers),
|
|
1527
|
+
body=typing.cast(
|
|
1528
|
+
NotFoundErrorResponse,
|
|
1529
|
+
parse_obj_as(
|
|
1530
|
+
type_=NotFoundErrorResponse, # type: ignore
|
|
1531
|
+
object_=_response.json(),
|
|
1532
|
+
),
|
|
1533
|
+
),
|
|
1534
|
+
)
|
|
1535
|
+
if _response.status_code == 409:
|
|
1536
|
+
raise ConflictError(
|
|
1537
|
+
headers=dict(_response.headers),
|
|
1538
|
+
body=typing.cast(
|
|
1539
|
+
ConflictErrorResponse,
|
|
1540
|
+
parse_obj_as(
|
|
1541
|
+
type_=ConflictErrorResponse, # type: ignore
|
|
1542
|
+
object_=_response.json(),
|
|
1543
|
+
),
|
|
1544
|
+
),
|
|
1545
|
+
)
|
|
1120
1546
|
if _response.status_code == 422:
|
|
1121
1547
|
raise UnprocessableEntityError(
|
|
1122
1548
|
headers=dict(_response.headers),
|
|
1123
1549
|
body=typing.cast(
|
|
1124
|
-
|
|
1550
|
+
typing.Optional[typing.Any],
|
|
1551
|
+
parse_obj_as(
|
|
1552
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1553
|
+
object_=_response.json(),
|
|
1554
|
+
),
|
|
1555
|
+
),
|
|
1556
|
+
)
|
|
1557
|
+
if _response.status_code == 429:
|
|
1558
|
+
raise TooManyRequestsError(
|
|
1559
|
+
headers=dict(_response.headers),
|
|
1560
|
+
body=typing.cast(
|
|
1561
|
+
RateLimitErrorResponse,
|
|
1125
1562
|
parse_obj_as(
|
|
1126
|
-
type_=
|
|
1563
|
+
type_=RateLimitErrorResponse, # type: ignore
|
|
1127
1564
|
object_=_response.json(),
|
|
1128
1565
|
),
|
|
1129
1566
|
),
|