opencode-python-sdk 0.1.3__py3-none-any.whl → 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. opencode/__init__.py +14 -1
  2. opencode/_base_client.py +24 -3
  3. opencode/_client.py +67 -2
  4. opencode/_events.py +5 -2
  5. opencode/_rpc.py +9 -2
  6. opencode/lib/__init__.py +5 -0
  7. opencode/lib/_ready.py +91 -0
  8. opencode/lib/_session.py +231 -0
  9. opencode/resources/agent.py +13 -11
  10. opencode/resources/command.py +9 -7
  11. opencode/resources/config.py +12 -10
  12. opencode/resources/credential.py +13 -11
  13. opencode/resources/debug.py +9 -7
  14. opencode/resources/event.py +9 -5
  15. opencode/resources/experimental.py +31 -29
  16. opencode/resources/file.py +15 -13
  17. opencode/resources/form.py +9 -7
  18. opencode/resources/generate.py +9 -7
  19. opencode/resources/integration.py +28 -26
  20. opencode/resources/location.py +9 -7
  21. opencode/resources/mcp.py +13 -11
  22. opencode/resources/message.py +9 -8
  23. opencode/resources/migration.py +10 -12
  24. opencode/resources/model.py +12 -10
  25. opencode/resources/permission.py +29 -27
  26. opencode/resources/plugin.py +12 -10
  27. opencode/resources/project.py +14 -12
  28. opencode/resources/provider.py +13 -11
  29. opencode/resources/pty.py +23 -21
  30. opencode/resources/reference.py +9 -7
  31. opencode/resources/rpc.py +9 -7
  32. opencode/resources/server.py +14 -12
  33. opencode/resources/session.py +92 -90
  34. opencode/resources/shell.py +19 -17
  35. opencode/resources/skill.py +9 -7
  36. opencode/resources/vcs.py +22 -20
  37. opencode/resources/voice.py +9 -7
  38. opencode/resources/websearch.py +13 -11
  39. opencode/resources/worktree.py +13 -11
  40. opencode/testing.py +508 -0
  41. {opencode_python_sdk-0.1.3.dist-info → opencode_python_sdk-0.2.0.dist-info}/METADATA +50 -1
  42. opencode_python_sdk-0.2.0.dist-info/RECORD +62 -0
  43. opencode_python_sdk-0.1.3.dist-info/RECORD +0 -58
  44. {opencode_python_sdk-0.1.3.dist-info → opencode_python_sdk-0.2.0.dist-info}/WHEEL +0 -0
  45. {opencode_python_sdk-0.1.3.dist-info → opencode_python_sdk-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -6,25 +6,27 @@
6
6
  from __future__ import annotations
7
7
 
8
8
  from functools import cached_property
9
- from typing import cast
9
+ from typing import TYPE_CHECKING, cast
10
10
 
11
11
  from .._base_client import RequestOptions
12
12
  from .._qs import encode_path_segment
13
13
  from .._resource import AsyncAPIResource, SyncAPIResource
14
14
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
15
- from ..types import (
16
- FormAnswer,
17
- IntegrationAttemptID,
18
- IntegrationCommandConnectResponse,
19
- IntegrationCommandStatusResponse,
20
- IntegrationGetResponse,
21
- IntegrationID,
22
- IntegrationListResponse,
23
- IntegrationMethodID,
24
- IntegrationOauthConnectResponse,
25
- IntegrationOauthStatusResponse,
26
- Location,
27
- )
15
+
16
+ if TYPE_CHECKING:
17
+ from ..types import (
18
+ FormAnswer,
19
+ IntegrationAttemptID,
20
+ IntegrationCommandConnectResponse,
21
+ IntegrationCommandStatusResponse,
22
+ IntegrationGetResponse,
23
+ IntegrationID,
24
+ IntegrationListResponse,
25
+ IntegrationMethodID,
26
+ IntegrationOauthConnectResponse,
27
+ IntegrationOauthStatusResponse,
28
+ Location,
29
+ )
28
30
 
29
31
  __all__ = ["IntegrationResource", "AsyncIntegrationResource"]
30
32
 
@@ -192,7 +194,7 @@ class IntegrationOauthResource(SyncAPIResource):
192
194
  extra_body=extra_body,
193
195
  timeout=timeout,
194
196
  ),
