raccoonai 0.1.0a7__py3-none-any.whl → 0.1.0a8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of raccoonai might be problematic. Click here for more details.
- raccoonai/_client.py +18 -1
- raccoonai/_files.py +1 -1
- raccoonai/_version.py +1 -1
- raccoonai/resources/__init__.py +28 -0
- raccoonai/resources/extensions.py +400 -0
- raccoonai/resources/fleet.py +173 -2
- raccoonai/resources/lam.py +151 -347
- raccoonai/resources/tail/__init__.py +47 -0
- raccoonai/resources/tail/apps.py +225 -0
- raccoonai/resources/tail/auth.py +186 -0
- raccoonai/resources/tail/tail.py +273 -0
- raccoonai/types/__init__.py +10 -2
- raccoonai/types/extension_all_response.py +22 -0
- raccoonai/types/extension_get_response.py +16 -0
- raccoonai/types/extension_upload_params.py +13 -0
- raccoonai/types/extension_upload_response.py +16 -0
- raccoonai/types/fleet_sessions_params.py +42 -0
- raccoonai/types/fleet_sessions_response.py +58 -0
- raccoonai/types/lam_tasks_params.py +39 -0
- raccoonai/types/lam_tasks_response.py +52 -0
- raccoonai/types/tail/__init__.py +9 -0
- raccoonai/types/tail/app_all_response.py +38 -0
- raccoonai/types/tail/app_linked_params.py +13 -0
- raccoonai/types/tail/app_linked_response.py +14 -0
- raccoonai/types/tail/auth_status_params.py +15 -0
- raccoonai/types/tail/auth_status_response.py +17 -0
- raccoonai/types/tail_users_params.py +26 -0
- raccoonai/types/tail_users_response.py +48 -0
- {raccoonai-0.1.0a7.dist-info → raccoonai-0.1.0a8.dist-info}/METADATA +18 -1
- raccoonai-0.1.0a8.dist-info/RECORD +61 -0
- raccoonai/types/lam_integration_run_params.py +0 -78
- raccoonai/types/lam_integration_run_response.py +0 -53
- raccoonai-0.1.0a7.dist-info/RECORD +0 -42
- {raccoonai-0.1.0a7.dist-info → raccoonai-0.1.0a8.dist-info}/WHEEL +0 -0
- {raccoonai-0.1.0a7.dist-info → raccoonai-0.1.0a8.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from ..._utils import (
|
|
9
|
+
maybe_transform,
|
|
10
|
+
async_maybe_transform,
|
|
11
|
+
)
|
|
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 ...types.tail import app_linked_params
|
|
21
|
+
from ..._base_client import make_request_options
|
|
22
|
+
from ...types.tail.app_all_response import AppAllResponse
|
|
23
|
+
from ...types.tail.app_linked_response import AppLinkedResponse
|
|
24
|
+
|
|
25
|
+
__all__ = ["AppsResource", "AsyncAppsResource"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class AppsResource(SyncAPIResource):
|
|
29
|
+
@cached_property
|
|
30
|
+
def with_raw_response(self) -> AppsResourceWithRawResponse:
|
|
31
|
+
"""
|
|
32
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
33
|
+
the raw response object instead of the parsed content.
|
|
34
|
+
|
|
35
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
36
|
+
"""
|
|
37
|
+
return AppsResourceWithRawResponse(self)
|
|
38
|
+
|
|
39
|
+
@cached_property
|
|
40
|
+
def with_streaming_response(self) -> AppsResourceWithStreamingResponse:
|
|
41
|
+
"""
|
|
42
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
43
|
+
|
|
44
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
45
|
+
"""
|
|
46
|
+
return AppsResourceWithStreamingResponse(self)
|
|
47
|
+
|
|
48
|
+
def all(
|
|
49
|
+
self,
|
|
50
|
+
*,
|
|
51
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
52
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
53
|
+
extra_headers: Headers | None = None,
|
|
54
|
+
extra_query: Query | None = None,
|
|
55
|
+
extra_body: Body | None = None,
|
|
56
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
57
|
+
) -> AppAllResponse:
|
|
58
|
+
"""Get Apps Endpoint"""
|
|
59
|
+
return self._get(
|
|
60
|
+
"/tail/apps",
|
|
61
|
+
options=make_request_options(
|
|
62
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
63
|
+
),
|
|
64
|
+
cast_to=AppAllResponse,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
def linked(
|
|
68
|
+
self,
|
|
69
|
+
*,
|
|
70
|
+
raccoon_passcode: str,
|
|
71
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
72
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
73
|
+
extra_headers: Headers | None = None,
|
|
74
|
+
extra_query: Query | None = None,
|
|
75
|
+
extra_body: Body | None = None,
|
|
76
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
77
|
+
) -> AppLinkedResponse:
|
|
78
|
+
"""
|
|
79
|
+
Get Linked Apps Endpoint
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
extra_headers: Send extra headers
|
|
83
|
+
|
|
84
|
+
extra_query: Add additional query parameters to the request
|
|
85
|
+
|
|
86
|
+
extra_body: Add additional JSON properties to the request
|
|
87
|
+
|
|
88
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
89
|
+
"""
|
|
90
|
+
return self._get(
|
|
91
|
+
"/tail/linked-apps",
|
|
92
|
+
options=make_request_options(
|
|
93
|
+
extra_headers=extra_headers,
|
|
94
|
+
extra_query=extra_query,
|
|
95
|
+
extra_body=extra_body,
|
|
96
|
+
timeout=timeout,
|
|
97
|
+
query=maybe_transform({"raccoon_passcode": raccoon_passcode}, app_linked_params.AppLinkedParams),
|
|
98
|
+
),
|
|
99
|
+
cast_to=AppLinkedResponse,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class AsyncAppsResource(AsyncAPIResource):
|
|
104
|
+
@cached_property
|
|
105
|
+
def with_raw_response(self) -> AsyncAppsResourceWithRawResponse:
|
|
106
|
+
"""
|
|
107
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
108
|
+
the raw response object instead of the parsed content.
|
|
109
|
+
|
|
110
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
111
|
+
"""
|
|
112
|
+
return AsyncAppsResourceWithRawResponse(self)
|
|
113
|
+
|
|
114
|
+
@cached_property
|
|
115
|
+
def with_streaming_response(self) -> AsyncAppsResourceWithStreamingResponse:
|
|
116
|
+
"""
|
|
117
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
118
|
+
|
|
119
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
120
|
+
"""
|
|
121
|
+
return AsyncAppsResourceWithStreamingResponse(self)
|
|
122
|
+
|
|
123
|
+
async def all(
|
|
124
|
+
self,
|
|
125
|
+
*,
|
|
126
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
127
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
128
|
+
extra_headers: Headers | None = None,
|
|
129
|
+
extra_query: Query | None = None,
|
|
130
|
+
extra_body: Body | None = None,
|
|
131
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
132
|
+
) -> AppAllResponse:
|
|
133
|
+
"""Get Apps Endpoint"""
|
|
134
|
+
return await self._get(
|
|
135
|
+
"/tail/apps",
|
|
136
|
+
options=make_request_options(
|
|
137
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
138
|
+
),
|
|
139
|
+
cast_to=AppAllResponse,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
async def linked(
|
|
143
|
+
self,
|
|
144
|
+
*,
|
|
145
|
+
raccoon_passcode: str,
|
|
146
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
147
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
148
|
+
extra_headers: Headers | None = None,
|
|
149
|
+
extra_query: Query | None = None,
|
|
150
|
+
extra_body: Body | None = None,
|
|
151
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
152
|
+
) -> AppLinkedResponse:
|
|
153
|
+
"""
|
|
154
|
+
Get Linked Apps Endpoint
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
extra_headers: Send extra headers
|
|
158
|
+
|
|
159
|
+
extra_query: Add additional query parameters to the request
|
|
160
|
+
|
|
161
|
+
extra_body: Add additional JSON properties to the request
|
|
162
|
+
|
|
163
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
164
|
+
"""
|
|
165
|
+
return await self._get(
|
|
166
|
+
"/tail/linked-apps",
|
|
167
|
+
options=make_request_options(
|
|
168
|
+
extra_headers=extra_headers,
|
|
169
|
+
extra_query=extra_query,
|
|
170
|
+
extra_body=extra_body,
|
|
171
|
+
timeout=timeout,
|
|
172
|
+
query=await async_maybe_transform(
|
|
173
|
+
{"raccoon_passcode": raccoon_passcode}, app_linked_params.AppLinkedParams
|
|
174
|
+
),
|
|
175
|
+
),
|
|
176
|
+
cast_to=AppLinkedResponse,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class AppsResourceWithRawResponse:
|
|
181
|
+
def __init__(self, apps: AppsResource) -> None:
|
|
182
|
+
self._apps = apps
|
|
183
|
+
|
|
184
|
+
self.all = to_raw_response_wrapper(
|
|
185
|
+
apps.all,
|
|
186
|
+
)
|
|
187
|
+
self.linked = to_raw_response_wrapper(
|
|
188
|
+
apps.linked,
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
class AsyncAppsResourceWithRawResponse:
|
|
193
|
+
def __init__(self, apps: AsyncAppsResource) -> None:
|
|
194
|
+
self._apps = apps
|
|
195
|
+
|
|
196
|
+
self.all = async_to_raw_response_wrapper(
|
|
197
|
+
apps.all,
|
|
198
|
+
)
|
|
199
|
+
self.linked = async_to_raw_response_wrapper(
|
|
200
|
+
apps.linked,
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
class AppsResourceWithStreamingResponse:
|
|
205
|
+
def __init__(self, apps: AppsResource) -> None:
|
|
206
|
+
self._apps = apps
|
|
207
|
+
|
|
208
|
+
self.all = to_streamed_response_wrapper(
|
|
209
|
+
apps.all,
|
|
210
|
+
)
|
|
211
|
+
self.linked = to_streamed_response_wrapper(
|
|
212
|
+
apps.linked,
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
class AsyncAppsResourceWithStreamingResponse:
|
|
217
|
+
def __init__(self, apps: AsyncAppsResource) -> None:
|
|
218
|
+
self._apps = apps
|
|
219
|
+
|
|
220
|
+
self.all = async_to_streamed_response_wrapper(
|
|
221
|
+
apps.all,
|
|
222
|
+
)
|
|
223
|
+
self.linked = async_to_streamed_response_wrapper(
|
|
224
|
+
apps.linked,
|
|
225
|
+
)
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from ..._utils import (
|
|
9
|
+
maybe_transform,
|
|
10
|
+
async_maybe_transform,
|
|
11
|
+
)
|
|
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 ...types.tail import auth_status_params
|
|
21
|
+
from ..._base_client import make_request_options
|
|
22
|
+
from ...types.tail.auth_status_response import AuthStatusResponse
|
|
23
|
+
|
|
24
|
+
__all__ = ["AuthResource", "AsyncAuthResource"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class AuthResource(SyncAPIResource):
|
|
28
|
+
@cached_property
|
|
29
|
+
def with_raw_response(self) -> AuthResourceWithRawResponse:
|
|
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/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
35
|
+
"""
|
|
36
|
+
return AuthResourceWithRawResponse(self)
|
|
37
|
+
|
|
38
|
+
@cached_property
|
|
39
|
+
def with_streaming_response(self) -> AuthResourceWithStreamingResponse:
|
|
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/raccoonaihq/raccoonai-python#with_streaming_response
|
|
44
|
+
"""
|
|
45
|
+
return AuthResourceWithStreamingResponse(self)
|
|
46
|
+
|
|
47
|
+
def status(
|
|
48
|
+
self,
|
|
49
|
+
*,
|
|
50
|
+
app_name: str,
|
|
51
|
+
raccoon_passcode: str,
|
|
52
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
53
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
54
|
+
extra_headers: Headers | None = None,
|
|
55
|
+
extra_query: Query | None = None,
|
|
56
|
+
extra_body: Body | None = None,
|
|
57
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
58
|
+
) -> AuthStatusResponse:
|
|
59
|
+
"""
|
|
60
|
+
Get Auth Status Endpoint
|
|
61
|
+
|
|
62
|
+
Args:
|
|
63
|
+
extra_headers: Send extra headers
|
|
64
|
+
|
|
65
|
+
extra_query: Add additional query parameters to the request
|
|
66
|
+
|
|
67
|
+
extra_body: Add additional JSON properties to the request
|
|
68
|
+
|
|
69
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
70
|
+
"""
|
|
71
|
+
return self._get(
|
|
72
|
+
"/tail/app/auth-status",
|
|
73
|
+
options=make_request_options(
|
|
74
|
+
extra_headers=extra_headers,
|
|
75
|
+
extra_query=extra_query,
|
|
76
|
+
extra_body=extra_body,
|
|
77
|
+
timeout=timeout,
|
|
78
|
+
query=maybe_transform(
|
|
79
|
+
{
|
|
80
|
+
"app_name": app_name,
|
|
81
|
+
"raccoon_passcode": raccoon_passcode,
|
|
82
|
+
},
|
|
83
|
+
auth_status_params.AuthStatusParams,
|
|
84
|
+
),
|
|
85
|
+
),
|
|
86
|
+
cast_to=AuthStatusResponse,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class AsyncAuthResource(AsyncAPIResource):
|
|
91
|
+
@cached_property
|
|
92
|
+
def with_raw_response(self) -> AsyncAuthResourceWithRawResponse:
|
|
93
|
+
"""
|
|
94
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
95
|
+
the raw response object instead of the parsed content.
|
|
96
|
+
|
|
97
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
98
|
+
"""
|
|
99
|
+
return AsyncAuthResourceWithRawResponse(self)
|
|
100
|
+
|
|
101
|
+
@cached_property
|
|
102
|
+
def with_streaming_response(self) -> AsyncAuthResourceWithStreamingResponse:
|
|
103
|
+
"""
|
|
104
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
105
|
+
|
|
106
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
107
|
+
"""
|
|
108
|
+
return AsyncAuthResourceWithStreamingResponse(self)
|
|
109
|
+
|
|
110
|
+
async def status(
|
|
111
|
+
self,
|
|
112
|
+
*,
|
|
113
|
+
app_name: str,
|
|
114
|
+
raccoon_passcode: str,
|
|
115
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
116
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
117
|
+
extra_headers: Headers | None = None,
|
|
118
|
+
extra_query: Query | None = None,
|
|
119
|
+
extra_body: Body | None = None,
|
|
120
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
121
|
+
) -> AuthStatusResponse:
|
|
122
|
+
"""
|
|
123
|
+
Get Auth Status Endpoint
|
|
124
|
+
|
|
125
|
+
Args:
|
|
126
|
+
extra_headers: Send extra headers
|
|
127
|
+
|
|
128
|
+
extra_query: Add additional query parameters to the request
|
|
129
|
+
|
|
130
|
+
extra_body: Add additional JSON properties to the request
|
|
131
|
+
|
|
132
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
133
|
+
"""
|
|
134
|
+
return await self._get(
|
|
135
|
+
"/tail/app/auth-status",
|
|
136
|
+
options=make_request_options(
|
|
137
|
+
extra_headers=extra_headers,
|
|
138
|
+
extra_query=extra_query,
|
|
139
|
+
extra_body=extra_body,
|
|
140
|
+
timeout=timeout,
|
|
141
|
+
query=await async_maybe_transform(
|
|
142
|
+
{
|
|
143
|
+
"app_name": app_name,
|
|
144
|
+
"raccoon_passcode": raccoon_passcode,
|
|
145
|
+
},
|
|
146
|
+
auth_status_params.AuthStatusParams,
|
|
147
|
+
),
|
|
148
|
+
),
|
|
149
|
+
cast_to=AuthStatusResponse,
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
class AuthResourceWithRawResponse:
|
|
154
|
+
def __init__(self, auth: AuthResource) -> None:
|
|
155
|
+
self._auth = auth
|
|
156
|
+
|
|
157
|
+
self.status = to_raw_response_wrapper(
|
|
158
|
+
auth.status,
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class AsyncAuthResourceWithRawResponse:
|
|
163
|
+
def __init__(self, auth: AsyncAuthResource) -> None:
|
|
164
|
+
self._auth = auth
|
|
165
|
+
|
|
166
|
+
self.status = async_to_raw_response_wrapper(
|
|
167
|
+
auth.status,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
class AuthResourceWithStreamingResponse:
|
|
172
|
+
def __init__(self, auth: AuthResource) -> None:
|
|
173
|
+
self._auth = auth
|
|
174
|
+
|
|
175
|
+
self.status = to_streamed_response_wrapper(
|
|
176
|
+
auth.status,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class AsyncAuthResourceWithStreamingResponse:
|
|
181
|
+
def __init__(self, auth: AsyncAuthResource) -> None:
|
|
182
|
+
self._auth = auth
|
|
183
|
+
|
|
184
|
+
self.status = async_to_streamed_response_wrapper(
|
|
185
|
+
auth.status,
|
|
186
|
+
)
|
|
@@ -0,0 +1,273 @@
|
|
|
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 Optional
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from .apps import (
|
|
11
|
+
AppsResource,
|
|
12
|
+
AsyncAppsResource,
|
|
13
|
+
AppsResourceWithRawResponse,
|
|
14
|
+
AsyncAppsResourceWithRawResponse,
|
|
15
|
+
AppsResourceWithStreamingResponse,
|
|
16
|
+
AsyncAppsResourceWithStreamingResponse,
|
|
17
|
+
)
|
|
18
|
+
from .auth import (
|
|
19
|
+
AuthResource,
|
|
20
|
+
AsyncAuthResource,
|
|
21
|
+
AuthResourceWithRawResponse,
|
|
22
|
+
AsyncAuthResourceWithRawResponse,
|
|
23
|
+
AuthResourceWithStreamingResponse,
|
|
24
|
+
AsyncAuthResourceWithStreamingResponse,
|
|
25
|
+
)
|
|
26
|
+
from ...types import tail_users_params
|
|
27
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
28
|
+
from ..._utils import (
|
|
29
|
+
maybe_transform,
|
|
30
|
+
async_maybe_transform,
|
|
31
|
+
)
|
|
32
|
+
from ..._compat import cached_property
|
|
33
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
34
|
+
from ..._response import (
|
|
35
|
+
to_raw_response_wrapper,
|
|
36
|
+
to_streamed_response_wrapper,
|
|
37
|
+
async_to_raw_response_wrapper,
|
|
38
|
+
async_to_streamed_response_wrapper,
|
|
39
|
+
)
|
|
40
|
+
from ..._base_client import make_request_options
|
|
41
|
+
from ...types.tail_users_response import TailUsersResponse
|
|
42
|
+
|
|
43
|
+
__all__ = ["TailResource", "AsyncTailResource"]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class TailResource(SyncAPIResource):
|
|
47
|
+
@cached_property
|
|
48
|
+
def apps(self) -> AppsResource:
|
|
49
|
+
return AppsResource(self._client)
|
|
50
|
+
|
|
51
|
+
@cached_property
|
|
52
|
+
def auth(self) -> AuthResource:
|
|
53
|
+
return AuthResource(self._client)
|
|
54
|
+
|
|
55
|
+
@cached_property
|
|
56
|
+
def with_raw_response(self) -> TailResourceWithRawResponse:
|
|
57
|
+
"""
|
|
58
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
59
|
+
the raw response object instead of the parsed content.
|
|
60
|
+
|
|
61
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
62
|
+
"""
|
|
63
|
+
return TailResourceWithRawResponse(self)
|
|
64
|
+
|
|
65
|
+
@cached_property
|
|
66
|
+
def with_streaming_response(self) -> TailResourceWithStreamingResponse:
|
|
67
|
+
"""
|
|
68
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
69
|
+
|
|
70
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
71
|
+
"""
|
|
72
|
+
return TailResourceWithStreamingResponse(self)
|
|
73
|
+
|
|
74
|
+
def users(
|
|
75
|
+
self,
|
|
76
|
+
*,
|
|
77
|
+
email_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
78
|
+
limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
79
|
+
page: Optional[int] | NotGiven = NOT_GIVEN,
|
|
80
|
+
raccoon_passcode: Optional[str] | NotGiven = NOT_GIVEN,
|
|
81
|
+
search_query: Optional[str] | NotGiven = NOT_GIVEN,
|
|
82
|
+
sort_by: Optional[Literal["createdAt", "name", "email", "raccoonPasscode"]] | NotGiven = NOT_GIVEN,
|
|
83
|
+
sort_order: Optional[Literal["ascend", "descend"]] | NotGiven = NOT_GIVEN,
|
|
84
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
85
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
86
|
+
extra_headers: Headers | None = None,
|
|
87
|
+
extra_query: Query | None = None,
|
|
88
|
+
extra_body: Body | None = None,
|
|
89
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
90
|
+
) -> TailUsersResponse:
|
|
91
|
+
"""
|
|
92
|
+
Get Users Endpoint
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
extra_headers: Send extra headers
|
|
96
|
+
|
|
97
|
+
extra_query: Add additional query parameters to the request
|
|
98
|
+
|
|
99
|
+
extra_body: Add additional JSON properties to the request
|
|
100
|
+
|
|
101
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
102
|
+
"""
|
|
103
|
+
return self._get(
|
|
104
|
+
"/tail/users",
|
|
105
|
+
options=make_request_options(
|
|
106
|
+
extra_headers=extra_headers,
|
|
107
|
+
extra_query=extra_query,
|
|
108
|
+
extra_body=extra_body,
|
|
109
|
+
timeout=timeout,
|
|
110
|
+
query=maybe_transform(
|
|
111
|
+
{
|
|
112
|
+
"email_id": email_id,
|
|
113
|
+
"limit": limit,
|
|
114
|
+
"page": page,
|
|
115
|
+
"raccoon_passcode": raccoon_passcode,
|
|
116
|
+
"search_query": search_query,
|
|
117
|
+
"sort_by": sort_by,
|
|
118
|
+
"sort_order": sort_order,
|
|
119
|
+
},
|
|
120
|
+
tail_users_params.TailUsersParams,
|
|
121
|
+
),
|
|
122
|
+
),
|
|
123
|
+
cast_to=TailUsersResponse,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class AsyncTailResource(AsyncAPIResource):
|
|
128
|
+
@cached_property
|
|
129
|
+
def apps(self) -> AsyncAppsResource:
|
|
130
|
+
return AsyncAppsResource(self._client)
|
|
131
|
+
|
|
132
|
+
@cached_property
|
|
133
|
+
def auth(self) -> AsyncAuthResource:
|
|
134
|
+
return AsyncAuthResource(self._client)
|
|
135
|
+
|
|
136
|
+
@cached_property
|
|
137
|
+
def with_raw_response(self) -> AsyncTailResourceWithRawResponse:
|
|
138
|
+
"""
|
|
139
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
140
|
+
the raw response object instead of the parsed content.
|
|
141
|
+
|
|
142
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
143
|
+
"""
|
|
144
|
+
return AsyncTailResourceWithRawResponse(self)
|
|
145
|
+
|
|
146
|
+
@cached_property
|
|
147
|
+
def with_streaming_response(self) -> AsyncTailResourceWithStreamingResponse:
|
|
148
|
+
"""
|
|
149
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
150
|
+
|
|
151
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
152
|
+
"""
|
|
153
|
+
return AsyncTailResourceWithStreamingResponse(self)
|
|
154
|
+
|
|
155
|
+
async def users(
|
|
156
|
+
self,
|
|
157
|
+
*,
|
|
158
|
+
email_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
159
|
+
limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
160
|
+
page: Optional[int] | NotGiven = NOT_GIVEN,
|
|
161
|
+
raccoon_passcode: Optional[str] | NotGiven = NOT_GIVEN,
|
|
162
|
+
search_query: Optional[str] | NotGiven = NOT_GIVEN,
|
|
163
|
+
sort_by: Optional[Literal["createdAt", "name", "email", "raccoonPasscode"]] | NotGiven = NOT_GIVEN,
|
|
164
|
+
sort_order: Optional[Literal["ascend", "descend"]] | NotGiven = NOT_GIVEN,
|
|
165
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
166
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
167
|
+
extra_headers: Headers | None = None,
|
|
168
|
+
extra_query: Query | None = None,
|
|
169
|
+
extra_body: Body | None = None,
|
|
170
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
171
|
+
) -> TailUsersResponse:
|
|
172
|
+
"""
|
|
173
|
+
Get Users Endpoint
|
|
174
|
+
|
|
175
|
+
Args:
|
|
176
|
+
extra_headers: Send extra headers
|
|
177
|
+
|
|
178
|
+
extra_query: Add additional query parameters to the request
|
|
179
|
+
|
|
180
|
+
extra_body: Add additional JSON properties to the request
|
|
181
|
+
|
|
182
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
183
|
+
"""
|
|
184
|
+
return await self._get(
|
|
185
|
+
"/tail/users",
|
|
186
|
+
options=make_request_options(
|
|
187
|
+
extra_headers=extra_headers,
|
|
188
|
+
extra_query=extra_query,
|
|
189
|
+
extra_body=extra_body,
|
|
190
|
+
timeout=timeout,
|
|
191
|
+
query=await async_maybe_transform(
|
|
192
|
+
{
|
|
193
|
+
"email_id": email_id,
|
|
194
|
+
"limit": limit,
|
|
195
|
+
"page": page,
|
|
196
|
+
"raccoon_passcode": raccoon_passcode,
|
|
197
|
+
"search_query": search_query,
|
|
198
|
+
"sort_by": sort_by,
|
|
199
|
+
"sort_order": sort_order,
|
|
200
|
+
},
|
|
201
|
+
tail_users_params.TailUsersParams,
|
|
202
|
+
),
|
|
203
|
+
),
|
|
204
|
+
cast_to=TailUsersResponse,
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
class TailResourceWithRawResponse:
|
|
209
|
+
def __init__(self, tail: TailResource) -> None:
|
|
210
|
+
self._tail = tail
|
|
211
|
+
|
|
212
|
+
self.users = to_raw_response_wrapper(
|
|
213
|
+
tail.users,
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
@cached_property
|
|
217
|
+
def apps(self) -> AppsResourceWithRawResponse:
|
|
218
|
+
return AppsResourceWithRawResponse(self._tail.apps)
|
|
219
|
+
|
|
220
|
+
@cached_property
|
|
221
|
+
def auth(self) -> AuthResourceWithRawResponse:
|
|
222
|
+
return AuthResourceWithRawResponse(self._tail.auth)
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
class AsyncTailResourceWithRawResponse:
|
|
226
|
+
def __init__(self, tail: AsyncTailResource) -> None:
|
|
227
|
+
self._tail = tail
|
|
228
|
+
|
|
229
|
+
self.users = async_to_raw_response_wrapper(
|
|
230
|
+
tail.users,
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
@cached_property
|
|
234
|
+
def apps(self) -> AsyncAppsResourceWithRawResponse:
|
|
235
|
+
return AsyncAppsResourceWithRawResponse(self._tail.apps)
|
|
236
|
+
|
|
237
|
+
@cached_property
|
|
238
|
+
def auth(self) -> AsyncAuthResourceWithRawResponse:
|
|
239
|
+
return AsyncAuthResourceWithRawResponse(self._tail.auth)
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
class TailResourceWithStreamingResponse:
|
|
243
|
+
def __init__(self, tail: TailResource) -> None:
|
|
244
|
+
self._tail = tail
|
|
245
|
+
|
|
246
|
+
self.users = to_streamed_response_wrapper(
|
|
247
|
+
tail.users,
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
@cached_property
|
|
251
|
+
def apps(self) -> AppsResourceWithStreamingResponse:
|
|
252
|
+
return AppsResourceWithStreamingResponse(self._tail.apps)
|
|
253
|
+
|
|
254
|
+
@cached_property
|
|
255
|
+
def auth(self) -> AuthResourceWithStreamingResponse:
|
|
256
|
+
return AuthResourceWithStreamingResponse(self._tail.auth)
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
class AsyncTailResourceWithStreamingResponse:
|
|
260
|
+
def __init__(self, tail: AsyncTailResource) -> None:
|
|
261
|
+
self._tail = tail
|
|
262
|
+
|
|
263
|
+
self.users = async_to_streamed_response_wrapper(
|
|
264
|
+
tail.users,
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
@cached_property
|
|
268
|
+
def apps(self) -> AsyncAppsResourceWithStreamingResponse:
|
|
269
|
+
return AsyncAppsResourceWithStreamingResponse(self._tail.apps)
|
|
270
|
+
|
|
271
|
+
@cached_property
|
|
272
|
+
def auth(self) -> AsyncAuthResourceWithStreamingResponse:
|
|
273
|
+
return AsyncAuthResourceWithStreamingResponse(self._tail.auth)
|