b5ba84b19f
Introduce organizations as the top-level workspace model with address and bank-detail fields. Store the active organization on Better Auth sessions and load organization context for dashboard routes. Add the migration that creates organizations and backfills existing records to the default organization.
26 lines
517 B
TypeScript
26 lines
517 B
TypeScript
import type { User, Session } from 'better-auth/minimal';
|
|
|
|
// See https://svelte.dev/docs/kit/types#app.d.ts
|
|
// for information about these interfaces
|
|
declare global {
|
|
namespace App {
|
|
interface Platform {
|
|
env: Env;
|
|
ctx: ExecutionContext;
|
|
caches: CacheStorage;
|
|
cf?: IncomingRequestCfProperties;
|
|
}
|
|
|
|
interface Locals {
|
|
user?: User;
|
|
session?: Session & { activeOrganizationId?: string | null };
|
|
}
|
|
|
|
// interface Error {}
|
|
// interface PageData {}
|
|
// interface PageState {}
|
|
}
|
|
}
|
|
|
|
export {};
|