From 0ebe5f1f007fd53267ac096e044f9fd513c28d7b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 17:27:23 +0000 Subject: [PATCH 1/2] feat: Http proxy --- .stats.yml | 4 ++-- proxy.go | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ proxy_test.go | 3 ++- 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2223539..0af2575 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-a880f2209deafc4a011da42eb52f1dac0308d18ae1daa1d7253edc3385c9b1c4.yml -openapi_spec_hash: ae5af3810d28e49a68b12f2bb2d2af0e +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/proxy.go b/proxy.go index 271bf0e..c04c542 100644 --- a/proxy.go +++ b/proxy.go @@ -92,6 +92,10 @@ type ProxyNewResponse struct { LastChecked time.Time `json:"last_checked" format:"date-time"` // Readable name of the proxy. Name string `json:"name"` + // Protocol to use for the proxy connection. + // + // Any of "http", "https". + Protocol ProxyNewResponseProtocol `json:"protocol"` // Current health status of the proxy. // // Any of "available", "unavailable". @@ -103,6 +107,7 @@ type ProxyNewResponse struct { Config respjson.Field LastChecked respjson.Field Name respjson.Field + Protocol respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field raw string @@ -345,6 +350,14 @@ func (r *ProxyNewResponseConfigCustomProxyConfig) UnmarshalJSON(data []byte) err return apijson.UnmarshalRoot(data, r) } +// Protocol to use for the proxy connection. +type ProxyNewResponseProtocol string + +const ( + ProxyNewResponseProtocolHTTP ProxyNewResponseProtocol = "http" + ProxyNewResponseProtocolHTTPS ProxyNewResponseProtocol = "https" +) + // Current health status of the proxy. type ProxyNewResponseStatus string @@ -367,6 +380,10 @@ type ProxyGetResponse struct { LastChecked time.Time `json:"last_checked" format:"date-time"` // Readable name of the proxy. Name string `json:"name"` + // Protocol to use for the proxy connection. + // + // Any of "http", "https". + Protocol ProxyGetResponseProtocol `json:"protocol"` // Current health status of the proxy. // // Any of "available", "unavailable". @@ -378,6 +395,7 @@ type ProxyGetResponse struct { Config respjson.Field LastChecked respjson.Field Name respjson.Field + Protocol respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field raw string @@ -620,6 +638,14 @@ func (r *ProxyGetResponseConfigCustomProxyConfig) UnmarshalJSON(data []byte) err return apijson.UnmarshalRoot(data, r) } +// Protocol to use for the proxy connection. +type ProxyGetResponseProtocol string + +const ( + ProxyGetResponseProtocolHTTP ProxyGetResponseProtocol = "http" + ProxyGetResponseProtocolHTTPS ProxyGetResponseProtocol = "https" +) + // Current health status of the proxy. type ProxyGetResponseStatus string @@ -642,6 +668,10 @@ type ProxyListResponse struct { LastChecked time.Time `json:"last_checked" format:"date-time"` // Readable name of the proxy. Name string `json:"name"` + // Protocol to use for the proxy connection. + // + // Any of "http", "https". + Protocol ProxyListResponseProtocol `json:"protocol"` // Current health status of the proxy. // // Any of "available", "unavailable". @@ -653,6 +683,7 @@ type ProxyListResponse struct { Config respjson.Field LastChecked respjson.Field Name respjson.Field + Protocol respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field raw string @@ -895,6 +926,14 @@ func (r *ProxyListResponseConfigCustomProxyConfig) UnmarshalJSON(data []byte) er return apijson.UnmarshalRoot(data, r) } +// Protocol to use for the proxy connection. +type ProxyListResponseProtocol string + +const ( + ProxyListResponseProtocolHTTP ProxyListResponseProtocol = "http" + ProxyListResponseProtocolHTTPS ProxyListResponseProtocol = "https" +) + // Current health status of the proxy. type ProxyListResponseStatus string @@ -913,6 +952,10 @@ type ProxyNewParams struct { Name param.Opt[string] `json:"name,omitzero"` // Configuration specific to the selected proxy `type`. Config ProxyNewParamsConfigUnion `json:"config,omitzero"` + // Protocol to use for the proxy connection. + // + // Any of "http", "https". + Protocol ProxyNewParamsProtocol `json:"protocol,omitzero"` paramObj } @@ -1209,3 +1252,11 @@ func (r ProxyNewParamsConfigCreateCustomProxyConfig) MarshalJSON() (data []byte, func (r *ProxyNewParamsConfigCreateCustomProxyConfig) UnmarshalJSON(data []byte) error { return apijson.UnmarshalRoot(data, r) } + +// Protocol to use for the proxy connection. +type ProxyNewParamsProtocol string + +const ( + ProxyNewParamsProtocolHTTP ProxyNewParamsProtocol = "http" + ProxyNewParamsProtocolHTTPS ProxyNewParamsProtocol = "https" +) diff --git a/proxy_test.go b/proxy_test.go index 84725c7..20b01a0 100644 --- a/proxy_test.go +++ b/proxy_test.go @@ -33,7 +33,8 @@ func TestProxyNewWithOptionalParams(t *testing.T) { Country: "US", }, }, - Name: kernel.String("name"), + Name: kernel.String("name"), + Protocol: kernel.ProxyNewParamsProtocolHTTP, }) if err != nil { var apierr *kernel.Error From 8a4c3c9ce85c0bfc16ec847a4b04ca6632a2c4ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 17:27:41 +0000 Subject: [PATCH 2/2] release: 0.14.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 2 +- internal/version.go | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d52d2b9..a26ebfc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.13.0" + ".": "0.14.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c8f49e..a2006a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.14.0 (2025-10-03) + +Full Changelog: [v0.13.0...v0.14.0](https://github.com/onkernel/kernel-go-sdk/compare/v0.13.0...v0.14.0) + +### Features + +* Http proxy ([0ebe5f1](https://github.com/onkernel/kernel-go-sdk/commit/0ebe5f1f007fd53267ac096e044f9fd513c28d7b)) + ## 0.13.0 (2025-10-01) Full Changelog: [v0.12.0...v0.13.0](https://github.com/onkernel/kernel-go-sdk/compare/v0.12.0...v0.13.0) diff --git a/README.md b/README.md index 3bc4230..df317d7 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Or to pin the version: ```sh -go get -u 'github.com/onkernel/kernel-go-sdk@v0.13.0' +go get -u 'github.com/onkernel/kernel-go-sdk@v0.14.0' ``` diff --git a/internal/version.go b/internal/version.go index 871f096..870e575 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.13.0" // x-release-please-version +const PackageVersion = "0.14.0" // x-release-please-version