@aristid/leav-types 0.0.7-8c2b8a1 → 0.0.7-9a51399
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/view.d.ts +0 -1
- package/apps/core/src/_types/views.d.ts +35 -34
- package/apps/core/src/domain/attribute/attributeDomain.d.ts +0 -1
- package/apps/core/src/domain/record/recordDomain.d.ts +1 -4
- package/apps/core/src/domain/view/viewDomain.d.ts +0 -1
- package/apps/core/src/infra/attributeTypes/helpers/getConditionPart.d.ts +1 -1
- package/apps/core/src/infra/view/_types.d.ts +0 -1
- package/package.json +1 -1
|
@@ -10,39 +10,40 @@ 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
|
-
|
|
34
|
-
export interface IViewValuesVersionForGraphql {
|
|
35
|
-
treeId: string;
|
|
36
|
-
treeNode: {
|
|
37
|
-
id: string;
|
|
13
|
+
declare global {
|
|
14
|
+
interface IView extends ICoreEntity {
|
|
15
|
+
shared?: boolean;
|
|
16
|
+
created_by?: string;
|
|
17
|
+
created_at?: number;
|
|
18
|
+
modified_at?: number;
|
|
19
|
+
library?: string;
|
|
20
|
+
description?: ISystemTranslation;
|
|
21
|
+
color?: string;
|
|
22
|
+
display?: IViewDisplay;
|
|
23
|
+
filters?: IRecordFilterLight[];
|
|
24
|
+
sort?: IRecordSortLight[];
|
|
25
|
+
valuesVersions?: IViewValuesVersion;
|
|
26
|
+
attributes?: string[];
|
|
27
|
+
}
|
|
28
|
+
interface IViewDisplay {
|
|
29
|
+
type: ViewTypes;
|
|
30
|
+
size: ViewSizes;
|
|
31
|
+
}
|
|
32
|
+
type ViewFromGraphQL = Omit<IView, 'valuesVersions' | 'settings'> & {
|
|
33
|
+
valuesVersions: IViewValuesVersionForGraphql[];
|
|
38
34
|
};
|
|
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
|
+
}
|
|
39
49
|
}
|
|
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 {};
|
|
@@ -57,7 +57,6 @@ export interface IAttributeDomain {
|
|
|
57
57
|
attributeId: string;
|
|
58
58
|
ctx: IQueryInfos;
|
|
59
59
|
}): Promise<ILibrary[]>;
|
|
60
|
-
getFormAttributes(libraryId: string, formId: string, ctx: IQueryInfos): Promise<IAttribute[]>;
|
|
61
60
|
doesCompute(attrData: IAttribute): boolean;
|
|
62
61
|
}
|
|
63
62
|
export interface IAttributeDomainDeps {
|
|
@@ -19,12 +19,10 @@ import { IAttributeDomain } from '../attribute/attributeDomain';
|
|
|
19
19
|
import { IRecordPermissionDomain } from '../permission/recordPermissionDomain';
|
|
20
20
|
import { SendRecordUpdateEventHelper } from './helpers/sendRecordUpdateEvent';
|
|
21
21
|
import { ICreateRecordResult, IFindRecordParams } from './_types';
|
|
22
|
-
import { IFormRepo } from 'infra/form/formRepo';
|
|
23
22
|
export interface IRecordDomain {
|
|
24
23
|
createRecord(params: {
|
|
25
24
|
library: string;
|
|
26
25
|
values?: IValue[];
|
|
27
|
-
verifyRequiredAttributes?: boolean;
|
|
28
26
|
ctx: IQueryInfos;
|
|
29
27
|
}): Promise<ICreateRecordResult>;
|
|
30
28
|
/**
|
|
@@ -96,10 +94,9 @@ export interface IRecordDomainDeps {
|
|
|
96
94
|
'core.infra.library': ILibraryRepo;
|
|
97
95
|
'core.infra.tree': ITreeRepo;
|
|
98
96
|
'core.infra.value': IValueRepo;
|
|
99
|
-
'core.infra.form': IFormRepo;
|
|
100
97
|
'core.domain.eventsManager': IEventsManagerDomain;
|
|
101
98
|
'core.infra.cache.cacheService': ICachesService;
|
|
102
99
|
'core.utils': IUtils;
|
|
103
100
|
translator: i18n;
|
|
104
101
|
}
|
|
105
|
-
export default function ({ config, 'core.infra.record': recordRepo, 'core.domain.attribute': attributeDomain, 'core.domain.value': valueDomain, 'core.domain.permission.record': recordPermissionDomain, 'core.domain.permission.library': libraryPermissionDomain, 'core.domain.helpers.getCoreEntityById': getCoreEntityById, 'core.domain.helpers.validate': validateHelper, 'core.domain.record.helpers.sendRecordUpdateEvent': sendRecordUpdateEvent, 'core.infra.library': libraryRepo, 'core.infra.tree': treeRepo, 'core.infra.value': valueRepo, 'core.
|
|
102
|
+
export default function ({ config, 'core.infra.record': recordRepo, 'core.domain.attribute': attributeDomain, 'core.domain.value': valueDomain, 'core.domain.permission.record': recordPermissionDomain, 'core.domain.permission.library': libraryPermissionDomain, 'core.domain.helpers.getCoreEntityById': getCoreEntityById, 'core.domain.helpers.validate': validateHelper, 'core.domain.record.helpers.sendRecordUpdateEvent': sendRecordUpdateEvent, 'core.infra.library': libraryRepo, 'core.infra.tree': treeRepo, 'core.infra.value': valueRepo, 'core.domain.eventsManager': eventsManager, 'core.infra.cache.cacheService': cacheService, 'core.utils': utils, translator }: IRecordDomainDeps): IRecordDomain;
|
|
@@ -4,7 +4,6 @@ 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';
|
|
8
7
|
export interface IViewDomain {
|
|
9
8
|
saveView(view: IView, ctx: IQueryInfos): Promise<IView>;
|
|
10
9
|
getViews(library: string, ctx: IQueryInfos): Promise<IList<IView>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AqlLiteral, GeneratedAqlQuery } from 'arangojs/aql';
|
|
2
2
|
import { IAttribute } from '../../../_types/attribute';
|
|
3
3
|
import { AttributeCondition } from '../../../_types/record';
|
|
4
|
-
export type GetConditionPart = (valueIdentifier: string | AqlLiteral, condition: AttributeCondition, value: string | number | boolean, attribute: IAttribute
|
|
4
|
+
export type GetConditionPart = (valueIdentifier: string | AqlLiteral, condition: AttributeCondition, value: string | number | boolean, attribute: IAttribute) => GeneratedAqlQuery;
|
|
5
5
|
export default function (): GetConditionPart;
|
|
@@ -3,7 +3,6 @@ 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';
|
|
7
6
|
export declare const VIEWS_COLLECTION_NAME = "core_views";
|
|
8
7
|
export interface IViewRepo {
|
|
9
8
|
createView(view: IView, ctx: IQueryInfos): Promise<IView>;
|