feat: integrate client and server sharing workflows

This commit is contained in:
justme committed 2026-10-02 10:49:45 +08:00
1 parent 42b93ae2d8
commit 7406e2fe37
101 files changed
+3153 -253

No files matched your search

+4 -1
View File
@@ -7,9 +7,12 @@ import type { ArchiveEntry, ChannelInfo, ConnectionState, CreateOptions, Workspa
*/
export interface WorkspaceApi {
/** 新建频道:本地生成 id 与密钥、算 PoW、POST channels(api.md) */
createChannel(opts: CreateOptions): Promise<ChannelInfo>;
createChannel(opts: CreateOptions, captchaToken?: string): Promise<ChannelInfo>;
/** 通过链接加入:先 GET 频道信息预览,再 POST seats */
joinChannel(link: ParsedChannelLink): Promise<ChannelInfo>;
listSaved(): Promise<ChannelInfo[]>;
/** 仅从本机删除保存的链接和终端密钥,不会删服务端频道 */
forget(id: string): Promise<void>;
/** 仅假实现提供:载入演示用的频道 */
loadDemo?(): ChannelInfo[];