cloudflare
Version:
The official TypeScript library for the Cloudflare API
56 lines • 1.95 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Raw = exports.BaseRaw = 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 BaseRaw = /* @__PURE__ */ (() => {
class BaseRaw extends resource_1.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((0, path_1.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((0, path_1.path) `/accounts/${account_id}/cloudforce-one/events/${event_id}/raw/${rawID}`, options);
}
}
BaseRaw._key = Object.freeze([
'cloudforceOne',
'threatEvents',
'raw',
]);
return BaseRaw;
})();
exports.BaseRaw = BaseRaw;
class Raw extends BaseRaw {
}
exports.Raw = Raw;
//# sourceMappingURL=raw.js.map