UNPKG

@anthropic-ai/sdk

Version:
33 lines • 1.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RateLimits = void 0; const resource_1 = require("../../../../core/resource.js"); const pagination_1 = require("../../../../core/pagination.js"); const path_1 = require("../../../../internal/utils/path.js"); class RateLimits extends resource_1.APIResource { /** * List rate-limit overrides configured for a workspace. * * Returns only the groups and limiter types that have a workspace-level override. * Groups without overrides inherit the organization limits and are not listed; use * `GET /v1/organizations/rate_limits` to see those. * * When `limit` is omitted, every matching entry is returned in a single page; when * `limit` truncates the result, follow `next_page` to fetch the remaining entries. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const betaWorkspaceRateLimit of client.beta.organization.workspaces.rateLimits.list( * 'workspace_id', * )) { * // ... * } * ``` */ list(workspaceID, query = {}, options) { return this._client.getAPIList((0, path_1.path) `/v1/organizations/workspaces/${workspaceID}/rate_limits?beta=true`, (pagination_1.PageCursor), { query, ...options }); } } exports.RateLimits = RateLimits; //# sourceMappingURL=rate-limits.js.map