export interface StudioApplication { application_id: string; application_name?: string; environment: string; version: number; revision_id: string; contract_hash: string; flow_hash?: string; } export interface StudioField { name: string; type: string; required?: boolean; optional?: boolean; reference?: string; } export interface StudioRelationship { name: string; source_collection: string; target_collection: string; cardinality: 'one' | 'many'; foreign_field: string; reference?: { collection: string; id: string; }; } export interface StudioCollectionSchema { collection: string; description?: string; fields: StudioField[]; relationships: StudioRelationship[]; } export interface StudioSchema { application: { application_id: string; environment: string; }; contract_version: number; collections: StudioCollectionSchema[]; } export interface StudioRecordPage { collection: string; records: Array>; pagination: { limit: number; nextCursor: string | null; }; state_version: number; } export interface StudioRecordDetail { collection: string; record: Record; relationships: StudioRelationship[]; } /** * Resolve the application scope used for record inspection. * * Local/stdio Studio can begin without an application query parameter. In * that case the schema discovery boundary identifies the active application, * and every subsequent data request must use that identity explicitly. */ export declare function resolveStudioApplicationId(configured: string, schema?: StudioSchema): string; export declare class ServiceApiError extends Error { readonly code: string; readonly status: number; constructor(code: string, message: string, status: number); } export interface ServiceApiOptions { baseUrl?: string; token?: string; applicationId: string; environment: string; fetch?: typeof globalThis.fetch; } export declare class StudioServiceApi { private readonly options; private readonly fetcher; constructor(options: ServiceApiOptions); private get; application(): Promise; schema(): Promise; records(collection: string, cursor?: string, filters?: Record, limit?: number): Promise; record(collection: string, id: string): Promise; } export declare function isSecretField(name: string): boolean; export declare function safeDisplayValue(field: StudioField, value: unknown): unknown; export declare function serviceApiErrorMessage(error: unknown, collection?: string): string; //# sourceMappingURL=service-api.d.ts.map