diff --git a/.stats.yml b/.stats.yml index f5f614db49..1635b8c85a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1336 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f2571965a066e5ec176e3f8cb83d9cbf8889e42380a250bad505db2d18a4a772.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6a077023d5a748c646073f33bc20264fc7235f7fe9ce157d1f50f9914a3927e1.yml diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 0d358f8384..baf31c70fb 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -190,7 +190,7 @@ export interface CloudflareTunnel { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. diff --git a/src/resources/warp-connector.ts b/src/resources/warp-connector.ts index 371a307516..488d74b752 100644 --- a/src/resources/warp-connector.ts +++ b/src/resources/warp-connector.ts @@ -172,7 +172,7 @@ export namespace WARPConnectorCreateResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -294,7 +294,7 @@ export namespace WARPConnectorListResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -416,7 +416,7 @@ export namespace WARPConnectorDeleteResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -538,7 +538,7 @@ export namespace WARPConnectorEditResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -660,7 +660,7 @@ export namespace WARPConnectorGetResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -763,6 +763,15 @@ export interface WARPConnectorListParams extends V4PagePaginationArrayParams { */ name?: string; + /** + * Query param: The status of the tunnel. Valid values are `inactive` (tunnel has + * never been run), `degraded` (tunnel is active and able to serve traffic but in + * an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or + * `down` (tunnel can not serve traffic as it has no connections to the Cloudflare + * Edge). + */ + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; + /** * Query param: UUID of the tunnel. */ diff --git a/src/resources/zero-trust/tunnels/tunnels.ts b/src/resources/zero-trust/tunnels/tunnels.ts index 2d85ecbfe3..69b7c5a3c9 100644 --- a/src/resources/zero-trust/tunnels/tunnels.ts +++ b/src/resources/zero-trust/tunnels/tunnels.ts @@ -209,7 +209,7 @@ export namespace TunnelListResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -357,7 +357,7 @@ export namespace TunnelEditResponse { * state), `healthy` (tunnel is active and able to serve traffic), or `down` * (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). */ - status?: string; + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; /** * The type of tunnel. @@ -492,6 +492,15 @@ export interface TunnelListParams extends V4PagePaginationArrayParams { */ name?: string; + /** + * Query param: The status of the tunnel. Valid values are `inactive` (tunnel has + * never been run), `degraded` (tunnel is active and able to serve traffic but in + * an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or + * `down` (tunnel can not serve traffic as it has no connections to the Cloudflare + * Edge). + */ + status?: 'inactive' | 'degraded' | 'healthy' | 'down'; + /** * Query param: The types of tunnels to filter separated by a comma. */ diff --git a/tests/api-resources/warp-connector.test.ts b/tests/api-resources/warp-connector.test.ts index 9884a80e1f..f28ffdfba2 100644 --- a/tests/api-resources/warp-connector.test.ts +++ b/tests/api-resources/warp-connector.test.ts @@ -52,6 +52,7 @@ describe('resource warpConnector', () => { name: 'blog', page: 1, per_page: 1, + status: 'healthy', uuid: 'f70ff985-a4ef-4643-bbbc-4a0ed4fc8415', was_active_at: '2009-11-10T23:00:00Z', was_inactive_at: '2009-11-10T23:00:00Z', diff --git a/tests/api-resources/zero-trust/tunnels/tunnels.test.ts b/tests/api-resources/zero-trust/tunnels/tunnels.test.ts index a9d2d389e9..681ec6d857 100644 --- a/tests/api-resources/zero-trust/tunnels/tunnels.test.ts +++ b/tests/api-resources/zero-trust/tunnels/tunnels.test.ts @@ -56,6 +56,7 @@ describe('resource tunnels', () => { name: 'blog', page: 1, per_page: 1, + status: 'healthy', tun_types: 'cfd_tunnel,warp_connector', uuid: 'f70ff985-a4ef-4643-bbbc-4a0ed4fc8415', was_active_at: '2009-11-10T23:00:00Z',