opencode-python-sdk 0.2.0__py3-none-any.whl → 0.2.3__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.
Files changed (45) hide show
  1. opencode/__init__.py +14 -0
  2. opencode/_aiohttp.py +44 -0
  3. opencode/_base_client.py +237 -11
  4. opencode/_client.py +115 -3
  5. opencode/_logs.py +29 -0
  6. opencode/_pagination.py +14 -0
  7. opencode/_response.py +316 -0
  8. opencode/_service.py +1018 -0
  9. opencode/resources/agent.py +63 -0
  10. opencode/resources/command.py +59 -0
  11. opencode/resources/config.py +93 -20
  12. opencode/resources/credential.py +149 -56
  13. opencode/resources/debug.py +156 -20
  14. opencode/resources/event.py +59 -0
  15. opencode/resources/experimental.py +210 -36
  16. opencode/resources/file.py +71 -0
  17. opencode/resources/form.py +59 -0
  18. opencode/resources/generate.py +59 -0
  19. opencode/resources/integration.py +538 -128
  20. opencode/resources/location.py +87 -18
  21. opencode/resources/mcp.py +252 -82
  22. opencode/resources/message.py +59 -0
  23. opencode/resources/migration.py +126 -0
  24. opencode/resources/model.py +63 -0
  25. opencode/resources/permission.py +272 -38
  26. opencode/resources/plugin.py +95 -22
  27. opencode/resources/project.py +63 -0
  28. opencode/resources/provider.py +63 -0
  29. opencode/resources/pty.py +172 -20
  30. opencode/resources/reference.py +59 -0
  31. opencode/resources/rpc.py +59 -0
  32. opencode/resources/server.py +67 -0
  33. opencode/resources/session.py +1159 -405
  34. opencode/resources/shell.py +101 -20
  35. opencode/resources/skill.py +59 -0
  36. opencode/resources/vcs.py +172 -20
  37. opencode/resources/voice.py +59 -0
  38. opencode/resources/websearch.py +63 -0
  39. opencode/resources/worktree.py +123 -40
  40. opencode/service.py +50 -0
  41. {opencode_python_sdk-0.2.0.dist-info → opencode_python_sdk-0.2.3.dist-info}/METADATA +111 -2
  42. opencode_python_sdk-0.2.3.dist-info/RECORD +67 -0
  43. opencode_python_sdk-0.2.0.dist-info/RECORD +0 -62
  44. {opencode_python_sdk-0.2.0.dist-info → opencode_python_sdk-0.2.3.dist-info}/WHEEL +0 -0
  45. {opencode_python_sdk-0.2.0.dist-info → opencode_python_sdk-0.2.3.dist-info}/licenses/LICENSE +0 -0
@@ -5,11 +5,18 @@
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
+ from functools import cached_property
8
9
  from typing import TYPE_CHECKING, cast
9
10
 
10
11
  from .._base_client import RequestOptions
11
12
  from .._qs import encode_path_segment
12
13
  from .._resource import AsyncAPIResource, SyncAPIResource
14
+ from .._response import (
15
+ async_to_raw_response_wrapper,
16
+ async_to_streamed_response_wrapper,
17
+ to_raw_response_wrapper,
18
+ to_streamed_response_wrapper,
19
+ )
13
20
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
14
21
 
15
22
  if TYPE_CHECKING:
@@ -26,6 +33,16 @@ __all__ = ["AgentResource", "AsyncAgentResource"]
26
33
  class AgentResource(SyncAPIResource):
27
34
  """Operations under ``client.agent`` (OpenCode ``agent``)."""
28
35
 
