feat: add api state

This commit is contained in:
MingLiang Wang
2023-01-05 22:55:41 +08:00
parent 46792e5757
commit 27aaf2de1a

View File

@@ -37,6 +37,7 @@ export class Business {
}; };
} }
// not think out a good way to update workspace meta
// updateWorkspaceMeta( // updateWorkspaceMeta(
// id: string, // id: string,
// meta: { name?: string; avatar: Partial<WorkspaceMeta> } // meta: { name?: string; avatar: Partial<WorkspaceMeta> }
@@ -87,6 +88,7 @@ export class Business {
} }
} }
// no time
// getMembers(id: string): any {} // getMembers(id: string): any {}
// inviteMember(id: string, email: string) {} // inviteMember(id: string, email: string) {}
@@ -96,20 +98,27 @@ export class Business {
dc.apis.acceptInviting({ invitingCode }); dc.apis.acceptInviting({ invitingCode });
} }
// check with dark sky
// getUserInfo(): any {} // getUserInfo(): any {}
// TODO check with dark sky
async login() { async login() {
const dc = await this._getDc(); const dc = await this._getDc();
await dc.auth('affine'); await dc.auth('affine');
} }
// just has no time
// logout() {} // logout() {}
// need discuss
// setWorkspaceSyncType(id: string, type: 'local' | 'cloud') {} // setWorkspaceSyncType(id: string, type: 'local' | 'cloud') {}
// need discuss
// importWorkspace(file: File) {} // importWorkspace(file: File) {}
// need discuss may be not in apis
// exportWorkspace(id: string) {} // exportWorkspace(id: string) {}
// need discuss
// enableWorkspaceCloud(id: string) {} // enableWorkspaceCloud(id: string) {}
} }