Skip to content

Commit a0f1f40

Browse files
feat(api): api update
1 parent 8d29288 commit a0f1f40

File tree

7 files changed

+79
-2
lines changed

7 files changed

+79
-2
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: 94
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-039b6fefb20a791ff9739695a732c6d70ac20788675486b6ef04c7a3911b938d.yml
3-
openapi_spec_hash: 2a41f3c2f6c48a1787d06094240302a5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-f60ee2123156a4db87ddfa4e1b8dd6379e26e8f8cf533946ca25b76559b6aa4d.yml
3+
openapi_spec_hash: d80fdfaf40c65ce8c1962c4f6d35acc6
44
config_hash: 95facb8cef59b5a1b05763b871bf6a4b

src/runloop_api_client/resources/blueprints.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def create(
8282
file_mounts: Optional[Dict[str, str]] | Omit = omit,
8383
launch_parameters: Optional[LaunchParameters] | Omit = omit,
8484
metadata: Optional[Dict[str, str]] | Omit = omit,
85+
secrets: Optional[Dict[str, str]] | Omit = omit,
8586
services: Optional[Iterable[blueprint_create_params.Service]] | Omit = omit,
8687
system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit,
8788
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -122,6 +123,11 @@ def create(
122123
123124
metadata: (Optional) User defined metadata for the Blueprint.
124125
126+
secrets: (Optional) Map of mount IDs/environment variable names to secret names. Secrets
127+
will be available to commands during the build. Secrets are NOT stored in the
128+
blueprint image. Example: {"DB_PASS": "DATABASE_PASSWORD"} makes the secret
129+
'DATABASE_PASSWORD' available as environment variable 'DB_PASS'.
130+
125131
services: (Optional) List of containerized services to include in the Blueprint. These
126132
services will be pre-pulled during the build phase for optimized startup
127133
performance.
@@ -151,6 +157,7 @@ def create(
151157
"file_mounts": file_mounts,
152158
"launch_parameters": launch_parameters,
153159
"metadata": metadata,
160+
"secrets": secrets,
154161
"services": services,
155162
"system_setup_commands": system_setup_commands,
156163
},
@@ -404,6 +411,7 @@ def create_from_inspection(
404411
file_mounts: Optional[Dict[str, str]] | Omit = omit,
405412
launch_parameters: Optional[LaunchParameters] | Omit = omit,
406413
metadata: Optional[Dict[str, str]] | Omit = omit,
414+
secrets: Optional[Dict[str, str]] | Omit = omit,
407415
system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit,
408416
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
409417
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -430,6 +438,10 @@ def create_from_inspection(
430438
431439
metadata: (Optional) User defined metadata for the Blueprint.
432440
441+
secrets: (Optional) Map of mount IDs/environment variable names to secret names. Secrets
442+
can be used as environment variables in system_setup_commands. Example:
443+
{"GITHUB_TOKEN": "gh_secret"} makes 'gh_secret' available as GITHUB_TOKEN.
444+
433445
system_setup_commands: A list of commands to run to set up your system.
434446
435447
extra_headers: Send extra headers
@@ -451,6 +463,7 @@ def create_from_inspection(
451463
"file_mounts": file_mounts,
452464
"launch_parameters": launch_parameters,
453465
"metadata": metadata,
466+
"secrets": secrets,
454467
"system_setup_commands": system_setup_commands,
455468
},
456469
blueprint_create_from_inspection_params.BlueprintCreateFromInspectionParams,
@@ -561,6 +574,7 @@ def preview(
561574
file_mounts: Optional[Dict[str, str]] | Omit = omit,
562575
launch_parameters: Optional[LaunchParameters] | Omit = omit,
563576
metadata: Optional[Dict[str, str]] | Omit = omit,
577+
secrets: Optional[Dict[str, str]] | Omit = omit,
564578
services: Optional[Iterable[blueprint_preview_params.Service]] | Omit = omit,
565579
system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit,
566580
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -599,6 +613,11 @@ def preview(
599613
600614
metadata: (Optional) User defined metadata for the Blueprint.
601615
616+
secrets: (Optional) Map of mount IDs/environment variable names to secret names. Secrets
617+
will be available to commands during the build. Secrets are NOT stored in the
618+
blueprint image. Example: {"DB_PASS": "DATABASE_PASSWORD"} makes the secret
619+
'DATABASE_PASSWORD' available as environment variable 'DB_PASS'.
620+
602621
services: (Optional) List of containerized services to include in the Blueprint. These
603622
services will be pre-pulled during the build phase for optimized startup
604623
performance.
@@ -628,6 +647,7 @@ def preview(
628647
"file_mounts": file_mounts,
629648
"launch_parameters": launch_parameters,
630649
"metadata": metadata,
650+
"secrets": secrets,
631651
"services": services,
632652
"system_setup_commands": system_setup_commands,
633653
},
@@ -676,6 +696,7 @@ async def create(
676696
file_mounts: Optional[Dict[str, str]] | Omit = omit,
677697
launch_parameters: Optional[LaunchParameters] | Omit = omit,
678698
metadata: Optional[Dict[str, str]] | Omit = omit,
699+
secrets: Optional[Dict[str, str]] | Omit = omit,
679700
services: Optional[Iterable[blueprint_create_params.Service]] | Omit = omit,
680701
system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit,
681702
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -716,6 +737,11 @@ async def create(
716737
717738
metadata: (Optional) User defined metadata for the Blueprint.
718739
740+
secrets: (Optional) Map of mount IDs/environment variable names to secret names. Secrets
741+
will be available to commands during the build. Secrets are NOT stored in the
742+
blueprint image. Example: {"DB_PASS": "DATABASE_PASSWORD"} makes the secret
743+
'DATABASE_PASSWORD' available as environment variable 'DB_PASS'.
744+
719745
services: (Optional) List of containerized services to include in the Blueprint. These
720746
services will be pre-pulled during the build phase for optimized startup
721747
performance.
@@ -745,6 +771,7 @@ async def create(
745771
"file_mounts": file_mounts,
746772
"launch_parameters": launch_parameters,
747773
"metadata": metadata,
774+
"secrets": secrets,
748775
"services": services,
749776
"system_setup_commands": system_setup_commands,
750777
},
@@ -998,6 +1025,7 @@ async def create_from_inspection(
9981025
file_mounts: Optional[Dict[str, str]] | Omit = omit,
9991026
launch_parameters: Optional[LaunchParameters] | Omit = omit,
10001027
metadata: Optional[Dict[str, str]] | Omit = omit,
1028+
secrets: Optional[Dict[str, str]] | Omit = omit,
10011029
system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit,
10021030
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
10031031
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1024,6 +1052,10 @@ async def create_from_inspection(
10241052
10251053
metadata: (Optional) User defined metadata for the Blueprint.
10261054
1055+
secrets: (Optional) Map of mount IDs/environment variable names to secret names. Secrets
1056+
can be used as environment variables in system_setup_commands. Example:
1057+
{"GITHUB_TOKEN": "gh_secret"} makes 'gh_secret' available as GITHUB_TOKEN.
1058+
10271059
system_setup_commands: A list of commands to run to set up your system.
10281060
10291061
extra_headers: Send extra headers
@@ -1045,6 +1077,7 @@ async def create_from_inspection(
10451077
"file_mounts": file_mounts,
10461078
"launch_parameters": launch_parameters,
10471079
"metadata": metadata,
1080+
"secrets": secrets,
10481081
"system_setup_commands": system_setup_commands,
10491082
},
10501083
blueprint_create_from_inspection_params.BlueprintCreateFromInspectionParams,
@@ -1155,6 +1188,7 @@ async def preview(
11551188
file_mounts: Optional[Dict[str, str]] | Omit = omit,
11561189
launch_parameters: Optional[LaunchParameters] | Omit = omit,
11571190
metadata: Optional[Dict[str, str]] | Omit = omit,
1191+
secrets: Optional[Dict[str, str]] | Omit = omit,
11581192
services: Optional[Iterable[blueprint_preview_params.Service]] | Omit = omit,
11591193
system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit,
11601194
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1193,6 +1227,11 @@ async def preview(
11931227
11941228
metadata: (Optional) User defined metadata for the Blueprint.
11951229
1230+
secrets: (Optional) Map of mount IDs/environment variable names to secret names. Secrets
1231+
will be available to commands during the build. Secrets are NOT stored in the
1232+
blueprint image. Example: {"DB_PASS": "DATABASE_PASSWORD"} makes the secret
1233+
'DATABASE_PASSWORD' available as environment variable 'DB_PASS'.
1234+
11961235
services: (Optional) List of containerized services to include in the Blueprint. These
11971236
services will be pre-pulled during the build phase for optimized startup
11981237
performance.
@@ -1222,6 +1261,7 @@ async def preview(
12221261
"file_mounts": file_mounts,
12231262
"launch_parameters": launch_parameters,
12241263
"metadata": metadata,
1264+
"secrets": secrets,
12251265
"services": services,
12261266
"system_setup_commands": system_setup_commands,
12271267
},

src/runloop_api_client/types/blueprint_build_parameters.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ class BlueprintBuildParameters(BaseModel):
7676
metadata: Optional[Dict[str, str]] = None
7777
"""(Optional) User defined metadata for the Blueprint."""
7878

79+
secrets: Optional[Dict[str, str]] = None
80+
"""(Optional) Map of mount IDs/environment variable names to secret names.
81+
82+
Secrets will be available to commands during the build. Secrets are NOT stored
83+
in the blueprint image. Example: {"DB_PASS": "DATABASE_PASSWORD"} makes the
84+
secret 'DATABASE_PASSWORD' available as environment variable 'DB_PASS'.
85+
"""
86+
7987
services: Optional[List[Service]] = None
8088
"""(Optional) List of containerized services to include in the Blueprint.
8189

src/runloop_api_client/types/blueprint_create_from_inspection_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,12 @@ class BlueprintCreateFromInspectionParams(TypedDict, total=False):
3232
metadata: Optional[Dict[str, str]]
3333
"""(Optional) User defined metadata for the Blueprint."""
3434

35+
secrets: Optional[Dict[str, str]]
36+
"""(Optional) Map of mount IDs/environment variable names to secret names.
37+
38+
Secrets can be used as environment variables in system_setup_commands. Example:
39+
{"GITHUB_TOKEN": "gh_secret"} makes 'gh_secret' available as GITHUB_TOKEN.
40+
"""
41+
3542
system_setup_commands: Optional[SequenceNotStr[str]]
3643
"""A list of commands to run to set up your system."""

src/runloop_api_client/types/blueprint_create_params.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ class BlueprintCreateParams(TypedDict, total=False):
4848
metadata: Optional[Dict[str, str]]
4949
"""(Optional) User defined metadata for the Blueprint."""
5050

51+
secrets: Optional[Dict[str, str]]
52+
"""(Optional) Map of mount IDs/environment variable names to secret names.
53+
54+
Secrets will be available to commands during the build. Secrets are NOT stored
55+
in the blueprint image. Example: {"DB_PASS": "DATABASE_PASSWORD"} makes the
56+
secret 'DATABASE_PASSWORD' available as environment variable 'DB_PASS'.
57+
"""
58+
5159
services: Optional[Iterable[Service]]
5260
"""(Optional) List of containerized services to include in the Blueprint.
5361

src/runloop_api_client/types/blueprint_preview_params.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ class BlueprintPreviewParams(TypedDict, total=False):
4848
metadata: Optional[Dict[str, str]]
4949
"""(Optional) User defined metadata for the Blueprint."""
5050

51+
secrets: Optional[Dict[str, str]]
52+
"""(Optional) Map of mount IDs/environment variable names to secret names.
53+
54+
Secrets will be available to commands during the build. Secrets are NOT stored
55+
in the blueprint image. Example: {"DB_PASS": "DATABASE_PASSWORD"} makes the
56+
secret 'DATABASE_PASSWORD' available as environment variable 'DB_PASS'.
57+
"""
58+
5159
services: Optional[Iterable[Service]]
5260
"""(Optional) List of containerized services to include in the Blueprint.
5361

tests/api_resources/test_blueprints.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
6666
},
6767
},
6868
metadata={"foo": "string"},
69+
secrets={"foo": "string"},
6970
services=[
7071
{
7172
"image": "image",
@@ -254,6 +255,7 @@ def test_method_create_from_inspection_with_all_params(self, client: Runloop) ->
254255
},
255256
},
256257
metadata={"foo": "string"},
258+
secrets={"foo": "string"},
257259
system_setup_commands=["string"],
258260
)
259261
assert_matches_type(BlueprintView, blueprint, path=["response"])
@@ -400,6 +402,7 @@ def test_method_preview_with_all_params(self, client: Runloop) -> None:
400402
},
401403
},
402404
metadata={"foo": "string"},
405+
secrets={"foo": "string"},
403406
services=[
404407
{
405408
"image": "image",
@@ -491,6 +494,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
491494
},
492495
},
493496
metadata={"foo": "string"},
497+
secrets={"foo": "string"},
494498
services=[
495499
{
496500
"image": "image",
@@ -679,6 +683,7 @@ async def test_method_create_from_inspection_with_all_params(self, async_client:
679683
},
680684
},
681685
metadata={"foo": "string"},
686+
secrets={"foo": "string"},
682687
system_setup_commands=["string"],
683688
)
684689
assert_matches_type(BlueprintView, blueprint, path=["response"])
@@ -825,6 +830,7 @@ async def test_method_preview_with_all_params(self, async_client: AsyncRunloop)
825830
},
826831
},
827832
metadata={"foo": "string"},
833+
secrets={"foo": "string"},
828834
services=[
829835
{
830836
"image": "image",

0 commit comments

Comments
 (0)