// See https://svelte.dev/docs/kit/types#app.d.ts
// Types are augmented by @auth/sveltekit (see node_modules/@auth/sveltekit/dist/types.d.ts)

declare global {
	namespace App {
		// interface Error {}
		// interface Locals {} — extended by @auth/sveltekit
		// interface PageState {}
		// interface Platform {}
	}
}

// Extend JWT token with custom fields
declare module '@auth/core/jwt' {
	interface JWT {
		authentik_sub?: string;
		node_id?: string | null;
	}
}

// Extend Session with node_id for frontend use
declare module '@auth/core/types' {
	interface Session {
		nodeId?: string;
	}
}

export {};
