import { RenameId } from "../utils/mongoDB/types.js";
import { User as User$1, UserAPI } from "./user.types.js";
import { Organization, OrganizationAPI } from "./organization.types.js";
import { Project, ProjectAPI } from "./project.types.js";
import { Permission, Roles } from "../utils/permissions.js";
import { OmitId, Session as Session$1 } from "better-auth";
import { Document, Model, ObjectIdToString, Types } from "mongoose";

//#region src/types/session.types.d.ts
type SessionData = OmitId<Session$1> & {
  id: Types.ObjectId;
  activeOrganizationId?: Organization['id'];
  activeProjectId?: Project['id'];
};
type SessionDataApi = ObjectIdToString<SessionData>;
type SessionContext = {
  session?: SessionDataApi | null;
  user?: User$1 | UserAPI | null;
  organization?: Organization | OrganizationAPI | null;
  project?: Project | ProjectAPI | null;
  authType?: 'session' | 'oauth2' | null;
  permissions?: Permission[];
};
type Session = {
  session: SessionDataApi;
  user: User$1;
  organization?: Organization | null;
  project?: Project | null;
  id: Types.ObjectId;
  permissions: Permission[];
  roles: Roles[];
  authType: 'session' | 'oauth2' | null;
};
type SessionAPI = ObjectIdToString<Session>;
type SessionSchema = RenameId<SessionData>;
type SessionModelType = Model<Session>;
type SessionDocument = Document<unknown, {}, Session> & Session;
//#endregion
export { Session, SessionAPI, SessionContext, SessionData, SessionDataApi, SessionDocument, SessionModelType, SessionSchema };
//# sourceMappingURL=session.types.d.ts.map