@carto/api-client 0.4.0-alpha.1 → 0.4.0-alpha.3
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/build/api-client.cjs +79 -141
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.modern.js +69 -106
- package/build/api-client.modern.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/sources/h3-query-source.d.ts +2 -1
- package/build/sources/h3-table-source.d.ts +2 -1
- package/build/sources/quadbin-query-source.d.ts +2 -1
- package/build/sources/quadbin-table-source.d.ts +2 -1
- package/build/sources/vector-query-source.d.ts +2 -1
- package/build/sources/vector-table-source.d.ts +2 -1
- package/build/widget-sources/index.d.ts +0 -1
- package/build/widget-sources/widget-query-source.d.ts +3 -0
- package/build/widget-sources/widget-table-source.d.ts +3 -0
- package/package.json +2 -2
- package/src/api/request-with-parameters.ts +1 -1
- package/src/index.ts +17 -7
- package/src/sources/h3-query-source.ts +8 -6
- package/src/sources/h3-table-source.ts +8 -6
- package/src/sources/quadbin-query-source.ts +8 -6
- package/src/sources/quadbin-table-source.ts +8 -6
- package/src/sources/vector-query-source.ts +11 -6
- package/src/sources/vector-table-source.ts +11 -6
- package/src/widget-sources/index.ts +0 -1
- package/src/widget-sources/widget-query-source.ts +2 -0
- package/src/widget-sources/widget-table-source.ts +2 -0
- package/build/widget-sources/wrappers.d.ts +0 -48
- package/src/widget-sources/wrappers.ts +0 -120
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WidgetTableSourceResult } from '../widget-sources/index.js';
|
|
1
2
|
import type { FilterOptions, ColumnsOption, SourceOptions, TableSourceOptions, TilejsonResult } from './types';
|
|
2
3
|
export type VectorTableSourceOptions = SourceOptions & TableSourceOptions & FilterOptions & ColumnsOption;
|
|
3
|
-
export declare const vectorTableSource: (options: VectorTableSourceOptions) => Promise<TilejsonResult>;
|
|
4
|
+
export declare const vectorTableSource: (options: VectorTableSourceOptions) => Promise<TilejsonResult & WidgetTableSourceResult>;
|
|
@@ -2,6 +2,9 @@ import { H3QuerySourceOptions, QuadbinQuerySourceOptions, VectorQuerySourceOptio
|
|
|
2
2
|
import { WidgetBaseSource, WidgetBaseSourceProps } from './widget-base-source.js';
|
|
3
3
|
import { ModelSource } from '../models/model.js';
|
|
4
4
|
type LayerQuerySourceOptions = Omit<VectorQuerySourceOptions, 'filters'> | Omit<H3QuerySourceOptions, 'filters'> | Omit<QuadbinQuerySourceOptions, 'filters'>;
|
|
5
|
+
export type WidgetQuerySourceResult = {
|
|
6
|
+
widgetSource: WidgetQuerySource;
|
|
7
|
+
};
|
|
5
8
|
/**
|
|
6
9
|
* Source for Widget API requests on a data source defined by a SQL query.
|
|
7
10
|
*
|
|
@@ -2,6 +2,9 @@ import { H3TableSourceOptions, QuadbinTableSourceOptions, VectorTableSourceOptio
|
|
|
2
2
|
import { WidgetBaseSource, WidgetBaseSourceProps } from './widget-base-source.js';
|
|
3
3
|
import { ModelSource } from '../models/model.js';
|
|
4
4
|
type LayerTableSourceOptions = Omit<VectorTableSourceOptions, 'filters'> | Omit<H3TableSourceOptions, 'filters'> | Omit<QuadbinTableSourceOptions, 'filters'>;
|
|
5
|
+
export type WidgetTableSourceResult = {
|
|
6
|
+
widgetSource: WidgetTableSource;
|
|
7
|
+
};
|
|
5
8
|
/**
|
|
6
9
|
* Source for Widget API requests on a data source defined as a table.
|
|
7
10
|
*
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"repository": "github:CartoDB/carto-api-client",
|
|
5
5
|
"author": "Don McCurdy <donmccurdy@carto.com>",
|
|
6
6
|
"packageManager": "yarn@4.3.1",
|
|
7
|
-
"version": "0.4.0-alpha.
|
|
7
|
+
"version": "0.4.0-alpha.3",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dev": "concurrently \"yarn build:watch\" \"vite --config examples/vite.config.ts --open\"",
|
|
35
35
|
"test": "vitest run --typecheck",
|
|
36
36
|
"test:watch": "vitest watch --typecheck",
|
|
37
|
-
"coverage": "vitest run --coverage",
|
|
37
|
+
"coverage": "vitest run --coverage.enabled --coverage.all false",
|
|
38
38
|
"lint": "prettier \"**/*.{cjs,html,js,json,md,ts}\" --ignore-path ./.eslintignore --check",
|
|
39
39
|
"format": "prettier \"**/*.{cjs,html,js,json,md,ts}\" --ignore-path ./.eslintignore --write",
|
|
40
40
|
"clean": "rimraf build/*",
|
|
@@ -32,7 +32,7 @@ export async function requestWithParameters<T = any>({
|
|
|
32
32
|
// user-provided parameters.
|
|
33
33
|
parameters = {
|
|
34
34
|
v: V3_MINOR_VERSION,
|
|
35
|
-
|
|
35
|
+
client: DEFAULT_CLIENT,
|
|
36
36
|
...(typeof deck !== 'undefined' &&
|
|
37
37
|
deck.VERSION && {deckglVersion: deck.VERSION}),
|
|
38
38
|
...parameters,
|
package/src/index.ts
CHANGED
|
@@ -17,27 +17,37 @@ export {
|
|
|
17
17
|
} from './api/index.js';
|
|
18
18
|
|
|
19
19
|
export {
|
|
20
|
+
BoundaryQuerySourceOptions,
|
|
21
|
+
BoundaryTableSourceOptions,
|
|
20
22
|
GeojsonResult,
|
|
23
|
+
H3QuerySourceOptions,
|
|
24
|
+
H3TableSourceOptions,
|
|
25
|
+
H3TilesetSourceOptions,
|
|
21
26
|
JsonResult,
|
|
27
|
+
QuadbinQuerySourceOptions,
|
|
28
|
+
QuadbinTableSourceOptions,
|
|
29
|
+
QuadbinTilesetSourceOptions,
|
|
22
30
|
QueryResult,
|
|
23
31
|
QuerySourceOptions,
|
|
32
|
+
RasterSourceOptions,
|
|
24
33
|
SOURCE_DEFAULTS,
|
|
25
34
|
SourceOptions,
|
|
26
35
|
TableSourceOptions,
|
|
27
36
|
TilejsonResult,
|
|
28
37
|
TilesetSourceOptions,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
BoundaryQuerySourceOptions,
|
|
32
|
-
BoundaryTableSourceOptions,
|
|
33
|
-
H3TilesetSourceOptions,
|
|
34
|
-
QuadbinTilesetSourceOptions,
|
|
35
|
-
RasterSourceOptions,
|
|
38
|
+
VectorQuerySourceOptions,
|
|
39
|
+
VectorTableSourceOptions,
|
|
36
40
|
VectorTilesetSourceOptions,
|
|
37
41
|
boundaryQuerySource,
|
|
38
42
|
boundaryTableSource,
|
|
43
|
+
h3QuerySource,
|
|
44
|
+
h3TableSource,
|
|
39
45
|
h3TilesetSource,
|
|
46
|
+
quadbinQuerySource,
|
|
47
|
+
quadbinTableSource,
|
|
40
48
|
quadbinTilesetSource,
|
|
41
49
|
rasterSource,
|
|
50
|
+
vectorQuerySource,
|
|
51
|
+
vectorTableSource,
|
|
42
52
|
vectorTilesetSource,
|
|
43
53
|
} from './sources/index.js';
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/* eslint-disable camelcase */
|
|
6
6
|
import {DEFAULT_AGGREGATION_RES_LEVEL_H3} from '../constants-internal';
|
|
7
|
+
import {WidgetQuerySource, WidgetQuerySourceResult} from '../widget-sources';
|
|
7
8
|
import {baseSource} from './base-source';
|
|
8
9
|
import type {
|
|
9
10
|
AggregationOptions,
|
|
@@ -30,7 +31,7 @@ type UrlParameters = {
|
|
|
30
31
|
|
|
31
32
|
export const h3QuerySource = async function (
|
|
32
33
|
options: H3QuerySourceOptions
|
|
33
|
-
): Promise<TilejsonResult> {
|
|
34
|
+
): Promise<TilejsonResult & WidgetQuerySourceResult> {
|
|
34
35
|
const {
|
|
35
36
|
aggregationExp,
|
|
36
37
|
aggregationResLevel = DEFAULT_AGGREGATION_RES_LEVEL_H3,
|
|
@@ -55,9 +56,10 @@ export const h3QuerySource = async function (
|
|
|
55
56
|
if (filters) {
|
|
56
57
|
urlParameters.filters = filters;
|
|
57
58
|
}
|
|
58
|
-
return baseSource<UrlParameters>(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
return baseSource<UrlParameters>('query', options, urlParameters).then(
|
|
60
|
+
(result) => ({
|
|
61
|
+
...(result as TilejsonResult),
|
|
62
|
+
widgetSource: new WidgetQuerySource(options),
|
|
63
|
+
})
|
|
64
|
+
);
|
|
63
65
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/* eslint-disable camelcase */
|
|
6
6
|
import {DEFAULT_AGGREGATION_RES_LEVEL_H3} from '../constants-internal';
|
|
7
|
+
import {WidgetTableSource, WidgetTableSourceResult} from '../widget-sources';
|
|
7
8
|
import {baseSource} from './base-source';
|
|
8
9
|
import type {
|
|
9
10
|
AggregationOptions,
|
|
@@ -30,7 +31,7 @@ type UrlParameters = {
|
|
|
30
31
|
|
|
31
32
|
export const h3TableSource = async function (
|
|
32
33
|
options: H3TableSourceOptions
|
|
33
|
-
): Promise<TilejsonResult> {
|
|
34
|
+
): Promise<TilejsonResult & WidgetTableSourceResult> {
|
|
34
35
|
const {
|
|
35
36
|
aggregationExp,
|
|
36
37
|
aggregationResLevel = DEFAULT_AGGREGATION_RES_LEVEL_H3,
|
|
@@ -51,9 +52,10 @@ export const h3TableSource = async function (
|
|
|
51
52
|
if (filters) {
|
|
52
53
|
urlParameters.filters = filters;
|
|
53
54
|
}
|
|
54
|
-
return baseSource<UrlParameters>(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
return baseSource<UrlParameters>('table', options, urlParameters).then(
|
|
56
|
+
(result) => ({
|
|
57
|
+
...(result as TilejsonResult),
|
|
58
|
+
widgetSource: new WidgetTableSource(options),
|
|
59
|
+
})
|
|
60
|
+
);
|
|
59
61
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/* eslint-disable camelcase */
|
|
6
6
|
import {DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN} from '../constants-internal';
|
|
7
|
+
import {WidgetQuerySource, WidgetQuerySourceResult} from '../widget-sources';
|
|
7
8
|
import {baseSource} from './base-source';
|
|
8
9
|
import type {
|
|
9
10
|
AggregationOptions,
|
|
@@ -31,7 +32,7 @@ type UrlParameters = {
|
|
|
31
32
|
|
|
32
33
|
export const quadbinQuerySource = async function (
|
|
33
34
|
options: QuadbinQuerySourceOptions
|
|
34
|
-
): Promise<TilejsonResult> {
|
|
35
|
+
): Promise<TilejsonResult & WidgetQuerySourceResult> {
|
|
35
36
|
const {
|
|
36
37
|
aggregationExp,
|
|
37
38
|
aggregationResLevel = DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN,
|
|
@@ -56,9 +57,10 @@ export const quadbinQuerySource = async function (
|
|
|
56
57
|
if (filters) {
|
|
57
58
|
urlParameters.filters = filters;
|
|
58
59
|
}
|
|
59
|
-
return baseSource<UrlParameters>(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
return baseSource<UrlParameters>('query', options, urlParameters).then(
|
|
61
|
+
(result) => ({
|
|
62
|
+
...(result as TilejsonResult),
|
|
63
|
+
widgetSource: new WidgetQuerySource(options),
|
|
64
|
+
})
|
|
65
|
+
);
|
|
64
66
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/* eslint-disable camelcase */
|
|
6
6
|
import {DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN} from '../constants-internal';
|
|
7
|
+
import {WidgetTableSource, WidgetTableSourceResult} from '../widget-sources';
|
|
7
8
|
import {baseSource} from './base-source';
|
|
8
9
|
import type {
|
|
9
10
|
AggregationOptions,
|
|
@@ -30,7 +31,7 @@ type UrlParameters = {
|
|
|
30
31
|
|
|
31
32
|
export const quadbinTableSource = async function (
|
|
32
33
|
options: QuadbinTableSourceOptions
|
|
33
|
-
): Promise<TilejsonResult> {
|
|
34
|
+
): Promise<TilejsonResult & WidgetTableSourceResult> {
|
|
34
35
|
const {
|
|
35
36
|
aggregationExp,
|
|
36
37
|
aggregationResLevel = DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN,
|
|
@@ -52,9 +53,10 @@ export const quadbinTableSource = async function (
|
|
|
52
53
|
if (filters) {
|
|
53
54
|
urlParameters.filters = filters;
|
|
54
55
|
}
|
|
55
|
-
return baseSource<UrlParameters>(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
return baseSource<UrlParameters>('table', options, urlParameters).then(
|
|
57
|
+
(result) => ({
|
|
58
|
+
...(result as TilejsonResult),
|
|
59
|
+
widgetSource: new WidgetTableSource(options),
|
|
60
|
+
})
|
|
61
|
+
);
|
|
60
62
|
};
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
/* eslint-disable camelcase */
|
|
6
6
|
import {DEFAULT_TILE_RESOLUTION} from '../constants.js';
|
|
7
|
+
import {
|
|
8
|
+
WidgetQuerySource,
|
|
9
|
+
WidgetQuerySourceResult,
|
|
10
|
+
} from '../widget-sources/index.js';
|
|
7
11
|
import {baseSource} from './base-source';
|
|
8
12
|
import type {
|
|
9
13
|
FilterOptions,
|
|
@@ -31,7 +35,7 @@ type UrlParameters = {
|
|
|
31
35
|
|
|
32
36
|
export const vectorQuerySource = async function (
|
|
33
37
|
options: VectorQuerySourceOptions
|
|
34
|
-
): Promise<TilejsonResult> {
|
|
38
|
+
): Promise<TilejsonResult & WidgetQuerySourceResult> {
|
|
35
39
|
const {
|
|
36
40
|
columns,
|
|
37
41
|
filters,
|
|
@@ -57,9 +61,10 @@ export const vectorQuerySource = async function (
|
|
|
57
61
|
if (queryParameters) {
|
|
58
62
|
urlParameters.queryParameters = queryParameters;
|
|
59
63
|
}
|
|
60
|
-
return baseSource<UrlParameters>(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
return baseSource<UrlParameters>('query', options, urlParameters).then(
|
|
65
|
+
(result) => ({
|
|
66
|
+
...(result as TilejsonResult),
|
|
67
|
+
widgetSource: new WidgetQuerySource(options),
|
|
68
|
+
})
|
|
69
|
+
);
|
|
65
70
|
};
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
/* eslint-disable camelcase */
|
|
6
6
|
import {DEFAULT_TILE_RESOLUTION} from '../constants.js';
|
|
7
|
+
import {
|
|
8
|
+
WidgetTableSource,
|
|
9
|
+
WidgetTableSourceResult,
|
|
10
|
+
} from '../widget-sources/index.js';
|
|
7
11
|
import {baseSource} from './base-source';
|
|
8
12
|
import type {
|
|
9
13
|
FilterOptions,
|
|
@@ -29,7 +33,7 @@ type UrlParameters = {
|
|
|
29
33
|
|
|
30
34
|
export const vectorTableSource = async function (
|
|
31
35
|
options: VectorTableSourceOptions
|
|
32
|
-
): Promise<TilejsonResult> {
|
|
36
|
+
): Promise<TilejsonResult & WidgetTableSourceResult> {
|
|
33
37
|
const {
|
|
34
38
|
columns,
|
|
35
39
|
filters,
|
|
@@ -51,9 +55,10 @@ export const vectorTableSource = async function (
|
|
|
51
55
|
if (filters) {
|
|
52
56
|
urlParameters.filters = filters;
|
|
53
57
|
}
|
|
54
|
-
return baseSource<UrlParameters>(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
return baseSource<UrlParameters>('table', options, urlParameters).then(
|
|
59
|
+
(result) => ({
|
|
60
|
+
...(result as TilejsonResult),
|
|
61
|
+
widgetSource: new WidgetTableSource(options),
|
|
62
|
+
})
|
|
63
|
+
);
|
|
59
64
|
};
|
|
@@ -11,6 +11,8 @@ type LayerQuerySourceOptions =
|
|
|
11
11
|
| Omit<H3QuerySourceOptions, 'filters'>
|
|
12
12
|
| Omit<QuadbinQuerySourceOptions, 'filters'>;
|
|
13
13
|
|
|
14
|
+
export type WidgetQuerySourceResult = {widgetSource: WidgetQuerySource};
|
|
15
|
+
|
|
14
16
|
/**
|
|
15
17
|
* Source for Widget API requests on a data source defined by a SQL query.
|
|
16
18
|
*
|
|
@@ -11,6 +11,8 @@ type LayerTableSourceOptions =
|
|
|
11
11
|
| Omit<H3TableSourceOptions, 'filters'>
|
|
12
12
|
| Omit<QuadbinTableSourceOptions, 'filters'>;
|
|
13
13
|
|
|
14
|
+
export type WidgetTableSourceResult = {widgetSource: WidgetTableSource};
|
|
15
|
+
|
|
14
16
|
/**
|
|
15
17
|
* Source for Widget API requests on a data source defined as a table.
|
|
16
18
|
*
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { h3TableSource as _h3TableSource, h3QuerySource as _h3QuerySource, vectorTableSource as _vectorTableSource, vectorQuerySource as _vectorQuerySource, quadbinTableSource as _quadbinTableSource, quadbinQuerySource as _quadbinQuerySource, VectorTableSourceOptions as _VectorTableSourceOptions, VectorQuerySourceOptions as _VectorQuerySourceOptions, H3TableSourceOptions as _H3TableSourceOptions, H3QuerySourceOptions as _H3QuerySourceOptions, QuadbinTableSourceOptions as _QuadbinTableSourceOptions, QuadbinQuerySourceOptions as _QuadbinQuerySourceOptions } from '../sources/index.js';
|
|
2
|
-
import { WidgetBaseSourceProps } from './widget-base-source.js';
|
|
3
|
-
import { WidgetQuerySource } from './widget-query-source.js';
|
|
4
|
-
import { WidgetTableSource } from './widget-table-source.js';
|
|
5
|
-
type WrappedSourceOptions<T> = Omit<T, 'filters'> & WidgetBaseSourceProps;
|
|
6
|
-
/******************************************************************************
|
|
7
|
-
* RESPONSE OBJECTS
|
|
8
|
-
*/
|
|
9
|
-
type WidgetTableSourceResponse = {
|
|
10
|
-
widgetSource: WidgetTableSource;
|
|
11
|
-
};
|
|
12
|
-
type WidgetQuerySourceResponse = {
|
|
13
|
-
widgetSource: WidgetQuerySource;
|
|
14
|
-
};
|
|
15
|
-
export type VectorTableSourceResponse = WidgetTableSourceResponse & Awaited<ReturnType<typeof _vectorTableSource>>;
|
|
16
|
-
export type VectorQuerySourceResponse = WidgetQuerySourceResponse & Awaited<ReturnType<typeof _vectorQuerySource>>;
|
|
17
|
-
export type H3TableSourceResponse = WidgetTableSourceResponse & Awaited<ReturnType<typeof _h3TableSource>>;
|
|
18
|
-
export type H3QuerySourceResponse = WidgetQuerySourceResponse & Awaited<ReturnType<typeof _h3QuerySource>>;
|
|
19
|
-
export type QuadbinTableSourceResponse = WidgetTableSourceResponse & Awaited<ReturnType<typeof _quadbinTableSource>>;
|
|
20
|
-
export type QuadbinQuerySourceResponse = WidgetQuerySourceResponse & Awaited<ReturnType<typeof _quadbinQuerySource>>;
|
|
21
|
-
/******************************************************************************
|
|
22
|
-
* VECTOR SOURCES
|
|
23
|
-
*/
|
|
24
|
-
export type VectorTableSourceOptions = WrappedSourceOptions<_VectorTableSourceOptions>;
|
|
25
|
-
export type VectorQuerySourceOptions = WrappedSourceOptions<_VectorQuerySourceOptions>;
|
|
26
|
-
/** Wrapper adding Widget API support to [vectorTableSource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
27
|
-
export declare function vectorTableSource(props: VectorTableSourceOptions): Promise<VectorTableSourceResponse>;
|
|
28
|
-
/** Wrapper adding Widget API support to [vectorQuerySource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
29
|
-
export declare function vectorQuerySource(props: VectorQuerySourceOptions): Promise<VectorQuerySourceResponse>;
|
|
30
|
-
/******************************************************************************
|
|
31
|
-
* H3 SOURCES
|
|
32
|
-
*/
|
|
33
|
-
export type H3TableSourceOptions = WrappedSourceOptions<_H3TableSourceOptions>;
|
|
34
|
-
export type H3QuerySourceOptions = WrappedSourceOptions<_H3QuerySourceOptions>;
|
|
35
|
-
/** Wrapper adding Widget API support to [h3TableSource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
36
|
-
export declare function h3TableSource(props: H3TableSourceOptions): Promise<H3TableSourceResponse>;
|
|
37
|
-
/** Wrapper adding Widget API support to [h3QuerySource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
38
|
-
export declare function h3QuerySource(props: H3QuerySourceOptions): Promise<H3QuerySourceResponse>;
|
|
39
|
-
/******************************************************************************
|
|
40
|
-
* QUADBIN SOURCES
|
|
41
|
-
*/
|
|
42
|
-
export type QuadbinTableSourceOptions = WrappedSourceOptions<_QuadbinTableSourceOptions>;
|
|
43
|
-
export type QuadbinQuerySourceOptions = WrappedSourceOptions<_QuadbinQuerySourceOptions>;
|
|
44
|
-
/** Wrapper adding Widget API support to [quadbinTableSource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
45
|
-
export declare function quadbinTableSource(props: QuadbinTableSourceOptions & WidgetBaseSourceProps): Promise<QuadbinTableSourceResponse>;
|
|
46
|
-
/** Wrapper adding Widget API support to [quadbinQuerySource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
47
|
-
export declare function quadbinQuerySource(props: QuadbinQuerySourceOptions & WidgetBaseSourceProps): Promise<QuadbinQuerySourceResponse>;
|
|
48
|
-
export {};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
h3TableSource as _h3TableSource,
|
|
3
|
-
h3QuerySource as _h3QuerySource,
|
|
4
|
-
vectorTableSource as _vectorTableSource,
|
|
5
|
-
vectorQuerySource as _vectorQuerySource,
|
|
6
|
-
quadbinTableSource as _quadbinTableSource,
|
|
7
|
-
quadbinQuerySource as _quadbinQuerySource,
|
|
8
|
-
VectorTableSourceOptions as _VectorTableSourceOptions,
|
|
9
|
-
VectorQuerySourceOptions as _VectorQuerySourceOptions,
|
|
10
|
-
H3TableSourceOptions as _H3TableSourceOptions,
|
|
11
|
-
H3QuerySourceOptions as _H3QuerySourceOptions,
|
|
12
|
-
QuadbinTableSourceOptions as _QuadbinTableSourceOptions,
|
|
13
|
-
QuadbinQuerySourceOptions as _QuadbinQuerySourceOptions,
|
|
14
|
-
} from '../sources/index.js';
|
|
15
|
-
import {WidgetBaseSourceProps} from './widget-base-source.js';
|
|
16
|
-
import {WidgetQuerySource} from './widget-query-source.js';
|
|
17
|
-
import {WidgetTableSource} from './widget-table-source.js';
|
|
18
|
-
|
|
19
|
-
type WrappedSourceOptions<T> = Omit<T, 'filters'> & WidgetBaseSourceProps;
|
|
20
|
-
|
|
21
|
-
/******************************************************************************
|
|
22
|
-
* RESPONSE OBJECTS
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
type WidgetTableSourceResponse = {widgetSource: WidgetTableSource};
|
|
26
|
-
type WidgetQuerySourceResponse = {widgetSource: WidgetQuerySource};
|
|
27
|
-
|
|
28
|
-
export type VectorTableSourceResponse = WidgetTableSourceResponse &
|
|
29
|
-
Awaited<ReturnType<typeof _vectorTableSource>>;
|
|
30
|
-
export type VectorQuerySourceResponse = WidgetQuerySourceResponse &
|
|
31
|
-
Awaited<ReturnType<typeof _vectorQuerySource>>;
|
|
32
|
-
|
|
33
|
-
export type H3TableSourceResponse = WidgetTableSourceResponse &
|
|
34
|
-
Awaited<ReturnType<typeof _h3TableSource>>;
|
|
35
|
-
export type H3QuerySourceResponse = WidgetQuerySourceResponse &
|
|
36
|
-
Awaited<ReturnType<typeof _h3QuerySource>>;
|
|
37
|
-
|
|
38
|
-
export type QuadbinTableSourceResponse = WidgetTableSourceResponse &
|
|
39
|
-
Awaited<ReturnType<typeof _quadbinTableSource>>;
|
|
40
|
-
export type QuadbinQuerySourceResponse = WidgetQuerySourceResponse &
|
|
41
|
-
Awaited<ReturnType<typeof _quadbinQuerySource>>;
|
|
42
|
-
|
|
43
|
-
/******************************************************************************
|
|
44
|
-
* VECTOR SOURCES
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
export type VectorTableSourceOptions =
|
|
48
|
-
WrappedSourceOptions<_VectorTableSourceOptions>;
|
|
49
|
-
|
|
50
|
-
export type VectorQuerySourceOptions =
|
|
51
|
-
WrappedSourceOptions<_VectorQuerySourceOptions>;
|
|
52
|
-
|
|
53
|
-
/** Wrapper adding Widget API support to [vectorTableSource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
54
|
-
export async function vectorTableSource(
|
|
55
|
-
props: VectorTableSourceOptions
|
|
56
|
-
): Promise<VectorTableSourceResponse> {
|
|
57
|
-
const response = await _vectorTableSource(props as _VectorTableSourceOptions);
|
|
58
|
-
return {...response, widgetSource: new WidgetTableSource(props)};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/** Wrapper adding Widget API support to [vectorQuerySource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
62
|
-
export async function vectorQuerySource(
|
|
63
|
-
props: VectorQuerySourceOptions
|
|
64
|
-
): Promise<VectorQuerySourceResponse> {
|
|
65
|
-
const response = await _vectorQuerySource(props as _VectorQuerySourceOptions);
|
|
66
|
-
return {...response, widgetSource: new WidgetQuerySource(props)};
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/******************************************************************************
|
|
70
|
-
* H3 SOURCES
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
|
-
export type H3TableSourceOptions = WrappedSourceOptions<_H3TableSourceOptions>;
|
|
74
|
-
export type H3QuerySourceOptions = WrappedSourceOptions<_H3QuerySourceOptions>;
|
|
75
|
-
|
|
76
|
-
/** Wrapper adding Widget API support to [h3TableSource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
77
|
-
export async function h3TableSource(
|
|
78
|
-
props: H3TableSourceOptions
|
|
79
|
-
): Promise<H3TableSourceResponse> {
|
|
80
|
-
const response = await _h3TableSource(props as _H3TableSourceOptions);
|
|
81
|
-
return {...response, widgetSource: new WidgetTableSource(props)};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/** Wrapper adding Widget API support to [h3QuerySource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
85
|
-
export async function h3QuerySource(
|
|
86
|
-
props: H3QuerySourceOptions
|
|
87
|
-
): Promise<H3QuerySourceResponse> {
|
|
88
|
-
const response = await _h3QuerySource(props as _H3QuerySourceOptions);
|
|
89
|
-
return {...response, widgetSource: new WidgetQuerySource(props)};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/******************************************************************************
|
|
93
|
-
* QUADBIN SOURCES
|
|
94
|
-
*/
|
|
95
|
-
|
|
96
|
-
export type QuadbinTableSourceOptions =
|
|
97
|
-
WrappedSourceOptions<_QuadbinTableSourceOptions>;
|
|
98
|
-
|
|
99
|
-
export type QuadbinQuerySourceOptions =
|
|
100
|
-
WrappedSourceOptions<_QuadbinQuerySourceOptions>;
|
|
101
|
-
|
|
102
|
-
/** Wrapper adding Widget API support to [quadbinTableSource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
103
|
-
export async function quadbinTableSource(
|
|
104
|
-
props: QuadbinTableSourceOptions & WidgetBaseSourceProps
|
|
105
|
-
): Promise<QuadbinTableSourceResponse> {
|
|
106
|
-
const response = await _quadbinTableSource(
|
|
107
|
-
props as _QuadbinTableSourceOptions
|
|
108
|
-
);
|
|
109
|
-
return {...response, widgetSource: new WidgetTableSource(props)};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/** Wrapper adding Widget API support to [quadbinQuerySource](https://deck.gl/docs/api-reference/carto/data-sources). */
|
|
113
|
-
export async function quadbinQuerySource(
|
|
114
|
-
props: QuadbinQuerySourceOptions & WidgetBaseSourceProps
|
|
115
|
-
): Promise<QuadbinQuerySourceResponse> {
|
|
116
|
-
const response = await _quadbinQuerySource(
|
|
117
|
-
props as _QuadbinQuerySourceOptions
|
|
118
|
-
);
|
|
119
|
-
return {...response, widgetSource: new WidgetQuerySource(props)};
|
|
120
|
-
}
|