Skip to main content

anyDatasetSchema

const anyDatasetSchema: ZodObject<{ dataType: ZodEnum<{ ARROW: "ARROW"; GEOJSON: "GEOJSON"; Unknown: "Unknown"; }>; description: ZodString; fields: ZodArray<ZodObject<{ availableValues: ZodOptional<ZodArray<ZodRecord<ZodString, ZodUnknown>>>; id: ZodString; label: ZodString; nullable: ZodBoolean; type: ZodEnum<{ (f32, f32): "(f32, f32)"; bool: "bool"; bool[]: "bool[]"; date: "date"; date[]: "date[]"; datetime: "datetime"; datetime[]: "datetime[]"; f32: "f32"; f32[]: "f32[]"; f64: "f64"; f64[]: "f64[]"; i32: "i32"; i32[]: "i32[]"; i64: "i64"; i64[]: "i64[]"; str: "str"; str[]: "str[]"; time: "time"; time[]: "time[]"; }>; visible: ZodBoolean; }, $strip>>; id: ZodString; level: ZodEnum<{ generated: "generated"; user: "user"; }>; metadata: ZodObject<{ defaultFields: ZodArray<ZodString>; filterDialect: ZodOptional<ZodEnum<{ cql: "cql"; gml: "gml"; }>>; geometryProperty: ZodString; idProperty: ZodOptional<ZodString>; maxRequests: ZodOptional<ZodNumber>; maxZoom: ZodOptional<ZodNumber>; minZoom: ZodOptional<ZodNumber>; positionFormat: ZodOptional<ZodEnum<{ XY: "XY"; XYZ: "XYZ"; }>>; refetchInterval: ZodOptional<ZodNumber>; serviceLayer: ZodOptional<ZodString>; serviceUrls: ZodOptional<ZodArray<ZodString>>; serviceVersion: ZodOptional<ZodString>; table: ZodString; }, $strip>; mutatable: ZodBoolean; name: ZodString; presentationTypes: ZodRecord<ZodString, ZodNullable<ZodArray<ZodUnion<readonly [ZodLiteral<"icon">, ZodLiteral<"point">, ZodLiteral<"path">, ZodLiteral<"polygon">, ZodString]>>>>; serviceType: ZodEnum<{ FS: "FS"; Unknown: "Unknown"; VTS: "VTS"; WFS: "WFS"; WMS: "WMS"; }>; visible: ZodBoolean; }, $strip>

Complete dataset configuration combining service integration and data specification.

Remarks

Provides a unified interface for all dataset types regardless of service or data format. The discriminated union pattern enables type-safe handling of different combinations.

Example

const validateDataset = validate(anyDatasetSchema);