@sixbell-telco/sdk
Version:
A collection of reusable components designed for use in Sixbell Telco Angular projects
31 lines (30 loc) • 977 B
TypeScript
import { RuntimeUpdateEvent } from '@sixbell-telco/sdk/utils/runtime-config';
import type { Observable } from 'rxjs';
/**
* Configuration options for the runtime theme provider.
*
* @property appId - Optional namespace to avoid cache collisions across MFEs
* @property sse - Optional SSE config for runtime update checks (disabled by default)
* @property updateStream - Optional Observable for runtime update checks (disabled by default)
*
* @example
* ```typescript
* // Basic usage
* provideRuntimeTheme('assets/themes/config.json')
*
* // SSE updates (optional)
* provideRuntimeTheme('assets/themes/config.json', {
* sse: { url: '/api/updates' }
* })
* ```
*/
export interface RuntimeThemeProviderOptions {
appId?: string;
sse?: {
url: string;
withCredentials?: boolean;
eventType?: string;
transform?: (event: MessageEvent) => RuntimeUpdateEvent | null;
};
updateStream?: Observable<RuntimeUpdateEvent>;
}