UNPKG

@datalayer/core

Version:
28 lines (27 loc) 781 B
import { ITeam } from "./Team"; import { ISchool } from "./School"; import { IOrganizationMember } from "./OrganizationMember"; /** * Convert the raw user object to {@link IOrganization}. * * @param org Raw user object from DB * @returns Organizatin */ export declare function asOrganization(org: any): IOrganization; export type IAnyOrganization = IOrganization | ISchool; export type IBaseOrganization = { id: string; handle: string; type: string; name: string; description: string; public: boolean; creationDate: Date; members: IOrganizationMember[]; setMembers: (members: IOrganizationMember[]) => void; }; export type IOrganization = IBaseOrganization & { type: "organization"; teams: ITeam[]; }; export default IOrganization;