@hahnpro/hpc-api 2025.11.4 → 2025.12.1

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/package.json +2 -2
  3. package/src/lib/api.d.ts +3 -0
  4. package/src/lib/api.js +2 -1
  5. package/src/lib/interfaces/index.d.ts +19 -18
  6. package/src/lib/interfaces/index.js +4 -1
  7. package/src/lib/interfaces/organization.interface.d.ts +4 -0
  8. package/src/lib/interfaces/organization.interface.js +6 -0
  9. package/src/lib/interfaces/resource.interface.d.ts +21 -0
  10. package/src/lib/interfaces/resource.interface.js +7 -1
  11. package/src/lib/mock/alert.mock.service.d.ts +2 -2
  12. package/src/lib/mock/alert.mock.service.js +2 -2
  13. package/src/lib/mock/asset.mock.service.d.ts +3 -2
  14. package/src/lib/mock/asset.mock.service.js +2 -1
  15. package/src/lib/mock/assetTypes.mock.service.d.ts +3 -2
  16. package/src/lib/mock/assetTypes.mock.service.js +2 -1
  17. package/src/lib/mock/content.mock.service.d.ts +3 -2
  18. package/src/lib/mock/content.mock.service.js +2 -1
  19. package/src/lib/mock/endpoint.mock.service.d.ts +2 -2
  20. package/src/lib/mock/endpoint.mock.service.js +2 -2
  21. package/src/lib/mock/event.mock.service.d.ts +2 -2
  22. package/src/lib/mock/event.mock.service.js +2 -2
  23. package/src/lib/mock/flow-deployment.mock.service.d.ts +3 -2
  24. package/src/lib/mock/flow-deployment.mock.service.js +2 -1
  25. package/src/lib/mock/flow-functions.mock.service.d.ts +2 -2
  26. package/src/lib/mock/flow-functions.mock.service.js +2 -2
  27. package/src/lib/mock/flow-modules.mock.service.d.ts +3 -2
  28. package/src/lib/mock/flow-modules.mock.service.js +2 -2
  29. package/src/lib/mock/flow.mock.service.d.ts +3 -2
  30. package/src/lib/mock/flow.mock.service.js +2 -1
  31. package/src/lib/mock/index.d.ts +5 -4
  32. package/src/lib/mock/index.js +10 -8
  33. package/src/lib/mock/notification-rules.mock.service.d.ts +2 -2
  34. package/src/lib/mock/notification-rules.mock.service.js +2 -2
  35. package/src/lib/mock/organizations-administration.mock.service.d.ts +5 -3
  36. package/src/lib/mock/organizations-administration.mock.service.js +6 -3
  37. package/src/lib/mock/organizations-resources.mock.service.d.ts +0 -1
  38. package/src/lib/mock/organizations-resources.mock.service.js +0 -3
  39. package/src/lib/mock/share.mock.service.d.ts +9 -0
  40. package/src/lib/mock/share.mock.service.js +19 -0
  41. package/src/lib/mock/task.mock.service.d.ts +3 -2
  42. package/src/lib/mock/task.mock.service.js +2 -1
  43. package/src/lib/mock/timeseries.mock.service.d.ts +3 -2
  44. package/src/lib/mock/timeseries.mock.service.js +2 -1
  45. package/src/lib/services/alert.service.d.ts +3 -2
  46. package/src/lib/services/alert.service.js +2 -2
  47. package/src/lib/services/asset.service.d.ts +3 -2
  48. package/src/lib/services/asset.service.js +2 -1
  49. package/src/lib/services/assettypes.service.d.ts +4 -2
  50. package/src/lib/services/assettypes.service.js +3 -2
  51. package/src/lib/services/content.service.d.ts +3 -2
  52. package/src/lib/services/content.service.js +2 -1
  53. package/src/lib/services/endpoint.service.d.ts +3 -2
  54. package/src/lib/services/endpoint.service.js +2 -2
  55. package/src/lib/services/event.service.d.ts +3 -2
  56. package/src/lib/services/event.service.js +2 -2
  57. package/src/lib/services/flow-deployment.service.d.ts +3 -2
  58. package/src/lib/services/flow-deployment.service.js +2 -1
  59. package/src/lib/services/flow-function.service.d.ts +3 -2
  60. package/src/lib/services/flow-function.service.js +2 -2
  61. package/src/lib/services/flow-module.service.d.ts +3 -2
  62. package/src/lib/services/flow-module.service.js +2 -2
  63. package/src/lib/services/flow.service.d.ts +3 -2
  64. package/src/lib/services/flow.service.js +2 -1
  65. package/src/lib/services/http-client.service.d.ts +3 -1
  66. package/src/lib/services/http-client.service.js +24 -14
  67. package/src/lib/services/index.d.ts +1 -0
  68. package/src/lib/services/index.js +3 -1
  69. package/src/lib/services/notification-rule.service.d.ts +3 -2
  70. package/src/lib/services/notification-rule.service.js +2 -2
  71. package/src/lib/services/organizations-administration.service.d.ts +19 -8
  72. package/src/lib/services/organizations-administration.service.js +22 -8
  73. package/src/lib/services/organizations-resources.service.d.ts +0 -8
  74. package/src/lib/services/organizations-resources.service.js +2 -12
  75. package/src/lib/services/share.service.d.ts +7 -0
  76. package/src/lib/services/share.service.js +16 -0
  77. package/src/lib/services/task.service.d.ts +3 -2
  78. package/src/lib/services/task.service.js +3 -2
  79. package/src/lib/services/timeseries.service.d.ts +3 -2
  80. package/src/lib/services/timeseries.service.js +2 -1
