UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

49 lines • 2.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Reports = exports.BaseReports = void 0; const tslib_1 = require("../../../../internal/tslib.js"); // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../../core/resource.js"); const BytimesAPI = tslib_1.__importStar(require("./bytimes.js")); const bytimes_1 = require("./bytimes.js"); const path_1 = require("../../../../internal/utils/path.js"); var BaseReports = /* @__PURE__ */ (() => { class BaseReports extends resource_1.APIResource { /** * Retrieves a list of summarised aggregate metrics over a given time period. * * See * [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) * for detailed information about the available query parameters. * * @deprecated This endpoint is deprecated. See [the API deprecation notice](https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#2025-12-09). */ get(dnsFirewallID, params, options) { const { account_id, ...query } = params; return this._client.get((0, path_1.path) `/accounts/${account_id}/dns_firewall/${dnsFirewallID}/dns_analytics/report`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseReports._key = Object.freeze([ 'dnsFirewall', 'analytics', 'reports', ]); return BaseReports; })(); exports.BaseReports = BaseReports; var Reports = /* @__PURE__ */ (() => { class Reports extends BaseReports { constructor() { super(...arguments); this.bytimes = new BytimesAPI.Bytimes(this._client); } } Reports.Bytimes = bytimes_1.Bytimes; Reports.BaseBytimes = bytimes_1.BaseBytimes; return Reports; })(); exports.Reports = Reports; //# sourceMappingURL=reports.js.map