@aristid/leav-types 1.6.0-0de8c329 → 1.6.0-14320ea3
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/_fixtures/fakeplugin/index.d.ts +5 -1
- package/apps/core/src/__tests__/e2e/api/e2eUtils.d.ts +3 -2
- package/apps/core/src/__tests__/e2e/api/mailpitUtils.d.ts +9 -2
- package/apps/core/src/__tests__/e2e/api/notificationUtils.d.ts +5 -0
- package/apps/core/src/__tests__/e2e/api/task/taskSubscription.test.d.ts +1 -0
- package/apps/core/src/__tests__/e2e/api/task/tasksAdminPermissions.test.d.ts +1 -0
- package/apps/core/src/_constants/notifications.d.ts +1 -0
- package/apps/core/src/_types/actionsList.d.ts +2 -0
- package/apps/core/src/_types/notification.d.ts +5 -0
- package/apps/core/src/app/core/libraryApp/libraryApp.d.ts +3 -1
- package/apps/core/src/app/core/tasksManagerApp.d.ts +3 -1
- package/apps/core/src/app/core/treeApp/treeApp.d.ts +3 -1
- package/apps/core/src/domain/attribute/helpers/attributeALHelper.d.ts +2 -1
- package/apps/core/src/domain/export/exportProfileDomain.d.ts +18 -8
- package/apps/core/src/domain/form/helpers/getElementValues.d.ts +0 -2
- package/apps/core/src/domain/tasksManager/tasksManagerDomain.d.ts +3 -1
- package/apps/core/src/domain/value/_types.d.ts +1 -0
- package/apps/core/src/domain/value/helpers/postDeleteValue.d.ts +28 -0
- package/apps/core/src/domain/value/helpers/postSaveValue.d.ts +28 -0
- package/apps/core/src/domain/value/valueDomain.d.ts +2 -0
- package/apps/core/src/infra/db/helpers/libraryUtils.d.ts +2 -0
- package/apps/core/src/infra/mailer/mailerService.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { type i18n } from 'i18next';
|
|
2
2
|
import { type IPluginInitModule } from '_types/plugin';
|
|
3
|
+
import { type IValueRepo } from '../../../../../infra/value/valueRepo';
|
|
4
|
+
import { type IAttributeDomain } from '../../../../../domain/attribute/attributeDomain';
|
|
3
5
|
interface IDeps {
|
|
4
6
|
translator: i18n;
|
|
7
|
+
'core.infra.value': IValueRepo;
|
|
8
|
+
'core.domain.attribute': IAttributeDomain;
|
|
5
9
|
}
|
|
6
|
-
export default function ({ translator }: IDeps): IPluginInitModule;
|
|
10
|
+
export default function ({ translator, 'core.infra.value': valueRepo, 'core.domain.attribute': attributeDomain, }: IDeps): IPluginInitModule;
|
|
7
11
|
export {};
|
|
@@ -11,7 +11,7 @@ export interface IGlobalThis {
|
|
|
11
11
|
nonAdminUser: IE2EUserParams;
|
|
12
12
|
nonAdminGroupId: string;
|
|
13
13
|
}
|
|
14
|
-
interface IE2EUser {
|
|
14
|
+
export interface IE2EUser {
|
|
15
15
|
userId: string;
|
|
16
16
|
getAuthToken: () => Promise<string>;
|
|
17
17
|
}
|
|
@@ -65,6 +65,7 @@ export declare function gqlCreateRecord(library: string): Promise<string>;
|
|
|
65
65
|
* @return Node ID
|
|
66
66
|
*/
|
|
67
67
|
export declare function gqlAddElemToTree(treeId: string, element: ITreeElement, parent?: string | null, order?: number): Promise<string>;
|
|
68
|
+
export declare function gqlGetValue(libraryId: string, recordId: string, attributeId: string): Promise<any>;
|
|
68
69
|
export declare function gqlSaveValue(attributeId: string, libraryId: string, recordId: string, value: string | number): Promise<void>;
|
|
69
70
|
export declare function gqlSaveVersionProfile(profileId: string, label: string, trees: string[]): Promise<void>;
|
|
70
71
|
/**
|
|
@@ -77,7 +78,7 @@ export declare function makeWebSocketGraphQlCall(options?: {
|
|
|
77
78
|
export declare function waitGraphqlWebSocketMessage<T>(client: GraphqlWsClient, query: string, variables: Record<string, any>, acceptMessage: (msg: T) => boolean, { timeoutMs }: {
|
|
78
79
|
timeoutMs: any;
|
|
79
80
|
}): Promise<T>;
|
|
80
|
-
export declare function waitWebSocketMessage<T>(webSocket: WebSocket, acceptMessage: (msg: T) => boolean
|
|
81
|
+
export declare function waitWebSocketMessage<T>(webSocket: WebSocket, acceptMessage: (msg: T) => Promise<boolean>, { timeoutMs }: {
|
|
81
82
|
timeoutMs: any;
|
|
82
83
|
}): Promise<T>;
|
|
83
84
|
export {};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
interface IMailpitMsgHeaders {
|
|
2
|
+
[key: string]: string[];
|
|
3
|
+
}
|
|
1
4
|
interface IMailpitMsgLight {
|
|
2
5
|
From: {
|
|
3
6
|
Name: string;
|
|
@@ -13,7 +16,10 @@ interface IMailpitMsgLight {
|
|
|
13
16
|
Address: string;
|
|
14
17
|
}>;
|
|
15
18
|
}
|
|
16
|
-
interface
|
|
19
|
+
interface IMailpitMsgLightWithHeaders extends IMailpitMsgLight {
|
|
20
|
+
Headers: IMailpitMsgHeaders;
|
|
21
|
+
}
|
|
22
|
+
export interface IMailpitMsgFull extends IMailpitMsgLight {
|
|
17
23
|
HTML: string;
|
|
18
24
|
Text: string;
|
|
19
25
|
}
|
|
@@ -22,7 +28,8 @@ interface IMailpitSearchResult {
|
|
|
22
28
|
total: number;
|
|
23
29
|
unread: number;
|
|
24
30
|
}
|
|
25
|
-
export declare function waitMailpitMessage(acceptMessage: (msg:
|
|
31
|
+
export declare function waitMailpitMessage(acceptMessage: (msg: IMailpitMsgLightWithHeaders) => boolean): Promise<IMailpitMsgFull>;
|
|
32
|
+
export declare function getMailpitMessageHeaders(messageId: string): Promise<IMailpitMsgHeaders>;
|
|
26
33
|
export declare function getMailpitMessage(messageId: string): Promise<IMailpitMsgFull>;
|
|
27
34
|
export declare function deleteMailpitMessagesBySearch(search: string): Promise<void>;
|
|
28
35
|
export declare function searchMailpitMessages(search: string): Promise<IMailpitSearchResult>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type IPubSubNotificationData } from '_types/eventsManager';
|
|
2
|
+
import { type Client as GraphqlWsClient } from 'graphql-ws';
|
|
3
|
+
import { type IMailpitMsgFull } from './mailpitUtils';
|
|
4
|
+
export declare const waitWebSocketNotification: (graphqlClient: GraphqlWsClient, taskId: string) => Promise<Pick<IPubSubNotificationData, "notification">>;
|
|
5
|
+
export declare const waitEmailNotification: (taskId: string) => Promise<IMailpitMsgFull>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NOTIFICATION_EMAIL_TASK_ID_HEADER = "X-Task-Id";
|
|
@@ -5,7 +5,9 @@ import { type IValue } from './value';
|
|
|
5
5
|
import { type Errors } from './errors';
|
|
6
6
|
export declare enum ActionsListEvents {
|
|
7
7
|
SAVE_VALUE = "saveValue",
|
|
8
|
+
POST_SAVE_VALUE = "postSaveValue",
|
|
8
9
|
DELETE_VALUE = "deleteValue",
|
|
10
|
+
POST_DELETE_VALUE = "postDeleteValue",
|
|
9
11
|
GET_VALUE = "getValue"
|
|
10
12
|
}
|
|
11
13
|
export declare enum ActionsListIOTypes {
|
|
@@ -22,6 +22,11 @@ export interface INotificationContent {
|
|
|
22
22
|
url: string;
|
|
23
23
|
label: string;
|
|
24
24
|
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Optional task ID associated with the notification
|
|
27
|
+
* For email, will be added as a custom header (X-Task-Id)
|
|
28
|
+
*/
|
|
29
|
+
taskId?: string;
|
|
25
30
|
}
|
|
26
31
|
export interface ICreateNotification {
|
|
27
32
|
emitterUserId: string;
|
|
@@ -6,6 +6,7 @@ import { type ITreeDomain } from 'domain/tree/treeDomain';
|
|
|
6
6
|
import { type IViewDomain } from 'domain/view/viewDomain';
|
|
7
7
|
import { type IGraphqlAppModule, type IGraphqlApp } from '../../graphql/graphqlApp';
|
|
8
8
|
import { type ICoreApp } from '../coreApp';
|
|
9
|
+
import { type IExportProfileDomain } from 'domain/export/exportProfileDomain';
|
|
9
10
|
export type ICoreLibraryApp = IGraphqlAppModule;
|
|
10
11
|
interface IDeps {
|
|
11
12
|
'core.domain.library'?: ILibraryDomain;
|
|
@@ -14,8 +15,9 @@ interface IDeps {
|
|
|
14
15
|
'core.domain.tree'?: ITreeDomain;
|
|
15
16
|
'core.domain.view'?: IViewDomain;
|
|
16
17
|
'core.domain.permission'?: IPermissionDomain;
|
|
18
|
+
'core.domain.export.exportProfile'?: IExportProfileDomain;
|
|
17
19
|
'core.app.graphql'?: IGraphqlApp;
|
|
18
20
|
'core.app.core'?: ICoreApp;
|
|
19
21
|
}
|
|
20
|
-
export default function ({ 'core.domain.library': libraryDomain, 'core.domain.record': recordDomain, 'core.domain.attribute': attributeDomain, 'core.domain.tree': treeDomain, 'core.domain.view': viewDomain, 'core.domain.permission': permissionDomain, 'core.app.graphql': graphqlApp, 'core.app.core': coreApp, }?: IDeps): ICoreLibraryApp;
|
|
22
|
+
export default function ({ 'core.domain.library': libraryDomain, 'core.domain.record': recordDomain, 'core.domain.attribute': attributeDomain, 'core.domain.tree': treeDomain, 'core.domain.view': viewDomain, 'core.domain.permission': permissionDomain, 'core.domain.export.exportProfile': exportProfileDomain, 'core.app.graphql': graphqlApp, 'core.app.core': coreApp, }?: IDeps): ICoreLibraryApp;
|
|
21
23
|
export {};
|
|
@@ -7,6 +7,7 @@ import { type IPaginationParams, type ISortParams } from '_types/list';
|
|
|
7
7
|
import { type ITasksManagerDomain } from '../../domain/tasksManager/tasksManagerDomain';
|
|
8
8
|
import { TaskStatus } from '../../_types/tasksManager';
|
|
9
9
|
import { type IGraphqlAppModule } from 'app/graphql/graphqlApp';
|
|
10
|
+
import { type IAdminPermissionDomain } from 'domain/permission/adminPermissionDomain';
|
|
10
11
|
export interface ITasksManagerApp extends IGraphqlAppModule {
|
|
11
12
|
initMaster(): Promise<NodeJS.Timeout>;
|
|
12
13
|
initWorker(): Promise<void>;
|
|
@@ -18,6 +19,7 @@ interface IDeps {
|
|
|
18
19
|
'core.utils'?: IUtils;
|
|
19
20
|
'core.domain.record'?: IRecordDomain;
|
|
20
21
|
'core.domain.eventsManager'?: IEventsManagerDomain;
|
|
22
|
+
'core.domain.permission.admin'?: IAdminPermissionDomain;
|
|
21
23
|
}
|
|
22
24
|
export interface IGetTasksArgs {
|
|
23
25
|
filters?: ICoreEntityFilterOptions & {
|
|
@@ -28,5 +30,5 @@ export interface IGetTasksArgs {
|
|
|
28
30
|
pagination?: IPaginationParams;
|
|
29
31
|
sort?: ISortParams;
|
|
30
32
|
}
|
|
31
|
-
export default function ({ 'core.domain.record': recordDomain, 'core.domain.tasksManager': tasksManagerDomain, 'core.domain.eventsManager': eventsManager, }: IDeps): ITasksManagerApp;
|
|
33
|
+
export default function ({ 'core.domain.record': recordDomain, 'core.domain.tasksManager': tasksManagerDomain, 'core.domain.eventsManager': eventsManager, 'core.domain.permission.admin': adminPermissionDomain, }: IDeps): ITasksManagerApp;
|
|
32
34
|
export {};
|
|
@@ -7,6 +7,7 @@ import { type IGraphqlAppModule, type IGraphqlApp } from '../../graphql/graphqlA
|
|
|
7
7
|
import { type ICoreApp } from '../coreApp';
|
|
8
8
|
import { type ICoreSubscriptionsHelpersApp } from '../helpers/subscriptions';
|
|
9
9
|
import { type IRecordPermissionDomain } from '../../../domain/permission/recordPermissionDomain';
|
|
10
|
+
import { type IAttributeDependentValuesPermissionDomain } from 'domain/permission/attributeDependentValuesPermissionDomain';
|
|
10
11
|
export type ITreeAttributeApp = IGraphqlAppModule;
|
|
11
12
|
interface IDeps {
|
|
12
13
|
'core.domain.tree': ITreeDomain;
|
|
@@ -18,6 +19,7 @@ interface IDeps {
|
|
|
18
19
|
'core.app.core.subscriptionsHelper': ICoreSubscriptionsHelpersApp;
|
|
19
20
|
'core.domain.library': ILibraryDomain;
|
|
20
21
|
'core.domain.permission.record': IRecordPermissionDomain;
|
|
22
|
+
'core.domain.permission.attributeDependentValues': IAttributeDependentValuesPermissionDomain;
|
|
21
23
|
}
|
|
22
|
-
export default function ({ 'core.domain.tree': treeDomain, 'core.domain.attribute': attributeDomain, 'core.domain.permission': permissionDomain, 'core.domain.eventsManager': eventsManagerDomain, 'core.app.core': coreApp, 'core.app.graphql': graphqlApp, 'core.app.core.subscriptionsHelper': subscriptionsHelper, 'core.domain.library': libraryDomain, 'core.domain.permission.record': recordPermissionDomain, }: IDeps): ITreeAttributeApp;
|
|
24
|
+
export default function ({ 'core.domain.tree': treeDomain, 'core.domain.attribute': attributeDomain, 'core.domain.permission': permissionDomain, 'core.domain.eventsManager': eventsManagerDomain, 'core.app.core': coreApp, 'core.app.graphql': graphqlApp, 'core.app.core.subscriptionsHelper': subscriptionsHelper, 'core.domain.library': libraryDomain, 'core.domain.permission.record': recordPermissionDomain, 'core.domain.permission.attributeDependentValues': attributeDependentValuesPermissionDomain, }: IDeps): ITreeAttributeApp;
|
|
23
25
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type IUtils } from 'utils/utils';
|
|
2
2
|
import { type ActionsListConfig } from '../../../_types/actionsList';
|
|
3
3
|
import { type IAttribute, type IOAllowedTypes } from '../../../_types/attribute';
|
|
4
|
-
|
|
4
|
+
declare const getAllowedInputTypes: (attribute: IAttribute) => IOAllowedTypes;
|
|
5
|
+
export default getAllowedInputTypes;
|
|
5
6
|
export declare const getAllowedOutputTypes: (attribute: IAttribute) => IOAllowedTypes;
|
|
6
7
|
export declare const getActionsListToSave: (attrDataToSave: IAttribute, existingAttrData: IAttribute, newAttr: boolean, utils: IUtils) => ActionsListConfig;
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
import { type ILibraryDomain } from '../library/libraryDomain';
|
|
2
2
|
import { type IQueryInfos } from '../../_types/queryInfos';
|
|
3
|
+
import { type IAttributeDomain } from 'domain/attribute/attributeDomain';
|
|
4
|
+
import { type IConfig } from '_types/config';
|
|
5
|
+
export interface IExportProfileColumn {
|
|
6
|
+
columnLabel: string;
|
|
7
|
+
attribute: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IExportProfile {
|
|
10
|
+
label: string;
|
|
11
|
+
columns: IExportProfileColumn[];
|
|
12
|
+
error?: {
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
3
16
|
export interface IExportProfileConfig {
|
|
4
17
|
defaultProfile: string;
|
|
5
|
-
profiles:
|
|
6
|
-
label: string;
|
|
7
|
-
columns: Array<{
|
|
8
|
-
columnLabel: string;
|
|
9
|
-
attribute: string;
|
|
10
|
-
}>;
|
|
11
|
-
}>;
|
|
18
|
+
profiles: IExportProfile[];
|
|
12
19
|
}
|
|
13
20
|
export interface IExportColumn {
|
|
14
21
|
columnLabel: string;
|
|
15
22
|
attribute: string;
|
|
16
23
|
}
|
|
17
24
|
export interface IExportProfileDomain {
|
|
25
|
+
getExportProfileConfig(libraryId: string, ctx: IQueryInfos): Promise<IExportProfileConfig | null>;
|
|
18
26
|
getColumnsFromProfileConfig(profile: string | undefined, library: string, ctx: IQueryInfos): Promise<IExportColumn[]>;
|
|
19
27
|
}
|
|
20
28
|
export interface IExportProfileDomainDeps {
|
|
21
29
|
'core.domain.library': ILibraryDomain;
|
|
30
|
+
'core.domain.attribute': IAttributeDomain;
|
|
31
|
+
config: IConfig;
|
|
22
32
|
}
|
|
23
|
-
export default function ({ 'core.domain.library': libraryDomain }: IExportProfileDomainDeps): IExportProfileDomain;
|
|
33
|
+
export default function ({ 'core.domain.library': libraryDomain, 'core.domain.attribute': attributeDomain, config, }: IExportProfileDomainDeps): IExportProfileDomain;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type IRecordDomain } from 'domain/record/recordDomain';
|
|
2
2
|
import { type IUtils } from 'utils/utils';
|
|
3
|
-
import { type ILogger } from '@leav/logger';
|
|
4
3
|
import { type IQueryInfos } from '_types/queryInfos';
|
|
5
4
|
import { type IValue, type IValueVersion } from '_types/value';
|
|
6
5
|
import { type IFormElement } from '../../../_types/forms';
|
|
@@ -12,7 +11,6 @@ export declare const getElementValues: (params: {
|
|
|
12
11
|
deps: {
|
|
13
12
|
"core.domain.record"?: IRecordDomain;
|
|
14
13
|
"core.utils"?: IUtils;
|
|
15
|
-
"core.utils.logger"?: ILogger;
|
|
16
14
|
};
|
|
17
15
|
ctx: IQueryInfos;
|
|
18
16
|
}) => Promise<{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type IAmqpService } from '@leav/message-broker';
|
|
2
2
|
import { type AwilixContainer } from 'awilix';
|
|
3
3
|
import { type IEventsManagerDomain } from 'domain/eventsManager/eventsManagerDomain';
|
|
4
|
+
import { type IAdminPermissionDomain } from 'domain/permission/adminPermissionDomain';
|
|
4
5
|
import { type IUtils } from 'utils/utils';
|
|
5
6
|
import { type ILogger } from '@leav/logger';
|
|
6
7
|
import type * as Config from '_types/config';
|
|
@@ -62,9 +63,10 @@ export interface ITasksManagerDomainDeps {
|
|
|
62
63
|
'core.infra.task': ITaskRepo;
|
|
63
64
|
'core.depsManager': AwilixContainer;
|
|
64
65
|
'core.domain.eventsManager': IEventsManagerDomain;
|
|
66
|
+
'core.domain.permission.admin': IAdminPermissionDomain;
|
|
65
67
|
'core.utils.logger': ILogger;
|
|
66
68
|
'core.utils': IUtils;
|
|
67
69
|
'core.utils.getSystemQueryContext': GetSystemQueryContext;
|
|
68
70
|
}
|
|
69
|
-
export default function ({ config, 'core.infra.amqpService': amqpService, 'core.infra.task': taskRepo, 'core.depsManager': depsManager, 'core.domain.eventsManager': eventsManager, 'core.utils.logger': logger, 'core.utils': utils, 'core.utils.getSystemQueryContext': getSystemQueryContext, }: ITasksManagerDomainDeps): ITasksManagerDomain;
|
|
71
|
+
export default function ({ config, 'core.infra.amqpService': amqpService, 'core.infra.task': taskRepo, 'core.depsManager': depsManager, 'core.domain.eventsManager': eventsManager, 'core.domain.permission.admin': adminPermissionDomain, 'core.utils.logger': logger, 'core.utils': utils, 'core.utils.getSystemQueryContext': getSystemQueryContext, }: ITasksManagerDomainDeps): ITasksManagerDomain;
|
|
70
72
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type IActionsListDomain } from 'domain/actionsList/actionsListDomain';
|
|
2
|
+
import { type IAttributeDomain } from 'domain/attribute/attributeDomain';
|
|
3
|
+
import { type IUtils } from 'utils/utils';
|
|
4
|
+
import { type IAttribute } from '_types/attribute';
|
|
5
|
+
import { type IQueryInfos } from '_types/queryInfos';
|
|
6
|
+
import { type IValue } from '_types/value';
|
|
7
|
+
/**
|
|
8
|
+
* Parameters for post-delete value processing.
|
|
9
|
+
*/
|
|
10
|
+
interface IPostDeleteValueParams {
|
|
11
|
+
libraryId: string;
|
|
12
|
+
recordId: string;
|
|
13
|
+
attribute: IAttribute;
|
|
14
|
+
value: IValue;
|
|
15
|
+
ctx: IQueryInfos;
|
|
16
|
+
deps: {
|
|
17
|
+
actionsListDomain: IActionsListDomain;
|
|
18
|
+
attributeDomain: IAttributeDomain;
|
|
19
|
+
utils: IUtils;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Executes post-delete action lists on deleted value
|
|
24
|
+
* Action lists can perform side effects
|
|
25
|
+
* Unlike pre-delete value actions, this runs AFTER the value is persisted to the database.
|
|
26
|
+
*/
|
|
27
|
+
declare const postDeleteValue: (params: IPostDeleteValueParams) => Promise<void>;
|
|
28
|
+
export default postDeleteValue;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type IActionsListDomain } from 'domain/actionsList/actionsListDomain';
|
|
2
|
+
import { type IAttributeDomain } from 'domain/attribute/attributeDomain';
|
|
3
|
+
import { type IUtils } from 'utils/utils';
|
|
4
|
+
import { type IAttribute } from '_types/attribute';
|
|
5
|
+
import { type IQueryInfos } from '_types/queryInfos';
|
|
6
|
+
import { type IValue } from '_types/value';
|
|
7
|
+
/**
|
|
8
|
+
* Parameters for post-save value processing.
|
|
9
|
+
*/
|
|
10
|
+
interface IPostSaveValueParams {
|
|
11
|
+
libraryId: string;
|
|
12
|
+
recordId: string;
|
|
13
|
+
attribute: IAttribute;
|
|
14
|
+
value: IValue;
|
|
15
|
+
ctx: IQueryInfos;
|
|
16
|
+
deps: {
|
|
17
|
+
actionsListDomain: IActionsListDomain;
|
|
18
|
+
attributeDomain: IAttributeDomain;
|
|
19
|
+
utils: IUtils;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Executes post-save action lists on saved value
|
|
24
|
+
* Action lists can perform side effects
|
|
25
|
+
* Unlike pre-save value actions, this runs AFTER the value is persisted to the database.
|
|
26
|
+
*/
|
|
27
|
+
declare const postSaveValue: (params: IPostSaveValueParams) => Promise<void>;
|
|
28
|
+
export default postSaveValue;
|
|
@@ -65,6 +65,7 @@ export interface IValueDomain {
|
|
|
65
65
|
recordId: string;
|
|
66
66
|
attribute: string;
|
|
67
67
|
value: ISaveValue;
|
|
68
|
+
skipReadonly?: boolean;
|
|
68
69
|
ctx: IQueryInfos;
|
|
69
70
|
}): Promise<IValue[]>;
|
|
70
71
|
/**
|
|
@@ -80,6 +81,7 @@ export interface IValueDomain {
|
|
|
80
81
|
ctx: IQueryInfos;
|
|
81
82
|
keepEmpty?: boolean;
|
|
82
83
|
skipPermission?: boolean;
|
|
84
|
+
skipReadonly?: boolean;
|
|
83
85
|
}): Promise<ISaveBatchValueResult>;
|
|
84
86
|
deleteValue(params: IDeleteValueParams): Promise<IValue[]>;
|
|
85
87
|
formatValue(params: {
|
|
@@ -26,7 +26,9 @@ export declare const commonAttributeData: {
|
|
|
26
26
|
name: string;
|
|
27
27
|
is_system: boolean;
|
|
28
28
|
}[];
|
|
29
|
+
postSaveValue: any[];
|
|
29
30
|
deleteValue: any[];
|
|
31
|
+
postDeleteValue: any[];
|
|
30
32
|
};
|
|
31
33
|
};
|
|
32
34
|
export declare const createLibraries: (libraries: MigrationLibraryToCreate[], dbService: IDbService, libraryRepo: ILibraryRepo, ctx: IQueryInfos) => Promise<void>;
|
|
@@ -4,7 +4,7 @@ import { type IConfig } from '_types/config';
|
|
|
4
4
|
import { type IQueryInfos } from '_types/queryInfos';
|
|
5
5
|
export interface IMailerService {
|
|
6
6
|
mailer?: nodemailer.Transporter;
|
|
7
|
-
sendEmail?: ({ to, subject, text, html, attachments }: ISendMailParams, ctx: IQueryInfos) => Promise<void>;
|
|
7
|
+
sendEmail?: ({ to, subject, text, html, attachments, headers }: ISendMailParams, ctx: IQueryInfos) => Promise<void>;
|
|
8
8
|
}
|
|
9
9
|
interface IDeps {
|
|
10
10
|
config: IConfig;
|
|
@@ -21,6 +21,7 @@ interface ISendMailParams {
|
|
|
21
21
|
content?: string | Buffer;
|
|
22
22
|
path?: string;
|
|
23
23
|
}>;
|
|
24
|
+
headers?: Record<string, string>;
|
|
24
25
|
}
|
|
25
26
|
export default function ({ config, 'core.domain.globalSettings': globalSettingsDomain, 'core.infra.mailer': mailer, }: IDeps): IMailerService;
|
|
26
27
|
export {};
|