Skip to content

Commit a1de3a8

Browse files
committed
Rename SDK's RequestOptions to BaseRequestOptions (avoid conflict with API's RequestOptions)
1 parent 167b609 commit a1de3a8

12 files changed

Lines changed: 40 additions & 40 deletions

File tree

docs/sdk/types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Core Request Options
8383

8484
These TypeDicts define options for timeouts, idempotency, polling, and other low-level request configuration. All other TypeDicts in the SDK extend from one of these core types.
8585

86-
.. autotypeddict:: runloop_api_client.sdk._types.RequestOptions
86+
.. autotypeddict:: runloop_api_client.sdk._types.BaseRequestOptions
8787

8888
.. autotypeddict:: runloop_api_client.sdk._types.LongRequestOptions
8989

src/runloop_api_client/sdk/_types.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ExecuteStreamingCallbacks(TypedDict, total=False):
3636
"""Callback invoked for all log lines (both stdout and stderr)"""
3737

3838

39-
class RequestOptions(TypedDict, total=False):
39+
class BaseRequestOptions(TypedDict, total=False):
4040
extra_headers: Optional[Headers]
4141
"""Send extra headers"""
4242

@@ -50,12 +50,12 @@ class RequestOptions(TypedDict, total=False):
5050
"""Override the client-level default timeout for this request, in seconds"""
5151

5252

53-
class LongRequestOptions(RequestOptions, total=False):
53+
class LongRequestOptions(BaseRequestOptions, total=False):
5454
idempotency_key: Optional[str]
5555
"""Specify a custom idempotency key for this request"""
5656

5757

58-
class PollingRequestOptions(RequestOptions, total=False):
58+
class PollingRequestOptions(BaseRequestOptions, total=False):
5959
polling_config: Optional[PollingConfig]
6060
"""Configuration for polling behavior"""
6161

