feat(web): add account workspaces and signed content flows

This commit is contained in:
justme committed 2026-10-14 04:06:03 +08:00
1 parent 7b8d61d1ba
commit b5cf3d5958
117 files changed
+2789 -1674

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import type { AccountProfile } from '../generated/api';
export interface InvitationKeyPair { publicKey: JsonWebKey; privateKey: JsonWebKey }
export interface SigningKeyPair { publicKey: JsonWebKey; privateKey: JsonWebKey }
/** Account vault v2: credentials and cached metadata, encrypted before transport. */
export type PersonalProfile = Pick<AccountProfile, 'displayName' | 'modifiedAt'> & { avatar?: string };
export interface ResourceDelete { id: string; modifiedAt: number }
export interface VaultResource {
domainKeys?: Record<string, string>;
id: string;
kind: 'channel' | 'share';
mode: 'enc' | 'raw';
role: 'owner' | 'member';
link: string;
ownerLink?: string;
modifiedAt?: number;
createdAt: number;
expiresAt: number;
creatorAccount?: string;
name?: string;
seats: number;
ttlSeconds?: number;
maxDownloads?: number | null;
maxVisitors?: number;
mine?: boolean;
state?: 'draft' | 'sealed';
}
export interface VaultProfile { v: 3; keys: InvitationKeyPair & { signing: SigningKeyPair }; resources: VaultResource[]; deletes: ResourceDelete[] }