import type { X278Fetch } from "./http.cjs"; export interface SmartBackendToken { readonly accessToken: string; readonly tokenType: string; readonly expiresAt: number; readonly scope?: string; } export interface SmartConfiguration { readonly token_endpoint: string; readonly token_endpoint_auth_methods_supported?: ReadonlyArray; readonly token_endpoint_auth_signing_alg_values_supported?: ReadonlyArray; readonly scopes_supported?: ReadonlyArray; readonly [key: string]: unknown; } export type SmartBackendAuthentication = { readonly method: "client-secret-basic"; readonly clientSecret: string; } | { readonly method: "client-secret-post"; readonly clientSecret: string; } | { readonly method: "private-key-jwt"; readonly privateKeyPem?: string; readonly keyId?: string; readonly alg?: "RS384" | string; readonly signJwt?: (header: SmartJwtHeader, claims: SmartClientAssertionClaims) => string | Promise; readonly assertionTtlSeconds?: number; }; export interface SmartBackendTokenProviderOptions { readonly tokenEndpoint: string | URL; readonly clientId: string; readonly scopes: string | ReadonlyArray; readonly authentication: SmartBackendAuthentication; readonly fetch?: X278Fetch; readonly now?: () => number; readonly randomUUID?: () => string; readonly cacheSkewSeconds?: number; } export interface SmartJwtHeader { readonly alg: string; readonly typ: "JWT"; readonly kid?: string; } export interface SmartClientAssertionClaims { readonly iss: string; readonly sub: string; readonly aud: string; readonly exp: number; readonly iat: number; readonly jti: string; } export declare const createSmartBackendTokenProvider: (options: SmartBackendTokenProviderOptions) => (() => Promise); export declare const discoverSmartConfiguration: (fhirBaseUrl: string | URL, fetcher?: X278Fetch) => Promise; //# sourceMappingURL=smart.d.cts.map