export { D as DocyrusAuthContext, a as DocyrusAuthProvider, b as DocyrusAuthProviderProps, u as useDocyrusAuth, c as useDocyrusClient } from './use-docyrus-client-C9uiHma9.js'; import { G as GuidyRoute, H as HostNavigationHandler, v as HostNotificationHandler, p as MsGraphClient, w as HostNavigationRequestOptions, h as DocyrusCalendarEventPayload, m as DocyrusSharePayload, i as DocyrusEmailPayload, e as AuthStatus } from './types-BcLDyMdw.js'; export { A as AclOperation, a as AclTargetType, b as AdaptiveCard, x as AppNavigationRequestMessage, y as AppRouteChangeMessage, c as AuthMode, C as CalendarSendAckMessage, z as CalendarSendMessage, B as ChatSendAckMessage, E as ChatSendMessage, F as DocySendAckMessage, I as DocySendMessage, f as DocyrusAclRule, D as DocyrusAuthConfig, g as DocyrusAuthContextValue, J as DocyrusNotification, j as DocyrusPermission, k as DocyrusRole, l as DocyrusShareAdaptiveCardPayload, n as DocyrusShareTextPayload, o as DocyrusUser, K as EmailSendAckMessage, L as EmailSendMessage, N as GuidyCommandHandler, Q as GuidyCommandMessage, S as GuidyElement, T as GuidyElementsMessage, U as GuidyPointAckMessage, V as GuidyPointMessage, W as GuidyRoutesMessage, X as GuidyScanMessage, Y as HostNavigationMessage, Z as HostNotificationMessage, _ as HostSignInMessage, $ as IframeAuth, M as MsGraphAccount, q as MsGraphRequest, a0 as MsGraphRequestMessage, r as MsGraphRequestOptions, s as MsGraphResponse, a1 as MsGraphResponseMessage, t as MsGraphStatus, a2 as MsGraphStatusRequestMessage, a3 as MsGraphStatusResponseMessage, P as PermissionConfig, u as PermissionScope, R as RouteChangePayload, a4 as TokenRefreshRequestMessage } from './types-BcLDyMdw.js'; import * as react from 'react'; import { CSSProperties, ReactNode } from 'react'; export { A as AuthManager, D as DEFAULT_API_URL, d as DEFAULT_CALLBACK_PATH, a as DEFAULT_OAUTH_SCOPES, e as DEFAULT_SSR_COOKIE_KEY, g as getAllRoles, b as getAllowedOperations, h as hasPermission, c as hasRole } from './constants-C9ezX9zG.js'; export { GuidyBridge, StandaloneOAuth2Auth, detectAuthMode } from './core-index.js'; import '@docyrus/api-client'; /** * Auto-sync the embedded app's route to the host on every history change. * Equivalent to setting `syncRouteToHost: true` on the provider, but * scoped to wherever this hook is mounted (typically the app shell). * Safe to call once per app. No-op outside iframe mode. */ declare function useDocyrusHostRouteSync(): void; /** * Subscribe to host `navigation` messages from within an embedded iframe/WebView. * The latest handler closure is always invoked — no need to memoize. * No-op in non-iframe modes. */ declare function useDocyrusHostNavigation(handler: HostNavigationHandler): void; /** * Subscribe to host `notification` messages from within an embedded iframe/WebView. * The latest handler closure is always invoked — no need to memoize. * No-op in non-iframe modes. */ declare function useDocyrusHostNotification(handler: HostNotificationHandler): void; /** * Get a stable function that asks the host shell to navigate to a path/URL * from within an embedded iframe/WebView. The reverse of * `useDocyrusHostNavigation`. No-op in non-iframe modes. */ declare function useDocyrusRequestHostNavigation(): (url: string, options?: HostNavigationRequestOptions) => void; /** * Declare the routes the host assistant (Guidy) may navigate the user to * inside this embedded app. Re-syncs whenever `routes` changes. Requires * `enableGuidyBridge` on the provider; no-op in non-iframe modes. */ declare function useDocyrusGuidyRoutes(routes: GuidyRoute[]): void; /** * Get a stable function that hands a payload to the host AI assistant (Docy) * from within an embedded iframe/WebView. Resolves when the host acknowledges * delivery; rejects on host error or timeout (and immediately outside iframe * mode). Use for "Send to Docy" buttons/menu items. */ declare function useDocyrusSendToDocy(): (payload: DocyrusSharePayload) => Promise; /** * Get a stable function that hands a payload to the host team-chat app from * within an embedded iframe/WebView. Resolves when the host acknowledges * delivery; rejects on host error or timeout (and immediately outside iframe * mode). Use for "Send to Chat" buttons/menu items. */ declare function useDocyrusSendToChat(): (payload: DocyrusSharePayload) => Promise; /** * Get a stable function that hands a draft email (to/subject/body/cc) to the * host from within an embedded iframe/WebView. Resolves when the host * acknowledges; rejects on host error or timeout (and immediately outside * iframe mode). Use for "Send to Email" buttons/menu items. */ declare function useDocyrusSendToEmail(): (payload: DocyrusEmailPayload) => Promise; /** * Get a stable function that hands a calendar event (subject/description/ * participants/start/end) to the host from within an embedded iframe/WebView. * Resolves when the host acknowledges; rejects on host error or timeout (and * immediately outside iframe mode). Use for "Send to Calendar" buttons/menu * items. */ declare function useDocyrusSendToCalendar(): (payload: DocyrusCalendarEventPayload) => Promise; /** * Get the client for the host's Microsoft Graph (MSAL) session. Check * `isSignedIn()` and make host-proxied Graph requests. Returns `null` outside * iframe/WebView mode. */ declare function useDocyrusMsGraph(): MsGraphClient | null; interface SignInButtonProps { /** Custom label. Defaults to "Sign in with Docyrus" */ label?: string; /** CSS class name for the button */ className?: string; /** Inline styles */ style?: CSSProperties; /** Custom render function. Receives signIn, isLoading and status. */ children?: (props: { signIn: () => void; isLoading: boolean; status: AuthStatus; }) => ReactNode; /** Disable the button */ disabled?: boolean; } /** * "Sign in with Docyrus" button. * * In iframe mode: renders nothing (auth is handled by the host). * When authenticated: renders nothing. * * Default look: [Logo] label — or — [Spinner] label (when loading). * Use className, style, or the render-prop children for full customization. */ declare function SignInButton({ label, className, style, children, disabled }: SignInButtonProps): react.JSX.Element | null; /** * Write the access token to a non-httpOnly cookie so that * server components (e.g. Next.js `cookies()`) can read it. * * When `expiresAt` is provided the cookie gets a `max-age` that matches * the token lifetime so it survives browser restarts and is automatically * removed by the browser once the token expires. * * On HTTPS origins the `Secure` flag is added automatically. */ declare function syncTokenToCookie(accessToken: string, cookieKey?: string, expiresAt?: number): void; /** * Remove the SSR token cookie (e.g. on logout). */ declare function clearTokenCookie(cookieKey?: string): void; /** * Read the access token from the SSR cookie. * Useful in client-side code; server components should use `cookies()` instead. */ declare function getTokenFromCookie(cookieKey?: string): string | null; export { AuthStatus, DocyrusCalendarEventPayload, DocyrusEmailPayload, DocyrusSharePayload, GuidyRoute, HostNavigationHandler, HostNavigationRequestOptions, HostNotificationHandler, MsGraphClient, SignInButton, type SignInButtonProps, clearTokenCookie, getTokenFromCookie, syncTokenToCookie, useDocyrusGuidyRoutes, useDocyrusHostNavigation, useDocyrusHostNotification, useDocyrusHostRouteSync, useDocyrusMsGraph, useDocyrusRequestHostNavigation, useDocyrusSendToCalendar, useDocyrusSendToChat, useDocyrusSendToDocy, useDocyrusSendToEmail };