@ngis/plugin-ui 0.4.0
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/LICENSE +13 -0
- package/README.md +25 -0
- package/dist/index.cjs +71 -0
- package/dist/index.d.ts +114 -0
- package/dist/index.mjs +69 -0
- package/dist/src/api/analysis.d.ts +140 -0
- package/dist/src/api/resources.d.ts +530 -0
- package/dist/src/api/scenes.d.ts +251 -0
- package/dist/src/api/users.d.ts +22 -0
- package/dist/src/api/workflows.d.ts +191 -0
- package/dist/src/components/plugin-ui/AttributeTable.d.ts +26 -0
- package/dist/src/components/plugin-ui/BatchTable.d.ts +47 -0
- package/dist/src/components/plugin-ui/ChartCanvas.d.ts +14 -0
- package/dist/src/components/plugin-ui/ExtentPicker.d.ts +22 -0
- package/dist/src/components/plugin-ui/FieldSelect.d.ts +23 -0
- package/dist/src/components/plugin-ui/Flow.d.ts +256 -0
- package/dist/src/components/plugin-ui/ModelSelect.d.ts +36 -0
- package/dist/src/components/plugin-ui/ParamForm.d.ts +63 -0
- package/dist/src/components/plugin-ui/PickerField.d.ts +52 -0
- package/dist/src/components/plugin-ui/ResourceSelect.d.ts +37 -0
- package/dist/src/components/plugin-ui/ResultActions.d.ts +48 -0
- package/dist/src/components/plugin-ui/RunButton.d.ts +49 -0
- package/dist/src/components/plugin-ui/StatChart.d.ts +66 -0
- package/dist/src/components/plugin-ui/TaskChrome.d.ts +35 -0
- package/dist/src/components/plugin-ui/TaskList.d.ts +29 -0
- package/dist/src/components/plugin-ui/TaskStatus.d.ts +55 -0
- package/dist/src/components/plugin-ui/batch-model.d.ts +442 -0
- package/dist/src/components/plugin-ui/flow-inputs.d.ts +61 -0
- package/dist/src/components/plugin-ui/flow-model.d.ts +303 -0
- package/dist/src/components/plugin-ui/flow-ports.d.ts +155 -0
- package/dist/src/components/plugin-ui/param-form-data.d.ts +122 -0
- package/dist/src/components/plugin-ui/param-form-model.d.ts +187 -0
- package/dist/src/components/plugin-ui/param-widgets.d.ts +88 -0
- package/dist/src/components/plugin-ui/picker-data.d.ts +141 -0
- package/dist/src/components/plugin-ui/picker-model.d.ts +150 -0
- package/dist/src/components/plugin-ui/recipe-model.d.ts +320 -0
- package/dist/src/components/plugin-ui/result-data.d.ts +112 -0
- package/dist/src/components/plugin-ui/result-model.d.ts +96 -0
- package/dist/src/components/plugin-ui/run-data.d.ts +118 -0
- package/dist/src/components/plugin-ui/run-model.d.ts +179 -0
- package/dist/src/components/plugin-ui/stat-chart-model.d.ts +168 -0
- package/dist/src/components/plugin-ui/validation-messages.d.ts +18 -0
- package/dist/src/components/plugin-ui/w2-contracts.d.ts +151 -0
- package/dist/src/components/plugin-ui/w3-contracts.d.ts +328 -0
- package/dist/src/components/plugin-ui/w4-contracts.d.ts +510 -0
- package/dist/src/components/ui/button.d.ts +12 -0
- package/dist/src/components/ui/checkbox.d.ts +4 -0
- package/dist/src/components/ui/column-resize-handle.d.ts +23 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/src/components/ui/input.d.ts +3 -0
- package/dist/src/components/ui/label.d.ts +4 -0
- package/dist/src/components/ui/popover.d.ts +10 -0
- package/dist/src/components/ui/select.d.ts +15 -0
- package/dist/src/components/ui/switch.d.ts +6 -0
- package/dist/src/domain/map/types.d.ts +128 -0
- package/dist/src/features/gis/components/GisAttributeTable.d.ts +56 -0
- package/dist/src/features/gis/hooks/useDatasetFeatureWindow.d.ts +51 -0
- package/dist/src/lib/api-error.d.ts +81 -0
- package/dist/src/lib/api.d.ts +82 -0
- package/dist/src/lib/auth-session.d.ts +22 -0
- package/dist/src/lib/hooks/useColumnResize.d.ts +57 -0
- package/dist/src/lib/raster-color-layer/RasterColorLayer.d.ts +48 -0
- package/dist/src/lib/raster-color-layer/TileGrid.d.ts +31 -0
- package/dist/src/lib/raster-color-layer/colorRamp.d.ts +18 -0
- package/dist/src/lib/raster-color-layer/shaders/raster-color.frag.d.ts +2 -0
- package/dist/src/lib/raster-color-layer/shaders/raster-color.vert.d.ts +2 -0
- package/dist/src/lib/raster-color-layer/zoomInterpolate.d.ts +2 -0
- package/dist/src/lib/utils.d.ts +2 -0
- package/dist/src/sdk/facets/types.d.ts +370 -0
- package/dist/src/sdk/host-api.d.ts +256 -0
- package/dist/src/sdk/map-api.d.ts +288 -0
- package/dist/src/sdk/panels.d.ts +130 -0
- package/dist/src/types/analysis.d.ts +205 -0
- package/dist/src/types/common.d.ts +17 -0
- package/dist/src/types/extensions.d.ts +560 -0
- package/dist/src/types/gis.d.ts +242 -0
- package/dist/src/types/market-social.d.ts +378 -0
- package/dist/src/types/workflow.d.ts +83 -0
- package/package.json +59 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import type { ResourceShareMode } from "./resources";
|
|
2
|
+
import type { ApiRequestOptions } from "../lib/api";
|
|
3
|
+
export type SceneScope = "mine" | "shared" | "public";
|
|
4
|
+
export type SceneType = "MAP" | "ANALYSIS" | "GIS";
|
|
5
|
+
export type SceneMapSubCategory = "FREEFORM" | "TEMPLATE";
|
|
6
|
+
export type SceneAnalysisSubCategory = "LAYER_ANALYSIS" | "WORKFLOW_ANALYSIS" | "CODING_ANALYSIS" | "INSIGHT_ANALYSIS";
|
|
7
|
+
/**
|
|
8
|
+
* Moved to `@/types/common` (F1 / W1.2) — re-exported here so existing
|
|
9
|
+
* `import type { PageResult } from "@/api/scenes"` call sites keep working.
|
|
10
|
+
*/
|
|
11
|
+
export type { PageResult } from "../types/common";
|
|
12
|
+
export interface NgisScene {
|
|
13
|
+
id: string;
|
|
14
|
+
ownerId: string;
|
|
15
|
+
name: string;
|
|
16
|
+
type?: SceneType | string | null;
|
|
17
|
+
description?: string | null;
|
|
18
|
+
thumbnailFileId?: string | null;
|
|
19
|
+
configJson?: string | null;
|
|
20
|
+
/** True for an unsaved scratch scene (auto-deleted after the TTL window). */
|
|
21
|
+
ephemeral?: boolean | null;
|
|
22
|
+
purpose?: "STANDARD" | "GIS_WORKSPACE" | "PLUGIN_UI_LAB" | string | null;
|
|
23
|
+
generation?: number | null;
|
|
24
|
+
lastActiveAt?: string | null;
|
|
25
|
+
expiresAt?: string | null;
|
|
26
|
+
mapSubCategories?: SceneMapSubCategory[] | string[] | null;
|
|
27
|
+
analysisSubCategories?: SceneAnalysisSubCategory[] | string[] | null;
|
|
28
|
+
createdAt?: string | null;
|
|
29
|
+
updatedAt?: string | null;
|
|
30
|
+
}
|
|
31
|
+
export interface NgisPublicScene {
|
|
32
|
+
id: string;
|
|
33
|
+
sourceSceneId: string;
|
|
34
|
+
ownerId: string;
|
|
35
|
+
name: string;
|
|
36
|
+
configSnapshot?: string | null;
|
|
37
|
+
layersSnapshot?: string | null;
|
|
38
|
+
publishedAt?: string | null;
|
|
39
|
+
}
|
|
40
|
+
export interface PublicSceneSummary {
|
|
41
|
+
sceneId: string;
|
|
42
|
+
name: string;
|
|
43
|
+
ownerId?: string | null;
|
|
44
|
+
publishedAt?: string | null;
|
|
45
|
+
}
|
|
46
|
+
export interface PublicSceneDetail {
|
|
47
|
+
scene: NgisScene;
|
|
48
|
+
layers: NgisSceneLayer[];
|
|
49
|
+
resources: SceneResourceDto[];
|
|
50
|
+
}
|
|
51
|
+
export interface CreateSceneParams {
|
|
52
|
+
name: string;
|
|
53
|
+
type: SceneType;
|
|
54
|
+
description?: string;
|
|
55
|
+
mapSubCategories?: SceneMapSubCategory[];
|
|
56
|
+
analysisSubCategories?: SceneAnalysisSubCategory[];
|
|
57
|
+
}
|
|
58
|
+
export interface UpdateSceneParams {
|
|
59
|
+
name?: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface UpdateSceneCapabilitiesParams {
|
|
63
|
+
mapSubCategories?: SceneMapSubCategory[];
|
|
64
|
+
analysisSubCategories?: SceneAnalysisSubCategory[];
|
|
65
|
+
}
|
|
66
|
+
export interface SceneResourceDto {
|
|
67
|
+
id: string;
|
|
68
|
+
sceneId: string;
|
|
69
|
+
name: string;
|
|
70
|
+
originalFileId: string;
|
|
71
|
+
workingFileId?: string | null;
|
|
72
|
+
effectiveFileId: string;
|
|
73
|
+
snapshot?: boolean | null;
|
|
74
|
+
snapshotId?: string | null;
|
|
75
|
+
mode?: ResourceShareMode | string | null;
|
|
76
|
+
geometryType?: string | null;
|
|
77
|
+
bboxJson?: string | null;
|
|
78
|
+
addedAt?: string | null;
|
|
79
|
+
layerCount: number;
|
|
80
|
+
rendered: boolean;
|
|
81
|
+
datasetType?: string | null;
|
|
82
|
+
datasetStatus?: string | null;
|
|
83
|
+
/**
|
|
84
|
+
* Selection-safe projection supplied by the scene service: VECTOR | RASTER |
|
|
85
|
+
* FILE. Resource pickers must use this rather than fan out to Dataset APIs.
|
|
86
|
+
*/
|
|
87
|
+
selectionType?: string | null;
|
|
88
|
+
/** AVAILABLE | MISSING | UNAVAILABLE | UNKNOWN. */
|
|
89
|
+
metadataState?: string | null;
|
|
90
|
+
ready?: boolean;
|
|
91
|
+
renderable?: boolean;
|
|
92
|
+
}
|
|
93
|
+
export interface ListSceneResourcesOptions {
|
|
94
|
+
/** Ask the scene service to refresh its bounded, persisted dataset summaries. */
|
|
95
|
+
refresh?: boolean;
|
|
96
|
+
signal?: AbortSignal;
|
|
97
|
+
}
|
|
98
|
+
export interface RegisterSceneResourceParams {
|
|
99
|
+
fileId: string;
|
|
100
|
+
name?: string;
|
|
101
|
+
}
|
|
102
|
+
export interface NgisSceneLayer {
|
|
103
|
+
id: string;
|
|
104
|
+
sceneId: string;
|
|
105
|
+
resourceId?: string | null;
|
|
106
|
+
name: string;
|
|
107
|
+
layerType?: string | null;
|
|
108
|
+
styleJson?: string | null;
|
|
109
|
+
visible?: boolean | null;
|
|
110
|
+
sortOrder?: number | null;
|
|
111
|
+
groupId?: string | null;
|
|
112
|
+
}
|
|
113
|
+
export interface AddSceneLayerParams {
|
|
114
|
+
resourceId?: string;
|
|
115
|
+
fileId?: string;
|
|
116
|
+
name: string;
|
|
117
|
+
layerType?: string;
|
|
118
|
+
styleJson?: string;
|
|
119
|
+
}
|
|
120
|
+
export interface UpdateSceneLayerParams {
|
|
121
|
+
name?: string;
|
|
122
|
+
visible?: boolean;
|
|
123
|
+
sortOrder?: number;
|
|
124
|
+
styleJson?: string;
|
|
125
|
+
groupId?: string;
|
|
126
|
+
}
|
|
127
|
+
export interface NgisSceneLayerGroup {
|
|
128
|
+
id: string;
|
|
129
|
+
sceneId: string;
|
|
130
|
+
parentId?: string | null;
|
|
131
|
+
name: string;
|
|
132
|
+
orderIndex?: number | null;
|
|
133
|
+
}
|
|
134
|
+
export interface CreateLayerGroupParams {
|
|
135
|
+
name: string;
|
|
136
|
+
parentId?: string;
|
|
137
|
+
orderIndex?: number;
|
|
138
|
+
}
|
|
139
|
+
export interface UpdateLayerGroupParams {
|
|
140
|
+
name?: string;
|
|
141
|
+
orderIndex?: number;
|
|
142
|
+
}
|
|
143
|
+
export interface SceneListResult {
|
|
144
|
+
items: NgisScene[];
|
|
145
|
+
total: number;
|
|
146
|
+
}
|
|
147
|
+
/** Response of `GET /api/scenes/gis/workspace` — the user's scratch GIS scene. */
|
|
148
|
+
export interface GisWorkspaceResponse {
|
|
149
|
+
scene: NgisScene;
|
|
150
|
+
layerCount: number;
|
|
151
|
+
}
|
|
152
|
+
export interface PluginUiLabResponse {
|
|
153
|
+
scene: NgisScene;
|
|
154
|
+
generation: number;
|
|
155
|
+
resourceCount: number;
|
|
156
|
+
layerCount: number;
|
|
157
|
+
lastActiveAt: string;
|
|
158
|
+
expiresAt: string;
|
|
159
|
+
cleanupState?: string | null;
|
|
160
|
+
cleanupOperationId?: string | null;
|
|
161
|
+
cleanupPhase?: string | null;
|
|
162
|
+
cleanupError?: string | null;
|
|
163
|
+
}
|
|
164
|
+
export interface PluginUiLabSample {
|
|
165
|
+
id: string;
|
|
166
|
+
version: string;
|
|
167
|
+
name: string;
|
|
168
|
+
description?: string | null;
|
|
169
|
+
dataKind: string;
|
|
170
|
+
datasetType: string;
|
|
171
|
+
geometryType?: string | null;
|
|
172
|
+
ready: boolean;
|
|
173
|
+
renderable: boolean;
|
|
174
|
+
available: boolean;
|
|
175
|
+
unavailableReason?: string | null;
|
|
176
|
+
}
|
|
177
|
+
export interface PluginUiLabSampleLoadRequest {
|
|
178
|
+
expectedGeneration: number;
|
|
179
|
+
sampleIds: string[];
|
|
180
|
+
}
|
|
181
|
+
export interface PluginUiLabSampleLoadItem {
|
|
182
|
+
sampleId: string;
|
|
183
|
+
sampleVersion?: string | null;
|
|
184
|
+
status: "LOADED" | "ALREADY_PRESENT" | "FAILED" | string;
|
|
185
|
+
resource?: SceneResourceDto | null;
|
|
186
|
+
layerId?: string | null;
|
|
187
|
+
error?: string | null;
|
|
188
|
+
}
|
|
189
|
+
export interface PluginUiLabSampleLoadResponse {
|
|
190
|
+
generation: number;
|
|
191
|
+
items: PluginUiLabSampleLoadItem[];
|
|
192
|
+
}
|
|
193
|
+
export declare const scenesApi: {
|
|
194
|
+
listMine(page?: number, size?: number): Promise<SceneListResult>;
|
|
195
|
+
listShared(): Promise<SceneListResult>;
|
|
196
|
+
listPublic(page?: number, size?: number): Promise<SceneListResult>;
|
|
197
|
+
getPublic(sceneId: string): Promise<PublicSceneDetail>;
|
|
198
|
+
get(sceneId: string): Promise<NgisScene>;
|
|
199
|
+
/**
|
|
200
|
+
* The caller's first saved scene of a type, in the listing order
|
|
201
|
+
* `/api/scenes` itself returns. Scratch/lab scenes are not saved scenes.
|
|
202
|
+
* Continue through the listing so a matching type beyond the first page is
|
|
203
|
+
* not mistaken for an empty workspace.
|
|
204
|
+
*/
|
|
205
|
+
findFirstScene(type: SceneType): Promise<NgisScene | null>;
|
|
206
|
+
/** The caller's first saved GIS scene, or `null` when they have none. */
|
|
207
|
+
findFirstGisScene(): Promise<NgisScene | null>;
|
|
208
|
+
/**
|
|
209
|
+
* Get-or-create the caller's single scratch GIS workspace scene
|
|
210
|
+
* (`type=GIS`, `ephemeral=true`). Also resets its inactivity TTL.
|
|
211
|
+
*/
|
|
212
|
+
getGisWorkspace(): Promise<GisWorkspaceResponse>;
|
|
213
|
+
getPluginUiLab(signal?: AbortSignal): Promise<PluginUiLabResponse>;
|
|
214
|
+
resetPluginUiLab(generation: number, signal?: AbortSignal): Promise<PluginUiLabResponse>;
|
|
215
|
+
discardPluginUiLab(signal?: AbortSignal): Promise<void>;
|
|
216
|
+
listPluginUiLabSamples(signal?: AbortSignal): Promise<PluginUiLabSample[]>;
|
|
217
|
+
loadPluginUiLabSamples(request: PluginUiLabSampleLoadRequest, signal?: AbortSignal): Promise<PluginUiLabSampleLoadResponse>;
|
|
218
|
+
/** Clear the scratch GIS workspace in place (same id, layers/config wiped). */
|
|
219
|
+
resetGisWorkspace(): Promise<NgisScene>;
|
|
220
|
+
/**
|
|
221
|
+
* Promote a scratch scene to a permanent one (`ephemeral` → false). Optional
|
|
222
|
+
* `name` renames it. After this, the next `getGisWorkspace()` returns a fresh
|
|
223
|
+
* empty scratch.
|
|
224
|
+
*/
|
|
225
|
+
promoteScene(sceneId: string, name?: string): Promise<NgisScene>;
|
|
226
|
+
create(params: CreateSceneParams): Promise<NgisScene>;
|
|
227
|
+
update(sceneId: string, params: UpdateSceneParams): Promise<NgisScene>;
|
|
228
|
+
updateConfig(sceneId: string, config: string | object): Promise<NgisScene>;
|
|
229
|
+
updateCapabilities(sceneId: string, params: UpdateSceneCapabilitiesParams): Promise<NgisScene>;
|
|
230
|
+
delete(sceneId: string): Promise<void>;
|
|
231
|
+
publish(sceneId: string): Promise<void>;
|
|
232
|
+
unpublish(sceneId: string): Promise<void>;
|
|
233
|
+
isPublished(sceneId: string): Promise<boolean>;
|
|
234
|
+
forkPublic(publicSceneId: string, folderId?: string | null): Promise<NgisScene>;
|
|
235
|
+
listResources(sceneId: string, options?: ListSceneResourcesOptions | AbortSignal): Promise<SceneResourceDto[]>;
|
|
236
|
+
registerResource(sceneId: string, params: RegisterSceneResourceParams, options?: ApiRequestOptions): Promise<SceneResourceDto>;
|
|
237
|
+
renameResource(sceneId: string, resourceId: string, name: string): Promise<SceneResourceDto>;
|
|
238
|
+
deleteResource(sceneId: string, resourceId: string, cascade?: boolean): Promise<void>;
|
|
239
|
+
updateResourceWorkingFile(sceneId: string, resourceId: string, fileId: string): Promise<SceneResourceDto>;
|
|
240
|
+
revertResourceWorkingFile(sceneId: string, resourceId: string): Promise<SceneResourceDto>;
|
|
241
|
+
listLayers(sceneId: string, signal?: AbortSignal): Promise<NgisSceneLayer[]>;
|
|
242
|
+
addLayer(sceneId: string, params: AddSceneLayerParams, options?: ApiRequestOptions): Promise<NgisSceneLayer>;
|
|
243
|
+
updateLayer(sceneId: string, layerId: string, params: UpdateSceneLayerParams, options?: ApiRequestOptions): Promise<NgisSceneLayer>;
|
|
244
|
+
renameLayer(sceneId: string, layerId: string, name: string): Promise<NgisSceneLayer>;
|
|
245
|
+
deleteLayer(sceneId: string, layerId: string, options?: ApiRequestOptions): Promise<void>;
|
|
246
|
+
reorderLayers(sceneId: string, layerIds: string[], options?: ApiRequestOptions): Promise<void>;
|
|
247
|
+
listLayerGroups(sceneId: string): Promise<NgisSceneLayerGroup[]>;
|
|
248
|
+
createLayerGroup(sceneId: string, params: CreateLayerGroupParams): Promise<NgisSceneLayerGroup>;
|
|
249
|
+
updateLayerGroup(sceneId: string, groupId: string, params: UpdateLayerGroupParams): Promise<NgisSceneLayerGroup>;
|
|
250
|
+
deleteLayerGroup(sceneId: string, groupId: string): Promise<void>;
|
|
251
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface UserProfile {
|
|
2
|
+
id: string;
|
|
3
|
+
name?: string | null;
|
|
4
|
+
email?: string | null;
|
|
5
|
+
username?: string | null;
|
|
6
|
+
avatar?: string | null;
|
|
7
|
+
role?: string | null;
|
|
8
|
+
}
|
|
9
|
+
declare function fetchUserProfile(userId: string): Promise<UserProfile>;
|
|
10
|
+
export declare function getUserDisplayName(profile: UserProfile | null, fallback: string): string;
|
|
11
|
+
export declare const usersApi: {
|
|
12
|
+
/** The current authenticated user's profile. */
|
|
13
|
+
me(): Promise<UserProfile>;
|
|
14
|
+
/** Update the only editable text field exposed by the user service. */
|
|
15
|
+
updateMe(username: string): Promise<unknown>;
|
|
16
|
+
/** Upload the current user's avatar. The service returns its URL. */
|
|
17
|
+
uploadAvatar(file: File): Promise<string>;
|
|
18
|
+
/** Public profile for any user id (used to resolve owner names). */
|
|
19
|
+
getById: typeof fetchUserProfile;
|
|
20
|
+
getByIdSafe(userId: string): Promise<UserProfile | null>;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import type { WorkflowDagConfig } from "../types/workflow";
|
|
2
|
+
export type { WorkflowDagConfig, WorkflowDagEdge, WorkflowDagGraph, WorkflowDagNode, WorkflowDagScriptConfig, WorkflowDagScriptPort, WorkflowDagView, WorkflowDagViewEdge, WorkflowDagViewNode, WorkflowDagViewPosition, WorkflowDagViewport, } from "../types/workflow";
|
|
3
|
+
export type WorkflowDefinitionStatus = "DRAFT" | "PUBLISHED";
|
|
4
|
+
export type WorkflowInstanceStatus = "PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED";
|
|
5
|
+
export type WorkflowTaskStatus = "PENDING" | "QUEUED" | "RUNNING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
6
|
+
export type WorkflowOutputTarget = "SCENE_LAYER" | "SCENE_RESOURCE" | "LIBRARY";
|
|
7
|
+
export type WorkflowOutputIntegrationStatus = "PENDING" | "DONE" | "FAILED";
|
|
8
|
+
export interface WorkflowDefinitionDto {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
sceneId?: string | null;
|
|
12
|
+
status: WorkflowDefinitionStatus;
|
|
13
|
+
dagConfig: WorkflowDagConfig;
|
|
14
|
+
createdAt?: string | null;
|
|
15
|
+
updatedAt?: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface WorkflowInstanceDto {
|
|
18
|
+
id: string;
|
|
19
|
+
definitionId: string;
|
|
20
|
+
status: WorkflowInstanceStatus;
|
|
21
|
+
createdAt?: string | null;
|
|
22
|
+
updatedAt?: string | null;
|
|
23
|
+
startedAt?: string | null;
|
|
24
|
+
completedAt?: string | null;
|
|
25
|
+
}
|
|
26
|
+
export interface WorkflowTaskInstanceDto {
|
|
27
|
+
id?: string | null;
|
|
28
|
+
taskInstanceId?: string | null;
|
|
29
|
+
instanceId?: string | null;
|
|
30
|
+
nodeId: string;
|
|
31
|
+
status: WorkflowTaskStatus;
|
|
32
|
+
inputs?: Record<string, unknown> | null;
|
|
33
|
+
outputs?: Record<string, unknown> | null;
|
|
34
|
+
errorMessage?: string | null;
|
|
35
|
+
}
|
|
36
|
+
export interface WorkflowInstanceOutputDto {
|
|
37
|
+
nodeId: string;
|
|
38
|
+
fileId: string;
|
|
39
|
+
fileName?: string | null;
|
|
40
|
+
datasetType?: string | null;
|
|
41
|
+
primary?: boolean | null;
|
|
42
|
+
extracted?: boolean | null;
|
|
43
|
+
extractTarget?: WorkflowOutputTarget | null;
|
|
44
|
+
extractRef?: string | null;
|
|
45
|
+
integrationStatus?: WorkflowOutputIntegrationStatus | null;
|
|
46
|
+
integrationDetail?: string | null;
|
|
47
|
+
}
|
|
48
|
+
export interface WorkflowToolInputSlotDto {
|
|
49
|
+
slotKey: string;
|
|
50
|
+
name?: string | null;
|
|
51
|
+
description?: string | null;
|
|
52
|
+
dataType?: string | null;
|
|
53
|
+
bindNodeId?: string | null;
|
|
54
|
+
bindInputKey?: string | null;
|
|
55
|
+
optional?: boolean | null;
|
|
56
|
+
}
|
|
57
|
+
export interface WorkflowToolOutputSlotDto {
|
|
58
|
+
slotKey: string;
|
|
59
|
+
name?: string | null;
|
|
60
|
+
description?: string | null;
|
|
61
|
+
bindNodeId?: string | null;
|
|
62
|
+
/**
|
|
63
|
+
* **Added by Stage 14 Y6 (W4).** `ToolOutputSlot` has carried it since S11b
|
|
64
|
+
* (`ToolOutputSlot.java:8-18`); this type did not, so no client could publish
|
|
65
|
+
* one and every published tool's outputs served `data_type: "file"`.
|
|
66
|
+
*
|
|
67
|
+
* The chain: `inferDraft` builds output slots through the 4-arg constructor
|
|
68
|
+
* (`WorkflowToolSchemaService.java:67`) so an *inferred* slot is `null`,
|
|
69
|
+
* `compileToolSchema` then omits `x-data-type` (`:93`), and `ui_schema.py`'s
|
|
70
|
+
* `_resolve_data_type` falls back to `canonical_data_type(None) == "file"`. The
|
|
71
|
+
* generated dialog for a published recipe therefore showed a file picker where
|
|
72
|
+
* the author declared a raster. Pascal on the wire (F14.1) — see
|
|
73
|
+
* `ngisSlotDataType`.
|
|
74
|
+
*/
|
|
75
|
+
dataType?: string | null;
|
|
76
|
+
}
|
|
77
|
+
export interface WorkflowToolDraftDto {
|
|
78
|
+
inputSlots: WorkflowToolInputSlotDto[];
|
|
79
|
+
outputSlots: WorkflowToolOutputSlotDto[];
|
|
80
|
+
}
|
|
81
|
+
export interface CreateWorkflowToolPayload {
|
|
82
|
+
definitionId: string;
|
|
83
|
+
name: string;
|
|
84
|
+
description?: string;
|
|
85
|
+
inputSlots: WorkflowToolInputSlotDto[];
|
|
86
|
+
outputSlots: WorkflowToolOutputSlotDto[];
|
|
87
|
+
summary?: string;
|
|
88
|
+
useCases?: string[];
|
|
89
|
+
synonyms?: string[];
|
|
90
|
+
domain?: string[];
|
|
91
|
+
operationType?: string[];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* `WorkflowToolDto` (`WorkflowToolDto.java`).
|
|
95
|
+
*
|
|
96
|
+
* **The published tool's own id is `id`; `toolId` is a phantom** — the server
|
|
97
|
+
* record has no such component and never sends one. It is kept because it costs
|
|
98
|
+
* nothing and a reader may still be checking for it, but a caller that reads only
|
|
99
|
+
* `toolId` gets `undefined` on every publish. Stage 14 Y6 added the four real
|
|
100
|
+
* components that were missing, above all `registryVersion`.
|
|
101
|
+
*/
|
|
102
|
+
export interface WorkflowToolDto {
|
|
103
|
+
id?: string | null;
|
|
104
|
+
/** @deprecated The server sends `id`. See the note above. */
|
|
105
|
+
toolId?: string | null;
|
|
106
|
+
name?: string | null;
|
|
107
|
+
description?: string | null;
|
|
108
|
+
sourceDefinitionId?: string | null;
|
|
109
|
+
inputSlots?: WorkflowToolInputSlotDto[] | null;
|
|
110
|
+
outputSlots?: WorkflowToolOutputSlotDto[] | null;
|
|
111
|
+
visibility?: string | null;
|
|
112
|
+
status?: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* The **model-registry** tool version, assigned by geoanalysis' `UpsertWorkflowTool`
|
|
115
|
+
* and written back inside the publish transaction
|
|
116
|
+
* (`WorkflowToolService.java:373-374`), so it is present on the publish
|
|
117
|
+
* response. This is the number a `tool`-kind extension version pins as
|
|
118
|
+
* `CreateReferenceVersionRequest.toolVersion` — a `Long` here and an `Integer`
|
|
119
|
+
* there — and it is **not** a node's `toolVersion` pin, which the same service
|
|
120
|
+
* re-resolves per node at publish.
|
|
121
|
+
*/
|
|
122
|
+
registryVersion?: number | null;
|
|
123
|
+
[key: string]: unknown;
|
|
124
|
+
}
|
|
125
|
+
export interface InvokeWorkflowToolPayload {
|
|
126
|
+
inputs: Record<string, string>;
|
|
127
|
+
sceneId?: string;
|
|
128
|
+
outputMode?: "ADD_LAYER" | "UPDATE_RESOURCE" | "LIBRARY";
|
|
129
|
+
targetResourceId?: string;
|
|
130
|
+
}
|
|
131
|
+
export interface InvokeWorkflowToolResult {
|
|
132
|
+
instanceId: string;
|
|
133
|
+
status?: WorkflowInstanceStatus | null;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* `PATCH /api/workflows/tools/{toolId}/visibility` — the sharing leg (Stage 14
|
|
137
|
+
* Y6, F14.6).
|
|
138
|
+
*
|
|
139
|
+
* `PublishToolRequest` carries **no** visibility: `publish` hardcodes
|
|
140
|
+
* `PRIVATE`/`ACTIVE` (`WorkflowToolService.java:120-121`), so making a published
|
|
141
|
+
* recipe visible to anyone else is always a second call. The values are
|
|
142
|
+
* case-sensitive and validated against `Set.of("PRIVATE","PUBLIC")`
|
|
143
|
+
* (`:156-158`), refusing with `"visibility must be PUBLIC or PRIVATE"`;
|
|
144
|
+
* `GROUP` — legal on an *extension* (`ExtensionVisibility`) — is **not** legal
|
|
145
|
+
* here, which is why this union is two values and not three.
|
|
146
|
+
*/
|
|
147
|
+
export type WorkflowToolVisibility = "PRIVATE" | "PUBLIC";
|
|
148
|
+
export interface SetWorkflowToolVisibilityPayload {
|
|
149
|
+
visibility: WorkflowToolVisibility;
|
|
150
|
+
}
|
|
151
|
+
interface DefinitionMutationQuery {
|
|
152
|
+
name?: string | null;
|
|
153
|
+
sceneId?: string | null;
|
|
154
|
+
[key: string]: string | null | undefined;
|
|
155
|
+
}
|
|
156
|
+
interface ExtractOutputParams {
|
|
157
|
+
nodeId: string;
|
|
158
|
+
fileId?: string;
|
|
159
|
+
target: WorkflowOutputTarget;
|
|
160
|
+
sceneId?: string;
|
|
161
|
+
resourceId?: string;
|
|
162
|
+
name?: string;
|
|
163
|
+
folderId?: string;
|
|
164
|
+
}
|
|
165
|
+
export declare const workflowApi: {
|
|
166
|
+
createDefinition(query: DefinitionMutationQuery, dagConfig: WorkflowDagConfig): Promise<WorkflowDefinitionDto>;
|
|
167
|
+
updateDefinition(definitionId: string, query: DefinitionMutationQuery, dagConfig: WorkflowDagConfig): Promise<WorkflowDefinitionDto>;
|
|
168
|
+
listDefinitions(): Promise<WorkflowDefinitionDto[]>;
|
|
169
|
+
getDefinition(definitionId: string): Promise<WorkflowDefinitionDto>;
|
|
170
|
+
getToolDraft(definitionId: string): Promise<WorkflowToolDraftDto>;
|
|
171
|
+
publishDefinition(definitionId: string): Promise<WorkflowDefinitionDto>;
|
|
172
|
+
runDefinition(definitionId: string, globalContext?: Record<string, unknown>): Promise<WorkflowInstanceDto>;
|
|
173
|
+
getInstance(instanceId: string): Promise<WorkflowInstanceDto>;
|
|
174
|
+
getInstanceTasks(instanceId: string): Promise<WorkflowTaskInstanceDto[]>;
|
|
175
|
+
getInstanceChildren(instanceId: string): Promise<WorkflowInstanceDto[]>;
|
|
176
|
+
cancelInstance(instanceId: string): Promise<void>;
|
|
177
|
+
getInstanceOutputs(instanceId: string): Promise<WorkflowInstanceOutputDto[]>;
|
|
178
|
+
extractOutput(instanceId: string, payload: ExtractOutputParams): Promise<void>;
|
|
179
|
+
createTool(payload: CreateWorkflowToolPayload): Promise<WorkflowToolDto>;
|
|
180
|
+
invokeTool(toolId: string, payload: InvokeWorkflowToolPayload): Promise<InvokeWorkflowToolResult>;
|
|
181
|
+
/**
|
|
182
|
+
* Owner-only sharing. `200 WorkflowToolDto` — not `204`, and not the
|
|
183
|
+
* definition.
|
|
184
|
+
*
|
|
185
|
+
* The visibility change is propagated to the geoanalysis registry over gRPC
|
|
186
|
+
* inside the same transaction, and a registry failure is surfaced as a
|
|
187
|
+
* **`502`** rather than swallowed (`WorkflowToolService.java:162-171`), so a
|
|
188
|
+
* caller that treats any non-2xx as "not shared" is telling the truth.
|
|
189
|
+
*/
|
|
190
|
+
setToolVisibility(toolId: string, visibility: WorkflowToolVisibility): Promise<WorkflowToolDto>;
|
|
191
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type GisAttributeTableProps } from "../../features/gis/components/GisAttributeTable";
|
|
2
|
+
import type { NgisHostAPI } from "../../sdk/host-api";
|
|
3
|
+
/** The member the wrapper forwards straight through, typed from the source
|
|
4
|
+
* of truth so a change to the grid's signature is a compile error here. */
|
|
5
|
+
type ForwardedGridProps = Pick<GisAttributeTableProps, "onHighlight">;
|
|
6
|
+
export interface AttributeTableProps {
|
|
7
|
+
/** The 0.4 facade — always the one `createGisPluginHostFactory` minted. */
|
|
8
|
+
host: NgisHostAPI;
|
|
9
|
+
/** The flow port id (F14.5). Also seeds the control's DOM id. */
|
|
10
|
+
id?: string;
|
|
11
|
+
/** Plugin-authored; rendered **literally** (F13.11). Falls back to the resolved
|
|
12
|
+
* resource's own name for the grid's header when omitted. */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** The `resource` in port's value — a **file** id (F14.5). Inside a `<Flow>`
|
|
15
|
+
* this may be a reference (`"@dem"`); `"@@"` opens a literal. */
|
|
16
|
+
resource: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Optional map highlight. Supplied by an author who knows which layer draws
|
|
19
|
+
* this resource — see the header for why the facade cannot work that out. When
|
|
20
|
+
* absent, a selection that would have highlighted renders a reason.
|
|
21
|
+
*/
|
|
22
|
+
onHighlight?: ForwardedGridProps["onHighlight"];
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function AttributeTable({ host, id, label, resource: resourceProp, onHighlight, className, }: AttributeTableProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { NgisHostAPI } from "../../sdk/host-api";
|
|
2
|
+
import { type NgisBatchConfig, type NgisBatchRunReport } from "./batch-model";
|
|
3
|
+
import { type NgisRecipe } from "./w4-contracts";
|
|
4
|
+
export interface BatchTableProps {
|
|
5
|
+
host: NgisHostAPI;
|
|
6
|
+
/** Scope for every cell's node id (F14.5 / CORRECTION 10). Also the DOM id. */
|
|
7
|
+
id?: string;
|
|
8
|
+
/** Plugin-authored; rendered **literally** (F13.11). */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** The one tool every row runs. `null` renders a reason, not an empty grid. */
|
|
11
|
+
toolId: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* A published recipe whose **promoted inputs are the columns** (F14.21),
|
|
14
|
+
* through the seam's `recipeColumns`. A recipe input the published tool does
|
|
15
|
+
* not declare is surfaced, never silently dropped.
|
|
16
|
+
*/
|
|
17
|
+
recipe?: NgisRecipe;
|
|
18
|
+
/** Rows to open with, when there is no `config`. At least one. */
|
|
19
|
+
rows?: number;
|
|
20
|
+
/**
|
|
21
|
+
* A saved batch, loaded when this value's identity changes. Parsed, so an
|
|
22
|
+
* unknown `batchVersion` **refuses** rather than best-efforting (F14.21).
|
|
23
|
+
*/
|
|
24
|
+
config?: NgisBatchConfig | null;
|
|
25
|
+
/**
|
|
26
|
+
* Every change, as JSON-ready data — the save leg.
|
|
27
|
+
*
|
|
28
|
+
* The table does **not** write to `host.storage` itself, and that is a finding
|
|
29
|
+
* rather than a shortcut: `NgisStorageLeg` is one opaque blob per (user,
|
|
30
|
+
* extension) with no key namespace (`host-api.ts:118-127`), so a component that
|
|
31
|
+
* persisted itself there would overwrite the whole plugin's settings. The author
|
|
32
|
+
* owns the slot; this reports the value.
|
|
33
|
+
*/
|
|
34
|
+
onConfigChange?: (config: NgisBatchConfig) => void;
|
|
35
|
+
/** Task ids, in row order, after a run. Only the rows that actually submitted. */
|
|
36
|
+
onSubmitted?: (taskIds: readonly string[]) => void;
|
|
37
|
+
/** One report per explicit run or retry, for host-owned summaries. */
|
|
38
|
+
onRunReport?: (report: NgisBatchRunReport) => void;
|
|
39
|
+
outputMode?: "ADD_LAYER" | "UPDATE_RESOURCE";
|
|
40
|
+
sceneId?: string | null;
|
|
41
|
+
/** Lab-scene optimistic fence. Ordinary scene batches leave this absent. */
|
|
42
|
+
expectedSceneGeneration?: number;
|
|
43
|
+
className?: string;
|
|
44
|
+
/** Class for portalled `<Select>` content. A table of Selects needs this. */
|
|
45
|
+
contentClassName?: string;
|
|
46
|
+
}
|
|
47
|
+
export declare function BatchTable({ host, id, label, toolId, recipe, rows, config, onConfigChange, onSubmitted, onRunReport, outputMode, sceneId, expectedSceneGeneration, className, contentClassName, }: BatchTableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { NgisChartSpec } from "../../sdk/host-api";
|
|
2
|
+
import { type NgisChartTheme } from "./stat-chart-model";
|
|
3
|
+
export interface ChartCanvasProps {
|
|
4
|
+
spec: NgisChartSpec;
|
|
5
|
+
theme: NgisChartTheme;
|
|
6
|
+
/** The folded-pie tail's segment name — a host string, translated by the
|
|
7
|
+
* caller, because this file holds no copy. */
|
|
8
|
+
otherLabel: string;
|
|
9
|
+
/** CSS height. Sized to include the axis band, so the card never grows a
|
|
10
|
+
* nested scrollbar to reach the x labels. */
|
|
11
|
+
height?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function ChartCanvas({ spec, theme, otherLabel, height, className, }: ChartCanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { NgisHostAPI } from "../../sdk/host-api";
|
|
2
|
+
import type { NgisBounds } from "../../sdk/map-api";
|
|
3
|
+
import { type NgisExtentMode } from "./picker-data";
|
|
4
|
+
export interface ExtentPickerProps {
|
|
5
|
+
host: NgisHostAPI;
|
|
6
|
+
/** The flow port id (F14.5, `extent` kind). Also seeds the control's DOM id. */
|
|
7
|
+
id?: string;
|
|
8
|
+
/** Plugin-authored; rendered **literally** (F13.11). */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Default `"draw"`. `"choose"` renders the public draw/viewport choice. */
|
|
11
|
+
mode?: NgisExtentMode | "choose";
|
|
12
|
+
/**
|
|
13
|
+
* `manual` keeps the explicit capture button. `automatic` captures the
|
|
14
|
+
* viewport immediately and on camera changes, or starts a rectangle draw and
|
|
15
|
+
* commits whenever the draw snapshot changes.
|
|
16
|
+
*/
|
|
17
|
+
capture?: "manual" | "automatic";
|
|
18
|
+
value: NgisBounds | null;
|
|
19
|
+
onChange: (value: NgisBounds | null) => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function ExtentPicker({ host, id, label, mode, capture: captureBehavior, value, onChange, className, }: ExtentPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { NgisHostAPI } from "../../sdk/host-api";
|
|
2
|
+
export interface FieldSelectProps {
|
|
3
|
+
host: NgisHostAPI;
|
|
4
|
+
/** The flow port id (F14.5). Also seeds the control's DOM id. */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Plugin-authored; rendered **literally** (F13.11). */
|
|
7
|
+
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The parent resource port's current value — a **file id**. `null` while the
|
|
10
|
+
* parent is unbound, which is a state this control names rather than hides.
|
|
11
|
+
*
|
|
12
|
+
* Inside a `<Flow>` this may instead be a **reference** (`"@dem"`), which is
|
|
13
|
+
* resolved through the `parent` in port. `"@@"` opens a literal, for the file
|
|
14
|
+
* id that really does start with `@`.
|
|
15
|
+
*/
|
|
16
|
+
parentFileId: string | null;
|
|
17
|
+
value: string | null;
|
|
18
|
+
onChange: (value: string | null) => void;
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Class for the portalled `<Select>` content — see `ResourceSelect`. */
|
|
21
|
+
contentClassName?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function FieldSelect({ host, id, label, parentFileId, value, onChange, className, contentClassName, }: FieldSelectProps): import("react/jsx-runtime").JSX.Element;
|