195
- response_type=IntegrationOauthConnectResponse,
197
+ response_type="IntegrationOauthConnectResponse",
196
198
  ),
197
199
  )
198
200
 
@@ -232,7 +234,7 @@ class IntegrationOauthResource(SyncAPIResource):
232
234
  extra_body=extra_body,
233
235
  timeout=timeout,
234
236
  ),
235
- response_type=IntegrationOauthStatusResponse,
237
+ response_type="IntegrationOauthStatusResponse",
236
238
  ),
237
239
  )
238
240
 
@@ -352,7 +354,7 @@ class IntegrationCommandResource(SyncAPIResource):
352
354
  extra_body=extra_body,
353
355
  timeout=timeout,
354
356
  ),
355
- response_type=IntegrationCommandConnectResponse,
357
+ response_type="IntegrationCommandConnectResponse",
356
358
  ),
357
359
  )
358
360
 
@@ -392,7 +394,7 @@ class IntegrationCommandResource(SyncAPIResource):
392
394
  extra_body=extra_body,
393
395
  timeout=timeout,
394
396
  ),
395
- response_type=IntegrationCommandStatusResponse,
397
+ response_type="IntegrationCommandStatusResponse",
396
398
  ),
397
399
  )
398
400
 
@@ -487,7 +489,7 @@ class IntegrationResource(SyncAPIResource):
487
489
  extra_body=extra_body,
488
490
  timeout=timeout,
489
491
  ),
490
- response_type=IntegrationListResponse,
492
+ response_type="IntegrationListResponse",
491
493
  ),
492
494
  )
493
495
 
@@ -525,7 +527,7 @@ class IntegrationResource(SyncAPIResource):
525
527
  extra_body=extra_body,
526
528
  timeout=timeout,
527
529
  ),
528
- response_type=IntegrationGetResponse,
530
+ response_type="IntegrationGetResponse",
529
531
  ),
530
532
  )
531
533
 
@@ -693,7 +695,7 @@ class AsyncIntegrationOauthResource(AsyncAPIResource):
693
695
  extra_body=extra_body,
694
696
  timeout=timeout,
695
697
  ),
696
- response_type=IntegrationOauthConnectResponse,
698
+ response_type="IntegrationOauthConnectResponse",
697
699
  ),
698
700
  )
699
701
 
@@ -733,7 +735,7 @@ class AsyncIntegrationOauthResource(AsyncAPIResource):
733
735
  extra_body=extra_body,
734
736
  timeout=timeout,
735
737
  ),
736
- response_type=IntegrationOauthStatusResponse,
738
+ response_type="IntegrationOauthStatusResponse",
737
739
  ),
738
740
  )
739
741
 
@@ -853,7 +855,7 @@ class AsyncIntegrationCommandResource(AsyncAPIResource):
853
855
  extra_body=extra_body,
854
856
  timeout=timeout,
855
857
  ),
856
- response_type=IntegrationCommandConnectResponse,
858
+ response_type="IntegrationCommandConnectResponse",
857
859
  ),
858
860
  )
859
861
 
@@ -893,7 +895,7 @@ class AsyncIntegrationCommandResource(AsyncAPIResource):
893
895
  extra_body=extra_body,
894
896
  timeout=timeout,
895
897
  ),
896
- response_type=IntegrationCommandStatusResponse,
898
+ response_type="IntegrationCommandStatusResponse",
897
899
  ),
898
900
  )
899
901
 
@@ -988,7 +990,7 @@ class AsyncIntegrationResource(AsyncAPIResource):
988
990
  extra_body=extra_body,
989
991
  timeout=timeout,
