Skip to content

Commit 5c1bed3

Browse files
feat: chore(stlc): seal custom-code tracking files
Stainless-Generated-From: 8ac1635568224ca17c04e5c6f15ac6e66e31b932
1 parent 2937b10 commit 5c1bed3

4 files changed

Lines changed: 57 additions & 3 deletions

File tree

‎src/kernel/types/vault_provider_config.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Union
3+
from typing import Union, Optional
44
from datetime import datetime
55
from typing_extensions import Literal, Annotated, TypeAlias
66

@@ -30,6 +30,12 @@ class VaultLinkProviderConfig(BaseModel):
3030

3131
updated_at: datetime
3232

33+
publishable_key: Optional[str] = None
34+
"""Stripe publishable key sent to Link when refreshing and revoking wallet grants.
35+
36+
Omitted when not configured.
37+
"""
38+
3339

3440
class VaultAgentCardProviderConfig(BaseModel):
3541
"""Response schema for an AgentCard configuration, without secret credentials.

‎src/kernel/types/vault_provider_config_create_params.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ class VaultLinkProviderConfigRequestCredentials(TypedDict, total=False):
2828

2929
client_secret: Required[str]
3030

31+
publishable_key: str
32+
"""Stripe publishable key for the account that owns the Link OAuth client.
33+
34+
Link requires it as the bearer credential when Kernel refreshes or revokes
35+
imported wallet grants; without it, those wallets stop working when the imported
36+
access token expires.
37+
"""
38+
3139

3240
class VaultAgentCardProviderConfigRequest(TypedDict, total=False):
3341
credentials: Required[VaultAgentCardProviderConfigRequestCredentials]

‎src/kernel/types/vault_provider_config_update_params.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ class Credentials(TypedDict, total=False):
2626
"""
2727

2828
client_secret: str
29+
30+
publishable_key: str
31+
"""Link configurations only.
32+
33+
Stripe publishable key sent to Link when refreshing and revoking wallet grants.
34+
"""

‎tests/api_resources/test_vault_provider_configs.py‎

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ def test_method_create_overload_1(self, client: Kernel) -> None:
3333
)
3434
assert_matches_type(VaultProviderConfig, vault_provider_config, path=["response"])
3535

36+
@pytest.mark.skip(reason="Mock server tests are disabled")
37+
@parametrize
38+
def test_method_create_with_all_params_overload_1(self, client: Kernel) -> None:
39+
vault_provider_config = client.vault_provider_configs.create(
40+
credentials={
41+
"client_id": "x",
42+
"client_secret": "x",
43+
"publishable_key": "pk_test_lK9w2kI5J1",
44+
},
45+
name="name",
46+
provider="link",
47+
)
48+
assert_matches_type(VaultProviderConfig, vault_provider_config, path=["response"])
49+
3650
@pytest.mark.skip(reason="Mock server tests are disabled")
3751
@parametrize
3852
def test_raw_response_create_overload_1(self, client: Kernel) -> None:
@@ -173,7 +187,10 @@ def test_method_update(self, client: Kernel) -> None:
173187
def test_method_update_with_all_params(self, client: Kernel) -> None:
174188
vault_provider_config = client.vault_provider_configs.update(
175189
id_or_name="id_or_name",
176-
credentials={"client_secret": "x"},
190+
credentials={
191+
"client_secret": "x",
192+
"publishable_key": "pk_test_lK9w2kI5J1",
193+
},
177194
name="renamed-link-client",
178195
)
179196
assert_matches_type(VaultProviderConfig, vault_provider_config, path=["response"])
@@ -310,6 +327,20 @@ async def test_method_create_overload_1(self, async_client: AsyncKernel) -> None
310327
)
311328
assert_matches_type(VaultProviderConfig, vault_provider_config, path=["response"])
312329

330+
@pytest.mark.skip(reason="Mock server tests are disabled")
331+
@parametrize
332+
async def test_method_create_with_all_params_overload_1(self, async_client: AsyncKernel) -> None:
333+
vault_provider_config = await async_client.vault_provider_configs.create(
334+
credentials={
335+
"client_id": "x",
336+
"client_secret": "x",
337+
"publishable_key": "pk_test_lK9w2kI5J1",
338+
},
339+
name="name",
340+
provider="link",
341+
)
342+
assert_matches_type(VaultProviderConfig, vault_provider_config, path=["response"])
343+
313344
@pytest.mark.skip(reason="Mock server tests are disabled")
314345
@parametrize
315346
async def test_raw_response_create_overload_1(self, async_client: AsyncKernel) -> None:
@@ -450,7 +481,10 @@ async def test_method_update(self, async_client: AsyncKernel) -> None:
450481
async def test_method_update_with_all_params(self, async_client: AsyncKernel) -> None:
451482
vault_provider_config = await async_client.vault_provider_configs.update(
452483
id_or_name="id_or_name",
453-
credentials={"client_secret": "x"},
484+
credentials={
485+
"client_secret": "x",
486+
"publishable_key": "pk_test_lK9w2kI5J1",
487+
},
454488
name="renamed-link-client",
455489
)
456490
assert_matches_type(VaultProviderConfig, vault_provider_config, path=["response"])

0 commit comments

Comments
 (0)