/** * Client Configuration Types * * Types for configuring the OneRoster client. */ import type { BaseTransportConfig, ClientConfig, OneRosterPaths, PaginatedResponse, ProviderClientConfig, RequestOptions, ResolvedProvider, TransportOnlyConfig } from '@timeback/internal-client-infra'; export type { Environment, EnvAuth, ExplicitAuth, Platform } from '@timeback/internal-client-infra'; export type { TimebackProvider, ProviderAuth } from '@timeback/internal-client-infra'; /** * Transport interface for OneRoster client. * * Extends base transport requirements with OneRoster-specific paths and pagination. * Required when using transport mode with OneRosterClient. */ export interface OneRosterTransportLike { /** Base URL of the API */ baseUrl: string; /** API path profiles for OneRoster operations */ paths: OneRosterPaths; /** Make an authenticated request */ request(path: string, options?: RequestOptions): Promise; /** Check whether a resource exists */ exists(path: string, options?: RequestOptions): Promise; /** Make a raw request, returning the Response object (useful for binary responses) */ requestRaw(path: string, options?: RequestOptions): Promise; /** Make a paginated request using header-based pagination */ requestPaginated(path: string, options?: RequestOptions): Promise>; } /** * Configuration options for creating a OneRosterClient. * * Accepts one of six mutually exclusive modes: * 1. **Provider**: Provide a pre-built `TimebackProvider` instance * 2. **Explicit**: Provide `baseUrl` and `auth` with `authUrl` * 3. **Environment**: Provide `platform?`, `env` and `auth` (URLs derived automatically) * 4. **Token Provider**: Provide `platform?`, `env` and `tokenProvider` (shared auth) * 5. **Transport**: Provide a pre-configured `transport` instance with paths * 6. **Env Vars**: Omit config entirely (reads from environment variables) * * The `platform` field selects which Timeback implementation to use: * - `'BEYOND_AI'` (default): BeyondAI's Timeback platform * - `'LEARNWITH_AI'`: Samy's LearnWith.ai platform */ export type OneRosterClientConfig = ClientConfig | TransportOnlyConfig | ProviderClientConfig; /** * Configuration for OneRoster transport. */ export type OneRosterTransportConfig = BaseTransportConfig & { /** API path profiles for OneRoster operations */ paths: OneRosterPaths; }; /** * Resolved provider type for OneRoster client. */ export type OneRosterResolvedProvider = ResolvedProvider; /** * Instance type of OneRosterClient. */ export type OneRosterClientInstance = InstanceType; //# sourceMappingURL=client.d.ts.map