import { isAbortError } from "./errors.js"; import { Interceptor, Transport } from "@connectrpc/connect"; //#region src/shared/transports.d.ts interface Transports { authApi: Transport; publicApi: Transport; } /** Connect transports available to services that call authenticated APIs. */ type AuthApiTransports = Pick; /** Connect transports available to services that call public APIs. */ type PublicApiTransports = Pick; /** Connect transports available to services that call both public and authenticated APIs. */ type AuthAndPublicApiTransports = Pick; /** * Generic JWT auth for HTTP/Connect endpoints that follow the Bearer token contract. */ interface JwtAuthProvider { kind: "jwt"; /** * Typically wraps the configured browser auth token storage. The SDK reads * the current value for every request and for every realtime auth check, so * keep this cheap and return the freshest credential rather than caching. */ getToken: () => string | null | Promise; } /** * Generic Ed25519 API key auth for HTTP/Connect endpoints that follow the * X-API-KEY-ID / X-API-TIMESTAMP / X-API-SIGNATURE contract. * * Each request is signed immediately before dispatch, but the runtime's fetch * may still queue it (connection limits). Bound concurrency for large bursts; * a request that waits past the backend's skew window fails with a retryable * `TimestampSkewError`, and retrying signs it again. */ interface ApiKeyEd25519AuthProvider { kind: "api-key-ed25519"; getKeyId: () => string | null | Promise; /** Ed25519 secret key bytes (not hex) for signing. */ getSecretKey: () => Uint8Array | null | Promise; } //#endregion export { ApiKeyEd25519AuthProvider, AuthAndPublicApiTransports, AuthApiTransports, JwtAuthProvider, PublicApiTransports, Transports }; //# sourceMappingURL=transports.d.ts.map