@carto/api-client 0.5.0-alpha.3 → 0.5.0-alpha.4

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 (106) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/api/carto-api-error.d.ts +1 -1
  3. package/build/api/query.d.ts +1 -1
  4. package/build/api/request-with-parameters.d.ts +2 -2
  5. package/build/api-client.cjs +2324 -2188
  6. package/build/api-client.cjs.map +1 -1
  7. package/build/api-client.modern.js +2196 -2055
  8. package/build/api-client.modern.js.map +1 -1
  9. package/build/client.d.ts +2 -2
  10. package/build/constants-internal.d.ts +5 -5
  11. package/build/constants.d.ts +6 -6
  12. package/build/deck/get-data-filter-extension-props.d.ts +18 -0
  13. package/build/deck/index.d.ts +1 -0
  14. package/build/filters/Filter.d.ts +15 -3
  15. package/build/filters/FilterTypes.d.ts +1 -1
  16. package/build/filters/geosjonFeatures.d.ts +2 -2
  17. package/build/filters/tileFeatures.d.ts +8 -8
  18. package/build/filters/tileFeaturesRaster.d.ts +3 -3
  19. package/build/filters.d.ts +2 -2
  20. package/build/geo.d.ts +1 -1
  21. package/build/index.d.ts +1 -0
  22. package/build/models/common.d.ts +4 -3
  23. package/build/models/model.d.ts +2 -2
  24. package/build/operations/aggregation.d.ts +5 -5
  25. package/build/operations/applySorting.d.ts +3 -3
  26. package/build/operations/groupBy.d.ts +4 -4
  27. package/build/operations/groupByDate.d.ts +1 -1
  28. package/build/operations/histogram.d.ts +3 -3
  29. package/build/operations/scatterPlot.d.ts +3 -3
  30. package/build/sources/base-source.d.ts +2 -2
  31. package/build/sources/boundary-query-source.d.ts +1 -1
  32. package/build/sources/boundary-table-source.d.ts +1 -1
  33. package/build/sources/h3-query-source.d.ts +2 -2
  34. package/build/sources/h3-table-source.d.ts +2 -2
  35. package/build/sources/h3-tileset-source.d.ts +2 -2
  36. package/build/sources/index.d.ts +26 -26
  37. package/build/sources/quadbin-query-source.d.ts +2 -2
  38. package/build/sources/quadbin-table-source.d.ts +2 -2
  39. package/build/sources/quadbin-tileset-source.d.ts +2 -2
  40. package/build/sources/raster-source.d.ts +2 -2
  41. package/build/sources/types.d.ts +3 -3
  42. package/build/sources/vector-query-source.d.ts +1 -1
  43. package/build/sources/vector-table-source.d.ts +1 -1
  44. package/build/sources/vector-tileset-source.d.ts +2 -2
  45. package/build/spatial-index.d.ts +3 -3
  46. package/build/types-internal.d.ts +5 -5
  47. package/build/types.d.ts +15 -15
  48. package/build/utils/makeIntervalComplete.d.ts +1 -1
  49. package/build/utils.d.ts +3 -3
  50. package/build/widget-sources/types.d.ts +4 -2
  51. package/build/widget-sources/widget-query-source.d.ts +2 -1
  52. package/build/widget-sources/widget-remote-source.d.ts +3 -0
  53. package/build/widget-sources/widget-source.d.ts +3 -3
  54. package/build/widget-sources/widget-table-source.d.ts +2 -1
  55. package/build/widget-sources/widget-tileset-source.d.ts +22 -24
  56. package/package.json +36 -30
  57. package/src/api/carto-api-error.ts +1 -1
  58. package/src/api/query.ts +5 -5
  59. package/src/api/request-with-parameters.ts +6 -6
  60. package/src/client.ts +3 -3
  61. package/src/constants-internal.ts +5 -5
  62. package/src/constants.ts +6 -6
  63. package/src/deck/get-data-filter-extension-props.ts +146 -0
  64. package/src/deck/index.ts +1 -0
  65. package/src/filters/Filter.ts +18 -8
  66. package/src/filters/FilterTypes.ts +2 -2
  67. package/src/filters/geosjonFeatures.ts +2 -2
  68. package/src/filters/tileFeatures.ts +13 -19
  69. package/src/filters/tileFeaturesRaster.ts +7 -7
  70. package/src/filters.ts +4 -4
  71. package/src/geo.ts +12 -14
  72. package/src/index.ts +1 -0
  73. package/src/models/common.ts +9 -7
  74. package/src/models/model.ts +3 -4
  75. package/src/operations/aggregation.ts +5 -5
  76. package/src/operations/applySorting.ts +4 -4
  77. package/src/operations/groupBy.ts +4 -4
  78. package/src/operations/groupByDate.ts +1 -1
  79. package/src/operations/histogram.ts +4 -4
  80. package/src/operations/scatterPlot.ts +4 -4
  81. package/src/sources/base-source.ts +8 -8
  82. package/src/sources/boundary-query-source.ts +2 -2
  83. package/src/sources/boundary-table-source.ts +2 -2
  84. package/src/sources/h3-query-source.ts +7 -5
  85. package/src/sources/h3-table-source.ts +7 -5
  86. package/src/sources/h3-tileset-source.ts +4 -4
  87. package/src/sources/index.ts +26 -26
  88. package/src/sources/quadbin-query-source.ts +7 -5
  89. package/src/sources/quadbin-table-source.ts +7 -5
  90. package/src/sources/quadbin-tileset-source.ts +4 -4
  91. package/src/sources/raster-source.ts +8 -4
  92. package/src/sources/types.ts +3 -3
  93. package/src/sources/vector-query-source.ts +2 -3
  94. package/src/sources/vector-table-source.ts +2 -3
  95. package/src/sources/vector-tileset-source.ts +5 -5
  96. package/src/spatial-index.ts +4 -4
  97. package/src/types-internal.ts +5 -5
  98. package/src/types.ts +15 -15
  99. package/src/utils/makeIntervalComplete.ts +1 -1
  100. package/src/utils.ts +3 -3
  101. package/src/widget-sources/types.ts +5 -3
  102. package/src/widget-sources/widget-query-source.ts +6 -2
  103. package/src/widget-sources/widget-remote-source.ts +31 -16
  104. package/src/widget-sources/widget-source.ts +13 -4
  105. package/src/widget-sources/widget-table-source.ts +6 -2
  106. package/src/widget-sources/widget-tileset-source.ts +132 -81
