@carto/api-client 0.5.29 → 0.5.30-alpha.3cf7d80.116
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.
- package/CHANGELOG.md +2 -0
- package/build/api-client.cjs +27 -8
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +24 -2
- package/build/api-client.d.ts +24 -2
- package/build/api-client.js +27 -8
- package/build/api-client.js.map +1 -1
- package/package.json +1 -1
- package/src/widget-sources/types.ts +24 -1
- package/src/widget-sources/widget-remote-source.ts +34 -2
package/build/api-client.d.cts
CHANGED
|
@@ -1327,6 +1327,11 @@ interface ViewState {
|
|
|
1327
1327
|
latitude: number;
|
|
1328
1328
|
longitude: number;
|
|
1329
1329
|
}
|
|
1330
|
+
/**
|
|
1331
|
+
* Topology of the features referenced by {@link BaseRequestOptions#featureIds}.
|
|
1332
|
+
* Must match the geometry type of the layer the features were picked from.
|
|
1333
|
+
*/
|
|
1334
|
+
type WidgetFeatureGeometryType = 'points' | 'lines' | 'polygons';
|
|
1330
1335
|
/** Common options for {@link WidgetRemoteSource} requests. */
|
|
1331
1336
|
interface BaseRequestOptions {
|
|
1332
1337
|
signal?: AbortSignal;
|
|
@@ -1335,6 +1340,23 @@ interface BaseRequestOptions {
|
|
|
1335
1340
|
/** Overrides source filters, if any. */
|
|
1336
1341
|
filters?: Filters;
|
|
1337
1342
|
filterOwner?: string;
|
|
1343
|
+
/**
|
|
1344
|
+
* Restricts the request to a selection of features, identified by their
|
|
1345
|
+
* `_carto_feature_id` (a hash of geometry). Unlike {@link filters}, this does
|
|
1346
|
+
* not require `_carto_feature_id` to exist as a column on the source: the
|
|
1347
|
+
* server regenerates the hash on-the-fly and AND-s the resulting predicate
|
|
1348
|
+
* onto the existing source filters.
|
|
1349
|
+
*
|
|
1350
|
+
* Capped at 1000 IDs server-side. {@link geometryType} is required whenever
|
|
1351
|
+
* `featureIds` is provided.
|
|
1352
|
+
*/
|
|
1353
|
+
featureIds?: string[];
|
|
1354
|
+
/**
|
|
1355
|
+
* Geometry topology of the features in {@link featureIds}, required whenever
|
|
1356
|
+
* `featureIds` is provided. Used by the server to regenerate the feature-id
|
|
1357
|
+
* hash for the correct geometry type.
|
|
1358
|
+
*/
|
|
1359
|
+
geometryType?: WidgetFeatureGeometryType;
|
|
1338
1360
|
}
|
|
1339
1361
|
type CategoryOrderBy = 'frequency_asc' | 'frequency_desc' | 'alphabetical_asc' | 'alphabetical_desc';
|
|
1340
1362
|
/**
|
|
@@ -1396,7 +1418,7 @@ interface FeaturesRequestOptions extends BaseRequestOptions {
|
|
|
1396
1418
|
*/
|
|
1397
1419
|
columns: string[];
|
|
1398
1420
|
/** Topology of objects to be picked. */
|
|
1399
|
-
dataType:
|
|
1421
|
+
dataType: WidgetFeatureGeometryType;
|
|
1400
1422
|
/** Zoom level, required if using 'points' data type. */
|
|
1401
1423
|
z?: number;
|
|
1402
1424
|
/**
|
|
@@ -2255,4 +2277,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
|
|
|
2255
2277
|
*/
|
|
2256
2278
|
declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
|
|
2257
2279
|
|
|
2258
|
-
export { type APIErrorContext, type APIRequestType, AUDIT_TAGS, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, type AggregationsRequestOptions, type AggregationsResponse, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CARTO_SOURCES, CartoAPIError, type CategoryOrderBy, type CategoryRequestOptions, type CategoryResponse, type CategoryResponseEntry, type CategoryResponseRaw, CellSet, type ColumnsOption, type D3Scale, DEFAULT_API_BASE_URL, type ExtentRequestOptions, type ExtentResponse, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, type FilterOptions, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type KeplerMapConfig, type Layer, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, OTHERS_CATEGORY_NAME, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterBandType, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type Scales, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type Tilejson, type TilejsonResult, type TilesetSourceOptions, type Tilestats, type TimeSeriesRequestOptions, type TimeSeriesResponse, type TrajectoryQuerySourceOptions, type TrajectoryQuerySourceResponse, type TrajectoryTableSourceOptions, type TrajectoryTableSourceResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, ErrorCode as _ErrorCode, type VecExprResult as _VecExprResult, applyLayerGroupFilters as _applyLayerGroupFilters, _buildFeatureFilter, createVecExprEvaluator as _createVecExprEvaluator, domainFromValues as _domainFromValues, evaluateVecExpr as _evaluateVecExpr, fillInMapDatasets as _fillInMapDatasets, fillInTileStats as _fillInTileStats, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, compileCustomAggregation, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, trajectoryQuerySource, trajectoryTableSource, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
|
|
2280
|
+
export { type APIErrorContext, type APIRequestType, AUDIT_TAGS, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, type AggregationsRequestOptions, type AggregationsResponse, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CARTO_SOURCES, CartoAPIError, type CategoryOrderBy, type CategoryRequestOptions, type CategoryResponse, type CategoryResponseEntry, type CategoryResponseRaw, CellSet, type ColumnsOption, type D3Scale, DEFAULT_API_BASE_URL, type ExtentRequestOptions, type ExtentResponse, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, type FilterOptions, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type KeplerMapConfig, type Layer, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, OTHERS_CATEGORY_NAME, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterBandType, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type Scales, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type Tilejson, type TilejsonResult, type TilesetSourceOptions, type Tilestats, type TimeSeriesRequestOptions, type TimeSeriesResponse, type TrajectoryQuerySourceOptions, type TrajectoryQuerySourceResponse, type TrajectoryTableSourceOptions, type TrajectoryTableSourceResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, type WidgetFeatureGeometryType, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, ErrorCode as _ErrorCode, type VecExprResult as _VecExprResult, applyLayerGroupFilters as _applyLayerGroupFilters, _buildFeatureFilter, createVecExprEvaluator as _createVecExprEvaluator, domainFromValues as _domainFromValues, evaluateVecExpr as _evaluateVecExpr, fillInMapDatasets as _fillInMapDatasets, fillInTileStats as _fillInTileStats, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, compileCustomAggregation, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, trajectoryQuerySource, trajectoryTableSource, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
|
package/build/api-client.d.ts
CHANGED
|
@@ -1327,6 +1327,11 @@ interface ViewState {
|
|
|
1327
1327
|
latitude: number;
|
|
1328
1328
|
longitude: number;
|
|
1329
1329
|
}
|
|
1330
|
+
/**
|
|
1331
|
+
* Topology of the features referenced by {@link BaseRequestOptions#featureIds}.
|
|
1332
|
+
* Must match the geometry type of the layer the features were picked from.
|
|
1333
|
+
*/
|
|
1334
|
+
type WidgetFeatureGeometryType = 'points' | 'lines' | 'polygons';
|
|
1330
1335
|
/** Common options for {@link WidgetRemoteSource} requests. */
|
|
1331
1336
|
interface BaseRequestOptions {
|
|
1332
1337
|
signal?: AbortSignal;
|
|
@@ -1335,6 +1340,23 @@ interface BaseRequestOptions {
|
|
|
1335
1340
|
/** Overrides source filters, if any. */
|
|
1336
1341
|
filters?: Filters;
|
|
1337
1342
|
filterOwner?: string;
|
|
1343
|
+
/**
|
|
1344
|
+
* Restricts the request to a selection of features, identified by their
|
|
1345
|
+
* `_carto_feature_id` (a hash of geometry). Unlike {@link filters}, this does
|
|
1346
|
+
* not require `_carto_feature_id` to exist as a column on the source: the
|
|
1347
|
+
* server regenerates the hash on-the-fly and AND-s the resulting predicate
|
|
1348
|
+
* onto the existing source filters.
|
|
1349
|
+
*
|
|
1350
|
+
* Capped at 1000 IDs server-side. {@link geometryType} is required whenever
|
|
1351
|
+
* `featureIds` is provided.
|
|
1352
|
+
*/
|
|
1353
|
+
featureIds?: string[];
|
|
1354
|
+
/**
|
|
1355
|
+
* Geometry topology of the features in {@link featureIds}, required whenever
|
|
1356
|
+
* `featureIds` is provided. Used by the server to regenerate the feature-id
|
|
1357
|
+
* hash for the correct geometry type.
|
|
1358
|
+
*/
|
|
1359
|
+
geometryType?: WidgetFeatureGeometryType;
|
|
1338
1360
|
}
|
|
1339
1361
|
type CategoryOrderBy = 'frequency_asc' | 'frequency_desc' | 'alphabetical_asc' | 'alphabetical_desc';
|
|
1340
1362
|
/**
|
|
@@ -1396,7 +1418,7 @@ interface FeaturesRequestOptions extends BaseRequestOptions {
|
|
|
1396
1418
|
*/
|
|
1397
1419
|
columns: string[];
|
|
1398
1420
|
/** Topology of objects to be picked. */
|
|
1399
|
-
dataType:
|
|
1421
|
+
dataType: WidgetFeatureGeometryType;
|
|
1400
1422
|
/** Zoom level, required if using 'points' data type. */
|
|
1401
1423
|
z?: number;
|
|
1402
1424
|
/**
|
|
@@ -2255,4 +2277,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
|
|
|
2255
2277
|
*/
|
|
2256
2278
|
declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
|
|
2257
2279
|
|
|
2258
|
-
export { type APIErrorContext, type APIRequestType, AUDIT_TAGS, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, type AggregationsRequestOptions, type AggregationsResponse, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CARTO_SOURCES, CartoAPIError, type CategoryOrderBy, type CategoryRequestOptions, type CategoryResponse, type CategoryResponseEntry, type CategoryResponseRaw, CellSet, type ColumnsOption, type D3Scale, DEFAULT_API_BASE_URL, type ExtentRequestOptions, type ExtentResponse, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, type FilterOptions, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type KeplerMapConfig, type Layer, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, OTHERS_CATEGORY_NAME, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterBandType, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type Scales, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type Tilejson, type TilejsonResult, type TilesetSourceOptions, type Tilestats, type TimeSeriesRequestOptions, type TimeSeriesResponse, type TrajectoryQuerySourceOptions, type TrajectoryQuerySourceResponse, type TrajectoryTableSourceOptions, type TrajectoryTableSourceResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, ErrorCode as _ErrorCode, type VecExprResult as _VecExprResult, applyLayerGroupFilters as _applyLayerGroupFilters, _buildFeatureFilter, createVecExprEvaluator as _createVecExprEvaluator, domainFromValues as _domainFromValues, evaluateVecExpr as _evaluateVecExpr, fillInMapDatasets as _fillInMapDatasets, fillInTileStats as _fillInTileStats, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, compileCustomAggregation, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, trajectoryQuerySource, trajectoryTableSource, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
|
|
2280
|
+
export { type APIErrorContext, type APIRequestType, AUDIT_TAGS, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, type AggregationsRequestOptions, type AggregationsResponse, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CARTO_SOURCES, CartoAPIError, type CategoryOrderBy, type CategoryRequestOptions, type CategoryResponse, type CategoryResponseEntry, type CategoryResponseRaw, CellSet, type ColumnsOption, type D3Scale, DEFAULT_API_BASE_URL, type ExtentRequestOptions, type ExtentResponse, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, type FilterOptions, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type KeplerMapConfig, type Layer, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, OTHERS_CATEGORY_NAME, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterBandType, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type Scales, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type Tilejson, type TilejsonResult, type TilesetSourceOptions, type Tilestats, type TimeSeriesRequestOptions, type TimeSeriesResponse, type TrajectoryQuerySourceOptions, type TrajectoryQuerySourceResponse, type TrajectoryTableSourceOptions, type TrajectoryTableSourceResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, type WidgetFeatureGeometryType, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, ErrorCode as _ErrorCode, type VecExprResult as _VecExprResult, applyLayerGroupFilters as _applyLayerGroupFilters, _buildFeatureFilter, createVecExprEvaluator as _createVecExprEvaluator, domainFromValues as _domainFromValues, evaluateVecExpr as _evaluateVecExpr, fillInMapDatasets as _fillInMapDatasets, fillInTileStats as _fillInTileStats, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, compileCustomAggregation, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, trajectoryQuerySource, trajectoryTableSource, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
|
package/build/api-client.js
CHANGED
|
@@ -6304,6 +6304,19 @@ function getApplicableFilters(owner, filters) {
|
|
|
6304
6304
|
var OTHERS_CATEGORY_NAME = "_carto_others";
|
|
6305
6305
|
|
|
6306
6306
|
// src/widget-sources/widget-remote-source.ts
|
|
6307
|
+
var FEATURE_IDS_LIMIT = 1e3;
|
|
6308
|
+
function getFeatureSelectionParams(options) {
|
|
6309
|
+
const { featureIds, geometryType } = options;
|
|
6310
|
+
if (!featureIds || featureIds.length === 0) {
|
|
6311
|
+
return {};
|
|
6312
|
+
}
|
|
6313
|
+
assert2(geometryType, "geometryType is required when featureIds are provided");
|
|
6314
|
+
assert2(
|
|
6315
|
+
featureIds.length <= FEATURE_IDS_LIMIT,
|
|
6316
|
+
`featureIds is limited to ${FEATURE_IDS_LIMIT} values, received ${featureIds.length}`
|
|
6317
|
+
);
|
|
6318
|
+
return { featureIds, geometryType };
|
|
6319
|
+
}
|
|
6307
6320
|
var WidgetRemoteSource = class extends WidgetSource {
|
|
6308
6321
|
_getModelSource(filters, filterOwner) {
|
|
6309
6322
|
const props = this.props;
|
|
@@ -6354,7 +6367,8 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6354
6367
|
operationExp,
|
|
6355
6368
|
operationColumn: operationColumn || column,
|
|
6356
6369
|
othersThreshold,
|
|
6357
|
-
orderBy
|
|
6370
|
+
orderBy,
|
|
6371
|
+
...getFeatureSelectionParams(options)
|
|
6358
6372
|
},
|
|
6359
6373
|
opts: { signal, headers: this.props.headers }
|
|
6360
6374
|
});
|
|
@@ -6424,7 +6438,8 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6424
6438
|
params: {
|
|
6425
6439
|
column: column ?? "*",
|
|
6426
6440
|
operation: operation2 ?? AggregationTypes.Count,
|
|
6427
|
-
operationExp
|
|
6441
|
+
operationExp,
|
|
6442
|
+
...getFeatureSelectionParams(options)
|
|
6428
6443
|
},
|
|
6429
6444
|
opts: { signal, headers: this.props.headers }
|
|
6430
6445
|
}).then((res) => normalizeObjectKeys(res.rows[0]));
|
|
@@ -6446,7 +6461,7 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6446
6461
|
spatialFiltersMode,
|
|
6447
6462
|
spatialFilter
|
|
6448
6463
|
},
|
|
6449
|
-
params: { column, operation: operation2, ticks },
|
|
6464
|
+
params: { column, operation: operation2, ticks, ...getFeatureSelectionParams(options) },
|
|
6450
6465
|
opts: { signal, headers: this.props.headers }
|
|
6451
6466
|
}).then((res) => normalizeObjectKeys(res.rows));
|
|
6452
6467
|
if (data.length) {
|
|
@@ -6475,7 +6490,7 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6475
6490
|
spatialFiltersMode,
|
|
6476
6491
|
spatialFilter
|
|
6477
6492
|
},
|
|
6478
|
-
params: { column },
|
|
6493
|
+
params: { column, ...getFeatureSelectionParams(options) },
|
|
6479
6494
|
opts: { signal, headers: this.props.headers }
|
|
6480
6495
|
}).then((res) => normalizeObjectKeys(res.rows[0]));
|
|
6481
6496
|
}
|
|
@@ -6502,7 +6517,8 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6502
6517
|
xAxisJoinOperation,
|
|
6503
6518
|
yAxisColumn,
|
|
6504
6519
|
yAxisJoinOperation,
|
|
6505
|
-
limit: HARD_LIMIT
|
|
6520
|
+
limit: HARD_LIMIT,
|
|
6521
|
+
...getFeatureSelectionParams(options)
|
|
6506
6522
|
},
|
|
6507
6523
|
opts: { signal, headers: this.props.headers }
|
|
6508
6524
|
}).then((res) => normalizeObjectKeys(res.rows)).then((res) => res.map(({ x, y }) => [x, y]));
|
|
@@ -6529,7 +6545,8 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6529
6545
|
sortBy,
|
|
6530
6546
|
sortDirection,
|
|
6531
6547
|
limit,
|
|
6532
|
-
offset
|
|
6548
|
+
offset,
|
|
6549
|
+
...getFeatureSelectionParams(options)
|
|
6533
6550
|
},
|
|
6534
6551
|
opts: { signal, headers: this.props.headers }
|
|
6535
6552
|
}).then((res) => ({
|
|
@@ -6579,7 +6596,8 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6579
6596
|
operationExp,
|
|
6580
6597
|
splitByCategory,
|
|
6581
6598
|
splitByCategoryLimit,
|
|
6582
|
-
splitByCategoryValues
|
|
6599
|
+
splitByCategoryValues,
|
|
6600
|
+
...getFeatureSelectionParams(options)
|
|
6583
6601
|
},
|
|
6584
6602
|
opts: { signal, headers: this.props.headers }
|
|
6585
6603
|
}).then((res) => ({
|
|
@@ -6604,7 +6622,8 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6604
6622
|
spatialFilter
|
|
6605
6623
|
},
|
|
6606
6624
|
params: {
|
|
6607
|
-
aggregations
|
|
6625
|
+
aggregations,
|
|
6626
|
+
...getFeatureSelectionParams(options)
|
|
6608
6627
|
},
|
|
6609
6628
|
opts: { signal, headers: this.props.headers }
|
|
6610
6629
|
}).then((res) => ({
|