mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-25 16:12:13 +00:00
refactor(shared): dedupe protocol schema typing and session/media helpers
This commit is contained in:
28
src/shared/session-types.ts
Normal file
28
src/shared/session-types.ts
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user