UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

98 lines • 3 kB
import { APIResource } from "../../../../core/resource.mjs"; import { APIPromise } from "../../../../core/api-promise.mjs"; import { RequestOptions } from "../../../../internal/request-options.mjs"; export declare class BaseSkills extends APIResource { static readonly _key: readonly ['cloudforceOne', 'threatSignals', 'feeds', 'skills']; /** * 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: string, params: SkillUpdateParams, options?: RequestOptions): APIPromise<SkillUpdateResponse>; /** * 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: string, params: SkillGetParams, options?: RequestOptions): APIPromise<SkillGetResponse>; } export declare class Skills extends BaseSkills { } export interface SkillUpdateResponse { feed_id: string; skills: Array<SkillUpdateResponse.Skill>; } export declare namespace SkillUpdateResponse { interface Skill { /** * Zero-based pipeline position. */ position: number; skill_id: string; } } export interface SkillGetResponse { feed_id: string; skills: Array<SkillGetResponse.Skill>; } export declare namespace SkillGetResponse { interface Skill { id: string; /** * JSON-encoded skill configuration. Always null for default skills. */ config: string | null; created_at: string; /** * 1 when active, 0 when inactive. */ is_active: number; name: string; /** * JSON-encoded JSON Schema the skill output must satisfy. */ output_schema: string | null; prompt: string; /** * `default` for Cloudforce One managed skills (read-only), `custom` for account * skills. */ source: 'default' | 'custom'; type: string; updated_at: string; } } export interface SkillUpdateParams { /** * Path param */ account_id: string; /** * Body param */ skill_ids: Array<string>; } export interface SkillGetParams { account_id: string; } export declare namespace Skills { export { type SkillUpdateResponse as SkillUpdateResponse, type SkillGetResponse as SkillGetResponse, type SkillUpdateParams as SkillUpdateParams, type SkillGetParams as SkillGetParams, }; } //# sourceMappingURL=skills.d.mts.map