cloudflare
Version:
The official TypeScript library for the Cloudflare API
65 lines • 2.35 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import * as AuthoritiesAPI from "./authorities.mjs";
import { Authorities, BaseAuthorities, } from "./authorities.mjs";
import * as LogsAPI from "./logs.mjs";
import { BaseLogs, Logs } from "./logs.mjs";
import { path } from "../../../internal/utils/path.mjs";
export var BaseCT = /* @__PURE__ */ (() => {
class BaseCT extends 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(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(path `/radar/ct/timeseries_groups/${dimension}`, { query, ...options })._thenUnwrap((obj) => obj.result);
}
}
BaseCT._key = Object.freeze(['radar', 'ct']);
return BaseCT;
})();
export 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;
CT.BaseAuthorities = BaseAuthorities;
CT.Logs = Logs;
CT.BaseLogs = BaseLogs;
return CT;
})();
//# sourceMappingURL=ct.mjs.map