@aristid/leav-types 1.6.0-95bcf843 → 1.6.0-a54099d3

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.
@@ -6,6 +6,7 @@ import { type ITreeDomain } from 'domain/tree/treeDomain';
6
6
  import { type IViewDomain } from 'domain/view/viewDomain';
7
7
  import { type IGraphqlAppModule, type IGraphqlApp } from '../../graphql/graphqlApp';
8
8
  import { type ICoreApp } from '../coreApp';
9
+ import { type IExportProfileDomain } from 'domain/export/exportProfileDomain';
9
10
  export type ICoreLibraryApp = IGraphqlAppModule;
10
11
  interface IDeps {
11
12
  'core.domain.library'?: ILibraryDomain;
@@ -14,8 +15,9 @@ interface IDeps {
14
15
  'core.domain.tree'?: ITreeDomain;
15
16
  'core.domain.view'?: IViewDomain;
16
17
  'core.domain.permission'?: IPermissionDomain;
18
+ 'core.domain.export.exportProfile'?: IExportProfileDomain;
17
19
  'core.app.graphql'?: IGraphqlApp;
18
20
  'core.app.core'?: ICoreApp;
19
21
  }
20
- export default function ({ 'core.domain.library': libraryDomain, 'core.domain.record': recordDomain, 'core.domain.attribute': attributeDomain, 'core.domain.tree': treeDomain, 'core.domain.view': viewDomain, 'core.domain.permission': permissionDomain, 'core.app.graphql': graphqlApp, 'core.app.core': coreApp, }?: IDeps): ICoreLibraryApp;
22
+ export default function ({ 'core.domain.library': libraryDomain, 'core.domain.record': recordDomain, 'core.domain.attribute': attributeDomain, 'core.domain.tree': treeDomain, 'core.domain.view': viewDomain, 'core.domain.permission': permissionDomain, 'core.domain.export.exportProfile': exportProfileDomain, 'core.app.graphql': graphqlApp, 'core.app.core': coreApp, }?: IDeps): ICoreLibraryApp;
21
23
  export {};
@@ -1,23 +1,33 @@
1
1
  import { type ILibraryDomain } from '../library/libraryDomain';
2
2
  import { type IQueryInfos } from '../../_types/queryInfos';
3
+ import { type IAttributeDomain } from 'domain/attribute/attributeDomain';
4
+ import { type IConfig } from '_types/config';
5
+ export interface IExportProfileColumn {
6
+ columnLabel: string;
7
+ attribute: string;
8
+ }
9
+ export interface IExportProfile {
10
+ label: string;
11
+ columns: IExportProfileColumn[];
12
+ error?: {
13
+ message: string;
14
+ };
15
+ }
3
16
  export interface IExportProfileConfig {
4
17
  defaultProfile: string;
5
- profiles: Array<{
6
- label: string;
7
- columns: Array<{
8
- columnLabel: string;
9
- attribute: string;
10
- }>;
11
- }>;
18
+ profiles: IExportProfile[];
12
19
  }
13
20
  export interface IExportColumn {
14
21
  columnLabel: string;
15
22
  attribute: string;
16
23
  }
17
24
  export interface IExportProfileDomain {
25
+ getExportProfileConfig(libraryId: string, ctx: IQueryInfos): Promise<IExportProfileConfig | null>;
18
26
  getColumnsFromProfileConfig(profile: string | undefined, library: string, ctx: IQueryInfos): Promise<IExportColumn[]>;
19
27
  }
20
28
  export interface IExportProfileDomainDeps {
21
29
  'core.domain.library': ILibraryDomain;
30
+ 'core.domain.attribute': IAttributeDomain;
31
+ config: IConfig;
22
32
  }
23
- export default function ({ 'core.domain.library': libraryDomain }: IExportProfileDomainDeps): IExportProfileDomain;
33
+ export default function ({ 'core.domain.library': libraryDomain, 'core.domain.attribute': attributeDomain, config, }: IExportProfileDomainDeps): IExportProfileDomain;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.6.0-95bcf843",
3
+ "version": "1.6.0-a54099d3",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",