UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

47 lines • 1.91 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 BaseSkills = /* @__PURE__ */ (() => { class BaseSkills extends APIResource { /** * Replaces the ordered custom skills assigned to a Threat Signals feed. * * @example * ```ts * const skill = * await client.cloudforceOne.threatSignals.feeds.skills.update( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { * account_id: 'account_id', * skill_ids: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], * }, * ); * ``` */ update(feedID, params, options) { const { account_id, ...body } = params; return this._client.put(path `/accounts/${account_id}/cloudforce-one/v2/threat-signals/feeds/${feedID}/skills`, { body, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieves the effective skill pipeline for a Threat Signals feed. * * @example * ```ts * const skill = * await client.cloudforceOne.threatSignals.feeds.skills.get( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: 'account_id' }, * ); * ``` */ get(feedID, params, options) { const { account_id } = params; return this._client.get(path `/accounts/${account_id}/cloudforce-one/v2/threat-signals/feeds/${feedID}/skills`, options)._thenUnwrap((obj) => obj.result); } } BaseSkills._key = Object.freeze(['cloudforceOne', 'threatSignals', 'feeds', 'skills']); return BaseSkills; })(); export class Skills extends BaseSkills { } //# sourceMappingURL=skills.mjs.map