import { OAuthAuth } from "./config.js"; import { r as TokenSet, t as AuthDeps, u as OuraError } from "./auth-J8KbkPsW.js"; import { Either } from "functype"; //#region src/login.d.ts /** Build the Oura authorization URL for the browser consent step. Pure and unit-testable. */ declare const buildAuthorizeUrl: (auth: OAuthAuth, state: string) => string; type LoginDeps = AuthDeps & { /** Override the browser opener (tests / headless). */ readonly open?: (url: string) => void; readonly log?: (message: string) => void; }; /** * Run the one-time authorization-code flow: print + open the consent URL, capture the redirect on * a local one-shot HTTP server, exchange the code, and persist the resulting {@link TokenSet}. * The refresh token then lives only in the token store, rotated by the running server. */ declare const runLogin: (auth: OAuthAuth, deps?: LoginDeps) => Promise>; //#endregion export { LoginDeps, buildAuthorizeUrl, runLogin }; //# sourceMappingURL=login.d.ts.map