import { type Database } from "./database.js"; /** * An organization's stored privacy choices (migration 0725). Deployment limits * are applied on top of these in the application; this is only what the * organization chose. No row reads as Workspace and on. */ export type OrganizationPrivacyPreferences = { defaultVisibility: "workspace_shared" | "user_private"; /** * Off: only the organization's owners and admins connect new machines of * their own (1148). Machines already connected keep working. */ membersConnectOwnMachines: boolean; adminsSeePrivateSchedules: boolean; /** Off: people neither see nor start new work in their Personal workspace (0918). */ personalWorkspacesEnabled: boolean; /** * The most each person spends from the organization's credits in their own * Personal workspace per calendar month, in USD micros (1147). Null: no limit. */ personalWorkspaceMonthlyCredits: number | null; updatedAt: string | null; }; /** The organization's stored privacy choices. Readable by any member. */ export declare function getOrganizationPrivacyPreferences(db: Database, accountId: string): Promise; /** * True when this is a Personal workspace in an organization whose owners and * admins turned Personal workspaces off: nobody starts new chats or schedules * there. A shared workspace, or any workspace while the setting is on, is open. */ export declare function personalWorkspaceClosedToNewWork(db: Database, input: { accountId: string; workspaceId: string; }): Promise; /** * What decides whether a member may connect a machine of their own here: the * organization's "Members connect their own machines" switch, and whether * this is a Personal workspace, where a workspace machine is also its owner's * own. The workspace is only looked up while the switch is off. */ export type OwnMachineConnectPolicy = { membersConnectOwnMachines: boolean; personalWorkspace: boolean; }; export declare function getOwnMachineConnectPolicy(db: Database, input: { accountId: string; workspaceId: string; }): Promise; /** * Change the organization's privacy choices. Only an active owner or admin, * or an organization key with administration rights, may; the database raises * 42501 for anyone else. Omitted fields keep their current value. */ export declare function updateOrganizationPrivacyPreferences(db: Database, input: { organizationId: string; actorSubjectId: string; defaultVisibility?: "workspace_shared" | "user_private"; membersConnectOwnMachines?: boolean; adminsSeePrivateSchedules?: boolean; personalWorkspacesEnabled?: boolean; /** Null removes the limit. */ personalWorkspaceMonthlyCredits?: number | null; }): Promise;