hcloud-sdk 21.1.0 → 21.3.0
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 +6 -2
- package/lib/helper/ValidationHelper.d.ts +1 -0
- package/lib/helper/ValidationHelper.js +10 -2
- package/lib/interfaces/auditor/index.d.ts +2 -1
- package/lib/interfaces/auditor/index.js +1 -0
- package/lib/interfaces/cosmo/asset/index.d.ts +20 -2
- package/lib/interfaces/cosmo/comment/index.d.ts +3 -1
- package/lib/interfaces/cosmo/share/index.d.ts +4 -0
- package/lib/interfaces/cosmo/space/index.d.ts +1 -31
- package/lib/interfaces/cosmo/space/index.js +0 -6
- package/lib/interfaces/global/Storage.d.ts +40 -0
- package/lib/interfaces/global/Storage.js +2 -0
- package/lib/interfaces/high5/space/request.d.ts +0 -1
- package/lib/interfaces/high5/wave/Wave.d.ts +144 -0
- package/lib/interfaces/high5/wave/Wave.js +120 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +6 -0
- package/lib/interfaces/idp/organization/settings/domain/oidc/index.d.ts +9 -0
- package/lib/interfaces/idp/organization/settings/domain/oidc/index.js +2 -0
- package/lib/interfaces/idp/user/Message.d.ts +27 -7
- package/lib/interfaces/idp/user/Message.js +20 -3
- package/lib/service/cosmo/asset/index.d.ts +7 -34
- package/lib/service/cosmo/asset/index.js +2 -36
- package/lib/service/cosmo/comment/index.d.ts +24 -0
- package/lib/service/cosmo/comment/index.js +32 -0
- package/lib/service/cosmo/organization/index.d.ts +30 -0
- package/lib/service/cosmo/organization/index.js +34 -0
- package/lib/service/cosmo/space/index.d.ts +1 -25
- package/lib/service/cosmo/space/index.js +0 -30
- package/lib/service/idp/index.d.ts +1 -1
- package/lib/service/idp/index.js +2 -1
- package/lib/service/idp/organization/index.d.ts +6 -0
- package/lib/service/idp/organization/index.js +10 -0
- package/lib/service/idp/organization/settings/domain/oidc/index.d.ts +41 -0
- package/lib/service/idp/organization/settings/domain/oidc/index.js +70 -0
- package/lib/service/idp/organization/storage/index.d.ts +56 -0
- package/lib/service/idp/organization/storage/index.js +93 -0
- package/lib/service/idp/user/message/index.d.ts +33 -8
- package/lib/service/idp/user/message/index.js +31 -3
- package/lib/service/nats/index.js +4 -5
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
## [21.
|
|
1
|
+
## [21.3.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v21.2.0...v21.3.0) (2026-07-02)
|
|
2
2
|
|
|
3
3
|
### Features
|
|
4
4
|
|
|
5
|
-
*
|
|
5
|
+
* update Message interface and IdpMessage class with new properties and bulk operations ([5a3229b](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/5a3229b27402ad80fdefe45001cbc202dff4e49c))
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* change package ecosystem from pnpm to npm in dependabot configuration ([854aa69](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/854aa690ca3a5ee1ac1108ba481e74ff61bc3424))
|
|
@@ -3,6 +3,7 @@ declare enum Entity {
|
|
|
3
3
|
USER_PASSWORD = "USER_PASSWORD",
|
|
4
4
|
OAUTH_SECRET_NAME = "OAUTH_SECRET_NAME",
|
|
5
5
|
ORGANIZATION_NAME = "ORGANIZATION_NAME",
|
|
6
|
+
STORAGE_NAME = "STORAGE_NAME",
|
|
6
7
|
USER_ORGANIZATION_NAME = "USER_ORGANIZATION_NAME",
|
|
7
8
|
TEAM_NAME = "TEAM_NAME",
|
|
8
9
|
COMPANY_NAME = "COMPANY_NAME",
|
|
@@ -8,6 +8,7 @@ var Entity;
|
|
|
8
8
|
Entity["USER_PASSWORD"] = "USER_PASSWORD";
|
|
9
9
|
Entity["OAUTH_SECRET_NAME"] = "OAUTH_SECRET_NAME";
|
|
10
10
|
Entity["ORGANIZATION_NAME"] = "ORGANIZATION_NAME";
|
|
11
|
+
Entity["STORAGE_NAME"] = "STORAGE_NAME";
|
|
11
12
|
Entity["USER_ORGANIZATION_NAME"] = "USER_ORGANIZATION_NAME";
|
|
12
13
|
Entity["TEAM_NAME"] = "TEAM_NAME";
|
|
13
14
|
Entity["COMPANY_NAME"] = "COMPANY_NAME";
|
|
@@ -115,8 +116,10 @@ function ValidationHelper(name) {
|
|
|
115
116
|
}
|
|
116
117
|
const entityCollection = {
|
|
117
118
|
[Entity.USER_NAME]: {
|
|
118
|
-
//
|
|
119
|
-
pattern: /^(?!-)(?!.*--)[\
|
|
119
|
+
// Must contain at least 3 characters. Allows Unicode letters (incl. ß, é, …), combining marks, numbers, underscores, hyphens, dots, and spaces. Cannot start with a dash, end with a dash, or contain double dashes
|
|
120
|
+
pattern: /^(?!-)(?!.*--)[\p{L}\p{M}0-9_. -]{3,255}(?<!-)$/u,
|
|
121
|
+
// Set explicitly because the auto-derivation in sanitize() rebuilds the char class without the /u flag, which breaks the \p{…} Unicode property escapes
|
|
122
|
+
symbols: /[\p{L}\p{M}0-9_. -]/u,
|
|
120
123
|
minLength: 3,
|
|
121
124
|
maxLength: 255,
|
|
122
125
|
},
|
|
@@ -136,6 +139,11 @@ const entityCollection = {
|
|
|
136
139
|
minLength: 3,
|
|
137
140
|
maxLength: 64,
|
|
138
141
|
},
|
|
142
|
+
[Entity.STORAGE_NAME]: {
|
|
143
|
+
pattern: /^[\w-.]{1,32}$/i,
|
|
144
|
+
minLength: 1,
|
|
145
|
+
maxLength: 32,
|
|
146
|
+
},
|
|
139
147
|
[Entity.USER_ORGANIZATION_NAME]: {
|
|
140
148
|
pattern: /^[\w-+@.]{3,255}$/i,
|
|
141
149
|
minLength: 3,
|
|
@@ -44,6 +44,17 @@ export type MediaAsset = {
|
|
|
44
44
|
}>;
|
|
45
45
|
queuePosition?: number;
|
|
46
46
|
queueTotal?: number;
|
|
47
|
+
stack?: {
|
|
48
|
+
version: number;
|
|
49
|
+
stack: {
|
|
50
|
+
_id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
creator: ReducedUser;
|
|
53
|
+
thumbnail?: {
|
|
54
|
+
url: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
47
58
|
};
|
|
48
59
|
export type Production = {
|
|
49
60
|
type: ItemType.PRODUCTION;
|
|
@@ -58,11 +69,18 @@ export type AssetReference = {
|
|
|
58
69
|
status: string;
|
|
59
70
|
};
|
|
60
71
|
};
|
|
61
|
-
export type Stack = Omit<MediaAsset, "type"> & {
|
|
72
|
+
export type Stack = Omit<MediaAsset, "type" | "stack"> & {
|
|
62
73
|
type: ItemType.STACK;
|
|
63
74
|
stack: {
|
|
64
75
|
version: number;
|
|
65
|
-
|
|
76
|
+
asset: {
|
|
77
|
+
_id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
creator: ReducedUser;
|
|
80
|
+
thumbnail?: {
|
|
81
|
+
url: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
66
84
|
}[];
|
|
67
85
|
};
|
|
68
86
|
export declare enum AssetType {
|
|
@@ -4,6 +4,7 @@ export interface CreateComment {
|
|
|
4
4
|
refId: string;
|
|
5
5
|
text: string;
|
|
6
6
|
timestamp?: Timestamp;
|
|
7
|
+
color?: CommentColor;
|
|
7
8
|
annotation?: string;
|
|
8
9
|
mentions?: string[];
|
|
9
10
|
mentionsTeams?: string[];
|
|
@@ -13,6 +14,7 @@ export interface CreateComment {
|
|
|
13
14
|
export interface EditComment {
|
|
14
15
|
text: string;
|
|
15
16
|
timestamp?: Timestamp;
|
|
17
|
+
color?: CommentColor;
|
|
16
18
|
annotation?: string;
|
|
17
19
|
mentions?: string[];
|
|
18
20
|
mentionsTeams?: string[];
|
|
@@ -43,6 +45,7 @@ export interface Comment {
|
|
|
43
45
|
text: string;
|
|
44
46
|
createDate: number;
|
|
45
47
|
timestamp?: Timestamp;
|
|
48
|
+
color?: CommentColor;
|
|
46
49
|
creator: ReducedUser;
|
|
47
50
|
assetId: string;
|
|
48
51
|
commentType: CommentType;
|
|
@@ -72,6 +75,5 @@ export declare enum CommentColor {
|
|
|
72
75
|
export interface Timestamp {
|
|
73
76
|
in: number;
|
|
74
77
|
out?: number;
|
|
75
|
-
color: CommentColor;
|
|
76
78
|
}
|
|
77
79
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StorageConfiguration } from "../../global/Storage";
|
|
1
2
|
import { ReducedUser, ShareReducedUnlinkedUser, User } from "../../idp";
|
|
2
3
|
import { ItemType } from "../asset";
|
|
3
4
|
/**
|
|
@@ -40,6 +41,7 @@ export interface Share {
|
|
|
40
41
|
name: string;
|
|
41
42
|
type: ItemType.MEDIA_ASSET;
|
|
42
43
|
thumbnailUrl: string;
|
|
44
|
+
storage: StorageConfiguration;
|
|
43
45
|
})[];
|
|
44
46
|
permissions?: string[];
|
|
45
47
|
permissionGroups?: ShareAssetPermissionGroup[];
|
|
@@ -54,6 +56,7 @@ export interface Share {
|
|
|
54
56
|
email: string;
|
|
55
57
|
status: EmailStatus;
|
|
56
58
|
}[];
|
|
59
|
+
message?: string;
|
|
57
60
|
}
|
|
58
61
|
export declare enum EmailStatus {
|
|
59
62
|
OPENED = "OPENED",
|
|
@@ -119,6 +122,7 @@ export type SharePatch = Partial<Pick<ShareCreate, "name" | "users" | "active">
|
|
|
119
122
|
users?: string[];
|
|
120
123
|
expires?: number | null;
|
|
121
124
|
password?: string | null;
|
|
125
|
+
message?: string;
|
|
122
126
|
}>;
|
|
123
127
|
export declare enum ShareAssetPermissionGroup {
|
|
124
128
|
VIEW_ASSETS_ONLY = "VIEW_ASSETS_ONLY",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReducedStorage } from "../../global/Storage";
|
|
1
2
|
import { ReducedTeam, ReducedUser } from "../../idp";
|
|
2
3
|
import { ItemType } from "../asset";
|
|
3
4
|
export interface CosmoSpace {
|
|
@@ -30,34 +31,3 @@ export interface TrashPolicy {
|
|
|
30
31
|
enabled: boolean;
|
|
31
32
|
ttlDays?: number;
|
|
32
33
|
}
|
|
33
|
-
export declare enum StorageType {
|
|
34
|
-
S3 = "S3",
|
|
35
|
-
TAMS = "TAMS"
|
|
36
|
-
}
|
|
37
|
-
export type ReducedStorage = {
|
|
38
|
-
name: string;
|
|
39
|
-
type: StorageType;
|
|
40
|
-
bucket: string;
|
|
41
|
-
valid: boolean;
|
|
42
|
-
error?: string;
|
|
43
|
-
default: boolean;
|
|
44
|
-
};
|
|
45
|
-
export type Storage = ReducedStorage & {
|
|
46
|
-
region: string;
|
|
47
|
-
endpoint: string;
|
|
48
|
-
accessKeyId: string;
|
|
49
|
-
secretAccessKey: string;
|
|
50
|
-
};
|
|
51
|
-
export type SpacePatchStorageDto = {
|
|
52
|
-
name: string;
|
|
53
|
-
endpoint: string;
|
|
54
|
-
bucket: string;
|
|
55
|
-
region: string;
|
|
56
|
-
type: StorageType;
|
|
57
|
-
accessKeyId: string;
|
|
58
|
-
secretAccessKey: string;
|
|
59
|
-
};
|
|
60
|
-
export type SpacePatchStorageValidationDto = {
|
|
61
|
-
valid: boolean;
|
|
62
|
-
error: string;
|
|
63
|
-
};
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StorageType = void 0;
|
|
4
|
-
var StorageType;
|
|
5
|
-
(function (StorageType) {
|
|
6
|
-
StorageType["S3"] = "S3";
|
|
7
|
-
StorageType["TAMS"] = "TAMS";
|
|
8
|
-
})(StorageType || (exports.StorageType = StorageType = {}));
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReducedOrganization, ReducedUser } from "../idp";
|
|
2
|
+
export type Storage = {
|
|
3
|
+
_id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
avatarUrl: string;
|
|
6
|
+
creator: ReducedUser;
|
|
7
|
+
createDate: number;
|
|
8
|
+
modifyDate: number;
|
|
9
|
+
isDefault: boolean;
|
|
10
|
+
organization: ReducedOrganization;
|
|
11
|
+
endpoint: string;
|
|
12
|
+
bucket: string;
|
|
13
|
+
region: string;
|
|
14
|
+
accessKeyId: string;
|
|
15
|
+
secretAccessKey: string;
|
|
16
|
+
valid: boolean;
|
|
17
|
+
errorMessage?: string;
|
|
18
|
+
signedUrl?: string;
|
|
19
|
+
testBucketName?: string;
|
|
20
|
+
};
|
|
21
|
+
export type StorageConfiguration = {
|
|
22
|
+
_id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
endpoint: string;
|
|
25
|
+
bucket: string;
|
|
26
|
+
region: string;
|
|
27
|
+
accessKeyId: string;
|
|
28
|
+
secretAccessKey: string;
|
|
29
|
+
isDefault: boolean;
|
|
30
|
+
valid: boolean;
|
|
31
|
+
};
|
|
32
|
+
export type StorageCreateDto = Pick<Storage, "name" | "endpoint" | "bucket" | "region" | "accessKeyId" | "secretAccessKey">;
|
|
33
|
+
export type StoragePatchDto = Partial<Pick<Storage, "name" | "endpoint" | "bucket" | "region" | "accessKeyId" | "secretAccessKey" | "avatarUrl" | "valid" | "errorMessage"> & {
|
|
34
|
+
testBucketName?: string;
|
|
35
|
+
}>;
|
|
36
|
+
export type StorageDto = Storage & {
|
|
37
|
+
signedUrl?: string;
|
|
38
|
+
testBucketName?: string;
|
|
39
|
+
};
|
|
40
|
+
export type ReducedStorage = Pick<Storage, "_id" | "name" | "isDefault">;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { StreamNodeSpecification, StreamNodeSpecificationInput, StreamNodeSpecificationInputType, StreamNodeSpecificationOutputType } from ".";
|
|
2
|
+
import { HCloud } from "../../../Hcloud";
|
|
3
|
+
import { StreamResult } from "../space/event/stream";
|
|
4
|
+
import { StreamNodeResolvedInputs, StreamNodeResultError } from "../space/event/stream/node";
|
|
5
|
+
import { StreamNode } from "../space/execution";
|
|
6
|
+
export declare enum DuplicateFileOption {
|
|
7
|
+
FAIL = "Fail",
|
|
8
|
+
SKIP = "Skip",
|
|
9
|
+
OVERWRITE = "Overwrite",
|
|
10
|
+
RENAME_EXISTING = "Rename Existing",
|
|
11
|
+
INCREMENT_NAME = "Increment Name"
|
|
12
|
+
}
|
|
13
|
+
export declare enum DuplicateFolderOption {
|
|
14
|
+
FAIL = "Fail",
|
|
15
|
+
SKIP = "Skip",
|
|
16
|
+
RENAME_EXISTING = "Rename Existing",
|
|
17
|
+
INCREMENT_NAME = "Increment Name"
|
|
18
|
+
}
|
|
19
|
+
export interface StreamNodeOutput {
|
|
20
|
+
name: string | undefined;
|
|
21
|
+
value: any;
|
|
22
|
+
type: StreamNodeSpecificationOutputType;
|
|
23
|
+
}
|
|
24
|
+
export interface StreamNodeInput {
|
|
25
|
+
name: string;
|
|
26
|
+
originalValue?: any;
|
|
27
|
+
value: any;
|
|
28
|
+
type: StreamNodeSpecificationInputType;
|
|
29
|
+
error: boolean;
|
|
30
|
+
errorMessage: string;
|
|
31
|
+
}
|
|
32
|
+
export interface StreamNodeAdditionalConnector {
|
|
33
|
+
name: string;
|
|
34
|
+
targetUuid: string;
|
|
35
|
+
}
|
|
36
|
+
export interface StreamNodeResolvedInput extends StreamNodeResolvedInputs {
|
|
37
|
+
originalValue: any;
|
|
38
|
+
value: any;
|
|
39
|
+
error: boolean;
|
|
40
|
+
errorMessage: string;
|
|
41
|
+
}
|
|
42
|
+
export interface WaveGeneral {
|
|
43
|
+
getNodeUuid(): string;
|
|
44
|
+
resolveValue(value: string): unknown;
|
|
45
|
+
getNodeSpecification(): StreamNodeSpecification;
|
|
46
|
+
cancelExecution(): void;
|
|
47
|
+
isCanceled(): boolean;
|
|
48
|
+
getHcloudClient(): HCloud;
|
|
49
|
+
getOrgName(): string;
|
|
50
|
+
getSpaceName(): string;
|
|
51
|
+
setStreamMessage(message: string): void;
|
|
52
|
+
getAgentContext(): unknown;
|
|
53
|
+
isDebug(): boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface WaveLogger {
|
|
56
|
+
getCurrentProgress(): number | undefined;
|
|
57
|
+
getCurrentMessage(): string | undefined;
|
|
58
|
+
updateProgress(progress: number): void;
|
|
59
|
+
updateMessage(message: string): void;
|
|
60
|
+
updateProgressAndMessage(progress: number, message: string): void;
|
|
61
|
+
addNodeLog(logMessage: string): void;
|
|
62
|
+
}
|
|
63
|
+
export interface WaveInputs {
|
|
64
|
+
getInputs(): StreamNodeResolvedInput[];
|
|
65
|
+
getInputByName(inputName: string): StreamNodeResolvedInput | undefined;
|
|
66
|
+
getPreresolvedInputByName(inputName: string): StreamNodeSpecificationInput | undefined;
|
|
67
|
+
getInputValueByInputName(inputName: string): any;
|
|
68
|
+
getInputOriginalValueByInputName(inputName: string): any;
|
|
69
|
+
}
|
|
70
|
+
type FileFolderReturnObject = {
|
|
71
|
+
finalPath: string;
|
|
72
|
+
srcChecksum?: string;
|
|
73
|
+
};
|
|
74
|
+
export interface WaveOutputs {
|
|
75
|
+
getAllOutputs(): StreamNodeOutput[];
|
|
76
|
+
getOutputByName(outputName: string): StreamNodeOutput | undefined;
|
|
77
|
+
getOutputValueByOutputName(outputName: string): any;
|
|
78
|
+
setOutput(name: string, value: any, type?: StreamNodeSpecificationOutputType): void;
|
|
79
|
+
executeAdditionalConnector(connectorName: string): Promise<StreamResult | undefined>;
|
|
80
|
+
}
|
|
81
|
+
export interface WaveFileAndFolderHelper {
|
|
82
|
+
createFile(filePath: string, duplicateFileOption: DuplicateFileOption): Promise<string>;
|
|
83
|
+
createFolder(folderPath: string, duplicateFolderOption: DuplicateFolderOption): Promise<string>;
|
|
84
|
+
copyFile<T extends boolean | undefined = undefined>(srcFilePath: string, destFilePath: string, duplicateFileOption: DuplicateFileOption, progressCallback?: (percent: number) => void, getSrcChecksum?: T, abortSignal?: AbortSignal): Promise<T extends undefined ? string : FileFolderReturnObject>;
|
|
85
|
+
copyFolder<T extends boolean | undefined = undefined>(srcFolderPath: string, destFolderPath: string, duplicateFolderOption: DuplicateFolderOption, progressCallback?: (percent: number) => void, getSrcChecksum?: T, abortSignal?: AbortSignal): Promise<T extends undefined ? string : FileFolderReturnObject>;
|
|
86
|
+
moveFile<T extends boolean | undefined = undefined>(srcFilePath: string, destFilePath: string, duplicateFileOption: DuplicateFileOption, progressCallback?: (percent: number) => void, getSrcChecksum?: T, abortSignal?: AbortSignal): Promise<T extends undefined ? string : FileFolderReturnObject>;
|
|
87
|
+
moveFolder<T extends boolean | undefined = undefined>(srcFolderPath: string, destFolderPath: string, duplicateFolderOption: DuplicateFolderOption, progressCallback?: (percent: number) => void, getSrcChecksum?: T, abortSignal?: AbortSignal): Promise<T extends undefined ? string : FileFolderReturnObject>;
|
|
88
|
+
renameFile(filePath: string, newName: string, duplicateFileOption: DuplicateFileOption): Promise<string>;
|
|
89
|
+
renameFolder(folderPath: string, newName: string, duplicateFolderOption: DuplicateFolderOption): Promise<string>;
|
|
90
|
+
deleteFile(filePath: string): Promise<void>;
|
|
91
|
+
deleteFolder(folderPath: string): Promise<void>;
|
|
92
|
+
getFileMd5Hash(filePath: string, signal?: AbortSignal): Promise<string>;
|
|
93
|
+
getFolderMd5Hash(folderPath: string, signal?: AbortSignal): Promise<string>;
|
|
94
|
+
}
|
|
95
|
+
export interface WaveAxiosHelper {
|
|
96
|
+
makeRequest(config: Record<string, any>): Promise<any>;
|
|
97
|
+
convertRequestToCurl(config: Record<string, any>): string;
|
|
98
|
+
removeEmptyFields(obj: Record<string, any>): Record<string, any>;
|
|
99
|
+
}
|
|
100
|
+
export default interface Wave {
|
|
101
|
+
general: WaveGeneral;
|
|
102
|
+
logger: WaveLogger;
|
|
103
|
+
inputs: WaveInputs;
|
|
104
|
+
outputs: WaveOutputs;
|
|
105
|
+
fileAndFolderHelper: WaveFileAndFolderHelper;
|
|
106
|
+
axiosHelper: WaveAxiosHelper;
|
|
107
|
+
}
|
|
108
|
+
export declare abstract class StreamNodeError extends Error {
|
|
109
|
+
protected code: number;
|
|
110
|
+
protected detail: string;
|
|
111
|
+
getCode(): number;
|
|
112
|
+
getDetail(): string;
|
|
113
|
+
getMessage(): string;
|
|
114
|
+
toJson(): StreamNodeResultError;
|
|
115
|
+
}
|
|
116
|
+
export declare class StreamNodeGenericError extends StreamNodeError {
|
|
117
|
+
constructor(err: Error, detail?: string);
|
|
118
|
+
}
|
|
119
|
+
export declare class StreamNodeInputMissingError extends StreamNodeError {
|
|
120
|
+
constructor(input: string);
|
|
121
|
+
}
|
|
122
|
+
export declare class StreamNodeInputTypeError extends StreamNodeError {
|
|
123
|
+
constructor(input: string, want: string, got: string);
|
|
124
|
+
}
|
|
125
|
+
export declare class StreamNodeNotFoundError extends StreamNodeError {
|
|
126
|
+
constructor(detail: string);
|
|
127
|
+
}
|
|
128
|
+
export declare class StreamNodePathNotFoundError extends StreamNodeError {
|
|
129
|
+
constructor(error: Error, detail: string);
|
|
130
|
+
}
|
|
131
|
+
export declare class StreamWildcardReplacerError extends StreamNodeError {
|
|
132
|
+
constructor(error: Error, detail: string);
|
|
133
|
+
}
|
|
134
|
+
export declare class StreamNodePathTypeNotImplementedError extends StreamNodeError {
|
|
135
|
+
constructor(error: Error, detail: string);
|
|
136
|
+
}
|
|
137
|
+
export declare class StreamDesignNotFoundError extends StreamNodeError {
|
|
138
|
+
constructor();
|
|
139
|
+
}
|
|
140
|
+
export declare class CatalogNotFoundError extends StreamNodeError {
|
|
141
|
+
constructor();
|
|
142
|
+
setNode(streamNode: StreamNode): void;
|
|
143
|
+
}
|
|
144
|
+
export {};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CatalogNotFoundError = exports.StreamDesignNotFoundError = exports.StreamNodePathTypeNotImplementedError = exports.StreamWildcardReplacerError = exports.StreamNodePathNotFoundError = exports.StreamNodeNotFoundError = exports.StreamNodeInputTypeError = exports.StreamNodeInputMissingError = exports.StreamNodeGenericError = exports.StreamNodeError = exports.DuplicateFolderOption = exports.DuplicateFileOption = void 0;
|
|
4
|
+
// ─── Enums ───────────────────────────────────────────────────────────────────
|
|
5
|
+
var DuplicateFileOption;
|
|
6
|
+
(function (DuplicateFileOption) {
|
|
7
|
+
DuplicateFileOption["FAIL"] = "Fail";
|
|
8
|
+
DuplicateFileOption["SKIP"] = "Skip";
|
|
9
|
+
DuplicateFileOption["OVERWRITE"] = "Overwrite";
|
|
10
|
+
DuplicateFileOption["RENAME_EXISTING"] = "Rename Existing";
|
|
11
|
+
DuplicateFileOption["INCREMENT_NAME"] = "Increment Name";
|
|
12
|
+
})(DuplicateFileOption || (exports.DuplicateFileOption = DuplicateFileOption = {}));
|
|
13
|
+
var DuplicateFolderOption;
|
|
14
|
+
(function (DuplicateFolderOption) {
|
|
15
|
+
DuplicateFolderOption["FAIL"] = "Fail";
|
|
16
|
+
DuplicateFolderOption["SKIP"] = "Skip";
|
|
17
|
+
DuplicateFolderOption["RENAME_EXISTING"] = "Rename Existing";
|
|
18
|
+
DuplicateFolderOption["INCREMENT_NAME"] = "Increment Name";
|
|
19
|
+
})(DuplicateFolderOption || (exports.DuplicateFolderOption = DuplicateFolderOption = {}));
|
|
20
|
+
// ─── Stream node errors ───────────────────────────────────────────────────────
|
|
21
|
+
class StreamNodeError extends Error {
|
|
22
|
+
getCode() {
|
|
23
|
+
return this.code;
|
|
24
|
+
}
|
|
25
|
+
getDetail() {
|
|
26
|
+
return this.detail;
|
|
27
|
+
}
|
|
28
|
+
getMessage() {
|
|
29
|
+
return this.message;
|
|
30
|
+
}
|
|
31
|
+
toJson() {
|
|
32
|
+
return {
|
|
33
|
+
code: this.code,
|
|
34
|
+
message: this.message,
|
|
35
|
+
detail: this.detail,
|
|
36
|
+
trace: this.stack,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.StreamNodeError = StreamNodeError;
|
|
41
|
+
class StreamNodeGenericError extends StreamNodeError {
|
|
42
|
+
constructor(err, detail) {
|
|
43
|
+
super();
|
|
44
|
+
this.detail = detail !== null && detail !== void 0 ? detail : "";
|
|
45
|
+
this.code = 400;
|
|
46
|
+
this.message = err.message;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.StreamNodeGenericError = StreamNodeGenericError;
|
|
50
|
+
class StreamNodeInputMissingError extends StreamNodeError {
|
|
51
|
+
constructor(input) {
|
|
52
|
+
super();
|
|
53
|
+
this.code = 501;
|
|
54
|
+
this.message = `Missing mandatory input parameter '${input}'`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.StreamNodeInputMissingError = StreamNodeInputMissingError;
|
|
58
|
+
class StreamNodeInputTypeError extends StreamNodeError {
|
|
59
|
+
constructor(input, want, got) {
|
|
60
|
+
super();
|
|
61
|
+
this.code = 502;
|
|
62
|
+
this.message = `Invalid type for input parameter '${input}', want '${want}' got '${got}'`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.StreamNodeInputTypeError = StreamNodeInputTypeError;
|
|
66
|
+
class StreamNodeNotFoundError extends StreamNodeError {
|
|
67
|
+
constructor(detail) {
|
|
68
|
+
super();
|
|
69
|
+
this.detail = detail;
|
|
70
|
+
this.code = 503;
|
|
71
|
+
this.message = "Could not find node by uuid in node list";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.StreamNodeNotFoundError = StreamNodeNotFoundError;
|
|
75
|
+
class StreamNodePathNotFoundError extends StreamNodeError {
|
|
76
|
+
constructor(error, detail) {
|
|
77
|
+
super();
|
|
78
|
+
this.detail = detail;
|
|
79
|
+
this.code = 504;
|
|
80
|
+
this.message = "Could not find node by path: " + error.message;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.StreamNodePathNotFoundError = StreamNodePathNotFoundError;
|
|
84
|
+
class StreamWildcardReplacerError extends StreamNodeError {
|
|
85
|
+
constructor(error, detail) {
|
|
86
|
+
super();
|
|
87
|
+
this.detail = detail;
|
|
88
|
+
this.code = 505;
|
|
89
|
+
this.message = error.message;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.StreamWildcardReplacerError = StreamWildcardReplacerError;
|
|
93
|
+
class StreamNodePathTypeNotImplementedError extends StreamNodeError {
|
|
94
|
+
constructor(error, detail) {
|
|
95
|
+
super();
|
|
96
|
+
this.detail = detail;
|
|
97
|
+
this.code = 506;
|
|
98
|
+
this.message = error.message;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
exports.StreamNodePathTypeNotImplementedError = StreamNodePathTypeNotImplementedError;
|
|
102
|
+
class StreamDesignNotFoundError extends StreamNodeError {
|
|
103
|
+
constructor() {
|
|
104
|
+
super();
|
|
105
|
+
this.code = 404;
|
|
106
|
+
this.message = "Unable to find design for stream";
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.StreamDesignNotFoundError = StreamDesignNotFoundError;
|
|
110
|
+
class CatalogNotFoundError extends StreamNodeError {
|
|
111
|
+
constructor() {
|
|
112
|
+
super();
|
|
113
|
+
this.code = 404;
|
|
114
|
+
}
|
|
115
|
+
setNode(streamNode) {
|
|
116
|
+
this.detail = streamNode.path;
|
|
117
|
+
this.message = `Unable to find catalog of node ${streamNode.name}@${streamNode.catalog.version}`;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
exports.CatalogNotFoundError = CatalogNotFoundError;
|
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
import { ReducedUser } from ".";
|
|
2
|
+
export declare enum MessageSource {
|
|
3
|
+
GLOBAL = 0,
|
|
4
|
+
COSMO = 1,
|
|
5
|
+
HIGH5 = 2,
|
|
6
|
+
IDP = 3
|
|
7
|
+
}
|
|
2
8
|
export declare enum MessageType {
|
|
3
|
-
|
|
4
|
-
|
|
9
|
+
COSMO_ASSET_READY = "ASSET_READY",
|
|
10
|
+
COSMO_COMMENT_MENTION = "MENTION",
|
|
11
|
+
COSMO_USER_ADDED_TO_SPACE = "USER_ADDED_TO_SPACE",
|
|
12
|
+
COSMO_USER_REMOVED_FROM_SPACE = "USER_REMOVED_FROM_SPACE",
|
|
13
|
+
COSMO_ASSET_SHARED = "ASSET_SHARED",
|
|
14
|
+
COSMO_NEW_COMMENT = "NEW_COMMENT",
|
|
15
|
+
COSMO_REPLY_TO_COMMENT = "REPLY_TO_COMMENT",
|
|
16
|
+
COSMO_ASSET_STATUS_CHANGED = "ASSET_STATUS_CHANGED",
|
|
17
|
+
COSMO_NEW_ASSET_UPLOADED = "NEW_ASSET_UPLOADED",
|
|
18
|
+
HIGH5_EXECUTION_FINISHED = "EXECUTION_FINISHED",
|
|
19
|
+
IDP_LOGIN = "LOGINS",
|
|
20
|
+
DIRECT_MESSAGE = "MESSAGES"
|
|
5
21
|
}
|
|
6
22
|
export declare enum RecipientType {
|
|
7
23
|
USER = "USER",
|
|
8
24
|
TEAM = "TEAM",
|
|
9
25
|
ORGANIZATION = "ORGANIZATION"
|
|
10
26
|
}
|
|
27
|
+
export type MessageLevel = "info" | "success" | "warning" | "error";
|
|
11
28
|
export interface Message {
|
|
12
29
|
_id: string;
|
|
13
30
|
from: ReducedUser;
|
|
14
31
|
to: ReducedUser;
|
|
15
|
-
|
|
16
|
-
subject?: string;
|
|
17
|
-
message: string;
|
|
18
|
-
read: boolean;
|
|
32
|
+
source: MessageSource;
|
|
19
33
|
type: MessageType;
|
|
34
|
+
properties: Record<string, unknown>;
|
|
35
|
+
level: MessageLevel;
|
|
36
|
+
read: boolean;
|
|
37
|
+
system: boolean;
|
|
38
|
+
deleted: boolean;
|
|
39
|
+
ttl: number;
|
|
40
|
+
group?: string;
|
|
20
41
|
createDate: number;
|
|
21
|
-
link?: string;
|
|
22
42
|
}
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RecipientType = exports.MessageType = void 0;
|
|
3
|
+
exports.RecipientType = exports.MessageType = exports.MessageSource = void 0;
|
|
4
|
+
var MessageSource;
|
|
5
|
+
(function (MessageSource) {
|
|
6
|
+
MessageSource[MessageSource["GLOBAL"] = 0] = "GLOBAL";
|
|
7
|
+
MessageSource[MessageSource["COSMO"] = 1] = "COSMO";
|
|
8
|
+
MessageSource[MessageSource["HIGH5"] = 2] = "HIGH5";
|
|
9
|
+
MessageSource[MessageSource["IDP"] = 3] = "IDP";
|
|
10
|
+
})(MessageSource || (exports.MessageSource = MessageSource = {}));
|
|
4
11
|
var MessageType;
|
|
5
12
|
(function (MessageType) {
|
|
6
|
-
MessageType["
|
|
7
|
-
MessageType["
|
|
13
|
+
MessageType["COSMO_ASSET_READY"] = "ASSET_READY";
|
|
14
|
+
MessageType["COSMO_COMMENT_MENTION"] = "MENTION";
|
|
15
|
+
MessageType["COSMO_USER_ADDED_TO_SPACE"] = "USER_ADDED_TO_SPACE";
|
|
16
|
+
MessageType["COSMO_USER_REMOVED_FROM_SPACE"] = "USER_REMOVED_FROM_SPACE";
|
|
17
|
+
MessageType["COSMO_ASSET_SHARED"] = "ASSET_SHARED";
|
|
18
|
+
MessageType["COSMO_NEW_COMMENT"] = "NEW_COMMENT";
|
|
19
|
+
MessageType["COSMO_REPLY_TO_COMMENT"] = "REPLY_TO_COMMENT";
|
|
20
|
+
MessageType["COSMO_ASSET_STATUS_CHANGED"] = "ASSET_STATUS_CHANGED";
|
|
21
|
+
MessageType["COSMO_NEW_ASSET_UPLOADED"] = "NEW_ASSET_UPLOADED";
|
|
22
|
+
MessageType["HIGH5_EXECUTION_FINISHED"] = "EXECUTION_FINISHED";
|
|
23
|
+
MessageType["IDP_LOGIN"] = "LOGINS";
|
|
24
|
+
MessageType["DIRECT_MESSAGE"] = "MESSAGES";
|
|
8
25
|
})(MessageType || (exports.MessageType = MessageType = {}));
|
|
9
26
|
var RecipientType;
|
|
10
27
|
(function (RecipientType) {
|