@ngis/plugin-sdk 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 +31 -0
- package/dist/index.cjs +76 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.mjs +102 -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/domain/algorithms/deck-layer-style.d.ts +34 -0
- package/dist/src/domain/algorithms/maplibre-style.d.ts +63 -0
- package/dist/src/domain/algorithms/raster-color-ramps.d.ts +37 -0
- package/dist/src/domain/algorithms/scene-layer-type.d.ts +25 -0
- package/dist/src/domain/algorithms/symbol-compile.d.ts +100 -0
- package/dist/src/domain/algorithms/symbol-params.d.ts +90 -0
- package/dist/src/domain/map/bounds.d.ts +8 -0
- package/dist/src/domain/map/constants.d.ts +40 -0
- package/dist/src/domain/map/layer-builders.d.ts +32 -0
- package/dist/src/domain/map/rendered-layers.d.ts +30 -0
- package/dist/src/domain/map/style-ready.d.ts +24 -0
- package/dist/src/domain/map/tile-url.d.ts +20 -0
- package/dist/src/domain/map/types.d.ts +128 -0
- package/dist/src/domain/models/deck-layer-style.d.ts +211 -0
- package/dist/src/domain/models/scene-layer-type.d.ts +23 -0
- package/dist/src/domain/models/symbol.d.ts +424 -0
- package/dist/src/lib/api.d.ts +82 -0
- package/dist/src/lib/auth-session.d.ts +22 -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/sdk/commands.d.ts +113 -0
- package/dist/src/sdk/context/keys.d.ts +148 -0
- package/dist/src/sdk/context/publishers.d.ts +198 -0
- package/dist/src/sdk/context/store.d.ts +78 -0
- package/dist/src/sdk/context/when.d.ts +69 -0
- package/dist/src/sdk/contributions/dispatch.d.ts +78 -0
- package/dist/src/sdk/contributions/panel-id.d.ts +25 -0
- package/dist/src/sdk/contributions/registry.d.ts +199 -0
- package/dist/src/sdk/contributions/symbol-renderers.d.ts +107 -0
- package/dist/src/sdk/contributions/types.d.ts +288 -0
- package/dist/src/sdk/contributions/views-bridge.d.ts +92 -0
- package/dist/src/sdk/define-plugin.d.ts +17 -0
- package/dist/src/sdk/facets/storage.d.ts +152 -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/sdk/plugin.d.ts +145 -0
- package/dist/src/sdk/rail-tools.d.ts +58 -0
- package/dist/src/sdk/scopes.d.ts +158 -0
- package/dist/src/systems/renderer/DeckSceneRenderer.d.ts +26 -0
- package/dist/src/systems/renderer/FlowFieldLayer.d.ts +68 -0
- package/dist/src/systems/renderer/LayerRendererRegistry.d.ts +132 -0
- package/dist/src/systems/renderer/authenticated-deck-load.d.ts +4 -0
- package/dist/src/systems/renderer/deck/deck-layer-builders.d.ts +29 -0
- package/dist/src/systems/renderer/deck/deck-layer-helpers.d.ts +21 -0
- package/dist/src/systems/renderer/deck/mvt-point-aggregation-layer.d.ts +107 -0
- package/dist/src/systems/renderer/flow-field/flow-field-resources.d.ts +84 -0
- package/dist/src/systems/renderer/flow-field/flow-field-shaders.d.ts +4 -0
- package/dist/src/systems/renderer/symbol/SpriteRegistry.d.ts +34 -0
- package/dist/src/systems/renderer/symbol/entries.d.ts +67 -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/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2026 NeoGIS contributors
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @ngis/plugin-sdk
|
|
2
|
+
|
|
3
|
+
The public, types-first authoring contract for NeoGIS map plugins.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install --save-dev @ngis/plugin-sdk
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { defineNgisPlugin, type NgisPlugin } from "@ngis/plugin-sdk";
|
|
11
|
+
|
|
12
|
+
const plugin: NgisPlugin = defineNgisPlugin({
|
|
13
|
+
manifest: {
|
|
14
|
+
id: "com.example.my-plugin",
|
|
15
|
+
name: "My plugin",
|
|
16
|
+
version: "0.1.0",
|
|
17
|
+
minNgisVersion: "0.4.0",
|
|
18
|
+
capabilities: {},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export default plugin;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Plugin builds must leave `@ngis/plugin-sdk` external. The running NeoGIS host
|
|
26
|
+
provides the runtime through its plugin import map. The npm package supplies the
|
|
27
|
+
real public declarations plus small host-delegating shims; bundling it into a
|
|
28
|
+
plugin would create a runtime copy that is disconnected from the host.
|
|
29
|
+
|
|
30
|
+
The package version matches `NGIS_MAP_API_VERSION`. Use
|
|
31
|
+
`create-ngis-plugin` for a complete buildable starter.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Generated by scripts/build.mjs from the real NGIS_MAP_API_VERSION (src/sdk/map-api.ts) —
|
|
2
|
+
// do not hand-edit; the only runtime code this package ships (see src/index.ts's doc comment).
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const NGIS_EXTERNALS = "__NGIS_PLUGIN_EXTERNALS__";
|
|
6
|
+
function hostValue(name) {
|
|
7
|
+
const sdk = globalThis[NGIS_EXTERNALS] && globalThis[NGIS_EXTERNALS]["@ngis/plugin-sdk"];
|
|
8
|
+
if (!sdk || sdk[name] === undefined) {
|
|
9
|
+
throw new Error(
|
|
10
|
+
"[ngis] @ngis/plugin-sdk." + name + " is host runtime: it is provided by the running NGIS " +
|
|
11
|
+
"frontend through globalThis." + NGIS_EXTERNALS + ". Leave \"@ngis/plugin-sdk\" external in your " +
|
|
12
|
+
"bundle (the host's import map resolves it) instead of bundling this file."
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
return sdk[name];
|
|
16
|
+
}
|
|
17
|
+
exports.NGIS_MAP_API_VERSION = "0.4.0";
|
|
18
|
+
exports.defineNgisPlugin = function defineNgisPlugin(plugin) {
|
|
19
|
+
return plugin;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "reactPanel", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: () => hostValue("reactPanel"),
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "contributedViewPanelId", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: () => hostValue("contributedViewPanelId"),
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "CONTRIBUTED_VIEW_PANEL_PREFIX", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: () => hostValue("CONTRIBUTED_VIEW_PANEL_PREFIX"),
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "compileWhenExpression", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: () => hostValue("compileWhenExpression"),
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "NgisScopeError", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: () => hostValue("NgisScopeError"),
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "NgisStorageError", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: () => hostValue("NgisStorageError"),
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, "NgisContextKeyError", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: () => hostValue("NgisContextKeyError"),
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "NgisWhenSyntaxError", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: () => hostValue("NgisWhenSyntaxError"),
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "NGIS_DATA_TYPES", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: () => hostValue("NGIS_DATA_TYPES"),
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, "NGIS_DATA_TYPE_TO_RESOURCE_TYPES", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: () => hostValue("NGIS_DATA_TYPE_TO_RESOURCE_TYPES"),
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "NGIS_MAX_STATUS_ITEMS_PER_PLUGIN", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: () => hostValue("NGIS_MAX_STATUS_ITEMS_PER_PLUGIN"),
|
|
64
|
+
});
|
|
65
|
+
Object.defineProperty(exports, "NGIS_MAX_VISIBLE_STATUS_ITEMS", {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: () => hostValue("NGIS_MAX_VISIBLE_STATUS_ITEMS"),
|
|
68
|
+
});
|
|
69
|
+
Object.defineProperty(exports, "NGIS_MAX_MENU_ITEMS_PER_PLUGIN_PER_SLOT", {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
get: () => hostValue("NGIS_MAX_MENU_ITEMS_PER_PLUGIN_PER_SLOT"),
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(exports, "NGIS_MAX_SYMBOL_RENDERERS_PER_PLUGIN", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: () => hostValue("NGIS_MAX_SYMBOL_RENDERERS_PER_PLUGIN"),
|
|
76
|
+
});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@ngis/plugin-sdk` — the external DevKit distribution of the NGIS plugin
|
|
3
|
+
* contract (Stage 11 E3, `docs/design-extension-platform.md` §13, ED17;
|
|
4
|
+
* completed to **F14.13** by Stage 14 Y2).
|
|
5
|
+
*
|
|
6
|
+
* Types-first, on purpose: almost everything below is a `type` re-export
|
|
7
|
+
* straight off `ngis-frontend`'s real `src/sdk/` — the single source of truth
|
|
8
|
+
* an external plugin author compiles against — so version skew between this
|
|
9
|
+
* package and the running frontend stays a `minNgisVersion` negotiation problem
|
|
10
|
+
* (handled at runtime by `NgisPluginRuntime`), never a
|
|
11
|
+
* hand-copied-types-drifted-from-the-real-thing problem.
|
|
12
|
+
*
|
|
13
|
+
* ## The rule this file obeys (F14.13, closing `V-116`)
|
|
14
|
+
*
|
|
15
|
+
* **Every type name reachable from `NgisHostAPI`'s declaration graph is
|
|
16
|
+
* re-exported here.** Before Stage 14 it published the 0.3 map facade, the
|
|
17
|
+
* panel types and the plugin/manifest types and *none* of the 0.4 facet type
|
|
18
|
+
* names, so all three dogfood packages carried a `src/host-types.ts` that
|
|
19
|
+
* recovered `NgisTaskState` and friends structurally
|
|
20
|
+
* (`Awaited<ReturnType<Host["tasks"]["list"]>>[number]`) — reachable by the
|
|
21
|
+
* compiler, unnameable by the author. Those three files are deleted; this list
|
|
22
|
+
* is what replaced them.
|
|
23
|
+
*
|
|
24
|
+
* Two names are deliberately **not** here and neither is an oversight:
|
|
25
|
+
* `MapLibreMap` (`getMap()`'s return) belongs to `maplibre-gl`, which an author
|
|
26
|
+
* imports directly, and the `NgisValidate*Body` / `NgisToolSearch*` wire DTOs
|
|
27
|
+
* are the server's REST shapes, not reachable from any facet signature.
|
|
28
|
+
*
|
|
29
|
+
* ## The exported *values* are a closed list (F14.13)
|
|
30
|
+
*
|
|
31
|
+
* Fifteen names, and adding a sixteenth is a contract amendment. Values are the
|
|
32
|
+
* risky half — they are what a bundle actually links against — so they are also
|
|
33
|
+
* exactly what `installPluginExternals()` and
|
|
34
|
+
* `public/plugin-externals/plugin-sdk.mjs` must carry, and those three lists
|
|
35
|
+
* move together or a plugin fails at link time in the browser having compiled
|
|
36
|
+
* clean.
|
|
37
|
+
*
|
|
38
|
+
* `NGIS_SCOPE_MEMBERS` and `NGIS_UNGATED_MEMBERS` stay **host-internal**: they
|
|
39
|
+
* are the enforcement table a plugin is judged against, not an authoring
|
|
40
|
+
* surface, and publishing them invites them to be read as permission.
|
|
41
|
+
*
|
|
42
|
+
* ## Versions are locked, not aligned (F14.13, closing `V-162`)
|
|
43
|
+
*
|
|
44
|
+
* ```
|
|
45
|
+
* @ngis/plugin-sdk version === @ngis/plugin-ui version === NGIS_MAP_API_VERSION === "0.4.0"
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* One string. The types below are traced from the live program, so any
|
|
49
|
+
* divergence is a lie about what the tarball contains.
|
|
50
|
+
*
|
|
51
|
+
* This file is NOT built by `tsc`/bundled directly into the published
|
|
52
|
+
* package — `scripts/build.mjs` type-checks it (and its transitive closure)
|
|
53
|
+
* against the real frontend program, then flattens the emitted declarations
|
|
54
|
+
* into `dist/`. Do not hand-copy any type below; add a re-export line here
|
|
55
|
+
* and let the build trace it.
|
|
56
|
+
*/
|
|
57
|
+
export { NGIS_MAP_API_VERSION, type NgisMapAPI, type NgisMapAPIBindings, type NgisLayersFacet, type NgisCameraFacet, type NgisSelectionFacet, type NgisHighlightFacet, type NgisDrawFacet, type NgisMeasureFacet, type NgisEventsFacet, type NgisLayerSummary, type NgisMapView, type NgisBounds, type NgisHighlight, type NgisMapEventName, type NgisUnsubscribe, } from "./src/sdk/map-api";
|
|
58
|
+
export { reactPanel, type WorkspacePanelRegistry, type PanelSlot, type PanelRegistration, type PanelRenderFn, type PanelRenderContext, type PanelDisposer, type ReactPanelRenderFn, } from "./src/sdk/panels";
|
|
59
|
+
export { type LayerRendererEntry, type LayerRenderContext, type SceneLayerRenderInput, } from "./src/systems/renderer/LayerRendererRegistry";
|
|
60
|
+
export { type GisDynamicToolDef, } from "./src/sdk/rail-tools";
|
|
61
|
+
export { type GisRailInvokeContext, type GisRailApi, type GisRailStoreHandle, type GisRailPanelControl, type GisDrawMode, type GisMeasureKind, } from "./src/types/gis";
|
|
62
|
+
export { type CommandInvokeContext, type CommandRegistration, } from "./src/sdk/commands";
|
|
63
|
+
export { type NgisPlugin, type NgisPluginCapabilities, type NgisPluginDisposer, type NgisPluginHost, type NgisPluginManifest, } from "./src/sdk/plugin";
|
|
64
|
+
export { type NgisHostAPI, type NgisVizFacet, type NgisChartKind, type NgisChartSeries, type NgisChartSpec, type NgisStorageFacet, type NgisStorageLeg, type NgisStorageWriteFailure, type NgisHostContextFacet, type NgisHostContextValue, type NgisUiFacet, type NgisQuickPickItem, type NgisProgressHandle, type NgisCommandsFacet, type NgisCommandSummary, } from "./src/sdk/host-api";
|
|
65
|
+
export { NGIS_DATA_TYPES, NGIS_DATA_TYPE_TO_RESOURCE_TYPES, type NgisDataType, type NgisSceneFacet, type NgisSceneInfo, type NgisResourcesFacet, type NgisResourceSummary, type NgisResourceDetail, type NgisResourceField, type NgisResourceType, type NgisModelsFacet, type NgisModelSummary, type NgisModelboxNode, type NgisModelSchema, type NgisModelValidateRequest, type NgisModelSearchRequest, type NgisModelSearchResult, type NgisTasksFacet, type NgisTaskRunRequest, type NgisTaskHandle, type NgisTaskState, type NgisTaskStatus, type NgisTaskStage, type NgisTaskOutput, type NgisTaskWatcher, } from "./src/sdk/facets/types";
|
|
66
|
+
/** `NgisSceneInfo.type`. Declared in the app's scene client, reachable from the
|
|
67
|
+
* facade, and therefore nameable here — the whole point of the F14.13 rule. */
|
|
68
|
+
export { type SceneType } from "./src/api/scenes";
|
|
69
|
+
export { type NgisToolUiSchema, type NgisToolUiParam, type NgisUiSchemaChoice, type NgisUiSchemaDependency, type NgisUiSchemaValueType, type NgisWidgetKey, type NgisParamRole, type NgisExecutionValidation, type NgisExecutionVerdict, type NgisExecutionMode, type NgisOutputMode, type NgisBindingValidation, type NgisBindingValidationEntry, type NgisBindingVerdict, type NgisDatasetBindingWire, } from "./src/types/analysis";
|
|
70
|
+
export { NGIS_MAX_STATUS_ITEMS_PER_PLUGIN, NGIS_MAX_VISIBLE_STATUS_ITEMS, NGIS_MAX_MENU_ITEMS_PER_PLUGIN_PER_SLOT, NGIS_MAX_SYMBOL_RENDERERS_PER_PLUGIN, type NgisContributes, type NgisActivationEvent, type NgisGatedContribution, type NgisMenuContributions, type NgisMenuGroup, type NgisMenuItemContribution, type NgisMenuSlot, type NgisPermissionScope, type NgisSettingsContribution, type NgisSettingsProperty, type NgisSettingsPropertyType, type NgisSettingsScope, type NgisStatusItemContribution, type NgisSymbolRendererContribution, type NgisSymbolRendererGeometry, type NgisSymbolRendererParam, type NgisSymbolRendererParamType, type NgisSymbolRendererSlot, type NgisToolContribution, type NgisToolPreset, type NgisViewContribution, type NgisViewSlot, } from "./src/sdk/contributions/types";
|
|
71
|
+
export type { NgisSymbolLayerDescriptor, NgisSymbolRenderContext, NgisSymbolRendererFn, NgisSymbolRendererModule, } from "./src/sdk/contributions/symbol-renderers";
|
|
72
|
+
export { CONTRIBUTED_VIEW_PANEL_PREFIX, contributedViewPanelId, } from "./src/sdk/contributions/views-bridge";
|
|
73
|
+
export { NgisWhenSyntaxError, compileWhenExpression, type CompiledWhenExpression, type ContextReader, } from "./src/sdk/context/when";
|
|
74
|
+
export { NgisContextKeyError, type NgisContextValue, } from "./src/sdk/context/keys";
|
|
75
|
+
export { NgisScopeError } from "./src/sdk/scopes";
|
|
76
|
+
export { NgisStorageError } from "./src/sdk/facets/storage";
|
|
77
|
+
export { defineNgisPlugin } from "./src/sdk/define-plugin";
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// Generated by scripts/build.mjs from the real NGIS_MAP_API_VERSION (src/sdk/map-api.ts) —
|
|
2
|
+
// do not hand-edit; the only runtime code this package ships (see src/index.ts's doc comment).
|
|
3
|
+
const NGIS_EXTERNALS = "__NGIS_PLUGIN_EXTERNALS__";
|
|
4
|
+
function hostValue(name) {
|
|
5
|
+
const sdk = globalThis[NGIS_EXTERNALS] && globalThis[NGIS_EXTERNALS]["@ngis/plugin-sdk"];
|
|
6
|
+
if (!sdk || sdk[name] === undefined) {
|
|
7
|
+
throw new Error(
|
|
8
|
+
"[ngis] @ngis/plugin-sdk." + name + " is host runtime: it is provided by the running NGIS " +
|
|
9
|
+
"frontend through globalThis." + NGIS_EXTERNALS + ". Leave \"@ngis/plugin-sdk\" external in your " +
|
|
10
|
+
"bundle (the host's import map resolves it) instead of bundling this file."
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
return sdk[name];
|
|
14
|
+
}
|
|
15
|
+
export const NGIS_MAP_API_VERSION = "0.4.0";
|
|
16
|
+
export function defineNgisPlugin(plugin) {
|
|
17
|
+
return plugin;
|
|
18
|
+
}
|
|
19
|
+
export const reactPanel = /* @__PURE__ */ new Proxy(function () {}, {
|
|
20
|
+
get: (_t, key) => Reflect.get(hostValue("reactPanel"), key),
|
|
21
|
+
has: (_t, key) => Reflect.has(hostValue("reactPanel"), key),
|
|
22
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("reactPanel"), self, args),
|
|
23
|
+
construct: (_t, args) => Reflect.construct(hostValue("reactPanel"), args),
|
|
24
|
+
});
|
|
25
|
+
export const contributedViewPanelId = /* @__PURE__ */ new Proxy(function () {}, {
|
|
26
|
+
get: (_t, key) => Reflect.get(hostValue("contributedViewPanelId"), key),
|
|
27
|
+
has: (_t, key) => Reflect.has(hostValue("contributedViewPanelId"), key),
|
|
28
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("contributedViewPanelId"), self, args),
|
|
29
|
+
construct: (_t, args) => Reflect.construct(hostValue("contributedViewPanelId"), args),
|
|
30
|
+
});
|
|
31
|
+
export const CONTRIBUTED_VIEW_PANEL_PREFIX = /* @__PURE__ */ new Proxy(function () {}, {
|
|
32
|
+
get: (_t, key) => Reflect.get(hostValue("CONTRIBUTED_VIEW_PANEL_PREFIX"), key),
|
|
33
|
+
has: (_t, key) => Reflect.has(hostValue("CONTRIBUTED_VIEW_PANEL_PREFIX"), key),
|
|
34
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("CONTRIBUTED_VIEW_PANEL_PREFIX"), self, args),
|
|
35
|
+
construct: (_t, args) => Reflect.construct(hostValue("CONTRIBUTED_VIEW_PANEL_PREFIX"), args),
|
|
36
|
+
});
|
|
37
|
+
export const compileWhenExpression = /* @__PURE__ */ new Proxy(function () {}, {
|
|
38
|
+
get: (_t, key) => Reflect.get(hostValue("compileWhenExpression"), key),
|
|
39
|
+
has: (_t, key) => Reflect.has(hostValue("compileWhenExpression"), key),
|
|
40
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("compileWhenExpression"), self, args),
|
|
41
|
+
construct: (_t, args) => Reflect.construct(hostValue("compileWhenExpression"), args),
|
|
42
|
+
});
|
|
43
|
+
export const NgisScopeError = /* @__PURE__ */ new Proxy(function () {}, {
|
|
44
|
+
get: (_t, key) => Reflect.get(hostValue("NgisScopeError"), key),
|
|
45
|
+
has: (_t, key) => Reflect.has(hostValue("NgisScopeError"), key),
|
|
46
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("NgisScopeError"), self, args),
|
|
47
|
+
construct: (_t, args) => Reflect.construct(hostValue("NgisScopeError"), args),
|
|
48
|
+
});
|
|
49
|
+
export const NgisStorageError = /* @__PURE__ */ new Proxy(function () {}, {
|
|
50
|
+
get: (_t, key) => Reflect.get(hostValue("NgisStorageError"), key),
|
|
51
|
+
has: (_t, key) => Reflect.has(hostValue("NgisStorageError"), key),
|
|
52
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("NgisStorageError"), self, args),
|
|
53
|
+
construct: (_t, args) => Reflect.construct(hostValue("NgisStorageError"), args),
|
|
54
|
+
});
|
|
55
|
+
export const NgisContextKeyError = /* @__PURE__ */ new Proxy(function () {}, {
|
|
56
|
+
get: (_t, key) => Reflect.get(hostValue("NgisContextKeyError"), key),
|
|
57
|
+
has: (_t, key) => Reflect.has(hostValue("NgisContextKeyError"), key),
|
|
58
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("NgisContextKeyError"), self, args),
|
|
59
|
+
construct: (_t, args) => Reflect.construct(hostValue("NgisContextKeyError"), args),
|
|
60
|
+
});
|
|
61
|
+
export const NgisWhenSyntaxError = /* @__PURE__ */ new Proxy(function () {}, {
|
|
62
|
+
get: (_t, key) => Reflect.get(hostValue("NgisWhenSyntaxError"), key),
|
|
63
|
+
has: (_t, key) => Reflect.has(hostValue("NgisWhenSyntaxError"), key),
|
|
64
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("NgisWhenSyntaxError"), self, args),
|
|
65
|
+
construct: (_t, args) => Reflect.construct(hostValue("NgisWhenSyntaxError"), args),
|
|
66
|
+
});
|
|
67
|
+
export const NGIS_DATA_TYPES = /* @__PURE__ */ new Proxy(function () {}, {
|
|
68
|
+
get: (_t, key) => Reflect.get(hostValue("NGIS_DATA_TYPES"), key),
|
|
69
|
+
has: (_t, key) => Reflect.has(hostValue("NGIS_DATA_TYPES"), key),
|
|
70
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("NGIS_DATA_TYPES"), self, args),
|
|
71
|
+
construct: (_t, args) => Reflect.construct(hostValue("NGIS_DATA_TYPES"), args),
|
|
72
|
+
});
|
|
73
|
+
export const NGIS_DATA_TYPE_TO_RESOURCE_TYPES = /* @__PURE__ */ new Proxy(function () {}, {
|
|
74
|
+
get: (_t, key) => Reflect.get(hostValue("NGIS_DATA_TYPE_TO_RESOURCE_TYPES"), key),
|
|
75
|
+
has: (_t, key) => Reflect.has(hostValue("NGIS_DATA_TYPE_TO_RESOURCE_TYPES"), key),
|
|
76
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("NGIS_DATA_TYPE_TO_RESOURCE_TYPES"), self, args),
|
|
77
|
+
construct: (_t, args) => Reflect.construct(hostValue("NGIS_DATA_TYPE_TO_RESOURCE_TYPES"), args),
|
|
78
|
+
});
|
|
79
|
+
export const NGIS_MAX_STATUS_ITEMS_PER_PLUGIN = /* @__PURE__ */ new Proxy(function () {}, {
|
|
80
|
+
get: (_t, key) => Reflect.get(hostValue("NGIS_MAX_STATUS_ITEMS_PER_PLUGIN"), key),
|
|
81
|
+
has: (_t, key) => Reflect.has(hostValue("NGIS_MAX_STATUS_ITEMS_PER_PLUGIN"), key),
|
|
82
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("NGIS_MAX_STATUS_ITEMS_PER_PLUGIN"), self, args),
|
|
83
|
+
construct: (_t, args) => Reflect.construct(hostValue("NGIS_MAX_STATUS_ITEMS_PER_PLUGIN"), args),
|
|
84
|
+
});
|
|
85
|
+
export const NGIS_MAX_VISIBLE_STATUS_ITEMS = /* @__PURE__ */ new Proxy(function () {}, {
|
|
86
|
+
get: (_t, key) => Reflect.get(hostValue("NGIS_MAX_VISIBLE_STATUS_ITEMS"), key),
|
|
87
|
+
has: (_t, key) => Reflect.has(hostValue("NGIS_MAX_VISIBLE_STATUS_ITEMS"), key),
|
|
88
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("NGIS_MAX_VISIBLE_STATUS_ITEMS"), self, args),
|
|
89
|
+
construct: (_t, args) => Reflect.construct(hostValue("NGIS_MAX_VISIBLE_STATUS_ITEMS"), args),
|
|
90
|
+
});
|
|
91
|
+
export const NGIS_MAX_MENU_ITEMS_PER_PLUGIN_PER_SLOT = /* @__PURE__ */ new Proxy(function () {}, {
|
|
92
|
+
get: (_t, key) => Reflect.get(hostValue("NGIS_MAX_MENU_ITEMS_PER_PLUGIN_PER_SLOT"), key),
|
|
93
|
+
has: (_t, key) => Reflect.has(hostValue("NGIS_MAX_MENU_ITEMS_PER_PLUGIN_PER_SLOT"), key),
|
|
94
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("NGIS_MAX_MENU_ITEMS_PER_PLUGIN_PER_SLOT"), self, args),
|
|
95
|
+
construct: (_t, args) => Reflect.construct(hostValue("NGIS_MAX_MENU_ITEMS_PER_PLUGIN_PER_SLOT"), args),
|
|
96
|
+
});
|
|
97
|
+
export const NGIS_MAX_SYMBOL_RENDERERS_PER_PLUGIN = /* @__PURE__ */ new Proxy(function () {}, {
|
|
98
|
+
get: (_t, key) => Reflect.get(hostValue("NGIS_MAX_SYMBOL_RENDERERS_PER_PLUGIN"), key),
|
|
99
|
+
has: (_t, key) => Reflect.has(hostValue("NGIS_MAX_SYMBOL_RENDERERS_PER_PLUGIN"), key),
|
|
100
|
+
apply: (_t, self, args) => Reflect.apply(hostValue("NGIS_MAX_SYMBOL_RENDERERS_PER_PLUGIN"), self, args),
|
|
101
|
+
construct: (_t, args) => Reflect.construct(hostValue("NGIS_MAX_SYMBOL_RENDERERS_PER_PLUGIN"), args),
|
|
102
|
+
});
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { NgisBindingValidation, NgisExecutionValidation, NgisToolSearchResponse, NgisToolUiSchema, NgisValidateBindingsBody, NgisValidateExecutionBody } from "../types/analysis";
|
|
2
|
+
import type { PageResult } from "../types/common";
|
|
3
|
+
export interface AnalysisModelboxNode {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
provider?: string | null;
|
|
7
|
+
parent_id?: string | null;
|
|
8
|
+
children?: AnalysisModelboxNode[] | null;
|
|
9
|
+
}
|
|
10
|
+
export interface AnalysisTool {
|
|
11
|
+
id: string;
|
|
12
|
+
version?: number | null;
|
|
13
|
+
name: string;
|
|
14
|
+
provider?: string | null;
|
|
15
|
+
category?: string | null;
|
|
16
|
+
description?: string | null;
|
|
17
|
+
tags?: string[] | string | null;
|
|
18
|
+
enabled?: boolean | null;
|
|
19
|
+
modelbox_id?: string | null;
|
|
20
|
+
capability_key?: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface AnalysisToolSchemaProperty {
|
|
23
|
+
title?: string | null;
|
|
24
|
+
description?: string | null;
|
|
25
|
+
type?: string | string[] | null;
|
|
26
|
+
format?: string | null;
|
|
27
|
+
enum?: unknown[] | null;
|
|
28
|
+
default?: string | number | boolean | null;
|
|
29
|
+
default_val?: string | number | boolean | null;
|
|
30
|
+
minimum?: number | null;
|
|
31
|
+
maximum?: number | null;
|
|
32
|
+
"x-role"?: "input" | "output" | "option" | string | null;
|
|
33
|
+
"x-data-type"?: "Vector" | "Raster" | "Table" | string | null;
|
|
34
|
+
"x-display-name"?: string | null;
|
|
35
|
+
"x-constraints"?: {
|
|
36
|
+
min?: number | null;
|
|
37
|
+
max?: number | null;
|
|
38
|
+
choices?: unknown[] | null;
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
} | null;
|
|
41
|
+
choices?: unknown[] | null;
|
|
42
|
+
items?: AnalysisToolSchemaProperty | null;
|
|
43
|
+
"x-ngis-type"?: string | null;
|
|
44
|
+
"x-ngis-role"?: string | null;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
export interface AnalysisToolSchema extends AnalysisToolSchemaProperty {
|
|
48
|
+
properties?: Record<string, AnalysisToolSchemaProperty> | null;
|
|
49
|
+
required?: string[] | null;
|
|
50
|
+
}
|
|
51
|
+
export type AnalysisTaskStatus = "QUEUED" | "RUNNING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
52
|
+
export type AnalysisTaskOutputMode = "ADD_LAYER" | "UPDATE_RESOURCE";
|
|
53
|
+
export interface CreateAnalysisTaskParams {
|
|
54
|
+
tool_id: string;
|
|
55
|
+
params: Record<string, string>;
|
|
56
|
+
scene_id?: string;
|
|
57
|
+
expected_scene_generation?: number;
|
|
58
|
+
output_mode?: AnalysisTaskOutputMode;
|
|
59
|
+
target_resource_id?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface AnalysisTask {
|
|
62
|
+
id: string;
|
|
63
|
+
tool_id: string;
|
|
64
|
+
provider?: string | null;
|
|
65
|
+
status: AnalysisTaskStatus;
|
|
66
|
+
params_json?: unknown;
|
|
67
|
+
output_json?: unknown;
|
|
68
|
+
error_message?: string | null;
|
|
69
|
+
log_output?: string | null;
|
|
70
|
+
exit_code?: number | null;
|
|
71
|
+
owner_id?: string | null;
|
|
72
|
+
scene_id?: string | null;
|
|
73
|
+
expected_scene_generation?: number | null;
|
|
74
|
+
integration_status?: "PENDING" | "DONE" | "PARTIAL" | "FAILED" | "SKIPPED" | null;
|
|
75
|
+
integration_detail?: string | null;
|
|
76
|
+
}
|
|
77
|
+
export interface AnalysisTaskOutputFile {
|
|
78
|
+
name?: string | null;
|
|
79
|
+
minio_key?: string | null;
|
|
80
|
+
file_id?: string | null;
|
|
81
|
+
primary?: boolean | null;
|
|
82
|
+
}
|
|
83
|
+
export declare const analysisApi: {
|
|
84
|
+
listModelboxes(): Promise<AnalysisModelboxNode[]>;
|
|
85
|
+
listTools(params?: {
|
|
86
|
+
provider?: string;
|
|
87
|
+
category?: string;
|
|
88
|
+
capability_key?: string;
|
|
89
|
+
modelbox_id?: string;
|
|
90
|
+
recursive?: boolean;
|
|
91
|
+
}, signal?: AbortSignal): Promise<AnalysisTool[]>;
|
|
92
|
+
listModelboxTools(boxId: string, recursive?: boolean): Promise<AnalysisTool[]>;
|
|
93
|
+
/**
|
|
94
|
+
* Paged sibling of `listTools`, for browsing the ~2,300-tool catalog (`/models`).
|
|
95
|
+
*
|
|
96
|
+
* `q` is a server-side substring match over name/description/category/tags. The
|
|
97
|
+
* envelope is the platform-wide `PageResult<T>` shape; the rows are the same
|
|
98
|
+
* snake_case `AnalysisTool` the flat list returns.
|
|
99
|
+
*/
|
|
100
|
+
pageTools(params?: {
|
|
101
|
+
page?: number;
|
|
102
|
+
size?: number;
|
|
103
|
+
q?: string;
|
|
104
|
+
provider?: string;
|
|
105
|
+
category?: string;
|
|
106
|
+
capability_key?: string;
|
|
107
|
+
modelbox_id?: string;
|
|
108
|
+
recursive?: boolean;
|
|
109
|
+
}, signal?: AbortSignal): Promise<PageResult<AnalysisTool>>;
|
|
110
|
+
getTool(toolId: string, signal?: AbortSignal): Promise<AnalysisTool>;
|
|
111
|
+
getToolSchema(toolId: string, signal?: AbortSignal): Promise<AnalysisToolSchema>;
|
|
112
|
+
createTask(params: CreateAnalysisTaskParams, signal?: AbortSignal): Promise<AnalysisTask>;
|
|
113
|
+
getTask(taskId: string, signal?: AbortSignal): Promise<AnalysisTask>;
|
|
114
|
+
getTaskOutputFiles(taskId: string, signal?: AbortSignal): Promise<AnalysisTaskOutputFile[]>;
|
|
115
|
+
cancelTask(taskId: string, signal?: AbortSignal): Promise<void>;
|
|
116
|
+
streamTask(taskId: string, signal?: AbortSignal): Promise<Response>;
|
|
117
|
+
getToolUiSchema(toolId: string, signal?: AbortSignal): Promise<NgisToolUiSchema>;
|
|
118
|
+
validateToolExecution(toolId: string, body: NgisValidateExecutionBody, signal?: AbortSignal): Promise<NgisExecutionValidation>;
|
|
119
|
+
validateToolBindings(toolId: string, body: NgisValidateBindingsBody, signal?: AbortSignal): Promise<NgisBindingValidation>;
|
|
120
|
+
searchTools(params?: AnalysisToolSearchParams, signal?: AbortSignal): Promise<NgisToolSearchResponse>;
|
|
121
|
+
};
|
|
122
|
+
/** Repeated-value filters, named exactly as the server's `Query` params. */
|
|
123
|
+
export interface AnalysisToolSearchParams {
|
|
124
|
+
q?: string;
|
|
125
|
+
limit?: number;
|
|
126
|
+
provider?: readonly string[];
|
|
127
|
+
kind?: readonly string[];
|
|
128
|
+
input_type?: readonly string[];
|
|
129
|
+
output_type?: readonly string[];
|
|
130
|
+
domain?: readonly string[];
|
|
131
|
+
operation_type?: readonly string[];
|
|
132
|
+
modelbox_path?: readonly string[];
|
|
133
|
+
capability_key?: readonly string[];
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Exported for test: the repeated-parameter shape is the whole point of this
|
|
137
|
+
* helper, and asserting it on a built string is cheaper than asserting it on a
|
|
138
|
+
* captured fetch URL.
|
|
139
|
+
*/
|
|
140
|
+
export declare function buildToolSearchQuery(params: AnalysisToolSearchParams): string;
|