UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

35 lines 1.51 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../resource.mjs"; import { isRequestOptions } from "../../../core.mjs"; import * as AuthoritiesAPI from "./authorities.mjs"; import { Authorities, } from "./authorities.mjs"; import * as LogsAPI from "./logs.mjs"; import { Logs } from "./logs.mjs"; export class Ct extends APIResource { constructor() { super(...arguments); this.authorities = new AuthoritiesAPI.Authorities(this._client); this.logs = new LogsAPI.Logs(this._client); } summary(dimension, query = {}, options) { if (isRequestOptions(query)) { return this.summary(dimension, {}, query); } return this._client.get(`/radar/ct/summary/${dimension}`, { query, ...options })._thenUnwrap((obj) => obj.result); } timeseries(query = {}, options) { if (isRequestOptions(query)) { return this.timeseries({}, query); } return this._client.get('/radar/ct/timeseries', { query, ...options })._thenUnwrap((obj) => obj.result); } timeseriesGroups(dimension, query = {}, options) { if (isRequestOptions(query)) { return this.timeseriesGroups(dimension, {}, query); } return this._client.get(`/radar/ct/timeseries_groups/${dimension}`, { query, ...options })._thenUnwrap((obj) => obj.result); } } Ct.Authorities = Authorities; Ct.Logs = Logs; //# sourceMappingURL=ct.mjs.map