hcloud-sdk 22.23.1 → 22.26.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 +3 -3
- package/lib/interfaces/high5/execution/index.d.ts +5 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +2 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +11 -0
- package/lib/interfaces/nats/index.d.ts +13 -1
- package/lib/interfaces/nats/index.js +40 -29
- package/lib/service/high5/execution/index.d.ts +9 -0
- package/lib/service/high5/execution/index.js +11 -0
- package/lib/service/nats/index.js +1 -0
- package/package.json +4 -4
package/changelog.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
## [22.
|
|
1
|
+
## [22.26.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v22.25.0...v22.26.0) (2026-08-31)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### Features
|
|
4
4
|
|
|
5
|
-
*
|
|
5
|
+
* trigger new build ([6ac9cf9](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/6ac9cf96ff20649d6fe87f2609f274f4343516a3))
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StreamCustomNodeSpecification, StreamNodeSpecificationInputType, StreamSemanticVersion } from "../../../../wave";
|
|
2
|
+
import { Query } from "../../../../wave/dependentInputs";
|
|
2
3
|
export interface CanvasDimensions {
|
|
3
4
|
width: number;
|
|
4
5
|
height: number;
|
|
@@ -47,6 +48,7 @@ export interface DesignerNodeInput {
|
|
|
47
48
|
type: StreamNodeSpecificationInputType;
|
|
48
49
|
selectedLanguage?: StringMap;
|
|
49
50
|
expression?: boolean;
|
|
51
|
+
if?: Query;
|
|
50
52
|
example: string | number | boolean | string[] | StringMap | StringMap[] | SortedStringMap[];
|
|
51
53
|
value?: string | number | boolean | string[] | StringMap | StringMap[] | SortedStringMap[];
|
|
52
54
|
mandatory?: boolean;
|
|
@@ -18,6 +18,11 @@ export interface High5ExecutionRequest {
|
|
|
18
18
|
target: string;
|
|
19
19
|
dry?: boolean;
|
|
20
20
|
parentExecutionSecret?: string;
|
|
21
|
+
queued?: boolean;
|
|
22
|
+
blocking?: boolean;
|
|
23
|
+
priority?: number;
|
|
24
|
+
retryCount?: number;
|
|
25
|
+
startTime?: number;
|
|
21
26
|
}
|
|
22
27
|
export interface High5ExecuteAgentResponse {
|
|
23
28
|
failed: boolean;
|
|
@@ -146,6 +151,12 @@ export interface High5ExecutionStatus {
|
|
|
146
151
|
agentInfo?: ReducedAgentInfo;
|
|
147
152
|
waveEngineVersion?: string;
|
|
148
153
|
isPoolExecution?: boolean;
|
|
154
|
+
queued?: boolean;
|
|
155
|
+
blocking?: boolean;
|
|
156
|
+
priority?: number;
|
|
157
|
+
startTime?: number;
|
|
158
|
+
currentRetry?: number;
|
|
159
|
+
assignedClient?: string;
|
|
149
160
|
}
|
|
150
161
|
export interface High5ExecutionLog {
|
|
151
162
|
_id: string;
|
|
@@ -66,6 +66,8 @@ declare enum NatsSubject {
|
|
|
66
66
|
COSMO_STATUS = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces.${base64namespaceName}.assets.${assetId}.status",
|
|
67
67
|
COSMO_METADATA = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces.${base64namespaceName}.metadata",
|
|
68
68
|
MOTHERSHIP_AGENT_CONNECTION = "hcloud.mothership.organization.${base64orgName}.agent.connection",
|
|
69
|
+
MOTHERSHIP_AGENT_PING = "hcloud.mothership.agent.${agentUuid}.ping",
|
|
70
|
+
AGENT_DISCONNECT = "hcloud.agent.disconnect",
|
|
69
71
|
AUDITOR_LOGS = "hcloud.auditor.organization.${base64orgName}.logs",
|
|
70
72
|
DEBUG_NAMESPACE = "hcloud.debug.namespace.${product}"
|
|
71
73
|
}
|
|
@@ -130,7 +132,7 @@ interface NatsMessage {
|
|
|
130
132
|
object: NatsObject;
|
|
131
133
|
objectType: NatsObjectType;
|
|
132
134
|
}
|
|
133
|
-
interface NatsObject extends NatsNameObject, NatsIdObject, NatsMemberObject, NatsSecretObject, NatsExecTargetObject, High5ExecuteOnAgentRequest, High5ExecutionCancelRequest, CapturedRequest, NatsLicenseObject, NatsCustomNodeObject, NatsAssetObject, NatsIdNoUnderscoreObject, NatsTargetObject, NatsCosmoStatusObject {
|
|
135
|
+
interface NatsObject extends NatsNameObject, NatsIdObject, NatsMemberObject, NatsSecretObject, NatsExecTargetObject, High5ExecuteOnAgentRequest, High5ExecutionCancelRequest, CapturedRequest, NatsLicenseObject, NatsCustomNodeObject, NatsAssetObject, NatsIdNoUnderscoreObject, NatsTargetObject, NatsAgentConnectionObject, NatsCosmoStatusObject {
|
|
134
136
|
[NatsSubject.IDP_USER_GENERAL]: NatsIdObject;
|
|
135
137
|
[NatsSubject.IDP_USER_PROFILE]: NatsIdObject;
|
|
136
138
|
[NatsSubject.IDP_USER_SECURITY_PATS]: NatsIdObject;
|
|
@@ -176,6 +178,8 @@ interface NatsObject extends NatsNameObject, NatsIdObject, NatsMemberObject, Nat
|
|
|
176
178
|
[NatsSubject.COSMO_STATUS]: NatsCosmoStatusObject;
|
|
177
179
|
[NatsSubject.COSMO_METADATA]: NatsCosmoReferenceObject;
|
|
178
180
|
[NatsSubject.MOTHERSHIP_AGENT_CONNECTION]: NatsTargetObject;
|
|
181
|
+
[NatsSubject.MOTHERSHIP_AGENT_PING]: Record<string, never>;
|
|
182
|
+
[NatsSubject.AGENT_DISCONNECT]: NatsAgentConnectionObject;
|
|
179
183
|
[NatsSubject.AUDITOR_LOGS]: NatsIdObject;
|
|
180
184
|
[NatsSubject.DEBUG_NAMESPACE]: string;
|
|
181
185
|
}
|
|
@@ -230,6 +234,9 @@ interface NatsWatchFolderObject extends NatsIdObject {
|
|
|
230
234
|
interface NatsWatchFolderScanObject extends NatsIdObject {
|
|
231
235
|
secret: string;
|
|
232
236
|
}
|
|
237
|
+
interface NatsAgentConnectionObject extends NatsTargetObject {
|
|
238
|
+
orgName: string;
|
|
239
|
+
}
|
|
233
240
|
interface NatsCosmoReferenceObject {
|
|
234
241
|
refId: string;
|
|
235
242
|
}
|
|
@@ -349,6 +356,11 @@ declare class NatsSubjects {
|
|
|
349
356
|
static Mothership: {
|
|
350
357
|
new (): {};
|
|
351
358
|
CONNECTION: (organizationName: string) => string;
|
|
359
|
+
PING: (agentUuid: string) => string;
|
|
360
|
+
};
|
|
361
|
+
static Agent: {
|
|
362
|
+
new (): {};
|
|
363
|
+
DISCONNECT: NatsSubject;
|
|
352
364
|
};
|
|
353
365
|
static Auditor: {
|
|
354
366
|
new (): {};
|
|
@@ -3,7 +3,7 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
|
|
|
3
3
|
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
4
4
|
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
5
5
|
};
|
|
6
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.NatsSubjects = exports.NatsSubject = exports.NatsObjectType = exports.NatsMessageType = void 0;
|
|
9
9
|
var NatsSubject;
|
|
@@ -69,6 +69,8 @@ var NatsSubject;
|
|
|
69
69
|
NatsSubject["COSMO_STATUS"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces.${base64namespaceName}.assets.${assetId}.status";
|
|
70
70
|
NatsSubject["COSMO_METADATA"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces.${base64namespaceName}.metadata";
|
|
71
71
|
NatsSubject["MOTHERSHIP_AGENT_CONNECTION"] = "hcloud.mothership.organization.${base64orgName}.agent.connection";
|
|
72
|
+
NatsSubject["MOTHERSHIP_AGENT_PING"] = "hcloud.mothership.agent.${agentUuid}.ping";
|
|
73
|
+
NatsSubject["AGENT_DISCONNECT"] = "hcloud.agent.disconnect";
|
|
72
74
|
NatsSubject["AUDITOR_LOGS"] = "hcloud.auditor.organization.${base64orgName}.logs";
|
|
73
75
|
NatsSubject["DEBUG_NAMESPACE"] = "hcloud.debug.namespace.${product}";
|
|
74
76
|
})(NatsSubject || (exports.NatsSubject = NatsSubject = {}));
|
|
@@ -404,69 +406,77 @@ NatsSubjects.Mothership = (_s = class {
|
|
|
404
406
|
_s.CONNECTION = (organizationName) => {
|
|
405
407
|
return NatsSubjects.replace(NatsSubject.MOTHERSHIP_AGENT_CONNECTION, { organizationName });
|
|
406
408
|
},
|
|
409
|
+
_s.PING = (agentUuid) => {
|
|
410
|
+
return NatsSubjects.replace(NatsSubject.MOTHERSHIP_AGENT_PING, { agentUuid });
|
|
411
|
+
},
|
|
407
412
|
_s);
|
|
408
|
-
NatsSubjects.
|
|
413
|
+
NatsSubjects.Agent = (_t = class {
|
|
414
|
+
},
|
|
415
|
+
__setFunctionName(_t, "Agent"),
|
|
416
|
+
_t.DISCONNECT = NatsSubject.AGENT_DISCONNECT,
|
|
417
|
+
_t);
|
|
418
|
+
NatsSubjects.Auditor = (_u = class {
|
|
409
419
|
},
|
|
410
|
-
__setFunctionName(
|
|
411
|
-
|
|
420
|
+
__setFunctionName(_u, "Auditor"),
|
|
421
|
+
_u.LOGS = (organizationName) => {
|
|
412
422
|
return NatsSubjects.replace(NatsSubject.AUDITOR_LOGS, { organizationName });
|
|
413
423
|
},
|
|
414
|
-
|
|
424
|
+
_u);
|
|
415
425
|
NatsSubjects.Logging = (product) => {
|
|
416
426
|
return NatsSubjects.replace(NatsSubject.DEBUG_NAMESPACE, { product });
|
|
417
427
|
};
|
|
418
|
-
NatsSubjects.Cosmo = (
|
|
428
|
+
NatsSubjects.Cosmo = (_v = class {
|
|
419
429
|
},
|
|
420
|
-
__setFunctionName(
|
|
421
|
-
|
|
430
|
+
__setFunctionName(_v, "Cosmo"),
|
|
431
|
+
_v.SPACES = (organizationName) => {
|
|
422
432
|
return NatsSubjects.replace(NatsSubject.COSMO_SPACES, { organizationName });
|
|
423
433
|
},
|
|
424
|
-
|
|
434
|
+
_v.Space = (_w = class {
|
|
425
435
|
},
|
|
426
|
-
__setFunctionName(
|
|
427
|
-
|
|
436
|
+
__setFunctionName(_w, "Space"),
|
|
437
|
+
_w.NAMESPACES = (organizationName, spaceName) => {
|
|
428
438
|
return NatsSubjects.replace(NatsSubject.COSMO_NAMESPACES, { organizationName, spaceName });
|
|
429
439
|
},
|
|
430
|
-
|
|
440
|
+
_w.Namespace = (_x = class {
|
|
431
441
|
},
|
|
432
|
-
__setFunctionName(
|
|
433
|
-
|
|
442
|
+
__setFunctionName(_x, "Namespace"),
|
|
443
|
+
_x.TAGS = (organizationName, spaceName, namespaceName) => {
|
|
434
444
|
return NatsSubjects.replace(NatsSubject.COSMO_TAGS_NAMESPACE, { organizationName, spaceName, namespaceName });
|
|
435
445
|
},
|
|
436
|
-
|
|
446
|
+
_x.METADATA = (organizationName, spaceName, namespaceName) => {
|
|
437
447
|
return NatsSubjects.replace(NatsSubject.COSMO_METADATA, { organizationName, spaceName, namespaceName });
|
|
438
448
|
},
|
|
439
|
-
|
|
440
|
-
|
|
449
|
+
_x),
|
|
450
|
+
_w.ASSETS = (organizationName, spaceName) => {
|
|
441
451
|
return NatsSubjects.replace(NatsSubject.COSMO_ASSETS, { organizationName, spaceName });
|
|
442
452
|
},
|
|
443
|
-
|
|
453
|
+
_w.STACKS = (organizationName, spaceName) => {
|
|
444
454
|
return NatsSubjects.replace(NatsSubject.COSMO_STACKS, { organizationName, spaceName });
|
|
445
455
|
},
|
|
446
|
-
|
|
456
|
+
_w.SHARES = (organizationName, spaceName) => {
|
|
447
457
|
return NatsSubjects.replace(NatsSubject.COSMO_SHARE, { organizationName, spaceName });
|
|
448
458
|
},
|
|
449
|
-
|
|
459
|
+
_w.ROLES = (organizationName, spaceName) => {
|
|
450
460
|
return NatsSubjects.replace(NatsSubject.COSMO_ROLES, { organizationName, spaceName });
|
|
451
461
|
},
|
|
452
|
-
|
|
462
|
+
_w.Asset = (_y = class {
|
|
453
463
|
},
|
|
454
|
-
__setFunctionName(
|
|
455
|
-
|
|
464
|
+
__setFunctionName(_y, "Asset"),
|
|
465
|
+
_y.COMMENTS = (organizationName, spaceName, namespaceName, assetId) => {
|
|
456
466
|
return NatsSubjects.replace(NatsSubject.COSMO_COMMENTS, { organizationName, spaceName, namespaceName, assetId });
|
|
457
467
|
},
|
|
458
|
-
|
|
468
|
+
_y.TAGS = (organizationName, spaceName, namespaceName, assetId) => {
|
|
459
469
|
return NatsSubjects.replace(NatsSubject.COSMO_TAGS_ASSET, { organizationName, spaceName, namespaceName, assetId });
|
|
460
470
|
},
|
|
461
|
-
|
|
471
|
+
_y.STATUS = (organizationName, spaceName, namespaceName, assetId) => {
|
|
462
472
|
return NatsSubjects.replace(NatsSubject.COSMO_STATUS, { organizationName, spaceName, namespaceName, assetId });
|
|
463
473
|
},
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
474
|
+
_y),
|
|
475
|
+
_w),
|
|
476
|
+
_v.ASSETS = (organizationName) => {
|
|
467
477
|
return NatsSubjects.replace(NatsSubject.COSMO_CROSS_SPACES_ASSETS, { organizationName });
|
|
468
478
|
},
|
|
469
|
-
|
|
479
|
+
_v);
|
|
470
480
|
// eslint-disable-next-line complexity
|
|
471
481
|
NatsSubjects.replace = (subject, replacements) => {
|
|
472
482
|
subject = subject.replace("${userId}", replacements.userId || "null");
|
|
@@ -493,6 +503,7 @@ NatsSubjects.replace = (subject, replacements) => {
|
|
|
493
503
|
subject = subject.replace("${assetId}", replacements.assetId || "null");
|
|
494
504
|
subject = subject.replace("${base64watchFolderName}", replacements.watchFolderName ? (replacements.watchFolderName === "*" ? "*" : base64Encode(replacements.watchFolderName)) : "null");
|
|
495
505
|
subject = subject.replace("${watchFolderId}", replacements.watchFolderId || "null");
|
|
506
|
+
subject = subject.replace("${agentUuid}", replacements.agentUuid || "null");
|
|
496
507
|
return subject;
|
|
497
508
|
};
|
|
498
509
|
const base64Encode = (str) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Base, { MaybeRaw } from "../../../Base";
|
|
2
|
+
import { High5QueuePollRequest } from "../../../interfaces/high5/execution";
|
|
2
3
|
import { High5OrganizationExecutionLogs } from "./log/index";
|
|
3
4
|
import { High5OrganizationExecutionStates } from "./status/index";
|
|
4
5
|
export declare class High5OrganizationExecute extends Base {
|
|
@@ -6,6 +7,14 @@ export declare class High5OrganizationExecute extends Base {
|
|
|
6
7
|
private _logs?;
|
|
7
8
|
get status(): High5OrganizationExecutionStates;
|
|
8
9
|
private _status?;
|
|
10
|
+
/**
|
|
11
|
+
* Poll the global execution queue across the given organizations
|
|
12
|
+
* @param dto Request body containing organizationIds, blocking flag and optional limit
|
|
13
|
+
* @returns 204 No Content
|
|
14
|
+
*/
|
|
15
|
+
pollQueue<R extends boolean = false>(dto: High5QueuePollRequest, raw?: {
|
|
16
|
+
raw: R;
|
|
17
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
9
18
|
/**
|
|
10
19
|
* Cancel stream execution
|
|
11
20
|
* @param orgName Name of the Organization
|
|
@@ -29,6 +29,17 @@ class High5OrganizationExecute extends Base_1.default {
|
|
|
29
29
|
}
|
|
30
30
|
return this._status;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Poll the global execution queue across the given organizations
|
|
34
|
+
* @param dto Request body containing organizationIds, blocking flag and optional limit
|
|
35
|
+
* @returns 204 No Content
|
|
36
|
+
*/
|
|
37
|
+
pollQueue(dto, raw) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/execute/queue`), dto);
|
|
40
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
32
43
|
/**
|
|
33
44
|
* Cancel stream execution
|
|
34
45
|
* @param orgName Name of the Organization
|
|
@@ -51,6 +51,7 @@ class Nats extends Base_1.default {
|
|
|
51
51
|
name: params.name,
|
|
52
52
|
debug: params.debug,
|
|
53
53
|
maxReconnectAttempts: -1,
|
|
54
|
+
ignoreAuthErrorAbort: true,
|
|
54
55
|
servers: params.servers,
|
|
55
56
|
pingInterval: 55 * 1000, //ping every 55 seconds
|
|
56
57
|
user: params.email !== undefined ? params.email : params.username,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hcloud-sdk",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.26.0",
|
|
4
4
|
"description": "hcloud platform sdk",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@eslint/compat": "^1.2.9",
|
|
34
34
|
"@eslint/eslintrc": "^3.3.1",
|
|
35
35
|
"@eslint/js": "^9.27.0",
|
|
36
|
-
"@semantic-release/changelog": "^
|
|
36
|
+
"@semantic-release/changelog": "^7.0.0",
|
|
37
37
|
"@semantic-release/exec": "^7.1.0",
|
|
38
|
-
"@semantic-release/git": "^
|
|
38
|
+
"@semantic-release/git": "^11.0.1",
|
|
39
39
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
40
40
|
"@types/node": "^22.15.19",
|
|
41
41
|
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"eslint-plugin-import": "^2.31.0",
|
|
47
47
|
"globals": "^16.1.0",
|
|
48
48
|
"prettier": "^3.5.3",
|
|
49
|
-
"semantic-release": "^25.0.
|
|
49
|
+
"semantic-release": "^25.0.9",
|
|
50
50
|
"semantic-release-telegram": "^1.6.2",
|
|
51
51
|
"ts-node": "^10.9.2",
|
|
52
52
|
"typescript": "^5.8.3"
|