@carto/api-client 0.5.0-alpha.1 → 0.5.0-alpha.11

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 (127) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/api-client.cjs +3163 -3206
  3. package/build/api-client.cjs.map +1 -1
  4. package/build/api-client.d.cts +1389 -0
  5. package/build/api-client.d.ts +1389 -0
  6. package/build/api-client.js +3674 -0
  7. package/build/api-client.js.map +1 -0
  8. package/build/worker.d.ts +2 -0
  9. package/build/worker.js +1949 -0
  10. package/build/worker.js.map +1 -0
  11. package/package.json +60 -45
  12. package/src/api/carto-api-error.ts +1 -1
  13. package/src/api/query.ts +5 -5
  14. package/src/api/request-with-parameters.ts +6 -6
  15. package/src/client.ts +3 -3
  16. package/src/constants-internal.ts +5 -11
  17. package/src/constants.ts +6 -6
  18. package/src/deck/get-data-filter-extension-props.ts +146 -0
  19. package/src/deck/index.ts +1 -0
  20. package/src/filters/Filter.ts +18 -8
  21. package/src/filters/FilterTypes.ts +2 -2
  22. package/src/filters/geosjonFeatures.ts +2 -2
  23. package/src/filters/tileFeatures.ts +12 -17
  24. package/src/filters.ts +4 -4
  25. package/src/geo.ts +12 -14
  26. package/src/global.d.ts +3 -8
  27. package/src/index.ts +3 -0
  28. package/src/models/common.ts +11 -9
  29. package/src/models/model.ts +3 -4
  30. package/src/operations/aggregation.ts +5 -5
  31. package/src/operations/applySorting.ts +4 -4
  32. package/src/operations/groupBy.ts +4 -4
  33. package/src/operations/groupByDate.ts +1 -1
  34. package/src/operations/histogram.ts +4 -4
  35. package/src/operations/scatterPlot.ts +4 -4
  36. package/src/sources/base-source.ts +8 -8
  37. package/src/sources/boundary-query-source.ts +2 -2
  38. package/src/sources/boundary-table-source.ts +2 -2
  39. package/src/sources/h3-query-source.ts +7 -5
  40. package/src/sources/h3-table-source.ts +7 -5
  41. package/src/sources/h3-tileset-source.ts +4 -4
  42. package/src/sources/index.ts +26 -26
  43. package/src/sources/quadbin-query-source.ts +7 -5
  44. package/src/sources/quadbin-table-source.ts +7 -5
  45. package/src/sources/quadbin-tileset-source.ts +4 -4
  46. package/src/sources/raster-source.ts +2 -2
  47. package/src/sources/types.ts +9 -3
  48. package/src/sources/vector-query-source.ts +2 -3
  49. package/src/sources/vector-table-source.ts +2 -3
  50. package/src/sources/vector-tileset-source.ts +5 -5
  51. package/src/spatial-index.ts +12 -10
  52. package/src/types-internal.ts +5 -5
  53. package/src/types.ts +15 -15
  54. package/src/utils/makeIntervalComplete.ts +1 -1
  55. package/src/utils.ts +3 -3
  56. package/src/widget-sources/index.ts +1 -0
  57. package/src/widget-sources/types.ts +6 -4
  58. package/src/widget-sources/widget-query-source.ts +6 -2
  59. package/src/widget-sources/widget-remote-source.ts +67 -26
  60. package/src/widget-sources/widget-source.ts +10 -25
  61. package/src/widget-sources/widget-table-source.ts +6 -2
  62. package/src/widget-sources/widget-tileset-source-impl.ts +417 -0
  63. package/src/widget-sources/widget-tileset-source.ts +200 -299
  64. package/src/workers/constants.ts +13 -0
  65. package/src/workers/types.ts +19 -0
  66. package/src/workers/widget-tileset-worker.ts +40 -0
  67. package/build/api/carto-api-error.d.ts +0 -26
  68. package/build/api/endpoints.d.ts +0 -24
  69. package/build/api/index.d.ts +0 -5
  70. package/build/api/query.d.ts +0 -3
  71. package/build/api/request-with-parameters.d.ts +0 -10
  72. package/build/api-client.modern.js +0 -3574
  73. package/build/api-client.modern.js.map +0 -1
  74. package/build/client.d.ts +0 -14
  75. package/build/constants-internal.d.ts +0 -26
  76. package/build/constants.d.ts +0 -53
  77. package/build/filters/Filter.d.ts +0 -13
  78. package/build/filters/FilterTypes.d.ts +0 -3
  79. package/build/filters/geosjonFeatures.d.ts +0 -8
  80. package/build/filters/index.d.ts +0 -6
  81. package/build/filters/tileFeatures.d.ts +0 -20
  82. package/build/filters/tileFeaturesGeometries.d.ts +0 -13
  83. package/build/filters/tileFeaturesSpatialIndex.d.ts +0 -10
  84. package/build/filters.d.ts +0 -39
  85. package/build/geo.d.ts +0 -19
  86. package/build/index.d.ts +0 -14
  87. package/build/models/common.d.ts +0 -27
  88. package/build/models/index.d.ts +0 -3
  89. package/build/models/model.d.ts +0 -37
  90. package/build/operations/aggregation.d.ts +0 -8
  91. package/build/operations/applySorting.d.ts +0 -20
  92. package/build/operations/groupBy.d.ts +0 -15
  93. package/build/operations/groupByDate.d.ts +0 -11
  94. package/build/operations/histogram.d.ts +0 -13
  95. package/build/operations/index.d.ts +0 -6
  96. package/build/operations/scatterPlot.d.ts +0 -14
  97. package/build/sources/base-source.d.ts +0 -4
  98. package/build/sources/boundary-query-source.d.ts +0 -10
  99. package/build/sources/boundary-table-source.d.ts +0 -8
  100. package/build/sources/h3-query-source.d.ts +0 -5
  101. package/build/sources/h3-table-source.d.ts +0 -5
  102. package/build/sources/h3-tileset-source.d.ts +0 -5
  103. package/build/sources/index.d.ts +0 -26
  104. package/build/sources/quadbin-query-source.d.ts +0 -5
  105. package/build/sources/quadbin-table-source.d.ts +0 -5
  106. package/build/sources/quadbin-tileset-source.d.ts +0 -5
  107. package/build/sources/raster-source.d.ts +0 -4
  108. package/build/sources/types.d.ts +0 -366
  109. package/build/sources/vector-query-source.d.ts +0 -5
  110. package/build/sources/vector-table-source.d.ts +0 -5
  111. package/build/sources/vector-tileset-source.d.ts +0 -5
  112. package/build/spatial-index.d.ts +0 -8
  113. package/build/types-internal.d.ts +0 -56
  114. package/build/types.d.ts +0 -140
  115. package/build/utils/dateUtils.d.ts +0 -10
  116. package/build/utils/getTileFormat.d.ts +0 -3
  117. package/build/utils/makeIntervalComplete.d.ts +0 -2
  118. package/build/utils/transformTileCoordsToWGS84.d.ts +0 -8
  119. package/build/utils/transformToTileCoords.d.ts +0 -9
  120. package/build/utils.d.ts +0 -32
  121. package/build/widget-sources/index.d.ts +0 -5
  122. package/build/widget-sources/types.d.ts +0 -158
  123. package/build/widget-sources/widget-query-source.d.ts +0 -33
  124. package/build/widget-sources/widget-remote-source.d.ts +0 -18
  125. package/build/widget-sources/widget-source.d.ts +0 -74
  126. package/build/widget-sources/widget-table-source.d.ts +0 -33
  127. package/build/widget-sources/widget-tileset-source.d.ts +0 -76
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
- * @internalRemarks 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
- * @internalRemarks 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
- /** @internalRemarks 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
- * @internalRemarks Source: @deck.gl/carto
13
- */
14
- export declare const DEFAULT_MAX_LENGTH_URL = 7000;
15
- /** @internalRemarks Source: @deck.gl/carto */
16
- export declare const DEFAULT_TILE_RESOLUTION = 0.5;
17
- /**
18
- * @internalRemarks Source: @deck.gl/carto
19
- * @internal
20
- */
21
- export declare const DEFAULT_AGGREGATION_RES_LEVEL_H3 = 4;
22
- /**
23
- * @internalRemarks 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
- * @internalRemarks 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
- /** @internalRemarks Source: @carto/constants */
25
- export declare enum ApiVersion {
26
- V1 = "v1",
27
- V2 = "v2",
28
- V3 = "v3"
29
- }
30
- /** @internalRemarks Source: @carto/constants, @deck.gl/carto */
31
- export declare const DEFAULT_API_BASE_URL = "https://gcp-us-east1.api.carto.com";
32
- /** @internalRemarks Source: @carto/react-core */
33
- export declare enum TileFormat {
34
- MVT = "mvt",
35
- JSON = "json",
36
- GEOJSON = "geojson",
37
- BINARY = "binary"
38
- }
39
- /** @internalRemarks Source: @carto/react-core */
40
- export declare enum SpatialIndex {
41
- H3 = "h3",
42
- S2 = "s2",
43
- QUADBIN = "quadbin"
44
- }
45
- /** @internalRemarks 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,13 +0,0 @@
1
- import { FilterLogicalOperator, Filters } from '../types';
2
- import { Feature } from 'geojson';
3
- import { FeatureData } from '../types-internal';
4
- import { BinaryFeature } from '@loaders.gl/schema';
5
- export declare function buildFeatureFilter({ filters, type, filtersLogicalOperator, }: {
6
- filters?: Filters;
7
- type?: 'number' | 'boolean';
8
- filtersLogicalOperator?: FilterLogicalOperator;
9
- }): (feature: Feature | FeatureData) => number | boolean;
10
- export declare function applyFilters(features: FeatureData[], filters: Filters, filtersLogicalOperator: FilterLogicalOperator): FeatureData[];
11
- export declare function buildBinaryFeatureFilter({ filters }: {
12
- filters: Filters;
13
- }): (() => number) | ((featureIdIdx: number, binaryData: BinaryFeature) => boolean);
@@ -1,3 +0,0 @@
1
- import { FilterType } from '../constants';
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 { SpatialFilter } from '..';
3
- import { FeatureData } from '../types-internal';
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,20 +0,0 @@
1
- import { SpatialFilter, Tile } from '../types';
2
- import { TileFormat } from '../constants';
3
- import { FeatureData } from '../types-internal';
4
- import { SpatialDataType } from '../sources/types';
5
- /** @internalRemarks 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
- options?: TileFeatureExtractOptions;
14
- };
15
- /** @internalRemarks Source: @carto/react-core */
16
- export type TileFeatureExtractOptions = {
17
- storeGeometry?: boolean;
18
- };
19
- /** @internalRemarks Source: @carto/react-core */
20
- export declare function tileFeatures({ tiles, spatialFilter, uniqueIdProperty, tileFormat, spatialDataColumn, spatialDataType, 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,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';
2
- import { Filter } from './types';
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';
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,14 +0,0 @@
1
- export * from './client.js';
2
- export * from './constants.js';
3
- export * from './filters.js';
4
- export * from './geo.js';
5
- export * from './sources/index.js';
6
- export * from './widget-sources/index.js';
7
- export * from './types.js';
8
- export { APIErrorContext, APIRequestType, CartoAPIError, QueryOptions, buildPublicMapUrl, // Internal, but required for fetchMap().
9
- buildStatsUrl, // Internal, but required for fetchMap().
10
- query, requestWithParameters, } from './api/index.js';
11
- export * from './filters/index.js';
12
- export * from './operations/index.js';
13
- export * from './utils/makeIntervalComplete.js';
14
- export * from './utils/transformToTileCoords.js';
@@ -1,27 +0,0 @@
1
- /** @internalRemarks Source: @carto/react-api */
2
- export interface ModelRequestOptions {
3
- method: 'GET' | 'POST';
4
- abortController?: AbortController;
5
- otherOptions?: Record<string, unknown>;
6
- body?: string;
7
- }
8
- interface ModelErrorResponse {
9
- error?: string | string[];
10
- hint?: string;
11
- column_name?: string;
12
- }
13
- /**
14
- * Return more descriptive error from API
15
- * @internalRemarks Source: @carto/react-api
16
- */
17
- export declare function dealWithApiError({ response, data, }: {
18
- response: Response;
19
- data: ModelErrorResponse;
20
- }): void;
21
- /** @internalRemarks Source: @carto/react-api */
22
- export declare function makeCall({ url, accessToken, opts, }: {
23
- url: string;
24
- accessToken: string;
25
- opts: ModelRequestOptions;
26
- }): Promise<any>;
27
- 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
- /** @internalRemarks 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
- * @internalRemarks 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';
2
- import { FeatureData } from '../types-internal';
3
- /** @internalRemarks Source: @carto/react-core */
4
- export type AggregationFunction = (values: unknown[] | FeatureData[], keys?: string[] | string, joinOperation?: AggregationType) => number;
5
- /** @internalRemarks Source: @carto/react-core */
6
- export declare const aggregationFunctions: Record<Exclude<AggregationType, 'custom'>, AggregationFunction>;
7
- /** @internalRemarks 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';
2
- import { FeatureData } from '../types-internal';
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
- * @internalRemarks 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';
2
- import { FeatureData } from '../types-internal';
3
- /** @internalRemarks Source: @carto/react-core */
4
- export type GroupByFeature = {
5
- name: string;
6
- value: number;
7
- }[];
8
- /** @internalRemarks 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
- /** @internalRemarks 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';
2
- import { FeatureData } from '../types-internal';
3
- /**
4
- * Histogram computation.
5
- * @internalRemarks 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';
2
- import { AggregationType } from '../types';
3
- export type ScatterPlotFeature = [number, number][];
4
- /**
5
- * Filters invalid features and formats data.
6
- * @internalRemarks 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';
2
- import { MapType } from '../types';
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';
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';
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';
2
- import type { AggregationOptions, FilterOptions, QuerySourceOptions, SourceOptions, TilejsonResult } from './types';
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';
2
- import type { AggregationOptions, FilterOptions, SourceOptions, TableSourceOptions, TilejsonResult } from './types';
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';
2
- import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from './types';
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';
2
- export type { GeojsonResult, JsonResult, QueryResult, QuerySourceOptions, RasterBandColorinterp, RasterMetadata, RasterMetadataBand, RasterMetadataBandStats, SourceOptions, SpatialFilterPolyfillMode, TableSourceOptions, TilejsonResult, TileResolution, TilesetSourceOptions, VectorLayer, } from './types';
3
- export { boundaryQuerySource } from './boundary-query-source';
4
- export type { BoundaryQuerySourceOptions, BoundaryQuerySourceResponse, } from './boundary-query-source';
5
- export { boundaryTableSource } from './boundary-table-source';
6
- export type { BoundaryTableSourceOptions, BoundaryTableSourceResponse, } from './boundary-table-source';
7
- export { h3QuerySource } from './h3-query-source';
8
- export type { H3QuerySourceOptions, H3QuerySourceResponse, } from './h3-query-source';
9
- export { h3TableSource } from './h3-table-source';
10
- export type { H3TableSourceOptions, H3TableSourceResponse, } from './h3-table-source';
11
- export { h3TilesetSource } from './h3-tileset-source';
12
- export type { H3TilesetSourceOptions, H3TilesetSourceResponse, } from './h3-tileset-source';
13
- export { rasterSource } from './raster-source';
14
- export type { RasterSourceOptions } from './raster-source';
15
- export { quadbinQuerySource } from './quadbin-query-source';
16
- export type { QuadbinQuerySourceOptions, QuadbinQuerySourceResponse, } from './quadbin-query-source';
17
- export { quadbinTableSource } from './quadbin-table-source';
18
- export type { QuadbinTableSourceOptions, QuadbinTableSourceResponse, } from './quadbin-table-source';
19
- export { quadbinTilesetSource } from './quadbin-tileset-source';
20
- export type { QuadbinTilesetSourceOptions, QuadbinTilesetSourceResponse, } from './quadbin-tileset-source';
21
- export { vectorQuerySource } from './vector-query-source';
22
- export type { VectorQuerySourceOptions, VectorQuerySourceResponse, } from './vector-query-source';
23
- export { vectorTableSource } from './vector-table-source';
24
- export type { VectorTableSourceOptions, VectorTableSourceResponse, } from './vector-table-source';
25
- export { vectorTilesetSource } from './vector-tileset-source';
26
- export type { VectorTilesetSourceOptions, VectorTilesetSourceResponse, } from './vector-tileset-source';
@@ -1,5 +0,0 @@
1
- import { WidgetQuerySourceResult } from '../widget-sources';
2
- import type { AggregationOptions, FilterOptions, QuerySourceOptions, SourceOptions, TilejsonResult } from './types';
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';
2
- import type { AggregationOptions, FilterOptions, SourceOptions, TableSourceOptions, TilejsonResult } from './types';
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';
2
- import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from './types';
3
- export type QuadbinTilesetSourceOptions = SourceOptions & TilesetSourceOptions;
4
- export type QuadbinTilesetSourceResponse = TilejsonResult & WidgetTilesetSourceResult;
5
- export declare const quadbinTilesetSource: (options: QuadbinTilesetSourceOptions) => Promise<QuadbinTilesetSourceResponse>;
@@ -1,4 +0,0 @@
1
- import type { FilterOptions, SourceOptions, TilejsonResult, TilesetSourceOptions } from './types';
2
- export type RasterSourceOptions = SourceOptions & TilesetSourceOptions & FilterOptions;
3
- export type RasterSourceResponse = TilejsonResult;
4
- export declare const rasterSource: (options: RasterSourceOptions) => Promise<RasterSourceResponse>;