cloudflare
Version:
The official TypeScript library for the Cloudflare API
36 lines • 1.21 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 BaseSearch = /* @__PURE__ */ (() => {
class BaseSearch extends APIResource {
/**
* Searches the account's Threat Signals articles using keyword and semantic
* retrieval.
*
* @example
* ```ts
* const response =
* await client.cloudforceOne.threatSignals.search.search({
* account_id: 'account_id',
* query: 'x',
* });
* ```
*/
search(params, options) {
const { account_id, ...query } = params;
return this._client.get(path `/accounts/${account_id}/cloudforce-one/v2/threat-signals/search`, {
query,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseSearch._key = Object.freeze([
'cloudforceOne',
'threatSignals',
'search',
]);
return BaseSearch;
})();
export class Search extends BaseSearch {
}
//# sourceMappingURL=search.mjs.map