hcloud-sdk 21.2.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
CHANGED
|
@@ -1,32 +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
|
-
*
|
|
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))
|
|
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))
|
|
18
6
|
|
|
19
7
|
### Bug Fixes
|
|
20
8
|
|
|
21
|
-
*
|
|
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))
|
|
25
|
-
|
|
26
|
-
### Performance Improvements
|
|
27
|
-
|
|
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))
|
|
9
|
+
* change package ecosystem from pnpm to npm in dependabot configuration ([854aa69](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/854aa690ca3a5ee1ac1108ba481e74ff61bc3424))
|
|
@@ -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) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Base, { MaybeRaw } from "../../../../Base";
|
|
2
2
|
import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
|
|
3
|
-
import { Message, RecipientType } from "../../../../interfaces/idp/user/Message";
|
|
3
|
+
import { Message, MessageLevel, MessageSource, MessageType, RecipientType } from "../../../../interfaces/idp/user/Message";
|
|
4
4
|
export declare class IdpMessage extends Base {
|
|
5
5
|
/**
|
|
6
6
|
* Search all messages of the requesting user.
|
|
@@ -26,6 +26,28 @@ export declare class IdpMessage extends Base {
|
|
|
26
26
|
updateMessage<R extends boolean = false>(messageId: string, read: boolean, raw?: {
|
|
27
27
|
raw: R;
|
|
28
28
|
}): Promise<MaybeRaw<R, Message>>;
|
|
29
|
+
/**
|
|
30
|
+
* Bulk-update the read status of multiple messages by ID.
|
|
31
|
+
*
|
|
32
|
+
* @param ids IDs of the messages to update
|
|
33
|
+
* @param read Read status to apply to all specified messages
|
|
34
|
+
* @returns The number of messages that were modified
|
|
35
|
+
*/
|
|
36
|
+
bulkReadMessages<R extends boolean = false>(ids: string[], read: boolean, raw?: {
|
|
37
|
+
raw: R;
|
|
38
|
+
}): Promise<MaybeRaw<R, {
|
|
39
|
+
modifiedCount: number;
|
|
40
|
+
}>>;
|
|
41
|
+
/**
|
|
42
|
+
* Set the soft-delete state of a received message.
|
|
43
|
+
*
|
|
44
|
+
* @param messageId ID of the Message object
|
|
45
|
+
* @param deleted Whether the message should be soft-deleted (true) or restored (false)
|
|
46
|
+
* @returns the updated Message object
|
|
47
|
+
*/
|
|
48
|
+
softDeleteMessage<R extends boolean = false>(messageId: string, deleted: boolean, raw?: {
|
|
49
|
+
raw: R;
|
|
50
|
+
}): Promise<MaybeRaw<R, Message>>;
|
|
29
51
|
/**
|
|
30
52
|
* Deletes a message of the requesting User.
|
|
31
53
|
* @param messageId Id of the Message
|
|
@@ -42,19 +64,22 @@ export declare class IdpMessage extends Base {
|
|
|
42
64
|
* - to - should be email, orgName or teamName
|
|
43
65
|
* - recipient - enum type USER, ORGANIZATION or TEAM (by default is USER)
|
|
44
66
|
* - orgName - should be only specified if recipient===TEAM
|
|
45
|
-
* -
|
|
46
|
-
* -
|
|
47
|
-
* -
|
|
67
|
+
* - source - the system or service that originated this message
|
|
68
|
+
* - type - the specific type of message, scoped to its source
|
|
69
|
+
* - properties - payload specific to the message source and type
|
|
70
|
+
* - level - severity level of the message (defaults to "info")
|
|
71
|
+
* - group - optional UUID to group related messages
|
|
48
72
|
* @returns the Message object
|
|
49
73
|
*/
|
|
50
74
|
sendMessage<R extends boolean = false>(msg: {
|
|
51
75
|
to: string;
|
|
52
76
|
recipient?: RecipientType;
|
|
53
77
|
orgName?: string;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
78
|
+
source: MessageSource;
|
|
79
|
+
type: MessageType;
|
|
80
|
+
properties: Record<string, unknown>;
|
|
81
|
+
level?: MessageLevel;
|
|
82
|
+
group?: string;
|
|
58
83
|
}, raw?: {
|
|
59
84
|
raw: R;
|
|
60
85
|
}): Promise<MaybeRaw<R, Message>>;
|
|
@@ -58,6 +58,32 @@ class IdpMessage extends Base_1.default {
|
|
|
58
58
|
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Bulk-update the read status of multiple messages by ID.
|
|
63
|
+
*
|
|
64
|
+
* @param ids IDs of the messages to update
|
|
65
|
+
* @param read Read status to apply to all specified messages
|
|
66
|
+
* @returns The number of messages that were modified
|
|
67
|
+
*/
|
|
68
|
+
bulkReadMessages(ids, read, raw) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/messages/bulk-read`), { ids, read });
|
|
71
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Set the soft-delete state of a received message.
|
|
76
|
+
*
|
|
77
|
+
* @param messageId ID of the Message object
|
|
78
|
+
* @param deleted Whether the message should be soft-deleted (true) or restored (false)
|
|
79
|
+
* @returns the updated Message object
|
|
80
|
+
*/
|
|
81
|
+
softDeleteMessage(messageId, deleted, raw) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/messages/${messageId}/deleted`), { deleted });
|
|
84
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
61
87
|
/**
|
|
62
88
|
* Deletes a message of the requesting User.
|
|
63
89
|
* @param messageId Id of the Message
|
|
@@ -77,9 +103,11 @@ class IdpMessage extends Base_1.default {
|
|
|
77
103
|
* - to - should be email, orgName or teamName
|
|
78
104
|
* - recipient - enum type USER, ORGANIZATION or TEAM (by default is USER)
|
|
79
105
|
* - orgName - should be only specified if recipient===TEAM
|
|
80
|
-
* -
|
|
81
|
-
* -
|
|
82
|
-
* -
|
|
106
|
+
* - source - the system or service that originated this message
|
|
107
|
+
* - type - the specific type of message, scoped to its source
|
|
108
|
+
* - properties - payload specific to the message source and type
|
|
109
|
+
* - level - severity level of the message (defaults to "info")
|
|
110
|
+
* - group - optional UUID to group related messages
|
|
83
111
|
* @returns the Message object
|
|
84
112
|
*/
|
|
85
113
|
sendMessage(msg, raw) {
|