@@ -2,10 +2,10 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- import {DEFAULT_API_BASE_URL} from '../constants';
6
- import {DEFAULT_MAX_LENGTH_URL} from '../constants-internal';
7
- import {buildSourceUrl} from '../api/endpoints';
8
- import {requestWithParameters} from '../api/request-with-parameters';
5
+ import {DEFAULT_API_BASE_URL} from '../constants.js';
6
+ import {DEFAULT_MAX_LENGTH_URL} from '../constants-internal.js';
7
+ import {buildSourceUrl} from '../api/endpoints.js';
8
+ import {requestWithParameters} from '../api/request-with-parameters.js';
9
9
  import type {
10
10
  GeojsonResult,
11
11
  JsonResult,
@@ -13,10 +13,10 @@ import type {
13
13
  SourceRequiredOptions,
14
14
  TilejsonMapInstantiation,
15
15
  TilejsonResult,
16
- } from './types';
17
- import {MapType} from '../types';
18
- import {APIErrorContext} from '../api';
19
- import {getClient} from '../client';
16
+ } from './types.js';
17
+ import {MapType} from '../types.js';
18
+ import {APIErrorContext} from '../api/index.js';
19
+ import {getClient} from '../client.js';
20
20
 
21
21
  export const SOURCE_DEFAULTS: SourceOptionalOptions = {
22
22
  apiBaseUrl: DEFAULT_API_BASE_URL,
@@ -3,8 +3,8 @@
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
5
  import {QueryParameters} from '../types.js';
6
- import {baseSource} from './base-source';
7
- import type {FilterOptions, SourceOptions, TilejsonResult} from './types';
6
+ import {baseSource} from './base-source.js';
7
+ import type {FilterOptions, SourceOptions, TilejsonResult} from './types.js';
8
8
 
9
9
  export type BoundaryQuerySourceOptions = SourceOptions &
10
10
  FilterOptions & {
@@ -2,8 +2,8 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- import {baseSource} from './base-source';
6
- import type {FilterOptions, SourceOptions, TilejsonResult} from './types';
5
+ import {baseSource} from './base-source.js';
6
+ import type {FilterOptions, SourceOptions, TilejsonResult} from './types.js';
7
7
 
8
8
  export type BoundaryTableSourceOptions = SourceOptions &
9
9
  FilterOptions & {
@@ -2,10 +2,12 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- /* eslint-disable camelcase */
6
- import {DEFAULT_AGGREGATION_RES_LEVEL_H3} from '../constants-internal';
7
- import {WidgetQuerySource, WidgetQuerySourceResult} from '../widget-sources';
8
- import {baseSource} from './base-source';
5
+ import {DEFAULT_AGGREGATION_RES_LEVEL_H3} from '../constants-internal.js';
6
+ import {
7
+ WidgetQuerySource,
8
+ WidgetQuerySourceResult,
9
+ } from '../widget-sources/index.js';
10
+ import {baseSource} from './base-source.js';
9
11
  import type {
10
12
  AggregationOptions,
11
13
  FilterOptions,
@@ -13,7 +15,7 @@ import type {
13
15
  SourceOptions,
14
16
  SpatialDataType,
15
17
  TilejsonResult,
16
- } from './types';
18
+ } from './types.js';
17
19
 
18
20
  export type H3QuerySourceOptions = SourceOptions &
19
21
  QuerySourceOptions &
@@ -2,10 +2,12 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- /* eslint-disable camelcase */
6
- import {DEFAULT_AGGREGATION_RES_LEVEL_H3} from '../constants-internal';
7
- import {WidgetTableSource, WidgetTableSourceResult} from '../widget-sources';
8
- import {baseSource} from './base-source';
5
+ import {DEFAULT_AGGREGATION_RES_LEVEL_H3} from '../constants-internal.js';
6
+ import {
7
+ WidgetTableSource,
8
+ WidgetTableSourceResult,
9
+ } from '../widget-sources/index.js';
10
+ import {baseSource} from './base-source.js';
9
11
  import type {
10
12
  AggregationOptions,
11
13
  FilterOptions,
@@ -13,7 +15,7 @@ import type {
13
15
  SpatialDataType,
14
16
  TableSourceOptions,
15
17
  TilejsonResult,
16
- } from './types';
18
+ } from './types.js';
17
19
 
18
20
  export type H3TableSourceOptions = SourceOptions &
19
21
  TableSourceOptions &
@@ -2,17 +2,17 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- import {getTileFormat} from '../utils/getTileFormat';
5
+ import {getTileFormat} from '../utils/getTileFormat.js';
6
6
  import {
7
7
  WidgetTilesetSource,
8
8
  WidgetTilesetSourceResult,
9
- } from '../widget-sources';
10
- import {baseSource} from './base-source';
9
+ } from '../widget-sources/index.js';
10
+ import {baseSource} from './base-source.js';
11
11
  import type {
12
12
  SourceOptions,
13
13
  TilejsonResult,
14
14
  TilesetSourceOptions,
15
- } from './types';
15
+ } from './types.js';
16
16
 
17
17
  export type H3TilesetSourceOptions = SourceOptions & TilesetSourceOptions;
18
18
  type UrlParameters = {name: string};
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- export {SOURCE_DEFAULTS} from './base-source';
5
+ export {SOURCE_DEFAULTS} from './base-source.js';
6
6
  export type {
7
7
  GeojsonResult,
8
8
  JsonResult,
@@ -19,73 +19,73 @@ export type {
19
19
  TileResolution,
20
20
  TilesetSourceOptions,
21
21
  VectorLayer,
22
- } from './types';
22
+ } from './types.js';
23
23
 
24
- export {boundaryQuerySource} from './boundary-query-source';
24
+ export {boundaryQuerySource} from './boundary-query-source.js';
25
25
  export type {
26
26
  BoundaryQuerySourceOptions,
27
27
  BoundaryQuerySourceResponse,
28
- } from './boundary-query-source';
28
+ } from './boundary-query-source.js';
29
29
 