990
992
  ),
991
- response_type=IntegrationListResponse,
993
+ response_type="IntegrationListResponse",
992
994
  ),
993
995
  )
994
996
 
@@ -1026,6 +1028,6 @@ class AsyncIntegrationResource(AsyncAPIResource):
1026
1028
  extra_body=extra_body,
1027
1029
  timeout=timeout,
1028
1030
  ),
1029
- response_type=IntegrationGetResponse,
1031
+ response_type="IntegrationGetResponse",
1030
1032
  ),
1031
1033
  )
@@ -5,15 +5,17 @@
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
- from typing import cast
8
+ from typing import TYPE_CHECKING, cast
9
9
 
10
10
  from .._base_client import RequestOptions
11
11
  from .._resource import AsyncAPIResource, SyncAPIResource
12
12
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
13
- from ..types import (
14
- Location,
15
- LocationPublicInfo,
16
- )
13
+
14
+ if TYPE_CHECKING:
15
+ from ..types import (
16
+ Location,
17
+ LocationPublicInfo,
18
+ )
17
19
 
18
20
  __all__ = ["LocationResource", "AsyncLocationResource"]
19
21
 
@@ -53,7 +55,7 @@ class LocationResource(SyncAPIResource):
53
55
  extra_body=extra_body,
54
56
  timeout=timeout,
55
57
  ),
56
- response_type=LocationPublicInfo,
58
+ response_type="LocationPublicInfo",
57
59
  ),
58
60
  )
59
61
 
@@ -124,7 +126,7 @@ class AsyncLocationResource(AsyncAPIResource):
124
126
  extra_body=extra_body,
125
127
  timeout=timeout,
126
128
  ),
127
- response_type=LocationPublicInfo,
129
+ response_type="LocationPublicInfo",
128
130
  ),
129
131
  )
130
132
 
opencode/resources/mcp.py CHANGED
@@ -6,18 +6,20 @@
6
6
  from __future__ import annotations
7
7
 
8
8
  from functools import cached_property
9
- from typing import cast
9
+ from typing import TYPE_CHECKING, cast
10
10
 
11
11
  from .._base_client import RequestOptions
12
12
  from .._qs import encode_path_segment
13
13
  from .._resource import AsyncAPIResource, SyncAPIResource
14
14
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
15
- from ..types import (
16
- Location,
17
- McpAddConfig,
18
- McpListResponse,
19
- McpResourceCatalogResponse,
20
- )
15
+
16
+ if TYPE_CHECKING:
17
+ from ..types import (
18
+ Location,
19
+ McpAddConfig,
20
+ McpListResponse,
21
+ McpResourceCatalogResponse,
22
+ )
21
23
 
22
24
  __all__ = ["McpResource", "AsyncMcpResource"]
23
25
 
@@ -57,7 +59,7 @@ class McpResourceResource(SyncAPIResource):
57
59
  extra_body=extra_body,
58
60
  timeout=timeout,
59
61
  ),
60
- response_type=McpResourceCatalogResponse,
62
+ response_type="McpResourceCatalogResponse",
61
63
  ),
62
64
  )
63
65
 
@@ -102,7 +104,7 @@ class McpResource(SyncAPIResource):
102
104
  extra_body=extra_body,
103
105
  timeout=timeout,
104
106
  ),
105
- response_type=McpListResponse,
107
+ response_type="McpListResponse",
106
108
  ),
107
109
  )
108
110
 
@@ -291,7 +293,7 @@ class AsyncMcpResourceResource(AsyncAPIResource):
291
293
  extra_body=extra_body,
292
294
  timeout=timeout,
293
295
  ),
294
- response_type=McpResourceCatalogResponse,
296
+ response_type="McpResourceCatalogResponse",
295
297
  ),
296
298
  )
297
299
 
@@ -336,7 +338,7 @@ class AsyncMcpResource(AsyncAPIResource):
336
338
  extra_body=extra_body,
337
339
  timeout=timeout,
