hcloud-sdk 21.0.1 → 21.2.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 +29 -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/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/nats/index.js +4 -5
- package/package.json +2 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
|
-
## [21.0
|
|
1
|
+
## [21.2.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v21.1.0...v21.2.0) (2026-07-02)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* add color property to CreateComment, EditComment, and Comment interfaces ([b587712](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/b58771228d8bde3131f1e7f032aad0acc01f49aa))
|
|
6
|
+
* add idp storage endpoints ([eca5d09](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/eca5d0988ef6a47cc86fd02405e77be2bc70cd3c))
|
|
7
|
+
* add OIDC provider config methods ([d8de170](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/d8de17025c245c6b0b873568325fd032bcefaf8e))
|
|
8
|
+
* add optional ?search support to listUSersAllowedToMention ([6dafcc4](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/6dafcc4dc3da1861786c7872ba0a8a23313564bb))
|
|
9
|
+
* add optional message field to Share and SharePatch interfaces ([5fdb3b2](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/5fdb3b2c4c0772fc32ff0d0aed2e91138356a209))
|
|
10
|
+
* add searchComments method to CosmoComment class for filtering and sorting ([0202045](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/0202045ffc959c851a8cb5b06e158cfe7b903f12))
|
|
11
|
+
* add storage to auditor events ([796cff9](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/796cff9f3ce2d531f1339ca9948ce2a3cf2ffa6a))
|
|
12
|
+
* add STORAGE_NAME to validation helper ([ef50361](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/ef503616babf86fca927660bdc46f03ab2e710ea))
|
|
13
|
+
* enhance username validation to support Unicode characters ([f93bd0d](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/f93bd0dae2ec7dce21d91749ea07c943ce1ff7d6))
|
|
14
|
+
* extend license quota ([967e4da](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/967e4dab42638e4da4137b9c7cf27a1fad5ed5ca))
|
|
15
|
+
* extend stack info ([0b9b5c7](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/0b9b5c7ed9617b29ff2e3e6d8e0ec74716d43eeb))
|
|
16
|
+
* introduce wave types ([ecc89b7](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/ecc89b7bb9ccf81ce0489a20c44dfc181e1b2d74))
|
|
17
|
+
* update interfaces and add storage data to them ([24a17fe](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/24a17fe2a2f673e7a1e82acb653d96f3a2ad249f))
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* allow org-level asset browsing ([ce129cd](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/ce129cdc6d189e8c75ccb9ae68a041ddfe4ac90a))
|
|
22
|
+
* handle non-JSON NATS messages ([ff41977](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/ff4197740b95243b8a2802fb080e5b6b7d6bfcff))
|
|
23
|
+
* incorrect export ([a20c11f](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/a20c11fe46de2129b7a54834e28f0a2ec83b5832))
|
|
24
|
+
* make stack optional for asset of type MediaAssets ([d60fbe9](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/d60fbe9052093cb9f351cec1ce9ee54670ef280c))
|
|
2
25
|
|
|
3
26
|
### Performance Improvements
|
|
4
27
|
|
|
5
|
-
* **
|
|
28
|
+
* **high5:** remove creatorId from CapturedRequest type ([914f3db](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/914f3db6296450ceba178d96ffaea424461847e8))
|
|
29
|
+
|
|
30
|
+
### Reverts
|
|
31
|
+
|
|
32
|
+
* Revert "feat: add endpoins introduced in cosmo" ([5467b57](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/5467b574e5ee82847421ec334b598acd3b3f190c))
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { AuditLog } from "../../../interfaces/auditor";
|
|
3
|
-
import { Asset,
|
|
4
|
-
import {
|
|
3
|
+
import { Asset, AssetPermission, AudioWaveformItem, CreateAsset, Mentionable, PatchAsset, Resolution, SubscriptionFilter, Upload, VTTThumbnail } from "../../../interfaces/cosmo/asset";
|
|
4
|
+
import { StorageConfiguration } from "../../../interfaces/global/Storage";
|
|
5
5
|
/**
|
|
6
6
|
* @class Asset
|
|
7
7
|
* @extends Base
|
|
@@ -13,36 +13,6 @@ import { Sorting } from "../../../interfaces/global";
|
|
|
13
13
|
*/
|
|
14
14
|
export declare class CosmoAsset extends Base {
|
|
15
15
|
protected getEndpoint(endpoint: string): string;
|
|
16
|
-
/**
|
|
17
|
-
* Browse assets
|
|
18
|
-
*
|
|
19
|
-
* @param orgName Name of the Organization
|
|
20
|
-
* @param spaceName Name of the Space
|
|
21
|
-
* @param context Context to search in (e.g., ORGANIZATION, TRASH, SHARE)
|
|
22
|
-
* @param limit Maximum number of Assets to return
|
|
23
|
-
* @param page Page number for pagination
|
|
24
|
-
* @param spaceName Name of Space to restrict search (mandatory if context is not ORGANIZATION)
|
|
25
|
-
* @param namespace Name of Namespace to restrict search
|
|
26
|
-
* @param parentId ID of parent (folder, etc.) to restrict search
|
|
27
|
-
* @param shareId ID of Share to restrict search (mandatory if context is SHARE)
|
|
28
|
-
* @param assetFilter Filter criteria for Assets
|
|
29
|
-
* @param sorting Sorting criteria for the results
|
|
30
|
-
* @returns List of found Assets
|
|
31
|
-
*/
|
|
32
|
-
browse<R extends boolean = false>({ orgName, spaceName, context, limit, page, namespace, parentId, shareId, assetFilter, sorting, }: {
|
|
33
|
-
orgName: string;
|
|
34
|
-
spaceName: string;
|
|
35
|
-
context: AssetSearchContext;
|
|
36
|
-
limit?: number;
|
|
37
|
-
page?: number;
|
|
38
|
-
namespace?: string[] | string;
|
|
39
|
-
parentId?: string;
|
|
40
|
-
shareId?: string;
|
|
41
|
-
assetFilter?: AssetFilter[];
|
|
42
|
-
sorting?: Sorting;
|
|
43
|
-
}, raw?: {
|
|
44
|
-
raw: R;
|
|
45
|
-
}): Promise<MaybeRaw<R, Asset[]>>;
|
|
46
16
|
/**
|
|
47
17
|
* Create a new Asset in Cosmo inside the specified Organization and Space.
|
|
48
18
|
* @remarks
|
|
@@ -56,6 +26,7 @@ export declare class CosmoAsset extends Base {
|
|
|
56
26
|
raw: R;
|
|
57
27
|
}): Promise<MaybeRaw<R, Asset & {
|
|
58
28
|
upload: Upload;
|
|
29
|
+
storage: StorageConfiguration;
|
|
59
30
|
}>>;
|
|
60
31
|
/**
|
|
61
32
|
* Bulk move or copy multiple assets to a new parent.
|
|
@@ -110,7 +81,9 @@ export declare class CosmoAsset extends Base {
|
|
|
110
81
|
*/
|
|
111
82
|
getAsset<R extends boolean = false>(orgName: string, spaceName: string, assetId: string, namespace?: string | string[], includePermissions?: boolean, raw?: {
|
|
112
83
|
raw: R;
|
|
113
|
-
}): Promise<MaybeRaw<R, Asset
|
|
84
|
+
}): Promise<MaybeRaw<R, Asset & {
|
|
85
|
+
storage: StorageConfiguration;
|
|
86
|
+
}>>;
|
|
114
87
|
/**
|
|
115
88
|
* Delete multiple assets permanently by their IDs.
|
|
116
89
|
* @remarks
|
|
@@ -264,7 +237,7 @@ export declare class CosmoAsset extends Base {
|
|
|
264
237
|
* @param page Page number for pagination
|
|
265
238
|
* @returns A list of users allowed to be mentioned in a comment of the asset
|
|
266
239
|
*/
|
|
267
|
-
listUsersAllowedToMention<R extends boolean = false>(orgName: string, spaceName: string, assetId: string, limit?: number, page?: number, raw?: {
|
|
240
|
+
listUsersAllowedToMention<R extends boolean = false>(orgName: string, spaceName: string, assetId: string, search?: string, limit?: number, page?: number, raw?: {
|
|
268
241
|
raw: R;
|
|
269
242
|
}): Promise<MaybeRaw<R, Mentionable[]>>;
|
|
270
243
|
/**
|