import { CoValueCore } from "./coValueCore/coValueCore.js"; import { RawAccountID } from "./coValues/account.js"; import { KeyID, SealerID } from "./crypto/crypto.js"; import { AgentID, RawCoID } from "./ids.js"; export type PermissionsDef = { type: "group"; initialAdmin: RawAccountID | AgentID; } | { type: "ownedByGroup"; group: RawCoID; restrictDeletion?: boolean; } | { type: "unsafeAllowAll"; }; export type AccountRole = /** * Can read the group's CoValues */ "reader" /** * Can read and write to the group's CoValues */ | "writer" /** * Can read and write to the group, and change group member roles */ | "admin" /** * Can read and write, invite and revoke members except admin */ | "manager" /** * Can only write to the group's CoValues and read their own changes */ | "writeOnly"; export type Role = AccountRole | "revoked" | "managerInvite" | "adminInvite" | "writerInvite" | "readerInvite" | "writeOnlyInvite"; export declare function isAccountRole(role?: Role): role is AccountRole; export declare function determineValidTransactions(coValue: CoValueCore): void; export declare function isWriteKeyForMember(co: string): co is `writeKeyFor_${RawAccountID | AgentID}`; export declare function getAccountOrAgentFromWriteKeyForMember(co: `writeKeyFor_${RawAccountID | AgentID}`): RawAccountID | AgentID; export declare function isKeyForKeyField(co: string): co is `${KeyID}_for_${KeyID}`; export declare function isKeyForAccountField(co: string): co is `${KeyID}_for_${RawAccountID | AgentID}`; export declare function isKeySealedForGroupField(co: string): co is `${KeyID}_sealedFor_${SealerID}`; //# sourceMappingURL=permissions.d.ts.map