@@ -28,14 +28,6 @@ export declare class OrganizationsResourcesService extends APIBase {
28
28
  * @returns {Promise<string>} A promise that resolves to the id of the resource deletion task.
29
29
  */
30
30
  deleteResourcesForOrganization(organizationId: string): Promise<string>;
31
- /**
32
- * Subscribes to server-sent events to receive real-time progress updates on the resource tasks for a specific organization.
33
- *
34
- * @param {string} organizationId - The ID of the organization to monitor the resources progress updates for.
35
- * @param {string} path - The API path segment for the SSE endpoint
36
- * @returns {Observable<ServerSentEvent<OrganizationResourcesProgress>>} An observable that emits progress updates.
37
- */
38
- getSseObservable(organizationId: string, path: 'creationTask' | 'deletionTask'): Observable<ServerSentEvent<OrganizationResourcesProgress>>;
39
31
  /**
40
32
  * Subscribes to server-sent events to receive real-time progress updates on the resource creation task for a specific organization
41
33
  *
@@ -36,16 +36,6 @@ class OrganizationsResourcesService extends api_base_1.APIBase {
36
36
  deleteResourcesForOrganization(organizationId) {
37
37
  return this.httpClient.delete(`${this.basePath}/${organizationId}`);
38
38
  }
39
- /**
40
- * Subscribes to server-sent events to receive real-time progress updates on the resource tasks for a specific organization.
41
- *
42
- * @param {string} organizationId - The ID of the organization to monitor the resources progress updates for.
43
- * @param {string} path - The API path segment for the SSE endpoint
44
- * @returns {Observable<ServerSentEvent<OrganizationResourcesProgress>>} An observable that emits progress updates.
45
- */
46
- getSseObservable(organizationId, path) {
47
- return this.httpClient.getSseObservable(`${this.basePath}/${path}/${organizationId}`);
48
- }
49
39
  /**
50
40
  * Subscribes to server-sent events to receive real-time progress updates on the resource creation task for a specific organization
51
41
  *
@@ -53,7 +43,7 @@ class OrganizationsResourcesService extends api_base_1.APIBase {
53
43
  * @returns {Observable<OrganizationResourcesProgress>} An observable that emits progress updates.
54
44
  */
55
45
  getResourceCreationProgress(organizationId) {
56
- return this.getSseObservable(organizationId, 'creationTask');
46
+ return this.httpClient.getSseObservable(`${this.basePath}/creationTask/${organizationId}`);
57
47
  }
58
48
  /**
59
49
  * Subscribes to server-sent events to receive real-time progress updates on the resource deletion task for a specific organization.
@@ -62,7 +52,7 @@ class OrganizationsResourcesService extends api_base_1.APIBase {
62
52
  * @returns {Observable<ServerSentEvent<OrganizationResourcesProgress>>} An observable that emits progress updates.
63
53
  */
64
54
  getResourceDeletionProgress(organizationId) {
65
- return this.getSseObservable(organizationId, 'deletionTask');
55
+ return this.httpClient.getSseObservable(`${this.basePath}/deletionTask/${organizationId}`);
66
56
  }
67
57
  }
68
58
  exports.OrganizationsResourcesService = OrganizationsResourcesService;
