cloudflare
Version:
The official TypeScript library for the Cloudflare API
48 lines • 1.71 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Colos = exports.BaseColos = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../core/resource.js");
const pagination_1 = require("../../../core/pagination.js");
const path_1 = require("../../../internal/utils/path.js");
var BaseColos = /* @__PURE__ */ (() => {
class BaseColos extends resource_1.APIResource {
/**
* List Cloudflare colos that account's devices were connected to during a time
* period, sorted by usage starting from the most used colo. Colos without traffic
* are also returned and sorted alphabetically.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const coloListResponse of client.zeroTrust.dex.colos.list(
* {
* account_id: '01a7362d577a6c3019a474fd6f485823',
* from: '2023-08-20T20:45:00Z',
* to: '2023-08-24T20:45:00Z',
* },
* )) {
* // ...
* }
* ```
*/
list(params, options) {
const { account_id, ...query } = params;
return this._client.getAPIList((0, path_1.path) `/accounts/${account_id}/dex/colos`, (pagination_1.SinglePage), {
query,
...options,
});
}
}
BaseColos._key = Object.freeze([
'zeroTrust',
'dex',
'colos',
]);
return BaseColos;
})();
exports.BaseColos = BaseColos;
class Colos extends BaseColos {
}
exports.Colos = Colos;
//# sourceMappingURL=colos.js.map