338
340
  ),
339
- response_type=McpListResponse,
341
+ response_type="McpListResponse",
340
342
  ),
341
343
  )
342
344
 
@@ -5,18 +5,19 @@
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
- from typing import Literal
8
+ from typing import TYPE_CHECKING, Literal
9
9
 
10
10
  from .._base_client import RequestOptions
11
11
  from .._pagination import AsyncPaginator, SyncCursorPage
12
12
  from .._qs import encode_path_segment
13
13
  from .._resource import AsyncAPIResource, SyncAPIResource
14
14
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, OpenEnum, Query, Timeout
15
- from ..types import (
16
- SessionID,
17
- SessionMessageInfo,
18
- SessionMessagesResponse,
19
- )
15
+
16
+ if TYPE_CHECKING:
17
+ from ..types import (
18
+ SessionID,
19
+ SessionMessageInfo,
20
+ )
20
21
 
21
22
  __all__ = ["MessageResource", "AsyncMessageResource"]
22
23
 
@@ -82,7 +83,7 @@ class MessageResource(SyncAPIResource):
82
83
  extra_body=extra_body,
83
84
  timeout=timeout,
84
85
  ),
85
- response_type=SessionMessagesResponse,
86
+ response_type="SessionMessagesResponse",
86
87
  )
87
88
 
88
89
 
@@ -147,5 +148,5 @@ class AsyncMessageResource(AsyncAPIResource):
147
148
  extra_body=extra_body,
148
149
  timeout=timeout,
149
150
  ),
150
- response_type=SessionMessagesResponse,
151
+ response_type="SessionMessagesResponse",
151
152
  )
@@ -6,16 +6,18 @@
6
6
  from __future__ import annotations
7
7
 
8
8
  from functools import cached_property
9
- from typing import cast
9
+ from typing import TYPE_CHECKING, cast
10
10
 
11
11
  from .._base_client import RequestOptions
12
12
  from .._resource import AsyncAPIResource, SyncAPIResource
13
13
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
14
- from ..types import (
15
- MigrationV1StatusResponseOption1,
16
- MigrationV1StatusResponseOption2,
17
- MigrationV1StatusResponseOption3,
18
- )
14
+
15
+ if TYPE_CHECKING:
16
+ from ..types import (
17
+ MigrationV1StatusResponseOption1,
18
+ MigrationV1StatusResponseOption2,
19
+ MigrationV1StatusResponseOption3,
20
+ )
19
21
 
20
22
  __all__ = ["MigrationResource", "AsyncMigrationResource"]
21
23
 
@@ -54,9 +56,7 @@ class MigrationV1Resource(SyncAPIResource):
54
56
  extra_body=extra_body,
55
57
  timeout=timeout,
56
58
  ),
57
- response_type=MigrationV1StatusResponseOption1
58
- | MigrationV1StatusResponseOption2
59
- | MigrationV1StatusResponseOption3,
59
+ response_type="MigrationV1StatusResponseOption1 | MigrationV1StatusResponseOption2 | MigrationV1StatusResponseOption3",
60
60
  ),
61
61
  )
62
62
 
@@ -104,9 +104,7 @@ class AsyncMigrationV1Resource(AsyncAPIResource):
104
104
  extra_body=extra_body,
105
105
  timeout=timeout,
106
106
  ),
107
- response_type=MigrationV1StatusResponseOption1
108
- | MigrationV1StatusResponseOption2
109
- | MigrationV1StatusResponseOption3,
107
+ response_type="MigrationV1StatusResponseOption1 | MigrationV1StatusResponseOption2 | MigrationV1StatusResponseOption3",
110
108
  ),
111
109
  )
112
110
 
@@ -5,16 +5,18 @@
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
- from typing import cast
8
+ from typing import TYPE_CHECKING, cast
9
9
 
10
10
  from .._base_client import RequestOptions
11
11
  from .._resource import AsyncAPIResource, SyncAPIResource
