@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.
@@ -15,6 +15,7 @@ export declare const mockAttrTree: {
15
15
  linked_tree: string;
16
16
  system?: boolean;
17
17
  readonly?: boolean;
18
+ required?: boolean;
18
19
  format?: AttributeFormats;
19
20
  linked_library?: string;
20
21
  embedded_fields?: import("../../_types/attribute").IEmbeddedAttribute[];
@@ -1,2 +1,3 @@
1
+ import { IView } from '../../_types/views';
1
2
  export declare const mockViewBeforeCreation: IView;
2
3
  export declare const mockView: MandatoryId<IView>;
@@ -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
- default_value: string;
33
+ helper_value: string;
34
34
  };
35
35
  }[keyof ParamsRequired];
36
36
  export interface IActionsListFunctionResult {
@@ -8,6 +8,7 @@ import { IDateRangeValue } from './value';
8
8
  export interface IAttribute extends ICoreEntity {
9
9
  system?: boolean;
10
10
  readonly?: boolean;
11
+ required?: boolean;
11
12
  type: AttributeTypes;
12
13
  format?: AttributeFormats;
13
14
  linked_library?: string;
@@ -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
- 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[];
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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "0.0.7-2d1cda7",
3
+ "version": "0.0.7-36dce1f",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",