feat(core): add public user service (#10695)
This commit is contained in:
@@ -5,8 +5,9 @@ import type { Signal } from '@preact/signals-core';
|
||||
import type { AffineUserInfo } from './types';
|
||||
|
||||
export interface UserService {
|
||||
getCurrentUser(): AffineUserInfo;
|
||||
getUserInfo(id: string): Signal<AffineUserInfo | null>;
|
||||
getCurrentUser(): AffineUserInfo | null;
|
||||
userInfo$(id: string): Signal<AffineUserInfo | null>;
|
||||
revalidateUserInfo(id: string): void;
|
||||
}
|
||||
|
||||
export const UserProvider = createIdentifier<UserService>(
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
},
|
||||
"include": ["./e2e"],
|
||||
"references": [
|
||||
{ "path": "../blocks" },
|
||||
{ "path": "../framework/block-std" },
|
||||
{ "path": "../blocks" },
|
||||
{ "path": "../framework/global" },
|
||||
{ "path": "../framework/inline" },
|
||||
{ "path": "../integration-test" },
|
||||
|
||||
Reference in New Issue
Block a user