soulsync/webui/src/platform/shell/globals.d.ts
Antti Kettunen 728481db31
refactor(webui): route artist-detail handoff
- add canonical /artist-detail/:source/:id TanStack route
- hand the legacy page off through the shell bridge
- remove artist-detail branching from generic shell helpers
2026-05-19 08:14:13 +03:00

52 lines
1.8 KiB
TypeScript

import type {
DownloadMissingAlbumWorkflowInput,
WishlistAlbumWorkflowInput,
} from '@/platform/workflows/album-workflows';
import type { IssueDomainBridge } from '@/routes/issues/-issues.types';
import type { ShellProfileContext, ShellRouteDefinition, ShellPageId } from './bridge';
declare global {
interface Window {
showToast?: (message: string, type?: string, durationOrContext?: number | string) => void;
SoulSyncIssueDomain?: IssueDomainBridge;
SoulSyncWorkflowActions?: {
openDownloadMissingAlbum: (input: DownloadMissingAlbumWorkflowInput) => void | Promise<void>;
openAddToWishlistAlbum: (input: WishlistAlbumWorkflowInput) => void | Promise<void>;
notify?: (message: string, type?: string) => void;
};
SoulSyncWebRouter?: {
routeManifest: ShellRouteDefinition[];
getCurrentPath: () => string;
resolvePageId: (pathname: string) => ShellPageId | null;
navigateToPage: (
pageId: ShellPageId,
options?: {
replace?: boolean;
artistId?: string | number;
artistSource?: string | null;
},
) => Promise<boolean>;
};
SoulSyncWebShellBridge?: {
getCurrentProfileContext: () => ShellProfileContext | null;
isPageAllowed: (pageId: ShellPageId) => boolean;
getProfileHomePage: () => ShellPageId;
resolveLegacyPath: (pathname: string) => ShellPageId | null;
setActivePageChrome: (pageId: ShellPageId) => void;
activateLegacyPath: (pathname: string) => void;
navigateToArtistDetail: (
artistId: string | number,
artistName: string,
sourceOverride?: string | null,
options?: {
skipOriginPush?: boolean;
skipRouteChange?: boolean;
},
) => void;
showReactHost: (pageId: ShellPageId) => void;
};
}
}
export {};