Skip to content

Commit 27e1600

Browse files
feat(api): api update
1 parent 6c465b4 commit 27e1600

18 files changed

+319
-44
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 92
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-20da49cddb76a81f77844447916c6d445b25634ff99aae15d8dfd50fe6d854e6.yml
3-
openapi_spec_hash: 2097a1bfb48092ed3b03fa606f5c5447
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-ff6a7188da87d1550f7d3cda78f43990a455e42eb7560ee1a8b8a49d3ed22fcb.yml
3+
openapi_spec_hash: ea324758dd7f60d228d777a50c17b487
44
config_hash: 60681f589a9e641fdb7f19af2021a033

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,5 +364,5 @@ Methods:
364364

365365
- <code title="post /v1/secrets">client.secrets.<a href="./src/runloop_api_client/resources/secrets.py">create</a>(\*\*<a href="src/runloop_api_client/types/secret_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/secret_view.py">SecretView</a></code>
366366
- <code title="post /v1/secrets/{name}">client.secrets.<a href="./src/runloop_api_client/resources/secrets.py">update</a>(name, \*\*<a href="src/runloop_api_client/types/secret_update_params.py">params</a>) -> <a href="./src/runloop_api_client/types/secret_view.py">SecretView</a></code>
367-
- <code title="get /v1/secrets">client.secrets.<a href="./src/runloop_api_client/resources/secrets.py">list</a>() -> <a href="./src/runloop_api_client/types/secret_list_view.py">SecretListView</a></code>
367+
- <code title="get /v1/secrets">client.secrets.<a href="./src/runloop_api_client/resources/secrets.py">list</a>(\*\*<a href="src/runloop_api_client/types/secret_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/secret_list_view.py">SecretListView</a></code>
368368
- <code title="post /v1/secrets/{name}/delete">client.secrets.<a href="./src/runloop_api_client/resources/secrets.py">delete</a>(name) -> <a href="./src/runloop_api_client/types/secret_view.py">SecretView</a></code>

src/runloop_api_client/resources/blueprints.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def create(
7272
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
7373
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
7474
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
75+
services: Optional[Iterable[blueprint_create_params.Service]] | NotGiven = NOT_GIVEN,
7576
system_setup_commands: Optional[List[str]] | NotGiven = NOT_GIVEN,
7677
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7778
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -102,6 +103,10 @@ def create(
102103
103104
launch_parameters: Parameters to configure your Devbox at launch time.
104105
106+
services: (Optional) List of containerized services to include in the Blueprint. These
107+
services will be pre-pulled during the build phase for optimized startup
108+
performance.
109+
105110
system_setup_commands: A list of commands to run to set up your system.
106111
107112
extra_headers: Send extra headers
@@ -124,6 +129,7 @@ def create(
124129
"dockerfile": dockerfile,
125130
"file_mounts": file_mounts,
126131
"launch_parameters": launch_parameters,
132+
"services": services,
127133
"system_setup_commands": system_setup_commands,
128134
},
129135
blueprint_create_params.BlueprintCreateParams,
@@ -385,6 +391,7 @@ def preview(
385391
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
386392
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
387393
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
394+
services: Optional[Iterable[blueprint_preview_params.Service]] | NotGiven = NOT_GIVEN,
388395
system_setup_commands: Optional[List[str]] | NotGiven = NOT_GIVEN,
389396
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
390397
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -413,6 +420,10 @@ def preview(
413420
414421
launch_parameters: Parameters to configure your Devbox at launch time.
415422
423+
services: (Optional) List of containerized services to include in the Blueprint. These
424+
services will be pre-pulled during the build phase for optimized startup
425+
performance.
426+
416427
system_setup_commands: A list of commands to run to set up your system.
417428
418429
extra_headers: Send extra headers
@@ -435,6 +446,7 @@ def preview(
435446
"dockerfile": dockerfile,
436447
"file_mounts": file_mounts,
437448
"launch_parameters": launch_parameters,
449+
"services": services,
438450
"system_setup_commands": system_setup_commands,
439451
},
440452
blueprint_preview_params.BlueprintPreviewParams,
@@ -479,6 +491,7 @@ async def create(
479491
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
480492
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
481493
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
494+
services: Optional[Iterable[blueprint_create_params.Service]] | NotGiven = NOT_GIVEN,
482495
system_setup_commands: Optional[List[str]] | NotGiven = NOT_GIVEN,
483496
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
484497
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -509,6 +522,10 @@ async def create(
509522
510523
launch_parameters: Parameters to configure your Devbox at launch time.
511524
525+
services: (Optional) List of containerized services to include in the Blueprint. These
526+
services will be pre-pulled during the build phase for optimized startup
527+
performance.
528+
512529
system_setup_commands: A list of commands to run to set up your system.
513530
514531
extra_headers: Send extra headers
@@ -531,6 +548,7 @@ async def create(
531548
"dockerfile": dockerfile,
532549
"file_mounts": file_mounts,
533550
"launch_parameters": launch_parameters,
551+
"services": services,
534552
"system_setup_commands": system_setup_commands,
535553
},
536554
blueprint_create_params.BlueprintCreateParams,
@@ -793,6 +811,7 @@ async def preview(
793811
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
794812
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
795813
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
814+
services: Optional[Iterable[blueprint_preview_params.Service]] | NotGiven = NOT_GIVEN,
796815
system_setup_commands: Optional[List[str]] | NotGiven = NOT_GIVEN,
797816
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
798817
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -821,6 +840,10 @@ async def preview(
821840
822841
launch_parameters: Parameters to configure your Devbox at launch time.
823842
843+
services: (Optional) List of containerized services to include in the Blueprint. These
844+
services will be pre-pulled during the build phase for optimized startup
845+
performance.
846+
824847
system_setup_commands: A list of commands to run to set up your system.
825848
826849
extra_headers: Send extra headers
@@ -843,6 +866,7 @@ async def preview(
843866
"dockerfile": dockerfile,
844867
"file_mounts": file_mounts,
845868
"launch_parameters": launch_parameters,
869+
"services": services,
846870
"system_setup_commands": system_setup_commands,
847871
},
848872
blueprint_preview_params.BlueprintPreviewParams,

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ def create(
192192
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
193193
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
194194
name: Optional[str] | NotGiven = NOT_GIVEN,
195-
prebuilt: Optional[str] | NotGiven = NOT_GIVEN,
196195
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
197196
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
198197
snapshot_id: Optional[str] | NotGiven = NOT_GIVEN,
@@ -237,9 +236,6 @@ def create(
237236
238237
name: (Optional) A user specified name to give the Devbox.
239238
240-
prebuilt: Reference to prebuilt Blueprint to create the Devbox from. Should not be used
241-
together with (Snapshot ID, Blueprint ID, or Blueprint name).
242-
243239
repo_connection_id: Repository connection id the devbox should source its base image from.
244240
245241
secrets: (Optional) Map of environment variable names to secret names. The secret values
@@ -273,7 +269,6 @@ def create(
273269
"launch_parameters": launch_parameters,
274270
"metadata": metadata,
275271
"name": name,
276-
"prebuilt": prebuilt,
277272
"repo_connection_id": repo_connection_id,
278273
"secrets": secrets,
279274
"snapshot_id": snapshot_id,
@@ -1434,7 +1429,6 @@ async def create(
14341429
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
14351430
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
14361431
name: Optional[str] | NotGiven = NOT_GIVEN,
1437-
prebuilt: Optional[str] | NotGiven = NOT_GIVEN,
14381432
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
14391433
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
14401434
snapshot_id: Optional[str] | NotGiven = NOT_GIVEN,
@@ -1479,9 +1473,6 @@ async def create(
14791473
14801474
name: (Optional) A user specified name to give the Devbox.
14811475
1482-
prebuilt: Reference to prebuilt Blueprint to create the Devbox from. Should not be used
1483-
together with (Snapshot ID, Blueprint ID, or Blueprint name).
1484-
14851476
repo_connection_id: Repository connection id the devbox should source its base image from.
14861477
14871478
secrets: (Optional) Map of environment variable names to secret names. The secret values
@@ -1515,7 +1506,6 @@ async def create(
15151506
"launch_parameters": launch_parameters,
15161507
"metadata": metadata,
15171508
"name": name,
1518-
"prebuilt": prebuilt,
15191509
"repo_connection_id": repo_connection_id,
15201510
"secrets": secrets,
15211511
"snapshot_id": snapshot_id,

src/runloop_api_client/resources/secrets.py

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import httpx
66

7-
from ..types import secret_create_params, secret_update_params
7+
from ..types import secret_list_params, secret_create_params, secret_update_params
88
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
99
from .._utils import maybe_transform, async_maybe_transform
1010
from .._compat import cached_property
@@ -146,6 +146,7 @@ def update(
146146
def list(
147147
self,
148148
*,
149+
limit: int | NotGiven = NOT_GIVEN,
149150
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
150151
# The extra values given here take precedence over values defined on the client or passed to this method.
151152
extra_headers: Headers | None = None,
@@ -157,11 +158,26 @@ def list(
157158
158159
Secret values are not included
159160
for security reasons.
161+
162+
Args:
163+
limit: The limit of items to return. Default is 20.
164+
165+
extra_headers: Send extra headers
166+
167+
extra_query: Add additional query parameters to the request
168+
169+
extra_body: Add additional JSON properties to the request
170+
171+
timeout: Override the client-level default timeout for this request, in seconds
160172
"""
161173
return self._get(
162174
"/v1/secrets",
163175
options=make_request_options(
164-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
176+
extra_headers=extra_headers,
177+
extra_query=extra_query,
178+
extra_body=extra_body,
179+
timeout=timeout,
180+
query=maybe_transform({"limit": limit}, secret_list_params.SecretListParams),
165181
),
166182
cast_to=SecretListView,
167183
)
@@ -333,6 +349,7 @@ async def update(
333349
async def list(
334350
self,
335351
*,
352+
limit: int | NotGiven = NOT_GIVEN,
336353
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
337354
# The extra values given here take precedence over values defined on the client or passed to this method.
338355
extra_headers: Headers | None = None,
@@ -344,11 +361,26 @@ async def list(
344361
345362
Secret values are not included
346363
for security reasons.
364+
365+
Args:
366+
limit: The limit of items to return. Default is 20.
367+
368+
extra_headers: Send extra headers
369+
370+
extra_query: Add additional query parameters to the request
371+
372+
extra_body: Add additional JSON properties to the request
373+
374+
timeout: Override the client-level default timeout for this request, in seconds
347375
"""
348376
return await self._get(
349377
"/v1/secrets",
350378
options=make_request_options(
351-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
379+
extra_headers=extra_headers,
380+
extra_query=extra_query,
381+
extra_body=extra_body,
382+
timeout=timeout,
383+
query=await async_maybe_transform({"limit": limit}, secret_list_params.SecretListParams),
352384
),
353385
cast_to=SecretListView,
354386
)

src/runloop_api_client/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from .benchmark_run_view import BenchmarkRunView as BenchmarkRunView
2424
from .devbox_list_params import DevboxListParams as DevboxListParams
2525
from .devbox_tunnel_view import DevboxTunnelView as DevboxTunnelView
26+
from .secret_list_params import SecretListParams as SecretListParams
2627
from .blueprint_build_log import BlueprintBuildLog as BlueprintBuildLog
2728
from .blueprint_list_view import BlueprintListView as BlueprintListView
2829
from .input_context_param import InputContextParam as InputContextParam

src/runloop_api_client/types/blueprint_build_parameters.py

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,38 @@
66
from .shared.launch_parameters import LaunchParameters
77
from .shared.code_mount_parameters import CodeMountParameters
88

9-
__all__ = ["BlueprintBuildParameters"]
9+
__all__ = ["BlueprintBuildParameters", "Service", "ServiceCredentials"]
10+
11+
12+
class ServiceCredentials(BaseModel):
13+
password: str
14+
"""The password of the container service."""
15+
16+
username: str
17+
"""The username of the container service."""
18+
19+
20+
class Service(BaseModel):
21+
image: str
22+
"""The image of the container service."""
23+
24+
name: str
25+
"""The name of the container service."""
26+
27+
credentials: Optional[ServiceCredentials] = None
28+
"""The credentials of the container service."""
29+
30+
env: Optional[Dict[str, str]] = None
31+
"""The environment variables of the container service."""
32+
33+
options: Optional[str] = None
34+
"""Additional Docker container create options."""
35+
36+
port_mappings: Optional[List[str]] = None
37+
"""The port mappings of the container service.
38+
39+
Port mappings are in the format of <host_port>:<container_port>.
40+
"""
1041

1142

1243
class BlueprintBuildParameters(BaseModel):
@@ -31,5 +62,12 @@ class BlueprintBuildParameters(BaseModel):
3162
launch_parameters: Optional[LaunchParameters] = None
3263
"""Parameters to configure your Devbox at launch time."""
3364

65+
services: Optional[List[Service]] = None
66+
"""(Optional) List of containerized services to include in the Blueprint.
67+
68+
These services will be pre-pulled during the build phase for optimized startup
69+
performance.
70+
"""
71+
3472
system_setup_commands: Optional[List[str]] = None
3573
"""A list of commands to run to set up your system."""

src/runloop_api_client/types/blueprint_create_params.py

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from .shared_params.launch_parameters import LaunchParameters
99
from .shared_params.code_mount_parameters import CodeMountParameters
1010

11-
__all__ = ["BlueprintCreateParams"]
11+
__all__ = ["BlueprintCreateParams", "Service", "ServiceCredentials"]
1212

1313

1414
class BlueprintCreateParams(TypedDict, total=False):
@@ -33,5 +33,43 @@ class BlueprintCreateParams(TypedDict, total=False):
3333
launch_parameters: Optional[LaunchParameters]
3434
"""Parameters to configure your Devbox at launch time."""
3535

36+
services: Optional[Iterable[Service]]
37+
"""(Optional) List of containerized services to include in the Blueprint.
38+
39+
These services will be pre-pulled during the build phase for optimized startup
40+
performance.
41+
"""
42+
3643
system_setup_commands: Optional[List[str]]
3744
"""A list of commands to run to set up your system."""
45+
46+
47+
class ServiceCredentials(TypedDict, total=False):
48+
password: Required[str]
49+
"""The password of the container service."""
50+
51+
username: Required[str]
52+
"""The username of the container service."""
53+
54+
55+
class Service(TypedDict, total=False):
56+
image: Required[str]
57+
"""The image of the container service."""
58+
59+
name: Required[str]
60+
"""The name of the container service."""
61+
62+
credentials: Optional[ServiceCredentials]
63+
"""The credentials of the container service."""
64+
65+
env: Optional[Dict[str, str]]
66+
"""The environment variables of the container service."""
67+
68+
options: Optional[str]
69+
"""Additional Docker container create options."""
70+
71+
port_mappings: Optional[List[str]]
72+
"""The port mappings of the container service.
73+
74+
Port mappings are in the format of <host_port>:<container_port>.
75+
"""

0 commit comments

Comments
 (0)