cloudflare
Version:
The official TypeScript library for the Cloudflare API
90 lines • 2.85 kB
text/typescript
import { APIResource } from "../../../../core/resource.mjs";
import { PagePromise, V4PagePagination, type V4PagePaginationParams } from "../../../../core/pagination.mjs";
import { RequestOptions } from "../../../../internal/request-options.mjs";
export declare class BaseDevices extends APIResource {
static readonly _key: readonly ['zeroTrust', 'dex', 'commands', 'devices'];
/**
* List devices with WARP client support for remote captures which have been
* connected in the last 1 hour.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const deviceListResponse of client.zeroTrust.dex.commands.devices.list(
* {
* account_id: '01a7362d577a6c3019a474fd6f485823',
* page: 1,
* per_page: 10,
* },
* )) {
* // ...
* }
* ```
*/
list(params: DeviceListParams, options?: RequestOptions): PagePromise<DeviceListResponsesV4PagePagination, DeviceListResponse>;
}
export declare class Devices extends BaseDevices {
}
export type DeviceListResponsesV4PagePagination = V4PagePagination<DeviceListResponse>;
export interface DeviceListResponse {
/**
* List of eligible devices
*/
devices?: Array<DeviceListResponse.Device>;
}
export declare namespace DeviceListResponse {
interface Device {
/**
* Device identifier (UUID v4)
*/
deviceId?: string;
/**
* Device identifier (human readable)
*/
deviceName?: string;
/**
* Whether the device is eligible for remote captures
*/
eligible?: boolean;
/**
* If the device is not eligible, the reason why.
*/
ineligibleReason?: string;
/**
* User contact email address
*/
personEmail?: string;
/**
* Operating system.
*/
platform?: string;
/**
* Device registration identifier (UUID v4). On multi-user devices, this uniquely
* identifies a user's registration on the device.
*/
registrationId?: string;
/**
* Network status.
*/
status?: string;
timestamp?: string;
/**
* WARP client version.
*/
version?: string;
}
}
export interface DeviceListParams extends V4PagePaginationParams {
/**
* Path param: Unique Cloudflare account ID.
*/
account_id: string;
/**
* Query param: Filter devices by name or email.
*/
search?: string;
}
export declare namespace Devices {
export { type DeviceListResponse as DeviceListResponse, type DeviceListResponsesV4PagePagination as DeviceListResponsesV4PagePagination, type DeviceListParams as DeviceListParams, };
}
//# sourceMappingURL=devices.d.mts.map