UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

26 lines 1.23 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; import { isRequestOptions } from 'cloudflare/core'; import * as SummaryAPI from 'cloudflare/resources/radar/attacks/layer3/summary'; import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/attacks/layer3/timeseries-groups'; import * as TopAPI from 'cloudflare/resources/radar/attacks/layer3/top/top'; export class Layer3 extends APIResource { constructor() { super(...arguments); this.summary = new SummaryAPI.Summary(this._client); this.timeseriesGroups = new TimeseriesGroupsAPI.TimeseriesGroups(this._client); this.top = new TopAPI.Top(this._client); } timeseries(query = {}, options) { if (isRequestOptions(query)) { return this.timeseries({}, query); } return this._client.get('/radar/attacks/layer3/timeseries', { query, ...options })._thenUnwrap((obj) => obj.result); } } (function (Layer3) { Layer3.Summary = SummaryAPI.Summary; Layer3.TimeseriesGroups = TimeseriesGroupsAPI.TimeseriesGroups; Layer3.Top = TopAPI.Top; })(Layer3 || (Layer3 = {})); //# sourceMappingURL=layer3.mjs.map