import type { PageResult } from '@timeback/internal-client-infra'; /** * Common interface for resources that support streaming/listing. * * All OneRoster resource classes implement this interface, allowing * generic code to work with any resource type. * * @typeParam T - The entity type returned by the resource */ export interface StreamableResource { /** * List the first page of resources. * @returns Promise resolving to the first page (data + pagination metadata) */ list(params?: Record): Promise>; /** * List all resources, fetching all pages automatically. * @returns Promise resolving to an array of all matching resources */ listAll?(params?: Record): Promise; /** * Get the first matching resource, or undefined if none match. * @returns The first matching resource, or undefined */ first?(params?: Record): Promise; /** * Stream resources with lazy pagination. * @returns Async iterable for streaming results */ stream(params?: Record): AsyncIterable; /** * Get a single resource by sourcedId. */ get(sourcedId: string): Promise; } //# sourceMappingURL=streamable.d.ts.map