@hahnpro/hpc-api 2025.11.1 → 2025.11.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 +6 -0
- package/package.json +1 -1
- package/src/lib/interfaces/timeseries.interface.d.ts +1 -0
- package/src/lib/mock/organizations-resources.mock.service.d.ts +3 -1
- package/src/lib/mock/organizations-resources.mock.service.js +7 -1
- package/src/lib/services/organizations-resources.service.d.ts +16 -1
- package/src/lib/services/organizations-resources.service.js +19 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -5,8 +5,10 @@ import { OrganizationsResourcesService } from '../services';
|
|
|
5
5
|
export declare class OrganizationsResourcesMockService extends APIBaseMock<Organization> implements OrganizationsResourcesService {
|
|
6
6
|
resourceSetNames: string[];
|
|
7
7
|
constructor(resourceSetNames: string[]);
|
|
8
|
+
deleteResourcesForOrganization(organizationId: string): Promise<string>;
|
|
8
9
|
getResourceSetNames(): Promise<string[]>;
|
|
9
10
|
createResourcesForOrganization(organizationId: string, body: CreateOrgWithResourcesDto): Promise<string>;
|
|
10
11
|
getResourceCreationProgress(organizationId: string): Observable<ServerSentEvent<OrganizationResourcesProgress>>;
|
|
11
|
-
|
|
12
|
+
getResourceDeletionProgress(organizationId: string): Observable<ServerSentEvent<OrganizationResourcesProgress>>;
|
|
13
|
+
getSseObservable(organizationId: string, path: 'creationTask' | 'deletionTask'): Observable<ServerSentEvent<OrganizationResourcesProgress>>;
|
|
12
14
|
}
|
|
@@ -8,6 +8,9 @@ class OrganizationsResourcesMockService extends _1.APIBaseMock {
|
|
|
8
8
|
this.resourceSetNames = [];
|
|
9
9
|
this.resourceSetNames = resourceSetNames;
|
|
10
10
|
}
|
|
11
|
+
deleteResourcesForOrganization(organizationId) {
|
|
12
|
+
throw new Error('Method not implemented.');
|
|
13
|
+
}
|
|
11
14
|
getResourceSetNames() {
|
|
12
15
|
return Promise.resolve(this.resourceSetNames);
|
|
13
16
|
}
|
|
@@ -17,8 +20,11 @@ class OrganizationsResourcesMockService extends _1.APIBaseMock {
|
|
|
17
20
|
getResourceCreationProgress(organizationId) {
|
|
18
21
|
throw new Error('Method not implemented.');
|
|
19
22
|
}
|
|
23
|
+
getResourceDeletionProgress(organizationId) {
|
|
24
|
+
throw new Error('Method not implemented.');
|
|
25
|
+
}
|
|
20
26
|
getSseObservable(organizationId, path) {
|
|
21
|
-
|
|
27
|
+
throw new Error('Method not implemented.');
|
|
22
28
|
}
|
|
23
29
|
}
|
|
24
30
|
exports.OrganizationsResourcesMockService = OrganizationsResourcesMockService;
|
|
@@ -20,6 +20,14 @@ export declare class OrganizationsResourcesService extends APIBase {
|
|
|
20
20
|
* @returns {Promise<string>} - A promise that resolves to the id of the resource creation task.
|
|
21
21
|
*/
|
|
22
22
|
createResourcesForOrganization(organizationId: string, body: CreateOrgWithResourcesDto): Promise<string>;
|
|
23
|
+
/**
|
|
24
|
+
* Starts the deletion of all resources for a specific organization
|
|
25
|
+
* The progress status update messages can be received by subscribing to the `getResourceDeletionProgress` method with the same organization ID.
|
|
26
|
+
*
|
|
27
|
+
* @param {string} organizationId - The ID of the organization for which resources are to be deleted.
|
|
28
|
+
* @returns {Promise<string>} A promise that resolves to the id of the resource deletion task.
|
|
29
|
+
*/
|
|
30
|
+
deleteResourcesForOrganization(organizationId: string): Promise<string>;
|
|
23
31
|
/**
|
|
24
32
|
* Subscribes to server-sent events to receive real-time progress updates on the resource tasks for a specific organization.
|
|
25
33
|
*
|
|
@@ -27,7 +35,7 @@ export declare class OrganizationsResourcesService extends APIBase {
|
|
|
27
35
|
* @param {string} path - The API path segment for the SSE endpoint
|
|
28
36
|
* @returns {Observable<ServerSentEvent<OrganizationResourcesProgress>>} An observable that emits progress updates.
|
|
29
37
|
*/
|
|
30
|
-
getSseObservable(organizationId: string, path: 'creationTask'): Observable<ServerSentEvent<OrganizationResourcesProgress>>;
|
|
38
|
+
getSseObservable(organizationId: string, path: 'creationTask' | 'deletionTask'): Observable<ServerSentEvent<OrganizationResourcesProgress>>;
|
|
31
39
|
/**
|
|
32
40
|
* Subscribes to server-sent events to receive real-time progress updates on the resource creation task for a specific organization
|
|
33
41
|
*
|
|
@@ -35,4 +43,11 @@ export declare class OrganizationsResourcesService extends APIBase {
|
|
|
35
43
|
* @returns {Observable<OrganizationResourcesProgress>} An observable that emits progress updates.
|
|
36
44
|
*/
|
|
37
45
|
getResourceCreationProgress(organizationId: string): Observable<ServerSentEvent<OrganizationResourcesProgress>>;
|
|
46
|
+
/**
|
|
47
|
+
* Subscribes to server-sent events to receive real-time progress updates on the resource deletion task for a specific organization.
|
|
48
|
+
*
|
|
49
|
+
* @param {string} organizationId - The ID of the organization to monitor the resource deletion progress for.
|
|
50
|
+
* @returns {Observable<ServerSentEvent<OrganizationResourcesProgress>>} An observable that emits progress updates.
|
|
51
|
+
*/
|
|
52
|
+
getResourceDeletionProgress(organizationId: string): Observable<ServerSentEvent<OrganizationResourcesProgress>>;
|
|
38
53
|
}
|
|
@@ -26,6 +26,16 @@ class OrganizationsResourcesService extends api_base_1.APIBase {
|
|
|
26
26
|
createResourcesForOrganization(organizationId, body) {
|
|
27
27
|
return this.httpClient.post(`${this.basePath}/${organizationId}`, body);
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Starts the deletion of all resources for a specific organization
|
|
31
|
+
* The progress status update messages can be received by subscribing to the `getResourceDeletionProgress` method with the same organization ID.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} organizationId - The ID of the organization for which resources are to be deleted.
|
|
34
|
+
* @returns {Promise<string>} A promise that resolves to the id of the resource deletion task.
|
|
35
|
+
*/
|
|
36
|
+
deleteResourcesForOrganization(organizationId) {
|
|
37
|
+
return this.httpClient.delete(`${this.basePath}/${organizationId}`);
|
|
38
|
+
}
|
|
29
39
|
/**
|
|
30
40
|
* Subscribes to server-sent events to receive real-time progress updates on the resource tasks for a specific organization.
|
|
31
41
|
*
|
|
@@ -45,5 +55,14 @@ class OrganizationsResourcesService extends api_base_1.APIBase {
|
|
|
45
55
|
getResourceCreationProgress(organizationId) {
|
|
46
56
|
return this.getSseObservable(organizationId, 'creationTask');
|
|
47
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Subscribes to server-sent events to receive real-time progress updates on the resource deletion task for a specific organization.
|
|
60
|
+
*
|
|
61
|
+
* @param {string} organizationId - The ID of the organization to monitor the resource deletion progress for.
|
|
62
|
+
* @returns {Observable<ServerSentEvent<OrganizationResourcesProgress>>} An observable that emits progress updates.
|
|
63
|
+
*/
|
|
64
|
+
getResourceDeletionProgress(organizationId) {
|
|
65
|
+
return this.getSseObservable(organizationId, 'deletionTask');
|
|
66
|
+
}
|
|
48
67
|
}
|
|
49
68
|
exports.OrganizationsResourcesService = OrganizationsResourcesService;
|