@carto/api-client 0.4.0-alpha.1 → 0.4.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 (40) hide show
  1. package/build/api-client.cjs +106 -184
  2. package/build/api-client.cjs.map +1 -1
  3. package/build/api-client.modern.js +97 -144
  4. package/build/api-client.modern.js.map +1 -1
  5. package/build/constants-internal.d.ts +11 -3
  6. package/build/constants.d.ts +0 -18
  7. package/build/index.d.ts +1 -1
  8. package/build/models/common.d.ts +7 -2
  9. package/build/sources/h3-query-source.d.ts +2 -1
  10. package/build/sources/h3-table-source.d.ts +2 -1
  11. package/build/sources/quadbin-query-source.d.ts +2 -1
  12. package/build/sources/quadbin-table-source.d.ts +2 -1
  13. package/build/sources/vector-query-source.d.ts +2 -1
  14. package/build/sources/vector-table-source.d.ts +2 -1
  15. package/build/widget-sources/index.d.ts +0 -1
  16. package/build/widget-sources/widget-query-source.d.ts +3 -0
  17. package/build/widget-sources/widget-table-source.d.ts +3 -0
  18. package/package.json +1 -1
  19. package/src/api/request-with-parameters.ts +3 -2
  20. package/src/client.ts +2 -2
  21. package/src/constants-internal.ts +14 -3
  22. package/src/constants.ts +0 -25
  23. package/src/index.ts +17 -7
  24. package/src/models/common.ts +11 -3
  25. package/src/models/model.ts +1 -1
  26. package/src/sources/base-source.ts +3 -3
  27. package/src/sources/h3-query-source.ts +8 -6
  28. package/src/sources/h3-table-source.ts +8 -6
  29. package/src/sources/quadbin-query-source.ts +8 -6
  30. package/src/sources/quadbin-table-source.ts +8 -6
  31. package/src/sources/vector-query-source.ts +12 -7
  32. package/src/sources/vector-table-source.ts +12 -7
  33. package/src/types.ts +0 -1
  34. package/src/utils.ts +1 -2
  35. package/src/widget-sources/index.ts +0 -1
  36. package/src/widget-sources/widget-base-source.ts +2 -2
  37. package/src/widget-sources/widget-query-source.ts +2 -0
  38. package/src/widget-sources/widget-table-source.ts +2 -0
  39. package/build/widget-sources/wrappers.d.ts +0 -48
  40. package/src/widget-sources/wrappers.ts +0 -120
@@ -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
- }