import { CustomPagePrompt, PageComponentKey, PageVersionEntry, PageVersions, getCustomPagePrompts, getLatestPageVersions } from "./page-component-versions.js"; //#region src/interface/handler-urls.d.ts /** * @deprecated Plain string URLs are deprecated. Use `{ type: "custom", url: "...", version: 0 }` instead. */ type DeprecatedStringUrl = string; type HandlerPageUrls = Record<"handler" | "signIn" | "signUp" | "signOut" | "emailVerification" | "passwordReset" | "forgotPassword" | "oauthCallback" | "magicLinkCallback" | "accountSettings" | "teamInvitation" | "cliAuthConfirm" | "mfa" | "error" | "onboarding", DeprecatedStringUrl | { type: "custom"; url: string; version: number; } | { type: "hosted" | "handler-component"; }>; type HandlerRedirectUrls = Record<"afterSignIn" | "afterSignUp" | "afterSignOut" | "home", string>; type HandlerUrls = HandlerPageUrls & HandlerRedirectUrls; type HandlerUrlTarget = HandlerUrls[keyof HandlerUrls]; /** * The default handler URL target, applied to any key not explicitly set. * * - `{ type: "handler-component" }` — render the page inside the local `StackHandler` component (current default, may change in the next breaking version). * - `{ type: "hosted" }` — redirect to Stack's hosted auth pages. */ type DefaultHandlerUrlTarget = { type: "hosted" | "handler-component"; }; /** * Configuration for where each auth page/redirect lives. * * **`default`** — fallback target for every key not set individually: * - `{ type: "handler-component" }` — use the local `StackHandler` (current default, may change in the next breaking version). * - `{ type: "hosted" }` — use Stack's hosted auth pages. * * **Page keys** (`signIn`, `signUp`, `signOut`, `emailVerification`, `passwordReset`, * `forgotPassword`, `oauthCallback`, `magicLinkCallback`, `accountSettings`, * `teamInvitation`, `cliAuthConfirm`, `mfa`, `error`, `onboarding`, `handler`): * - A URL string (e.g. `"/my-sign-in"`) — custom path. * - `{ type: "custom", url: "...", version: 0 }` — custom URL with version tracking. * - `{ type: "hosted" }` — Stack's hosted page. * - `{ type: "handler-component" }` — local `StackHandler`. * * **Redirect keys** (`afterSignIn`, `afterSignUp`, `afterSignOut`, `home`): * - A URL string (e.g. `"/dashboard"`) — where to redirect after the action. */ type HandlerUrlOptions = Partial & { default?: DefaultHandlerUrlTarget; }; type ResolvedHandlerUrls = { [K in keyof HandlerUrls]: string }; //#endregion export { type CustomPagePrompt, DefaultHandlerUrlTarget, HandlerPageUrls, HandlerRedirectUrls, HandlerUrlOptions, HandlerUrlTarget, HandlerUrls, type PageComponentKey, type PageVersionEntry, type PageVersions, ResolvedHandlerUrls, getCustomPagePrompts, getLatestPageVersions }; //# sourceMappingURL=handler-urls.d.ts.map