Enhance routing and type definitions for new API endpoints. Added support for notifications and SSO routes, updated layout parameters, and improved type safety in route metadata. Refactored component imports for user and profile pages.
This commit is contained in:
Vendored
+10
-3
@@ -27,22 +27,29 @@ export {};
|
||||
|
||||
declare module "$app/types" {
|
||||
export interface AppTypes {
|
||||
RouteId(): "/" | "/api" | "/api/darkmode" | "/login" | "/logout" | "/users" | "/users/[id]" | "/[site]";
|
||||
RouteId(): "/" | "/api" | "/api/darkmode" | "/api/notifications" | "/api/notifications/[id]" | "/api/sso" | "/api/sso/exchange" | "/login" | "/logout" | "/notifications" | "/profile" | "/users" | "/users/[id]" | "/[site]";
|
||||
RouteParams(): {
|
||||
"/api/notifications/[id]": { id: string };
|
||||
"/users/[id]": { id: string };
|
||||
"/[site]": { site: string }
|
||||
};
|
||||
LayoutParams(): {
|
||||
"/": { id?: string; site?: string };
|
||||
"/api": Record<string, never>;
|
||||
"/api": { id?: string };
|
||||
"/api/darkmode": Record<string, never>;
|
||||
"/api/notifications": { id?: string };
|
||||
"/api/notifications/[id]": { id: string };
|
||||
"/api/sso": Record<string, never>;
|
||||
"/api/sso/exchange": Record<string, never>;
|
||||
"/login": Record<string, never>;
|
||||
"/logout": Record<string, never>;
|
||||
"/notifications": Record<string, never>;
|
||||
"/profile": Record<string, never>;
|
||||
"/users": { id?: string };
|
||||
"/users/[id]": { id: string };
|
||||
"/[site]": { site: string }
|
||||
};
|
||||
Pathname(): "/" | "/api/darkmode" | "/login" | "/logout" | "/users" | `/users/${string}` & {} | `/${string}` & {};
|
||||
Pathname(): "/" | "/api/darkmode" | "/api/notifications" | `/api/notifications/${string}` & {} | "/api/sso/exchange" | "/login" | "/logout" | "/notifications" | "/profile" | "/users" | `/users/${string}` & {} | `/${string}` & {};
|
||||
ResolvedPathname(): `${"" | `/${string}`}${ReturnType<AppTypes['Pathname']>}`;
|
||||
Asset(): string & {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user