30
- export {boundaryTableSource} from './boundary-table-source';
30
+ export {boundaryTableSource} from './boundary-table-source.js';
31
31
  export type {
32
32
  BoundaryTableSourceOptions,
33
33
  BoundaryTableSourceResponse,
34
- } from './boundary-table-source';
34
+ } from './boundary-table-source.js';
35
35
 
36
- export {h3QuerySource} from './h3-query-source';
36
+ export {h3QuerySource} from './h3-query-source.js';
37
37
  export type {
38
38
  H3QuerySourceOptions,
39
39
  H3QuerySourceResponse,
40
- } from './h3-query-source';
40
+ } from './h3-query-source.js';
41
41
 
42
- export {h3TableSource} from './h3-table-source';
42
+ export {h3TableSource} from './h3-table-source.js';
43
43
  export type {
44
44
  H3TableSourceOptions,
45
45
  H3TableSourceResponse,
46
- } from './h3-table-source';
46
+ } from './h3-table-source.js';
47
47
 
48
- export {h3TilesetSource} from './h3-tileset-source';
48
+ export {h3TilesetSource} from './h3-tileset-source.js';
49
49
  export type {
50
50
  H3TilesetSourceOptions,
51
51
  H3TilesetSourceResponse,
52
- } from './h3-tileset-source';
52
+ } from './h3-tileset-source.js';
53
53
 
