@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.
@@ -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]: string;
38
- [EventAction.TREE_DELETE_ELEMENT]: string;
39
- [EventAction.TREE_MOVE_ELEMENT]: string;
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;
@@ -62,3 +62,8 @@ export interface ITreeEvent {
62
62
  };
63
63
  order: number;
64
64
  }
65
+ export interface ITreeDbEvent {
66
+ parentNode: {
67
+ id: string;
68
+ };
69
+ }
@@ -106,6 +106,7 @@ export interface IValuesOptions {
106
106
  version?: IValueVersion;
107
107
  forceArray?: boolean;
108
108
  forceGetAllValues?: boolean;
109
+ skipActions?: boolean;
109
110
  [optionName: string]: any;
110
111
  }
111
112
  export interface IFindValueTree {
@@ -1,2 +1,3 @@
1
1
  import { type IActionsListFunction } from '../../_types/actionsList';
2
+ export declare const MASKED_VALUE = "\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF";
2
3
  export default function (): IActionsListFunction;
@@ -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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.5.0-36efa9cc",
3
+ "version": "1.5.0-d954f801",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",