12
12
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
13
- from ..types import (
14
- Location,
15
- ModelDefaultResponse,
16
- ModelListResponse,
17
- )
13
+
14
+ if TYPE_CHECKING:
15
+ from ..types import (
16
+ Location,
17
+ ModelDefaultResponse,
18
+ ModelListResponse,
19
+ )
18
20
 
19
21
  __all__ = ["ModelResource", "AsyncModelResource"]
20
22
 
@@ -55,7 +57,7 @@ class ModelResource(SyncAPIResource):
55
57
  extra_body=extra_body,
56
58
  timeout=timeout,
57
59
  ),
58
- response_type=ModelListResponse,
60
+ response_type="ModelListResponse",
59
61
  ),
60
62
  )
61
63
 
@@ -92,7 +94,7 @@ class ModelResource(SyncAPIResource):
92
94
  extra_body=extra_body,
93
95
  timeout=timeout,
94
96
  ),
95
- response_type=ModelDefaultResponse,
97
+ response_type="ModelDefaultResponse",
96
98
  ),
97
99
  )
98
100
 
@@ -133,7 +135,7 @@ class AsyncModelResource(AsyncAPIResource):
133
135
  extra_body=extra_body,
134
136
  timeout=timeout,
135
137
  ),
136
- response_type=ModelListResponse,
138
+ response_type="ModelListResponse",
137
139
  ),
138
140
  )
139
141
 
@@ -170,6 +172,6 @@ class AsyncModelResource(AsyncAPIResource):
170
172
  extra_body=extra_body,
171
173
  timeout=timeout,
172
174
  ),
173
- response_type=ModelDefaultResponse,
175
+ response_type="ModelDefaultResponse",
174
176
  ),
175
177
  )
@@ -8,26 +8,28 @@ from __future__ import annotations
8
8
  import builtins
9
9
  from collections.abc import Mapping, Sequence
10
10
  from functools import cached_property
11
- from typing import Any, cast
11
+ from typing import TYPE_CHECKING, Any, cast
12
12
 
13
13
  from .._base_client import RequestOptions
14
14
  from .._qs import encode_path_segment
15
15
  from .._resource import AsyncAPIResource, SyncAPIResource
16
16
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
17
- from ..types import (
18
- AgentID,
19
- Location,
20
- PermissionCreateResponse,
21
- PermissionID,
22
- PermissionReply,
23
- PermissionRequest,
24
- PermissionRequestListResponse,
25
- PermissionSavedID,
26
- PermissionSavedInfo,
27
- PermissionSource,
28
- ProjectID,
29
- SessionID,
30
- )
17
+
18
+ if TYPE_CHECKING:
19
+ from ..types import (
20
+ AgentID,
21
+ Location,
22
+ PermissionCreateResponse,
23
+ PermissionID,
24
+ PermissionReply,
25
+ PermissionRequest,
26
+ PermissionRequestListResponse,
27
+ PermissionSavedID,
28
+ PermissionSavedInfo,
29
+ PermissionSource,
30
+ ProjectID,
31
+ SessionID,
32
+ )
31
33
 
32
34
  __all__ = ["PermissionResource", "AsyncPermissionResource"]
33
35
 
@@ -67,7 +69,7 @@ class PermissionRequestResource(SyncAPIResource):
67
69
  extra_body=extra_body,
68
70
  timeout=timeout,
69
71
  ),
70
- response_type=PermissionRequestListResponse,
72
+ response_type="PermissionRequestListResponse",
71
73
  ),
72
74
  )
73
75
 
@@ -107,7 +109,7 @@ class PermissionSavedResource(SyncAPIResource):
107
109
  extra_body=extra_body,
108
110
  timeout=timeout,
109
111
  ),
110
- response_type=builtins.list[PermissionSavedInfo],
112
+ response_type="builtins.list[PermissionSavedInfo]",
111
113
  unwrap=True,
112
114
  ),
113
115
  )
@@ -148,7 +150,7 @@ class PermissionSavedResource(SyncAPIResource):
148
150
  extra_body=extra_body,
