refactor(shared): dedupe protocol schema typing and session/media helpers

This commit is contained in:
Peter Steinberger
2026-03-02 15:39:18 +00:00
parent ee0d7ba6d6
commit 8768487aee
10 changed files with 224 additions and 353 deletions

View File

@@ -0,0 +1,28 @@
export type GatewayAgentIdentity = {
name?: string;
theme?: string;
emoji?: string;
avatar?: string;
avatarUrl?: string;
};
export type GatewayAgentRow = {
id: string;
name?: string;
identity?: GatewayAgentIdentity;
};
export type SessionsListResultBase<TDefaults, TRow> = {
ts: number;
path: string;
count: number;
defaults: TDefaults;
sessions: TRow[];
};
export type SessionsPatchResultBase<TEntry> = {
ok: true;
path: string;
key: string;
entry: TEntry;
};