diff --git a/ui/src/Services/API.ts b/ui/src/Services/API.ts index 9a6e4f93..e04a9a57 100644 --- a/ui/src/Services/API.ts +++ b/ui/src/Services/API.ts @@ -32,7 +32,7 @@ * limitations under the License. * */ -import type { Settings, UserProfile, KGCoreResult, UUID, Stage, StructureOfType, InstanceFull, InstanceSummary, SuggestionStructure, Neighbor, Scope, UserSummary, IncomingLink, InstanceRawStructure, InstanceLabelData, InstanceSummaryData, InstanceFullData } from '../types'; +import type { Settings, UserProfile, KGCoreResult, UUID, Stage, StructureOfType, InstanceFull, InstanceSummary, SuggestionStructure, Neighbor, Scope, UserSummary, IncomingLink, InstanceRawStructure, InstancesData, InstanceLabel } from '../types'; interface APIErrorResponse { status: number; @@ -79,11 +79,11 @@ interface API { getInstanceScope(instanceId: UUID): Promise>; - getInstancesLabel(stage: Stage | undefined, instanceIds: UUID[]): Promise>; + getInstancesLabel(stage: Stage | undefined, instanceIds: UUID[]): Promise>>; - getInstancesSummary(stage: Stage|undefined, instanceIds: UUID[]): Promise>; + getInstancesSummary(stage: Stage|undefined, instanceIds: UUID[]): Promise>>; - getInstancesList(stage: Stage | undefined, instanceIds: UUID[]): Promise>; + getInstancesList(stage: Stage | undefined, instanceIds: UUID[]): Promise>>; getInvitedUsers(instanceId: UUID): Promise>; diff --git a/ui/src/Services/APIBackendAdapter.ts b/ui/src/Services/APIBackendAdapter.ts index 7aba13bd..d6d1dd27 100644 --- a/ui/src/Services/APIBackendAdapter.ts +++ b/ui/src/Services/APIBackendAdapter.ts @@ -34,7 +34,7 @@ * */ import type API from './API'; -import type { UUID, Stage, Settings, UserProfile, KGCoreResult, StructureOfType, InstanceFull, InstanceSummary, SuggestionStructure, Neighbor, Scope, UserSummary, IncomingLink, InstanceRawStructure, InstanceSummaryData, InstanceLabelData, InstanceFullData } from '../types'; +import type { UUID, Stage, Settings, UserProfile, KGCoreResult, StructureOfType, InstanceFull, InstanceSummary, SuggestionStructure, Neighbor, Scope, UserSummary, IncomingLink, InstanceRawStructure, InstancesData, InstanceLabel } from '../types'; import type { AxiosInstance } from 'axios'; const RELATIVE_ROOT_PATH = '/editor/api'; @@ -180,17 +180,17 @@ class APIBackendAdapter implements API { return data; } - async getInstancesLabel(stage: Stage, instanceIds: UUID[]): Promise> { + async getInstancesLabel(stage: Stage, instanceIds: UUID[]): Promise>> { const { data } = await this._axios.post(endpoints.instancesLabel(stage), instanceIds); return data; } - async getInstancesSummary(stage: Stage | undefined, instanceIds: UUID[]): Promise> { + async getInstancesSummary(stage: Stage | undefined, instanceIds: UUID[]): Promise>> { const { data } = await this._axios.post(endpoints.instancesSummary(stage), instanceIds); return data; } - async getInstancesList(stage: Stage, instanceIds: UUID[]): Promise> { + async getInstancesList(stage: Stage, instanceIds: UUID[]): Promise>> { const { data } = await this._axios.post(endpoints.instancesList(stage), instanceIds); return data; } diff --git a/ui/src/types.ts b/ui/src/types.ts index 64eee51f..207eb83a 100644 --- a/ui/src/types.ts +++ b/ui/src/types.ts @@ -279,11 +279,7 @@ export type InstanceRawData = { [fieldName:string]: unknown; } -export type InstanceLabelData = Record; // by instanceId - -export type InstanceSummaryData = Record; // by instanceId - -export type InstanceFullData = Record; // by instanceId +export type InstancesData = Record; // by instanceId export interface InstanceRawStructure { data: InstanceRawData;