cloudflare
Version:
The official TypeScript library for the Cloudflare API
31 lines • 1.11 kB
JavaScript
// 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 BaseCategories = /* @__PURE__ */ (() => {
class BaseCategories extends APIResource {
/**
* Lists the predefined categories that can be assigned to feeds.
*
* @example
* ```ts
* const categories =
* await client.cloudforceOne.threatSignals.categories.list({
* account_id: 'account_id',
* });
* ```
*/
list(params, options) {
const { account_id } = params;
return this._client.get(path `/accounts/${account_id}/cloudforce-one/v2/threat-signals/categories`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseCategories._key = Object.freeze([
'cloudforceOne',
'threatSignals',
'categories',
]);
return BaseCategories;
})();
export class Categories extends BaseCategories {
}
//# sourceMappingURL=categories.mjs.map