import type { RequestOptions } from "../base-client"; import type { RequestBuilder } from "../request-builder"; /** A single namespace within a surface, containing scopes and a description. */ export interface ScopeNamespace { /** Human-readable description of this namespace. */ description: string; /** List of scope strings (e.g., "extraction:read", "extraction:create"). */ scopes: string[]; } /** A surface grouping: description, applicable key types, and namespaced scopes. */ export interface ScopeSurface { /** Human-readable description of this API surface. */ description: string; /** API key prefixes applicable to this surface. */ key_types: string[]; /** Scopes organized by namespace. */ namespaces: Record; } /** Full scope catalog response from GET /scopes. */ export interface ScopeCatalog { /** End-user operations (sk_app_, sk_tenant_ + Bearer). */ client: ScopeSurface; /** ISV/tenant administration (sk_srv_, sk_tenant_ + Bearer). */ isv: ScopeSurface; /** Platform operations (sk_sys_) — all scopes. */ platform: ScopeSurface; } /** * Scopes namespace factory (admin surface). * * Provides read-only access to the platform scope catalog, organized * by API surface and namespace. Useful when building API key creation * UIs where ISVs select scopes for server keys. * * @param rb - The request builder used for API communication. * @returns Scopes namespace with `list`. */ export declare function createScopesNamespace(rb: RequestBuilder): { /** * List all available API key scopes grouped by surface and namespace. * * @param reqOptions - Optional request options. * @returns Scope catalog with client, isv, and platform surfaces. * * @example * ```typescript * const admin = new GptAdmin({ apiKey: 'sk_srv_...' }); * * const catalog = await admin.scopes.list(); * * // Get all ISV-relevant scopes for server key creation * for (const [ns, info] of Object.entries(catalog.isv.namespaces)) { * console.log(`${ns}: ${info.scopes.join(', ')}`); * } * ``` */ list(reqOptions?: RequestOptions): Promise; }; //# sourceMappingURL=scopes.d.ts.map