import type { AnonymousPublicAccessContractV2, AppPerspectiveContract, AppRouteManifestV3 } from 'openxiangda-contracts'; import { type RuntimeAuthorization, type RuntimeIdentity } from './platform-client'; import { type ApplicationAuthenticationSurfaceContribution } from './authentication'; import type { ApplicationRoutePageContribution } from './admin-contributions'; import type { DeepReadonly } from './components/resource/generated-resource-definition'; import { type StandardRouteManifestDevice } from './route-manifest'; /** Generated declarations are `as const`; runtime only reads the projection. */ export type RuntimePerspective = DeepReadonly; interface RuntimeValue { identity: RuntimeIdentity; authorization: RuntimeAuthorization; identityEpoch: number; hasCapability(code: string): boolean; hasReadCapability(code: string): boolean; perspectives: RuntimePerspective[]; perspective: RuntimePerspective | null; setPerspective(code: string | null): void; } export type RuntimeAuthorizationFailureKind = 'unauthenticated' | 'forbidden' | 'temporarily-unavailable'; export declare function classifyRuntimeAuthorizationFailure(error: unknown): RuntimeAuthorizationFailureKind; export declare function resolveRuntimeManifestNavigation({ manifest, authentication, pathname, viewportDevice, }: { manifest?: AppRouteManifestV3; authentication: readonly ApplicationAuthenticationSurfaceContribution[]; pathname: string; viewportDevice: StandardRouteManifestDevice | null; }): { loginContribution: ApplicationAuthenticationSurfaceContribution | undefined; requestedDevice: StandardRouteManifestDevice; deviceLoginContribution: ApplicationAuthenticationSurfaceContribution | undefined; }; export declare function RuntimeBoundary({ children, perspectives, authentication, routes, publicAccess, routeManifest, }: { children: React.ReactNode; perspectives?: readonly RuntimePerspective[]; authentication?: readonly ApplicationAuthenticationSurfaceContribution[]; routes?: readonly ApplicationRoutePageContribution[]; publicAccess?: AnonymousPublicAccessContractV2 | null; routeManifest?: AppRouteManifestV3; }): import("react/jsx-runtime").JSX.Element; export declare function useRuntime(): RuntimeValue; /** Injected Surfaces may be rendered without a live runtime (for example SSR). */ export declare function useOptionalRuntime(): RuntimeValue | null; export {}; //# sourceMappingURL=runtime.d.ts.map