@feltmaps/js-sdk 1.5.0-next.5 → 1.5.0-next.6

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.
@@ -1350,22 +1350,40 @@ interface LatLng {
1350
1350
  * GeoJSON.
1351
1351
  */
1352
1352
  type LngLatTuple = [longitude: number, latitude: number];
1353
+ interface PointGeometry extends zInfer<typeof PointGeometrySchema> {
1354
+ }
1353
1355
  /**
1354
1356
  * A GeoJSON point geometry.
1355
1357
  */
1356
- type PointGeometry = {
1358
+ declare const PointGeometrySchema: z.ZodObject<{
1359
+ type: z.ZodLiteral<"Point">;
1360
+ coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
1361
+ }, "strip", z.ZodTypeAny, {
1357
1362
  type: "Point";
1358
- coordinates: LngLatTuple;
1359
- };
1363
+ coordinates: [number, number];
1364
+ }, {
1365
+ type: "Point";
1366
+ coordinates: [number, number];
1367
+ }>;
1368
+ interface PolygonGeometry extends zInfer<typeof PolygonGeometrySchema> {
1369
+ }
1360
1370
  /**
1361
1371
  * A GeoJSON polygon geometry.
1362
1372
  */
1363
- type PolygonGeometry = {
1373
+ declare const PolygonGeometrySchema: z.ZodObject<{
1374
+ type: z.ZodLiteral<"Polygon">;
1375
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
1376
+ }, "strip", z.ZodTypeAny, {
1364
1377
  type: "Polygon";
1365
- coordinates: LngLatTuple[][];
1366
- };
1378
+ coordinates: [number, number][][];
1379
+ }, {
1380
+ type: "Polygon";
1381
+ coordinates: [number, number][][];
1382
+ }>;
1367
1383
  /**
1368
1384
  * A GeoJSON multi-polygon geometry.
1385
+ *
1386
+ * @interface
1369
1387
  */
1370
1388
  type MultiPolygonGeometry = {
1371
1389
  type: "MultiPolygon";
@@ -1373,6 +1391,8 @@ type MultiPolygonGeometry = {
1373
1391
  };
1374
1392
  /**
1375
1393
  * A GeoJSON line string geometry.
1394
+ *
1395
+ * @interface
1376
1396
  */
1377
1397
  type LineStringGeometry = {
1378
1398
  type: "LineString";
@@ -1380,6 +1400,8 @@ type LineStringGeometry = {
1380
1400
  };
1381
1401
  /**
1382
1402
  * A GeoJSON multi-line string geometry.
1403
+ *
1404
+ * @interface
1383
1405
  */
1384
1406
  type MultiLineStringGeometry = {
1385
1407
  type: "MultiLineString";
@@ -1945,6 +1967,582 @@ interface LayerFilters {
1945
1967
  combined: Filters;
1946
1968
  }
1947
1969
 
1970
+ declare const AggregateMethodSchema: z.ZodEnum<["avg", "max", "min", "sum", "median"]>;
1971
+ declare const AggregationConfigSchema: z.ZodObject<{
1972
+ /**
1973
+ * The operation to use on the values from the features in the layer
1974
+ */
1975
+ method: z.ZodEnum<["avg", "max", "min", "sum", "median"]>;
1976
+ /**
1977
+ * The attribute to use for the aggregation. This must be a numeric attribute.
1978
+ */
1979
+ attribute: z.ZodString;
1980
+ }, "strip", z.ZodTypeAny, {
1981
+ attribute: string;
1982
+ method: "avg" | "max" | "min" | "sum" | "median";
1983
+ }, {
1984
+ attribute: string;
1985
+ method: "avg" | "max" | "min" | "sum" | "median";
1986
+ }>;
1987
+ declare const MutliAggregationConfigSchema: z.ZodObject<{
1988
+ /**
1989
+ * The operations to use on the values from the features in the layer
1990
+ */
1991
+ methods: z.ZodArray<z.ZodUnion<[z.ZodEnum<["avg", "max", "min", "sum", "median"]>, z.ZodLiteral<"count">]>, "many">;
1992
+ /**
1993
+ * The attribute to use for the aggregation. This must be a numeric attribute.
1994
+ */
1995
+ attribute: z.ZodOptional<z.ZodString>;
1996
+ }, "strip", z.ZodTypeAny, {
1997
+ methods: ("avg" | "max" | "min" | "sum" | "median" | "count")[];
1998
+ attribute?: string | undefined;
1999
+ }, {
2000
+ methods: ("avg" | "max" | "min" | "sum" | "median" | "count")[];
2001
+ attribute?: string | undefined;
2002
+ }>;
2003
+ /**
2004
+ * Defines how to aggregate a value across features in a layer.
2005
+ */
2006
+ interface AggregationConfig extends zInfer<typeof AggregationConfigSchema> {
2007
+ /**
2008
+ * The method to use for the aggregation.
2009
+ */
2010
+ method: AggregationMethod;
2011
+ }
2012
+ /**
2013
+ * The method to use for the aggregation.
2014
+ */
2015
+ type AggregationMethod = z.infer<typeof AggregateMethodSchema>;
2016
+ /**
2017
+ * Defines how to aggregate a value across features in a layer with multiple aggregations
2018
+ * returned at once.
2019
+ */
2020
+ interface MultiAggregationConfig<T extends AggregationMethod | "count"> extends zInfer<typeof MutliAggregationConfigSchema> {
2021
+ methods: T[];
2022
+ /**
2023
+ * The attribute to use for the aggregation when aggregations other than "count" are used.
2024
+ *
2025
+ * This can be omitted if the only aggregation is "count", but must be a numeric attribute
2026
+ * otherwise.
2027
+ */
2028
+ attribute?: string;
2029
+ }
2030
+ declare const ValueConfigurationSchema: z.ZodObject<{
2031
+ boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
2032
+ type: z.ZodLiteral<"Polygon">;
2033
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
2034
+ }, "strip", z.ZodTypeAny, {
2035
+ type: "Polygon";
2036
+ coordinates: [number, number][][];
2037
+ }, {
2038
+ type: "Polygon";
2039
+ coordinates: [number, number][][];
2040
+ }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
2041
+ filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
2042
+ aggregation: z.ZodOptional<z.ZodObject<{
2043
+ /**
2044
+ * The operation to use on the values from the features in the layer
2045
+ */
2046
+ method: z.ZodEnum<["avg", "max", "min", "sum", "median"]>;
2047
+ /**
2048
+ * The attribute to use for the aggregation. This must be a numeric attribute.
2049
+ */
2050
+ attribute: z.ZodString;
2051
+ }, "strip", z.ZodTypeAny, {
2052
+ attribute: string;
2053
+ method: "avg" | "max" | "min" | "sum" | "median";
2054
+ }, {
2055
+ attribute: string;
2056
+ method: "avg" | "max" | "min" | "sum" | "median";
2057
+ }>>;
2058
+ }, "strip", z.ZodTypeAny, {
2059
+ boundary?: [number, number][] | {
2060
+ type: "Polygon";
2061
+ coordinates: [number, number][][];
2062
+ } | [number, number, number, number] | undefined;
2063
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2064
+ aggregation?: {
2065
+ attribute: string;
2066
+ method: "avg" | "max" | "min" | "sum" | "median";
2067
+ } | undefined;
2068
+ }, {
2069
+ boundary?: [number, number][] | {
2070
+ type: "Polygon";
2071
+ coordinates: [number, number][][];
2072
+ } | [number, number, number, number] | undefined;
2073
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2074
+ aggregation?: {
2075
+ attribute: string;
2076
+ method: "avg" | "max" | "min" | "sum" | "median";
2077
+ } | undefined;
2078
+ }>;
2079
+ /**
2080
+ * Configuration for filtering and aggregating values across features.
2081
+ *
2082
+ * This can be used to restrict the features considered for aggregation via the `boundary`
2083
+ * and `filters` properties.
2084
+ *
2085
+ * It can also be used to specify how to aggregate the values via the `aggregation` property.
2086
+ */
2087
+ interface ValueConfiguration extends zInfer<typeof ValueConfigurationSchema> {
2088
+ /**
2089
+ * A spatial boundary to filter what gets counted or aggregated, while still including
2090
+ * all possible categories or bin ranges in the results.
2091
+ */
2092
+ boundary?: PolygonGeometry | LngLatTuple[] | FeltBoundary;
2093
+ /**
2094
+ * Attribute filters to determine what gets counted or aggregated, while still including
2095
+ * all possible categories or bin ranges in the results.
2096
+ */
2097
+ filters?: Filters;
2098
+ /**
2099
+ * Specifies how to aggregate values within each category or bin. When omitted,
2100
+ * features are counted. When specified, the chosen calculation (avg, sum, etc.)
2101
+ * is performed on the specified attribute.
2102
+ *
2103
+ * For example, instead of counting buildings in each category, you might want
2104
+ * to sum their square footage or average their assessed values.
2105
+ */
2106
+ aggregation?: AggregationConfig;
2107
+ }
2108
+ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
2109
+ /**
2110
+ * The ID of the layer to get categories from.
2111
+ */
2112
+ layerId: z.ZodString;
2113
+ /**
2114
+ * The attribute to use for categorization.
2115
+ */
2116
+ attribute: z.ZodString;
2117
+ /**
2118
+ * The maximum number of categories to return.
2119
+ */
2120
+ limit: z.ZodOptional<z.ZodNumber>;
2121
+ boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
2122
+ type: z.ZodLiteral<"Polygon">;
2123
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
2124
+ }, "strip", z.ZodTypeAny, {
2125
+ type: "Polygon";
2126
+ coordinates: [number, number][][];
2127
+ }, {
2128
+ type: "Polygon";
2129
+ coordinates: [number, number][][];
2130
+ }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
2131
+ filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
2132
+ values: z.ZodOptional<z.ZodObject<{
2133
+ boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
2134
+ type: z.ZodLiteral<"Polygon">;
2135
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
2136
+ }, "strip", z.ZodTypeAny, {
2137
+ type: "Polygon";
2138
+ coordinates: [number, number][][];
2139
+ }, {
2140
+ type: "Polygon";
2141
+ coordinates: [number, number][][];
2142
+ }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
2143
+ filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
2144
+ aggregation: z.ZodOptional<z.ZodObject<{
2145
+ /**
2146
+ * The operation to use on the values from the features in the layer
2147
+ */
2148
+ method: z.ZodEnum<["avg", "max", "min", "sum", "median"]>;
2149
+ /**
2150
+ * The attribute to use for the aggregation. This must be a numeric attribute.
2151
+ */
2152
+ attribute: z.ZodString;
2153
+ }, "strip", z.ZodTypeAny, {
2154
+ attribute: string;
2155
+ method: "avg" | "max" | "min" | "sum" | "median";
2156
+ }, {
2157
+ attribute: string;
2158
+ method: "avg" | "max" | "min" | "sum" | "median";
2159
+ }>>;
2160
+ }, "strip", z.ZodTypeAny, {
2161
+ boundary?: [number, number][] | {
2162
+ type: "Polygon";
2163
+ coordinates: [number, number][][];
2164
+ } | [number, number, number, number] | undefined;
2165
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2166
+ aggregation?: {
2167
+ attribute: string;
2168
+ method: "avg" | "max" | "min" | "sum" | "median";
2169
+ } | undefined;
2170
+ }, {
2171
+ boundary?: [number, number][] | {
2172
+ type: "Polygon";
2173
+ coordinates: [number, number][][];
2174
+ } | [number, number, number, number] | undefined;
2175
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2176
+ aggregation?: {
2177
+ attribute: string;
2178
+ method: "avg" | "max" | "min" | "sum" | "median";
2179
+ } | undefined;
2180
+ }>>;
2181
+ }, "strip", z.ZodTypeAny, {
2182
+ layerId: string;
2183
+ attribute: string;
2184
+ values?: {
2185
+ boundary?: [number, number][] | {
2186
+ type: "Polygon";
2187
+ coordinates: [number, number][][];
2188
+ } | [number, number, number, number] | undefined;
2189
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2190
+ aggregation?: {
2191
+ attribute: string;
2192
+ method: "avg" | "max" | "min" | "sum" | "median";
2193
+ } | undefined;
2194
+ } | undefined;
2195
+ boundary?: [number, number][] | {
2196
+ type: "Polygon";
2197
+ coordinates: [number, number][][];
2198
+ } | [number, number, number, number] | undefined;
2199
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2200
+ limit?: number | undefined;
2201
+ }, {
2202
+ layerId: string;
2203
+ attribute: string;
2204
+ values?: {
2205
+ boundary?: [number, number][] | {
2206
+ type: "Polygon";
2207
+ coordinates: [number, number][][];
2208
+ } | [number, number, number, number] | undefined;
2209
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2210
+ aggregation?: {
2211
+ attribute: string;
2212
+ method: "avg" | "max" | "min" | "sum" | "median";
2213
+ } | undefined;
2214
+ } | undefined;
2215
+ boundary?: [number, number][] | {
2216
+ type: "Polygon";
2217
+ coordinates: [number, number][][];
2218
+ } | [number, number, number, number] | undefined;
2219
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2220
+ limit?: number | undefined;
2221
+ }>;
2222
+ /**
2223
+ * The parameters for getting categories from a layer, passed to
2224
+ * the {@link LayersController.getCategoryData} method.
2225
+ */
2226
+ interface GetLayerCategoriesParams extends zInfer<typeof GetLayerCategoriesParamsSchema> {
2227
+ /**
2228
+ * Attribute filters to determine what gets counted or aggregated.
2229
+ */
2230
+ filters?: Filters;
2231
+ /**
2232
+ * A spatial boundary to filter what gets counted or aggregated. This can be either
2233
+ * a [w, s, e, n] bounding box, a GeoJSON Polygon geometry, or a list of coordinates
2234
+ * that form a polyline.
2235
+ */
2236
+ boundary?: PolygonGeometry | LngLatTuple[] | FeltBoundary;
2237
+ /**
2238
+ * Configuration for filtering and aggregating values while preserving the full set of
2239
+ * categories in the results.
2240
+ *
2241
+ * This is particularly useful when you want to compare different subsets of data while
2242
+ * maintaining consistent categories. For example:
2243
+ *
2244
+ * - Show all building types in a city, but only count recent buildings in each type
2245
+ * - Keep all neighborhood categories but only sum up residential square footage
2246
+ *
2247
+ * Unlike top-level filters which affect both what categories appear AND their values,
2248
+ * filters in this configuration only affect the values while keeping all possible
2249
+ * categories in the results.
2250
+ */
2251
+ values?: ValueConfiguration;
2252
+ }
2253
+ declare const GetLayerCategoriesGroupSchema: z.ZodObject<{
2254
+ /**
2255
+ * The category for which the value was calculated.
2256
+ */
2257
+ key: z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean]>;
2258
+ /**
2259
+ * The value calculated for the category, whether a count, sum, average, etc.
2260
+ *
2261
+ * `null` is returned if there are no features in the category as opposed to zero,
2262
+ * so as not to confuse with a real zero value from some aggregation.
2263
+ */
2264
+ value: z.ZodNullable<z.ZodNumber>;
2265
+ }, "strip", z.ZodTypeAny, {
2266
+ value: number | null;
2267
+ key: string | number | boolean;
2268
+ }, {
2269
+ value: number | null;
2270
+ key: string | number | boolean;
2271
+ }>;
2272
+ /**
2273
+ * A single category from the response from the {@link LayersController.getCategoryData} method.
2274
+ */
2275
+ interface GetLayerCategoriesGroup extends zInfer<typeof GetLayerCategoriesGroupSchema> {
2276
+ }
2277
+ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
2278
+ layerId: z.ZodString;
2279
+ attribute: z.ZodString;
2280
+ steps: z.ZodUnion<[z.ZodObject<{
2281
+ type: z.ZodLiteral<"equal-intervals">;
2282
+ count: z.ZodNumber;
2283
+ }, "strip", z.ZodTypeAny, {
2284
+ type: "equal-intervals";
2285
+ count: number;
2286
+ }, {
2287
+ type: "equal-intervals";
2288
+ count: number;
2289
+ }>, z.ZodObject<{
2290
+ type: z.ZodLiteral<"time-interval">;
2291
+ interval: z.ZodEnum<["hour", "day", "week", "month", "year"]>;
2292
+ }, "strip", z.ZodTypeAny, {
2293
+ type: "time-interval";
2294
+ interval: "hour" | "day" | "week" | "month" | "year";
2295
+ }, {
2296
+ type: "time-interval";
2297
+ interval: "hour" | "day" | "week" | "month" | "year";
2298
+ }>, z.ZodArray<z.ZodNumber, "many">]>;
2299
+ boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
2300
+ type: z.ZodLiteral<"Polygon">;
2301
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
2302
+ }, "strip", z.ZodTypeAny, {
2303
+ type: "Polygon";
2304
+ coordinates: [number, number][][];
2305
+ }, {
2306
+ type: "Polygon";
2307
+ coordinates: [number, number][][];
2308
+ }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
2309
+ filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
2310
+ /**
2311
+ * Configuration for filtering and aggregating values while preserving the full set of
2312
+ * bin ranges in the results.
2313
+ *
2314
+ * This is particularly useful when you want to compare different subsets of data while
2315
+ * maintaining consistent ranges. For example:
2316
+ *
2317
+ * - Use the same height ranges for comparing old vs new buildings
2318
+ *
2319
+ * Unlike top-level filters which affect both what ranges appear AND their values,
2320
+ * filters in this configuration only affect the values while keeping all possible
2321
+ * ranges in the results.
2322
+ */
2323
+ values: z.ZodOptional<z.ZodObject<{
2324
+ boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
2325
+ type: z.ZodLiteral<"Polygon">;
2326
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
2327
+ }, "strip", z.ZodTypeAny, {
2328
+ type: "Polygon";
2329
+ coordinates: [number, number][][];
2330
+ }, {
2331
+ type: "Polygon";
2332
+ coordinates: [number, number][][];
2333
+ }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
2334
+ filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
2335
+ aggregation: z.ZodOptional<z.ZodObject<{
2336
+ /**
2337
+ * The operation to use on the values from the features in the layer
2338
+ */
2339
+ method: z.ZodEnum<["avg", "max", "min", "sum", "median"]>;
2340
+ /**
2341
+ * The attribute to use for the aggregation. This must be a numeric attribute.
2342
+ */
2343
+ attribute: z.ZodString;
2344
+ }, "strip", z.ZodTypeAny, {
2345
+ attribute: string;
2346
+ method: "avg" | "max" | "min" | "sum" | "median";
2347
+ }, {
2348
+ attribute: string;
2349
+ method: "avg" | "max" | "min" | "sum" | "median";
2350
+ }>>;
2351
+ }, "strip", z.ZodTypeAny, {
2352
+ boundary?: [number, number][] | {
2353
+ type: "Polygon";
2354
+ coordinates: [number, number][][];
2355
+ } | [number, number, number, number] | undefined;
2356
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2357
+ aggregation?: {
2358
+ attribute: string;
2359
+ method: "avg" | "max" | "min" | "sum" | "median";
2360
+ } | undefined;
2361
+ }, {
2362
+ boundary?: [number, number][] | {
2363
+ type: "Polygon";
2364
+ coordinates: [number, number][][];
2365
+ } | [number, number, number, number] | undefined;
2366
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2367
+ aggregation?: {
2368
+ attribute: string;
2369
+ method: "avg" | "max" | "min" | "sum" | "median";
2370
+ } | undefined;
2371
+ }>>;
2372
+ }, "strip", z.ZodTypeAny, {
2373
+ layerId: string;
2374
+ attribute: string;
2375
+ steps: number[] | {
2376
+ type: "equal-intervals";
2377
+ count: number;
2378
+ } | {
2379
+ type: "time-interval";
2380
+ interval: "hour" | "day" | "week" | "month" | "year";
2381
+ };
2382
+ values?: {
2383
+ boundary?: [number, number][] | {
2384
+ type: "Polygon";
2385
+ coordinates: [number, number][][];
2386
+ } | [number, number, number, number] | undefined;
2387
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2388
+ aggregation?: {
2389
+ attribute: string;
2390
+ method: "avg" | "max" | "min" | "sum" | "median";
2391
+ } | undefined;
2392
+ } | undefined;
2393
+ boundary?: [number, number][] | {
2394
+ type: "Polygon";
2395
+ coordinates: [number, number][][];
2396
+ } | [number, number, number, number] | undefined;
2397
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2398
+ }, {
2399
+ layerId: string;
2400
+ attribute: string;
2401
+ steps: number[] | {
2402
+ type: "equal-intervals";
2403
+ count: number;
2404
+ } | {
2405
+ type: "time-interval";
2406
+ interval: "hour" | "day" | "week" | "month" | "year";
2407
+ };
2408
+ values?: {
2409
+ boundary?: [number, number][] | {
2410
+ type: "Polygon";
2411
+ coordinates: [number, number][][];
2412
+ } | [number, number, number, number] | undefined;
2413
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2414
+ aggregation?: {
2415
+ attribute: string;
2416
+ method: "avg" | "max" | "min" | "sum" | "median";
2417
+ } | undefined;
2418
+ } | undefined;
2419
+ boundary?: [number, number][] | {
2420
+ type: "Polygon";
2421
+ coordinates: [number, number][][];
2422
+ } | [number, number, number, number] | undefined;
2423
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2424
+ }>;
2425
+ /**
2426
+ * The params used to request a histogram of values from a layer, passed to
2427
+ * the {@link LayersController.getHistogramData} method.
2428
+ */
2429
+ interface GetLayerHistogramParams extends zInfer<typeof GetLayerHistogramParamsSchema> {
2430
+ /**
2431
+ * Attribute filters to determine what gets counted or aggregated.
2432
+ */
2433
+ filters?: Filters;
2434
+ /**
2435
+ * A spatial boundary to filter what gets counted or aggregated. This can be either
2436
+ * a [w, s, e, n] bounding box, a GeoJSON Polygon geometry, or a list of coordinates
2437
+ * that form a polyline.
2438
+ */
2439
+ boundary?: PolygonGeometry | LngLatTuple[] | FeltBoundary;
2440
+ }
2441
+ declare const GetLayerHistogramBinSchema: z.ZodObject<{
2442
+ /**
2443
+ * The left edge of the bin.
2444
+ */
2445
+ min: z.ZodNumber;
2446
+ /**
2447
+ * The right edge of the bin.
2448
+ */
2449
+ max: z.ZodNumber;
2450
+ /**
2451
+ * The number of features in the bin.
2452
+ */
2453
+ value: z.ZodNumber;
2454
+ }, "strip", z.ZodTypeAny, {
2455
+ value: number;
2456
+ max: number;
2457
+ min: number;
2458
+ }, {
2459
+ value: number;
2460
+ max: number;
2461
+ min: number;
2462
+ }>;
2463
+ /**
2464
+ * One bin from the response from the {@link LayersController.getHistogramData} method.
2465
+ */
2466
+ interface GetLayerHistogramBin extends zInfer<typeof GetLayerHistogramBinSchema> {
2467
+ }
2468
+ declare const GetLayerCalculationParamsSchema: z.ZodObject<{
2469
+ /**
2470
+ * The ID of the layer to calculate an aggregate value for.
2471
+ */
2472
+ layerId: z.ZodString;
2473
+ boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
2474
+ type: z.ZodLiteral<"Polygon">;
2475
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
2476
+ }, "strip", z.ZodTypeAny, {
2477
+ type: "Polygon";
2478
+ coordinates: [number, number][][];
2479
+ }, {
2480
+ type: "Polygon";
2481
+ coordinates: [number, number][][];
2482
+ }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
2483
+ filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
2484
+ aggregation: z.ZodObject<{
2485
+ /**
2486
+ * The operations to use on the values from the features in the layer
2487
+ */
2488
+ methods: z.ZodArray<z.ZodUnion<[z.ZodEnum<["avg", "max", "min", "sum", "median"]>, z.ZodLiteral<"count">]>, "many">;
2489
+ /**
2490
+ * The attribute to use for the aggregation. This must be a numeric attribute.
2491
+ */
2492
+ attribute: z.ZodOptional<z.ZodString>;
2493
+ }, "strip", z.ZodTypeAny, {
2494
+ methods: ("avg" | "max" | "min" | "sum" | "median" | "count")[];
2495
+ attribute?: string | undefined;
2496
+ }, {
2497
+ methods: ("avg" | "max" | "min" | "sum" | "median" | "count")[];
2498
+ attribute?: string | undefined;
2499
+ }>;
2500
+ }, "strip", z.ZodTypeAny, {
2501
+ layerId: string;
2502
+ aggregation: {
2503
+ methods: ("avg" | "max" | "min" | "sum" | "median" | "count")[];
2504
+ attribute?: string | undefined;
2505
+ };
2506
+ boundary?: [number, number][] | {
2507
+ type: "Polygon";
2508
+ coordinates: [number, number][][];
2509
+ } | [number, number, number, number] | undefined;
2510
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2511
+ }, {
2512
+ layerId: string;
2513
+ aggregation: {
2514
+ methods: ("avg" | "max" | "min" | "sum" | "median" | "count")[];
2515
+ attribute?: string | undefined;
2516
+ };
2517
+ boundary?: [number, number][] | {
2518
+ type: "Polygon";
2519
+ coordinates: [number, number][][];
2520
+ } | [number, number, number, number] | undefined;
2521
+ filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
2522
+ }>;
2523
+ /**
2524
+ * The parameters for calculating a single aggregate value for a layer, passed to
2525
+ * the {@link LayersController.getAggregates} method.
2526
+ */
2527
+ interface GetLayerCalculationParams<T extends AggregationMethod | "count"> extends z.infer<typeof GetLayerCalculationParamsSchema> {
2528
+ /**
2529
+ * Attribute filters to determine what gets counted or aggregated.
2530
+ */
2531
+ filters?: Filters;
2532
+ /**
2533
+ * A spatial boundary to filter what gets counted or aggregated. This can be either
2534
+ * a [w, s, e, n] bounding box, a GeoJSON Polygon geometry, or a list of coordinates
2535
+ * that form a polyline.
2536
+ */
2537
+ boundary?: PolygonGeometry | LngLatTuple[] | FeltBoundary;
2538
+ /**
2539
+ * Specifies how to aggregate values within each category or bin. When omitted,
2540
+ * features are counted. When specified, the chosen calculation (avg, sum, etc.)
2541
+ * is performed on the specified attribute.
2542
+ */
2543
+ aggregation: MultiAggregationConfig<T>;
2544
+ }
2545
+
1948
2546
  /**
1949
2547
  * The event object passed to the interaction listeners.
1950
2548
  */