36
+ @cached_property
37
+ def with_raw_response(self) -> AgentResourceWithRawResponse:
38
+ """Same methods, returning the raw HTTP response; call ``.parse()`` on it for the usual value."""
39
+ return AgentResourceWithRawResponse(self)
40
+
41
+ @cached_property
42
+ def with_streaming_response(self) -> AgentResourceWithStreamingResponse:
43
+ """Same methods, returning a context manager over the HTTP response without reading the body."""
44
+ return AgentResourceWithStreamingResponse(self)
45
+
29
46
  def list(
30
47
  self,
31
48
  *,
@@ -101,9 +118,37 @@ class AgentResource(SyncAPIResource):
101
118
  )
102
119
 
103
120
 
121
+ class AgentResourceWithRawResponse:
122
+ """``client.agent.with_raw_response``."""
123
+
124
+ def __init__(self, resource: AgentResource) -> None:
125
+ self._resource = resource
126
+ self.list = to_raw_response_wrapper(resource.list)
127
+ self.get = to_raw_response_wrapper(resource.get)
128
+
129
+
130
+ class AgentResourceWithStreamingResponse:
131
+ """``client.agent.with_streaming_response``."""
132
+
133
+ def __init__(self, resource: AgentResource) -> None:
134
+ self._resource = resource
135
+ self.list = to_streamed_response_wrapper(resource.list)
136
+ self.get = to_streamed_response_wrapper(resource.get)
137
+
138
+
104
139
  class AsyncAgentResource(AsyncAPIResource):
105
140
  """Operations under ``client.agent`` (OpenCode ``agent``)."""
106
141
 
142
+ @cached_property
143
+ def with_raw_response(self) -> AsyncAgentResourceWithRawResponse:
144
+ """Same methods, returning the raw HTTP response; call ``.parse()`` on it for the usual value."""
145
+ return AsyncAgentResourceWithRawResponse(self)
146
+
147
+ @cached_property
148
+ def with_streaming_response(self) -> AsyncAgentResourceWithStreamingResponse:
149
+ """Same methods, returning a context manager over the HTTP response without reading the body."""
150
+ return AsyncAgentResourceWithStreamingResponse(self)
151
+
107
152
  async def list(
108
153
  self,
109
154
  *,
@@ -177,3 +222,21 @@ class AsyncAgentResource(AsyncAPIResource):
177
222
  response_type="AgentGetResponse",
178
223
  ),
179
224
  )
225
+
226
+
227
+ class AsyncAgentResourceWithRawResponse:
228
+ """``client.agent.with_raw_response``."""
229
+
230
+ def __init__(self, resource: AsyncAgentResource) -> None:
231
+ self._resource = resource
232
+ self.list = async_to_raw_response_wrapper(resource.list)
233
+ self.get = async_to_raw_response_wrapper(resource.get)
234
+
235
+
236
+ class AsyncAgentResourceWithStreamingResponse:
237
+ """``client.agent.with_streaming_response``."""
238
+
239
+ def __init__(self, resource: AsyncAgentResource) -> None:
240
+ self._resource = resource
241
+ self.list = async_to_streamed_response_wrapper(resource.list)
242
+ self.get = async_to_streamed_response_wrapper(resource.get)
@@ -5,10 +5,17 @@
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
+ from functools import cached_property
8
9
  from typing import TYPE_CHECKING, cast
9
10
 
10
11
  from .._base_client import RequestOptions
11
12
  from .._resource import AsyncAPIResource, SyncAPIResource
13
+ from .._response import (
14
+ async_to_raw_response_wrapper,
15
+ async_to_streamed_response_wrapper,
16
+ to_raw_response_wrapper,
17
+ to_streamed_response_wrapper,
18
+ )
12
19
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
13
20
 
14
21
  if TYPE_CHECKING:
@@ -23,6 +30,16 @@ __all__ = ["CommandResource", "AsyncCommandResource"]
23
30
  class CommandResource(SyncAPIResource):
24
31
  """Operations under ``client.command`` (OpenCode ``command``)."""
25
32
 
