hcloud-sdk 22.47.0 → 22.48.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.47.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v22.46.0...v22.47.0) (2026-10-05)
1
+ ## [22.48.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v22.47.0...v22.48.0) (2026-10-05)
2
2
 
3
3
  ### Features
4
4
 
5
- * add pool execute subject ([9024875](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/9024875f030bd8ef190b1f9f8aa3fb9fb7efc697))
5
+ * reflect changes made in high5 ([af4a2a1](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/af4a2a1a89937f24f72b5e163d099b1fc0c6a1de))
@@ -1,5 +1,5 @@
1
1
  import { HCloud } from "../../../../Hcloud";
2
- import { ReducedSpace } from "../../../global";
2
+ import { PaginatedResponse, ReducedSpace } from "../../../global";
3
3
  import { ReducedOrganization, ReducedUser } from "../../../idp";
4
4
  import { WaveCatalog, WaveEngine } from "../../wave";
5
5
  import { ReducedEvent } from "../event";
@@ -159,6 +159,27 @@ export interface High5ExecutionStatus {
159
159
  startTime?: number;
160
160
  currentRetry?: number;
161
161
  assignedClient?: string;
162
+ /**
163
+ * Plaintext payload data of the execution, only set when searching execution states by payload
164
+ * (filter keys "payload" or "payload.<path>"). JSON payloads are returned as JSON value, generic payloads as string.
165
+ */
166
+ payload?: unknown;
167
+ }
168
+ /**
169
+ * Response of an execution state search. Searches with payload filters count at most 1000 matches,
170
+ * a higher number of matches is reported with total = 1000 and totalCapped = true.
171
+ */
172
+ export interface High5ExecutionStatusSearchResponse extends PaginatedResponse<High5ExecutionStatus> {
173
+ /** True if total holds the capped count of a payload search instead of the exact number of matches */
174
+ totalCapped: boolean;
175
+ }
176
+ /**
177
+ * Response of a full execution state search by payload, which considers all executions but skips the count
178
+ */
179
+ export interface High5ExecutionStatusFullSearchResponse {
180
+ items: High5ExecutionStatus[];
181
+ /** True if a next page exists */
182
+ hasMore: boolean;
162
183
  }
163
184
  export interface High5ExecutionLog {
164
185
  _id: string;
@@ -1,20 +1,46 @@
1
1
  import Base, { MaybeRaw } from "../../../../Base";
2
- import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
3
- import { High5ExecutionStatus } from "../../../../interfaces/high5/space/execution";
2
+ import { SearchParams } from "../../../../interfaces/global";
3
+ import { High5ExecutionStatusFullSearchResponse, High5ExecutionStatusSearchResponse } from "../../../../interfaces/high5/space/execution";
4
4
  export declare class High5OrganizationExecutionStates extends Base {
5
5
  /**
6
- * Retrieves all stream execution logs for a given execution inside an organization.
6
+ * Retrieves the stream execution states of an organization.
7
+ *
8
+ * Besides the fields of the execution state, filters can target the payload of the execution:
9
+ * - `payload.<path>` filters JSON payloads by the value at the given property path, e.g. `payload.user.id`.
10
+ * `is` matches the exact value (numbers and booleans keep their type), `starts with` is case-sensitive, `contains` and `ends with` are case-insensitive.
11
+ * - `payload` with `contains` is a case-insensitive text search over all string values of the payload. A single word only matches
12
+ * whole words, values with separators are searched as phrase. Only the newest 10000 matching executions are considered,
13
+ * use {@link fullSearchExecutionStates} to consider all of them.
14
+ *
15
+ * When filtering by payload, each state contains the `payload` of its execution and the total is capped at 1000 (see `totalCapped`).
7
16
  * @param orgName Name of the Organization
8
17
  * @param filters (optional) Array of search filters
9
18
  * @param sorting (optional) Sorting object
10
19
  * @param limit (optional) Max number of results (1-100; defaults to 25)
11
20
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
12
- * @returns Object containing an array of Stream execution logs as well as the total number of results
21
+ * @returns Object containing an array of Stream execution states, the total number of results and whether the total is capped
13
22
  */
14
23
  searchExecutionStates<R extends boolean = false>({ orgName, filters, sorting, limit, page }: SearchParams & {
15
24
  orgName: string;
16
25
  }, raw?: {
17
26
  raw: R;
18
- }): Promise<MaybeRaw<R, PaginatedResponse<High5ExecutionStatus>>>;
27
+ }): Promise<MaybeRaw<R, High5ExecutionStatusSearchResponse>>;
28
+ /**
29
+ * Retrieves the stream execution states of an organization by payload, considering all executions without limits.
30
+ * The count is skipped, so instead of a total the response tells whether a next page exists. Takes the same filters as
31
+ * {@link searchExecutionStates}, but can take considerably longer for payload filters matching many executions.
32
+ * Searches without payload filters behave like {@link searchExecutionStates}.
33
+ * @param orgName Name of the Organization
34
+ * @param filters (optional) Array of search filters
35
+ * @param sorting (optional) Sorting object
36
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
37
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
38
+ * @returns Object containing an array of Stream execution states and whether a next page exists
39
+ */
40
+ fullSearchExecutionStates<R extends boolean = false>({ orgName, filters, sorting, limit, page }: SearchParams & {
41
+ orgName: string;
42
+ }, raw?: {
43
+ raw: R;
44
+ }): Promise<MaybeRaw<R, High5ExecutionStatusFullSearchResponse>>;
19
45
  protected getEndpoint(endpoint: string): string;
