@aristid/leav-types 0.0.7-8a5268e → 0.0.7-8afabea
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/config/default.d.ts +1 -0
- package/apps/core/src/__tests__/mocks/attribute.d.ts +1 -0
- package/apps/core/src/_types/config.d.ts +2 -0
- package/apps/core/src/_types/views.d.ts +4 -0
- package/apps/core/src/domain/record/recordDomain.d.ts +5 -1
- package/apps/core/src/domain/value/helpers/{canSaveValue.d.ts → canSaveRecordValue.d.ts} +3 -3
- package/apps/core/src/domain/value/helpers/validateValue.d.ts +1 -1
- package/apps/core/src/infra/attributeTypes/attributeTypesRepo.d.ts +2 -2
- package/apps/core/src/infra/value/valueRepo.d.ts +6 -2
- package/libs/utils/src/types/forms.d.ts +6 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AttributeFormats, AttributeTypes, IAttribute } from '../../_types/attribute';
|
|
2
2
|
export declare const mockAttrSimple: IAttribute;
|
|
3
|
+
export declare const mockUniqueAttrSimple: IAttribute;
|
|
3
4
|
export declare const mockAttrId: IAttribute;
|
|
4
5
|
export declare const mockAttrAdv: IAttribute;
|
|
5
6
|
export declare const mockAttrAdvMultiVal: IAttribute;
|
|
@@ -76,12 +76,14 @@ export interface IAuth {
|
|
|
76
76
|
clientId?: string;
|
|
77
77
|
postLogoutRedirectUri?: string;
|
|
78
78
|
skipLogoutConfirmationPage?: boolean;
|
|
79
|
+
idTokenUserClaim?: string;
|
|
79
80
|
} | {
|
|
80
81
|
enable: true;
|
|
81
82
|
wellKnownEndpoint: string;
|
|
82
83
|
clientId: string;
|
|
83
84
|
postLogoutRedirectUri: string;
|
|
84
85
|
skipLogoutConfirmationPage?: boolean;
|
|
86
|
+
idTokenUserClaim: string;
|
|
85
87
|
};
|
|
86
88
|
testApiKey?: string;
|
|
87
89
|
}
|
|
@@ -40,6 +40,10 @@ export interface IViewValuesVersionForGraphql {
|
|
|
40
40
|
export type ViewFromGraphQL = Omit<IView, 'valuesVersions' | 'settings'> & {
|
|
41
41
|
valuesVersions: IViewValuesVersionForGraphql[];
|
|
42
42
|
};
|
|
43
|
+
export type PartialViewFromGraphQL = Omit<IView, 'id' | 'valuesVersions' | 'settings'> & {
|
|
44
|
+
id: string;
|
|
45
|
+
valuesVersions: IViewValuesVersionForGraphql[];
|
|
46
|
+
};
|
|
43
47
|
export interface IViewFilterOptions extends ICoreEntityFilterOptions {
|
|
44
48
|
created_by?: string;
|
|
45
49
|
library?: string;
|
|
@@ -20,6 +20,8 @@ import { IRecordPermissionDomain } from '../permission/recordPermissionDomain';
|
|
|
20
20
|
import { SendRecordUpdateEventHelper } from './helpers/sendRecordUpdateEvent';
|
|
21
21
|
import { ICreateRecordResult, IFindRecordParams } from './_types';
|
|
22
22
|
import { IFormRepo } from 'infra/form/formRepo';
|
|
23
|
+
import { IRecordAttributePermissionDomain } from '../permission/recordAttributePermissionDomain';
|
|
24
|
+
import { IAttributePermissionDomain } from '../permission/attributePermissionDomain';
|
|
23
25
|
export interface IRecordDomain {
|
|
24
26
|
createRecord(params: {
|
|
25
27
|
library: string;
|
|
@@ -90,6 +92,8 @@ export interface IRecordDomainDeps {
|
|
|
90
92
|
'core.domain.value': IValueDomain;
|
|
91
93
|
'core.domain.permission.record': IRecordPermissionDomain;
|
|
92
94
|
'core.domain.permission.library': ILibraryPermissionDomain;
|
|
95
|
+
'core.domain.permission.attribute': IAttributePermissionDomain;
|
|
96
|
+
'core.domain.permission.recordAttribute': IRecordAttributePermissionDomain;
|
|
93
97
|
'core.domain.helpers.getCoreEntityById': GetCoreEntityByIdFunc;
|
|
94
98
|
'core.domain.helpers.validate': IValidateHelper;
|
|
95
99
|
'core.domain.record.helpers.sendRecordUpdateEvent': SendRecordUpdateEventHelper;
|
|
@@ -102,4 +106,4 @@ export interface IRecordDomainDeps {
|
|
|
102
106
|
'core.utils': IUtils;
|
|
103
107
|
translator: i18n;
|
|
104
108
|
}
|
|
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.infra.form': formRepo, 'core.domain.eventsManager': eventsManager, 'core.infra.cache.cacheService': cacheService, 'core.utils': utils, translator }: IRecordDomainDeps): IRecordDomain;
|
|
109
|
+
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.permission.attribute': attrPermissionDomain, 'core.domain.permission.recordAttribute': recordAttributePermissionDomain, '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.infra.form': formRepo, 'core.domain.eventsManager': eventsManager, 'core.infra.cache.cacheService': cacheService, 'core.utils': utils, translator }: IRecordDomainDeps): IRecordDomain;
|
|
@@ -6,12 +6,12 @@ import { IQueryInfos } from '_types/queryInfos';
|
|
|
6
6
|
import { IValue } from '_types/value';
|
|
7
7
|
import { ErrorFieldDetail, Errors } from '../../../_types/errors';
|
|
8
8
|
import { RecordAttributePermissionsActions, RecordPermissionsActions } from '../../../_types/permissions';
|
|
9
|
-
interface
|
|
9
|
+
interface ICanSaveRecordValueRes {
|
|
10
10
|
canSave: boolean;
|
|
11
11
|
reason?: RecordAttributePermissionsActions | RecordPermissionsActions | Errors;
|
|
12
12
|
fields?: ErrorFieldDetail<IValue>;
|
|
13
13
|
}
|
|
14
|
-
interface
|
|
14
|
+
interface ICanSaveRecordValueParams {
|
|
15
15
|
attributeProps: IAttribute;
|
|
16
16
|
value: IValue;
|
|
17
17
|
library: string;
|
|
@@ -24,5 +24,5 @@ interface ICanSaveValueParams {
|
|
|
24
24
|
config: IConfig;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
declare const _default: (params:
|
|
27
|
+
declare const _default: (params: ICanSaveRecordValueParams) => Promise<ICanSaveRecordValueRes>;
|
|
28
28
|
export default _default;
|
|
@@ -48,9 +48,9 @@ export interface IAttributeTypeRepo {
|
|
|
48
48
|
/**
|
|
49
49
|
* Check if a value is unique
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
isValueUsed?({ library, excludedRecordId, attribute, value, ctx }: {
|
|
52
52
|
library: string;
|
|
53
|
-
|
|
53
|
+
excludedRecordId?: string;
|
|
54
54
|
attribute: IAttribute;
|
|
55
55
|
value: IValue;
|
|
56
56
|
ctx: IQueryInfos;
|
|
@@ -33,9 +33,13 @@ export interface IValueRepo {
|
|
|
33
33
|
value: IValue;
|
|
34
34
|
ctx: IQueryInfos;
|
|
35
35
|
}): Promise<IValue>;
|
|
36
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Check if a value is unique expeted for the given record
|
|
38
|
+
* if recordId is null, it will check for the whole library
|
|
39
|
+
*/
|
|
40
|
+
isValueUsed({ library, excludedRecordId, attribute, value, ctx }: {
|
|
37
41
|
library: string;
|
|
38
|
-
|
|
42
|
+
excludedRecordId?: string;
|
|
39
43
|
attribute: IAttribute;
|
|
40
44
|
value: IValue;
|
|
41
45
|
ctx: IQueryInfos;
|
|
@@ -4,7 +4,8 @@ export declare enum FormUIElementTypes {
|
|
|
4
4
|
FIELDS_CONTAINER = "fields_container",
|
|
5
5
|
TAB_FIELDS_CONTAINER = "tab_fields_container",
|
|
6
6
|
TEXT_BLOCK = "text_block",
|
|
7
|
-
TABS = "tabs"
|
|
7
|
+
TABS = "tabs",
|
|
8
|
+
FRAME = "frame"
|
|
8
9
|
}
|
|
9
10
|
export declare enum FormFieldTypes {
|
|
10
11
|
TEXT_INPUT = "input_field",
|
|
@@ -41,6 +42,10 @@ export interface IFormTabsSettings {
|
|
|
41
42
|
export interface IFormTextBlockSettings {
|
|
42
43
|
content?: string;
|
|
43
44
|
}
|
|
45
|
+
export interface IFormFrameSettings {
|
|
46
|
+
url: string;
|
|
47
|
+
height?: string;
|
|
48
|
+
}
|
|
44
49
|
export interface IFormDateFieldSettings extends ICommonFieldsSettings {
|
|
45
50
|
withTime: boolean;
|
|
46
51
|
}
|