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
|
@@ -7,10 +7,8 @@ from importlib import import_module
|
|
|
7
7
|
|
|
8
8
|
if typing.TYPE_CHECKING:
|
|
9
9
|
from .search_collections_readable_id_search_post_request import SearchCollectionsReadableIdSearchPostRequest
|
|
10
|
-
from .search_collections_readable_id_search_post_response import SearchCollectionsReadableIdSearchPostResponse
|
|
11
10
|
_dynamic_imports: typing.Dict[str, str] = {
|
|
12
|
-
"SearchCollectionsReadableIdSearchPostRequest": ".search_collections_readable_id_search_post_request"
|
|
13
|
-
"SearchCollectionsReadableIdSearchPostResponse": ".search_collections_readable_id_search_post_response",
|
|
11
|
+
"SearchCollectionsReadableIdSearchPostRequest": ".search_collections_readable_id_search_post_request"
|
|
14
12
|
}
|
|
15
13
|
|
|
16
14
|
|
|
@@ -35,4 +33,4 @@ def __dir__():
|
|
|
35
33
|
return sorted(lazy_attrs)
|
|
36
34
|
|
|
37
35
|
|
|
38
|
-
__all__ = ["SearchCollectionsReadableIdSearchPostRequest"
|
|
36
|
+
__all__ = ["SearchCollectionsReadableIdSearchPostRequest"]
|
airweave/core/client_wrapper.py
CHANGED
|
@@ -10,15 +10,11 @@ class BaseClientWrapper:
|
|
|
10
10
|
def __init__(
|
|
11
11
|
self,
|
|
12
12
|
*,
|
|
13
|
-
framework_name: typing.Optional[str] = None,
|
|
14
|
-
framework_version: typing.Optional[str] = None,
|
|
15
13
|
api_key: str,
|
|
16
14
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
17
15
|
base_url: str,
|
|
18
16
|
timeout: typing.Optional[float] = None,
|
|
19
17
|
):
|
|
20
|
-
self._framework_name = framework_name
|
|
21
|
-
self._framework_version = framework_version
|
|
22
18
|
self.api_key = api_key
|
|
23
19
|
self._headers = headers
|
|
24
20
|
self._base_url = base_url
|
|
@@ -26,16 +22,12 @@ class BaseClientWrapper:
|
|
|
26
22
|
|
|
27
23
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
28
24
|
headers: typing.Dict[str, str] = {
|
|
29
|
-
"User-Agent": "airweave-sdk/v0.8.
|
|
25
|
+
"User-Agent": "airweave-sdk/v0.8.66",
|
|
30
26
|
"X-Fern-Language": "Python",
|
|
31
27
|
"X-Fern-SDK-Name": "airweave-sdk",
|
|
32
|
-
"X-Fern-SDK-Version": "v0.8.
|
|
28
|
+
"X-Fern-SDK-Version": "v0.8.66",
|
|
33
29
|
**(self.get_custom_headers() or {}),
|
|
34
30
|
}
|
|
35
|
-
if self._framework_name is not None:
|
|
36
|
-
headers["X-Framework-Name"] = self._framework_name
|
|
37
|
-
if self._framework_version is not None:
|
|
38
|
-
headers["X-Framework-Version"] = self._framework_version
|
|
39
31
|
headers["x-api-key"] = self.api_key
|
|
40
32
|
return headers
|
|
41
33
|
|
|
@@ -53,22 +45,13 @@ class SyncClientWrapper(BaseClientWrapper):
|
|
|
53
45
|
def __init__(
|
|
54
46
|
self,
|
|
55
47
|
*,
|
|
56
|
-
framework_name: typing.Optional[str] = None,
|
|
57
|
-
framework_version: typing.Optional[str] = None,
|
|
58
48
|
api_key: str,
|
|
59
49
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
60
50
|
base_url: str,
|
|
61
51
|
timeout: typing.Optional[float] = None,
|
|
62
52
|
httpx_client: httpx.Client,
|
|
63
53
|
):
|
|
64
|
-
super().__init__(
|
|
65
|
-
framework_name=framework_name,
|
|
66
|
-
framework_version=framework_version,
|
|
67
|
-
api_key=api_key,
|
|
68
|
-
headers=headers,
|
|
69
|
-
base_url=base_url,
|
|
70
|
-
timeout=timeout,
|
|
71
|
-
)
|
|
54
|
+
super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout)
|
|
72
55
|
self.httpx_client = HttpClient(
|
|
73
56
|
httpx_client=httpx_client,
|
|
74
57
|
base_headers=self.get_headers,
|
|
@@ -81,22 +64,13 @@ class AsyncClientWrapper(BaseClientWrapper):
|
|
|
81
64
|
def __init__(
|
|
82
65
|
self,
|
|
83
66
|
*,
|
|
84
|
-
framework_name: typing.Optional[str] = None,
|
|
85
|
-
framework_version: typing.Optional[str] = None,
|
|
86
67
|
api_key: str,
|
|
87
68
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
88
69
|
base_url: str,
|
|
89
70
|
timeout: typing.Optional[float] = None,
|
|
90
71
|
httpx_client: httpx.AsyncClient,
|
|
91
72
|
):
|
|
92
|
-
super().__init__(
|
|
93
|
-
framework_name=framework_name,
|
|
94
|
-
framework_version=framework_version,
|
|
95
|
-
api_key=api_key,
|
|
96
|
-
headers=headers,
|
|
97
|
-
base_url=base_url,
|
|
98
|
-
timeout=timeout,
|
|
99
|
-
)
|
|
73
|
+
super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout)
|
|
100
74
|
self.httpx_client = AsyncHttpClient(
|
|
101
75
|
httpx_client=httpx_client,
|
|
102
76
|
base_headers=self.get_headers,
|
airweave/errors/__init__.py
CHANGED
|
@@ -6,8 +6,16 @@ import typing
|
|
|
6
6
|
from importlib import import_module
|
|
7
7
|
|
|
8
8
|
if typing.TYPE_CHECKING:
|
|
9
|
+
from .conflict_error import ConflictError
|
|
10
|
+
from .not_found_error import NotFoundError
|
|
11
|
+
from .too_many_requests_error import TooManyRequestsError
|
|
9
12
|
from .unprocessable_entity_error import UnprocessableEntityError
|
|
10
|
-
_dynamic_imports: typing.Dict[str, str] = {
|
|
13
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
14
|
+
"ConflictError": ".conflict_error",
|
|
15
|
+
"NotFoundError": ".not_found_error",
|
|
16
|
+
"TooManyRequestsError": ".too_many_requests_error",
|
|
17
|
+
"UnprocessableEntityError": ".unprocessable_entity_error",
|
|
18
|
+
}
|
|
11
19
|
|
|
12
20
|
|
|
13
21
|
def __getattr__(attr_name: str) -> typing.Any:
|
|
@@ -31,4 +39,4 @@ def __dir__():
|
|
|
31
39
|
return sorted(lazy_attrs)
|
|
32
40
|
|
|
33
41
|
|
|
34
|
-
__all__ = ["UnprocessableEntityError"]
|
|
42
|
+
__all__ = ["ConflictError", "NotFoundError", "TooManyRequestsError", "UnprocessableEntityError"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.api_error import ApiError
|
|
6
|
+
from ..types.conflict_error_response import ConflictErrorResponse
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ConflictError(ApiError):
|
|
10
|
+
def __init__(self, body: ConflictErrorResponse, headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
11
|
+
super().__init__(status_code=409, headers=headers, body=body)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.api_error import ApiError
|
|
6
|
+
from ..types.not_found_error_response import NotFoundErrorResponse
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class NotFoundError(ApiError):
|
|
10
|
+
def __init__(self, body: NotFoundErrorResponse, headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
11
|
+
super().__init__(status_code=404, headers=headers, body=body)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.api_error import ApiError
|
|
6
|
+
from ..types.rate_limit_error_response import RateLimitErrorResponse
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TooManyRequestsError(ApiError):
|
|
10
|
+
def __init__(self, body: RateLimitErrorResponse, headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
11
|
+
super().__init__(status_code=429, headers=headers, body=body)
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
5
|
from ..core.api_error import ApiError
|
|
6
|
-
from ..types.http_validation_error import HttpValidationError
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
class UnprocessableEntityError(ApiError):
|
|
10
|
-
def __init__(self, body:
|
|
9
|
+
def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
11
10
|
super().__init__(status_code=422, headers=headers, body=body)
|