cloudflare
Version:
The official TypeScript library for the Cloudflare API
51 lines • 1.77 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 BaseRaw = /* @__PURE__ */ (() => {
class BaseRaw extends APIResource {
/**
* Partially updates raw threat event data in Cloudforce One, modifying specific
* fields of the event.
*
* @example
* ```ts
* const response =
* await client.cloudforceOne.threatEvents.raw.edit(
* 'raw_id',
* { account_id: 'account_id', event_id: 'event_id' },
* );
* ```
*/
edit(rawID, params, options) {
const { account_id, event_id, ...body } = params;
return this._client.patch(path `/accounts/${account_id}/cloudforce-one/events/${event_id}/raw/${rawID}`, {
body,
...options,
});
}
/**
* Retrieves raw threat event data for a specific event in Cloudforce One.
*
* @example
* ```ts
* const raw = await client.cloudforceOne.threatEvents.raw.get(
* 'raw_id',
* { account_id: 'account_id', event_id: 'event_id' },
* );
* ```
*/
get(rawID, params, options) {
const { account_id, event_id } = params;
return this._client.get(path `/accounts/${account_id}/cloudforce-one/events/${event_id}/raw/${rawID}`, options);
}
}
BaseRaw._key = Object.freeze([
'cloudforceOne',
'threatEvents',
'raw',
]);
return BaseRaw;
})();
export class Raw extends BaseRaw {
}
//# sourceMappingURL=raw.mjs.map