Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#818)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 6, 2024
1 parent 678c075 commit f15d3ae
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/resources/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
19 changes: 14 additions & 5 deletions src/resources/warp-connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down
13 changes: 11 additions & 2 deletions src/resources/zero-trust/tunnels/tunnels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down
1 change: 1 addition & 0 deletions tests/api-resources/warp-connector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions tests/api-resources/zero-trust/tunnels/tunnels.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit f15d3ae

Please sign in to comment.