@dative-gpi/foundation-core-domain 1.0.28 → 1.0.30

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.
@@ -1,5 +1,5 @@
1
1
  export enum RoleType {
2
- None = 0,
3
- Organisation = 1,
4
- OrganisationType = 2
5
- }
2
+ None = 0,
3
+ Organisation = 1,
4
+ OrganisationType = 2
5
+ }
package/models/index.ts CHANGED
@@ -49,6 +49,7 @@ export * from "./scenarios"; // No service
49
49
  export * from "./shared"; // No service
50
50
  export * from "./serviceAccountOrganisationAuthTokens";
51
51
  export * from "./serviceAccountOrganisations";
52
+ export * from "./serviceAccountRoleOrganisations";
52
53
  export * from "./userOrganisationColumns"; // No service
53
54
  export * from "./userOrganisations";
54
55
  export * from "./userOrganisationTables";
@@ -1,6 +1,5 @@
1
- import type { RoleOrganisationInfosDTO } from "./roleOrganisationInfos";
2
- import { RoleOrganisationInfos } from "./roleOrganisationInfos";
3
- import type { RoleType } from "../enums/roleEnums";
1
+ import { RoleOrganisationInfos, type RoleOrganisationInfosDTO } from "./roleOrganisationInfos";
2
+ import { type RoleType } from "../enums/roleEnums";
4
3
 
