UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

41 lines • 1.68 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Entitlements = exports.BaseEntitlements = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../core/resource.js"); const pagination_1 = require("../../core/pagination.js"); const path_1 = require("../../internal/utils/path.js"); var BaseEntitlements = /* @__PURE__ */ (() => { class BaseEntitlements extends resource_1.APIResource { /** * Returns the list of entitlements (features and their allocations) for a given * account. Each entitlement describes a product feature the account is permitted * to use and the allocation value (boolean, count, range, enum, or string) that * governs its behaviour. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const entitlementListResponse of client.accounts.entitlements.list( * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } * ``` */ list(params, options) { const { account_id } = params; return this._client.getAPIList((0, path_1.path) `/accounts/${account_id}/entitlements`, (pagination_1.SinglePage), options); } } BaseEntitlements._key = Object.freeze([ 'accounts', 'entitlements', ]); return BaseEntitlements; })(); exports.BaseEntitlements = BaseEntitlements; class Entitlements extends BaseEntitlements { } exports.Entitlements = Entitlements; //# sourceMappingURL=entitlements.js.map