54
- export {rasterSource} from './raster-source';
55
- export type {RasterSourceOptions} from './raster-source';
54
+ export {rasterSource} from './raster-source.js';
55
+ export type {RasterSourceOptions} from './raster-source.js';
56
56
 
57
- export {quadbinQuerySource} from './quadbin-query-source';
57
+ export {quadbinQuerySource} from './quadbin-query-source.js';
58
58
  export type {
59
59
  QuadbinQuerySourceOptions,
60
60
  QuadbinQuerySourceResponse,
61
- } from './quadbin-query-source';
61
+ } from './quadbin-query-source.js';
62
62
 
63
- export {quadbinTableSource} from './quadbin-table-source';
63
+ export {quadbinTableSource} from './quadbin-table-source.js';
64
64
  export type {
65
65
  QuadbinTableSourceOptions,
66
66
  QuadbinTableSourceResponse,
67
- } from './quadbin-table-source';
67
+ } from './quadbin-table-source.js';
68
68
 
69
- export {quadbinTilesetSource} from './quadbin-tileset-source';
69
+ export {quadbinTilesetSource} from './quadbin-tileset-source.js';
70
70
  export type {
71
71
  QuadbinTilesetSourceOptions,
72
72
  QuadbinTilesetSourceResponse,
73
- } from './quadbin-tileset-source';
73
+ } from './quadbin-tileset-source.js';
74
74
 
75
- export {vectorQuerySource} from './vector-query-source';
75
+ export {vectorQuerySource} from './vector-query-source.js';
76
76
  export type {
77
77
  VectorQuerySourceOptions,
78
78
  VectorQuerySourceResponse,
79
- } from './vector-query-source';
79
+ } from './vector-query-source.js';
80
80
 
81
- export {vectorTableSource} from './vector-table-source';
81
+ export {vectorTableSource} from './vector-table-source.js';
82
82
  export type {
83
83
  VectorTableSourceOptions,
84
84
  VectorTableSourceResponse,
85
- } from './vector-table-source';
85
+ } from './vector-table-source.js';
86
86
 
87
- export {vectorTilesetSource} from './vector-tileset-source';
87
+ export {vectorTilesetSource} from './vector-tileset-source.js';
88
88
  export type {
89
89
  VectorTilesetSourceOptions,
90
90
  VectorTilesetSourceResponse,
91
- } from './vector-tileset-source';
91
+ } from './vector-tileset-source.js';
@@ -2,10 +2,12 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- /* eslint-disable camelcase */
6
- import {DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN} from '../constants-internal';
7
- import {WidgetQuerySource, WidgetQuerySourceResult} from '../widget-sources';
8
- import {baseSource} from './base-source';
5
+ import {DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN} from '../constants-internal.js';
6
+ import {
7
+ WidgetQuerySource,
8
+ WidgetQuerySourceResult,
9
+ } from '../widget-sources/index.js';
10
+ import {baseSource} from './base-source.js';
9
11
  import type {
10
12
  AggregationOptions,
11
13
  FilterOptions,
@@ -13,7 +15,7 @@ import type {
13
15
  SourceOptions,
14
16
  SpatialDataType,
15
17
  TilejsonResult,
16
- } from './types';
18
+ } from './types.js';
17
19
 
