cloudflare
Version:
The official TypeScript library for the Cloudflare API
52 lines • 2.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Skills = exports.BaseSkills = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../../core/resource.js");
const path_1 = require("../../../../internal/utils/path.js");
var BaseSkills = /* @__PURE__ */ (() => {
class BaseSkills extends resource_1.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((0, path_1.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((0, path_1.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;
})();
exports.BaseSkills = BaseSkills;
class Skills extends BaseSkills {
}
exports.Skills = Skills;
//# sourceMappingURL=skills.js.map