20
46
  }
@@ -18,13 +18,22 @@ const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseH
18
18
  const searchFilter_1 = require("../../../../helper/searchFilter");
19
19
  class High5OrganizationExecutionStates extends Base_1.default {
20
20
  /**
21
- * Retrieves all stream execution logs for a given execution inside an organization.
21
+ * Retrieves the stream execution states of an organization.
22
+ *
23
+ * Besides the fields of the execution state, filters can target the payload of the execution:
24
+ * - `payload.<path>` filters JSON payloads by the value at the given property path, e.g. `payload.user.id`.
25
+ * `is` matches the exact value (numbers and booleans keep their type), `starts with` is case-sensitive, `contains` and `ends with` are case-insensitive.
26
+ * - `payload` with `contains` is a case-insensitive text search over all string values of the payload. A single word only matches
27
+ * whole words, values with separators are searched as phrase. Only the newest 10000 matching executions are considered,
28
+ * use {@link fullSearchExecutionStates} to consider all of them.
29
+ *
30
+ * When filtering by payload, each state contains the `payload` of its execution and the total is capped at 1000 (see `totalCapped`).
22
31
  * @param orgName Name of the Organization
23
32
  * @param filters (optional) Array of search filters
24
33
  * @param sorting (optional) Sorting object
25
34
  * @param limit (optional) Max number of results (1-100; defaults to 25)
26
35
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
27
- * @returns Object containing an array of Stream execution logs as well as the total number of results
36
+ * @returns Object containing an array of Stream execution states, the total number of results and whether the total is capped
28
37
  */
29
38
  searchExecutionStates(_a, raw_1) {
30
39
  return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0 }, raw) {
@@ -33,7 +42,34 @@ class High5OrganizationExecutionStates extends Base_1.default {
33
42
  filters: filtersDTO,
34
43
  sorting: sorting,
35
44
  });
36
- return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
45
+ const data = Object.assign(Object.assign({}, (0, paginatedResponseHelper_1.createPaginatedResponse)(resp)), { totalCapped: resp.headers["total-capped"] === "true" });
46
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data }) : data);
47
+ });
48
+ }
49
+ /**
50
+ * Retrieves the stream execution states of an organization by payload, considering all executions without limits.
51
+ * The count is skipped, so instead of a total the response tells whether a next page exists. Takes the same filters as
52
+ * {@link searchExecutionStates}, but can take considerably longer for payload filters matching many executions.
53
+ * Searches without payload filters behave like {@link searchExecutionStates}.
54
+ * @param orgName Name of the Organization
55
+ * @param filters (optional) Array of search filters
56
+ * @param sorting (optional) Sorting object
57
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
58
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
59
+ * @returns Object containing an array of Stream execution states and whether a next page exists
60
+ */
61
+ fullSearchExecutionStates(_a, raw_1) {
62
+ return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0 }, raw) {
63
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
64
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/execution/status/search?page=${page}&limit=${limit}&fullSearch=true`), {
65
+ filters: filtersDTO,
66
+ sorting: sorting,
67
+ });
68
+ // searches without payload filters are not full searches and report a total instead
69
+ const hasMoreHeader = resp.headers["has-more"];
70
+ const hasMore = hasMoreHeader !== undefined ? hasMoreHeader === "true" : (page + 1) * limit < parseInt(String(resp.headers["total"]), 10);
71
+ const data = { items: resp.data, hasMore };
72
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data }) : data);
37
73
  });
38
74
  }
39
75
  getEndpoint(endpoint) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hcloud-sdk",
3
- "version": "22.47.0",
3
+ "version": "22.48.0",
4
4
  "description": "hcloud platform sdk",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",