UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

33 lines • 1.24 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 BaseContext = /* @__PURE__ */ (() => { class BaseContext extends APIResource { /** * Returns the full context payload for an insight. This endpoint is used for * insights with large payloads that are not included inline in the list response. * * @example * ```ts * const context = * await client.securityCenter.insights.context.get( * 'issue_id', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(issueID, params, options) { const { account_id } = params; return this._client.get(path `/accounts/${account_id}/security-center/insights/${issueID}/context`, options)._thenUnwrap((obj) => obj.result); } } BaseContext._key = Object.freeze([ 'securityCenter', 'insights', 'context', ]); return BaseContext; })(); export class Context extends BaseContext { } //# sourceMappingURL=context.mjs.map