UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

32 lines • 1.14 kB
// 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 BaseGraphql = /* @__PURE__ */ (() => { class BaseGraphql extends 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(path `/accounts/${account_id}/cloudforce-one/events/graphql`, options); } } BaseGraphql._key = Object.freeze([ 'cloudforceOne', 'threatEvents', 'graphql', ]); return BaseGraphql; })(); export class Graphql extends BaseGraphql { } //# sourceMappingURL=graphql.mjs.map