UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

41 lines • 1.44 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../../core/resource.mjs"; import { V4PagePaginationArray, } from "../../../../core/pagination.mjs"; import { path } from "../../../../internal/utils/path.mjs"; export var BaseDevices = /* @__PURE__ */ (() => { class BaseDevices extends APIResource { /** * List details of devices using WARP. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const deviceListResponse of client.zeroTrust.dex.fleetStatus.devices.list( * { * account_id: '01a7362d577a6c3019a474fd6f485823', * from: '2023-10-11 00:00:00+00', * page: 1, * per_page: 10, * to: '2023-10-11 00:00:00+00', * }, * )) { * // ... * } * ``` */ list(params, options) { const { account_id, ...query } = params; return this._client.getAPIList(path `/accounts/${account_id}/dex/fleet-status/devices`, (V4PagePaginationArray), { query, ...options }); } } BaseDevices._key = Object.freeze([ 'zeroTrust', 'dex', 'fleetStatus', 'devices', ]); return BaseDevices; })(); export class Devices extends BaseDevices { } //# sourceMappingURL=devices.mjs.map