UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

41 lines • 1.42 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseAuthorities = /* @__PURE__ */ (() => { class BaseAuthorities extends APIResource { /** * Retrieves a list of certificate authorities. * * @example * ```ts * const authorities = * await client.radar.ct.authorities.list(); * ``` */ list(query = {}, options) { return this._client.get('/radar/ct/authorities', { query, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieves the requested CA information. * * @example * ```ts * const authority = await client.radar.ct.authorities.get( * '24EDD4E503A8D3FDB5FFB4AF66C887359901CBE687A5A0760D10A08EED99A7C3', * ); * ``` */ get(caSlug, query = {}, options) { return this._client.get(path `/radar/ct/authorities/${caSlug}`, { query, ...options })._thenUnwrap((obj) => obj.result); } } BaseAuthorities._key = Object.freeze([ 'radar', 'ct', 'authorities', ]); return BaseAuthorities; })(); export class Authorities extends BaseAuthorities { } //# sourceMappingURL=authorities.mjs.map