@@ -2446,4 +3044,4 @@ declare const ViewportFitBoundsParamsSchema: z.ZodObject<{
2446
3044
  bounds: [number, number, number, number];
2447
3045
  }>;
2448
3046
 
2449
- export type { NoteElementRead as $, ViewportConstraints as A, ViewportFitBoundsParams as B, ConfigurableToolType as C, ViewportCenterZoom as D, Element as E, Filters as F, Geometry as G, CircleElementCreate as H, InputToolSettings as I, CircleElementRead as J, CircleElementUpdate as K, Layer as L, MapInteractionEvent as M, HighlighterElementCreate as N, HighlighterElementRead as O, HighlighterElementUpdate as P, ImageElementCreate as Q, ImageElementRead as R, SetVisibilityRequest as S, ToolType as T, ImageElementUpdate as U, ViewportState as V, LinkElementRead as W, MarkerElementCreate as X, MarkerElementRead as Y, MarkerElementUpdate as Z, NoteElementCreate as _, GetElementsConstraint as a, NoteElementUpdate as a0, PathElementCreate as a1, PathElementRead as a2, PathElementUpdate as a3, PlaceElementCreate as a4, PlaceElementRead as a5, PlaceElementUpdate as a6, PolygonElementCreate as a7, PolygonElementRead as a8, PolygonElementUpdate as a9, NoteToolSettings as aA, PinToolSettings as aB, PlaceFrame as aC, PlaceSymbol as aD, PolygonToolSettings as aE, RouteToolSettings as aF, TextToolSettings as aG, UnionToIntersection as aH, PromiseOrNot as aI, TextElementCreate as aa, TextElementRead as ab, TextElementUpdate as ac, LayerProcessingStatus as ad, RasterValue as ae, FilterExpression as af, FilterLogicGate as ag, FilterTernary as ah, ElementGroupNode as ai, ElementNode as aj, FeatureNode as ak, LayerGroupNode as al, LayerNode as am, FeltBoundary as an, FeltZoom as ao, LatLng as ap, LineStringGeometry as aq, LngLatTuple as ar, MultiLineStringGeometry as as, MultiPolygonGeometry as at, PointGeometry as au, PolygonGeometry as av, CircleToolSettings as aw, HighlighterToolSettings as ax, LineToolSettings as ay, MarkerToolSettings as az, ElementGroup as b, GetElementGroupsConstraint as c, ElementChangeCallbackParams as d, ElementGroupChangeCallbackParams as e, ElementCreate as f, ElementUpdate as g, GetLayersConstraint as h, LayerChangeCallbackParams as i, LayerGroup as j, GetLayerGroupsConstraint as k, LayerGroupChangeCallbackParams as l, LegendItemIdentifier as m, LegendItem as n, LegendItemsConstraint as o, LegendItemChangeCallbackParams as p, LayerFilters as q, GetRenderedFeaturesConstraint as r, Feature as s, MapDetails as t, EntityNode as u, FeatureSelection as v, ToolSettingsMap as w, ToolSettingsChangeEvent as x, SetViewportCenterZoomParams as y, zInfer as z };
3047
+ export type { ImageElementUpdate as $, AggregationMethod as A, FeatureSelection as B, ConfigurableToolType as C, ToolSettingsMap as D, Element as E, Filters as F, Geometry as G, ToolSettingsChangeEvent as H, InputToolSettings as I, zInfer as J, SetViewportCenterZoomParams as K, Layer as L, MapInteractionEvent as M, ViewportConstraints as N, ViewportFitBoundsParams as O, ViewportCenterZoom as P, CircleElementCreate as Q, CircleElementRead as R, SetVisibilityRequest as S, ToolType as T, CircleElementUpdate as U, ViewportState as V, HighlighterElementCreate as W, HighlighterElementRead as X, HighlighterElementUpdate as Y, ImageElementCreate as Z, ImageElementRead as _, GetElementsConstraint as a, LinkElementRead as a0, MarkerElementCreate as a1, MarkerElementRead as a2, MarkerElementUpdate as a3, NoteElementCreate as a4, NoteElementRead as a5, NoteElementUpdate as a6, PathElementCreate as a7, PathElementRead as a8, PathElementUpdate as a9, LngLatTuple as aA, MultiLineStringGeometry as aB, MultiPolygonGeometry as aC, PointGeometry as aD, PolygonGeometry as aE, CircleToolSettings as aF, HighlighterToolSettings as aG, LineToolSettings as aH, MarkerToolSettings as aI, NoteToolSettings as aJ, PinToolSettings as aK, PlaceFrame as aL, PlaceSymbol as aM, PolygonToolSettings as aN, RouteToolSettings as aO, TextToolSettings as aP, UnionToIntersection as aQ, PromiseOrNot as aR, PlaceElementCreate as aa, PlaceElementRead as ab, PlaceElementUpdate as ac, PolygonElementCreate as ad, PolygonElementRead as ae, PolygonElementUpdate as af, TextElementCreate as ag, TextElementRead as ah, TextElementUpdate as ai, LayerProcessingStatus as aj, RasterValue as ak, FilterExpression as al, FilterLogicGate as am, FilterTernary as an, AggregationConfig as ao, MultiAggregationConfig as ap, ValueConfiguration as aq, ElementGroupNode as ar, ElementNode as as, FeatureNode as at, LayerGroupNode as au, LayerNode as av, FeltBoundary as aw, FeltZoom as ax, LatLng as ay, LineStringGeometry as az, ElementGroup as b, GetElementGroupsConstraint as c, ElementChangeCallbackParams as d, ElementGroupChangeCallbackParams as e, ElementCreate as f, ElementUpdate as g, GetLayersConstraint as h, LayerChangeCallbackParams as i, LayerGroup as j, GetLayerGroupsConstraint as k, LayerGroupChangeCallbackParams as l, LegendItemIdentifier as m, LegendItem as n, LegendItemsConstraint as o, LegendItemChangeCallbackParams as p, LayerFilters as q, GetRenderedFeaturesConstraint as r, Feature as s, GetLayerCategoriesParams as t, GetLayerCategoriesGroup as u, GetLayerHistogramParams as v, GetLayerHistogramBin as w, GetLayerCalculationParams as x, MapDetails as y, EntityNode as z };