diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a7130553..d52d2b97 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.12.0" + ".": "0.13.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index a1c1d77e..0af2575f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 51 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-d0090ff3ef876c554e7a1281d5cbe1666cf68aebfc60e05cb7f4302ee377b372.yml -openapi_spec_hash: 33fef541c420a28125f18cd1efc0d585 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-8a6175a75caa75c3de5400edf97a34e526ac3f62c63955375437461581deb0c2.yml +openapi_spec_hash: 1a880e4ce337a0e44630e6d87ef5162a config_hash: 49c2ff978aaa5ccb4ce324a72f116010 diff --git a/CHANGELOG.md b/CHANGELOG.md index bad9531c..7dd12e91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.13.0 (2025-10-03) + +Full Changelog: [v0.12.0...v0.13.0](https://github.com/onkernel/kernel-python-sdk/compare/v0.12.0...v0.13.0) + +### Features + +* Http proxy ([2664172](https://github.com/onkernel/kernel-python-sdk/commit/266417290f174a560ad0f820a22efb3c2eb35a67)) +* Update oAPI and data model for proxy status ([014d704](https://github.com/onkernel/kernel-python-sdk/commit/014d704dc98e19579c7a55a618c6e5e52a42edc6)) + ## 0.12.0 (2025-09-30) Full Changelog: [v0.11.5...v0.12.0](https://github.com/onkernel/kernel-python-sdk/compare/v0.11.5...v0.12.0) diff --git a/pyproject.toml b/pyproject.toml index 04817a16..a44ee3cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "kernel" -version = "0.12.0" +version = "0.13.0" description = "The official Python library for the kernel API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/kernel/_version.py b/src/kernel/_version.py index 77b8fbde..eed10067 100644 --- a/src/kernel/_version.py +++ b/src/kernel/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "kernel" -__version__ = "0.12.0" # x-release-please-version +__version__ = "0.13.0" # x-release-please-version diff --git a/src/kernel/resources/proxies.py b/src/kernel/resources/proxies.py index 886c423b..ba6862f8 100644 --- a/src/kernel/resources/proxies.py +++ b/src/kernel/resources/proxies.py @@ -51,6 +51,7 @@ def create( type: Literal["datacenter", "isp", "residential", "mobile", "custom"], config: proxy_create_params.Config | Omit = omit, name: str | Omit = omit, + protocol: Literal["http", "https"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -69,6 +70,8 @@ def create( name: Readable name of the proxy. + protocol: Protocol to use for the proxy connection. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -84,6 +87,7 @@ def create( "type": type, "config": config, "name": name, + "protocol": protocol, }, proxy_create_params.ProxyCreateParams, ), @@ -207,6 +211,7 @@ async def create( type: Literal["datacenter", "isp", "residential", "mobile", "custom"], config: proxy_create_params.Config | Omit = omit, name: str | Omit = omit, + protocol: Literal["http", "https"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -225,6 +230,8 @@ async def create( name: Readable name of the proxy. + protocol: Protocol to use for the proxy connection. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -240,6 +247,7 @@ async def create( "type": type, "config": config, "name": name, + "protocol": protocol, }, proxy_create_params.ProxyCreateParams, ), diff --git a/src/kernel/types/proxy_create_params.py b/src/kernel/types/proxy_create_params.py index 7af31f4a..beb8a233 100644 --- a/src/kernel/types/proxy_create_params.py +++ b/src/kernel/types/proxy_create_params.py @@ -30,6 +30,9 @@ class ProxyCreateParams(TypedDict, total=False): name: str """Readable name of the proxy.""" + protocol: Literal["http", "https"] + """Protocol to use for the proxy connection.""" + class ConfigDatacenterProxyConfig(TypedDict, total=False): country: Required[str] diff --git a/src/kernel/types/proxy_create_response.py b/src/kernel/types/proxy_create_response.py index 42be61d1..84290af8 100644 --- a/src/kernel/types/proxy_create_response.py +++ b/src/kernel/types/proxy_create_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Union, Optional +from datetime import datetime from typing_extensions import Literal, TypeAlias from .._models import BaseModel @@ -175,5 +176,14 @@ class ProxyCreateResponse(BaseModel): config: Optional[Config] = None """Configuration specific to the selected proxy `type`.""" + last_checked: Optional[datetime] = None + """Timestamp of the last health check performed on this proxy.""" + name: Optional[str] = None """Readable name of the proxy.""" + + protocol: Optional[Literal["http", "https"]] = None + """Protocol to use for the proxy connection.""" + + status: Optional[Literal["available", "unavailable"]] = None + """Current health status of the proxy.""" diff --git a/src/kernel/types/proxy_list_response.py b/src/kernel/types/proxy_list_response.py index 99367c84..cd804f32 100644 --- a/src/kernel/types/proxy_list_response.py +++ b/src/kernel/types/proxy_list_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Union, Optional +from datetime import datetime from typing_extensions import Literal, TypeAlias from .._models import BaseModel @@ -176,8 +177,17 @@ class ProxyListResponseItem(BaseModel): config: Optional[ProxyListResponseItemConfig] = None """Configuration specific to the selected proxy `type`.""" + last_checked: Optional[datetime] = None + """Timestamp of the last health check performed on this proxy.""" + name: Optional[str] = None """Readable name of the proxy.""" + protocol: Optional[Literal["http", "https"]] = None + """Protocol to use for the proxy connection.""" + + status: Optional[Literal["available", "unavailable"]] = None + """Current health status of the proxy.""" + ProxyListResponse: TypeAlias = List[ProxyListResponseItem] diff --git a/src/kernel/types/proxy_retrieve_response.py b/src/kernel/types/proxy_retrieve_response.py index cb4b4649..f70ea705 100644 --- a/src/kernel/types/proxy_retrieve_response.py +++ b/src/kernel/types/proxy_retrieve_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Union, Optional +from datetime import datetime from typing_extensions import Literal, TypeAlias from .._models import BaseModel @@ -175,5 +176,14 @@ class ProxyRetrieveResponse(BaseModel): config: Optional[Config] = None """Configuration specific to the selected proxy `type`.""" + last_checked: Optional[datetime] = None + """Timestamp of the last health check performed on this proxy.""" + name: Optional[str] = None """Readable name of the proxy.""" + + protocol: Optional[Literal["http", "https"]] = None + """Protocol to use for the proxy connection.""" + + status: Optional[Literal["available", "unavailable"]] = None + """Current health status of the proxy.""" diff --git a/tests/api_resources/test_proxies.py b/tests/api_resources/test_proxies.py index de295bfa..484848fe 100644 --- a/tests/api_resources/test_proxies.py +++ b/tests/api_resources/test_proxies.py @@ -32,6 +32,7 @@ def test_method_create_with_all_params(self, client: Kernel) -> None: type="datacenter", config={"country": "US"}, name="name", + protocol="http", ) assert_matches_type(ProxyCreateResponse, proxy, path=["response"]) @@ -194,6 +195,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncKernel) -> type="datacenter", config={"country": "US"}, name="name", + protocol="http", ) assert_matches_type(ProxyCreateResponse, proxy, path=["response"])