@@ -0,0 +1,7 @@
1
+ import { OrgResourcePermission, SharedResources, TokenOption } from '../interfaces';
2
+ import { DataService } from './data.service';
3
+ export declare class ShareService<T> extends DataService<T> {
4
+ getBasePath(): string;
5
+ cancelAccess(id: string, options?: TokenOption): Promise<void>;
6
+ share(ids: string[], orgResourcePermissions: OrgResourcePermission[], connectedResourcesToShare?: SharedResources, sourceIds?: string[], sourceType?: string, options?: TokenOption): Promise<void>;
7
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ShareService = void 0;
4
+ const data_service_1 = require("./data.service");
5
+ class ShareService extends data_service_1.DataService {
6
+ getBasePath() {
7
+ return this.basePath;
8
+ }
9
+ cancelAccess(id, options = {}) {
10
+ return this.httpClient.put(`${this.basePath}/${id}/access`, {}, options);
11
+ }
12
+ share(ids, orgResourcePermissions, connectedResourcesToShare, sourceIds, sourceType, options = {}) {
13
+ return this.httpClient.post(`${this.basePath}/share`, { ids, orgResourcePermissions, connectedResourcesToShare, sourceIds, sourceType }, options);
14
+ }
15
+ }
16
+ exports.ShareService = ShareService;
@@ -1,7 +1,8 @@
1
- import { DataService, HttpClientService, TrashService } from '.';
1
+ import { HttpClientService, TrashService } from '.';
2
2
  import { APIBase } from '../api-base';
3
3
  import { LogbookEntry, LogbookEntryDto, Paginated, Task, TokenOption } from '../interfaces';
4
- interface BaseService extends DataService<Task>, TrashService<Task> {
4
+ import { ShareService } from './share.service';
5
+ interface BaseService extends ShareService<Task>, TrashService<Task> {
5
6
  }
6
7
  declare class BaseService extends APIBase {
7
8
  }
@@ -5,16 +5,17 @@ const tslib_1 = require("tslib");
5
5
  const ts_mixer_1 = require("ts-mixer");
6
6
  const _1 = require(".");
7
7
  const api_base_1 = require("../api-base");
8
+ const share_service_1 = require("./share.service");
8
9
  let BaseService = class BaseService extends api_base_1.APIBase {
9
10
  };
10
11
  BaseService = tslib_1.__decorate([
11
- (0, ts_mixer_1.mix)(_1.DataService, _1.TrashService)
12
+ (0, ts_mixer_1.mix)(share_service_1.ShareService, _1.TrashService)
12
13
  ], BaseService);
13
14
  class TaskService extends BaseService {
14
15
  constructor(httpClient) {
15
16
  super(httpClient, '/tasks');
16
17
  }
17
- // we may not need this method (already have the addOne method from DataService)
18
+ // we may not need this method (already have the addOne method from ShareService)
18
19
  createTaskAttachedToAsset(dto, options = {}) {
19
20
  return this.httpClient.post(this.basePath, dto, options);
20
21
  }
@@ -1,7 +1,8 @@
1
- import { DataService, HttpClientService, TrashService } from '.';
1
+ import { HttpClientService, TrashService } from '.';
2
2
  import { APIBase } from '../api-base';
3
3
  import { Paginated, TimeSeries, TimeSeriesValue, TokenOption, TS_GROUPS } from '../interfaces';
4
- interface BaseService extends DataService<TimeSeries>, TrashService<TimeSeries> {
4
+ import { ShareService } from './share.service';
5
+ interface BaseService extends ShareService<TimeSeries>, TrashService<TimeSeries> {
5
6
  }
6
7
  declare class BaseService extends APIBase {
7
8
  }
@@ -5,10 +5,11 @@ const tslib_1 = require("tslib");
5
5
  const ts_mixer_1 = require("ts-mixer");
6
6
  const _1 = require(".");
7
7
  const api_base_1 = require("../api-base");
8
+ const share_service_1 = require("./share.service");
8
9
  let BaseService = class BaseService extends api_base_1.APIBase {
9
10
  };
10
11
  BaseService = tslib_1.__decorate([
11
- (0, ts_mixer_1.mix)(_1.DataService, _1.TrashService)
12
+ (0, ts_mixer_1.mix)(share_service_1.ShareService, _1.TrashService)
12
13
  ], BaseService);
13
14
  class TimeSeriesService extends BaseService {
14
15
  constructor(httpClient) {