@carto/api-client 0.5.13 → 0.5.14

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.
@@ -1341,6 +1341,8 @@ interface TimeSeriesRequestOptions extends BaseRequestOptions {
1341
1341
  splitByCategoryLimit?: number;
1342
1342
  splitByCategoryValues?: string[];
1343
1343
  }
1344
+ /** @experimental */
1345
+ type ExtentRequestOptions = BaseRequestOptions;
1344
1346
  /******************************************************************************
1345
1347
  * WIDGET API RESPONSES
1346
1348
  */
@@ -1391,6 +1393,10 @@ type TimeSeriesResponse = {
1391
1393
  };
1392
1394
  /** Response from {@link WidgetRemoteSource#getHistogram}. */
1393
1395
  type HistogramResponse = number[];
1396
+ /** @experimental */
1397
+ type ExtentResponse = {
1398
+ bbox: BBox;
1399
+ };
1394
1400
 
1395
1401
  interface WidgetSourceProps extends Omit<SourceOptions, 'filters'> {
1396
1402
  apiVersion?: ApiVersion;
@@ -1459,6 +1465,8 @@ declare abstract class WidgetSource<Props extends WidgetSourceProps = WidgetSour
1459
1465
  * time intervals. Suitable for rendering time series charts.
1460
1466
  */
1461
1467
  abstract getTimeSeries(options: TimeSeriesRequestOptions): Promise<TimeSeriesResponse>;
1468
+ /** @experimental */
1469
+ abstract getExtent(options?: ExtentRequestOptions): Promise<ExtentResponse>;
1462
1470
  }
1463
1471
 
1464
1472
  interface ModelSource {
@@ -1502,6 +1510,8 @@ declare abstract class WidgetRemoteSource<Props extends WidgetRemoteSourceProps>
1502
1510
  getScatter(options: ScatterRequestOptions): Promise<ScatterResponse>;
1503
1511
  getTable(options: TableRequestOptions): Promise<TableResponse>;
1504
1512
  getTimeSeries(options: TimeSeriesRequestOptions): Promise<TimeSeriesResponse>;
1513
+ /** @experimental */
1514
+ getExtent(options?: ExtentRequestOptions): Promise<ExtentResponse>;
1505
1515
  }
1506
1516
 
1507
1517
  type LayerQuerySourceOptions = Omit<VectorQuerySourceOptions, 'filters'> | Omit<H3QuerySourceOptions, 'filters'> | Omit<QuadbinQuerySourceOptions, 'filters'>;
@@ -1656,6 +1666,8 @@ declare class WidgetTilesetSourceImpl extends WidgetSource<WidgetTilesetSourcePr
1656
1666
  getTable({ columns, searchFilterColumn, searchFilterText, sortBy, sortDirection, sortByColumnType, offset, limit, filters, filterOwner, spatialFilter, }: TableRequestOptions): Promise<TableResponse>;
1657
1667
  getTimeSeries({ column, stepSize, operation, operationColumn, joinOperation, filters, filterOwner, spatialFilter, }: TimeSeriesRequestOptions): Promise<TimeSeriesResponse>;
1658
1668
  getRange({ column, filters, filterOwner, spatialFilter, }: RangeRequestOptions): Promise<RangeResponse>;
1669
+ /** @experimental */
1670
+ getExtent(): Promise<ExtentResponse>;
1659
1671
  /****************************************************************************
1660
1672
  * INTERNAL
1661
1673
  */
@@ -1665,6 +1677,10 @@ declare class WidgetTilesetSourceImpl extends WidgetSource<WidgetTilesetSourcePr
1665
1677
  type WidgetTilesetSourceProps = WidgetSourceProps & Omit<TilesetSourceOptions, 'filters'> & {
1666
1678
  tileFormat: TileFormat;
1667
1679
  spatialDataType: SpatialDataType;
1680
+ /**
1681
+ * Extent of spatial data, typically from TileJSON. Does not include filters.
1682
+ */
1683
+ spatialDataBounds: BBox;
1668
1684
  };
