UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

38 lines • 1.27 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; export var BaseOutages = /* @__PURE__ */ (() => { class BaseOutages extends APIResource { /** * Retrieves the latest Internet outages and anomalies. * * @example * ```ts * const outage = await client.radar.annotations.outages.get(); * ``` */ get(query = {}, options) { return this._client.get('/radar/annotations/outages', { query, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieves the number of outages by location. * * @example * ```ts * const response = * await client.radar.annotations.outages.locations(); * ``` */ locations(query = {}, options) { return this._client.get('/radar/annotations/outages/locations', { query, ...options })._thenUnwrap((obj) => obj.result); } } BaseOutages._key = Object.freeze([ 'radar', 'annotations', 'outages', ]); return BaseOutages; })(); export class Outages extends BaseOutages { } //# sourceMappingURL=outages.mjs.map