UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

71 lines • 2.65 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CT = exports.BaseCT = void 0; const tslib_1 = require("../../../internal/tslib.js"); // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../core/resource.js"); const AuthoritiesAPI = tslib_1.__importStar(require("./authorities.js")); const authorities_1 = require("./authorities.js"); const LogsAPI = tslib_1.__importStar(require("./logs.js")); const logs_1 = require("./logs.js"); const path_1 = require("../../../internal/utils/path.js"); var BaseCT = /* @__PURE__ */ (() => { class BaseCT extends resource_1.APIResource { /** * Retrieves an aggregated summary of certificates grouped by the specified * dimension. * * @example * ```ts * const response = await client.radar.ct.summary('CA'); * ``` */ summary(dimension, query = {}, options) { return this._client.get((0, path_1.path) `/radar/ct/summary/${dimension}`, { query, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieves certificate volume over time. * * @example * ```ts * const response = await client.radar.ct.timeseries(); * ``` */ timeseries(query = {}, options) { return this._client.get('/radar/ct/timeseries', { query, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieves the distribution of certificates grouped by the specified dimension * over time. * * @example * ```ts * const response = await client.radar.ct.timeseriesGroups( * 'CA', * ); * ``` */ timeseriesGroups(dimension, query = {}, options) { return this._client.get((0, path_1.path) `/radar/ct/timeseries_groups/${dimension}`, { query, ...options })._thenUnwrap((obj) => obj.result); } } BaseCT._key = Object.freeze(['radar', 'ct']); return BaseCT; })(); exports.BaseCT = BaseCT; var CT = /* @__PURE__ */ (() => { class CT extends BaseCT { constructor() { super(...arguments); this.authorities = new AuthoritiesAPI.Authorities(this._client); this.logs = new LogsAPI.Logs(this._client); } } CT.Authorities = authorities_1.Authorities; CT.BaseAuthorities = authorities_1.BaseAuthorities; CT.Logs = logs_1.Logs; CT.BaseLogs = logs_1.BaseLogs; return CT; })(); exports.CT = CT; //# sourceMappingURL=ct.js.map