@evergis/api
Advanced tools
Comparing version 0.1.44 to 0.1.45
import { ServiceBase } from './ServiceBase'; | ||
import { EvaluatedToolDc, ToolDefinition, ExtendedToolDefinitionDc, ToolInfo, ToolInfoDc, AccessControlListDc, TaskStatusDataDc } from './data-contracts'; | ||
import { ExtendedToolDefinitionDc, EvaluatedToolDc, ToolDefinition, ToolInfoDc, AccessControlListDc, ToolInfo, TaskStatusDataDc, BaseTaskDataStorageDc } from './data-contracts'; | ||
export declare class Tools extends ServiceBase { | ||
getTools(): Promise<string[]>; | ||
evaluateTool(parameters?: ToolDefinition): Promise<EvaluatedToolDc>; | ||
reloadTools(): Promise<string[]>; | ||
getToolDescription(name: string): Promise<ExtendedToolDefinitionDc>; | ||
getToolsLists({ types, status }: GetToolsListsParams): Promise<ToolInfo[]>; | ||
evaluateTool(parameters?: ToolDefinition): Promise<EvaluatedToolDc>; | ||
executeTool(parameters?: ToolDefinition): Promise<ToolInfoDc>; | ||
getToolAcl(name: string): Promise<AccessControlListDc>; | ||
getToolsLists({ types, status }: GetToolsListsParams): Promise<ToolInfo[]>; | ||
getTool(id: string): Promise<ToolInfoDc>; | ||
cancelExecute(id: string): Promise<void>; | ||
getToolResult({ id, Type }: GetToolResultParams): Promise<TaskStatusDataDc>; | ||
getToolResult({ id, data }: GetToolResultParams): Promise<TaskStatusDataDc>; | ||
} | ||
@@ -24,4 +24,4 @@ export declare type GetToolsListsParams = { | ||
id: string; | ||
/** Type of the data storage. */ | ||
Type?: string; | ||
/** */ | ||
data?: BaseTaskDataStorageDc; | ||
}; |
@@ -12,5 +12,2 @@ /* | ||
} | ||
evaluateTool(parameters) { | ||
return this.http.post(`${this.name}`, parameters).json(); | ||
} | ||
reloadTools() { | ||
@@ -24,9 +21,9 @@ return this.http.post(`${this.name}/reload`).json(); | ||
} | ||
getToolsLists({ types, status }) { | ||
evaluateTool(parameters) { | ||
return this.http | ||
.get(`${this.name}/runner`, { types, status }) | ||
.post(`${this.name}/evaluate`, parameters) | ||
.json(); | ||
} | ||
executeTool(parameters) { | ||
return this.http.post(`${this.name}/runner`, parameters).json(); | ||
return this.http.post(`${this.name}/run`, parameters).json(); | ||
} | ||
@@ -38,11 +35,16 @@ getToolAcl(name) { | ||
} | ||
getToolsLists({ types, status }) { | ||
return this.http | ||
.get(`${this.name}/journal`, { types, status }) | ||
.json(); | ||
} | ||
getTool(id) { | ||
return this.http.get(`${this.name}/runner/${id}`).json(); | ||
return this.http.get(`${this.name}/journal/${id}`).json(); | ||
} | ||
cancelExecute(id) { | ||
return this.http.post(`${this.name}/runner/${id}/cancel`).then(() => { }); | ||
return this.http.post(`${this.name}/${id}/cancel`).then(() => { }); | ||
} | ||
getToolResult({ id, Type }) { | ||
getToolResult({ id, data }) { | ||
return this.http | ||
.get(`${this.name}/runner/${id}/result`, { Type }) | ||
.post(`${this.name}/${id}/result`, data) | ||
.json(); | ||
@@ -49,0 +51,0 @@ } |
@@ -1,5 +0,4 @@ | ||
import { PostgresLayerServiceConfigurationDc, RemoteTileServiceConfigurationDc, ServiceListDc, StyledLayerServiceConfigurationDc, ServiceInfoDc, FileUploadResponse, ResourceDependenciesDc } from '../__generated__/data-contracts'; | ||
import { PostgresLayerServiceConfigurationDc, RemoteTileServiceConfigurationDc, ServiceListDc, StyledLayerServiceConfigurationDc, ServiceInfoDc, FileUploadResponse, ResourceDependenciesDc, TableInfoDc } from '../__generated__/data-contracts'; | ||
import { Layers as LayersService, GetLayersListParams } from '../__generated__/Layers'; | ||
import { ResourceService } from '../interfaces/ResourceService'; | ||
import { DependencyResource } from './Resources'; | ||
export declare class Layers extends LayersService implements ResourceService { | ||
@@ -26,5 +25,5 @@ getLayerInfos(layers: string[]): Promise<ServiceInfoDc[]>; | ||
deps: { | ||
tables: DependencyResource[]; | ||
tables: TableInfoDc[]; | ||
}; | ||
}; | ||
export {}; |
import { Projects as ProjectsService, GetProjectsListParams } from '../__generated__/Projects'; | ||
import { ExtendedProjectInfoDc, FileUploadResponse, ProjectContentItemDc, ProjectInfoDc, ResourceDependenciesDc } from '../__generated__/data-contracts'; | ||
import { ExtendedProjectInfoDc, FileUploadResponse, ProjectContentItemDc, ProjectInfoDc, ResourceDependenciesDc, ServiceInfoDc, TableInfoDc } from '../__generated__/data-contracts'; | ||
import { ResourceService } from '../interfaces/ResourceService'; | ||
import { DependencyResource } from './Resources'; | ||
export declare class Projects extends ProjectsService implements ResourceService { | ||
@@ -19,5 +18,5 @@ getProjectInfos(projects: string[]): Promise<ExtendedProjectInfoDc[]>; | ||
deps: { | ||
layers: DependencyResource[]; | ||
tables: DependencyResource[]; | ||
layers: ServiceInfoDc[]; | ||
tables: TableInfoDc[]; | ||
}; | ||
}; |
@@ -1,6 +0,4 @@ | ||
import { ServiceInfoDc, TableInfoDc, ProjectInfoDc } from '../__generated__/data-contracts'; | ||
import { Projects, ProjectsWithDeps } from './Projects'; | ||
import { Layers, LayersWithDeps } from './Layers'; | ||
import { Tables } from './Tables'; | ||
export declare type DependencyResource = Partial<Pick<TableInfoDc | ServiceInfoDc | ProjectInfoDc, 'name' | 'alias' | 'owner'>>; | ||
export declare class Resources { | ||
@@ -15,3 +13,2 @@ private readonly projects; | ||
private getDependentNames; | ||
private getDependencyResources; | ||
} |
@@ -54,4 +54,4 @@ import { unique } from '../utils/unique'; | ||
return { | ||
tables: this.getDependencyResources(await this.tables.getTableInfos(tables.filter(unique))), | ||
layers: this.getDependencyResources(await this.layers.getLayerInfos(layers.filter(unique))), | ||
tables: await this.tables.getTableInfos(tables.filter(unique)), | ||
layers: await this.layers.getLayerInfos(layers.filter(unique)), | ||
}; | ||
@@ -65,10 +65,3 @@ } | ||
} | ||
getDependencyResources(resources) { | ||
return resources.map(resource => ({ | ||
name: resource.name, | ||
owner: resource.owner, | ||
alias: resource.alias, | ||
})); | ||
} | ||
} | ||
//# sourceMappingURL=Resources.js.map |
{ | ||
"name": "@evergis/api", | ||
"version": "0.1.44", | ||
"version": "0.1.45", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "author": "everpoint", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
267055
5773