@aristid/leav-types 1.4.1-a0cddefe → 1.4.1-a4958d06
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/_constants/attributes.d.ts +2 -1
- package/apps/core/src/infra/db/helpers/libraryUtils.d.ts +38 -0
- package/apps/core/src/infra/db/migrations/000-init/systemLibraries.d.ts +1 -8
- package/apps/core/src/infra/db/migrations/013-threads/comments.d.ts +4 -0
- package/apps/core/src/infra/db/migrations/013-threads/constants.d.ts +10 -0
- package/apps/core/src/infra/db/migrations/013-threads/index.d.ts +11 -0
- package/apps/core/src/infra/db/migrations/013-threads/statuses.d.ts +5 -0
- package/apps/core/src/infra/db/migrations/013-threads/threads.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const DISCUSSION_THREADS_ATTRIBUTE_ID = "discussion_threads";
|
|
2
|
+
export declare const BASE_ATTRIBUTES: string[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ILibraryRepo } from '../../library/libraryRepo';
|
|
2
|
+
import { type IDbService } from '../dbService';
|
|
3
|
+
import { type IQueryInfos } from '../../../_types/queryInfos';
|
|
4
|
+
import { type IAttributeForRepo, type IAttributeRepo } from '../../attribute/attributeRepo';
|
|
5
|
+
import { type ITree } from '../../../_types/tree';
|
|
6
|
+
import { type Override } from '@leav/utils';
|
|
7
|
+
import { type ILibraryDbEvent } from '../../../_types/library';
|
|
8
|
+
export type MigrationLibraryToCreate = Override<ILibraryDbEvent, {
|
|
9
|
+
attributes: string[];
|
|
10
|
+
fullTextAttributes: string[];
|
|
11
|
+
}> & {
|
|
12
|
+
_key: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const commonAttributeData: {
|
|
15
|
+
system: boolean;
|
|
16
|
+
required: boolean;
|
|
17
|
+
multiple_values: boolean;
|
|
18
|
+
versions_conf: {
|
|
19
|
+
versionable: boolean;
|
|
20
|
+
};
|
|
21
|
+
readonly: boolean;
|
|
22
|
+
actions_list: {
|
|
23
|
+
getValue: any[];
|
|
24
|
+
saveValue: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
is_system: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
deleteValue: any[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const createLibraries: (libraries: MigrationLibraryToCreate[], dbService: IDbService, libraryRepo: ILibraryRepo, ctx: IQueryInfos) => Promise<void>;
|
|
33
|
+
export declare const createAttributes: (attributes: IAttributeForRepo[], attributeRepo: IAttributeRepo, ctx: IQueryInfos) => Promise<void>;
|
|
34
|
+
export declare const linkLibraryAttributes: (attributeRepo: IAttributeRepo, libraryRepo: ILibraryRepo, libraryId: string, attributes: IAttributeForRepo[], ctx: IQueryInfos) => Promise<void>;
|
|
35
|
+
export type MigrationTreeToCreate = ITree & {
|
|
36
|
+
_key: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const createTrees: (trees: MigrationTreeToCreate[], dbService: IDbService, ctx: IQueryInfos) => Promise<void>;
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type ILibrary } from '../../../../_types/library';
|
|
3
|
-
export type MigrationLibraryToCreate = Override<ILibrary, {
|
|
4
|
-
attributes: string[];
|
|
5
|
-
fullTextAttributes: string[];
|
|
6
|
-
}> & {
|
|
7
|
-
_key: string;
|
|
8
|
-
};
|
|
1
|
+
import { type MigrationLibraryToCreate } from '../../helpers/libraryUtils';
|
|
9
2
|
export declare const systemLibraries: MigrationLibraryToCreate[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type MigrationLibraryToCreate } from '../../helpers/libraryUtils';
|
|
2
|
+
import { type IAttributeForRepo } from 'infra/attribute/attributeRepo';
|
|
3
|
+
export declare const commentAttributes: IAttributeForRepo[];
|
|
4
|
+
export declare const commentLibrary: MigrationLibraryToCreate;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const THREADS_LIBRARY_ID = "discussion_threads";
|
|
2
|
+
export declare const COMMENTS_LIBRARY_ID = "discussion_comments";
|
|
3
|
+
export declare const STATUSES_LIBRARY_ID = "statuses";
|
|
4
|
+
export declare const THREAD_STATUSES_TREE_ID = "discussion_thread_statuses_tree";
|
|
5
|
+
export declare const COMMENT_CONTENT_ATTRIBUTE_ID = "discussion_comments_text";
|
|
6
|
+
export declare const COMMENT_THREAD_ATTRIBUTE_ID = "discussion_comments_thread";
|
|
7
|
+
export declare const THREAD_STATUS_ATTRIBUTE_ID = "discussion_threads_status";
|
|
8
|
+
export declare const THREAD_COMMENTS_ATTRIBUTE_ID = "discussion_threads_comments";
|
|
9
|
+
export declare const STATUSES_LABEL_ATTRIBUTE_ID = "statuses_label";
|
|
10
|
+
export declare const STATUSES_COLOR_ATTRIBUTE_ID = "statuses_color";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type IMigration } from '_types/migration';
|
|
2
|
+
import { type IDbService } from '../../dbService';
|
|
3
|
+
import { type ILibraryRepo } from '../../../library/libraryRepo';
|
|
4
|
+
import { type IAttributeRepo } from '../../../attribute/attributeRepo';
|
|
5
|
+
interface IDeps {
|
|
6
|
+
'core.infra.db.dbService': IDbService;
|
|
7
|
+
'core.infra.library': ILibraryRepo;
|
|
8
|
+
'core.infra.attribute': IAttributeRepo;
|
|
9
|
+
}
|
|
10
|
+
export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.library': libraryRepo, 'core.infra.attribute': attributeRepo, }: IDeps): IMigration;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type MigrationLibraryToCreate, type MigrationTreeToCreate } from '../../helpers/libraryUtils';
|
|
2
|
+
import { type IAttributeForRepo } from 'infra/attribute/attributeRepo';
|
|
3
|
+
export declare const statusesAttributes: IAttributeForRepo[];
|
|
4
|
+
export declare const statusesLibrary: MigrationLibraryToCreate;
|
|
5
|
+
export declare const threadStatusTree: MigrationTreeToCreate;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type MigrationLibraryToCreate } from '../../helpers/libraryUtils';
|
|
2
|
+
import { type IAttributeForRepo } from 'infra/attribute/attributeRepo';
|
|
3
|
+
export declare const threadsAttributes: IAttributeForRepo[];
|
|
4
|
+
export declare const threadLibrary: MigrationLibraryToCreate;
|