18
20
  export type QuadbinQuerySourceOptions = SourceOptions &
19
21
  QuerySourceOptions &
@@ -2,10 +2,12 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- /* eslint-disable camelcase */
6
- import {DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN} from '../constants-internal';
7
- import {WidgetTableSource, WidgetTableSourceResult} from '../widget-sources';
8
- import {baseSource} from './base-source';
5
+ import {DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN} from '../constants-internal.js';
6
+ import {
7
+ WidgetTableSource,
8
+ WidgetTableSourceResult,
9
+ } from '../widget-sources/index.js';
10
+ import {baseSource} from './base-source.js';
9
11
  import type {
10
12
  AggregationOptions,
11
13
  FilterOptions,
@@ -13,7 +15,7 @@ import type {
13
15
  SpatialDataType,
14
16
  TableSourceOptions,
15
17
  TilejsonResult,
16
- } from './types';
18
+ } from './types.js';
17
19
 
18
20
  export type QuadbinTableSourceOptions = SourceOptions &
19
21
  TableSourceOptions &
@@ -2,17 +2,17 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- import {getTileFormat} from '../utils/getTileFormat';
5
+ import {getTileFormat} from '../utils/getTileFormat.js';
6
6
  import {
7
7
  WidgetTilesetSource,
8
8
  WidgetTilesetSourceResult,
9
- } from '../widget-sources';
10
- import {baseSource} from './base-source';
9
+ } from '../widget-sources/index.js';
10
+ import {baseSource} from './base-source.js';
11
11
  import type {
12
12
  SourceOptions,
13
13
  TilejsonResult,
14
14
  TilesetSourceOptions,
15
- } from './types';
15
+ } from './types.js';
16
16
 
17
17
  export type QuadbinTilesetSourceOptions = SourceOptions & TilesetSourceOptions;
18
18
  type UrlParameters = {name: string};
@@ -2,15 +2,19 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- import {getTileFormat} from '../utils/getTileFormat';
6
- import {WidgetRasterSource, WidgetRasterSourceResult} from '../widget-sources';
7
- import {baseSource} from './base-source';
5
+ import {baseSource} from './base-source.js';
6
+ import {getTileFormat} from '../utils/getTileFormat.js';
7
+ import {
8
+ WidgetRasterSource,
9
+ WidgetRasterSourceResult,
10
+ } from '../widget-sources/index.js';
11
+
8
12
  import type {
9
13
  FilterOptions,
10
14
  SourceOptions,
11
15
  TilejsonResult,
12
16
  TilesetSourceOptions,
13
- } from './types';
17
+ } from './types.js';
14
18
 
15
19
  export type RasterSourceOptions = SourceOptions &
16
20
  TilesetSourceOptions &
@@ -3,8 +3,8 @@
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
5
  import type {Feature} from 'geojson';
6
- import {Filters, Format, QueryParameters} from '../types';
7
- import {MapInstantiation} from '../types-internal';
6
+ import {Filters, Format, QueryParameters} from '../types.js';
7
+ import {MapInstantiation} from '../types-internal.js';
8
8
 
