@carto/api-client 0.5.0-alpha.4 → 0.5.0-alpha.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.
Files changed (94) hide show
  1. package/build/api-client.cjs +2803 -2697
  2. package/build/api-client.d.cts +1384 -0
  3. package/build/api-client.d.ts +1384 -0
  4. package/build/api-client.js +1722 -0
  5. package/build/chunk-LEI5PI5X.js +2063 -0
  6. package/build/worker.d.ts +2 -0
  7. package/build/worker.js +23 -0
  8. package/package.json +18 -18
  9. package/src/constants-internal.ts +0 -6
  10. package/src/filters/tileFeatures.ts +10 -26
  11. package/src/global.d.ts +3 -8
  12. package/src/sources/h3-tileset-source.ts +8 -1
  13. package/src/sources/quadbin-tileset-source.ts +8 -1
  14. package/src/sources/raster-source.ts +5 -18
  15. package/src/sources/types.ts +7 -1
  16. package/src/sources/vector-tileset-source.ts +8 -1
  17. package/src/types.ts +0 -6
  18. package/src/widget-sources/index.ts +1 -1
  19. package/src/widget-sources/widget-remote-source.ts +35 -2
  20. package/src/widget-sources/widget-source.ts +1 -38
  21. package/src/widget-sources/widget-tileset-source.ts +9 -20
  22. package/src/widget-sources/widget-tileset-worker-source.ts +268 -0
  23. package/src/workers/constants.ts +13 -0
  24. package/src/workers/types.ts +19 -0
  25. package/src/workers/utils.ts +33 -0
  26. package/src/workers/widget-tileset-worker.ts +39 -0
  27. package/build/api/carto-api-error.d.ts +0 -26
  28. package/build/api/endpoints.d.ts +0 -24
  29. package/build/api/index.d.ts +0 -5
  30. package/build/api/query.d.ts +0 -3
  31. package/build/api/request-with-parameters.d.ts +0 -10
  32. package/build/api-client.cjs.map +0 -1
  33. package/build/api-client.modern.js +0 -3445
  34. package/build/api-client.modern.js.map +0 -1
  35. package/build/client.d.ts +0 -14
  36. package/build/constants-internal.d.ts +0 -26
  37. package/build/constants.d.ts +0 -53
  38. package/build/deck/get-data-filter-extension-props.d.ts +0 -18
  39. package/build/deck/index.d.ts +0 -1
  40. package/build/filters/Filter.d.ts +0 -25
  41. package/build/filters/FilterTypes.d.ts +0 -3
  42. package/build/filters/geosjonFeatures.d.ts +0 -8
  43. package/build/filters/index.d.ts +0 -6
  44. package/build/filters/tileFeatures.d.ts +0 -21
  45. package/build/filters/tileFeaturesGeometries.d.ts +0 -13
  46. package/build/filters/tileFeaturesRaster.d.ts +0 -16
  47. package/build/filters/tileFeaturesSpatialIndex.d.ts +0 -10
  48. package/build/filters.d.ts +0 -39
  49. package/build/geo.d.ts +0 -19
  50. package/build/index.d.ts +0 -16
  51. package/build/models/common.d.ts +0 -28
  52. package/build/models/index.d.ts +0 -3
  53. package/build/models/model.d.ts +0 -37
  54. package/build/operations/aggregation.d.ts +0 -8
  55. package/build/operations/applySorting.d.ts +0 -20
  56. package/build/operations/groupBy.d.ts +0 -15
  57. package/build/operations/groupByDate.d.ts +0 -11
  58. package/build/operations/histogram.d.ts +0 -13
  59. package/build/operations/index.d.ts +0 -6
  60. package/build/operations/scatterPlot.d.ts +0 -14
  61. package/build/sources/base-source.d.ts +0 -4
  62. package/build/sources/boundary-query-source.d.ts +0 -10
  63. package/build/sources/boundary-table-source.d.ts +0 -8
  64. package/build/sources/h3-query-source.d.ts +0 -5
  65. package/build/sources/h3-table-source.d.ts +0 -5
  66. package/build/sources/h3-tileset-source.d.ts +0 -5
  67. package/build/sources/index.d.ts +0 -26
  68. package/build/sources/quadbin-query-source.d.ts +0 -5
  69. package/build/sources/quadbin-table-source.d.ts +0 -5
  70. package/build/sources/quadbin-tileset-source.d.ts +0 -5
  71. package/build/sources/raster-source.d.ts +0 -5
  72. package/build/sources/types.d.ts +0 -366
  73. package/build/sources/vector-query-source.d.ts +0 -5
  74. package/build/sources/vector-table-source.d.ts +0 -5
  75. package/build/sources/vector-tileset-source.d.ts +0 -5
  76. package/build/spatial-index.d.ts +0 -14
  77. package/build/types-internal.d.ts +0 -56
  78. package/build/types.d.ts +0 -148
  79. package/build/utils/dateUtils.d.ts +0 -10
  80. package/build/utils/getTileFormat.d.ts +0 -3
  81. package/build/utils/makeIntervalComplete.d.ts +0 -2
  82. package/build/utils/transformTileCoordsToWGS84.d.ts +0 -8
  83. package/build/utils/transformToTileCoords.d.ts +0 -9
  84. package/build/utils.d.ts +0 -32
  85. package/build/widget-sources/index.d.ts +0 -7
  86. package/build/widget-sources/types.d.ts +0 -160
  87. package/build/widget-sources/widget-query-source.d.ts +0 -34
  88. package/build/widget-sources/widget-raster-source.d.ts +0 -11
  89. package/build/widget-sources/widget-remote-source.d.ts +0 -21
  90. package/build/widget-sources/widget-source.d.ts +0 -74
  91. package/build/widget-sources/widget-table-source.d.ts +0 -34
  92. package/build/widget-sources/widget-tileset-source.d.ts +0 -75
  93. package/src/filters/tileFeaturesRaster.ts +0 -111
  94. package/src/widget-sources/widget-raster-source.ts +0 -14
