import { t as Geometry$1 } from "./geojson-L3qRlIZY.mjs"; import { AnyCodecDescriptor, CodecCallContext, CodecDescriptorImpl, CodecImpl, CodecInstanceContext } from "@prisma-next/framework-components/codec"; import { JsonValue } from "@prisma-next/contract/types"; import { ExtractCodecTypes } from "@prisma-next/sql-relational-core/ast"; import { StandardSchemaV1 } from "@standard-schema/spec"; //#region src/core/constants.d.ts declare const POSTGIS_GEOMETRY_CODEC_ID: "pg/geometry@1"; //#endregion //#region src/core/codecs.d.ts type GeometryParams = { readonly srid: number; }; declare class PostgisGeometryCodec extends CodecImpl { constructor(descriptor: AnyCodecDescriptor); encode(value: Geometry$1, _ctx: CodecCallContext): Promise; decode(wire: string, _ctx: CodecCallContext): Promise; encodeJson(value: Geometry$1): JsonValue; decodeJson(json: JsonValue): Geometry$1; } declare class PostgisGeometryDescriptor extends CodecDescriptorImpl { readonly codecId: "pg/geometry@1"; readonly traits: readonly ["equality"]; readonly targetTypes: readonly ["geometry"]; readonly meta: { readonly db: { readonly sql: { readonly postgres: { readonly nativeType: "geometry"; }; }; }; }; readonly paramsSchema: StandardSchemaV1; renderOutputType(params: GeometryParams): string; /** * The runtime calls `factory(undefined)(ctx)` to materialize a * representative codec for parameterised descriptors that ship a * no-params column variant (here, `geometryColumn` vs `geometry({ srid })`). * The runtime cast widens `params` to `unknown`, so guarding with an * optional read keeps the typed call site (`factory({ srid })`) * strict while still producing an SRID-agnostic codec for * representative use. Encode/decode for an unparameterised column * runs through this representative; the wire format already carries * SRID inside the EWKT/EWKB payload, so it's dimension-independent. */ factory(_params: GeometryParams): (ctx: CodecInstanceContext) => PostgisGeometryCodec; } declare const codecDescriptorMap: { readonly geometry: PostgisGeometryDescriptor; }; type CodecTypes$1 = ExtractCodecTypes; //#endregion //#region src/types/codec-types.d.ts type Geometry<_Srid extends number = number> = Geometry$1; type CodecTypes = CodecTypes$1; //#endregion export { Geometry as n, CodecTypes as t }; //# sourceMappingURL=codec-types-ByouxoVd.d.mts.map