@aristid/leav-types 0.0.7-2d1cda7 → 0.0.7-36dce1f
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__/mocks/attribute.d.ts +1 -0
- package/apps/core/src/__tests__/mocks/view.d.ts +1 -0
- package/apps/core/src/_types/actionsList.d.ts +1 -1
- package/apps/core/src/_types/attribute.d.ts +1 -0
- package/apps/core/src/_types/errors.d.ts +1 -0
- package/apps/core/src/_types/views.d.ts +34 -35
- package/apps/core/src/domain/view/viewDomain.d.ts +1 -0
- package/apps/core/src/infra/db/migrations/006-addRequiredAttributeProperty.d.ts +11 -0
- package/apps/core/src/infra/db/migrations/007-updateHexColor.d.ts +9 -0
- package/apps/core/src/infra/view/_types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ export type ActionsListParamsConfig<ParamsRequired extends Record<string, boolea
|
|
|
30
30
|
type: 'boolean' | 'string' | 'number';
|
|
31
31
|
description: string;
|
|
32
32
|
required: ParamsRequired[Name];
|
|
33
|
-
|
|
33
|
+
helper_value: string;
|
|
34
34
|
};
|
|
35
35
|
}[keyof ParamsRequired];
|
|
36
36
|
export interface IActionsListFunctionResult {
|
|
@@ -63,6 +63,7 @@ export declare enum Errors {
|
|
|
63
63
|
PREVIEWS_SETTINGS_NOT_ALLOWED = "PREVIEWS_SETTINGS_NOT_ALLOWED",
|
|
64
64
|
PROTECTED_ENDPOINT = "PROTECTED_ENDPOINT",
|
|
65
65
|
READONLY_ATTRIBUTE = "READONLY_ATTRIBUTE",
|
|
66
|
+
REQUIRED_ATTRIBUTE = "REQUIRED_ATTRIBUTE",
|
|
66
67
|
REQUIRED_ATTRIBUTE_FORMAT = "REQUIRED_ATTRIBUTE_FORMAT",
|
|
67
68
|
REQUIRED_ATTRIBUTE_LABEL = "REQUIRED_ATTRIBUTE_LABEL",
|
|
68
69
|
REQUIRED_ATTRIBUTE_LINKED_LIBRARY = "REQUIRED_ATTRIBUTE_LINKED_LIBRARY",
|
|
@@ -10,40 +10,39 @@ export declare enum ViewSizes {
|
|
|
10
10
|
MEDIUM = "MEDIUM",
|
|
11
11
|
BIG = "BIG"
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
interface IViewDisplay {
|
|
14
|
+
type: ViewTypes;
|
|
15
|
+
size: ViewSizes;
|
|
16
|
+
}
|
|
17
|
+
interface IViewValuesVersion {
|
|
18
|
+
[treeId: string]: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IView extends ICoreEntity {
|
|
21
|
+
shared?: boolean;
|
|
22
|
+
created_by?: string;
|
|
23
|
+
created_at?: number;
|
|
24
|
+
modified_at?: number;
|
|
25
|
+
library?: string;
|
|
26
|
+
description?: ISystemTranslation;
|
|
27
|
+
color?: string;
|
|
28
|
+
display?: IViewDisplay;
|
|
29
|
+
filters?: IRecordFilterLight[];
|
|
30
|
+
sort?: IRecordSortLight[];
|
|
31
|
+
valuesVersions?: IViewValuesVersion;
|
|
32
|
+
attributes?: string[];
|
|
33
|
+
}
|
|
34
|
+
export interface IViewValuesVersionForGraphql {
|
|
35
|
+
treeId: string;
|
|
36
|
+
treeNode: {
|
|
37
|
+
id: string;
|
|
34
38
|
};
|
|
35
|
-
interface IViewFilterOptions extends ICoreEntityFilterOptions {
|
|
36
|
-
created_by?: string;
|
|
37
|
-
library?: string;
|
|
38
|
-
type?: ViewTypes;
|
|
39
|
-
}
|
|
40
|
-
interface IViewValuesVersion {
|
|
41
|
-
[treeId: string]: string;
|
|
42
|
-
}
|
|
43
|
-
interface IViewValuesVersionForGraphql {
|
|
44
|
-
treeId: string;
|
|
45
|
-
treeNode: {
|
|
46
|
-
id: string;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
39
|
}
|
|
40
|
+
export type ViewFromGraphQL = Omit<IView, 'valuesVersions' | 'settings'> & {
|
|
41
|
+
valuesVersions: IViewValuesVersionForGraphql[];
|
|
42
|
+
};
|
|
43
|
+
export interface IViewFilterOptions extends ICoreEntityFilterOptions {
|
|
44
|
+
created_by?: string;
|
|
45
|
+
library?: string;
|
|
46
|
+
type?: ViewTypes;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -4,6 +4,7 @@ import { IViewRepo } from 'infra/view/_types';
|
|
|
4
4
|
import { IUtils } from 'utils/utils';
|
|
5
5
|
import { IList } from '_types/list';
|
|
6
6
|
import { IQueryInfos } from '_types/queryInfos';
|
|
7
|
+
import { IView } from '_types/views';
|
|
7
8
|
export interface IViewDomain {
|
|
8
9
|
saveView(view: IView, ctx: IQueryInfos): Promise<IView>;
|
|
9
10
|
getViews(library: string, ctx: IQueryInfos): Promise<IList<IView>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type i18n } from 'i18next';
|
|
2
|
+
import { type IDbService } from '../dbService';
|
|
3
|
+
import { type IConfig } from '../../../_types/config';
|
|
4
|
+
import { type IMigration } from '../../../_types/migration';
|
|
5
|
+
interface IDeps {
|
|
6
|
+
'core.infra.db.dbService'?: IDbService;
|
|
7
|
+
translator?: i18n;
|
|
8
|
+
config?: IConfig;
|
|
9
|
+
}
|
|
10
|
+
export default function ({ 'core.infra.db.dbService': dbService }?: IDeps): IMigration;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type IDbService } from '../dbService';
|
|
2
|
+
import { type IMigration } from '../../../_types/migration';
|
|
3
|
+
import { IAttributeRepo } from 'infra/attribute/attributeRepo';
|
|
4
|
+
interface IDeps {
|
|
5
|
+
'core.infra.db.dbService'?: IDbService;
|
|
6
|
+
'core.infra.attribute'?: IAttributeRepo;
|
|
7
|
+
}
|
|
8
|
+
export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.attribute': attributeRepo }?: IDeps): IMigration;
|
|
9
|
+
export {};
|
|
@@ -3,6 +3,7 @@ import { IDbUtils } from 'infra/db/dbUtils';
|
|
|
3
3
|
import { IList } from '_types/list';
|
|
4
4
|
import { IGetCoreEntitiesParams } from '_types/shared';
|
|
5
5
|
import { IQueryInfos } from '../../_types/queryInfos';
|
|
6
|
+
import { IView } from '_types/views';
|
|
6
7
|
export declare const VIEWS_COLLECTION_NAME = "core_views";
|
|
7
8
|
export interface IViewRepo {
|
|
8
9
|
createView(view: IView, ctx: IQueryInfos): Promise<IView>;
|