hcloud-sdk 22.12.0 → 22.13.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 +2 -2
- package/lib/interfaces/agent/cache/catalog.d.ts +6 -0
- package/lib/interfaces/agent/cache/catalog.js +2 -0
- package/lib/interfaces/agent/cache/engine.d.ts +6 -0
- package/lib/interfaces/agent/cache/engine.js +2 -0
- package/lib/interfaces/agent/cache/index.d.ts +2 -0
- package/lib/interfaces/agent/cache/index.js +16 -0
- package/lib/service/agent/cache/index.d.ts +29 -1
- package/lib/service/agent/cache/index.js +44 -4
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
## [22.
|
|
1
|
+
## [22.13.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v22.12.0...v22.13.0) (2026-08-05)
|
|
2
2
|
|
|
3
3
|
### Features
|
|
4
4
|
|
|
5
|
-
*
|
|
5
|
+
* **agent:** add cached engines/catalogs management methods ([d5ea3a8](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/d5ea3a881b77e8643cb12d9797af0af96cbf531a))
|
|
@@ -1,2 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./catalog"), exports);
|
|
18
|
+
__exportStar(require("./engine"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Base, { MaybeRaw } from "../../../Base";
|
|
2
|
-
import { StreamCacheMetadata, StreamCacheWipeResult } from "../../../interfaces/agent/cache";
|
|
2
|
+
import { StreamCacheMetadata, StreamCacheWipeResult, WaveCatalogMetadata, WaveEngineMetadata } from "../../../interfaces/agent/cache";
|
|
3
3
|
export declare class AgentCache extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* Retrieves metadata for all currently cached stream definitions.
|
|
@@ -34,5 +34,33 @@ export declare class AgentCache extends Base {
|
|
|
34
34
|
clearCache<R extends boolean = false>(raw?: {
|
|
35
35
|
raw: R;
|
|
36
36
|
}): Promise<MaybeRaw<R, StreamCacheWipeResult>>;
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves metadata for all Wave Engine versions currently cached on the agent.
|
|
39
|
+
* @returns Array of cached Wave Engine metadata
|
|
40
|
+
*/
|
|
41
|
+
listEngines<R extends boolean = false>(raw?: {
|
|
42
|
+
raw: R;
|
|
43
|
+
}): Promise<MaybeRaw<R, WaveEngineMetadata[]>>;
|
|
44
|
+
/**
|
|
45
|
+
* Deletes a cached Wave Engine version from the agent.
|
|
46
|
+
* @param version - Version of the cached Wave Engine to remove
|
|
47
|
+
*/
|
|
48
|
+
deleteEngine<R extends boolean = false>(version: string, raw?: {
|
|
49
|
+
raw: R;
|
|
50
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves metadata for all Wave Catalogs currently cached on the agent.
|
|
53
|
+
* @returns Array of cached Wave Catalog metadata
|
|
54
|
+
*/
|
|
55
|
+
listCatalogs<R extends boolean = false>(raw?: {
|
|
56
|
+
raw: R;
|
|
57
|
+
}): Promise<MaybeRaw<R, WaveCatalogMetadata[]>>;
|
|
58
|
+
/**
|
|
59
|
+
* Deletes a cached Wave Catalog from the agent.
|
|
60
|
+
* @param hash - MD5 hash (of url + version) of the cached Wave Catalog to remove
|
|
61
|
+
*/
|
|
62
|
+
deleteCatalog<R extends boolean = false>(hash: string, raw?: {
|
|
63
|
+
raw: R;
|
|
64
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
37
65
|
protected getEndpoint(endpoint: string): string;
|
|
38
66
|
}
|
|
@@ -22,7 +22,7 @@ class AgentCache extends Base_1.default {
|
|
|
22
22
|
*/
|
|
23
23
|
listStreamCache(raw) {
|
|
24
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const resp = yield this.axios.get(this.getEndpoint(`/v1/cache`));
|
|
25
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/cache/streams`));
|
|
26
26
|
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
27
27
|
});
|
|
28
28
|
}
|
|
@@ -34,7 +34,7 @@ class AgentCache extends Base_1.default {
|
|
|
34
34
|
*/
|
|
35
35
|
getStreamCache(streamId, raw) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const resp = yield this.axios.get(this.getEndpoint(`/v1/cache/${streamId}`));
|
|
37
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/cache/streams/${streamId}`));
|
|
38
38
|
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
@@ -45,7 +45,7 @@ class AgentCache extends Base_1.default {
|
|
|
45
45
|
*/
|
|
46
46
|
deleteStreamCache(streamId, raw) {
|
|
47
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
const resp = yield this.axios.delete(this.getEndpoint(`/v1/cache/${streamId}`));
|
|
48
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/cache/streams/${streamId}`));
|
|
49
49
|
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
50
50
|
});
|
|
51
51
|
}
|
|
@@ -56,7 +56,47 @@ class AgentCache extends Base_1.default {
|
|
|
56
56
|
*/
|
|
57
57
|
clearCache(raw) {
|
|
58
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
const resp = yield this.axios.delete(this.getEndpoint(`/v1/cache`));
|
|
59
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/cache/streams`));
|
|
60
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Retrieves metadata for all Wave Engine versions currently cached on the agent.
|
|
65
|
+
* @returns Array of cached Wave Engine metadata
|
|
66
|
+
*/
|
|
67
|
+
listEngines(raw) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/cache/engines`));
|
|
70
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Deletes a cached Wave Engine version from the agent.
|
|
75
|
+
* @param version - Version of the cached Wave Engine to remove
|
|
76
|
+
*/
|
|
77
|
+
deleteEngine(version, raw) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/cache/engines/${version}`));
|
|
80
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Retrieves metadata for all Wave Catalogs currently cached on the agent.
|
|
85
|
+
* @returns Array of cached Wave Catalog metadata
|
|
86
|
+
*/
|
|
87
|
+
listCatalogs(raw) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/cache/catalogs`));
|
|
90
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Deletes a cached Wave Catalog from the agent.
|
|
95
|
+
* @param hash - MD5 hash (of url + version) of the cached Wave Catalog to remove
|
|
96
|
+
*/
|
|
97
|
+
deleteCatalog(hash, raw) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/cache/catalogs/${hash}`));
|
|
60
100
|
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
61
101
|
});
|
|
62
102
|
}
|