UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

43 lines • 1.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Outages = exports.BaseOutages = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../core/resource.js"); var BaseOutages = /* @__PURE__ */ (() => { class BaseOutages extends resource_1.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; })(); exports.BaseOutages = BaseOutages; class Outages extends BaseOutages { } exports.Outages = Outages; //# sourceMappingURL=outages.js.map