33
+ @cached_property
34
+ def with_raw_response(self) -> CommandResourceWithRawResponse:
35
+ """Same methods, returning the raw HTTP response; call ``.parse()`` on it for the usual value."""
36
+ return CommandResourceWithRawResponse(self)
37
+
38
+ @cached_property
39
+ def with_streaming_response(self) -> CommandResourceWithStreamingResponse:
40
+ """Same methods, returning a context manager over the HTTP response without reading the body."""
41
+ return CommandResourceWithStreamingResponse(self)
42
+
26
43
  def list(
27
44
  self,
28
45
  *,
@@ -60,9 +77,35 @@ class CommandResource(SyncAPIResource):
60
77
  )
61
78
 
62
79
 
80
+ class CommandResourceWithRawResponse:
81
+ """``client.command.with_raw_response``."""
82
+
83
+ def __init__(self, resource: CommandResource) -> None:
84
+ self._resource = resource
85
+ self.list = to_raw_response_wrapper(resource.list)
86
+
87
+
88
+ class CommandResourceWithStreamingResponse:
89
+ """``client.command.with_streaming_response``."""
90
+
91
+ def __init__(self, resource: CommandResource) -> None:
92
+ self._resource = resource
93
+ self.list = to_streamed_response_wrapper(resource.list)
94
+
95
+
63
96
  class AsyncCommandResource(AsyncAPIResource):
64
97
  """Operations under ``client.command`` (OpenCode ``command``)."""
65
98
 
99
+ @cached_property
100
+ def with_raw_response(self) -> AsyncCommandResourceWithRawResponse:
101
+ """Same methods, returning the raw HTTP response; call ``.parse()`` on it for the usual value."""
102
+ return AsyncCommandResourceWithRawResponse(self)
103
+
104
+ @cached_property
105
+ def with_streaming_response(self) -> AsyncCommandResourceWithStreamingResponse:
106
+ """Same methods, returning a context manager over the HTTP response without reading the body."""
107
+ return AsyncCommandResourceWithStreamingResponse(self)
108
+
66
109
  async def list(
67
110
  self,
68
111
  *,
@@ -98,3 +141,19 @@ class AsyncCommandResource(AsyncAPIResource):
98
141
  response_type="CommandListResponse",
99
142
  ),
100
143
  )
144
+
145
+
146
+ class AsyncCommandResourceWithRawResponse:
147
+ """``client.command.with_raw_response``."""
148
+
149
+ def __init__(self, resource: AsyncCommandResource) -> None:
150
+ self._resource = resource
151
+ self.list = async_to_raw_response_wrapper(resource.list)
152
+
153
+
154
+ class AsyncCommandResourceWithStreamingResponse:
155
+ """``client.command.with_streaming_response``."""
156
+
157
+ def __init__(self, resource: AsyncCommandResource) -> None:
158
+ self._resource = resource
159
+ self.list = async_to_streamed_response_wrapper(resource.list)
@@ -6,10 +6,17 @@
6
6
  from __future__ import annotations
7
7
 
8
8
  import builtins
9
+ from functools import cached_property
9
10
  from typing import TYPE_CHECKING, cast
10
11
 
11
12
  from .._base_client import RequestOptions
12
13
  from .._resource import AsyncAPIResource, SyncAPIResource
14
+ from .._response import (
15
+ async_to_raw_response_wrapper,
16
+ async_to_streamed_response_wrapper,
17
+ to_raw_response_wrapper,
18
+ to_streamed_response_wrapper,
19
+ )
13
20
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
14
21
 
15
22
  if TYPE_CHECKING:
@@ -25,6 +32,16 @@ __all__ = ["ConfigResource", "AsyncConfigResource"]
25
32
  class ConfigResource(SyncAPIResource):
26
33
  """Operations under ``client.config`` (OpenCode ``config``)."""
27
34
 
