export declare function isAllowedReturnUrl(url: string): boolean; /** Fallback origin used when the return URL param is missing or disallowed. */ export type ResolveReturnUrlOptions = { /** App-specific fallback (e.g. its own origin) used when the param is missing/disallowed. */ defaultReturnUrl?: string; }; export declare function resolveReturnUrl(searchParams: URLSearchParams, fallbackOrgId?: number | string | null, opts?: ResolveReturnUrlOptions): string | null; export type AccountHandoffConfig = { sourceApp: string; /** The app's `VITE_ACCOUNT_UI` (may be empty). */ accountUiBase?: string; /** This app's dev port, e.g. "3002". */ appLocalPort: string; /** Account's dev port. Defaults to "3000". */ accountLocalPort?: string; /** The app's `VITE_FORCE_REMOTE_ACCOUNT_UI === "true"`. */ forceRemote?: boolean; /** Where Account returns the user to. Defaults to this app's own origin. */ buildReturnUrl?: (orgId?: number | string | null) => string; }; /** Query values carried to Account: source app, return URL, org and token. */ export type AccountHandoffLinkOptions = { sourceApp?: string; returnUrl?: string; orgId?: number | string | null; token?: string | null; }; /** Link options plus the user to open on the Account users page. */ export type AccountHandoffUsersOptions = AccountHandoffLinkOptions & { userId?: number | string | null; }; export type AccountHandoff = { resolveAccountUiBase: () => string; buildUsersPageUrl: (options?: AccountHandoffUsersOptions) => string; navigateToUsersPage: (options?: AccountHandoffUsersOptions) => void; buildOrganizationPageUrl: (options?: AccountHandoffLinkOptions) => string; navigateToOrganizationPage: (options?: AccountHandoffLinkOptions) => void; }; export declare function createAccountHandoff(config: AccountHandoffConfig): AccountHandoff;