import { Store } from "@tanstack/store"; //#region src/web/stores/teamStore.d.ts export type PoTeamRole = 'owner' | 'admin' | 'member'; export type PoTeamGrant = Exclude; /** The signed-in session's team, as Po Cloud's Team client reads it. */ export interface PoTeam { id: string; name: string; role: PoTeamRole; people: readonly { id: string; name: string; email: string; role: PoTeamRole; you: boolean; }[]; invites: readonly { id: string; email: string; role: PoTeamGrant; expiresAt: string; }[]; } /** * Po Cloud's Team calls, as the host lends them: po-identity's Team client over the browser's own session on * Po Cloud's web app, or over Po Desktop's main process. Every change names the team it was read for. */ export interface PoTeamClient { read(): Promise; rename(team: Pick, name: string): Promise; invite(team: Pick, email: string, role: PoTeamGrant): Promise; cancelInvite(inviteId: string): Promise; setRole(team: Pick, memberId: string, role: PoTeamGrant): Promise; remove(team: Pick, memberId: string): Promise; leave(team: Pick): Promise; delete(team: Pick): Promise; } /** Undefined where this Po has no Po Cloud team, so neither the Team row nor its pages show. */ export declare const teamStore: Store<{ client?: PoTeamClient; }, never>; /** The host binds Po Cloud's Team client once at startup; the returned function unbinds it. */ export declare function bindTeam(client: PoTeamClient | undefined): () => void; //#endregion //# sourceMappingURL=teamStore.d.mts.map