@privateaim/core-kit 0.8.4 → 0.8.6
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/CHANGELOG.md +44 -0
- package/dist/domains/analysis/constants.d.ts +3 -5
- package/dist/domains/analysis/constants.d.ts.map +1 -1
- package/dist/domains/analysis/entity.d.ts +2 -7
- package/dist/domains/analysis/entity.d.ts.map +1 -1
- package/dist/domains/analysis/helpers.d.ts +15 -0
- package/dist/domains/analysis/helpers.d.ts.map +1 -0
- package/dist/domains/analysis/index.d.ts +1 -0
- package/dist/domains/analysis/index.d.ts.map +1 -1
- package/dist/domains/analysis-bucket/entity.d.ts +0 -6
- package/dist/domains/analysis-bucket/entity.d.ts.map +1 -1
- package/dist/domains/analysis-bucket-file/entity.d.ts +0 -6
- package/dist/domains/analysis-bucket-file/entity.d.ts.map +1 -1
- package/dist/domains/analysis-log/entity.d.ts +0 -6
- package/dist/domains/analysis-log/entity.d.ts.map +1 -1
- package/dist/domains/analysis-node/entity.d.ts +0 -13
- package/dist/domains/analysis-node/entity.d.ts.map +1 -1
- package/dist/domains/analysis-permission/entity.d.ts +0 -6
- package/dist/domains/analysis-permission/entity.d.ts.map +1 -1
- package/dist/domains/constants.d.ts +1 -0
- package/dist/domains/constants.d.ts.map +1 -1
- package/dist/domains/index.d.ts +1 -0
- package/dist/domains/index.d.ts.map +1 -1
- package/dist/domains/master-image/entity.d.ts +2 -7
- package/dist/domains/master-image/entity.d.ts.map +1 -1
- package/dist/domains/master-image/index.d.ts +1 -0
- package/dist/domains/master-image/index.d.ts.map +1 -1
- package/dist/domains/master-image/types.d.ts +5 -0
- package/dist/domains/master-image/types.d.ts.map +1 -0
- package/dist/domains/master-image-event-log/entity.d.ts +13 -0
- package/dist/domains/master-image-event-log/entity.d.ts.map +1 -0
- package/dist/domains/master-image-event-log/index.d.ts +2 -0
- package/dist/domains/master-image-event-log/index.d.ts.map +1 -0
- package/dist/domains/master-image-group/entity.d.ts +0 -8
- package/dist/domains/master-image-group/entity.d.ts.map +1 -1
- package/dist/domains/node/entity.d.ts +1 -6
- package/dist/domains/node/entity.d.ts.map +1 -1
- package/dist/domains/project/entity.d.ts +0 -6
- package/dist/domains/project/entity.d.ts.map +1 -1
- package/dist/domains/project-node/entity.d.ts +0 -6
- package/dist/domains/project-node/entity.d.ts.map +1 -1
- package/dist/domains/registry/entity.d.ts +0 -6
- package/dist/domains/registry/entity.d.ts.map +1 -1
- package/dist/domains/registry-project/entity.d.ts +0 -6
- package/dist/domains/registry-project/entity.d.ts.map +1 -1
- package/dist/domains/types.d.ts +46 -18
- package/dist/domains/types.d.ts.map +1 -1
- package/dist/domains/utils.d.ts +4 -4
- package/dist/domains/utils.d.ts.map +1 -1
- package/dist/index.cjs +111 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +111 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/domains/analysis/constants.ts +3 -5
- package/src/domains/analysis/entity.ts +5 -8
- package/src/domains/analysis/helpers.ts +147 -0
- package/src/domains/analysis/index.ts +1 -0
- package/src/domains/analysis-bucket/entity.ts +0 -7
- package/src/domains/analysis-bucket-file/entity.ts +0 -7
- package/src/domains/analysis-log/entity.ts +0 -7
- package/src/domains/analysis-node/entity.ts +0 -12
- package/src/domains/analysis-permission/entity.ts +0 -7
- package/src/domains/constants.ts +1 -0
- package/src/domains/index.ts +1 -0
- package/src/domains/master-image/entity.ts +2 -8
- package/src/domains/master-image/index.ts +1 -0
- package/src/domains/master-image/types.ts +11 -0
- package/src/domains/master-image-event-log/entity.ts +34 -0
- package/src/domains/master-image-event-log/index.ts +7 -0
- package/src/domains/master-image-group/entity.ts +0 -12
- package/src/domains/node/entity.ts +2 -7
- package/src/domains/project/entity.ts +0 -7
- package/src/domains/project-node/entity.ts +0 -7
- package/src/domains/registry/entity.ts +0 -8
- package/src/domains/registry-project/entity.ts +0 -7
- package/src/domains/types.ts +48 -78
- package/src/domains/utils.ts +8 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@privateaim/core-kit",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"exports": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"build-watch": "rimraf ./dist && tsc -p tsconfig.build.json --watch"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@authup/core-kit": "^1.0.0-beta.
|
|
30
|
-
"@privateaim/kit": "^0.8.
|
|
29
|
+
"@authup/core-kit": "^1.0.0-beta.24",
|
|
30
|
+
"@privateaim/kit": "^0.8.6"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@authup/core-kit": "^1.0.0-beta.
|
|
34
|
-
"@privateaim/kit": "^0.8.
|
|
33
|
+
"@authup/core-kit": "^1.0.0-beta.24",
|
|
34
|
+
"@privateaim/kit": "^0.8.6"
|
|
35
35
|
},
|
|
36
36
|
"gitHead": "5d3b6f4ce1edf2383bdfbf66e913a08c8a3a2e40",
|
|
37
37
|
"publishConfig": {
|
|
@@ -19,11 +19,9 @@ export enum AnalysisBuildStatus {
|
|
|
19
19
|
// -------------------------------------------------------------------------
|
|
20
20
|
|
|
21
21
|
export enum AnalysisConfigurationStatus {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
HASH_GENERATED = 'hash_generated', // todo: still relevant ?
|
|
26
|
-
HASH_SIGNED = 'hash_signed', // todo: signed by xyz
|
|
22
|
+
NODES = 'nodes',
|
|
23
|
+
MASTER_IMAGE = 'masterImage',
|
|
24
|
+
FILES = 'files',
|
|
27
25
|
FINISHED = 'finished',
|
|
28
26
|
}
|
|
29
27
|
|
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { Realm, User } from '@authup/core-kit';
|
|
9
|
-
import type {
|
|
10
|
-
import type { MasterImage } from '../master-image';
|
|
9
|
+
import type { MasterImage, MasterImageCommandArgument } from '../master-image';
|
|
11
10
|
import type { Project } from '../project';
|
|
12
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
13
11
|
import type {
|
|
14
12
|
AnalysisBuildStatus,
|
|
15
13
|
AnalysisRunStatus,
|
|
@@ -63,12 +61,11 @@ export interface Analysis {
|
|
|
63
61
|
|
|
64
62
|
// ------------------------------------------------------------------
|
|
65
63
|
|
|
64
|
+
image_command_arguments: MasterImageCommandArgument[] | null;
|
|
65
|
+
|
|
66
|
+
// ------------------------------------------------------------------
|
|
67
|
+
|
|
66
68
|
master_image_id: MasterImage['id'] | null;
|
|
67
69
|
|
|
68
70
|
master_image: MasterImage;
|
|
69
71
|
}
|
|
70
|
-
|
|
71
|
-
export type AnalysisEventContext = DomainEventBaseContext & {
|
|
72
|
-
type: `${DomainType.ANALYSIS}`,
|
|
73
|
-
data: Analysis
|
|
74
|
-
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025.
|
|
3
|
+
* Author Peter Placzek (tada5hi)
|
|
4
|
+
* For the full copyright and license information,
|
|
5
|
+
* view the LICENSE file that was distributed with this source code.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { AnalysisAPICommand, AnalysisBuildStatus } from './constants';
|
|
9
|
+
import type { Analysis } from './entity';
|
|
10
|
+
|
|
11
|
+
type CanResult = {
|
|
12
|
+
success: boolean,
|
|
13
|
+
message: string,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Check if an analysis can be build based on analysis attributes (build_status, configuration_locked, ...)
|
|
18
|
+
*
|
|
19
|
+
* @param entity
|
|
20
|
+
* @param command
|
|
21
|
+
*/
|
|
22
|
+
export function isAnalysisAPICommandExecutable(
|
|
23
|
+
entity: Analysis,
|
|
24
|
+
command: `${AnalysisAPICommand}`,
|
|
25
|
+
) : CanResult {
|
|
26
|
+
const output : CanResult = {
|
|
27
|
+
success: false,
|
|
28
|
+
message: `The analysis command ${command} cannot be executed.`,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
switch (command) {
|
|
32
|
+
case AnalysisAPICommand.BUILD_START: {
|
|
33
|
+
if (!entity.configuration_locked) {
|
|
34
|
+
output.success = false;
|
|
35
|
+
output.message = 'The analysis configuration must be locked before starting the build.';
|
|
36
|
+
return output;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (!entity.build_status) {
|
|
40
|
+
output.success = true;
|
|
41
|
+
return output;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (
|
|
45
|
+
entity.build_status === AnalysisBuildStatus.FAILED ||
|
|
46
|
+
entity.build_status === AnalysisBuildStatus.STOPPED
|
|
47
|
+
) {
|
|
48
|
+
output.success = true;
|
|
49
|
+
return output;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
output.message = `The current analysis build status "${entity.build_status}" does not allow a build start.`;
|
|
53
|
+
return output;
|
|
54
|
+
}
|
|
55
|
+
case AnalysisAPICommand.BUILD_STOP: {
|
|
56
|
+
if (!entity.configuration_locked) {
|
|
57
|
+
output.message = 'The analysis configuration must be locked before stopping the build.';
|
|
58
|
+
return output;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!entity.build_status) {
|
|
62
|
+
output.message = 'The analysis build process has not been initialized.';
|
|
63
|
+
return output;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (entity.build_status === AnalysisBuildStatus.STOPPING ||
|
|
67
|
+
entity.build_status === AnalysisBuildStatus.STARTED ||
|
|
68
|
+
entity.build_status === AnalysisBuildStatus.STARTING
|
|
69
|
+
) {
|
|
70
|
+
output.success = true;
|
|
71
|
+
return output;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
output.message = `The current analysis build status "${entity.build_status}" does not allow a build stop.`;
|
|
75
|
+
return output;
|
|
76
|
+
}
|
|
77
|
+
case AnalysisAPICommand.BUILD_STATUS: {
|
|
78
|
+
if (!entity.configuration_locked) {
|
|
79
|
+
output.message = 'The analysis configuration must be locked before checking the build status.';
|
|
80
|
+
return output;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (!entity.build_status) {
|
|
84
|
+
output.message = 'The analysis build process has not been initialized.';
|
|
85
|
+
return output;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (entity.build_status === AnalysisBuildStatus.FINISHED) {
|
|
89
|
+
output.message = 'The analysis build process has already been successfully completed.';
|
|
90
|
+
return output;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
output.success = true;
|
|
94
|
+
return output;
|
|
95
|
+
}
|
|
96
|
+
case AnalysisAPICommand.CONFIGURATION_LOCK: {
|
|
97
|
+
if (entity.configuration_locked) {
|
|
98
|
+
output.message = 'The analysis configuration is already locked.';
|
|
99
|
+
return output;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (entity.build_status) {
|
|
103
|
+
output.message = 'The analysis build process has already been initialized.';
|
|
104
|
+
return output;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// todo: unknown if one of them is an aggregator.
|
|
108
|
+
if (entity.nodes < 2) {
|
|
109
|
+
output.message = 'The analysis requires at least two nodes.';
|
|
110
|
+
return output;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (!entity.master_image_id) {
|
|
114
|
+
output.message = 'A master image must be assigned to the analysis.';
|
|
115
|
+
return output;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
output.success = true;
|
|
119
|
+
return output;
|
|
120
|
+
}
|
|
121
|
+
case AnalysisAPICommand.CONFIGURATION_UNLOCK: {
|
|
122
|
+
if (!entity.configuration_locked) {
|
|
123
|
+
output.message = 'The analysis configuration is already unlocked.';
|
|
124
|
+
return output;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (!entity.build_status) {
|
|
128
|
+
output.success = true;
|
|
129
|
+
return output;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (
|
|
133
|
+
entity.build_status === AnalysisBuildStatus.FAILED ||
|
|
134
|
+
entity.build_status === AnalysisBuildStatus.STOPPED ||
|
|
135
|
+
entity.build_status === AnalysisBuildStatus.STOPPING
|
|
136
|
+
) {
|
|
137
|
+
output.success = true;
|
|
138
|
+
return output;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
output.message = `The current analysis build status "${entity.build_status}" does not allow unlocking the configuration.`;
|
|
142
|
+
return output;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return output;
|
|
147
|
+
}
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
import type { Realm } from '@authup/core-kit';
|
|
9
9
|
import type { Analysis } from '../analysis';
|
|
10
|
-
import type { DomainType } from '../constants';
|
|
11
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
12
10
|
import type { AnalysisBucketType } from './constants';
|
|
13
11
|
|
|
14
12
|
export interface AnalysisBucket {
|
|
@@ -34,8 +32,3 @@ export interface AnalysisBucket {
|
|
|
34
32
|
|
|
35
33
|
realm_id: Realm['id'];
|
|
36
34
|
}
|
|
37
|
-
|
|
38
|
-
export type AnalysisBucketEventContext = DomainEventBaseContext & {
|
|
39
|
-
type: `${DomainType.ANALYSIS_BUCKET}`,
|
|
40
|
-
data: AnalysisBucket
|
|
41
|
-
};
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import type { Realm, Robot, User } from '@authup/core-kit';
|
|
9
9
|
import type { AnalysisBucket } from '../analysis-bucket';
|
|
10
|
-
import type { DomainType } from '../constants';
|
|
11
10
|
import type { Analysis } from '../analysis';
|
|
12
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
13
11
|
|
|
14
12
|
export interface AnalysisBucketFile {
|
|
15
13
|
id: string;
|
|
@@ -48,8 +46,3 @@ export interface AnalysisBucketFile {
|
|
|
48
46
|
|
|
49
47
|
robot_id: Robot['id'] | null;
|
|
50
48
|
}
|
|
51
|
-
|
|
52
|
-
export type AnalysisFileEventContext = DomainEventBaseContext & {
|
|
53
|
-
type: `${DomainType.ANALYSIS_BUCKET_FILE}`,
|
|
54
|
-
data: AnalysisBucketFile
|
|
55
|
-
};
|
|
@@ -6,11 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { Realm } from '@authup/core-kit';
|
|
9
|
-
import type { DomainType } from '../constants';
|
|
10
9
|
import type {
|
|
11
10
|
Analysis,
|
|
12
11
|
} from '../analysis';
|
|
13
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
14
12
|
|
|
15
13
|
export interface AnalysisLog {
|
|
16
14
|
id: string;
|
|
@@ -71,8 +69,3 @@ export interface AnalysisLog {
|
|
|
71
69
|
|
|
72
70
|
realm_id: Realm['id'];
|
|
73
71
|
}
|
|
74
|
-
|
|
75
|
-
export type AnalysisLogEventContext = DomainEventBaseContext & {
|
|
76
|
-
type: `${DomainType.ANALYSIS_LOG}`,
|
|
77
|
-
data: AnalysisLog
|
|
78
|
-
};
|
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { Realm } from '@authup/core-kit';
|
|
9
|
-
import type { DomainType } from '../constants';
|
|
10
9
|
import type { Node } from '../node';
|
|
11
10
|
import type { Analysis } from '../analysis';
|
|
12
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
13
11
|
import type { AnalysisNodeApprovalStatus, AnalysisNodeRunStatus } from './constants';
|
|
14
12
|
|
|
15
13
|
export interface AnalysisNode {
|
|
@@ -53,13 +51,3 @@ export interface AnalysisNode {
|
|
|
53
51
|
|
|
54
52
|
node_realm_id: Realm['id'];
|
|
55
53
|
}
|
|
56
|
-
|
|
57
|
-
export type TrainStationEventContext = DomainEventBaseContext & {
|
|
58
|
-
type: `${DomainType.ANALYSIS_NODE}`,
|
|
59
|
-
data: AnalysisNode
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export type AnalyseNodeSocketEventData = Record<string, { online: boolean, realmId: string }>;
|
|
63
|
-
export type AnalyseNodeSocketCTSEvents = {
|
|
64
|
-
analysisNodes: (id: Analysis['id'], cb?: (err: null | Error, data: AnalyseNodeSocketEventData) => void) => void
|
|
65
|
-
};
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
import type { PermissionRelation, Realm } from '@authup/core-kit';
|
|
9
9
|
import type { Analysis } from '../analysis';
|
|
10
|
-
import type { DomainType } from '../constants';
|
|
11
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
12
10
|
|
|
13
11
|
export interface AnalysisPermission extends PermissionRelation {
|
|
14
12
|
id: string;
|
|
@@ -31,8 +29,3 @@ export interface AnalysisPermission extends PermissionRelation {
|
|
|
31
29
|
|
|
32
30
|
updated_at: Date | string;
|
|
33
31
|
}
|
|
34
|
-
|
|
35
|
-
export type AnalysisPermissionEventContext = DomainEventBaseContext & {
|
|
36
|
-
type: `${DomainType.ANALYSIS_PERMISSION}`,
|
|
37
|
-
data: AnalysisPermission
|
|
38
|
-
};
|
package/src/domains/constants.ts
CHANGED
package/src/domains/index.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './analysis-permission';
|
|
|
14
14
|
export * from './realm';
|
|
15
15
|
export * from './master-image-group';
|
|
16
16
|
export * from './master-image';
|
|
17
|
+
export * from './master-image-event-log';
|
|
17
18
|
export * from './project';
|
|
18
19
|
export * from './project-node';
|
|
19
20
|
export * from './registry';
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* view the LICENSE file that was distributed with this source code.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type {
|
|
9
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
8
|
+
import type { MasterImageCommandArgument } from './types';
|
|
10
9
|
|
|
11
10
|
export interface MasterImage {
|
|
12
11
|
id: string;
|
|
@@ -21,7 +20,7 @@ export interface MasterImage {
|
|
|
21
20
|
|
|
22
21
|
command: string | null;
|
|
23
22
|
|
|
24
|
-
command_arguments:
|
|
23
|
+
command_arguments: MasterImageCommandArgument[] | null;
|
|
25
24
|
|
|
26
25
|
// ------------------------------------------------------------------
|
|
27
26
|
|
|
@@ -29,8 +28,3 @@ export interface MasterImage {
|
|
|
29
28
|
|
|
30
29
|
updated_at: Date;
|
|
31
30
|
}
|
|
32
|
-
|
|
33
|
-
export type MasterImageEventContext = DomainEventBaseContext & {
|
|
34
|
-
type: `${DomainType.MASTER_IMAGE}`,
|
|
35
|
-
data: MasterImage
|
|
36
|
-
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025.
|
|
3
|
+
* Author Peter Placzek (tada5hi)
|
|
4
|
+
* For the full copyright and license information,
|
|
5
|
+
* view the LICENSE file that was distributed with this source code.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type MasterImageCommandArgument = {
|
|
9
|
+
value: string,
|
|
10
|
+
position?: 'before' | 'after'
|
|
11
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-2024.
|
|
3
|
+
* Author Peter Placzek (tada5hi)
|
|
4
|
+
* For the full copyright and license information,
|
|
5
|
+
* view the LICENSE file that was distributed with this source code.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { MasterImage } from '../master-image';
|
|
9
|
+
|
|
10
|
+
export interface MasterImageEventLog {
|
|
11
|
+
id: string;
|
|
12
|
+
|
|
13
|
+
name: string;
|
|
14
|
+
|
|
15
|
+
data: unknown | null;
|
|
16
|
+
|
|
17
|
+
// ------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
expiring: boolean;
|
|
20
|
+
|
|
21
|
+
expires_at: Date;
|
|
22
|
+
|
|
23
|
+
// ------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
master_image_id: string | null;
|
|
26
|
+
|
|
27
|
+
master_image: MasterImage | null;
|
|
28
|
+
|
|
29
|
+
// ------------------------------------------------------------------
|
|
30
|
+
|
|
31
|
+
created_at: Date;
|
|
32
|
+
|
|
33
|
+
updated_at: Date;
|
|
34
|
+
}
|
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
* view the LICENSE file that was distributed with this source code.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { DomainType } from '../constants';
|
|
9
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
10
|
-
|
|
11
8
|
export interface MasterImageGroup {
|
|
12
9
|
id: string;
|
|
13
10
|
|
|
@@ -17,18 +14,9 @@ export interface MasterImageGroup {
|
|
|
17
14
|
|
|
18
15
|
virtual_path: string;
|
|
19
16
|
|
|
20
|
-
command: string | null;
|
|
21
|
-
|
|
22
|
-
command_arguments: any | null;
|
|
23
|
-
|
|
24
17
|
// ------------------------------------------------------------------
|
|
25
18
|
|
|
26
19
|
created_at: Date;
|
|
27
20
|
|
|
28
21
|
updated_at: Date;
|
|
29
22
|
}
|
|
30
|
-
|
|
31
|
-
export type MasterImageGroupEventContext = DomainEventBaseContext & {
|
|
32
|
-
type: `${DomainType.MASTER_IMAGE_GROUP}`,
|
|
33
|
-
data: MasterImageGroup
|
|
34
|
-
};
|
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { Realm, Robot } from '@authup/core-kit';
|
|
9
|
-
import type { DomainType } from '../constants';
|
|
10
9
|
import type { RegistryProject } from '../registry-project';
|
|
11
10
|
import type { Registry } from '../registry';
|
|
12
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
13
11
|
import type { NodeType } from './constants';
|
|
14
12
|
|
|
15
13
|
export interface Node {
|
|
@@ -17,6 +15,8 @@ export interface Node {
|
|
|
17
15
|
|
|
18
16
|
external_name: string | null;
|
|
19
17
|
|
|
18
|
+
public_key: string | null;
|
|
19
|
+
|
|
20
20
|
name: string;
|
|
21
21
|
|
|
22
22
|
hidden: boolean;
|
|
@@ -49,8 +49,3 @@ export interface Node {
|
|
|
49
49
|
|
|
50
50
|
updated_at: Date;
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
export type NodeEventContext = DomainEventBaseContext & {
|
|
54
|
-
type: `${DomainType.NODE}`,
|
|
55
|
-
data: Node
|
|
56
|
-
};
|
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { Realm, Robot, User } from '@authup/core-kit';
|
|
9
|
-
import type { DomainType } from '../constants';
|
|
10
9
|
import type { MasterImage } from '../master-image';
|
|
11
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
12
10
|
|
|
13
11
|
export interface Project {
|
|
14
12
|
id: string;
|
|
@@ -41,8 +39,3 @@ export interface Project {
|
|
|
41
39
|
|
|
42
40
|
master_image: MasterImage | null;
|
|
43
41
|
}
|
|
44
|
-
|
|
45
|
-
export type ProjectEventContext = DomainEventBaseContext & {
|
|
46
|
-
type: `${DomainType.PROJECT}`,
|
|
47
|
-
data: Project
|
|
48
|
-
};
|
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { Realm } from '@authup/core-kit';
|
|
9
|
-
import type { DomainType } from '../constants';
|
|
10
9
|
import type { Project } from '../project';
|
|
11
10
|
import type { Node } from '../node';
|
|
12
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
13
11
|
import type { ProjectNodeApprovalStatus } from './constants';
|
|
14
12
|
|
|
15
13
|
export interface ProjectNode {
|
|
@@ -39,8 +37,3 @@ export interface ProjectNode {
|
|
|
39
37
|
|
|
40
38
|
node_realm_id: Realm['id'];
|
|
41
39
|
}
|
|
42
|
-
|
|
43
|
-
export type ProjectNodeEventContext = DomainEventBaseContext & {
|
|
44
|
-
type: `${DomainType.PROJECT_NODE}`,
|
|
45
|
-
data: ProjectNode
|
|
46
|
-
};
|
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
* view the LICENSE file that was distributed with this source code.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { DomainType } from '../constants';
|
|
9
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
10
|
-
|
|
11
8
|
export interface Registry {
|
|
12
9
|
id: string;
|
|
13
10
|
|
|
@@ -27,8 +24,3 @@ export interface Registry {
|
|
|
27
24
|
|
|
28
25
|
updated_at: Date;
|
|
29
26
|
}
|
|
30
|
-
|
|
31
|
-
export type RegistryEventContext = DomainEventBaseContext & {
|
|
32
|
-
type: `${DomainType.REGISTRY}`,
|
|
33
|
-
data: Registry
|
|
34
|
-
};
|
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { Realm } from '@authup/core-kit';
|
|
9
|
-
import type { DomainType } from '../constants';
|
|
10
9
|
import type { Registry } from '../registry';
|
|
11
|
-
import type { DomainEventBaseContext } from '../types-base';
|
|
12
10
|
import type { RegistryProjectType } from './constants';
|
|
13
11
|
|
|
14
12
|
export interface RegistryProject {
|
|
@@ -57,8 +55,3 @@ export interface RegistryProject {
|
|
|
57
55
|
|
|
58
56
|
updated_at: Date;
|
|
59
57
|
}
|
|
60
|
-
|
|
61
|
-
export type RegistryProjectEventContext = DomainEventBaseContext & {
|
|
62
|
-
type: `${DomainType.REGISTRY_PROJECT}`,
|
|
63
|
-
data: RegistryProject
|
|
64
|
-
};
|