9
9
  export type SourceRequiredOptions = {
10
10
  /** Carto platform access token. */
@@ -208,7 +208,7 @@ export type SpatialDataType = 'geo' | 'h3' | 'quadbin';
208
208
  * Strategy used for covering spatial filter geometry with spatial indexes.
209
209
  * See https://docs.carto.com/data-and-analysis/analytics-toolbox-for-bigquery/sql-reference/quadbin#quadbin_polyfill_mode
210
210
  * or https://docs.carto.com/data-and-analysis/analytics-toolbox-for-bigquery/sql-reference/h3#h3_polyfill_mode for more information.
211
- * @internalRemarks Source: cloud-native maps-api
211
+ * @privateRemarks Source: cloud-native maps-api
212
212
  * */
213
213
  export type SpatialFilterPolyfillMode = 'center' | 'intersects' | 'contains';
214
214
 
@@ -2,7 +2,6 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- /* eslint-disable camelcase */
6
5
  import {
7
6
  DEFAULT_GEO_COLUMN,
8
7
  DEFAULT_TILE_RESOLUTION,
@@ -11,7 +10,7 @@ import {
11
10
  WidgetQuerySource,
12
11
  WidgetQuerySourceResult,
13
12
  } from '../widget-sources/index.js';
14
- import {baseSource} from './base-source';
13
+ import {baseSource} from './base-source.js';
15
14
  import type {
16
15
  FilterOptions,
17
16
  SourceOptions,
@@ -19,7 +18,7 @@ import type {
19
18
  SpatialDataType,
20
19
  TilejsonResult,
21
20
  ColumnsOption,
22
- } from './types';
21
+ } from './types.js';
23
22
 
24
23
  export type VectorQuerySourceOptions = SourceOptions &
25
24
  QuerySourceOptions &
@@ -2,7 +2,6 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- /* eslint-disable camelcase */
6
5
  import {
7
6
  DEFAULT_GEO_COLUMN,
8
7
  DEFAULT_TILE_RESOLUTION,
@@ -11,7 +10,7 @@ import {
11
10
  WidgetTableSource,
12
11
  WidgetTableSourceResult,
13
12
  } from '../widget-sources/index.js';
14
- import {baseSource} from './base-source';
13
+ import {baseSource} from './base-source.js';
15
14
  import type {
16
15
  FilterOptions,
17
16
  ColumnsOption,
@@ -19,7 +18,7 @@ import type {
19
18
  SpatialDataType,
20
19
  TableSourceOptions,
21
20
  TilejsonResult,
22
- } from './types';
21
+ } from './types.js';
23
22
 
24
23
  export type VectorTableSourceOptions = SourceOptions &
25
24
  TableSourceOptions &
@@ -2,18 +2,18 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- import {DEFAULT_GEO_COLUMN} from '../constants-internal';
6
- import {getTileFormat} from '../utils/getTileFormat';
5
+ import {DEFAULT_GEO_COLUMN} from '../constants-internal.js';
6
+ import {getTileFormat} from '../utils/getTileFormat.js';
7
7
  import {
8
8
  WidgetTilesetSource,
9
9
  WidgetTilesetSourceResult,
10
- } from '../widget-sources';
11
- import {baseSource} from './base-source';
10
+ } from '../widget-sources/index.js';
11
+ import {baseSource} from './base-source.js';
12
12
  import type {
13
13
  SourceOptions,
14
14
  TilesetSourceOptions,
15
15
  TilejsonResult,
16
- } from './types';
16
+ } from './types.js';
17
17
 
18
18
  export type VectorTilesetSourceOptions = SourceOptions & TilesetSourceOptions;
19
19
  type UrlParameters = {name: string};
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  DEFAULT_AGGREGATION_RES_LEVEL_H3,
3
3
  DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN,
4
- } from './constants-internal';
5
- import type {ModelSource} from './models/model';
6
- import type {AggregationOptions} from './sources/types';
7
- import type {ViewState} from './widget-sources';
4
+ } from './constants-internal.js';
5
+ import type {ModelSource} from './models/model.js';
6
+ import type {AggregationOptions} from './sources/types.js';
7
+ import type {ViewState} from './widget-sources/index.js';
8
8
 
9
9
  const DEFAULT_TILE_SIZE = 512;
10
10
  const QUADBIN_ZOOM_MAX_OFFSET = 4;
@@ -2,7 +2,7 @@
2
2
  * COMMON
3
3
  */
4
4
 
5
- import {Format} from './types';
5
+ import {Format} from './types.js';
6
6
 
7
7
  /** @internal */
8
8
  export type $TODO = any;
@@ -15,7 +15,7 @@ export type $IntentionalAny = any;
15
15
  */
16
16
 
17
17
  /**
18
- * @internalRemarks Source: @deck.gl/carto
18
+ * @privateRemarks Source: @deck.gl/carto
19
19
  * @internal
20
20
  */
