/** * Ion access token configuration. * * Accepts: * - A plain `string` — same token in every environment * - A `Record` — keyed by Vite `mode` * - A callback `(mode: string) => string | Promise` — resolved at * build start, useful for secrets managers or async vault lookups * * When omitted, the plugin looks for `CESIUM_ION_TOKEN` (or * `CESIUM_ION_TOKEN_`) in the Vite env automatically. * * @example plain string * ```ts * ionToken: "eyJhbGci..." * ``` * * @example per-environment map * ```ts * ionToken: { * development: "eyJhbGci...", * production: "eyJhbGci...", * } * ``` * * @example async callback (e.g. AWS Secrets Manager) * ```ts * ionToken: async (mode) => { * const secret = await getSecret(`cesium-ion-token-${mode}`); * return secret.value; * } * ``` */ export type IonTokenCallback = (mode: string) => string | Promise; export type IonTokenConfig = string | Record | IonTokenCallback; export declare function validateToken(token: string, mode: string): void; export declare function resolveToken(tokenConfig: IonTokenConfig | undefined, mode: string, env: Record): Promise; export declare function logResolvedToken(token: string | undefined, config: IonTokenConfig | undefined, mode: string, env: Record): void;