@@ -80,7 +80,7 @@ class SDKDevboxExecuteAsyncParams(DevboxExecuteAsyncParams, ExecuteStreamingCall
8080
pass
8181

8282

83-
class SDKDevboxListParams(DevboxListParams, RequestOptions):
83+
class SDKDevboxListParams(DevboxListParams, BaseRequestOptions):
8484
pass
8585

8686

@@ -116,7 +116,7 @@ class SDKDevboxSnapshotDiskParams(DevboxSnapshotDiskParams, LongPollingRequestOp
116116
pass
117117

118118

119-
class SDKDiskSnapshotListParams(DiskSnapshotListParams, RequestOptions):
119+
class SDKDiskSnapshotListParams(DiskSnapshotListParams, BaseRequestOptions):
120120
pass
121121

122122

@@ -128,17 +128,17 @@ class SDKBlueprintCreateParams(BlueprintCreateParams, LongPollingRequestOptions)
128128
pass
129129

130130

131-
class SDKBlueprintListParams(BlueprintListParams, RequestOptions):
131+
class SDKBlueprintListParams(BlueprintListParams, BaseRequestOptions):
132132
pass
133133

134134

135-
class SDKObjectListParams(ObjectListParams, RequestOptions):
135+
class SDKObjectListParams(ObjectListParams, BaseRequestOptions):
136136
pass
137137

138138

139139
class SDKObjectCreateParams(ObjectCreateParams, LongRequestOptions):
140140
pass
141141

142142

143-
class SDKObjectDownloadParams(ObjectDownloadParams, RequestOptions):
143+
class SDKObjectDownloadParams(ObjectDownloadParams, BaseRequestOptions):
144144
pass

src/runloop_api_client/sdk/async_blueprint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing_extensions import Unpack, override
66

77
from ..types import BlueprintView
8-
from ._types import RequestOptions, LongRequestOptions, SDKDevboxCreateFromImageParams
8+
from ._types import BaseRequestOptions, LongRequestOptions, SDKDevboxCreateFromImageParams
99
from .._client import AsyncRunloop
1010
from .async_devbox import AsyncDevbox
1111
from ..types.blueprint_build_logs_list_view import BlueprintBuildLogsListView
@@ -44,7 +44,7 @@ def id(self) -> str:
4444

4545
async def get_info(
4646
self,
47-
**options: Unpack[RequestOptions],
47+
**options: Unpack[BaseRequestOptions],
4848
) -> BlueprintView:
4949
"""Retrieve the latest blueprint details.
5050
@@ -59,7 +59,7 @@ async def get_info(
5959

6060
async def logs(
6161
self,
62-
**options: Unpack[RequestOptions],
62+
**options: Unpack[BaseRequestOptions],
6363
) -> BlueprintBuildLogsListView:
6464
"""Retrieve build logs for the blueprint.
6565

src/runloop_api_client/sdk/async_devbox.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
)
1616
from ._types import (
1717
LogCallback,
18-
RequestOptions,
18+
BaseRequestOptions,
1919
LongRequestOptions,
2020
PollingRequestOptions,
2121
SDKDevboxExecuteParams,
@@ -104,7 +104,7 @@ def id(self) -> str:
104104

105105
async def get_info(
106106
self,
107-
**options: Unpack[RequestOptions],
107+
**options: Unpack[BaseRequestOptions],
108108
) -> DevboxView:
109109
"""Retrieve current devbox status and metadata.
110110

src/runloop_api_client/sdk/async_execution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import Optional, Awaitable, cast
88
from typing_extensions import Unpack, override
99

10-
from ._types import RequestOptions, LongRequestOptions
10+
from ._types import BaseRequestOptions, LongRequestOptions
1111
from .._client import AsyncRunloop
1212
from .async_execution_result import AsyncExecutionResult
1313
from ..types.devbox_async_execution_detail_view import DevboxAsyncExecutionDetailView
@@ -119,7 +119,7 @@ async def result(self, **options: Unpack[LongRequestOptions]) -> AsyncExecutionR
119119
final = cast(DevboxAsyncExecutionDetailView, command_result)
120120
return AsyncExecutionResult(self._client, self._devbox_id, final)
121121

122-
async def get_state(self, **options: Unpack[RequestOptions]) -> DevboxAsyncExecutionDetailView:
122+
async def get_state(self, **options: Unpack[BaseRequestOptions]) -> DevboxAsyncExecutionDetailView:
123123
"""Fetch the latest execution state.
124124
125125
:param options: Optional request configuration

src/runloop_api_client/sdk/async_snapshot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing_extensions import Unpack, override
66

77
from ._types import (
8-
RequestOptions,
8+
BaseRequestOptions,
99
LongRequestOptions,
1010
PollingRequestOptions,
1111
SDKDiskSnapshotUpdateParams,
@@ -50,7 +50,7 @@ def id(self) -> str:
5050

5151
async def get_info(
5252
self,
53-
**options: Unpack[RequestOptions],
53+
**options: Unpack[BaseRequestOptions],
5454
) -> DevboxSnapshotAsyncStatusView:
5555
"""Retrieve the latest snapshot status.
5656

src/runloop_api_client/sdk/async_storage_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Iterable
66
from typing_extensions import Unpack, override
77

8-
from ._types import RequestOptions, LongRequestOptions, SDKObjectDownloadParams
8+
from ._types import BaseRequestOptions, LongRequestOptions, SDKObjectDownloadParams
99
from .._client import AsyncRunloop
1010
from ..types.object_view import ObjectView
1111
from ..types.object_download_url_view import ObjectDownloadURLView
@@ -52,7 +52,7 @@ def upload_url(self) -> str | None:
5252

5353
async def refresh(
5454
self,
55-
**options: Unpack[RequestOptions],
55+
**options: Unpack[BaseRequestOptions],
5656
) -> ObjectView:
5757
"""Fetch the latest metadata for the object.
5858

src/runloop_api_client/sdk/blueprint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing_extensions import Unpack, override
66

77
from ..types import BlueprintView
8-
from ._types import RequestOptions, LongRequestOptions, SDKDevboxCreateFromImageParams
8+
from ._types import BaseRequestOptions, LongRequestOptions, SDKDevboxCreateFromImageParams
99
from .devbox import Devbox
1010
from .._client import Runloop
1111
from ..types.blueprint_build_logs_list_view import BlueprintBuildLogsListView
@@ -44,7 +44,7 @@ def id(self) -> str:
4444

4545
def get_info(
4646
self,
47-
**options: Unpack[RequestOptions],
47+
**options: Unpack[BaseRequestOptions],
4848
) -> BlueprintView:
4949
"""Retrieve the latest blueprint details.
5050
@@ -59,7 +59,7 @@ def get_info(
5959

6060
def logs(
6161
self,
62-
**options: Unpack[RequestOptions],
62+
**options: Unpack[BaseRequestOptions],
6363
) -> BlueprintBuildLogsListView:
6464
"""Retrieve build logs for the blueprint.
6565

src/runloop_api_client/sdk/devbox.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
)
1616
from ._types import (
1717
LogCallback,
18-
RequestOptions,
18+
BaseRequestOptions,
1919
LongRequestOptions,
2020
PollingRequestOptions,
2121
SDKDevboxExecuteParams,
@@ -103,13 +103,13 @@ def id(self) -> str:
103103

104104
def get_info(
105105
self,
106-
**options: Unpack[RequestOptions],
106+
**options: Unpack[BaseRequestOptions],
107107
) -> DevboxView:
108108
"""Retrieve current devbox status and metadata.
109109
110110
:param options: Optional request configuration
111111
:return: Current devbox state info
112-
:rtype: DevboxView
112+
:rtype: :class:`~runloop_api_client.types.devbox_view.DevboxView`
113113
"""
114114
return self._client.devboxes.retrieve(
115115
self._id,
@@ -124,7 +124,7 @@ def await_running(self, *, polling_config: PollingConfig | None = None) -> Devbo
124124
:param polling_config: Optional configuration for polling behavior (timeout, interval), defaults to None
125125
:type polling_config: PollingConfig | None, optional
126126
:return: Devbox state info after it reaches running status
127-
:rtype: DevboxView
127+
:rtype: :class:`~runloop_api_client.types.devbox_view.DevboxView`
128128
"""
129129
return self._client.devboxes.await_running(self._id, polling_config=polling_config)
130130

@@ -136,7 +136,7 @@ def await_suspended(self, *, polling_config: PollingConfig | None = None) -> Dev
136136
:param polling_config: Optional configuration for polling behavior (timeout, interval), defaults to None
137137
:type polling_config: PollingConfig | None, optional
138138
:return: Devbox state info after it reaches suspended status
139-
:rtype: DevboxView
139+
:rtype: :class:`~runloop_api_client.types.devbox_view.DevboxView`
140140
"""
141141
return self._client.devboxes.await_suspended(self._id, polling_config=polling_config)
142142

@@ -148,7 +148,7 @@ def shutdown(
148148
149149
:param options: Long-running request configuration (timeouts, retries, etc.)
150150
:return: Final devbox state info
151-
:rtype: DevboxView
151+
:rtype: :class:`~runloop_api_client.types.devbox_view.DevboxView`
152152
"""
153153
return self._client.devboxes.shutdown(
154154
self._id,
@@ -166,7 +166,7 @@ def suspend(
166166
167167
:param options: Optional long-running request and polling configuration
168168
:return: Suspended devbox state info
169-
:rtype: DevboxView
169+
:rtype: :class:`~runloop_api_client.types.devbox_view.DevboxView`
170170
"""
171171
self._client.devboxes.suspend(
172172
self._id,
@@ -184,7 +184,7 @@ def resume(
184184
185185
:param options: Optional long-running request and polling configuration
186186
:return: Resumed devbox state info
187-
:rtype: DevboxView
187+
:rtype: :class:`~runloop_api_client.types.devbox_view.DevboxView`
188188
"""
189189
self._client.devboxes.resume(
190190
self._id,
@@ -504,7 +504,7 @@ def write(
504504
505505
:param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxWriteFileContentsParams` for available parameters
506506
:return: Execution metadata for the write command
507-
:rtype: DevboxExecutionDetailView
507+
:rtype: :class:`~runloop_api_client.types.devbox_execution_detail_view.DevboxExecutionDetailView`
508508
509509
Example:
510510
>>> devbox.file.write(file_path="/home/user/config.json", contents='{"key": "value"}')
@@ -572,7 +572,7 @@ def create_ssh_key(
572572
573573
:param options: Optional long-running request configuration
574574
:return: Response containing SSH connection info
575-
:rtype: DevboxCreateSSHKeyResponse
575+
:rtype: :class:`~runloop_api_client.types.devbox_create_ssh_key_response.DevboxCreateSSHKeyResponse`
576576
577577
Example:
578578
>>> ssh_key = devbox.net.create_ssh_key()
@@ -591,7 +591,7 @@ def create_tunnel(
591591
592592
:param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateTunnelParams` for available parameters
593593
:return: Details about the public endpoint
594-
:rtype: DevboxTunnelView
594+
:rtype: :class:`~runloop_api_client.types.devbox_tunnel_view.DevboxTunnelView`
595595
596596
Example:
597597
>>> tunnel = devbox.net.create_tunnel(port=8080)

src/runloop_api_client/sdk/execution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import Optional
88
from typing_extensions import Unpack, override
99

10-
from ._types import RequestOptions, LongRequestOptions
10+
from ._types import BaseRequestOptions, LongRequestOptions
1111
from .._client import Runloop
1212
from .execution_result import ExecutionResult
1313
from ..types.devbox_async_execution_detail_view import DevboxAsyncExecutionDetailView
@@ -107,7 +107,7 @@ def result(self, **options: Unpack[LongRequestOptions]) -> ExecutionResult:
107107

108108
return ExecutionResult(self._client, self._devbox_id, final)
109109

110-
def get_state(self, **options: Unpack[RequestOptions]) -> DevboxAsyncExecutionDetailView:
110+
def get_state(self, **options: Unpack[BaseRequestOptions]) -> DevboxAsyncExecutionDetailView:
111111
"""Fetch the latest execution state.
112112
113113
:param options: Optional request configuration

0 commit comments

Comments
 (0)