21
21
  export enum SchemaFieldType {
@@ -31,7 +31,7 @@ export enum SchemaFieldType {
31
31
  }
32
32
 
33
33
  /**
34
- * @internalRemarks Source: @deck.gl/carto
34
+ * @privateRemarks Source: @deck.gl/carto
35
35
  * @internal
36
36
  */
37
37
  export interface SchemaField {
@@ -40,7 +40,7 @@ export interface SchemaField {
40
40
  }
41
41
 
42
42
  /**
43
- * @internalRemarks Source: @deck.gl/carto
43
+ * @privateRemarks Source: @deck.gl/carto
44
44
  * @internal
45
45
  */
46
46
  export interface MapInstantiation extends MapInstantiationFormats {
@@ -50,7 +50,7 @@ export interface MapInstantiation extends MapInstantiationFormats {
50
50
  }
51
51
 
52
52
  /**
53
- * @internalRemarks Source: @deck.gl/carto
53
+ * @privateRemarks Source: @deck.gl/carto
54
54
  * @internal
55
55
  */
56
56
  type MapInstantiationFormats = Record<
package/src/types.ts CHANGED
@@ -6,10 +6,10 @@ import type {BinaryFeature, BinaryFeatureCollection} from '@loaders.gl/schema';
6
6
  * MAPS AND TILES
7
7
  */
8
8
 
9
- /** @internalRemarks Source: @deck.gl/carto */
9
+ /** @privateRemarks Source: @deck.gl/carto */
10
10
  export type Format = 'json' | 'geojson' | 'tilejson';
11
11
 
12
- /** @internalRemarks Source: @carto/constants, @deck.gl/carto */
12
+ /** @privateRemarks Source: @carto/constants, @deck.gl/carto */
13
13
  export type MapType = 'boundary' | 'query' | 'table' | 'tileset' | 'raster';
14
14
 
15
15
  /**
@@ -23,7 +23,7 @@ export type Viewport = [number, number, number, number];
23
23
  * required for local widget calculations. Deeper dependencies on deck.gl
24
24
  * APIs should be minimized within this library: @deck.gl/carto depends
25
25
  * on the API client, not the other way around.
26
- * @internalRemarks Source: @deck.gl/geo-layers
26
+ * @privateRemarks Source: @deck.gl/geo-layers
27
27
  */
28
28
  export type Tile = {
29
29
  index: {x: number; y: number; z: number};
@@ -46,7 +46,7 @@ export type RasterTile = Tile & {
46
46
  data?: Raster;
47
47
  };
48
48
 
49
- /** @internalRemarks Source: @deck.gl/carto */
49
+ /** @privateRemarks Source: @deck.gl/carto */
50
50
  export type Raster = {
51
51
  blockSize: number;
52
52
  cells: {
@@ -62,8 +62,8 @@ export type Raster = {
62
62
  /**
63
63
  * Enum for the different types of aggregations available for widgets.
64
64
  *
65
- * @internalRemarks Source: @carto/constants
66
- * @internalRemarks Converted from enum to type union, for improved declarative API.
65
+ * @privateRemarks Source: @carto/constants
66
+ * @privateRemarks Converted from enum to type union, for improved declarative API.
67
67
  */
68
68
  export type AggregationType =
69
69
  | 'count'
@@ -77,15 +77,15 @@ export type AggregationType =
77
77
  * FILTERS
78
78
  */
79
79
 
80
- /** @internalRemarks Source: @carto/react-api */
80
+ /** @privateRemarks Source: @carto/react-api */
81
81
  export type SpatialFilter = Polygon | MultiPolygon;
82
82
 
83
- /** @internalRemarks Source: @deck.gl/carto */
83
+ /** @privateRemarks Source: @deck.gl/carto */
84
84
  export interface Filters {
85
85
  [column: string]: Filter;
86
86
  }
87
87
 
88
- /** @internalRemarks Source: @carto/react-api, @deck.gl/carto */
88
+ /** @privateRemarks Source: @carto/react-api, @deck.gl/carto */
89
89
  export interface Filter {
90
90
  [FilterType.IN]?: {owner?: string; values: number[] | string[]};
91
91
  /** [a, b] both are included. */
@@ -100,7 +100,7 @@ export interface Filter {
100
100
  };
101
101
  }
102
102
 
103
- /** @internalRemarks Source: @carto/react-core */
103
+ /** @privateRemarks Source: @carto/react-core */
104
104
  export type FilterLogicalOperator = 'and' | 'or';
105
105
 
106
106
  /**
@@ -126,7 +126,7 @@ export type StringSearchOptions = {
126
126
  /**
127
127
  * Defines a step size increment for use with {@link TimeSeriesRequestOptions}.
128
128
  *
129
- * @internalRemarks Source: @carto/react-core
129
+ * @privateRemarks Source: @carto/react-core
130
130
  */
131
131
  export type GroupDateType =
132
132
  | 'year'
@@ -148,7 +148,7 @@ export type SortColumnType = 'number' | 'string' | 'date';
148
148
  * SQL QUERY PARAMETERS
149
149
  */
150
150
 
151
- /** @internalRemarks Source: @deck.gl/carto */
151
+ /** @privateRemarks Source: @deck.gl/carto */
152
152
  export type QueryParameterValue =
153
153
  | string
154
154
  | number
@@ -156,11 +156,11 @@ export type QueryParameterValue =
156
156
  | Array<QueryParameterValue>
157
157
  | object;
158
158
 
159
- /** @internalRemarks Source: @deck.gl/carto */
159
+ /** @privateRemarks Source: @deck.gl/carto */
160
160
  export type NamedQueryParameter = Record<string, QueryParameterValue>;
161
161
 
162
- /** @internalRemarks Source: @deck.gl/carto */
162
+ /** @privateRemarks Source: @deck.gl/carto */
163
163
  export type PositionalQueryParameter = QueryParameterValue[];
164
164
 
165
- /** @internalRemarks Source: @deck.gl/carto */
165
+ /** @privateRemarks Source: @deck.gl/carto */
166
166
  export type QueryParameters = NamedQueryParameter | PositionalQueryParameter;
@@ -1,4 +1,4 @@
1
- import {FilterInterval, FilterIntervalComplete} from '../types';
1
+ import {FilterInterval, FilterIntervalComplete} from '../types.js';
2
2
 
3
3
  export function makeIntervalComplete(
4
4
  intervals: FilterInterval[]
package/src/utils.ts CHANGED
@@ -39,7 +39,7 @@ type Row<T> = Record<string, T> | Record<string, T>[] | T[] | T;
39
39
  * Due to each data warehouse having its own behavior with columns,
40
40
  * we need to normalize them and transform every key to lowercase.
41
41
  *
42
- * @internalRemarks Source: @carto/react-widgets
42
+ * @privateRemarks Source: @carto/react-widgets
43
43
  * @internal
44
44
  */
45
45
  export function normalizeObjectKeys<T, R extends Row<T>>(el: R): R {
@@ -59,7 +59,7 @@ export function normalizeObjectKeys<T, R extends Row<T>>(el: R): R {
59
59
  ) as R;
60
60
  }
61
61
 
62
- /** @internalRemarks Source: @carto/react-core */
62
+ /** @privateRemarks Source: @carto/react-core */
63
63
  export function assert(condition: unknown, message: string): asserts condition {
64
64
  if (!condition) {
65
65
  throw new Error(message);
@@ -67,7 +67,7 @@ export function assert(condition: unknown, message: string): asserts condition {
67
67
  }
68
68
 
69
69
  /**
70
- * @internalRemarks Source: @carto/react-core
70
+ * @privateRemarks Source: @carto/react-core
71
71
  * @internal
72
72
  */
73
73
  export class InvalidColumnError extends Error {
@@ -1,11 +1,11 @@
1
- import {SpatialFilterPolyfillMode, TileResolution} from '../sources/types';
1
+ import {SpatialFilterPolyfillMode, TileResolution} from '../sources/types.js';
2
2
  import {
3
+ Filters,
3
4
  GroupDateType,
4
5
  SortColumnType,
5
6
  SortDirection,
6
7
  SpatialFilter,
7
- } from '../types';
8
- import type {WidgetRemoteSource} from './widget-remote-source';
8
+ } from '../types.js';
9
9
 
10
10
  /******************************************************************************
11
11
  * WIDGET API REQUESTS
@@ -24,6 +24,8 @@ interface BaseRequestOptions {
24
24
  /** Required for table- and query-based spatial index sources (H3, Quadbin). */
25
25
  spatialIndexReferenceViewState?: ViewState;
26
26
  abortController?: AbortController;
27
+ /** Overrides source filters, if any. */
28
+ filters?: Filters;
27
29
  filterOwner?: string;
28
30
  }
29
31