UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

72 lines • 2.73 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import * as SummaryAPI from "./summary.mjs"; import { BaseSummary, Summary, } from "./summary.mjs"; import * as TimeseriesGroupsAPI from "./timeseries-groups.mjs"; import { BaseTimeseriesGroups, TimeseriesGroups, } from "./timeseries-groups.mjs"; import * as TopAPI from "./top.mjs"; import { BaseTop, Top, } from "./top.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseAS112 = /* @__PURE__ */ (() => { class BaseAS112 extends APIResource { /** * Retrieves the distribution of AS112 queries by the specified dimension. * * @example * ```ts * const response = await client.radar.as112.summaryV2( * 'DNSSEC', * ); * ``` */ summaryV2(dimension, query = {}, options) { return this._client.get(path `/radar/as112/summary/${dimension}`, { query, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieves the AS112 DNS queries over time. * * @example * ```ts * const response = await client.radar.as112.timeseries(); * ``` */ timeseries(query = {}, options) { return this._client.get('/radar/as112/timeseries', { query, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieves the distribution of AS112 queries grouped by dimension over time. * * @example * ```ts * const response = * await client.radar.as112.timeseriesGroupsV2('DNSSEC'); * ``` */ timeseriesGroupsV2(dimension, query = {}, options) { return this._client.get(path `/radar/as112/timeseries_groups/${dimension}`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseAS112._key = Object.freeze(['radar', 'as112']); return BaseAS112; })(); export var AS112 = /* @__PURE__ */ (() => { class AS112 extends BaseAS112 { constructor() { super(...arguments); this.summary = new SummaryAPI.Summary(this._client); this.timeseriesGroups = new TimeseriesGroupsAPI.TimeseriesGroups(this._client); this.top = new TopAPI.Top(this._client); } } AS112.Summary = Summary; AS112.BaseSummary = BaseSummary; AS112.TimeseriesGroups = TimeseriesGroups; AS112.BaseTimeseriesGroups = BaseTimeseriesGroups; AS112.Top = Top; AS112.BaseTop = BaseTop; return AS112; })(); //# sourceMappingURL=as112.mjs.map