@aristid/leav-types 1.5.0-36efa9cc → 1.5.0-d954f801
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/core/src/__tests__/e2e/api/userData/maskUserPassword.test.d.ts +1 -0
- package/apps/core/src/_types/events.d.ts +7 -6
- package/apps/core/src/_types/tree.d.ts +5 -0
- package/apps/core/src/_types/value.d.ts +1 -0
- package/apps/core/src/domain/actions/maskValueAction.d.ts +1 -0
- package/apps/core/src/domain/user/userDomain.d.ts +1 -0
- package/apps/core/src/infra/db/migrations/013-passwordAttributeMaskValue.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,15 +8,16 @@ import { type IRecord } from './record';
|
|
|
8
8
|
import { type IValue } from './value';
|
|
9
9
|
import { type IVersionProfile } from './versionProfile';
|
|
10
10
|
import { type IPermission } from './permissions';
|
|
11
|
-
import { type ITree } from './tree';
|
|
11
|
+
import { type ITreeDbEvent, type ITree } from './tree';
|
|
12
|
+
type OnlyObject<T> = T extends object ? T : never;
|
|
12
13
|
/**
|
|
13
14
|
* Maybe move all DBPayloadData types in @leav/utils type to allow event consumers outside core to use them
|
|
14
15
|
* without having to redeclare them. For now before and after are any in @leav/utils
|
|
15
16
|
*/
|
|
16
17
|
export interface IDbPayloadInternal<DBPayloadAction extends EventAction> extends IDbPayload {
|
|
17
18
|
action: DBPayloadAction;
|
|
18
|
-
before?: IDBPayloadData<DBPayloadAction
|
|
19
|
-
after?: IDBPayloadData<DBPayloadAction
|
|
19
|
+
before?: OnlyObject<IDBPayloadData<DBPayloadAction>>;
|
|
20
|
+
after?: OnlyObject<IDBPayloadData<DBPayloadAction>>;
|
|
20
21
|
}
|
|
21
22
|
interface IDBPayloadDataMap {
|
|
22
23
|
[EventAction.VALUE_SAVE]: IValue;
|
|
@@ -34,9 +35,9 @@ interface IDBPayloadDataMap {
|
|
|
34
35
|
[EventAction.LIBRARY_DELETE]: ILibraryDbEvent;
|
|
35
36
|
[EventAction.VERSION_PROFILE_SAVE]: IVersionProfile;
|
|
36
37
|
[EventAction.VERSION_PROFILE_DELETE]: IVersionProfile;
|
|
37
|
-
[EventAction.TREE_ADD_ELEMENT]:
|
|
38
|
-
[EventAction.TREE_DELETE_ELEMENT]:
|
|
39
|
-
[EventAction.TREE_MOVE_ELEMENT]:
|
|
38
|
+
[EventAction.TREE_ADD_ELEMENT]: ITreeDbEvent;
|
|
39
|
+
[EventAction.TREE_DELETE_ELEMENT]: ITreeDbEvent;
|
|
40
|
+
[EventAction.TREE_MOVE_ELEMENT]: ITreeDbEvent;
|
|
40
41
|
[EventAction.TREE_SAVE]: ITree;
|
|
41
42
|
[EventAction.TREE_DELETE]: ITree;
|
|
42
43
|
[EventAction.PERMISSION_SAVE]: IPermission;
|
|
@@ -20,6 +20,7 @@ export interface IUserDomain {
|
|
|
20
20
|
saveUserData(params: ISaveUserDataParams): Promise<IUserData>;
|
|
21
21
|
getUserData(keys: string[], global: boolean, ctx: IQueryInfos): Promise<IUserData>;
|
|
22
22
|
sendResetPasswordEmail(email: string, token: string, login: string, browser: string, os: string, lang: 'fr' | 'en', ctx: IQueryInfos): Promise<void>;
|
|
23
|
+
verifyPassword(userId: string, password: string, ctx: IQueryInfos): Promise<boolean>;
|
|
23
24
|
}
|
|
24
25
|
export interface IUserDomainDeps {
|
|
25
26
|
config: Config.IConfig;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type IAttributeRepo } from 'infra/attribute/attributeRepo';
|
|
2
|
+
import { type IMigration } from '../../../_types/migration';
|
|
3
|
+
interface IDeps {
|
|
4
|
+
'core.infra.attribute'?: IAttributeRepo;
|
|
5
|
+
}
|
|
6
|
+
export default function ({ 'core.infra.attribute': attributeRepo }: IDeps): IMigration;
|
|
7
|
+
export {};
|