5
4
  export class RoleOrganisationDetails extends RoleOrganisationInfos {
6
5
  description: string;
@@ -19,7 +18,6 @@ export interface RoleOrganisationDetailsDTO extends RoleOrganisationInfosDTO {
19
18
  export interface CreateRoleOrganisationDTO {
20
19
  roleTemplateType: RoleType;
21
20
  roleTemplateId: string | null;
22
- userType: number;
23
21
  icon: string;
24
22
  code: string;
25
23
  label: string;
@@ -1,49 +1,47 @@
1
- import type { PermissionInfosDTO } from "@dative-gpi/foundation-shared-domain/models";
2
- import { PermissionInfos } from "@dative-gpi/foundation-shared-domain/models";
1
+ import { PermissionInfos, type PermissionInfosDTO } from "@dative-gpi/foundation-shared-domain/models";
3
2
 
4
- import type { ApplicationScope } from "../enums/applicationEnums";
5
- import type { UserType } from "../enums/userEnums";
3
+ import { type ApplicationScope } from "../enums/applicationEnums";
4
+ import { type UserType } from "../enums/userEnums";
6
5
 
7
6
  export class RoleOrganisationInfos {
8
- id: string;
9
- roleId: string;
10
- organisationId: string;
11
- icon: string;
12
- code: string;
13
- label: string;
14
- scope: ApplicationScope;
15
- userType: UserType;
16
- tags: string[];
17
- permissions: PermissionInfos[];
7
+ id: string;
8
+ roleId: string;
9
+ organisationId: string;
10
+ scope: ApplicationScope;
11
+ userType: UserType
12
+ icon: string;
13
+ code: string;
14
+ label: string;
15
+ tags: string[];
16
+ permissions: PermissionInfos[];
18
17
 
19
- constructor(params: RoleOrganisationInfosDTO) {
20
- this.id = params.id;
21
- this.roleId = params.roleId;
22
- this.organisationId = params.organisationId;
23
- this.icon = params.icon;
24
- this.code = params.code;
25
- this.label = params.label;
26
- this.scope = params.scope;
27
- this.userType = params.userType;
28
- this.tags = params.tags.slice();
29
- this.permissions = params.permissions.map(dto => new PermissionInfos(dto));
30
- }
18
+ constructor(params: RoleOrganisationInfosDTO) {
19
+ this.id = params.id;
20
+ this.roleId = params.roleId;
21
+ this.organisationId = params.organisationId;
22
+ this.scope = params.scope;
23
+ this.userType = params.userType;
24
+ this.icon = params.icon;
25
+ this.code = params.code;
26
+ this.label = params.label;
27
+ this.tags = params.tags.slice();
28
+ this.permissions = params.permissions.map(dto => new PermissionInfos(dto));
29
+ }
31
30
  }
32
31
 
33
32
  export interface RoleOrganisationInfosDTO {
34
- id: string;
35
- roleId: string;
36
- organisationId: string;
37
- icon: string;
38
- code: string;
39
- label: string;
40
- scope: ApplicationScope;
41
- userType: UserType;
42
- tags: string[];
43
- permissions: PermissionInfosDTO[];
33
+ id: string;
34
+ roleId: string;
35
+ organisationId: string;
36
+ scope: ApplicationScope;
37
+ userType: UserType;
38
+ icon: string;
39
+ code: string;
40
+ label: string;
41
+ tags: string[];
42
+ permissions: PermissionInfosDTO[];
44
43
  }
45
44
 
46
45
  export interface RoleOrganisationFilters {
47
- userType?: UserType | null;
48
- search?: string | null;
46
+ search?: string | null;
49
47
  }
@@ -4,7 +4,7 @@ import type { ScenarioOrganisationTypeInfosDTO } from "./scenarioOrganisationTyp
4
4
  import { ScenarioOrganisationTypeInfos } from "./scenarioOrganisationTypeInfos";
5
5
  import type { CreateTimeRangeDTO, TimeRangeDTO } from "../shared/timeRange";
6
6
  import { TimeRange } from "../shared/timeRange";
7
- import type { ScenarioTranslationDTO } from "../scenarios";
7
+ import { ScenarioParameter, type CreateScenarioParameterDTO, type ScenarioParameterDTO, type ScenarioTranslationDTO } from "../scenarios";
8
8
  import { ScenarioTranslation } from "../scenarios";
9
9
 
10
10
  export class ScenarioOrganisationTypeDetails extends ScenarioOrganisationTypeInfos {
@@ -30,6 +30,7 @@ export class ScenarioOrganisationTypeDetails extends ScenarioOrganisationTypeInf
30
30
  timeout: number | null;
31
31
  lock: number | null;
32
32
  waitResolved: boolean;
33
+ parameters: ScenarioParameter[];
33
34
  translations: ScenarioTranslation[];
34
35
 
35
36
  constructor(params: ScenarioOrganisationTypeDetailsDTO) {
@@ -58,6 +59,7 @@ export class ScenarioOrganisationTypeDetails extends ScenarioOrganisationTypeInf
58
59
  this.timeout = params.timeout;
59
60
  this.lock = params.lock;
60
61
  this.waitResolved = params.waitResolved;
62
+ this.parameters = params.parameters.map(p => new ScenarioParameter(p));
61
63
  this.translations = params.translations.map(t => new ScenarioTranslation(t));
62
64
  }
63
65
  }
@@ -85,6 +87,7 @@ export interface ScenarioOrganisationTypeDetailsDTO extends ScenarioOrganisation
85
87
  timeout: number | null;
86
88
  lock: number | null;
87
89
  waitResolved: boolean;
90
+ parameters: ScenarioParameterDTO[];
88
91
  translations: ScenarioTranslationDTO[];
89
92
  }
90
93
 
@@ -120,5 +123,6 @@ export interface UpdateScenarioOrganisationTypeDTO {
120
123
  timeout: number | null;
121
124
  lock: number | null;
122
125
  waitResolved: boolean;
126
+ parameters: CreateScenarioParameterDTO[];
123
127
  translations: ScenarioTranslationDTO[];
124
128
  }
@@ -1,6 +1,7 @@
1
1
  import type { Criticity } from "@dative-gpi/foundation-shared-domain/models";
2
2
 
3
3
  import type { ApplicationScope } from "../enums/applicationEnums";
4
+ import { ScenarioParameter, type ScenarioParameterDTO } from "../scenarios";
4
5
 
5
6
  export class ScenarioOrganisationTypeInfos {
6
7
  id: string;
@@ -19,6 +20,7 @@ export class ScenarioOrganisationTypeInfos {
19
20
  code: string;
20
21
  icon: string;
21
22
  tags: string[];
23
+ parameters: ScenarioParameter[];
22
24
 
23
25
  constructor(params: ScenarioOrganisationTypeInfosDTO) {
24
26
  this.id = params.id;
@@ -37,6 +39,7 @@ export class ScenarioOrganisationTypeInfos {
37
39
  this.code = params.code;
38
40
  this.icon = params.icon;
39
41
  this.tags = params.tags.slice();
42
+ this.parameters = params.parameters.map(p => new ScenarioParameter(p));
40
43
  }
41
44
  }
42
45
 
@@ -57,6 +60,7 @@ export interface ScenarioOrganisationTypeInfosDTO {
57
60
  code: string;
58
61
  icon: string;
59
62
  tags: string[];
63
+ parameters: ScenarioParameterDTO[];
60
64
  }
61
65
 
62
66
  export interface ScenarioOrganisationTypeFilters {
@@ -4,7 +4,7 @@ import type { ScenarioOrganisationInfosDTO } from "./scenarioOrganisationInfos";
4
4
  import { ScenarioOrganisationInfos } from "./scenarioOrganisationInfos";
5
5
  import type { CreateTimeRangeDTO, TimeRangeDTO } from "../shared/timeRange";
6
6
  import { TimeRange } from "../shared/timeRange";
7
- import type { ScenarioTranslationDTO } from "../scenarios";
7
+ import { ScenarioParameter, type CreateScenarioParameterDTO, type ScenarioParameterDTO, type ScenarioTranslationDTO } from "../scenarios";
8
8
  import { ScenarioTranslation } from "../scenarios";
9
9
 
10
10
  export class ScenarioOrganisationDetails extends ScenarioOrganisationInfos {
@@ -30,6 +30,7 @@ export class ScenarioOrganisationDetails extends ScenarioOrganisationInfos {
30
30
  timeout: number | null;
31
31
  lock: number | null;
32
32
  waitResolved: boolean;
33
+ parameters: ScenarioParameter[];
33
34
  translations: ScenarioTranslation[];
34
35
 
35
36
  constructor(params: ScenarioOrganisationDetailsDTO) {
@@ -57,6 +58,7 @@ export class ScenarioOrganisationDetails extends ScenarioOrganisationInfos {
57
58
  this.timeout = params.timeout;
58
59
  this.lock = params.lock;
59
60
  this.waitResolved = params.waitResolved;
61
+ this.parameters = params.parameters.map(p => new ScenarioParameter(p));
60
62
  this.translations = params.translations.map(t => new ScenarioTranslation(t));
61
63
  }
62
64
  }
@@ -84,6 +86,7 @@ export interface ScenarioOrganisationDetailsDTO extends ScenarioOrganisationInfo
84
86
  timeout: number | null;
85
87
  lock: number | null;
86
88
  waitResolved: boolean;
89
+ parameters: ScenarioParameterDTO[];
87
90
  translations: ScenarioTranslationDTO[];
88
91
  }
89
92
 
@@ -114,6 +117,7 @@ export interface CreateScenarioOrganisationDTO {
114
117
  timeout: number | null;
115
118
  lock: number | null;
116
119
  waitResolved: boolean;
120
+ parameters: CreateScenarioParameterDTO[];
117
121
  translations: ScenarioTranslationDTO[];
118
122
  }
119
123
 
@@ -144,5 +148,6 @@ export interface UpdateScenarioOrganisationDTO {
144
148
  timeout: number | null;
145
149
  lock: number | null;
146
150
  waitResolved: boolean;
151
+ parameters: CreateScenarioParameterDTO[];
147
152
  translations: ScenarioTranslationDTO[];
148
153
  }
@@ -1,6 +1,7 @@
1
1
  import type { Criticity } from "@dative-gpi/foundation-shared-domain/models";
2
2
 
3
3
  import type { ApplicationScope } from "../enums/applicationEnums";
4
+ import { ScenarioParameter, type ScenarioParameterDTO } from "../scenarios";
4
5
 
5
6
  export class ScenarioOrganisationInfos {
6
7
  id: string;
@@ -18,6 +19,7 @@ export class ScenarioOrganisationInfos {
18
19
  code: string;
19
20
  icon: string;
20
21
  tags: string[];
22
+ parameters: ScenarioParameter[];
21
23
 
22
24
  constructor(params: ScenarioOrganisationInfosDTO) {
23
25
  this.id = params.id;
@@ -35,6 +37,7 @@ export class ScenarioOrganisationInfos {
35
37
  this.code = params.code;
36
38
  this.icon = params.icon;
37
39
  this.tags = params.tags.slice();
40
+ this.parameters = params.parameters.map(p => new ScenarioParameter(p));
38
41
  }
39
42
  }
40
43
 
@@ -54,6 +57,7 @@ export interface ScenarioOrganisationInfosDTO {
54
57
  code: string;
55
58
  icon: string;
56
59
  tags: string[];
60
+ parameters: ScenarioParameterDTO[];
57
61
  }
58
62
 
59
63
  export interface ScenarioOrganisationFilters {
@@ -1 +1,2 @@
1
- export * from "./scenarioTranslation";
1
+ export * from "./scenarioTranslation";
2
+ export * from "./scenarioParameter";
@@ -0,0 +1,44 @@
1
+
2
+ import { TranslationScenarioParameter, type TranslationScenarioParameterDTO } from './translationScenarioParameter';
3
+
4
+ export class ScenarioParameter {
5
+ id : string;
6
+ scenarioId: string;
7
+ hiddenCode : string;
8
+ labelDefault : string;
9
+ valueDefault : string;
10
+ editable : boolean;
11
+ label : string;
12
+ translations : TranslationScenarioParameter[];
13
+
14
+ constructor(params: ScenarioParameterDTO) {
15
+ this.id = params.id;
16
+ this.scenarioId = params.scenarioId;
17
+ this.hiddenCode = params.hiddenCode;
18
+ this.labelDefault = params.labelDefault;
19
+ this.valueDefault = params.valueDefault;
20
+ this.editable = params.editable;
21
+ this.label = params.label;
22
+ this.translations = params.translations.map(t => new TranslationScenarioParameter(t));
23
+ }
24
+ }
25
+
26
+ export interface ScenarioParameterDTO {
27
+ id : string;
28
+ scenarioId: string;
29
+ hiddenCode : string;
30
+ labelDefault : string;
31
+ valueDefault : string;
32
+ editable : boolean;
33
+ label : string;
34
+ translations : TranslationScenarioParameterDTO[];
35
+ }
36
+
37
+ export interface CreateScenarioParameterDTO {
38
+ id : string
39
+ hiddenCode : string;
40
+ labelDefault : string;
41
+ valueDefault : string;
42
+ editable : boolean;
43
+ translations : TranslationScenarioParameterDTO[];
44
+ }
@@ -0,0 +1,14 @@
1
+ export class TranslationScenarioParameter {
2
+ languageCode: string;
3
+ label: string;
4
+
5
+ constructor(params: TranslationScenarioParameterDTO) {
6
+ this.languageCode = params.languageCode;
7
+ this.label = params.label;
8
+ }
9
+ }
10
+
11
+ export interface TranslationScenarioParameterDTO {
12
+ languageCode: string;
13
+ label: string;
14
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./serviceAccountRoleOrganisationDetails";
2
+ export * from "./serviceAccountRoleOrganisationInfos";
@@ -0,0 +1,33 @@
1
+ import { ServiceAccountRoleOrganisationInfos, type ServiceAccountRoleOrganisationInfosDTO } from "./serviceAccountRoleOrganisationInfos";
2
+
3
+ export class ServiceAccountRoleOrganisationDetails extends ServiceAccountRoleOrganisationInfos {
4
+ description: string;
5
+
6
+ constructor(params: ServiceAccountRoleOrganisationDetailsDTO) {
7
+ super(params);
8
+
9
+ this.description = params.description;
10
+ }
11
+ }
12
+
13
+ export interface ServiceAccountRoleOrganisationDetailsDTO extends ServiceAccountRoleOrganisationInfosDTO {
14
+ description: string;
15
+ }
16
+
17
+ export interface CreateServiceAccountRoleOrganisationDTO {
18
+ roleTemplateId: string | null;
19
+ icon: string;
20
+ code: string;
21
+ label: string;
22
+ description: string;
23
+ tags: string[];
24
+ }
25
+
26
+ export interface UpdateServiceAccountRoleOrganisationDTO {
27
+ icon: string;
28
+ code: string;
29
+ label: string;
30
+ description: string;
31
+ tags: string[];
32
+ permissionsIds: string[];
33
+ }
@@ -0,0 +1,42 @@
1
+ import { PermissionInfos, type PermissionInfosDTO } from "@dative-gpi/foundation-shared-domain/models";
2
+ import { type UserType } from "../enums/userEnums";
3
+
4
+ export class ServiceAccountRoleOrganisationInfos {
5
+ id: string;
6
+ roleId: string;
7
+ organisationId: string;
8
+ userType: UserType
9
+ icon: string;
10
+ code: string;
11
+ label: string;
12
+ tags: string[];
13
+ permissions: PermissionInfos[];
14
+
15
+ constructor(params: ServiceAccountRoleOrganisationInfosDTO) {
16
+ this.id = params.id;
17
+ this.roleId = params.roleId;
18
+ this.organisationId = params.organisationId;
19
+ this.userType = params.userType;
20
+ this.icon = params.icon;
21
+ this.code = params.code;
22
+ this.label = params.label;
23
+ this.tags = params.tags.slice();
24
+ this.permissions = params.permissions.map(dto => new PermissionInfos(dto));
25
+ }
26
+ }
27
+
28
+ export interface ServiceAccountRoleOrganisationInfosDTO {
29
+ id: string;
30
+ roleId: string;
31
+ organisationId: string;
32
+ userType: UserType
33
+ icon: string;
34
+ code: string;
35
+ label: string;
36
+ tags: string[];
37
+ permissions: PermissionInfosDTO[];
38
+ }
39
+
40
+ export interface ServiceAccountRoleOrganisationFilters {
41
+ search?: string | null;
42
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-core-domain",
3
3
  "sideEffects": false,
4
- "version": "1.0.28",
4
+ "version": "1.0.30",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,8 +10,8 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "1.0.28",
14
- "@dative-gpi/foundation-shared-services": "1.0.28"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.30",
14
+ "@dative-gpi/foundation-shared-services": "1.0.30"
15
15
  },
16
- "gitHead": "31c7a149c6e4a3d7b7553c485c331e2a34a9b5c1"
16
+ "gitHead": "33f1a6d59ab513176b3710729a39ec701462fdfb"
17
17
  }