cloudflare
Version:
The official TypeScript library for the Cloudflare API
37 lines • 1.33 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Graphql = exports.BaseGraphql = 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 BaseGraphql = /* @__PURE__ */ (() => {
class BaseGraphql extends resource_1.APIResource {
/**
* Execute GraphQL aggregations over threat events. Supports multi-dimensional
* group-bys, optional date range filtering, and multi-dataset aggregation.
*
* @example
* ```ts
* const graphql =
* await client.cloudforceOne.threatEvents.graphql.create({
* account_id: 'account_id',
* });
* ```
*/
create(params, options) {
const { account_id } = params;
return this._client.post((0, path_1.path) `/accounts/${account_id}/cloudforce-one/events/graphql`, options);
}
}
BaseGraphql._key = Object.freeze([
'cloudforceOne',
'threatEvents',
'graphql',
]);
return BaseGraphql;
})();
exports.BaseGraphql = BaseGraphql;
class Graphql extends BaseGraphql {
}
exports.Graphql = Graphql;
//# sourceMappingURL=graphql.js.map