export type BluxInApp = { id: string; url?: string; }; export type InAppClickedHandler = (inApp: BluxInApp) => void; export function parseBluxInApp(raw: any): BluxInApp { const url = raw?.url; return { id: String(raw?.id ?? ''), url: typeof url === 'string' && url.length > 0 ? url : undefined, }; }