Skip to content

Commit

Permalink
feat: update via SDK Studio (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Mar 12, 2024
1 parent 91f8b66 commit 7740992
Show file tree
Hide file tree
Showing 17 changed files with 213 additions and 245 deletions.
23 changes: 8 additions & 15 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4561,31 +4561,24 @@ Methods:

### FleetStatus

#### Devices

Types:

- <code><a href="./src/resources/zero-trust/dex/fleet-status/devices.ts">DigitalExperienceMonitoringDevice</a></code>
- <code><a href="./src/resources/zero-trust/dex/fleet-status/fleet-status.ts">FleetStatusLiveResponse</a></code>

Methods:

- <code title="get /accounts/{account_id}/dex/fleet-status/devices">client.zeroTrust.dex.fleetStatus.devices.<a href="./src/resources/zero-trust/dex/fleet-status/devices.ts">list</a>({ ...params }) -> DigitalExperienceMonitoringDevicesV4PagePaginationArray</code>
- <code title="get /accounts/{account_id}/dex/fleet-status/live">client.zeroTrust.dex.fleetStatus.<a href="./src/resources/zero-trust/dex/fleet-status/fleet-status.ts">live</a>({ ...params }) -> FleetStatusLiveResponse</code>
- <code title="get /accounts/{account_id}/dex/fleet-status/over-time">client.zeroTrust.dex.fleetStatus.<a href="./src/resources/zero-trust/dex/fleet-status/fleet-status.ts">overTime</a>({ ...params }) -> void</code>

#### Live
#### Devices

Types:

- <code><a href="./src/resources/zero-trust/dex/fleet-status/live.ts">LiveListResponse</a></code>

Methods:

- <code title="get /accounts/{account_id}/dex/fleet-status/live">client.zeroTrust.dex.fleetStatus.live.<a href="./src/resources/zero-trust/dex/fleet-status/live.ts">list</a>({ ...params }) -> LiveListResponse</code>

#### OverTime
- <code><a href="./src/resources/zero-trust/dex/fleet-status/devices.ts">DigitalExperienceMonitoringDevice</a></code>

Methods:

- <code title="get /accounts/{account_id}/dex/fleet-status/over-time">client.zeroTrust.dex.fleetStatus.overTime.<a href="./src/resources/zero-trust/dex/fleet-status/over-time.ts">list</a>({ ...params }) -> void</code>
- <code title="get /accounts/{account_id}/dex/fleet-status/devices">client.zeroTrust.dex.fleetStatus.devices.<a href="./src/resources/zero-trust/dex/fleet-status/devices.ts">list</a>({ ...params }) -> DigitalExperienceMonitoringDevicesV4PagePaginationArray</code>

### HTTPTests

Expand All @@ -4605,7 +4598,7 @@ Types:

Methods:

- <code title="get /accounts/{account_id}/dex/http-tests/{test_id}/percentiles">client.zeroTrust.dex.httpTests.percentiles.<a href="./src/resources/zero-trust/dex/http-tests/percentiles.ts">list</a>(testId, { ...params }) -> DigitalExperienceMonitoringHTTPDetailsPercentiles</code>
- <code title="get /accounts/{account_id}/dex/http-tests/{test_id}/percentiles">client.zeroTrust.dex.httpTests.percentiles.<a href="./src/resources/zero-trust/dex/http-tests/percentiles.ts">get</a>(testId, { ...params }) -> DigitalExperienceMonitoringHTTPDetailsPercentiles</code>

### Tests

Expand Down Expand Up @@ -4638,7 +4631,7 @@ Types:

Methods:

- <code title="get /accounts/{account_id}/dex/traceroute-test-results/{test_result_id}/network-path">client.zeroTrust.dex.tracerouteTestResults.networkPath.<a href="./src/resources/zero-trust/dex/traceroute-test-results/network-path.ts">list</a>(testResultId, { ...params }) -> DigitalExperienceMonitoringTracerouteTestResultNetworkPath</code>
- <code title="get /accounts/{account_id}/dex/traceroute-test-results/{test_result_id}/network-path">client.zeroTrust.dex.tracerouteTestResults.networkPath.<a href="./src/resources/zero-trust/dex/traceroute-test-results/network-path.ts">get</a>(testResultId, { ...params }) -> DigitalExperienceMonitoringTracerouteTestResultNetworkPath</code>

### TracerouteTests

Expand Down
3 changes: 3 additions & 0 deletions src/resources/zero-trust/dex/dex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export namespace DEX {
export import ColoListResponse = ColosAPI.ColoListResponse;
export import ColoListParams = ColosAPI.ColoListParams;
export import FleetStatus = FleetStatusAPI.FleetStatus;
export import FleetStatusLiveResponse = FleetStatusAPI.FleetStatusLiveResponse;
export import FleetStatusLiveParams = FleetStatusAPI.FleetStatusLiveParams;
export import FleetStatusOverTimeParams = FleetStatusAPI.FleetStatusOverTimeParams;
export import HTTPTests = HTTPTestsAPI.HTTPTests;
export import DigitalExperienceMonitoringHTTPDetails = HTTPTestsAPI.DigitalExperienceMonitoringHTTPDetails;
export import HTTPTestGetParams = HTTPTestsAPI.HTTPTestGetParams;
Expand Down
151 changes: 142 additions & 9 deletions src/resources/zero-trust/dex/fleet-status/fleet-status.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,157 @@
// File generated from our OpenAPI spec by Stainless.

import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as FleetStatusAPI from 'cloudflare/resources/zero-trust/dex/fleet-status/fleet-status';
import * as DevicesAPI from 'cloudflare/resources/zero-trust/dex/fleet-status/devices';
import * as LiveAPI from 'cloudflare/resources/zero-trust/dex/fleet-status/live';
import * as OverTimeAPI from 'cloudflare/resources/zero-trust/dex/fleet-status/over-time';

export class FleetStatus extends APIResource {
devices: DevicesAPI.Devices = new DevicesAPI.Devices(this._client);
live: LiveAPI.Live = new LiveAPI.Live(this._client);
overTime: OverTimeAPI.OverTime = new OverTimeAPI.OverTime(this._client);

/**
* List details for live (up to 60 minutes) devices using WARP
*/
live(
params: FleetStatusLiveParams,
options?: Core.RequestOptions,
): Core.APIPromise<FleetStatusLiveResponse> {
const { account_id, ...query } = params;
return (
this._client.get(`/accounts/${account_id}/dex/fleet-status/live`, {
query,
...options,
}) as Core.APIPromise<{ result: FleetStatusLiveResponse }>
)._thenUnwrap((obj) => obj.result);
}

/**
* List details for devices using WARP, up to 7 days
*/
overTime(params: FleetStatusOverTimeParams, options?: Core.RequestOptions): Core.APIPromise<void> {
const { account_id, ...query } = params;
return this._client.get(`/accounts/${account_id}/dex/fleet-status/over-time`, {
query,
...options,
headers: { Accept: '*/*', ...options?.headers },
});
}
}

export interface FleetStatusLiveResponse {
deviceStats?: FleetStatusLiveResponse.DeviceStats;
}

export namespace FleetStatusLiveResponse {
export interface DeviceStats {
byColo?: Array<DeviceStats.ByColo> | null;

byMode?: Array<DeviceStats.ByMode> | null;

byPlatform?: Array<DeviceStats.ByPlatform> | null;

byStatus?: Array<DeviceStats.ByStatus> | null;

byVersion?: Array<DeviceStats.ByVersion> | null;

/**
* Number of unique devices
*/
uniqueDevicesTotal?: number;
}

export namespace DeviceStats {
export interface ByColo {
/**
* Number of unique devices
*/
uniqueDevicesTotal?: number;

value?: string;
}

export interface ByMode {
/**
* Number of unique devices
*/
uniqueDevicesTotal?: number;

value?: string;
}

export interface ByPlatform {
/**
* Number of unique devices
*/
uniqueDevicesTotal?: number;

value?: string;
}

export interface ByStatus {
/**
* Number of unique devices
*/
uniqueDevicesTotal?: number;

value?: string;
}

export interface ByVersion {
/**
* Number of unique devices
*/
uniqueDevicesTotal?: number;

value?: string;
}
}
}

export interface FleetStatusLiveParams {
/**
* Path param:
*/
account_id: string;

/**
* Query param: Number of minutes before current time
*/
since_minutes: number;
}

export interface FleetStatusOverTimeParams {
/**
* Path param:
*/
account_id: string;

/**
* Query param: Timestamp in ISO format
*/
time_end: string;

/**
* Query param: Timestamp in ISO format
*/
time_start: string;

/**
* Query param: Cloudflare colo
*/
colo?: string;

/**
* Query param: Device-specific ID, given as UUID v4
*/
device_id?: string;
}

export namespace FleetStatus {
export import FleetStatusLiveResponse = FleetStatusAPI.FleetStatusLiveResponse;
export import FleetStatusLiveParams = FleetStatusAPI.FleetStatusLiveParams;
export import FleetStatusOverTimeParams = FleetStatusAPI.FleetStatusOverTimeParams;
export import Devices = DevicesAPI.Devices;
export import DigitalExperienceMonitoringDevice = DevicesAPI.DigitalExperienceMonitoringDevice;
export import DigitalExperienceMonitoringDevicesV4PagePaginationArray = DevicesAPI.DigitalExperienceMonitoringDevicesV4PagePaginationArray;
export import DeviceListParams = DevicesAPI.DeviceListParams;
export import Live = LiveAPI.Live;
export import LiveListResponse = LiveAPI.LiveListResponse;
export import LiveListParams = LiveAPI.LiveListParams;
export import OverTime = OverTimeAPI.OverTime;
export import OverTimeListParams = OverTimeAPI.OverTimeListParams;
}
9 changes: 6 additions & 3 deletions src/resources/zero-trust/dex/fleet-status/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export {
DigitalExperienceMonitoringDevicesV4PagePaginationArray,
Devices,
} from './devices';
export { FleetStatus } from './fleet-status';
export { LiveListResponse, LiveListParams, Live } from './live';
export { OverTimeListParams, OverTime } from './over-time';
export {
FleetStatusLiveResponse,
FleetStatusLiveParams,
FleetStatusOverTimeParams,
FleetStatus,
} from './fleet-status';
107 changes: 0 additions & 107 deletions src/resources/zero-trust/dex/fleet-status/live.ts

This file was deleted.

Loading

0 comments on commit 7740992

Please sign in to comment.