@hahnpro/hpc-api 2026.6.4 → 2026.6.5
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
package/package.json
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { APIBaseMock } from '.';
|
|
2
|
-
import { ShareInDataspaceDto, ShareInDataspaceResult } from '../interfaces';
|
|
2
|
+
import { ResourceType, ShareInDataspaceDto, ShareInDataspaceResult } from '../interfaces';
|
|
3
3
|
import { DataspaceService } from '../services';
|
|
4
4
|
export declare class DataspaceMockService extends APIBaseMock<ShareInDataspaceResult> implements DataspaceService {
|
|
5
5
|
readonly shareInDataspaceCalls: ShareInDataspaceDto[];
|
|
6
|
+
readonly checkSharingStatusCalls: Array<{
|
|
7
|
+
resourceId: string;
|
|
8
|
+
resourceType: ResourceType;
|
|
9
|
+
}>;
|
|
10
|
+
readonly checkSharingWorkflowStatusCalls: string[];
|
|
11
|
+
readonly awaitSharingWorkflowResultCalls: string[];
|
|
12
|
+
checkStatusResult: boolean;
|
|
13
|
+
shareResult: ShareInDataspaceResult | null;
|
|
6
14
|
constructor();
|
|
7
15
|
shareInDataspace(dto: ShareInDataspaceDto): Promise<ShareInDataspaceResult>;
|
|
16
|
+
checkSharingStatus(resourceId: string, resourceType: ResourceType): Promise<boolean>;
|
|
17
|
+
checkSharingWorkflowStatus(resourceId: string): Promise<boolean>;
|
|
18
|
+
awaitSharingWorkflowResult(resourceId: string): Promise<ShareInDataspaceResult | null>;
|
|
8
19
|
}
|
|
@@ -6,12 +6,28 @@ class DataspaceMockService extends _1.APIBaseMock {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
this.shareInDataspaceCalls = [];
|
|
9
|
+
this.checkSharingStatusCalls = [];
|
|
10
|
+
this.checkSharingWorkflowStatusCalls = [];
|
|
11
|
+
this.awaitSharingWorkflowResultCalls = [];
|
|
12
|
+
this.checkStatusResult = false;
|
|
13
|
+
this.shareResult = { status: 'finished' };
|
|
9
14
|
}
|
|
10
15
|
async shareInDataspace(dto) {
|
|
11
16
|
this.shareInDataspaceCalls.push(dto);
|
|
12
|
-
|
|
13
|
-
this.
|
|
14
|
-
|
|
17
|
+
this.data.push(this.shareResult);
|
|
18
|
+
return this.shareResult;
|
|
19
|
+
}
|
|
20
|
+
async checkSharingStatus(resourceId, resourceType) {
|
|
21
|
+
this.checkSharingStatusCalls.push({ resourceId, resourceType });
|
|
22
|
+
return this.checkStatusResult;
|
|
23
|
+
}
|
|
24
|
+
async checkSharingWorkflowStatus(resourceId) {
|
|
25
|
+
this.checkSharingWorkflowStatusCalls.push(resourceId);
|
|
26
|
+
return this.checkStatusResult;
|
|
27
|
+
}
|
|
28
|
+
async awaitSharingWorkflowResult(resourceId) {
|
|
29
|
+
this.awaitSharingWorkflowResultCalls.push(resourceId);
|
|
30
|
+
return this.shareResult;
|
|
15
31
|
}
|
|
16
32
|
}
|
|
17
33
|
exports.DataspaceMockService = DataspaceMockService;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { APIBase } from '../api-base';
|
|
2
|
-
import { ShareInDataspaceDto, ShareInDataspaceResult, TokenOption } from '../interfaces';
|
|
2
|
+
import { ResourceType, ShareInDataspaceDto, ShareInDataspaceResult, TokenOption } from '../interfaces';
|
|
3
3
|
import { HttpClientService } from './http-client.service';
|
|
4
4
|
export declare class DataspaceService extends APIBase {
|
|
5
5
|
constructor(httpClient: HttpClientService);
|
|
6
6
|
shareInDataspace(dto: ShareInDataspaceDto, options?: TokenOption): Promise<ShareInDataspaceResult>;
|
|
7
|
+
checkSharingStatus(resourceId: string, resourceType: ResourceType, options?: TokenOption): Promise<boolean>;
|
|
8
|
+
checkSharingWorkflowStatus(resourceId: string, options?: TokenOption): Promise<boolean>;
|
|
9
|
+
awaitSharingWorkflowResult(resourceId: string, options?: TokenOption): Promise<ShareInDataspaceResult | null>;
|
|
7
10
|
}
|
|
@@ -9,5 +9,21 @@ class DataspaceService extends api_base_1.APIBase {
|
|
|
9
9
|
shareInDataspace(dto, options = {}) {
|
|
10
10
|
return this.httpClient.post(`${this.basePath}/share`, dto, options);
|
|
11
11
|
}
|
|
12
|
+
checkSharingStatus(resourceId, resourceType, options = {}) {
|
|
13
|
+
const params = new URLSearchParams();
|
|
14
|
+
params.append('resourceId', resourceId);
|
|
15
|
+
params.append('resourceType', resourceType);
|
|
16
|
+
return this.httpClient.get(`${this.basePath}/share/status`, { params, ...options });
|
|
17
|
+
}
|
|
18
|
+
checkSharingWorkflowStatus(resourceId, options = {}) {
|
|
19
|
+
const params = new URLSearchParams();
|
|
20
|
+
params.append('resourceId', resourceId);
|
|
21
|
+
return this.httpClient.get(`${this.basePath}/share/workflow-status`, { params, ...options });
|
|
22
|
+
}
|
|
23
|
+
awaitSharingWorkflowResult(resourceId, options = {}) {
|
|
24
|
+
const params = new URLSearchParams();
|
|
25
|
+
params.append('resourceId', resourceId);
|
|
26
|
+
return this.httpClient.get(`${this.basePath}/share/workflow-result`, { params, ...options });
|
|
27
|
+
}
|
|
12
28
|
}
|
|
13
29
|
exports.DataspaceService = DataspaceService;
|