149
151
  timeout=timeout,
150
152
  ),
151
- response_type=PermissionSavedInfo,
153
+ response_type="PermissionSavedInfo",
152
154
  unwrap=True,
153
155
  ),
154
156
  )
@@ -247,7 +249,7 @@ class PermissionResource(SyncAPIResource):
247
249
  extra_body=extra_body,
248
250
  timeout=timeout,
249
251
  ),
250
- response_type=PermissionCreateResponse,
252
+ response_type="PermissionCreateResponse",
251
253
  unwrap=True,
252
254
  ),
253
255
  )
@@ -284,7 +286,7 @@ class PermissionResource(SyncAPIResource):
284
286
  extra_body=extra_body,
285
287
  timeout=timeout,
286
288
  ),
287
- response_type=builtins.list[PermissionRequest],
289
+ response_type="builtins.list[PermissionRequest]",
288
290
  unwrap=True,
289
291
  ),
290
292
  )
@@ -323,7 +325,7 @@ class PermissionResource(SyncAPIResource):
323
325
  extra_body=extra_body,
324
326
  timeout=timeout,
325
327
  ),
326
- response_type=PermissionRequest,
328
+ response_type="PermissionRequest",
327
329
  unwrap=True,
328
330
  ),
329
331
  )
@@ -402,7 +404,7 @@ class AsyncPermissionRequestResource(AsyncAPIResource):
402
404
  extra_body=extra_body,
403
405
  timeout=timeout,
404
406
  ),
405
- response_type=PermissionRequestListResponse,
407
+ response_type="PermissionRequestListResponse",
406
408
  ),
407
409
  )
408
410
 
@@ -442,7 +444,7 @@ class AsyncPermissionSavedResource(AsyncAPIResource):
442
444
  extra_body=extra_body,
443
445
  timeout=timeout,
444
446
  ),
445
- response_type=builtins.list[PermissionSavedInfo],
447
+ response_type="builtins.list[PermissionSavedInfo]",
446
448
  unwrap=True,
447
449
  ),
448
450
  )
@@ -483,7 +485,7 @@ class AsyncPermissionSavedResource(AsyncAPIResource):
483
485
  extra_body=extra_body,
484
486
  timeout=timeout,
485
487
  ),
486
- response_type=PermissionSavedInfo,
488
+ response_type="PermissionSavedInfo",
487
489
  unwrap=True,
488
490
  ),
489
491
  )
@@ -582,7 +584,7 @@ class AsyncPermissionResource(AsyncAPIResource):
582
584
  extra_body=extra_body,
583
585
  timeout=timeout,
584
586
  ),
585
- response_type=PermissionCreateResponse,
587
+ response_type="PermissionCreateResponse",
586
588
  unwrap=True,
587
589
  ),
588
590
  )
@@ -619,7 +621,7 @@ class AsyncPermissionResource(AsyncAPIResource):
619
621
  extra_body=extra_body,
620
622
  timeout=timeout,
621
623
  ),
622
- response_type=builtins.list[PermissionRequest],
624
+ response_type="builtins.list[PermissionRequest]",
623
625
  unwrap=True,
624
626
  ),
625
627
  )
@@ -658,7 +660,7 @@ class AsyncPermissionResource(AsyncAPIResource):
658
660
  extra_body=extra_body,
659
661
  timeout=timeout,
660
662
  ),
661
- response_type=PermissionRequest,
663
+ response_type="PermissionRequest",
662
664
  unwrap=True,
663
665
  ),
664
666
  )
@@ -6,16 +6,18 @@
6
6
  from __future__ import annotations
7
7
 
8
8
  from collections.abc import Sequence
9
- from typing import cast
9
+ from typing import TYPE_CHECKING, cast
10
10
 
11
11
  from .._base_client import RequestOptions
12
12
  from .._resource import AsyncAPIResource, SyncAPIResource
