ultisuite-client/lib/runtime-config/types.ts
R3D347HR4Y d6d18f911b
Some checks failed
E2E / Playwright e2e (push) Has been cancelled
Lots of stuff and mobile app
2026-06-17 00:13:28 +02:00

37 lines
1.3 KiB
TypeScript

export type OidcRuntimeConfig = {
/** OIDC issuer (Authentik application), trailing slash included. */
issuer: string
/** Public OIDC client id (mobile = public PKCE client, no secret). */
clientId: string
/** Native redirect URI, e.g. `ultimail://oauth/callback`. */
redirectUri: string
authorizationEndpoint: string
tokenEndpoint: string
endSessionEndpoint: string
/** Optional Authentik enrollment (sign-up) flow URL. */
enrollmentUrl?: string
}
/**
* Everything the static frontend needs to talk to one backend instance. On web
* this is derived from build-time `NEXT_PUBLIC_*` env; on native it is chosen at
* runtime via the server picker (UltiSpace preset or self-hosted URL) and
* persisted to the OS secure store.
*/
export type RuntimeConfig = {
/** Human label shown in the picker / account UI. */
label: string
/** Instance origin, e.g. `https://space.ulti`. */
instanceOrigin: string
/** Absolute backend base, e.g. `https://space.ulti/api/v1`. */
apiBaseUrl: string
/** Absolute realtime WS URL, e.g. `wss://space.ulti/ws`. */
wsUrl: string
oidc: OidcRuntimeConfig
/** Optional product extras (resolved from instance origin). */
aiOrigin?: string
aiPublicPath?: string
onlyOfficeUrl?: string
hocuspocusUrl?: string
}