UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

36 lines • 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Account = exports.BaseAccount = 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 BaseAccount = /* @__PURE__ */ (() => { class BaseAccount extends resource_1.APIResource { /** * Get the current DNS record usage and quota for an account. May include internal * DNS usage and quota. * * @example * ```ts * const account = await client.dns.usage.account.get({ * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ get(params, options) { const { account_id } = params; return this._client.get((0, path_1.path) `/accounts/${account_id}/dns_records/usage`, options)._thenUnwrap((obj) => obj.result); } } BaseAccount._key = Object.freeze([ 'dns', 'usage', 'account', ]); return BaseAccount; })(); exports.BaseAccount = BaseAccount; class Account extends BaseAccount { } exports.Account = Account; //# sourceMappingURL=account.js.map