13
13
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
14
- from ..types import (
15
- Location,
16
- PluginCheckResponse,
17
- PluginListResponse,
18
- )
14
+
15
+ if TYPE_CHECKING:
16
+ from ..types import (
17
+ Location,
18
+ PluginCheckResponse,
19
+ PluginListResponse,
20
+ )
19
21
 
20
22
  __all__ = ["PluginResource", "AsyncPluginResource"]
21
23
 
@@ -55,7 +57,7 @@ class PluginResource(SyncAPIResource):
55
57
  extra_body=extra_body,
56
58
  timeout=timeout,
57
59
  ),
58
- response_type=PluginListResponse,
60
+ response_type="PluginListResponse",
59
61
  ),
60
62
  )
61
63
 
@@ -93,7 +95,7 @@ class PluginResource(SyncAPIResource):
93
95
  extra_body=extra_body,
94
96
  timeout=timeout,
95
97
  ),
96
- response_type=PluginCheckResponse,
98
+ response_type="PluginCheckResponse",
97
99
  ),
98
100
  )
99
101
 
@@ -169,7 +171,7 @@ class AsyncPluginResource(AsyncAPIResource):
169
171
  extra_body=extra_body,
170
172
  timeout=timeout,
171
173
  ),
172
- response_type=PluginListResponse,
174
+ response_type="PluginListResponse",
173
175
  ),
174
176
  )
175
177
 
@@ -207,7 +209,7 @@ class AsyncPluginResource(AsyncAPIResource):
207
209
  extra_body=extra_body,
208
210
  timeout=timeout,
209
211
  ),
210
- response_type=PluginCheckResponse,
212
+ response_type="PluginCheckResponse",
211
213
  ),
212
214
  )
213
215
 
@@ -6,19 +6,21 @@
6
6
  from __future__ import annotations
7
7
 
8
8
  import builtins
9
- from typing import cast
9
+ from typing import TYPE_CHECKING, cast
10
10
 
11
11
  from .._base_client import RequestOptions
12
12
  from .._qs import encode_path_segment
13
13
  from .._resource import AsyncAPIResource, SyncAPIResource
14
14
  from .._types import NOT_GIVEN, Body, Headers, NotGiven, Query, Timeout
15
- from ..types import (
16
- AbsolutePath,
17
- Project,
18
- ProjectCommands,
19
- ProjectIcon,
20
- ProjectID,
21
- )
15
+
16
+ if TYPE_CHECKING:
17
+ from ..types import (
18
+ AbsolutePath,
19
+ Project,
20
+ ProjectCommands,
21
+ ProjectIcon,
22
+ ProjectID,
23
+ )
22
24
 
23
25
  __all__ = ["ProjectResource", "AsyncProjectResource"]
24
26
 
@@ -58,7 +60,7 @@ class ProjectResource(SyncAPIResource):
58
60
  extra_body=extra_body,
59
61
  timeout=timeout,
60
62
  ),
61
- response_type=builtins.list[Project],
63
+ response_type="builtins.list[Project]",
62
64
  ),
63
65
  )
64
66
 
@@ -99,7 +101,7 @@ class ProjectResource(SyncAPIResource):
99
101
  extra_body=extra_body,
100
102
  timeout=timeout,
101
103
  ),
102
- response_type=Project,
104
+ response_type="Project",
103
105
  ),
104
106
  )
105
107
 
@@ -139,7 +141,7 @@ class AsyncProjectResource(AsyncAPIResource):
139
141
  extra_body=extra_body,
140
142
  timeout=timeout,
141
143
  ),
142
- response_type=builtins.list[Project],
144
+ response_type="builtins.list[Project]",
143
145
  ),
144
146
  )
145
147
 
@@ -180,6 +182,6 @@ class AsyncProjectResource(AsyncAPIResource):
180
182
  extra_body=extra_body,
181
183
  timeout=timeout,
182
184
  ),
183
- response_type=Project,
185
+ response_type="Project",
184
186
  ),
185
187
  )