hcloud-sdk 22.11.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 CHANGED
@@ -1,5 +1,5 @@
1
- ## [22.11.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v22.10.0...v22.11.0) (2026-08-04)
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
- * update error codes ([a9ead32](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/a9ead32d44629e396bd634c705b7414cd2c1e4cb))
5
+ * **agent:** add cached engines/catalogs management methods ([d5ea3a8](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/d5ea3a881b77e8643cb12d9797af0af96cbf531a))
@@ -0,0 +1,6 @@
1
+ export interface WaveCatalogMetadata {
2
+ version: string;
3
+ hash: string;
4
+ dev: boolean;
5
+ createDate: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export interface WaveEngineMetadata {
2
+ version: string;
3
+ hash: string;
4
+ dev: boolean;
5
+ createDate: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,5 @@
1
+ export * from "./catalog";
2
+ export * from "./engine";
1
3
  export interface StreamCacheMetadata {
2
4
  streamId: string;
3
5
  orgName: string;
@@ -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);
@@ -866,6 +866,14 @@ export declare const ErrorCodes: readonly [{
866
866
  readonly code: "005.001.0004";
867
867
  readonly error: "insufficient.rights";
868
868
  readonly message: "You have not enough rights to access/manipulate this resource";
869
+ }, {
870
+ readonly code: "005.013.0001";
871
+ readonly error: "wave.engine.not.cached";
872
+ readonly message: "Wave Engine ::version:: was not found in cache";
873
+ }, {
874
+ readonly code: "005.013.0002";
875
+ readonly error: "wave.catalog.not.cached";
876
+ readonly message: "Requested Wave Catalog with hash ::hash:: is missing from the cache";
869
877
  }, {
870
878
  readonly code: "005.014.0003";
871
879
  readonly error: "stream.cache.not.found";
@@ -1088,6 +1088,16 @@ exports.ErrorCodes = [
1088
1088
  error: "insufficient.rights",
1089
1089
  message: "You have not enough rights to access/manipulate this resource"
1090
1090
  },
1091
+ {
1092
+ code: "005.013.0001",
1093
+ error: "wave.engine.not.cached",
1094
+ message: "Wave Engine ::version:: was not found in cache"
1095
+ },
1096
+ {
1097
+ code: "005.013.0002",
1098
+ error: "wave.catalog.not.cached",
1099
+ message: "Requested Wave Catalog with hash ::hash:: is missing from the cache"
1100
+ },
1091
1101
  {
1092
1102
  code: "005.014.0003",
1093
1103
  error: "stream.cache.not.found",
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hcloud-sdk",
3
- "version": "22.11.0",
3
+ "version": "22.13.0",
4
4
  "description": "hcloud platform sdk",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",