@hahnpro/hpc-api 2026.1.0 → 2026.1.2

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,12 @@
1
1
  # @hahnpro/hpc-api
2
2
 
3
+ ## 2026.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated Endpoint, TimeSeries and Vault Interfaces
8
+ - Added arbitrary options to FlowDeploymentService::updateOne(...) method
9
+
3
10
  ## 2026.1.0
4
11
 
5
12
  - Updated Task Interface
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/hpc-api",
3
- "version": "2026.1.0",
3
+ "version": "2026.1.2",
4
4
  "description": "Module for easy access to the HahnPRO Cloud API",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@microsoft/fetch-event-source": "2.0.1",
12
- "axios": "1.13.2",
12
+ "axios": "1.13.4",
13
13
  "eventsource": "4.1.0",
14
14
  "jose": "5.10.0",
15
15
  "jwt-decode": "4.0.0",
@@ -1,3 +1,5 @@
1
+ import { Author } from './author.interface';
2
+ import { Owner } from './owner.interface';
1
3
  export interface Endpoint {
2
4
  id?: string;
3
5
  name: string;
@@ -14,6 +16,12 @@ export interface Endpoint {
14
16
  nbOfNotificationsBetweenPauseInterval: number;
15
17
  readPermissions: string[];
16
18
  readWritePermissions: string[];
19
+ owner?: Owner;
20
+ createdBy?: Author;
21
+ updatedBy?: Author;
22
+ createdAt?: string;
23
+ updatedAt?: string;
24
+ deletedAt?: string;
17
25
  }
18
26
  export interface EndpointLog {
19
27
  id?: string;
@@ -19,7 +19,7 @@ export type { NotificationRule, StatusRule, TagRule } from './notification-rule.
19
19
  export type { Notification, NotificationType } from './notification.interface';
20
20
  export type { OrganizationRoleRepresentation } from './organization-role-representation.interface';
21
21
  export { OrganizationMembersInviteOrAdd } from './organization.interface';
22
- export type { Organization, OrganizationCreateDto, OrganizationData, OrganizationDataKind, OrganizationDomain, OrganizationExtraProperties, OrganizationName, OrganizationRolesAdjustment, OrganizationSearchQuery, SubscriptionType, UserWithOrgRoles, } from './organization.interface';
22
+ export type { Organization, CreateOrganizationDto, OrganizationData, OrganizationDataKind, OrganizationDomain, OrganizationExtraProperties, OrganizationName, OrganizationRolesAdjustment, OrganizationSearchQuery, SubscriptionType, UserWithOrgRoles, } from './organization.interface';
23
23
  export type { CreateOrgWithResourcesDto, OrganizationResourcesProgress, OrganizationResourcesProgressDto, OrganizationResourcesProgressErrorDto, } from './organizations-resources.interface';
24
24
  export type { Owner } from './owner.interface';
25
25
  export type { DeleteAssetQuery, DeleteAssetTypeQuery, DeleteQuery } from './query.interface';
@@ -29,7 +29,7 @@ export type { SearchOptions, SearchResult, SearchSortOption, SortableField } fro
29
29
  export type { Secret } from './secret.interface';
30
30
  export type { ServerSentEvent } from './sse.interface';
31
31
  export type { Artifact, FileType, Storage, StorageProvider } from './storage.interface';
32
- export type { LogbookEntry, LogbookEntryDto, Task } from './task.interface';
32
+ export type { LogbookEntry, LogbookEntryDto, Task, Assignee } from './task.interface';
33
33
  export type { TimeSeries, TimeSeriesBucket, TimeSeriesCondition, TimeSeriesValue, TS_GROUPS } from './timeseries.interface';
34
34
  export type { Application, Consent, Permission, TableSetting, TableSettingProfile, UserSettings } from './user-settings.interface';
35
35
  export type { VaultSecret } from './vault.interface';
@@ -39,4 +39,4 @@ export { instanceOfTimePeriod } from './data.interface';
39
39
  export { LABEL_COLORS } from './label.interface';
40
40
  export { OwnerType } from './owner.interface';
41
41
  export { PermissionType, ResourceType, ResourceApiPath, resourceApiPathToTypeMap } from './resource.interface';
42
- export { Priority, TaskStatus } from './task.interface';
42
+ export { Priority, TaskStatus, AssigneeType } from './task.interface';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TaskStatus = exports.Priority = exports.resourceApiPathToTypeMap = exports.ResourceApiPath = exports.ResourceType = exports.PermissionType = exports.OwnerType = exports.LABEL_COLORS = exports.instanceOfTimePeriod = exports.ReturnType = exports.AlertType = exports.AlertLevel = exports.OrganizationMembersInviteOrAdd = void 0;
3
+ exports.AssigneeType = exports.TaskStatus = exports.Priority = exports.resourceApiPathToTypeMap = exports.ResourceApiPath = exports.ResourceType = exports.PermissionType = exports.OwnerType = exports.LABEL_COLORS = exports.instanceOfTimePeriod = exports.ReturnType = exports.AlertType = exports.AlertLevel = exports.OrganizationMembersInviteOrAdd = void 0;
4
4
  var organization_interface_1 = require("./organization.interface");
5
5
  Object.defineProperty(exports, "OrganizationMembersInviteOrAdd", { enumerable: true, get: function () { return organization_interface_1.OrganizationMembersInviteOrAdd; } });
6
6
  var alert_interface_1 = require("./alert.interface");
@@ -22,3 +22,4 @@ Object.defineProperty(exports, "resourceApiPathToTypeMap", { enumerable: true, g
22
22
  var task_interface_1 = require("./task.interface");
23
23
  Object.defineProperty(exports, "Priority", { enumerable: true, get: function () { return task_interface_1.Priority; } });
24
24
  Object.defineProperty(exports, "TaskStatus", { enumerable: true, get: function () { return task_interface_1.TaskStatus; } });
25
+ Object.defineProperty(exports, "AssigneeType", { enumerable: true, get: function () { return task_interface_1.AssigneeType; } });
@@ -20,7 +20,7 @@ export interface Organization extends Api {
20
20
  deletionRequested?: boolean;
21
21
  isSuperOrganization?: boolean;
22
22
  }
23
- export interface OrganizationCreateDto {
23
+ export interface CreateOrganizationDto {
24
24
  name: string;
25
25
  description?: string;
26
26
  domains?: string[];
@@ -1,4 +1,12 @@
1
1
  import { Api, Author } from '.';
2
+ export declare enum AssigneeType {
3
+ USER = "user",
4
+ ORG = "org"
5
+ }
6
+ export interface Assignee {
7
+ id: string;
8
+ type: AssigneeType;
9
+ }
2
10
  export declare enum TaskStatus {
3
11
  OPENED = "OPENED",
4
12
  CLOSED = "CLOSED",
@@ -22,7 +30,6 @@ export interface Task extends Api {
22
30
  description?: string;
23
31
  priority: Priority;
24
32
  tags?: string[];
25
- author?: string;
26
33
  readPermissions: string[];
27
34
  readWritePermissions: string[];
28
35
  assetRef?: string;
@@ -35,9 +42,9 @@ export interface Task extends Api {
35
42
  parent?: string;
36
43
  parent$name?: string;
37
44
  subTasks?: string[];
38
- assignedTo: string[];
39
- status?: TaskStatus;
45
+ assignedTo: Assignee[];
40
46
  acceptedBy?: string;
47
+ status?: TaskStatus;
41
48
  reason?: string;
42
49
  statusHistoryLog?: TaskStatus[];
43
50
  logbookSchema?: string;
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Priority = exports.TaskStatus = void 0;
3
+ exports.Priority = exports.TaskStatus = exports.AssigneeType = void 0;
4
+ var AssigneeType;
5
+ (function (AssigneeType) {
6
+ AssigneeType["USER"] = "user";
7
+ AssigneeType["ORG"] = "org";
8
+ })(AssigneeType || (exports.AssigneeType = AssigneeType = {}));
4
9
  var TaskStatus;
5
10
  (function (TaskStatus) {
6
11
  TaskStatus["OPENED"] = "OPENED";
@@ -1,3 +1,5 @@
1
+ import { Author } from './author.interface';
2
+ import { Owner } from './owner.interface';
1
3
  export interface TimeSeries {
2
4
  id?: string;
3
5
  name: string;
@@ -15,6 +17,11 @@ export interface TimeSeries {
15
17
  autoDelData: Date;
16
18
  autoDelBucket: Date;
17
19
  metadata?: Record<string, any>;
20
+ owner?: Owner;
21
+ createdBy?: Author;
22
+ updatedBy?: Author;
23
+ createdAt?: string;
24
+ updatedAt?: string;
18
25
  deletedAt?: string;
19
26
  }
20
27
  export interface TimeSeriesCondition {
@@ -1,3 +1,5 @@
1
+ import { Author } from './author.interface';
2
+ import { Owner } from './owner.interface';
1
3
  export interface VaultSecret {
2
4
  id?: string;
3
5
  name: string;
@@ -6,5 +8,8 @@ export interface VaultSecret {
6
8
  version?: number;
7
9
  readPermissions: string[];
8
10
  readWritePermissions: string[];
11
+ owner?: Owner;
12
+ createdBy?: Author;
13
+ updatedBy?: Author;
9
14
  updatedAt?: string;
10
15
  }
@@ -26,6 +26,7 @@ class MockAPI {
26
26
  readPermissions: v.readPermissions ?? [],
27
27
  readWritePermissions: v.readWritePermissions ?? [],
28
28
  type: assetTypes[index],
29
+ attachments: [],
29
30
  }));
30
31
  const assetRevisions1 = assetRevisions.map((v, index) => ({
31
32
  ...v,
@@ -1,6 +1,6 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { APIBaseMock, OrganizationsMockService } from '.';
3
- import { Filter, Organization, OrganizationCreateDto, OrganizationResourcesProgress, OrganizationSearchQuery, Paginated, RequestParameter, ServerSentEvent, SubscriptionType, UserWithOrgRoles } from '../interfaces';
3
+ import { CreateOrganizationDto, Filter, Organization, OrganizationResourcesProgress, OrganizationSearchQuery, Paginated, RequestParameter, ServerSentEvent, SubscriptionType, UserWithOrgRoles } from '../interfaces';
4
4
  import { OrganizationsAdministrationService } from '../services';
5
5
  export declare class OrganizationsAdministrationMockService extends APIBaseMock<Organization> implements OrganizationsAdministrationService {
6
6
  private readonly organizationMockService;
@@ -14,6 +14,6 @@ export declare class OrganizationsAdministrationMockService extends APIBaseMock<
14
14
  getMany(params?: RequestParameter): Promise<Paginated<Organization>>;
15
15
  getManyFiltered(filter: Filter, params?: RequestParameter): Promise<Paginated<Organization>>;
16
16
  search(query: OrganizationSearchQuery): Promise<Organization[]>;
17
- createOrganization(organizationCreateDto: OrganizationCreateDto, emailsToInvite: string[], emailsToAdd: string[], createOrgAsOwner?: boolean): Promise<Organization>;
17
+ createOrganization(organizationCreateDto: CreateOrganizationDto, usersWithOrgRolesToInvite: UserWithOrgRoles[], usersWithOrgRolesToAdd: UserWithOrgRoles[], createOrgAsOwner?: boolean): Promise<Organization>;
18
18
  getOrganizationDeletionProgress(organizationId: string): Observable<ServerSentEvent<OrganizationResourcesProgress>>;
19
19
  }
@@ -76,9 +76,9 @@ class OrganizationsAdministrationMockService extends _1.APIBaseMock {
76
76
  async search(query) {
77
77
  return Promise.resolve(this.data.filter((entry) => entry.name === query.name || entry.name.startsWith(query.name)));
78
78
  }
79
- createOrganization(organizationCreateDto, emailsToInvite, emailsToAdd, createOrgAsOwner = false) {
79
+ createOrganization(organizationCreateDto, usersWithOrgRolesToInvite, usersWithOrgRolesToAdd, createOrgAsOwner = false) {
80
80
  if (!organizationCreateDto?.name ||
81
- ([...emailsToInvite, ...emailsToAdd].length === 0 && !createOrgAsOwner) ||
81
+ ([...usersWithOrgRolesToInvite, ...usersWithOrgRolesToAdd].length === 0 && !createOrgAsOwner) ||
82
82
  this.data.some((org) => org.name === organizationCreateDto.name)) {
83
83
  return Promise.reject('Bad Request');
84
84
  }
@@ -1,12 +1,12 @@
1
1
  import { APIBaseMock } from '.';
2
- import { KeycloakProfile, Organization, OrganizationCreateDto, OrganizationData, OrganizationDataKind, OrganizationName, OrganizationRolesAdjustment } from '../interfaces';
2
+ import { CreateOrganizationDto, KeycloakProfile, Organization, OrganizationData, OrganizationDataKind, OrganizationName, OrganizationRolesAdjustment } from '../interfaces';
3
3
  import { OrganizationsService } from '../services';
4
4
  import { OrganizationRoleRepresentation } from '../services/organizations.service';
5
5
  export declare class OrganizationsMockService extends APIBaseMock<Organization> implements OrganizationsService {
6
6
  constructor(organizations: Organization[]);
7
- addOrganizationInvitation(id: string, email: string, roles: string[]): Promise<void>;
7
+ inviteUser(id: string, email: string, roles: string[]): Promise<void>;
8
8
  getOrganizationIdByName(name: string): Promise<OrganizationName>;
9
- addOne(dto: OrganizationCreateDto): Promise<Organization>;
9
+ addOne(dto: CreateOrganizationDto): Promise<Organization>;
10
10
  getOneCombined(id: string): Promise<Organization>;
11
11
  addOrganizationRole(id: string, roleDto: OrganizationRoleRepresentation): Promise<OrganizationRoleRepresentation[]>;
12
12
  checkForOrganizationUniqueness(name: string): Promise<void>;
@@ -14,7 +14,7 @@ export declare class OrganizationsMockService extends APIBaseMock<Organization>
14
14
  getActiveOrganizationOfUser(): Promise<Organization>;
15
15
  getMyOrganizations(): Promise<Organization[]>;
16
16
  getOrganizationData(id: string, kinds?: OrganizationDataKind[]): Promise<OrganizationData>;
17
- getOrganizationMemberById(id: string, userId: string): Promise<KeycloakProfile>;
17
+ getMemberById(id: string, userId: string): Promise<KeycloakProfile>;
18
18
  getOrganizationNamesByIds(ids: string[]): Promise<OrganizationName[]>;
19
19
  getUserOrganizationRoles(ids: string[], userId: string): Promise<Record<string, OrganizationRoleRepresentation[]>>;
20
20
  getUserOrganizations(userId: string): Promise<Organization[]>;
@@ -8,7 +8,7 @@ class OrganizationsMockService extends _1.APIBaseMock {
8
8
  super(null);
9
9
  this.data = organizations;
10
10
  }
11
- addOrganizationInvitation(id, email, roles) {
11
+ inviteUser(id, email, roles) {
12
12
  if (!id || !email || !roles?.length) {
13
13
  return Promise.reject('Bad Request');
14
14
  }
@@ -50,7 +50,7 @@ class OrganizationsMockService extends _1.APIBaseMock {
50
50
  getOrganizationData(id, kinds) {
51
51
  return Promise.resolve(undefined);
52
52
  }
53
- getOrganizationMemberById(id, userId) {
53
+ getMemberById(id, userId) {
54
54
  return Promise.resolve(undefined);
55
55
  }
56
56
  getOrganizationNamesByIds(ids) {
@@ -11,6 +11,7 @@ export declare class FlowDeploymentService extends BaseService {
11
11
  addMany(dto: any[], options?: TokenOption): Promise<FlowDeployment[]>;
12
12
  updateOne(id: string, dto: any, options?: TokenOption & {
13
13
  force: boolean;
14
+ [key: string]: any;
14
15
  }): Promise<FlowDeployment>;
15
16
  getDeploymentStatistics(id: string, options?: TokenOption): Promise<FlowDeploymentStatistic>;
16
17
  getDeploymentMetrics(id: string, range?: string, interval?: string, options?: TokenOption): Promise<FlowDeploymentMetrics>;
@@ -1,6 +1,6 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { APIBase } from '../api-base';
3
- import { Filter, Organization, OrganizationCreateDto, OrganizationResourcesProgress, OrganizationSearchQuery, Paginated, RequestParameter, ServerSentEvent, SubscriptionType, UserWithOrgRoles } from '../interfaces';
3
+ import { CreateOrganizationDto, Filter, Organization, OrganizationResourcesProgress, OrganizationSearchQuery, Paginated, RequestParameter, ServerSentEvent, SubscriptionType, UserWithOrgRoles } from '../interfaces';
4
4
  import { HttpClientService } from './';
5
5
  /**
6
6
  * Service for managing organizations with administrative privileges (superuser role required).
@@ -41,13 +41,13 @@ export declare class OrganizationsAdministrationService extends APIBase {
41
41
  * Creates an organization with a free subscription and invites or adds a user to it.
42
42
  * The owner of the organization can be either the user or the service account 'organization-client', depending on the 'createOrgAsOwner' flag in the OrganizationCreateFlowDto.
43
43
  *
44
- * @param {OrganizationCreateDto} organizationCreateDto - The data transfer object containing the organization details for creation
45
- * @param {string[]} emailsToInvite - The email addresses of the users to be invited to the organization
46
- * @param {string[]} emailsToAdd - The email addresses of the users to be added without an invitation to the organization
44
+ * @param {CreateOrganizationDto} createOrganizationDto - The data transfer object containing the organization details for creation
45
+ * @param {UserWithOrgRoles[]} usersWithOrgRolesToInvite - The email addresses with the individual org roles of the users to be invited to the organization
46
+ * @param {UserWithOrgRoles[]} usersWithOrgRolesToAdd - The email addresses with the individual org roles of the users to be added without an invitation to the organization
47
47
  * @param {boolean} createOrgAsOwner - Whether to create the organization with the user as the owner
48
48
  * @returns {Promise<Organization>} - An promise of the created organization
49
49
  */
50
- createOrganization(organizationCreateDto: OrganizationCreateDto, emailsToInvite: string[], emailsToAdd: string[], createOrgAsOwner?: boolean): Promise<Organization>;
50
+ createOrganization(createOrganizationDto: CreateOrganizationDto, usersWithOrgRolesToInvite: UserWithOrgRoles[], usersWithOrgRolesToAdd: UserWithOrgRoles[], createOrgAsOwner?: boolean): Promise<Organization>;
51
51
  addOrganizationMembers(id: string, usersWithOrgRoles: UserWithOrgRoles[]): Promise<void>;
52
52
  addSubscriptionToOrganization(id: string, type: SubscriptionType): Promise<Organization>;
53
53
  /**
@@ -56,17 +56,17 @@ class OrganizationsAdministrationService extends api_base_1.APIBase {
56
56
  * Creates an organization with a free subscription and invites or adds a user to it.
57
57
  * The owner of the organization can be either the user or the service account 'organization-client', depending on the 'createOrgAsOwner' flag in the OrganizationCreateFlowDto.
58
58
  *
59
- * @param {OrganizationCreateDto} organizationCreateDto - The data transfer object containing the organization details for creation
60
- * @param {string[]} emailsToInvite - The email addresses of the users to be invited to the organization
61
- * @param {string[]} emailsToAdd - The email addresses of the users to be added without an invitation to the organization
59
+ * @param {CreateOrganizationDto} createOrganizationDto - The data transfer object containing the organization details for creation
60
+ * @param {UserWithOrgRoles[]} usersWithOrgRolesToInvite - The email addresses with the individual org roles of the users to be invited to the organization
61
+ * @param {UserWithOrgRoles[]} usersWithOrgRolesToAdd - The email addresses with the individual org roles of the users to be added without an invitation to the organization
62
62
  * @param {boolean} createOrgAsOwner - Whether to create the organization with the user as the owner
63
63
  * @returns {Promise<Organization>} - An promise of the created organization
64
64
  */
65
- createOrganization(organizationCreateDto, emailsToInvite, emailsToAdd, createOrgAsOwner = false) {
65
+ createOrganization(createOrganizationDto, usersWithOrgRolesToInvite, usersWithOrgRolesToAdd, createOrgAsOwner = false) {
66
66
  return this.httpClient.post(`${this.basePath}/create-org`, {
67
- organizationDto: organizationCreateDto,
68
- emailsToInvite,
69
- emailsToAdd,
67
+ createOrganizationDto,
68
+ usersWithOrgRolesToInvite,
69
+ usersWithOrgRolesToAdd,
70
70
  createOrgAsOwner,
71
71
  });
72
72
  }
@@ -1,5 +1,5 @@
1
1
  import { APIBase } from '../api-base';
2
- import { KeycloakProfile, Organization, OrganizationCreateDto, OrganizationData, OrganizationDataKind, OrganizationName, OrganizationRolesAdjustment } from '../interfaces';
2
+ import { CreateOrganizationDto, KeycloakProfile, Organization, OrganizationData, OrganizationDataKind, OrganizationName, OrganizationRolesAdjustment } from '../interfaces';
3
3
  import { HttpClientService } from './';
4
4
  export declare class OrganizationsService extends APIBase {
5
5
  constructor(httpClientClient: HttpClientService);
@@ -9,7 +9,7 @@ export declare class OrganizationsService extends APIBase {
9
9
  * @param dto organization information
10
10
  * @returns newly created organization
11
11
  */
12
- addOne(dto: OrganizationCreateDto): Promise<Organization>;
12
+ addOne(dto: CreateOrganizationDto): Promise<Organization>;
13
13
  /**
14
14
  * Invite a user to an organization.
15
15
  *
@@ -18,7 +18,7 @@ export declare class OrganizationsService extends APIBase {
18
18
  * @param roles roles (names) which the user should get in the organization
19
19
  * @returns newly created invitation
20
20
  */
21
- addOrganizationInvitation(id: string, email: string, roles: string[]): Promise<void>;
21
+ inviteUser(id: string, email: string, roles: string[]): Promise<void>;
22
22
  /**
23
23
  * Add organization role to an organization.
24
24
  *
@@ -104,7 +104,7 @@ export declare class OrganizationsService extends APIBase {
104
104
  * @param {string} userId - user id of requested member
105
105
  * @returns {Promise<KeycloakProfile>} member
106
106
  */
107
- getOrganizationMemberById(id: string, userId: string): Promise<KeycloakProfile>;
107
+ getMemberById(id: string, userId: string): Promise<KeycloakProfile>;
108
108
  /**
109
109
  * Returns the names of organizations with the provided ids.
110
110
  *
@@ -23,7 +23,7 @@ class OrganizationsService extends api_base_1.APIBase {
23
23
  * @param roles roles (names) which the user should get in the organization
24
24
  * @returns newly created invitation
25
25
  */
26
- addOrganizationInvitation(id, email, roles) {
26
+ inviteUser(id, email, roles) {
27
27
  return this.httpClient.post(`${this.basePath}/${id}/data/invitations`, { roles, email });
28
28
  }
29
29
  /**
@@ -134,8 +134,8 @@ class OrganizationsService extends api_base_1.APIBase {
134
134
  * @param {string} userId - user id of requested member
135
135
  * @returns {Promise<KeycloakProfile>} member
136
136
  */
137
- getOrganizationMemberById(id, userId) {
138
- return this.httpClient.get(`${this.basePath}/${id}/data/employees/${userId}`);
137
+ getMemberById(id, userId) {
138
+ return this.httpClient.get(`${this.basePath}/${id}/data/members/${userId}`);
139
139
  }
140
140
  /**
141
141
  * Returns the names of organizations with the provided ids.