import { n as RenameId } from "./types-laoxoA5P.js";
import { n as User } from "./user.types-BcSU0sts.js";
import { t as Plan } from "./plan.types-Q-hdKXkn.js";
import { Document, Model, ObjectIdToString, Types } from "mongoose";

//#region src/types/organization.types.d.ts
/**
 * Note: SSO configuration is managed entirely by better-auth's SSO plugin.
 * The organization only stores a reference to whether SSO is enabled
 * and the domain for SSO provider lookup.
 * See: https://www.better-auth.com/docs/plugins/sso
 */
type OrganizationCreationData = {
  name: Organization['name'];
};
type OrganizationData = {
  name: string;
  membersIds: User['id'][];
  adminsIds: User['id'][]; /** Whether SSO is configured for this organization (managed by better-auth) */
  ssoEnabled: boolean; /** Primary domain for this organization (used for SSO provider lookup) */
  domain: string;
};
type Organization = OrganizationData & {
  id: Types.ObjectId;
  creatorId: User['id'];
  plan?: Plan;
  createdAt: number;
  updatedAt: number;
};
type OrganizationAPI = ObjectIdToString<Organization>;
type OrganizationSchema = RenameId<Organization>;
type OrganizationModelType = Model<Organization>;
type OrganizationDocument = Document<unknown, {}, Organization> & Organization;
//#endregion
export { OrganizationDocument as a, OrganizationData as i, OrganizationAPI as n, OrganizationModelType as o, OrganizationCreationData as r, OrganizationSchema as s, Organization as t };
//# sourceMappingURL=organization.types-BSBYM52i.d.ts.map