35
+ @cached_property
36
+ def with_raw_response(self) -> ConfigResourceWithRawResponse:
37
+ """Same methods, returning the raw HTTP response; call ``.parse()`` on it for the usual value."""
38
+ return ConfigResourceWithRawResponse(self)
39
+
40
+ @cached_property
41
+ def with_streaming_response(self) -> ConfigResourceWithStreamingResponse:
42
+ """Same methods, returning a context manager over the HTTP response without reading the body."""
43
+ return ConfigResourceWithStreamingResponse(self)
44
+
28
45
  def get(
29
46
  self,
30
47
  *,
@@ -117,23 +134,56 @@ class ConfigResource(SyncAPIResource):
117
134
 
118
135
  ``PATCH /api/experimental/config``
119
136
  """
120
- self._client.request(
121
- RequestOptions(
122
- method="PATCH",
123
- path="/api/experimental/config",
124
- body={"shell": shell},
125
- extra_headers=extra_headers,
126
- extra_query=extra_query,
127
- extra_body=extra_body,
128
- timeout=timeout,
137
+ return cast(
138
+ "None",
139
+ self._client.request(
140
+ RequestOptions(
141
+ method="PATCH",
142
+ path="/api/experimental/config",
143
+ body={"shell": shell},
144
+ extra_headers=extra_headers,
145
+ extra_query=extra_query,
146
+ extra_body=extra_body,
147
+ timeout=timeout,
148
+ ),
149
+ kind="void",
129
150
  ),
130
- kind="void",
131
151
  )
132
152
 
133
153
 
154
+ class ConfigResourceWithRawResponse:
155
+ """``client.config.with_raw_response``."""
156
+
157
+ def __init__(self, resource: ConfigResource) -> None:
158
+ self._resource = resource
159
+ self.get = to_raw_response_wrapper(resource.get)
160
+ self.shells = to_raw_response_wrapper(resource.shells)
161
+ self.update = to_raw_response_wrapper(resource.update)
162
+
163
+
164
+ class ConfigResourceWithStreamingResponse:
165
+ """``client.config.with_streaming_response``."""
166
+
167
+ def __init__(self, resource: ConfigResource) -> None:
168
+ self._resource = resource
169
+ self.get = to_streamed_response_wrapper(resource.get)
170
+ self.shells = to_streamed_response_wrapper(resource.shells)
171
+ self.update = to_streamed_response_wrapper(resource.update)
172
+
173
+
134
174
  class AsyncConfigResource(AsyncAPIResource):
135
175
  """Operations under ``client.config`` (OpenCode ``config``)."""
136
176
 
177
+ @cached_property
178
+ def with_raw_response(self) -> AsyncConfigResourceWithRawResponse:
179
+ """Same methods, returning the raw HTTP response; call ``.parse()`` on it for the usual value."""
180
+ return AsyncConfigResourceWithRawResponse(self)
181
+
182
+ @cached_property
183
+ def with_streaming_response(self) -> AsyncConfigResourceWithStreamingResponse:
184
+ """Same methods, returning a context manager over the HTTP response without reading the body."""
185
+ return AsyncConfigResourceWithStreamingResponse(self)
186
+
137
187
  async def get(
138
188
  self,
139
189
  *,
@@ -226,15 +276,38 @@ class AsyncConfigResource(AsyncAPIResource):
226
276
 
227
277
  ``PATCH /api/experimental/config``
228
278
  """
229
- await self._client.request(
230
- RequestOptions(
231
- method="PATCH",
232
- path="/api/experimental/config",
233
- body={"shell": shell},
234
- extra_headers=extra_headers,
235
- extra_query=extra_query,
236
- extra_body=extra_body,
237
- timeout=timeout,
279
+ return cast(
280
+ "None",
281
+ await self._client.request(
282
+ RequestOptions(
283
+ method="PATCH",
284
+ path="/api/experimental/config",
285
+ body={"shell": shell},
286
+ extra_headers=extra_headers,
287
+ extra_query=extra_query,
288
+ extra_body=extra_body,
289
+ timeout=timeout,
290
+ ),
291
+ kind="void",
238
292
  ),
239
- kind="void",
240
293
  )
294
+
295
+
296
+ class AsyncConfigResourceWithRawResponse:
297
+ """``client.config.with_raw_response``."""
298
+
299
+ def __init__(self, resource: AsyncConfigResource) -> None:
300
+ self._resource = resource
301
+ self.get = async_to_raw_response_wrapper(resource.get)
302
+ self.shells = async_to_raw_response_wrapper(resource.shells)
303
+ self.update = async_to_raw_response_wrapper(resource.update)
304
+
305
+
306
+ class AsyncConfigResourceWithStreamingResponse:
307
+ """``client.config.with_streaming_response``."""
308
+
309
+ def __init__(self, resource: AsyncConfigResource) -> None:
310
+ self._resource = resource
311
+ self.get = async_to_streamed_response_wrapper(resource.get)
312
+ self.shells = async_to_streamed_response_wrapper(resource.shells)
313
+ self.update = async_to_streamed_response_wrapper(resource.update)
@@ -6,11 +6,18 @@
6
6
  from __future__ import annotations
7
7
 
8
8
  import builtins
9
+ from functools import cached_property
9
10
  from typing import TYPE_CHECKING, cast
10
11
 
11
12
  from .._base_client import RequestOptions
12
13
  from .._qs import encode_path_segment
13
14
  from .._resource import AsyncAPIResource, SyncAPIResource
15
+ from .._response import (
16
+ async_to_raw_response_wrapper,
17
+ async_to_streamed_response_wrapper,
18
+ to_raw_response_wrapper,
19
+ to_streamed_response_wrapper,
20
+ )
14
21
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
15
22
 
16
23
  if TYPE_CHECKING:
@@ -27,6 +34,16 @@ __all__ = ["CredentialResource", "AsyncCredentialResource"]
27
34
  class CredentialResource(SyncAPIResource):
28
35
  """Operations under ``client.credential`` (OpenCode ``credential``)."""
29
36
 
37
+ @cached_property
38
+ def with_raw_response(self) -> CredentialResourceWithRawResponse:
39
+ """Same methods, returning the raw HTTP response; call ``.parse()`` on it for the usual value."""
40
+ return CredentialResourceWithRawResponse(self)
41
+
42
+ @cached_property
43
+ def with_streaming_response(self) -> CredentialResourceWithStreamingResponse:
44
+ """Same methods, returning a context manager over the HTTP response without reading the body."""
45
+ return CredentialResourceWithStreamingResponse(self)
46
+
30
47
  def list(
31
48
  self,
32
49
  *,
@@ -128,17 +145,20 @@ class CredentialResource(SyncAPIResource):
128
145
 
129
146
  ``PATCH /api/credential/:credentialID``
130
147
  """
131
- self._client.request(
132
- RequestOptions(
133
- method="PATCH",
134
- path=f"/api/credential/{encode_path_segment(credential_id)}",
135
- body={"label": label},
136
- extra_headers=extra_headers,
137
- extra_query=extra_query,
138
- extra_body=extra_body,
139
- timeout=timeout,
148
+ return cast(
149
+ "None",
150
+ self._client.request(
151
+ RequestOptions(
152
+ method="PATCH",
153
+ path=f"/api/credential/{encode_path_segment(credential_id)}",
154
+ body={"label": label},
155
+ extra_headers=extra_headers,
156
+ extra_query=extra_query,
157
+ extra_body=extra_body,
158
+ timeout=timeout,
159
+ ),
160
+ kind="void",
140
161
  ),
141
- kind="void",
142
162
  )
143
163
 
144
164
  def activate(
@@ -160,16 +180,19 @@ class CredentialResource(SyncAPIResource):
160
180
 
161
181
  ``POST /api/credential/:credentialID/activate``
162
182
  """
163
- self._client.request(
164
- RequestOptions(
165
- method="POST",
166
- path=f"/api/credential/{encode_path_segment(credential_id)}/activate",
167
- extra_headers=extra_headers,
168
- extra_query=extra_query,
169
- extra_body=extra_body,
170
- timeout=timeout,
183
+ return cast(
184
+ "None",
185
+ self._client.request(
186
+ RequestOptions(
187
+ method="POST",
188
+ path=f"/api/credential/{encode_path_segment(credential_id)}/activate",
189
+ extra_headers=extra_headers,
190
+ extra_query=extra_query,
191
+ extra_body=extra_body,
192
+ timeout=timeout,
193
+ ),
194
+ kind="void",
171
195
  ),
172
- kind="void",
173
196
  )
174
197
 
175
198
  def remove(
@@ -191,22 +214,59 @@ class CredentialResource(SyncAPIResource):
191
214
 
192
215
  ``DELETE /api/credential/:credentialID``
193
216
  """
194
- self._client.request(
195
- RequestOptions(
196
- method="DELETE",
197
- path=f"/api/credential/{encode_path_segment(credential_id)}",
198
- extra_headers=extra_headers,
199
- extra_query=extra_query,
200
- extra_body=extra_body,
201
- timeout=timeout,
217
+ return cast(
218
+ "None",
219
+ self._client.request(
220
+ RequestOptions(
221
+ method="DELETE",
222
+ path=f"/api/credential/{encode_path_segment(credential_id)}",
223
+ extra_headers=extra_headers,
224
+ extra_query=extra_query,
225
+ extra_body=extra_body,
226
+ timeout=timeout,
227
+ ),
228
+ kind="void",
202
229
  ),
203
- kind="void",
204
230
  )
205
231
 
206
232
 
233
+ class CredentialResourceWithRawResponse:
234
+ """``client.credential.with_raw_response``."""
235
+
236
+ def __init__(self, resource: CredentialResource) -> None:
237
+ self._resource = resource
238
+ self.list = to_raw_response_wrapper(resource.list)
239
+ self.create = to_raw_response_wrapper(resource.create)
240
+ self.update = to_raw_response_wrapper(resource.update)
241
+ self.activate = to_raw_response_wrapper(resource.activate)
242
+ self.remove = to_raw_response_wrapper(resource.remove)
243
+
244
+
245
+ class CredentialResourceWithStreamingResponse:
246
+ """``client.credential.with_streaming_response``."""
247
+
248
+ def __init__(self, resource: CredentialResource) -> None:
249
+ self._resource = resource
250
+ self.list = to_streamed_response_wrapper(resource.list)
251
+ self.create = to_streamed_response_wrapper(resource.create)
252
+ self.update = to_streamed_response_wrapper(resource.update)
253
+ self.activate = to_streamed_response_wrapper(resource.activate)
254
+ self.remove = to_streamed_response_wrapper(resource.remove)
255
+
256
+
207
257
  class AsyncCredentialResource(AsyncAPIResource):
208
258
  """Operations under ``client.credential`` (OpenCode ``credential``)."""
209
259
 
260
+ @cached_property
261
+ def with_raw_response(self) -> AsyncCredentialResourceWithRawResponse:
262
+ """Same methods, returning the raw HTTP response; call ``.parse()`` on it for the usual value."""
263
+ return AsyncCredentialResourceWithRawResponse(self)
264
+
265
+ @cached_property
266
+ def with_streaming_response(self) -> AsyncCredentialResourceWithStreamingResponse:
267
+ """Same methods, returning a context manager over the HTTP response without reading the body."""
268
+ return AsyncCredentialResourceWithStreamingResponse(self)
269
+
210
270
  async def list(
211
271
  self,
212
272
  *,
@@ -308,17 +368,20 @@ class AsyncCredentialResource(AsyncAPIResource):
308
368
 
309
369
  ``PATCH /api/credential/:credentialID``
310
370
  """
311
- await self._client.request(
312
- RequestOptions(
313
- method="PATCH",
314
- path=f"/api/credential/{encode_path_segment(credential_id)}",
315
- body={"label": label},
316
- extra_headers=extra_headers,
317
- extra_query=extra_query,
318
- extra_body=extra_body,
319
- timeout=timeout,
371
+ return cast(
372
+ "None",
373
+ await self._client.request(
374
+ RequestOptions(
375
+ method="PATCH",
376
+ path=f"/api/credential/{encode_path_segment(credential_id)}",
377
+ body={"label": label},
378
+ extra_headers=extra_headers,
379
+ extra_query=extra_query,
380
+ extra_body=extra_body,
381
+ timeout=timeout,
382
+ ),
383
+ kind="void",
320
384
  ),
321
- kind="void",
322
385
  )
323
386
 
324
387
  async def activate(
@@ -340,16 +403,19 @@ class AsyncCredentialResource(AsyncAPIResource):
340
403
 
341
404
  ``POST /api/credential/:credentialID/activate``
342
405
  """
343
- await self._client.request(
344
- RequestOptions(
345
- method="POST",
346
- path=f"/api/credential/{encode_path_segment(credential_id)}/activate",
347
- extra_headers=extra_headers,
348
- extra_query=extra_query,
349
- extra_body=extra_body,
350
- timeout=timeout,
406
+ return cast(
407
+ "None",
408
+ await self._client.request(
409
+ RequestOptions(
410
+ method="POST",
411
+ path=f"/api/credential/{encode_path_segment(credential_id)}/activate",
412
+ extra_headers=extra_headers,
413
+ extra_query=extra_query,
414
+ extra_body=extra_body,
415
+ timeout=timeout,
416
+ ),
417
+ kind="void",
351
418
  ),
352
- kind="void",
353
419
  )
354
420
 
355
421
  async def remove(
@@ -371,14 +437,41 @@ class AsyncCredentialResource(AsyncAPIResource):
371
437
 
372
438
  ``DELETE /api/credential/:credentialID``
373
439
  """
374
- await self._client.request(
375
- RequestOptions(
376
- method="DELETE",
377
- path=f"/api/credential/{encode_path_segment(credential_id)}",
378
- extra_headers=extra_headers,
379
- extra_query=extra_query,
380
- extra_body=extra_body,
381
- timeout=timeout,
440
+ return cast(
441
+ "None",
442
+ await self._client.request(
443
+ RequestOptions(
444
+ method="DELETE",
445
+ path=f"/api/credential/{encode_path_segment(credential_id)}",
446
+ extra_headers=extra_headers,
447
+ extra_query=extra_query,
448
+ extra_body=extra_body,
449
+ timeout=timeout,
450
+ ),
451
+ kind="void",
382
452
  ),
383
- kind="void",
384
453
  )
454
+
455
+
456
+ class AsyncCredentialResourceWithRawResponse:
457
+ """``client.credential.with_raw_response``."""
458
+
459
+ def __init__(self, resource: AsyncCredentialResource) -> None:
460
+ self._resource = resource
461
+ self.list = async_to_raw_response_wrapper(resource.list)
462
+ self.create = async_to_raw_response_wrapper(resource.create)
463
+ self.update = async_to_raw_response_wrapper(resource.update)
464
+ self.activate = async_to_raw_response_wrapper(resource.activate)
465
+ self.remove = async_to_raw_response_wrapper(resource.remove)
466
+
467
+
468
+ class AsyncCredentialResourceWithStreamingResponse:
469
+ """``client.credential.with_streaming_response``."""
470
+
471
+ def __init__(self, resource: AsyncCredentialResource) -> None:
472
+ self._resource = resource
473
+ self.list = async_to_streamed_response_wrapper(resource.list)
474
+ self.create = async_to_streamed_response_wrapper(resource.create)
475
+ self.update = async_to_streamed_response_wrapper(resource.update)
476
+ self.activate = async_to_streamed_response_wrapper(resource.activate)
477
+ self.remove = async_to_streamed_response_wrapper(resource.remove)