package/build/client.d.ts DELETED
@@ -1,14 +0,0 @@
1
- /**
2
- * Returns current client ID, used to categorize API requests. For internal use only.
3
- *
4
- * @internal
5
- * @privateRemarks Source: @carto/react-core
6
- */
7
- export declare function getClient(): string;
8
- /**
9
- * Sets current client ID, used to categorize API requests. For internal use only.
10
- *
11
- * @internal
12
- * @privateRemarks Source: @carto/react-core
13
- */
14
- export declare function setClient(c: string): void;
@@ -1,26 +0,0 @@
1
- /**
2
- * Current version of @carto/api-client.
3
- * @internal
4
- */
5
- export declare const API_CLIENT_VERSION: string;
6
- /** @internal */
7
- export declare const V3_MINOR_VERSION = "3.4";
8
- /** @privateRemarks Source: @carto/constants, @deck.gl/carto */
9
- export declare const DEFAULT_GEO_COLUMN = "geom";
10
- /**
11
- * Fastly default limit is 8192; leave some padding.
12
- * @privateRemarks Source: @deck.gl/carto
13
- */
14
- export declare const DEFAULT_MAX_LENGTH_URL = 7000;
15
- /** @privateRemarks Source: @deck.gl/carto */
16
- export declare const DEFAULT_TILE_RESOLUTION = 0.5;
17
- /**
18
- * @privateRemarks Source: @deck.gl/carto
19
- * @internal
20
- */
21
- export declare const DEFAULT_AGGREGATION_RES_LEVEL_H3 = 4;
22
- /**
23
- * @privateRemarks Source: @deck.gl/carto
24
- * @internal
25
- */
26
- export declare const DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN = 6;
@@ -1,53 +0,0 @@
1
- /**
2
- * Defines a comparator used when matching a column's values against given filter values.
3
- *
4
- * Example:
5
- *
6
- * ```javascript
7
- * import { FilterType } from '@carto/api-client';
8
- * const filters = {
9
- * column_name: { [FilterType.IN]: { values: ['a', 'b', 'c'] } }
10
- * };
11
- * ```
12
- *
13
- * @privateRemarks Source: @carto/react-api, @deck.gl/carto
14
- */
15
- export declare enum FilterType {
16
- IN = "in",
17
- /** [a, b] both are included. */
18
- BETWEEN = "between",
19
- /** [a, b) a is included, b is not. */
20
- CLOSED_OPEN = "closed_open",
21
- TIME = "time",
22
- STRING_SEARCH = "stringSearch"
23
- }
24
- /** @privateRemarks Source: @carto/constants */
25
- export declare enum ApiVersion {
26
- V1 = "v1",
27
- V2 = "v2",
28
- V3 = "v3"
29
- }
30
- /** @privateRemarks Source: @carto/constants, @deck.gl/carto */
31
- export declare const DEFAULT_API_BASE_URL = "https://gcp-us-east1.api.carto.com";
32
- /** @privateRemarks Source: @carto/react-core */
33
- export declare enum TileFormat {
34
- MVT = "mvt",
35
- JSON = "json",
36
- GEOJSON = "geojson",
37
- BINARY = "binary"
38
- }
39
- /** @privateRemarks Source: @carto/react-core */
40
- export declare enum SpatialIndex {
41
- H3 = "h3",
42
- S2 = "s2",
43
- QUADBIN = "quadbin"
44
- }
45
- /** @privateRemarks Source: @carto/react-core */
46
- export declare enum Provider {
47
- BIGQUERY = "bigquery",
48
- REDSHIFT = "redshift",
49
- POSTGRES = "postgres",
50
- SNOWFLAKE = "snowflake",
51
- DATABRICKS = "databricks",
52
- DATABRICKS_REST = "databricksRest"
53
- }
@@ -1,18 +0,0 @@
1
- import { Feature } from 'geojson';
2
- import { FilterLogicalOperator, Filters } from '../types.js';
3
- import { FeatureData } from '../types-internal.js';
4
- /** @experimental Prefer type definition from deck.gl. */
5
- export type _DataFilterExtensionProps = {
6
- filterRange: number[][];
7
- updateTriggers: Record<string, string>;
8
- getFilterValue: (feature: Feature | FeatureData) => number[];
9
- };
10
- /**
11
- * Creates props for DataFilterExtension, from `@deck.gl/extensions`, given
12
- * a set of filters.
13
- *
14
- * @privateRemarks DataFilterExtension accepts up to 4 values to filter. This
15
- * implementation uses the 1st for all filters except the time filter, and the
16
- * 2nd for the time filter.
17
- */
18
- export declare function getDataFilterExtensionProps(filters: Filters, filtersLogicalOperator?: FilterLogicalOperator, filterSize?: 0 | 1 | 2 | 3 | 4): _DataFilterExtensionProps;
@@ -1 +0,0 @@
1
- export * from './get-data-filter-extension-props.js';
@@ -1,25 +0,0 @@
1
- import { FilterLogicalOperator, Filters } from '../types.js';
2
- import { Feature } from 'geojson';
3
- import { FeatureData } from '../types-internal.js';
4
- import { BinaryFeature } from '@loaders.gl/schema';
5
- /**
6
- * @internal
7
- * @privateRemarks Exported for use in @deck.gl/carto's getDataFilterExtensionProps.
8
- */
9
- export declare function _buildFeatureFilter({ filters, type, filtersLogicalOperator, }: {
10
- filters?: Filters;
11
- type?: 'number' | 'boolean';
12
- filtersLogicalOperator?: FilterLogicalOperator;
13
- }): (feature: Feature | FeatureData) => number | boolean;
14
- /**
15
- * Apply certain filters to a collection of features.
16
- * @internal
17
- */
18
- export declare function applyFilters(features: FeatureData[], filters: Filters, filtersLogicalOperator: FilterLogicalOperator): FeatureData[];
19
- /**
20
- * Binary.
21
- * @internal
22
- */
23
- export declare function buildBinaryFeatureFilter({ filters }: {
24
- filters: Filters;
25
- }): (() => number) | ((featureIdIdx: number, binaryData: BinaryFeature) => boolean);
@@ -1,3 +0,0 @@
1
- import { FilterType } from '../constants.js';
2
- export type FilterFunction = (filterValues: unknown[], featureValue: unknown, params?: Record<string, unknown>) => boolean;
3
- export declare const filterFunctions: Record<FilterType, FilterFunction>;
@@ -1,8 +0,0 @@
1
- import { FeatureCollection } from 'geojson';
2
- import { FeatureData } from '../types-internal.js';
3
- import { SpatialFilter } from '../types.js';
4
- export declare function geojsonFeatures({ geojson, spatialFilter, uniqueIdProperty, }: {
5
- geojson: FeatureCollection;
6
- spatialFilter: SpatialFilter;
7
- uniqueIdProperty?: string;
8
- }): FeatureData[];
@@ -1,6 +0,0 @@
1
- export * from './Filter.js';
2
- export * from './FilterTypes.js';
3
- export * from './geosjonFeatures.js';
4
- export * from './tileFeatures.js';
5
- export * from './tileFeaturesGeometries.js';
6
- export * from './tileFeaturesSpatialIndex.js';
@@ -1,21 +0,0 @@
1
- import { SpatialFilter, Tile } from '../types.js';
2
- import { TileFormat } from '../constants.js';
3
- import { FeatureData } from '../types-internal.js';
4
- import { RasterMetadata, SpatialDataType } from '../sources/types.js';
5
- /** @privateRemarks Source: @carto/react-core */
6
- export type TileFeatures = {
7
- tiles: Tile[];
8
- tileFormat: TileFormat;
9
- spatialDataType: SpatialDataType;
10
- spatialDataColumn?: string;
11
- spatialFilter: SpatialFilter;
12
- uniqueIdProperty?: string;
13
- rasterMetadata?: RasterMetadata;
14
- options?: TileFeatureExtractOptions;
15
- };
16
- /** @privateRemarks Source: @carto/react-core */
17
- export type TileFeatureExtractOptions = {
18
- storeGeometry?: boolean;
19
- };
20
- /** @privateRemarks Source: @carto/react-core */
21
- export declare function tileFeatures({ tiles, spatialFilter, uniqueIdProperty, tileFormat, spatialDataColumn, spatialDataType, rasterMetadata, options, }: TileFeatures): FeatureData[];
@@ -1,13 +0,0 @@
1
- import { TileFormat } from '../constants.js';
2
- import { SpatialFilter, Tile } from '../types.js';
3
- import { FeatureData } from '../types-internal.js';
4
- export declare const FEATURE_GEOM_PROPERTY = "__geomValue";
5
- export declare function tileFeaturesGeometries({ tiles, tileFormat, spatialFilter, uniqueIdProperty, options, }: {
6
- tiles: Tile[];
7
- tileFormat?: TileFormat;
8
- spatialFilter: SpatialFilter;
9
- uniqueIdProperty?: string;
10
- options?: {
11
- storeGeometry?: boolean;
12
- };
13
- }): FeatureData[];
@@ -1,16 +0,0 @@
1
- import { RasterTile, SpatialFilter, Tile } from '../types.js';
2
- import { FeatureData } from '../types-internal.js';
3
- import { RasterMetadata, SpatialDataType } from '../sources/types.js';
4
- export type TileFeaturesRasterOptions = {
5
- tiles: RasterTile[];
6
- spatialFilter: SpatialFilter;
7
- spatialDataColumn: string;
8
- spatialDataType: SpatialDataType;
9
- rasterMetadata: RasterMetadata;
10
- };
11
- export declare function tileFeaturesRaster({ tiles, ...options }: TileFeaturesRasterOptions): FeatureData[];
12
- /**
13
- * Detects whether a given {@link Tile} is a {@link RasterTile}.
14
- * @privateRemarks Method of detection is arbitrary, and may be changed.
15
- */
16
- export declare function isRasterTile(tile: Tile): tile is RasterTile;
@@ -1,10 +0,0 @@
1
- import { SpatialFilter, SpatialIndexTile } from '../types.js';
2
- import { FeatureData } from '../types-internal.js';
3
- import { SpatialDataType } from '../sources/types.js';
4
- export type TileFeaturesSpatialIndexOptions = {
5
- tiles: SpatialIndexTile[];
6
- spatialFilter: SpatialFilter;
7
- spatialDataColumn: string;
8
- spatialDataType: SpatialDataType;
9
- };
10
- export declare function tileFeaturesSpatialIndex({ tiles, spatialFilter, spatialDataColumn, spatialDataType, }: TileFeaturesSpatialIndexOptions): FeatureData[];
@@ -1,39 +0,0 @@
1
- import { FilterType } from './constants.js';
2
- import { Filter } from './types.js';
3
- type FilterTypeOptions<T extends FilterType> = {
4
- type: T;
5
- column: string;
6
- } & Filter[T];
7
- export type AddFilterOptions = FilterTypeOptions<FilterType.IN> | FilterTypeOptions<FilterType.BETWEEN> | FilterTypeOptions<FilterType.CLOSED_OPEN> | FilterTypeOptions<FilterType.TIME> | FilterTypeOptions<FilterType.STRING_SEARCH>;
8
- /**
9
- * Adds a {@link Filter} to the filter set. Any previous filters with the same
10
- * `column` and `type` will be replaced.
11
- */
12
- export declare function addFilter(filters: Record<string, Filter>, { column, type, values, owner }: AddFilterOptions): Record<string, Filter>;
13
- export type RemoveFilterOptions = {
14
- column: string;
15
- owner?: string;
16
- };
17
- /**
18
- * Removes one or more {@link Filter filters} from the filter set. If only
19
- * `column` is specified, then all filters on that column are removed. If both
20
- * `column` and `owner` are specified, then only filters for that column
21
- * associated with the owner are removed.
22
- */
23
- export declare function removeFilter(filters: Record<string, Filter>, { column, owner }: RemoveFilterOptions): Record<string, Filter>;
24
- /**
25
- * Clears all {@link Filter filters} from the filter set.
26
- */
27
- export declare function clearFilters(filters: Record<string, Filter>): Record<string, Filter>;
28
- export type HasFilterOptions = {
29
- column: string;
30
- owner?: string;
31
- };
32
- export declare function hasFilter(filters: Record<string, Filter>, { column, owner }: HasFilterOptions): boolean;
33
- export type GetFilterOptions<T extends FilterType> = {
34
- column: string;
35
- type: T;
36
- owner?: string;
37
- };
38
- export declare function getFilter<T extends FilterType>(filters: Record<string, Filter>, { column, type, owner }: GetFilterOptions<T>): Filter[T] | null;
39
- export {};
package/build/geo.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import type { BBox, MultiPolygon, Polygon } from 'geojson';
2
- import { SpatialFilter } from './types.js';
3
- /**
4
- * Returns a {@link SpatialFilter} for a given viewport, typically obtained
5
- * from deck.gl's `viewport.getBounds()` method ([west, south, east, north]).
6
- * If the viewport covers the entire world (to some margin of error in Web
7
- * Mercator space), `undefined` is returned instead.
8
- *
9
- * If the viewport extends beyond longitude range [-180, +180], the polygon
10
- * may be reformatted for compatibility with CARTO APIs.
11
- */
12
- export declare function createViewportSpatialFilter(viewport: BBox): SpatialFilter | undefined;
13
- /**
14
- * Returns a {@link SpatialFilter} for a given {@link Polygon} or
15
- * {@link MultiPolygon}. If the polygon(s) extend outside longitude
16
- * range [-180, +180], the result may be reformatted for compatibility
17
- * with CARTO APIs.
18
- */
19
- export declare function createPolygonSpatialFilter(spatialFilter: Polygon | MultiPolygon): SpatialFilter | undefined;
package/build/index.d.ts DELETED
@@ -1,16 +0,0 @@
1
- export * from './client.js';
2
- export * from './constants.js';
3
- export * from './deck/index.js';
4
- export * from './filters.js';
5
- export * from './geo.js';
6
- export * from './sources/index.js';
7
- export * from './widget-sources/index.js';
8
- export * from './types.js';
9
- export { APIErrorContext, APIRequestType, CartoAPIError, QueryOptions, buildPublicMapUrl, // Internal, but required for fetchMap().
10
- buildStatsUrl, // Internal, but required for fetchMap().
11
- query, requestWithParameters, } from './api/index.js';
12
- export { _getHexagonResolution } from './spatial-index.js';
13
- export * from './filters/index.js';
14
- export * from './operations/index.js';
15
- export * from './utils/makeIntervalComplete.js';
16
- export * from './utils/transformToTileCoords.js';
@@ -1,28 +0,0 @@
1
- /** @privateRemarks Source: @carto/react-api */
2
- export interface ModelRequestOptions {
3
- method: 'GET' | 'POST';
4
- headers?: Record<string, string>;
5
- abortController?: AbortController;
6
- otherOptions?: Record<string, unknown>;
7
- body?: string;
8
- }
9
- interface ModelErrorResponse {
10
- error?: string | string[];
11
- hint?: string;
12
- column_name?: string;
13
- }
14
- /**
15
- * Return more descriptive error from API
16
- * @privateRemarks Source: @carto/react-api
17
- */
18
- export declare function dealWithApiError({ response, data, }: {
19
- response: Response;
20
- data: ModelErrorResponse;
21
- }): void;
22
- /** @privateRemarks Source: @carto/react-api */
23
- export declare function makeCall({ url, accessToken, opts, }: {
24
- url: string;
25
- accessToken: string;
26
- opts: ModelRequestOptions;
27
- }): Promise<any>;
28
- export {};
@@ -1,3 +0,0 @@
1
- export { executeModel } from './model.js';
2
- export type { Model, ModelSource } from './model.js';
3
- export type { ModelRequestOptions } from './common.js';
@@ -1,37 +0,0 @@
1
- import { Filter, FilterLogicalOperator, MapType, QueryParameters, SpatialFilter } from '../types.js';
2
- import { ModelRequestOptions } from './common.js';
3
- import { ApiVersion } from '../constants.js';
4
- import { SpatialDataType, SpatialFilterPolyfillMode } from '../sources/types.js';
5
- /** @privateRemarks Source: @carto/react-api */
6
- declare const AVAILABLE_MODELS: readonly ["category", "histogram", "formula", "pick", "timeseries", "range", "scatterplot", "table"];
7
- export type Model = (typeof AVAILABLE_MODELS)[number];
8
- export interface ModelSource {
9
- type: MapType;
10
- apiVersion: ApiVersion;
11
- apiBaseUrl: string;
12
- accessToken: string;
13
- clientId: string;
14
- connectionName: string;
15
- data: string;
16
- filters?: Record<string, Filter>;
17
- filtersLogicalOperator?: FilterLogicalOperator;
18
- spatialFilter?: SpatialFilter;
19
- queryParameters?: QueryParameters;
20
- spatialDataColumn?: string;
21
- spatialDataType?: SpatialDataType;
22
- spatialFiltersResolution?: number;
23
- spatialFiltersMode?: SpatialFilterPolyfillMode;
24
- /** original resolution of the spatial index data as stored in the DW */
25
- dataResolution?: number;
26
- }
27
- /**
28
- * Execute a SQL model request.
29
- * @privateRemarks Source: @carto/react-api
30
- */
31
- export declare function executeModel(props: {
32
- model: Model;
33
- source: ModelSource;
34
- params: Record<string, unknown>;
35
- opts?: Partial<ModelRequestOptions>;
36
- }): Promise<any>;
37
- export {};
@@ -1,8 +0,0 @@
1
- import { AggregationType } from '../types.js';
2
- import { FeatureData } from '../types-internal.js';
3
- /** @privateRemarks Source: @carto/react-core */
4
- export type AggregationFunction = (values: unknown[] | FeatureData[], keys?: string[] | string, joinOperation?: AggregationType) => number;
5
- /** @privateRemarks Source: @carto/react-core */
6
- export declare const aggregationFunctions: Record<Exclude<AggregationType, 'custom'>, AggregationFunction>;
7
- /** @privateRemarks Source: @carto/react-core */
8
- export declare function aggregate(feature: FeatureData, keys?: string[], operation?: AggregationType): unknown;
@@ -1,20 +0,0 @@
1
- import { SortDirection } from '../types.js';
2
- import { FeatureData } from '../types-internal.js';
3
- type SortColumns = string | string[] | object[];
4
- interface SortOptions {
5
- sortBy?: SortColumns;
6
- sortByDirection?: SortDirection;
7
- sortByColumnType?: 'number' | 'string' | 'date';
8
- }
9
- /**
10
- * Apply sort structure to a collection of features
11
- * @param features
12
- * @param [sortOptions]
13
- * @param [sortOptions.sortBy] - One or more columns to sort by
14
- * @param [sortOptions.sortByDirection] - Direction by the columns will be sorted
15
- * @param [sortOptions.sortByColumnType] - Column type
16
- * @internal
17
- * @privateRemarks Source: @carto/react-core
18
- */
19
- export declare function applySorting(features: FeatureData[], { sortBy, sortByDirection, sortByColumnType, }?: SortOptions): FeatureData[];
20
- export {};
@@ -1,15 +0,0 @@
1
- import { AggregationType } from '../types.js';
2
- import { FeatureData } from '../types-internal.js';
3
- /** @privateRemarks Source: @carto/react-core */
4
- export type GroupByFeature = {
5
- name: string;
6
- value: number;
7
- }[];
8
- /** @privateRemarks Source: @carto/react-core */
9
- export declare function groupValuesByColumn({ data, valuesColumns, joinOperation, keysColumn, operation, }: {
10
- data: FeatureData[];
11
- valuesColumns?: string[];
12
- joinOperation?: AggregationType;
13
- keysColumn: string;
14
- operation: AggregationType;
15
- }): GroupByFeature | null;
@@ -1,11 +0,0 @@
1
- import { AggregationType, GroupDateType } from '../types.js';
2
- import { GroupByFeature } from './groupBy.js';
3
- /** @privateRemarks Source: @carto/react-core */
4
- export declare function groupValuesByDateColumn({ data, valuesColumns, joinOperation, keysColumn, groupType, operation, }: {
5
- data: Record<string, unknown>[];
6
- valuesColumns?: string[];
7
- joinOperation?: Exclude<AggregationType, 'custom'>;
8
- keysColumn: string;
9
- groupType: GroupDateType;
10
- operation?: Exclude<AggregationType, 'custom'>;
11
- }): GroupByFeature | null;
@@ -1,13 +0,0 @@
1
- import { AggregationType } from '../types.js';
2
- import { FeatureData } from '../types-internal.js';
3
- /**
4
- * Histogram computation.
5
- * @privateRemarks Source: @carto/react-core
6
- */
7
- export declare function histogram({ data, valuesColumns, joinOperation, ticks, operation, }: {
8
- data: FeatureData[];
9
- valuesColumns?: string[];
10
- joinOperation?: Exclude<AggregationType, 'custom'>;
11
- ticks: number[];
12
- operation: Exclude<AggregationType, 'custom'>;
13
- }): number[];
@@ -1,6 +0,0 @@
1
- export * from './aggregation.js';
2
- export * from './applySorting.js';
3
- export * from './groupBy.js';
4
- export * from './groupByDate.js';
5
- export * from './histogram.js';
6
- export * from './scatterPlot.js';
@@ -1,14 +0,0 @@
1
- import { FeatureData } from '../types-internal.js';
2
- import { AggregationType } from '../types.js';
3
- export type ScatterPlotFeature = [number, number][];
4
- /**
5
- * Filters invalid features and formats data.
6
- * @privateRemarks Source: @carto/react-core
7
- */
8
- export declare function scatterPlot({ data, xAxisColumns, xAxisJoinOperation, yAxisColumns, yAxisJoinOperation, }: {
9
- data: FeatureData[];
10
- xAxisColumns: string[];
11
- xAxisJoinOperation?: AggregationType;
12
- yAxisColumns: string[];
13
- yAxisJoinOperation?: AggregationType;
14
- }): ScatterPlotFeature;
@@ -1,4 +0,0 @@
1
- import type { GeojsonResult, JsonResult, SourceOptionalOptions, SourceRequiredOptions, TilejsonResult } from './types.js';
2
- import { MapType } from '../types.js';
3
- export declare const SOURCE_DEFAULTS: SourceOptionalOptions;
4
- export declare function baseSource<UrlParameters extends Record<string, unknown>>(endpoint: MapType, options: Partial<SourceOptionalOptions> & SourceRequiredOptions, urlParameters: UrlParameters): Promise<TilejsonResult | GeojsonResult | JsonResult>;
@@ -1,10 +0,0 @@
1
- import { QueryParameters } from '../types.js';
2
- import type { FilterOptions, SourceOptions, TilejsonResult } from './types.js';
3
- export type BoundaryQuerySourceOptions = SourceOptions & FilterOptions & {
4
- columns?: string[];
5
- tilesetTableName: string;
6
- propertiesSqlQuery: string;
7
- queryParameters?: QueryParameters;
8
- };
9
- export type BoundaryQuerySourceResponse = TilejsonResult;
10
- export declare const boundaryQuerySource: (options: BoundaryQuerySourceOptions) => Promise<BoundaryQuerySourceResponse>;
@@ -1,8 +0,0 @@
1
- import type { FilterOptions, SourceOptions, TilejsonResult } from './types.js';
2
- export type BoundaryTableSourceOptions = SourceOptions & FilterOptions & {
3
- tilesetTableName: string;
4
- columns?: string[];
5
- propertiesTableName: string;
6
- };
7
- export type BoundaryTableSourceResponse = TilejsonResult;
8
- export declare const boundaryTableSource: (options: BoundaryTableSourceOptions) => Promise<BoundaryTableSourceResponse>;
@@ -1,5 +0,0 @@
1
- import { WidgetQuerySourceResult } from '../widget-sources/index.js';
2
- import type { AggregationOptions, FilterOptions, QuerySourceOptions, SourceOptions, TilejsonResult } from './types.js';
3
- export type H3QuerySourceOptions = SourceOptions & QuerySourceOptions & AggregationOptions & FilterOptions;
4
- export type H3QuerySourceResponse = TilejsonResult & WidgetQuerySourceResult;
5
- export declare const h3QuerySource: (options: H3QuerySourceOptions) => Promise<H3QuerySourceResponse>;
@@ -1,5 +0,0 @@
1
- import { WidgetTableSourceResult } from '../widget-sources/index.js';
2
- import type { AggregationOptions, FilterOptions, SourceOptions, TableSourceOptions, TilejsonResult } from './types.js';
3
- export type H3TableSourceOptions = SourceOptions & TableSourceOptions & AggregationOptions & FilterOptions;
4
- export type H3TableSourceResponse = TilejsonResult & WidgetTableSourceResult;
5
- export declare const h3TableSource: (options: H3TableSourceOptions) => Promise<H3TableSourceResponse>;
@@ -1,5 +0,0 @@
1
- import { WidgetTilesetSourceResult } from '../widget-sources/index.js';
2
- import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from './types.js';
3
- export type H3TilesetSourceOptions = SourceOptions & TilesetSourceOptions;
4
- export type H3TilesetSourceResponse = TilejsonResult & WidgetTilesetSourceResult;
5
- export declare const h3TilesetSource: (options: H3TilesetSourceOptions) => Promise<H3TilesetSourceResponse>;
@@ -1,26 +0,0 @@
1
- export { SOURCE_DEFAULTS } from './base-source.js';
2
- export type { GeojsonResult, JsonResult, QueryResult, QuerySourceOptions, RasterBandColorinterp, RasterMetadata, RasterMetadataBand, RasterMetadataBandStats, SourceOptions, SpatialFilterPolyfillMode, TableSourceOptions, TilejsonResult, TileResolution, TilesetSourceOptions, VectorLayer, } from './types.js';
3
- export { boundaryQuerySource } from './boundary-query-source.js';
4
- export type { BoundaryQuerySourceOptions, BoundaryQuerySourceResponse, } from './boundary-query-source.js';
5
- export { boundaryTableSource } from './boundary-table-source.js';
6
- export type { BoundaryTableSourceOptions, BoundaryTableSourceResponse, } from './boundary-table-source.js';
7
- export { h3QuerySource } from './h3-query-source.js';
8
- export type { H3QuerySourceOptions, H3QuerySourceResponse, } from './h3-query-source.js';
9
- export { h3TableSource } from './h3-table-source.js';
10
- export type { H3TableSourceOptions, H3TableSourceResponse, } from './h3-table-source.js';
11
- export { h3TilesetSource } from './h3-tileset-source.js';
12
- export type { H3TilesetSourceOptions, H3TilesetSourceResponse, } from './h3-tileset-source.js';
13
- export { rasterSource } from './raster-source.js';
14
- export type { RasterSourceOptions } from './raster-source.js';
15
- export { quadbinQuerySource } from './quadbin-query-source.js';
16
- export type { QuadbinQuerySourceOptions, QuadbinQuerySourceResponse, } from './quadbin-query-source.js';
17
- export { quadbinTableSource } from './quadbin-table-source.js';
18
- export type { QuadbinTableSourceOptions, QuadbinTableSourceResponse, } from './quadbin-table-source.js';
19
- export { quadbinTilesetSource } from './quadbin-tileset-source.js';
20
- export type { QuadbinTilesetSourceOptions, QuadbinTilesetSourceResponse, } from './quadbin-tileset-source.js';
21
- export { vectorQuerySource } from './vector-query-source.js';
22
- export type { VectorQuerySourceOptions, VectorQuerySourceResponse, } from './vector-query-source.js';
23
- export { vectorTableSource } from './vector-table-source.js';
24
- export type { VectorTableSourceOptions, VectorTableSourceResponse, } from './vector-table-source.js';
25
- export { vectorTilesetSource } from './vector-tileset-source.js';
26
- export type { VectorTilesetSourceOptions, VectorTilesetSourceResponse, } from './vector-tileset-source.js';
@@ -1,5 +0,0 @@
1
- import { WidgetQuerySourceResult } from '../widget-sources/index.js';
2
- import type { AggregationOptions, FilterOptions, QuerySourceOptions, SourceOptions, TilejsonResult } from './types.js';
3
- export type QuadbinQuerySourceOptions = SourceOptions & QuerySourceOptions & AggregationOptions & FilterOptions;
4
- export type QuadbinQuerySourceResponse = TilejsonResult & WidgetQuerySourceResult;
5
- export declare const quadbinQuerySource: (options: QuadbinQuerySourceOptions) => Promise<QuadbinQuerySourceResponse>;
@@ -1,5 +0,0 @@
1
- import { WidgetTableSourceResult } from '../widget-sources/index.js';
2
- import type { AggregationOptions, FilterOptions, SourceOptions, TableSourceOptions, TilejsonResult } from './types.js';
3
- export type QuadbinTableSourceOptions = SourceOptions & TableSourceOptions & AggregationOptions & FilterOptions;
4
- export type QuadbinTableSourceResponse = TilejsonResult & WidgetTableSourceResult;
5
- export declare const quadbinTableSource: (options: QuadbinTableSourceOptions) => Promise<QuadbinTableSourceResponse>;
@@ -1,5 +0,0 @@
1
- import { WidgetTilesetSourceResult } from '../widget-sources/index.js';
2
- import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from './types.js';
3
- export type QuadbinTilesetSourceOptions = SourceOptions & TilesetSourceOptions;
4
- export type QuadbinTilesetSourceResponse = TilejsonResult & WidgetTilesetSourceResult;
5
- export declare const quadbinTilesetSource: (options: QuadbinTilesetSourceOptions) => Promise<QuadbinTilesetSourceResponse>;
@@ -1,5 +0,0 @@
1
- import { WidgetRasterSourceResult } from '../widget-sources/index.js';
2
- import type { FilterOptions, SourceOptions, TilejsonResult, TilesetSourceOptions } from './types.js';
3
- export type RasterSourceOptions = SourceOptions & TilesetSourceOptions & FilterOptions;
4
- export type RasterSourceResponse = TilejsonResult & WidgetRasterSourceResult;
5
- export declare const rasterSource: (options: RasterSourceOptions) => Promise<RasterSourceResponse>;