1669
1685
  type WidgetTilesetSourceResult = {
1670
1686
  widgetSource: WidgetTilesetSource;
@@ -1730,6 +1746,8 @@ declare class WidgetTilesetSource<Props extends WidgetTilesetSourceProps = Widge
1730
1746
  getTable({ signal, ...options }: TableRequestOptions): Promise<TableResponse>;
1731
1747
  getTimeSeries({ signal, ...options }: TimeSeriesRequestOptions): Promise<TimeSeriesResponse>;
1732
1748
  getRange({ signal, ...options }: RangeRequestOptions): Promise<RangeResponse>;
1749
+ /** @experimental */
1750
+ getExtent(): Promise<ExtentResponse>;
1733
1751
  }
1734
1752
 
1735
1753
  type WidgetRasterSourceProps = WidgetTilesetSourceProps & {
@@ -1969,4 +1987,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
1969
1987
  */
1970
1988
  declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
1971
1989
 
1972
- export { type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CartoAPIError, type CategoryOrderBy, type CategoryRequestOptions, type CategoryResponse, type CategoryResponseEntry, type CategoryResponseRaw, CellSet, type ColumnsOption, type D3Scale, DEFAULT_API_BASE_URL, 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 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 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, _buildFeatureFilter, domainFromValues as _domainFromValues, _getHexagonResolution, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, clearDefaultRequestCache, clearFilters, configureSource, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, 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, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
1990
+ export { type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, 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 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 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, _buildFeatureFilter, domainFromValues as _domainFromValues, _getHexagonResolution, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, clearDefaultRequestCache, clearFilters, configureSource, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, 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, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
@@ -1341,6 +1341,8 @@ interface TimeSeriesRequestOptions extends BaseRequestOptions {
1341
1341
  splitByCategoryLimit?: number;
1342
1342
  splitByCategoryValues?: string[];
1343
1343
  }
1344
+ /** @experimental */
1345
+ type ExtentRequestOptions = BaseRequestOptions;
1344
1346
  /******************************************************************************
1345
1347
  * WIDGET API RESPONSES
1346
1348
  */
@@ -1391,6 +1393,10 @@ type TimeSeriesResponse = {
1391
1393
  };
1392
1394
  /** Response from {@link WidgetRemoteSource#getHistogram}. */
1393
1395
  type HistogramResponse = number[];
1396
+ /** @experimental */
1397
+ type ExtentResponse = {
1398
+ bbox: BBox;
1399
+ };
1394
1400
 
1395
1401
  interface WidgetSourceProps extends Omit<SourceOptions, 'filters'> {
1396
1402
  apiVersion?: ApiVersion;
@@ -1459,6 +1465,8 @@ declare abstract class WidgetSource<Props extends WidgetSourceProps = WidgetSour
1459
1465
  * time intervals. Suitable for rendering time series charts.
1460
1466
  */
1461
1467
  abstract getTimeSeries(options: TimeSeriesRequestOptions): Promise<TimeSeriesResponse>;
1468
+ /** @experimental */
1469
+ abstract getExtent(options?: ExtentRequestOptions): Promise<ExtentResponse>;
1462
1470
  }
1463
1471
 
1464
1472
  interface ModelSource {
@@ -1502,6 +1510,8 @@ declare abstract class WidgetRemoteSource<Props extends WidgetRemoteSourceProps>
1502
1510
  getScatter(options: ScatterRequestOptions): Promise<ScatterResponse>;
1503
1511
  getTable(options: TableRequestOptions): Promise<TableResponse>;
1504
1512
  getTimeSeries(options: TimeSeriesRequestOptions): Promise<TimeSeriesResponse>;
1513
+ /** @experimental */
1514
+ getExtent(options?: ExtentRequestOptions): Promise<ExtentResponse>;
1505
1515
  }
1506
1516
 
1507
1517
  type LayerQuerySourceOptions = Omit<VectorQuerySourceOptions, 'filters'> | Omit<H3QuerySourceOptions, 'filters'> | Omit<QuadbinQuerySourceOptions, 'filters'>;
@@ -1656,6 +1666,8 @@ declare class WidgetTilesetSourceImpl extends WidgetSource<WidgetTilesetSourcePr
1656
1666
  getTable({ columns, searchFilterColumn, searchFilterText, sortBy, sortDirection, sortByColumnType, offset, limit, filters, filterOwner, spatialFilter, }: TableRequestOptions): Promise<TableResponse>;
1657
1667
  getTimeSeries({ column, stepSize, operation, operationColumn, joinOperation, filters, filterOwner, spatialFilter, }: TimeSeriesRequestOptions): Promise<TimeSeriesResponse>;
1658
1668
  getRange({ column, filters, filterOwner, spatialFilter, }: RangeRequestOptions): Promise<RangeResponse>;
1669
+ /** @experimental */
1670
+ getExtent(): Promise<ExtentResponse>;
1659
1671
  /****************************************************************************
1660
1672
  * INTERNAL
1661
1673
  */
@@ -1665,6 +1677,10 @@ declare class WidgetTilesetSourceImpl extends WidgetSource<WidgetTilesetSourcePr
1665
1677
  type WidgetTilesetSourceProps = WidgetSourceProps & Omit<TilesetSourceOptions, 'filters'> & {
1666
1678
  tileFormat: TileFormat;
1667
1679
  spatialDataType: SpatialDataType;
1680
+ /**
1681
+ * Extent of spatial data, typically from TileJSON. Does not include filters.
1682
+ */
1683
+ spatialDataBounds: BBox;
1668
1684
  };
1669
1685
  type WidgetTilesetSourceResult = {
1670
1686
  widgetSource: WidgetTilesetSource;
@@ -1730,6 +1746,8 @@ declare class WidgetTilesetSource<Props extends WidgetTilesetSourceProps = Widge
1730
1746
  getTable({ signal, ...options }: TableRequestOptions): Promise<TableResponse>;
1731
1747
  getTimeSeries({ signal, ...options }: TimeSeriesRequestOptions): Promise<TimeSeriesResponse>;
1732
1748
  getRange({ signal, ...options }: RangeRequestOptions): Promise<RangeResponse>;
1749
+ /** @experimental */
1750
+ getExtent(): Promise<ExtentResponse>;
1733
1751
  }
1734
1752
 
1735
1753
  type WidgetRasterSourceProps = WidgetTilesetSourceProps & {
@@ -1969,4 +1987,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
1969
1987
  */
1970
1988
  declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
1971
1989
 
1972
- export { type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CartoAPIError, type CategoryOrderBy, type CategoryRequestOptions, type CategoryResponse, type CategoryResponseEntry, type CategoryResponseRaw, CellSet, type ColumnsOption, type D3Scale, DEFAULT_API_BASE_URL, 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 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 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, _buildFeatureFilter, domainFromValues as _domainFromValues, _getHexagonResolution, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, clearDefaultRequestCache, clearFilters, configureSource, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, 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, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
1990
+ export { type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, 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 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 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, _buildFeatureFilter, domainFromValues as _domainFromValues, _getHexagonResolution, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, clearDefaultRequestCache, clearFilters, configureSource, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, 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, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
@@ -94,11 +94,11 @@ var FilterType = /* @__PURE__ */ ((FilterType2) => {
94
94
  FilterType2["STRING_SEARCH"] = "stringSearch";
95
95
  return FilterType2;
96
96
  })(FilterType || {});
97
- var ApiVersion = /* @__PURE__ */ ((ApiVersion3) => {
98
- ApiVersion3["V1"] = "v1";
99
- ApiVersion3["V2"] = "v2";
100
- ApiVersion3["V3"] = "v3";
101
- return ApiVersion3;
97
+ var ApiVersion = /* @__PURE__ */ ((ApiVersion2) => {
98
+ ApiVersion2["V1"] = "v1";
99
+ ApiVersion2["V2"] = "v2";
100
+ ApiVersion2["V3"] = "v3";
101
+ return ApiVersion2;
102
102
  })(ApiVersion || {});
103
103
  var DEFAULT_API_BASE_URL = "https://gcp-us-east1.api.carto.com";
104
104
  var TileFormat = /* @__PURE__ */ ((TileFormat2) => {
@@ -6593,6 +6593,48 @@ var WidgetRemoteSource = class extends WidgetSource {
6593
6593
  categories: res.metadata?.categories
6594
6594
  }));
6595
6595
  }
6596
+ /** @experimental */
6597
+ async getExtent(options = {}) {
6598
+ const { signal, filters = this.props.filters, filterOwner } = options;
6599
+ const {
6600
+ type,
6601
+ data,
6602
+ apiBaseUrl,
6603
+ apiVersion,
6604
+ connectionName,
6605
+ spatialDataColumn,
6606
+ spatialDataType,
6607
+ queryParameters
6608
+ } = this.getModelSource(filters, filterOwner);
6609
+ assert2(apiVersion === "v3" /* V3 */, "Stats API requires CARTO 3+");
6610
+ let url;
6611
+ const parameters = { filters, spatialDataType };
6612
+ if (type === "query") {
6613
+ url = `${apiBaseUrl}/${apiVersion}/stats/${connectionName}/${spatialDataColumn}`;
6614
+ parameters.q = data;
6615
+ parameters.queryParameters = queryParameters;
6616
+ } else {
6617
+ url = `${apiBaseUrl}/${apiVersion}/stats/${connectionName}/${data}/${spatialDataColumn}`;
6618
+ }
6619
+ const headers = {
6620
+ Authorization: `Bearer ${this.props.accessToken}`,
6621
+ ...this.props.headers
6622
+ };
6623
+ const errorContext = {
6624
+ requestType: "Tile stats",
6625
+ connection: connectionName,
6626
+ type
6627
+ };
6628
+ return requestWithParameters({
6629
+ baseUrl: url,
6630
+ headers,
6631
+ signal,
6632
+ errorContext,
6633
+ parameters
6634
+ }).then(({ extent: { xmin, ymin, xmax, ymax } }) => ({
6635
+ bbox: [xmin, ymin, xmax, ymax]
6636
+ }));
6637
+ }
6596
6638
  };
6597
6639
 
6598
6640
  // src/widget-sources/widget-query-source.ts
@@ -7548,6 +7590,10 @@ var WidgetTilesetSourceImpl = class extends WidgetSource {
7548
7590
  max: aggregationFunctions.max(filteredFeatures, column)
7549
7591
  };
7550
7592
  }
7593
+ /** @experimental */
7594
+ async getExtent() {
7595
+ return Promise.reject(new Error("not implemented"));
7596
+ }
7551
7597
  /****************************************************************************
7552
7598
  * INTERNAL
7553
7599
  */
@@ -7778,6 +7824,12 @@ var WidgetTilesetSource = class extends WidgetSource {
7778
7824
  }) {
7779
7825
  return this._executeWorkerMethod("getRange" /* GET_RANGE */, [options], signal);
7780
7826
  }
7827
+ /** @experimental */
7828
+ async getExtent() {
7829
+ return Promise.resolve({
7830
+ bbox: this.props.spatialDataBounds
7831
+ });
7832
+ }
7781
7833
  };
7782
7834
 
7783
7835
  // src/widget-sources/widget-raster-source.ts
@@ -7894,7 +7946,8 @@ var h3TilesetSource = async function(options) {
7894
7946
  ...options,
7895
7947
  tileFormat: getTileFormat(result),
7896
7948
  spatialDataColumn,
7897
- spatialDataType: "h3"
7949
+ spatialDataType: "h3",
7950
+ spatialDataBounds: result.bounds
7898
7951
  })
7899
7952
  })
7900
7953
  );
@@ -7915,6 +7968,7 @@ var rasterSource = async function(options) {
7915
7968
  tileFormat: getTileFormat(result),
7916
7969
  spatialDataColumn: "quadbin",
7917
7970
  spatialDataType: "quadbin",
7971
+ spatialDataBounds: result.bounds,
7918
7972
  rasterMetadata: result.raster_metadata
7919
7973
  })
7920
7974
  })
@@ -8014,7 +8068,8 @@ var quadbinTilesetSource = async function(options) {
8014
8068
  ...options,
8015
8069
  tileFormat: getTileFormat(result),
8016
8070
  spatialDataColumn,
8017
- spatialDataType: "quadbin"
8071
+ spatialDataType: "quadbin",
8072
+ spatialDataBounds: result.bounds
8018
8073
  })
8019
8074
  })
8020
8075
  );
@@ -8115,7 +8170,8 @@ var vectorTilesetSource = async function(options) {
8115
8170
  ...options,
8116
8171
  tileFormat: getTileFormat(result),
8117
8172
  spatialDataColumn,
8118
- spatialDataType: "geo"
8173
+ spatialDataType: "geo",
8174
+ spatialDataBounds: result.bounds
8119
8175
  })
8120
8176
  })
8121
8177
  );