@honua/react 0.0.20-alpha.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 +201 -0
- package/README.md +9 -0
- package/contract/analytics-sources.d.ts +149 -0
- package/contract/analytics-sources.d.ts.map +1 -0
- package/contract/analytics-sources.js +235 -0
- package/contract/edit-session.d.ts +203 -0
- package/contract/edit-session.d.ts.map +1 -0
- package/contract/edit-session.js +760 -0
- package/contract/edit-sketch.d.ts +91 -0
- package/contract/edit-sketch.d.ts.map +1 -0
- package/contract/edit-sketch.js +281 -0
- package/contract/index.d.ts +61 -0
- package/contract/index.d.ts.map +1 -0
- package/contract/index.js +51 -0
- package/contract/jobs.d.ts +149 -0
- package/contract/jobs.d.ts.map +1 -0
- package/contract/jobs.js +40 -0
- package/contract/source.d.ts +423 -0
- package/contract/source.d.ts.map +1 -0
- package/contract/source.js +3802 -0
- package/contract/spatial-aggregation.d.ts +336 -0
- package/contract/spatial-aggregation.d.ts.map +1 -0
- package/contract/spatial-aggregation.js +298 -0
- package/contract/temporal.d.ts +455 -0
- package/contract/temporal.d.ts.map +1 -0
- package/contract/temporal.js +146 -0
- package/contract/tiles.d.ts +370 -0
- package/contract/tiles.d.ts.map +1 -0
- package/contract/tiles.js +519 -0
- package/contract/types.d.ts +665 -0
- package/contract/types.d.ts.map +1 -0
- package/contract/types.js +175 -0
- package/contract/widget-source.d.ts +205 -0
- package/contract/widget-source.d.ts.map +1 -0
- package/contract/widget-source.js +1473 -0
- package/control-plane/client.d.ts +95 -0
- package/control-plane/client.d.ts.map +1 -0
- package/control-plane/client.js +374 -0
- package/control-plane/index.d.ts +18 -0
- package/control-plane/index.d.ts.map +1 -0
- package/control-plane/index.js +14 -0
- package/control-plane/types.d.ts +233 -0
- package/control-plane/types.d.ts.map +1 -0
- package/control-plane/types.js +7 -0
- package/core/batch.d.ts +37 -0
- package/core/batch.d.ts.map +1 -0
- package/core/batch.js +79 -0
- package/core/cache-state.d.ts +79 -0
- package/core/cache-state.d.ts.map +1 -0
- package/core/cache-state.js +87 -0
- package/core/client.d.ts +577 -0
- package/core/client.d.ts.map +1 -0
- package/core/client.js +1664 -0
- package/core/compatibility.d.ts +18 -0
- package/core/compatibility.d.ts.map +1 -0
- package/core/compatibility.js +245 -0
- package/core/errors.d.ts +107 -0
- package/core/errors.d.ts.map +1 -0
- package/core/errors.js +156 -0
- package/core/esri-geojson.d.ts +66 -0
- package/core/esri-geojson.d.ts.map +1 -0
- package/core/esri-geojson.js +363 -0
- package/core/geoservices.d.ts +34 -0
- package/core/geoservices.d.ts.map +1 -0
- package/core/geoservices.js +434 -0
- package/core/grpc-adapter.d.ts +23 -0
- package/core/grpc-adapter.d.ts.map +1 -0
- package/core/grpc-adapter.js +688 -0
- package/core/odata.d.ts +347 -0
- package/core/odata.d.ts.map +1 -0
- package/core/odata.js +913 -0
- package/core/ogc-conformance.d.ts +35 -0
- package/core/ogc-conformance.d.ts.map +1 -0
- package/core/ogc-conformance.js +134 -0
- package/core/ogc-features.d.ts +23 -0
- package/core/ogc-features.d.ts.map +1 -0
- package/core/ogc-features.js +114 -0
- package/core/ogc-maps.d.ts +49 -0
- package/core/ogc-maps.d.ts.map +1 -0
- package/core/ogc-maps.js +126 -0
- package/core/ogc-processes.d.ts +118 -0
- package/core/ogc-processes.d.ts.map +1 -0
- package/core/ogc-processes.js +423 -0
- package/core/ogc-records.d.ts +75 -0
- package/core/ogc-records.d.ts.map +1 -0
- package/core/ogc-records.js +251 -0
- package/core/ogc-tiles.d.ts +125 -0
- package/core/ogc-tiles.d.ts.map +1 -0
- package/core/ogc-tiles.js +183 -0
- package/core/path-utils.d.ts +69 -0
- package/core/path-utils.d.ts.map +1 -0
- package/core/path-utils.js +123 -0
- package/core/pbf-decoder.d.ts +39 -0
- package/core/pbf-decoder.d.ts.map +1 -0
- package/core/pbf-decoder.js +702 -0
- package/core/process-runner.d.ts +104 -0
- package/core/process-runner.d.ts.map +1 -0
- package/core/process-runner.js +315 -0
- package/core/protocol-transport.d.ts +76 -0
- package/core/protocol-transport.d.ts.map +1 -0
- package/core/protocol-transport.js +15 -0
- package/core/query-builder.d.ts +261 -0
- package/core/query-builder.d.ts.map +1 -0
- package/core/query-builder.js +538 -0
- package/core/request-pipeline.d.ts +88 -0
- package/core/request-pipeline.d.ts.map +1 -0
- package/core/request-pipeline.js +273 -0
- package/core/spatial-filter.d.ts +93 -0
- package/core/spatial-filter.d.ts.map +1 -0
- package/core/spatial-filter.js +153 -0
- package/core/stac.d.ts +55 -0
- package/core/stac.d.ts.map +1 -0
- package/core/stac.js +229 -0
- package/core/surfaces.d.ts +527 -0
- package/core/surfaces.d.ts.map +1 -0
- package/core/surfaces.js +1917 -0
- package/core/terrain-elevation.d.ts +114 -0
- package/core/terrain-elevation.d.ts.map +1 -0
- package/core/terrain-elevation.js +150 -0
- package/core/types.d.ts +1355 -0
- package/core/types.d.ts.map +1 -0
- package/core/types.js +13 -0
- package/core/wfs-capabilities.d.ts +143 -0
- package/core/wfs-capabilities.d.ts.map +1 -0
- package/core/wfs-capabilities.js +478 -0
- package/core/wfs-filter.d.ts +118 -0
- package/core/wfs-filter.d.ts.map +1 -0
- package/core/wfs-filter.js +634 -0
- package/core/wfs.d.ts +219 -0
- package/core/wfs.d.ts.map +1 -0
- package/core/wfs.js +406 -0
- package/core/wire-shared.d.ts +32 -0
- package/core/wire-shared.d.ts.map +1 -0
- package/core/wire-shared.js +76 -0
- package/core/wms-axis.d.ts +36 -0
- package/core/wms-axis.d.ts.map +1 -0
- package/core/wms-axis.js +73 -0
- package/core/wms-capabilities.d.ts +110 -0
- package/core/wms-capabilities.d.ts.map +1 -0
- package/core/wms-capabilities.js +559 -0
- package/core/wms-types.d.ts +128 -0
- package/core/wms-types.d.ts.map +1 -0
- package/core/wms-types.js +32 -0
- package/core/wms.d.ts +144 -0
- package/core/wms.d.ts.map +1 -0
- package/core/wms.js +338 -0
- package/core/wmts-capabilities.d.ts +82 -0
- package/core/wmts-capabilities.d.ts.map +1 -0
- package/core/wmts-capabilities.js +402 -0
- package/core/wmts.d.ts +103 -0
- package/core/wmts.d.ts.map +1 -0
- package/core/wmts.js +332 -0
- package/core/xml-text.d.ts +20 -0
- package/core/xml-text.d.ts.map +1 -0
- package/core/xml-text.js +85 -0
- package/esri-compat/basemap-gallery.d.ts +38 -0
- package/esri-compat/basemap-gallery.d.ts.map +1 -0
- package/esri-compat/basemap-gallery.js +159 -0
- package/esri-compat/basemap-layer-list.d.ts +35 -0
- package/esri-compat/basemap-layer-list.d.ts.map +1 -0
- package/esri-compat/basemap-layer-list.js +139 -0
- package/esri-compat/basemap.d.ts +32 -0
- package/esri-compat/basemap.d.ts.map +1 -0
- package/esri-compat/basemap.js +84 -0
- package/esri-compat/bookmarks.d.ts +36 -0
- package/esri-compat/bookmarks.d.ts.map +1 -0
- package/esri-compat/bookmarks.js +108 -0
- package/esri-compat/class-breaks-renderer.d.ts +50 -0
- package/esri-compat/class-breaks-renderer.d.ts.map +1 -0
- package/esri-compat/class-breaks-renderer.js +164 -0
- package/esri-compat/color.d.ts +22 -0
- package/esri-compat/color.d.ts.map +1 -0
- package/esri-compat/color.js +106 -0
- package/esri-compat/controls.d.ts +174 -0
- package/esri-compat/controls.d.ts.map +1 -0
- package/esri-compat/controls.js +479 -0
- package/esri-compat/coordinate-conversion.d.ts +41 -0
- package/esri-compat/coordinate-conversion.d.ts.map +1 -0
- package/esri-compat/coordinate-conversion.js +125 -0
- package/esri-compat/directions.d.ts +45 -0
- package/esri-compat/directions.d.ts.map +1 -0
- package/esri-compat/directions.js +123 -0
- package/esri-compat/editor.d.ts +47 -0
- package/esri-compat/editor.d.ts.map +1 -0
- package/esri-compat/editor.js +170 -0
- package/esri-compat/esri-config.d.ts +16 -0
- package/esri-compat/esri-config.d.ts.map +1 -0
- package/esri-compat/esri-config.js +23 -0
- package/esri-compat/esri-request.d.ts +17 -0
- package/esri-compat/esri-request.d.ts.map +1 -0
- package/esri-compat/esri-request.js +127 -0
- package/esri-compat/event-bus.d.ts +106 -0
- package/esri-compat/event-bus.d.ts.map +1 -0
- package/esri-compat/event-bus.js +90 -0
- package/esri-compat/expand.d.ts +36 -0
- package/esri-compat/expand.d.ts.map +1 -0
- package/esri-compat/expand.js +97 -0
- package/esri-compat/extent.d.ts +43 -0
- package/esri-compat/extent.d.ts.map +1 -0
- package/esri-compat/extent.js +140 -0
- package/esri-compat/feature-filter.d.ts +55 -0
- package/esri-compat/feature-filter.d.ts.map +1 -0
- package/esri-compat/feature-filter.js +109 -0
- package/esri-compat/feature-form.d.ts +64 -0
- package/esri-compat/feature-form.d.ts.map +1 -0
- package/esri-compat/feature-form.js +137 -0
- package/esri-compat/feature-layer.d.ts +173 -0
- package/esri-compat/feature-layer.d.ts.map +1 -0
- package/esri-compat/feature-layer.js +661 -0
- package/esri-compat/feature-set.d.ts +32 -0
- package/esri-compat/feature-set.d.ts.map +1 -0
- package/esri-compat/feature-set.js +80 -0
- package/esri-compat/feature-table.d.ts +141 -0
- package/esri-compat/feature-table.d.ts.map +1 -0
- package/esri-compat/feature-table.js +500 -0
- package/esri-compat/feature-templates.d.ts +41 -0
- package/esri-compat/feature-templates.d.ts.map +1 -0
- package/esri-compat/feature-templates.js +97 -0
- package/esri-compat/feature.d.ts +33 -0
- package/esri-compat/feature.d.ts.map +1 -0
- package/esri-compat/feature.js +83 -0
- package/esri-compat/geojson-layer.d.ts +86 -0
- package/esri-compat/geojson-layer.d.ts.map +1 -0
- package/esri-compat/geojson-layer.js +191 -0
- package/esri-compat/geometry-engine.d.ts +107 -0
- package/esri-compat/geometry-engine.d.ts.map +1 -0
- package/esri-compat/geometry-engine.js +266 -0
- package/esri-compat/graphic.d.ts +46 -0
- package/esri-compat/graphic.d.ts.map +1 -0
- package/esri-compat/graphic.js +103 -0
- package/esri-compat/graphics-layer.d.ts +49 -0
- package/esri-compat/graphics-layer.d.ts.map +1 -0
- package/esri-compat/graphics-layer.js +185 -0
- package/esri-compat/group-layer.d.ts +48 -0
- package/esri-compat/group-layer.d.ts.map +1 -0
- package/esri-compat/group-layer.js +212 -0
- package/esri-compat/identify.d.ts +71 -0
- package/esri-compat/identify.d.ts.map +1 -0
- package/esri-compat/identify.js +299 -0
- package/esri-compat/identity-manager.d.ts +31 -0
- package/esri-compat/identity-manager.d.ts.map +1 -0
- package/esri-compat/identity-manager.js +115 -0
- package/esri-compat/imagery-layer.d.ts +78 -0
- package/esri-compat/imagery-layer.d.ts.map +1 -0
- package/esri-compat/imagery-layer.js +167 -0
- package/esri-compat/label-class.d.ts +31 -0
- package/esri-compat/label-class.d.ts.map +1 -0
- package/esri-compat/label-class.js +102 -0
- package/esri-compat/layer-list.d.ts +77 -0
- package/esri-compat/layer-list.d.ts.map +1 -0
- package/esri-compat/layer-list.js +342 -0
- package/esri-compat/legend.d.ts +53 -0
- package/esri-compat/legend.d.ts.map +1 -0
- package/esri-compat/legend.js +254 -0
- package/esri-compat/map-image-layer.d.ts +162 -0
- package/esri-compat/map-image-layer.d.ts.map +1 -0
- package/esri-compat/map-image-layer.js +709 -0
- package/esri-compat/map-view.d.ts +323 -0
- package/esri-compat/map-view.d.ts.map +1 -0
- package/esri-compat/map-view.js +1175 -0
- package/esri-compat/map.d.ts +47 -0
- package/esri-compat/map.d.ts.map +1 -0
- package/esri-compat/map.js +209 -0
- package/esri-compat/measurement-2d.d.ts +61 -0
- package/esri-compat/measurement-2d.d.ts.map +1 -0
- package/esri-compat/measurement-2d.js +184 -0
- package/esri-compat/measurement.d.ts +45 -0
- package/esri-compat/measurement.d.ts.map +1 -0
- package/esri-compat/measurement.js +193 -0
- package/esri-compat/oauth-info.d.ts +35 -0
- package/esri-compat/oauth-info.d.ts.map +1 -0
- package/esri-compat/oauth-info.js +115 -0
- package/esri-compat/picture-marker-symbol.d.ts +35 -0
- package/esri-compat/picture-marker-symbol.d.ts.map +1 -0
- package/esri-compat/picture-marker-symbol.js +126 -0
- package/esri-compat/point.d.ts +31 -0
- package/esri-compat/point.d.ts.map +1 -0
- package/esri-compat/point.js +102 -0
- package/esri-compat/polygon.d.ts +31 -0
- package/esri-compat/polygon.d.ts.map +1 -0
- package/esri-compat/polygon.js +107 -0
- package/esri-compat/polyline.d.ts +31 -0
- package/esri-compat/polyline.d.ts.map +1 -0
- package/esri-compat/polyline.js +107 -0
- package/esri-compat/popup-template.d.ts +55 -0
- package/esri-compat/popup-template.d.ts.map +1 -0
- package/esri-compat/popup-template.js +128 -0
- package/esri-compat/popup.d.ts +54 -0
- package/esri-compat/popup.d.ts.map +1 -0
- package/esri-compat/popup.js +312 -0
- package/esri-compat/print.d.ts +47 -0
- package/esri-compat/print.d.ts.map +1 -0
- package/esri-compat/print.js +105 -0
- package/esri-compat/query.d.ts +58 -0
- package/esri-compat/query.d.ts.map +1 -0
- package/esri-compat/query.js +128 -0
- package/esri-compat/reactive-utils.d.ts +24 -0
- package/esri-compat/reactive-utils.d.ts.map +1 -0
- package/esri-compat/reactive-utils.js +193 -0
- package/esri-compat/request.d.ts +41 -0
- package/esri-compat/request.d.ts.map +1 -0
- package/esri-compat/request.js +253 -0
- package/esri-compat/route-layer.d.ts +59 -0
- package/esri-compat/route-layer.d.ts.map +1 -0
- package/esri-compat/route-layer.js +223 -0
- package/esri-compat/route-task.d.ts +88 -0
- package/esri-compat/route-task.d.ts.map +1 -0
- package/esri-compat/route-task.js +225 -0
- package/esri-compat/scene-view.d.ts +41 -0
- package/esri-compat/scene-view.d.ts.map +1 -0
- package/esri-compat/scene-view.js +68 -0
- package/esri-compat/search.d.ts +112 -0
- package/esri-compat/search.d.ts.map +1 -0
- package/esri-compat/search.js +820 -0
- package/esri-compat/simple-fill-symbol.d.ts +27 -0
- package/esri-compat/simple-fill-symbol.d.ts.map +1 -0
- package/esri-compat/simple-fill-symbol.js +85 -0
- package/esri-compat/simple-line-symbol.d.ts +27 -0
- package/esri-compat/simple-line-symbol.d.ts.map +1 -0
- package/esri-compat/simple-line-symbol.js +85 -0
- package/esri-compat/simple-marker-symbol.d.ts +29 -0
- package/esri-compat/simple-marker-symbol.d.ts.map +1 -0
- package/esri-compat/simple-marker-symbol.js +92 -0
- package/esri-compat/simple-renderer.d.ts +29 -0
- package/esri-compat/simple-renderer.d.ts.map +1 -0
- package/esri-compat/simple-renderer.js +92 -0
- package/esri-compat/sketch.d.ts +64 -0
- package/esri-compat/sketch.d.ts.map +1 -0
- package/esri-compat/sketch.js +227 -0
- package/esri-compat/spatial-reference.d.ts +31 -0
- package/esri-compat/spatial-reference.d.ts.map +1 -0
- package/esri-compat/spatial-reference.js +102 -0
- package/esri-compat/swipe.d.ts +34 -0
- package/esri-compat/swipe.d.ts.map +1 -0
- package/esri-compat/swipe.js +93 -0
- package/esri-compat/table-list.d.ts +36 -0
- package/esri-compat/table-list.d.ts.map +1 -0
- package/esri-compat/table-list.js +126 -0
- package/esri-compat/text-symbol.d.ts +37 -0
- package/esri-compat/text-symbol.d.ts.map +1 -0
- package/esri-compat/text-symbol.js +123 -0
- package/esri-compat/tile-layer.d.ts +52 -0
- package/esri-compat/tile-layer.d.ts.map +1 -0
- package/esri-compat/tile-layer.js +168 -0
- package/esri-compat/time-slider.d.ts +70 -0
- package/esri-compat/time-slider.d.ts.map +1 -0
- package/esri-compat/time-slider.js +208 -0
- package/esri-compat/track.d.ts +51 -0
- package/esri-compat/track.d.ts.map +1 -0
- package/esri-compat/track.js +174 -0
- package/esri-compat/unique-value-renderer.d.ts +41 -0
- package/esri-compat/unique-value-renderer.d.ts.map +1 -0
- package/esri-compat/unique-value-renderer.js +127 -0
- package/esri-compat/url.d.ts +13 -0
- package/esri-compat/url.d.ts.map +1 -0
- package/esri-compat/url.js +68 -0
- package/esri-compat/vector-tile-layer.d.ts +47 -0
- package/esri-compat/vector-tile-layer.d.ts.map +1 -0
- package/esri-compat/vector-tile-layer.js +130 -0
- package/esri-compat/web-map.d.ts +14 -0
- package/esri-compat/web-map.d.ts.map +1 -0
- package/esri-compat/web-map.js +24 -0
- package/esri-compat/wfs-layer.d.ts +64 -0
- package/esri-compat/wfs-layer.d.ts.map +1 -0
- package/esri-compat/wfs-layer.js +145 -0
- package/esri-compat/wms-layer.d.ts +76 -0
- package/esri-compat/wms-layer.d.ts.map +1 -0
- package/esri-compat/wms-layer.js +157 -0
- package/exploration/context.d.ts +25 -0
- package/exploration/context.d.ts.map +1 -0
- package/exploration/context.js +396 -0
- package/exploration/index.d.ts +27 -0
- package/exploration/index.d.ts.map +1 -0
- package/exploration/index.js +24 -0
- package/exploration/presets.d.ts +27 -0
- package/exploration/presets.d.ts.map +1 -0
- package/exploration/presets.js +114 -0
- package/exploration/reducer.d.ts +23 -0
- package/exploration/reducer.d.ts.map +1 -0
- package/exploration/reducer.js +332 -0
- package/exploration/selection.d.ts +25 -0
- package/exploration/selection.d.ts.map +1 -0
- package/exploration/selection.js +34 -0
- package/exploration/selectors.d.ts +56 -0
- package/exploration/selectors.d.ts.map +1 -0
- package/exploration/selectors.js +110 -0
- package/exploration/types.d.ts +294 -0
- package/exploration/types.d.ts.map +1 -0
- package/exploration/types.js +33 -0
- package/expr/expression.d.ts +457 -0
- package/expr/expression.d.ts.map +1 -0
- package/expr/expression.js +663 -0
- package/expr/index.d.ts +32 -0
- package/expr/index.d.ts.map +1 -0
- package/expr/index.js +30 -0
- package/gen/honua/v1/feature_service_pb.d.ts +918 -0
- package/gen/honua/v1/feature_service_pb.d.ts.map +1 -0
- package/gen/honua/v1/feature_service_pb.js +375 -0
- package/generated-app/errors.d.ts +41 -0
- package/generated-app/errors.d.ts.map +1 -0
- package/generated-app/errors.js +41 -0
- package/generated-app/index.d.ts +17 -0
- package/generated-app/index.d.ts.map +1 -0
- package/generated-app/index.js +12 -0
- package/generated-app/manifest.d.ts +183 -0
- package/generated-app/manifest.d.ts.map +1 -0
- package/generated-app/manifest.js +14 -0
- package/generated-app/projection.d.ts +44 -0
- package/generated-app/projection.d.ts.map +1 -0
- package/generated-app/projection.js +234 -0
- package/generated-app/runtime.d.ts +215 -0
- package/generated-app/runtime.d.ts.map +1 -0
- package/generated-app/runtime.js +1196 -0
- package/interactions/detail-model.d.ts +54 -0
- package/interactions/detail-model.d.ts.map +1 -0
- package/interactions/detail-model.js +105 -0
- package/interactions/exploration-bindings.d.ts +120 -0
- package/interactions/exploration-bindings.d.ts.map +1 -0
- package/interactions/exploration-bindings.js +218 -0
- package/interactions/feature-state.d.ts +144 -0
- package/interactions/feature-state.d.ts.map +1 -0
- package/interactions/feature-state.js +169 -0
- package/interactions/hit-test.d.ts +112 -0
- package/interactions/hit-test.d.ts.map +1 -0
- package/interactions/hit-test.js +291 -0
- package/interactions/index.d.ts +31 -0
- package/interactions/index.d.ts.map +1 -0
- package/interactions/index.js +24 -0
- package/interactions/share-state.d.ts +36 -0
- package/interactions/share-state.d.ts.map +1 -0
- package/interactions/share-state.js +123 -0
- package/map/feature-service-adapter.d.ts +138 -0
- package/map/feature-service-adapter.d.ts.map +1 -0
- package/map/feature-service-adapter.js +279 -0
- package/map/honua-map.d.ts +203 -0
- package/map/honua-map.d.ts.map +1 -0
- package/map/honua-map.js +347 -0
- package/map/index.d.ts +27 -0
- package/map/index.d.ts.map +1 -0
- package/map/index.js +22 -0
- package/map/maplibre-target.d.ts +103 -0
- package/map/maplibre-target.d.ts.map +1 -0
- package/map/maplibre-target.js +164 -0
- package/map/webmap-maplibre.d.ts +60 -0
- package/map/webmap-maplibre.d.ts.map +1 -0
- package/map/webmap-maplibre.js +212 -0
- package/package.json +37 -0
- package/react/context.d.ts +32 -0
- package/react/context.d.ts.map +1 -0
- package/react/context.js +19 -0
- package/react/honua-layer.d.ts +35 -0
- package/react/honua-layer.d.ts.map +1 -0
- package/react/honua-layer.js +47 -0
- package/react/honua-map.d.ts +83 -0
- package/react/honua-map.d.ts.map +1 -0
- package/react/honua-map.js +109 -0
- package/react/honua-popup.d.ts +26 -0
- package/react/honua-popup.d.ts.map +1 -0
- package/react/honua-popup.js +34 -0
- package/react/hooks.d.ts +127 -0
- package/react/hooks.d.ts.map +1 -0
- package/react/hooks.js +206 -0
- package/react/index.d.ts +42 -0
- package/react/index.d.ts.map +1 -0
- package/react/index.js +34 -0
- package/react/provider.d.ts +36 -0
- package/react/provider.d.ts.map +1 -0
- package/react/provider.js +35 -0
- package/react/query-cache.d.ts +76 -0
- package/react/query-cache.d.ts.map +1 -0
- package/react/query-cache.js +188 -0
- package/runtime/diff.d.ts +31 -0
- package/runtime/diff.d.ts.map +1 -0
- package/runtime/diff.js +143 -0
- package/runtime/errors.d.ts +40 -0
- package/runtime/errors.d.ts.map +1 -0
- package/runtime/errors.js +35 -0
- package/runtime/index.d.ts +59 -0
- package/runtime/index.d.ts.map +1 -0
- package/runtime/index.js +43 -0
- package/runtime/legend.d.ts +23 -0
- package/runtime/legend.d.ts.map +1 -0
- package/runtime/legend.js +38 -0
- package/runtime/load-package.d.ts +125 -0
- package/runtime/load-package.d.ts.map +1 -0
- package/runtime/load-package.js +264 -0
- package/runtime/map-package-fetch.d.ts +107 -0
- package/runtime/map-package-fetch.d.ts.map +1 -0
- package/runtime/map-package-fetch.js +336 -0
- package/runtime/map-package-realtime.d.ts +169 -0
- package/runtime/map-package-realtime.d.ts.map +1 -0
- package/runtime/map-package-realtime.js +350 -0
- package/runtime/map-package-validation.d.ts +43 -0
- package/runtime/map-package-validation.d.ts.map +1 -0
- package/runtime/map-package-validation.js +269 -0
- package/runtime/map-package-watch.d.ts +78 -0
- package/runtime/map-package-watch.d.ts.map +1 -0
- package/runtime/map-package-watch.js +695 -0
- package/runtime/map-package.d.ts +167 -0
- package/runtime/map-package.d.ts.map +1 -0
- package/runtime/map-package.js +15 -0
- package/runtime/ogc-styles.d.ts +110 -0
- package/runtime/ogc-styles.d.ts.map +1 -0
- package/runtime/ogc-styles.js +195 -0
- package/runtime/popups.d.ts +62 -0
- package/runtime/popups.d.ts.map +1 -0
- package/runtime/popups.js +95 -0
- package/runtime/query-tiles.d.ts +217 -0
- package/runtime/query-tiles.d.ts.map +1 -0
- package/runtime/query-tiles.js +801 -0
- package/runtime/runtime.d.ts +243 -0
- package/runtime/runtime.d.ts.map +1 -0
- package/runtime/runtime.js +1147 -0
- package/runtime/source-bridge.d.ts +99 -0
- package/runtime/source-bridge.d.ts.map +1 -0
- package/runtime/source-bridge.js +401 -0
- package/runtime/style-compose.d.ts +46 -0
- package/runtime/style-compose.d.ts.map +1 -0
- package/runtime/style-compose.js +144 -0
- package/runtime/style-interactions.d.ts +141 -0
- package/runtime/style-interactions.d.ts.map +1 -0
- package/runtime/style-interactions.js +574 -0
- package/runtime/style-spec-validation.d.ts +23 -0
- package/runtime/style-spec-validation.d.ts.map +1 -0
- package/runtime/style-spec-validation.js +357 -0
- package/studio/capability-manifest.d.ts +285 -0
- package/studio/capability-manifest.d.ts.map +1 -0
- package/studio/capability-manifest.js +59 -0
- package/studio/chart-spec.d.ts +85 -0
- package/studio/chart-spec.d.ts.map +1 -0
- package/studio/chart-spec.js +106 -0
- package/studio/index.d.ts +34 -0
- package/studio/index.d.ts.map +1 -0
- package/studio/index.js +27 -0
- package/studio/provenance.d.ts +131 -0
- package/studio/provenance.d.ts.map +1 -0
- package/studio/provenance.js +39 -0
- package/studio/publish.d.ts +64 -0
- package/studio/publish.d.ts.map +1 -0
- package/studio/publish.js +13 -0
- package/studio/types.d.ts +278 -0
- package/studio/types.d.ts.map +1 -0
- package/studio/types.js +71 -0
- package/studio/validate.d.ts +45 -0
- package/studio/validate.d.ts.map +1 -0
- package/studio/validate.js +255 -0
- package/studio/validation.d.ts +112 -0
- package/studio/validation.d.ts.map +1 -0
- package/studio/validation.js +42 -0
- package/style/factory.d.ts +30 -0
- package/style/factory.d.ts.map +1 -0
- package/style/factory.js +61 -0
- package/style/index.d.ts +25 -0
- package/style/index.d.ts.map +1 -0
- package/style/index.js +24 -0
- package/style/specification.d.ts +203 -0
- package/style/specification.d.ts.map +1 -0
- package/style/specification.js +178 -0
- package/style/wms-wmts-resolvers.d.ts +38 -0
- package/style/wms-wmts-resolvers.d.ts.map +1 -0
- package/style/wms-wmts-resolvers.js +92 -0
- package/webmap/contract.d.ts +28 -0
- package/webmap/contract.d.ts.map +1 -0
- package/webmap/contract.js +130 -0
- package/webmap/convert-basemap.d.ts +17 -0
- package/webmap/convert-basemap.d.ts.map +1 -0
- package/webmap/convert-basemap.js +78 -0
- package/webmap/convert-extent.d.ts +17 -0
- package/webmap/convert-extent.d.ts.map +1 -0
- package/webmap/convert-extent.js +114 -0
- package/webmap/convert-label.d.ts +13 -0
- package/webmap/convert-label.d.ts.map +1 -0
- package/webmap/convert-label.js +125 -0
- package/webmap/convert-layer.d.ts +22 -0
- package/webmap/convert-layer.d.ts.map +1 -0
- package/webmap/convert-layer.js +181 -0
- package/webmap/convert-popup.d.ts +34 -0
- package/webmap/convert-popup.d.ts.map +1 -0
- package/webmap/convert-popup.js +68 -0
- package/webmap/convert-renderer.d.ts +17 -0
- package/webmap/convert-renderer.d.ts.map +1 -0
- package/webmap/convert-renderer.js +161 -0
- package/webmap/convert-symbol.d.ts +17 -0
- package/webmap/convert-symbol.d.ts.map +1 -0
- package/webmap/convert-symbol.js +122 -0
- package/webmap/index.d.ts +44 -0
- package/webmap/index.d.ts.map +1 -0
- package/webmap/index.js +33 -0
- package/webmap/parse.d.ts +25 -0
- package/webmap/parse.d.ts.map +1 -0
- package/webmap/parse.js +83 -0
- package/webmap/types.d.ts +264 -0
- package/webmap/types.d.ts.map +1 -0
- package/webmap/types.js +13 -0
- package/webmap/warnings.d.ts +30 -0
- package/webmap/warnings.d.ts.map +1 -0
- package/webmap/warnings.js +37 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-safe TypeScript projections for the Studio package families
|
|
3
|
+
* (query, analysis, map, dashboard, report, form, app, workflow, GP, ETL).
|
|
4
|
+
*
|
|
5
|
+
* Console interop, MCP, QGIS, generated apps, and embeds must not fork the
|
|
6
|
+
* server-owned package schemas. These projections mirror the canonical
|
|
7
|
+
* server wire shapes — the `format` string on each family is the version
|
|
8
|
+
* gate, exactly as on {@link HonuaMapPackage}. The `map` and `dashboard`
|
|
9
|
+
* families already have established SDK-native types and are re-tagged here
|
|
10
|
+
* rather than re-declared.
|
|
11
|
+
*
|
|
12
|
+
* The remaining families (query, analysis, report, form, workflow, GP, ETL)
|
|
13
|
+
* have no finalized server contract yet, so their interfaces are minimal,
|
|
14
|
+
* open-ended stubs (every field optional, plus `[extra: string]: unknown`)
|
|
15
|
+
* gated by a `HONUA_X_PACKAGE_FORMAT_V1` constant. They expand once the
|
|
16
|
+
* server shape lands.
|
|
17
|
+
*
|
|
18
|
+
* @experimental Not yet covered by the SDK's semver contract — these shapes
|
|
19
|
+
* may change in any minor release prior to `1.0.0` and before the matching
|
|
20
|
+
* server contracts ship.
|
|
21
|
+
* @module
|
|
22
|
+
*/
|
|
23
|
+
import type { HonuaGeneratedAppManifest, HonuaGeneratedAppPackage } from "../generated-app/manifest.js";
|
|
24
|
+
import type { HonuaMapPackage, HonuaMapPackageStatus } from "../runtime/map-package.js";
|
|
25
|
+
/** Canonical format string for the v1 QueryPackage shape. */
|
|
26
|
+
export declare const HONUA_QUERY_PACKAGE_FORMAT_V1: "honua_query_package.v1";
|
|
27
|
+
/** Canonical format string for the v1 AnalysisPackage shape. */
|
|
28
|
+
export declare const HONUA_ANALYSIS_PACKAGE_FORMAT_V1: "honua_analysis_package.v1";
|
|
29
|
+
/** Canonical format string for the v1 ReportPackage shape. */
|
|
30
|
+
export declare const HONUA_REPORT_PACKAGE_FORMAT_V1: "honua_report_package.v1";
|
|
31
|
+
/** Canonical format string for the v1 FormPackage shape. */
|
|
32
|
+
export declare const HONUA_FORM_PACKAGE_FORMAT_V1: "honua_form_package.v1";
|
|
33
|
+
/** Canonical format string for the v1 WorkflowPackage shape. */
|
|
34
|
+
export declare const HONUA_WORKFLOW_PACKAGE_FORMAT_V1: "honua_workflow_package.v1";
|
|
35
|
+
/** Canonical format string for the v1 GPPackage shape. */
|
|
36
|
+
export declare const HONUA_GP_PACKAGE_FORMAT_V1: "honua_gp_package.v1";
|
|
37
|
+
/** Canonical format string for the v1 ETLPackage shape. */
|
|
38
|
+
export declare const HONUA_ETL_PACKAGE_FORMAT_V1: "honua_etl_package.v1";
|
|
39
|
+
export type HonuaQueryPackageFormat = typeof HONUA_QUERY_PACKAGE_FORMAT_V1;
|
|
40
|
+
export type HonuaAnalysisPackageFormat = typeof HONUA_ANALYSIS_PACKAGE_FORMAT_V1;
|
|
41
|
+
export type HonuaReportPackageFormat = typeof HONUA_REPORT_PACKAGE_FORMAT_V1;
|
|
42
|
+
export type HonuaFormPackageFormat = typeof HONUA_FORM_PACKAGE_FORMAT_V1;
|
|
43
|
+
export type HonuaWorkflowPackageFormat = typeof HONUA_WORKFLOW_PACKAGE_FORMAT_V1;
|
|
44
|
+
export type HonuaGPPackageFormat = typeof HONUA_GP_PACKAGE_FORMAT_V1;
|
|
45
|
+
export type HonuaETLPackageFormat = typeof HONUA_ETL_PACKAGE_FORMAT_V1;
|
|
46
|
+
/**
|
|
47
|
+
* Lifecycle states a Studio package may occupy server-side. Shared with the
|
|
48
|
+
* stable {@link HonuaMapPackageStatus} so every family reports one lifecycle.
|
|
49
|
+
*
|
|
50
|
+
* @experimental
|
|
51
|
+
*/
|
|
52
|
+
export type HonuaStudioPackageStatus = HonuaMapPackageStatus;
|
|
53
|
+
/**
|
|
54
|
+
* Fields every stub Studio package family carries. `format` is narrowed to a
|
|
55
|
+
* family-specific literal by each interface; unknown additive fields are
|
|
56
|
+
* preserved through `[extra: string]: unknown` so minor server revisions do
|
|
57
|
+
* not break clients.
|
|
58
|
+
*
|
|
59
|
+
* @experimental
|
|
60
|
+
*/
|
|
61
|
+
export interface HonuaStudioPackageBase {
|
|
62
|
+
readonly packageId: string;
|
|
63
|
+
readonly format: string;
|
|
64
|
+
readonly status?: HonuaStudioPackageStatus;
|
|
65
|
+
readonly createdAt?: string;
|
|
66
|
+
readonly updatedAt?: string;
|
|
67
|
+
readonly expiresAt?: string;
|
|
68
|
+
readonly [extra: string]: unknown;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Minimal reference to a source a package binds to. Open-ended until the
|
|
72
|
+
* server source-binding contract for non-map families is finalized.
|
|
73
|
+
*
|
|
74
|
+
* @experimental
|
|
75
|
+
*/
|
|
76
|
+
export interface HonuaStudioBindingRef {
|
|
77
|
+
readonly sourceId?: string;
|
|
78
|
+
readonly [extra: string]: unknown;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Query specification carried by a {@link HonuaQueryPackage}.
|
|
82
|
+
*
|
|
83
|
+
* @experimental
|
|
84
|
+
*/
|
|
85
|
+
export interface HonuaStudioQuerySpec {
|
|
86
|
+
readonly where?: string;
|
|
87
|
+
readonly orderBy?: string | readonly string[];
|
|
88
|
+
readonly outFields?: readonly string[];
|
|
89
|
+
readonly groupBy?: readonly string[];
|
|
90
|
+
readonly [extra: string]: unknown;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Client projection of a server QueryPackage.
|
|
94
|
+
*
|
|
95
|
+
* @experimental
|
|
96
|
+
*/
|
|
97
|
+
export interface HonuaQueryPackage extends HonuaStudioPackageBase {
|
|
98
|
+
readonly format: HonuaQueryPackageFormat;
|
|
99
|
+
readonly sourceBindings?: readonly HonuaStudioBindingRef[];
|
|
100
|
+
readonly querySpec?: HonuaStudioQuerySpec;
|
|
101
|
+
readonly previewLimit?: number;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Client projection of a server AnalysisPackage.
|
|
105
|
+
*
|
|
106
|
+
* @experimental
|
|
107
|
+
*/
|
|
108
|
+
export interface HonuaAnalysisPackage extends HonuaStudioPackageBase {
|
|
109
|
+
readonly format: HonuaAnalysisPackageFormat;
|
|
110
|
+
readonly sourcePackageId?: string;
|
|
111
|
+
readonly analysisKind?: string;
|
|
112
|
+
readonly parameters?: Record<string, unknown>;
|
|
113
|
+
readonly resultBindings?: readonly HonuaStudioBindingRef[];
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* One section in a {@link HonuaReportPackage} layout.
|
|
117
|
+
*
|
|
118
|
+
* @experimental
|
|
119
|
+
*/
|
|
120
|
+
export interface HonuaReportSectionSpec {
|
|
121
|
+
readonly id?: string;
|
|
122
|
+
readonly kind?: string;
|
|
123
|
+
readonly title?: string;
|
|
124
|
+
readonly [extra: string]: unknown;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Client projection of a server ReportPackage.
|
|
128
|
+
*
|
|
129
|
+
* @experimental
|
|
130
|
+
*/
|
|
131
|
+
export interface HonuaReportPackage extends HonuaStudioPackageBase {
|
|
132
|
+
readonly format: HonuaReportPackageFormat;
|
|
133
|
+
readonly title?: string;
|
|
134
|
+
readonly templateId?: string;
|
|
135
|
+
readonly sections?: readonly HonuaReportSectionSpec[];
|
|
136
|
+
readonly mapPackageId?: string;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* One field in a {@link HonuaFormPackage}.
|
|
140
|
+
*
|
|
141
|
+
* @experimental
|
|
142
|
+
*/
|
|
143
|
+
export interface HonuaFormFieldSpec {
|
|
144
|
+
readonly name?: string;
|
|
145
|
+
readonly label?: string;
|
|
146
|
+
readonly type?: string;
|
|
147
|
+
readonly required?: boolean;
|
|
148
|
+
readonly [extra: string]: unknown;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Client projection of a server FormPackage.
|
|
152
|
+
*
|
|
153
|
+
* @experimental
|
|
154
|
+
*/
|
|
155
|
+
export interface HonuaFormPackage extends HonuaStudioPackageBase {
|
|
156
|
+
readonly format: HonuaFormPackageFormat;
|
|
157
|
+
readonly title?: string;
|
|
158
|
+
readonly sourceId?: string;
|
|
159
|
+
readonly fields?: readonly HonuaFormFieldSpec[];
|
|
160
|
+
readonly submitAction?: string;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* One step in a {@link HonuaWorkflowPackage}.
|
|
164
|
+
*
|
|
165
|
+
* @experimental
|
|
166
|
+
*/
|
|
167
|
+
export interface HonuaWorkflowStepSpec {
|
|
168
|
+
readonly id?: string;
|
|
169
|
+
readonly kind?: string;
|
|
170
|
+
readonly [extra: string]: unknown;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Client projection of a server WorkflowPackage.
|
|
174
|
+
*
|
|
175
|
+
* @experimental
|
|
176
|
+
*/
|
|
177
|
+
export interface HonuaWorkflowPackage extends HonuaStudioPackageBase {
|
|
178
|
+
readonly format: HonuaWorkflowPackageFormat;
|
|
179
|
+
readonly title?: string;
|
|
180
|
+
readonly steps?: readonly HonuaWorkflowStepSpec[];
|
|
181
|
+
readonly trigger?: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* One geoprocessing input/output parameter in a {@link HonuaGPPackage}.
|
|
185
|
+
*
|
|
186
|
+
* @experimental
|
|
187
|
+
*/
|
|
188
|
+
export interface HonuaGPParameterSpec {
|
|
189
|
+
readonly name?: string;
|
|
190
|
+
readonly dataType?: string;
|
|
191
|
+
readonly direction?: "input" | "output" | (string & {});
|
|
192
|
+
readonly [extra: string]: unknown;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Client projection of a server GPPackage (geoprocessing).
|
|
196
|
+
*
|
|
197
|
+
* @experimental
|
|
198
|
+
*/
|
|
199
|
+
export interface HonuaGPPackage extends HonuaStudioPackageBase {
|
|
200
|
+
readonly format: HonuaGPPackageFormat;
|
|
201
|
+
readonly processId?: string;
|
|
202
|
+
readonly inputs?: readonly HonuaGPParameterSpec[];
|
|
203
|
+
readonly outputs?: readonly HonuaGPParameterSpec[];
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Client projection of a server ETLPackage.
|
|
207
|
+
*
|
|
208
|
+
* @experimental
|
|
209
|
+
*/
|
|
210
|
+
export interface HonuaETLPackage extends HonuaStudioPackageBase {
|
|
211
|
+
readonly format: HonuaETLPackageFormat;
|
|
212
|
+
readonly pipelineId?: string;
|
|
213
|
+
readonly sourceKind?: string;
|
|
214
|
+
readonly targetKind?: string;
|
|
215
|
+
readonly transformSpec?: unknown;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Maps each Studio package family discriminant to its projection shape.
|
|
219
|
+
* `map` and `dashboard`/`app` reuse the established SDK-native types rather
|
|
220
|
+
* than re-declaring them.
|
|
221
|
+
*
|
|
222
|
+
* @experimental
|
|
223
|
+
*/
|
|
224
|
+
export interface StudioPackageFamilyShapes {
|
|
225
|
+
readonly query: HonuaQueryPackage;
|
|
226
|
+
readonly analysis: HonuaAnalysisPackage;
|
|
227
|
+
readonly map: HonuaMapPackage;
|
|
228
|
+
readonly dashboard: HonuaGeneratedAppManifest;
|
|
229
|
+
readonly report: HonuaReportPackage;
|
|
230
|
+
readonly form: HonuaFormPackage;
|
|
231
|
+
readonly app: HonuaGeneratedAppPackage;
|
|
232
|
+
readonly workflow: HonuaWorkflowPackage;
|
|
233
|
+
readonly gp: HonuaGPPackage;
|
|
234
|
+
readonly etl: HonuaETLPackage;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* The client-side discriminant tag naming a package family. The server wire
|
|
238
|
+
* shape does not carry this field — projection helpers add it.
|
|
239
|
+
*
|
|
240
|
+
* @experimental
|
|
241
|
+
*/
|
|
242
|
+
export type HonuaStudioPackageFamily = keyof StudioPackageFamilyShapes;
|
|
243
|
+
/**
|
|
244
|
+
* Discriminated union over every Studio package family, tagged by a
|
|
245
|
+
* client-side `packageFamily` field. Narrow on `packageFamily` to access the
|
|
246
|
+
* family-specific shape. Build values through {@link tagStudioPackage} rather
|
|
247
|
+
* than casting a raw wire object — the tag is not present on the wire.
|
|
248
|
+
*
|
|
249
|
+
* @experimental
|
|
250
|
+
*/
|
|
251
|
+
export type HonuaStudioPackage = {
|
|
252
|
+
readonly [F in HonuaStudioPackageFamily]: {
|
|
253
|
+
readonly packageFamily: F;
|
|
254
|
+
} & StudioPackageFamilyShapes[F];
|
|
255
|
+
}[HonuaStudioPackageFamily];
|
|
256
|
+
/**
|
|
257
|
+
* Every known Studio package family discriminant, in spec order.
|
|
258
|
+
*
|
|
259
|
+
* @experimental
|
|
260
|
+
*/
|
|
261
|
+
export declare const STUDIO_PACKAGE_FAMILIES: readonly ["query", "analysis", "map", "dashboard", "report", "form", "app", "workflow", "gp", "etl"];
|
|
262
|
+
/**
|
|
263
|
+
* Type guard for a known {@link HonuaStudioPackageFamily} discriminant.
|
|
264
|
+
*
|
|
265
|
+
* @experimental
|
|
266
|
+
*/
|
|
267
|
+
export declare function isStudioPackageFamily(value: unknown): value is HonuaStudioPackageFamily;
|
|
268
|
+
/**
|
|
269
|
+
* Tag a raw family package with its client-side `packageFamily` discriminant,
|
|
270
|
+
* producing a narrowable {@link HonuaStudioPackage} union member. The server
|
|
271
|
+
* wire shape omits the tag; this is the canonical way to add it.
|
|
272
|
+
*
|
|
273
|
+
* @experimental
|
|
274
|
+
*/
|
|
275
|
+
export declare function tagStudioPackage<F extends HonuaStudioPackageFamily>(family: F, pkg: StudioPackageFamilyShapes[F]): Extract<HonuaStudioPackage, {
|
|
276
|
+
readonly packageFamily: F;
|
|
277
|
+
}>;
|
|
278
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/studio/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxG,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAExF,6DAA6D;AAC7D,eAAO,MAAM,6BAA6B,EAAG,wBAAiC,CAAC;AAC/E,gEAAgE;AAChE,eAAO,MAAM,gCAAgC,EAAG,2BAAoC,CAAC;AACrF,8DAA8D;AAC9D,eAAO,MAAM,8BAA8B,EAAG,yBAAkC,CAAC;AACjF,4DAA4D;AAC5D,eAAO,MAAM,4BAA4B,E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AAC,SAAS,EAAE,yBAAyB,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,GAAG,EAAE,wBAAwB,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC;IACxC,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC;CAC/B;AAED;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,yBAAyB,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,CAAC,IAAI,wBAAwB,GAAG;QAAE,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAA;KAAE,GAAG,yBAAyB,CAAC,CAAC,CAAC;CACvG,CAAC,wBAAwB,CAAC,CAAC;AAE5B;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,sGAWoB,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,wBAAwB,CAEvF;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,wBAAwB,EACjE,MAAM,EAAE,CAAC,EACT,GAAG,EAAE,yBAAyB,CAAC,CAAC,CAAC,GAChC,OAAO,CAAC,kBAAkB,EAAE;IAAE,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAA;CAAE,CAAC,CAK5D"}
|
package/studio/types.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-safe TypeScript projections for the Studio package families
|
|
3
|
+
* (query, analysis, map, dashboard, report, form, app, workflow, GP, ETL).
|
|
4
|
+
*
|
|
5
|
+
* Console interop, MCP, QGIS, generated apps, and embeds must not fork the
|
|
6
|
+
* server-owned package schemas. These projections mirror the canonical
|
|
7
|
+
* server wire shapes — the `format` string on each family is the version
|
|
8
|
+
* gate, exactly as on {@link HonuaMapPackage}. The `map` and `dashboard`
|
|
9
|
+
* families already have established SDK-native types and are re-tagged here
|
|
10
|
+
* rather than re-declared.
|
|
11
|
+
*
|
|
12
|
+
* The remaining families (query, analysis, report, form, workflow, GP, ETL)
|
|
13
|
+
* have no finalized server contract yet, so their interfaces are minimal,
|
|
14
|
+
* open-ended stubs (every field optional, plus `[extra: string]: unknown`)
|
|
15
|
+
* gated by a `HONUA_X_PACKAGE_FORMAT_V1` constant. They expand once the
|
|
16
|
+
* server shape lands.
|
|
17
|
+
*
|
|
18
|
+
* @experimental Not yet covered by the SDK's semver contract — these shapes
|
|
19
|
+
* may change in any minor release prior to `1.0.0` and before the matching
|
|
20
|
+
* server contracts ship.
|
|
21
|
+
* @module
|
|
22
|
+
*/
|
|
23
|
+
/** Canonical format string for the v1 QueryPackage shape. */
|
|
24
|
+
export const HONUA_QUERY_PACKAGE_FORMAT_V1 = "honua_query_package.v1";
|
|
25
|
+
/** Canonical format string for the v1 AnalysisPackage shape. */
|
|
26
|
+
export const HONUA_ANALYSIS_PACKAGE_FORMAT_V1 = "honua_analysis_package.v1";
|
|
27
|
+
/** Canonical format string for the v1 ReportPackage shape. */
|
|
28
|
+
export const HONUA_REPORT_PACKAGE_FORMAT_V1 = "honua_report_package.v1";
|
|
29
|
+
/** Canonical format string for the v1 FormPackage shape. */
|
|
30
|
+
export const HONUA_FORM_PACKAGE_FORMAT_V1 = "honua_form_package.v1";
|
|
31
|
+
/** Canonical format string for the v1 WorkflowPackage shape. */
|
|
32
|
+
export const HONUA_WORKFLOW_PACKAGE_FORMAT_V1 = "honua_workflow_package.v1";
|
|
33
|
+
/** Canonical format string for the v1 GPPackage shape. */
|
|
34
|
+
export const HONUA_GP_PACKAGE_FORMAT_V1 = "honua_gp_package.v1";
|
|
35
|
+
/** Canonical format string for the v1 ETLPackage shape. */
|
|
36
|
+
export const HONUA_ETL_PACKAGE_FORMAT_V1 = "honua_etl_package.v1";
|
|
37
|
+
/**
|
|
38
|
+
* Every known Studio package family discriminant, in spec order.
|
|
39
|
+
*
|
|
40
|
+
* @experimental
|
|
41
|
+
*/
|
|
42
|
+
export const STUDIO_PACKAGE_FAMILIES = [
|
|
43
|
+
"query",
|
|
44
|
+
"analysis",
|
|
45
|
+
"map",
|
|
46
|
+
"dashboard",
|
|
47
|
+
"report",
|
|
48
|
+
"form",
|
|
49
|
+
"app",
|
|
50
|
+
"workflow",
|
|
51
|
+
"gp",
|
|
52
|
+
"etl",
|
|
53
|
+
];
|
|
54
|
+
/**
|
|
55
|
+
* Type guard for a known {@link HonuaStudioPackageFamily} discriminant.
|
|
56
|
+
*
|
|
57
|
+
* @experimental
|
|
58
|
+
*/
|
|
59
|
+
export function isStudioPackageFamily(value) {
|
|
60
|
+
return typeof value === "string" && STUDIO_PACKAGE_FAMILIES.includes(value);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Tag a raw family package with its client-side `packageFamily` discriminant,
|
|
64
|
+
* producing a narrowable {@link HonuaStudioPackage} union member. The server
|
|
65
|
+
* wire shape omits the tag; this is the canonical way to add it.
|
|
66
|
+
*
|
|
67
|
+
* @experimental
|
|
68
|
+
*/
|
|
69
|
+
export function tagStudioPackage(family, pkg) {
|
|
70
|
+
return { ...pkg, packageFamily: family };
|
|
71
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Family-agnostic validation for Studio packages produced outside Console —
|
|
3
|
+
* by an MCP client, the QGIS plugin, or the SDK itself. It returns the same
|
|
4
|
+
* unified {@link StudioPackageValidationResponse} envelope as the per-family
|
|
5
|
+
* validators, so a package generated through any surface is validated against
|
|
6
|
+
* one contract.
|
|
7
|
+
*
|
|
8
|
+
* For the `map` family this delegates to the established
|
|
9
|
+
* {@link validateMapPackage} (no duplication). For every other family it runs
|
|
10
|
+
* the shared base checks (`packageId`/`format`, lifecycle) and, when present,
|
|
11
|
+
* the shared {@link HonuaPackageProvenance} checks. Provenance is optional, but
|
|
12
|
+
* when a package carries it, MCP- and QGIS-origin packages must satisfy the
|
|
13
|
+
* same provenance shape as Console.
|
|
14
|
+
*
|
|
15
|
+
* @experimental Not yet covered by the SDK's semver contract — these shapes
|
|
16
|
+
* may change in any minor release prior to `1.0.0`.
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
import { type HonuaPackageProvenance } from "./provenance.js";
|
|
20
|
+
import type { StudioPackageValidationResponse } from "./validation.js";
|
|
21
|
+
export interface ValidateStudioPackageOptions {
|
|
22
|
+
/** Wall-clock for lifecycle (expired) diagnostics. Defaults to `Date.now()`. */
|
|
23
|
+
readonly now?: number | Date;
|
|
24
|
+
/** Require a {@link HonuaPackageProvenance} envelope to be present. */
|
|
25
|
+
readonly requireProvenance?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Validate a package of any Studio family produced outside Console. Dispatches
|
|
29
|
+
* to the map validator for the `map` family and applies shared base +
|
|
30
|
+
* provenance checks for every family.
|
|
31
|
+
*
|
|
32
|
+
* @experimental
|
|
33
|
+
*/
|
|
34
|
+
export declare function validateStudioPackage<T = unknown>(family: string, value: unknown, options?: ValidateStudioPackageOptions): StudioPackageValidationResponse<T>;
|
|
35
|
+
/**
|
|
36
|
+
* Validate just the {@link HonuaPackageProvenance} envelope on a package value.
|
|
37
|
+
* Useful when a host (MCP/QGIS) wants to confirm attribution without running
|
|
38
|
+
* the full family validation.
|
|
39
|
+
*
|
|
40
|
+
* @experimental
|
|
41
|
+
*/
|
|
42
|
+
export declare function validatePackageProvenance(value: unknown, options?: {
|
|
43
|
+
readonly required?: boolean;
|
|
44
|
+
}): StudioPackageValidationResponse<HonuaPackageProvenance>;
|
|
45
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/studio/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EAAsC,KAAK,sBAAsB,EAAwB,MAAM,iBAAiB,CAAC;AAGxH,OAAO,KAAK,EAA2B,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AA4BhG,MAAM,WAAW,4BAA4B;IAC3C,gFAAgF;IAChF,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CACtC;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,GAAG,OAAO,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,4BAAiC,GACzC,+BAA+B,CAAC,CAAC,CAAC,CAgEpC;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,EACd,OAAO,GAAE;IAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAC5C,+BAA+B,CAAC,sBAAsB,CAAC,CASzD"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Family-agnostic validation for Studio packages produced outside Console —
|
|
3
|
+
* by an MCP client, the QGIS plugin, or the SDK itself. It returns the same
|
|
4
|
+
* unified {@link StudioPackageValidationResponse} envelope as the per-family
|
|
5
|
+
* validators, so a package generated through any surface is validated against
|
|
6
|
+
* one contract.
|
|
7
|
+
*
|
|
8
|
+
* For the `map` family this delegates to the established
|
|
9
|
+
* {@link validateMapPackage} (no duplication). For every other family it runs
|
|
10
|
+
* the shared base checks (`packageId`/`format`, lifecycle) and, when present,
|
|
11
|
+
* the shared {@link HonuaPackageProvenance} checks. Provenance is optional, but
|
|
12
|
+
* when a package carries it, MCP- and QGIS-origin packages must satisfy the
|
|
13
|
+
* same provenance shape as Console.
|
|
14
|
+
*
|
|
15
|
+
* @experimental Not yet covered by the SDK's semver contract — these shapes
|
|
16
|
+
* may change in any minor release prior to `1.0.0`.
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
import { validateMapPackage } from "../runtime/map-package-validation.js";
|
|
20
|
+
import { HONUA_MAP_PACKAGE_FORMAT_V1 } from "../runtime/map-package.js";
|
|
21
|
+
import { HONUA_PACKAGE_PROVENANCE_FORMAT_V1, getPackageProvenance } from "./provenance.js";
|
|
22
|
+
import { STUDIO_PACKAGE_FAMILIES, isStudioPackageFamily } from "./types.js";
|
|
23
|
+
import { fromMapPackageValidation } from "./validation.js";
|
|
24
|
+
/**
|
|
25
|
+
* Expected `format` string for each family whose projection carries a single
|
|
26
|
+
* `format` discriminant. `map` and `dashboard` reuse their established
|
|
27
|
+
* constants; the `app` family is identified by `version` rather than `format`
|
|
28
|
+
* and is therefore not in this table.
|
|
29
|
+
*/
|
|
30
|
+
const FAMILY_FORMAT = {
|
|
31
|
+
query: "honua_query_package.v1",
|
|
32
|
+
analysis: "honua_analysis_package.v1",
|
|
33
|
+
map: HONUA_MAP_PACKAGE_FORMAT_V1,
|
|
34
|
+
dashboard: "honua_generated_app_manifest.v1",
|
|
35
|
+
report: "honua_report_package.v1",
|
|
36
|
+
form: "honua_form_package.v1",
|
|
37
|
+
workflow: "honua_workflow_package.v1",
|
|
38
|
+
gp: "honua_gp_package.v1",
|
|
39
|
+
etl: "honua_etl_package.v1",
|
|
40
|
+
};
|
|
41
|
+
/** The package-identity field each family uses. */
|
|
42
|
+
function packageIdOf(family, value) {
|
|
43
|
+
if (family === "map")
|
|
44
|
+
return typeof value.mapPackageId === "string" ? value.mapPackageId : undefined;
|
|
45
|
+
if (family === "dashboard")
|
|
46
|
+
return typeof value.appId === "string" ? value.appId : undefined;
|
|
47
|
+
if (family === "app")
|
|
48
|
+
return typeof value.id === "string" ? value.id : undefined;
|
|
49
|
+
return typeof value.packageId === "string" ? value.packageId : undefined;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Validate a package of any Studio family produced outside Console. Dispatches
|
|
53
|
+
* to the map validator for the `map` family and applies shared base +
|
|
54
|
+
* provenance checks for every family.
|
|
55
|
+
*
|
|
56
|
+
* @experimental
|
|
57
|
+
*/
|
|
58
|
+
export function validateStudioPackage(family, value, options = {}) {
|
|
59
|
+
const diagnostics = [];
|
|
60
|
+
if (!isStudioPackageFamily(family)) {
|
|
61
|
+
diagnostics.push({
|
|
62
|
+
code: "unknown-family",
|
|
63
|
+
severity: "error",
|
|
64
|
+
message: `Unknown Studio package family "${family}". Expected one of: ${STUDIO_PACKAGE_FAMILIES.join(", ")}.`,
|
|
65
|
+
path: "packageFamily",
|
|
66
|
+
});
|
|
67
|
+
return { valid: false, diagnostics };
|
|
68
|
+
}
|
|
69
|
+
if (!isRecord(value)) {
|
|
70
|
+
diagnostics.push({
|
|
71
|
+
code: "invalid-package",
|
|
72
|
+
severity: "error",
|
|
73
|
+
message: `${family} package must be a JSON object.`,
|
|
74
|
+
});
|
|
75
|
+
return { valid: false, diagnostics };
|
|
76
|
+
}
|
|
77
|
+
// The map family has a full structural validator already — reuse it so MCP
|
|
78
|
+
// and QGIS map packages validate identically to Console's.
|
|
79
|
+
if (family === "map") {
|
|
80
|
+
const mapResponse = fromMapPackageValidation(validateMapPackage(value, { now: options.now }));
|
|
81
|
+
const merged = [...mapResponse.diagnostics];
|
|
82
|
+
appendProvenanceDiagnostics(merged, value, options);
|
|
83
|
+
return {
|
|
84
|
+
valid: mapResponse.valid && !hasErrors(merged),
|
|
85
|
+
diagnostics: merged,
|
|
86
|
+
...(mapResponse.pkg === undefined ? {} : { pkg: mapResponse.pkg }),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
const packageId = packageIdOf(family, value);
|
|
90
|
+
if (!packageId) {
|
|
91
|
+
diagnostics.push({
|
|
92
|
+
code: "missing-package-id",
|
|
93
|
+
severity: "error",
|
|
94
|
+
message: `${family} package must carry a non-empty identity field.`,
|
|
95
|
+
path: family === "dashboard" ? "appId" : family === "app" ? "id" : "packageId",
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
const expectedFormat = FAMILY_FORMAT[family];
|
|
99
|
+
if (expectedFormat !== undefined && family !== "app" && value.format !== expectedFormat) {
|
|
100
|
+
diagnostics.push({
|
|
101
|
+
code: "unsupported-format",
|
|
102
|
+
severity: "error",
|
|
103
|
+
message: `${family} package format must be "${expectedFormat}".`,
|
|
104
|
+
path: "format",
|
|
105
|
+
detail: { expected: expectedFormat, received: value.format },
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
appendLifecycleDiagnostics(diagnostics, value, options);
|
|
109
|
+
appendProvenanceDiagnostics(diagnostics, value, options);
|
|
110
|
+
return {
|
|
111
|
+
valid: !hasErrors(diagnostics),
|
|
112
|
+
diagnostics,
|
|
113
|
+
pkg: value,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Validate just the {@link HonuaPackageProvenance} envelope on a package value.
|
|
118
|
+
* Useful when a host (MCP/QGIS) wants to confirm attribution without running
|
|
119
|
+
* the full family validation.
|
|
120
|
+
*
|
|
121
|
+
* @experimental
|
|
122
|
+
*/
|
|
123
|
+
export function validatePackageProvenance(value, options = {}) {
|
|
124
|
+
const diagnostics = [];
|
|
125
|
+
appendProvenanceDiagnostics(diagnostics, value, { requireProvenance: options.required });
|
|
126
|
+
const provenance = getPackageProvenance(value);
|
|
127
|
+
return {
|
|
128
|
+
valid: !hasErrors(diagnostics),
|
|
129
|
+
diagnostics,
|
|
130
|
+
...(provenance === undefined ? {} : { pkg: provenance }),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
const KNOWN_ORIGINS = new Set(["console", "studio", "mcp", "qgis", "sdk"]);
|
|
134
|
+
function appendProvenanceDiagnostics(diagnostics, value, options) {
|
|
135
|
+
const raw = isRecord(value) ? value.provenance : undefined;
|
|
136
|
+
if (raw === undefined) {
|
|
137
|
+
if (options.requireProvenance) {
|
|
138
|
+
diagnostics.push({
|
|
139
|
+
code: "missing-provenance",
|
|
140
|
+
severity: "error",
|
|
141
|
+
message: "Package provenance is required but absent.",
|
|
142
|
+
path: "provenance",
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (!isRecord(raw)) {
|
|
148
|
+
diagnostics.push({
|
|
149
|
+
code: "invalid-provenance",
|
|
150
|
+
severity: "error",
|
|
151
|
+
message: "Package provenance must be a JSON object.",
|
|
152
|
+
path: "provenance",
|
|
153
|
+
});
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
if (raw.format !== HONUA_PACKAGE_PROVENANCE_FORMAT_V1) {
|
|
157
|
+
diagnostics.push({
|
|
158
|
+
code: "unsupported-provenance-format",
|
|
159
|
+
severity: "error",
|
|
160
|
+
message: `Package provenance.format must be "${HONUA_PACKAGE_PROVENANCE_FORMAT_V1}".`,
|
|
161
|
+
path: "provenance.format",
|
|
162
|
+
detail: { expected: HONUA_PACKAGE_PROVENANCE_FORMAT_V1, received: raw.format },
|
|
163
|
+
});
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (typeof raw.origin !== "string" || raw.origin.length === 0) {
|
|
167
|
+
diagnostics.push({
|
|
168
|
+
code: "missing-provenance-origin",
|
|
169
|
+
severity: "error",
|
|
170
|
+
message: "Package provenance.origin must be a non-empty string.",
|
|
171
|
+
path: "provenance.origin",
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
else if (!KNOWN_ORIGINS.has(raw.origin)) {
|
|
175
|
+
diagnostics.push({
|
|
176
|
+
code: "unknown-provenance-origin",
|
|
177
|
+
severity: "warning",
|
|
178
|
+
message: `Package provenance.origin "${raw.origin}" is not a known surface.`,
|
|
179
|
+
path: "provenance.origin",
|
|
180
|
+
detail: { origin: raw.origin, known: [...KNOWN_ORIGINS] },
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
if (raw.dataBindings !== undefined && !Array.isArray(raw.dataBindings)) {
|
|
184
|
+
diagnostics.push({
|
|
185
|
+
code: "invalid-provenance-data-bindings",
|
|
186
|
+
severity: "error",
|
|
187
|
+
message: "Package provenance.dataBindings must be an array when present.",
|
|
188
|
+
path: "provenance.dataBindings",
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
else if (Array.isArray(raw.dataBindings)) {
|
|
192
|
+
raw.dataBindings.forEach((binding, i) => {
|
|
193
|
+
if (!isRecord(binding) || typeof binding.sourceId !== "string" || binding.sourceId.length === 0) {
|
|
194
|
+
diagnostics.push({
|
|
195
|
+
code: "invalid-provenance-data-binding",
|
|
196
|
+
severity: "error",
|
|
197
|
+
message: "Each provenance dataBinding must carry a non-empty sourceId.",
|
|
198
|
+
path: `provenance.dataBindings[${i}].sourceId`,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
if (raw.permissions !== undefined && !Array.isArray(raw.permissions)) {
|
|
204
|
+
diagnostics.push({
|
|
205
|
+
code: "invalid-provenance-permissions",
|
|
206
|
+
severity: "error",
|
|
207
|
+
message: "Package provenance.permissions must be an array when present.",
|
|
208
|
+
path: "provenance.permissions",
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
else if (Array.isArray(raw.permissions)) {
|
|
212
|
+
raw.permissions.forEach((permission, i) => {
|
|
213
|
+
if (!isRecord(permission) || typeof permission.scope !== "string" || permission.scope.length === 0) {
|
|
214
|
+
diagnostics.push({
|
|
215
|
+
code: "invalid-provenance-permission",
|
|
216
|
+
severity: "error",
|
|
217
|
+
message: "Each provenance permission must carry a non-empty scope.",
|
|
218
|
+
path: `provenance.permissions[${i}].scope`,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function appendLifecycleDiagnostics(diagnostics, value, options) {
|
|
225
|
+
const nowMs = options.now instanceof Date ? options.now.getTime() : (options.now ?? Date.now());
|
|
226
|
+
if (value.status === "Expired") {
|
|
227
|
+
diagnostics.push({
|
|
228
|
+
code: "expired-package",
|
|
229
|
+
severity: "error",
|
|
230
|
+
message: "Package status is Expired.",
|
|
231
|
+
path: "status",
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
const expiresAt = parseTimestamp(value.expiresAt);
|
|
235
|
+
if (expiresAt !== undefined && expiresAt <= nowMs) {
|
|
236
|
+
diagnostics.push({
|
|
237
|
+
code: "expired-package",
|
|
238
|
+
severity: "error",
|
|
239
|
+
message: "Package expiresAt is in the past.",
|
|
240
|
+
path: "expiresAt",
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function parseTimestamp(value) {
|
|
245
|
+
if (typeof value !== "string" && typeof value !== "number")
|
|
246
|
+
return undefined;
|
|
247
|
+
const parsed = typeof value === "number" ? value : Date.parse(value);
|
|
248
|
+
return Number.isFinite(parsed) ? parsed : undefined;
|
|
249
|
+
}
|
|
250
|
+
function hasErrors(diagnostics) {
|
|
251
|
+
return diagnostics.some((d) => d.severity === "error");
|
|
252
|
+
}
|
|
253
|
+
function isRecord(value) {
|
|
254
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
255
|
+
}
|