@carto/api-client 0.5.19-alpha.radius-aggregation-1 → 0.5.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -2
- package/build/api-client.cjs +150 -128
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +77 -60
- package/build/api-client.d.ts +77 -60
- package/build/api-client.js +142 -123
- package/build/api-client.js.map +1 -1
- package/package.json +1 -1
- package/src/sources/index.ts +47 -14
package/build/api-client.js
CHANGED
|
@@ -6006,17 +6006,6 @@ async function baseSource(endpoint, options, urlParameters) {
|
|
|
6006
6006
|
return json;
|
|
6007
6007
|
}
|
|
6008
6008
|
|
|
6009
|
-
// src/sources/constants.ts
|
|
6010
|
-
var RasterBandColorinterp = /* @__PURE__ */ ((RasterBandColorinterp2) => {
|
|
6011
|
-
RasterBandColorinterp2["Gray"] = "gray";
|
|
6012
|
-
RasterBandColorinterp2["Red"] = "red";
|
|
6013
|
-
RasterBandColorinterp2["Green"] = "green";
|
|
6014
|
-
RasterBandColorinterp2["Blue"] = "blue";
|
|
6015
|
-
RasterBandColorinterp2["Alpha"] = "alpha";
|
|
6016
|
-
RasterBandColorinterp2["Palette"] = "palette";
|
|
6017
|
-
return RasterBandColorinterp2;
|
|
6018
|
-
})(RasterBandColorinterp || {});
|
|
6019
|
-
|
|
6020
6009
|
// src/sources/boundary-query-source.ts
|
|
6021
6010
|
var boundaryQuerySource = async function(options) {
|
|
6022
6011
|
const {
|
|
@@ -8022,28 +8011,6 @@ var h3TilesetSource = async function(options) {
|
|
|
8022
8011
|
);
|
|
8023
8012
|
};
|
|
8024
8013
|
|
|
8025
|
-
// src/sources/raster-source.ts
|
|
8026
|
-
var rasterSource = async function(options) {
|
|
8027
|
-
const { tableName, filters } = options;
|
|
8028
|
-
const urlParameters = { name: tableName };
|
|
8029
|
-
if (filters) {
|
|
8030
|
-
urlParameters.filters = filters;
|
|
8031
|
-
}
|
|
8032
|
-
return baseSource("raster", options, urlParameters).then(
|
|
8033
|
-
(result) => ({
|
|
8034
|
-
...result,
|
|
8035
|
-
widgetSource: new WidgetRasterSource({
|
|
8036
|
-
...options,
|
|
8037
|
-
tileFormat: getTileFormat(result),
|
|
8038
|
-
spatialDataColumn: "quadbin",
|
|
8039
|
-
spatialDataType: "quadbin",
|
|
8040
|
-
spatialDataBounds: result.bounds,
|
|
8041
|
-
rasterMetadata: result.raster_metadata
|
|
8042
|
-
})
|
|
8043
|
-
})
|
|
8044
|
-
);
|
|
8045
|
-
};
|
|
8046
|
-
|
|
8047
8014
|
// src/sources/quadbin-query-source.ts
|
|
8048
8015
|
var quadbinQuerySource = async function(options) {
|
|
8049
8016
|
const {
|
|
@@ -8144,103 +8111,23 @@ var quadbinTilesetSource = async function(options) {
|
|
|
8144
8111
|
);
|
|
8145
8112
|
};
|
|
8146
8113
|
|
|
8147
|
-
// src/sources/
|
|
8148
|
-
var
|
|
8149
|
-
const {
|
|
8150
|
-
|
|
8151
|
-
filters,
|
|
8152
|
-
spatialDataColumn = DEFAULT_GEO_COLUMN,
|
|
8153
|
-
sqlQuery,
|
|
8154
|
-
tileResolution = DEFAULT_TILE_RESOLUTION,
|
|
8155
|
-
queryParameters,
|
|
8156
|
-
aggregationExp
|
|
8157
|
-
} = options;
|
|
8158
|
-
const spatialDataType = "geo";
|
|
8159
|
-
const urlParameters = {
|
|
8160
|
-
spatialDataColumn,
|
|
8161
|
-
spatialDataType,
|
|
8162
|
-
tileResolution: tileResolution.toString(),
|
|
8163
|
-
q: sqlQuery
|
|
8164
|
-
};
|
|
8165
|
-
if (columns) {
|
|
8166
|
-
urlParameters.columns = columns.join(",");
|
|
8167
|
-
}
|
|
8168
|
-
if (filters) {
|
|
8169
|
-
urlParameters.filters = filters;
|
|
8170
|
-
}
|
|
8171
|
-
if (queryParameters) {
|
|
8172
|
-
urlParameters.queryParameters = queryParameters;
|
|
8173
|
-
}
|
|
8174
|
-
if (aggregationExp) {
|
|
8175
|
-
urlParameters.aggregationExp = aggregationExp;
|
|
8176
|
-
}
|
|
8177
|
-
return baseSource("query", options, urlParameters).then(
|
|
8178
|
-
(result) => ({
|
|
8179
|
-
...result,
|
|
8180
|
-
widgetSource: new WidgetQuerySource({
|
|
8181
|
-
...options,
|
|
8182
|
-
// NOTE: Parameters with default values above must be explicitly passed here.
|
|
8183
|
-
spatialDataColumn,
|
|
8184
|
-
spatialDataType,
|
|
8185
|
-
tileResolution
|
|
8186
|
-
})
|
|
8187
|
-
})
|
|
8188
|
-
);
|
|
8189
|
-
};
|
|
8190
|
-
|
|
8191
|
-
// src/sources/vector-table-source.ts
|
|
8192
|
-
var vectorTableSource = async function(options) {
|
|
8193
|
-
const {
|
|
8194
|
-
columns,
|
|
8195
|
-
filters,
|
|
8196
|
-
spatialDataColumn = DEFAULT_GEO_COLUMN,
|
|
8197
|
-
tableName,
|
|
8198
|
-
tileResolution = DEFAULT_TILE_RESOLUTION,
|
|
8199
|
-
aggregationExp
|
|
8200
|
-
} = options;
|
|
8201
|
-
const spatialDataType = "geo";
|
|
8202
|
-
const urlParameters = {
|
|
8203
|
-
name: tableName,
|
|
8204
|
-
spatialDataColumn,
|
|
8205
|
-
spatialDataType,
|
|
8206
|
-
tileResolution: tileResolution.toString()
|
|
8207
|
-
};
|
|
8208
|
-
if (columns) {
|
|
8209
|
-
urlParameters.columns = columns.join(",");
|
|
8210
|
-
}
|
|
8114
|
+
// src/sources/raster-source.ts
|
|
8115
|
+
var rasterSource = async function(options) {
|
|
8116
|
+
const { tableName, filters } = options;
|
|
8117
|
+
const urlParameters = { name: tableName };
|
|
8211
8118
|
if (filters) {
|
|
8212
8119
|
urlParameters.filters = filters;
|
|
8213
8120
|
}
|
|
8214
|
-
|
|
8215
|
-
urlParameters.aggregationExp = aggregationExp;
|
|
8216
|
-
}
|
|
8217
|
-
return baseSource("table", options, urlParameters).then(
|
|
8218
|
-
(result) => ({
|
|
8219
|
-
...result,
|
|
8220
|
-
widgetSource: new WidgetTableSource({
|
|
8221
|
-
...options,
|
|
8222
|
-
// NOTE: Parameters with default values above must be explicitly passed here.
|
|
8223
|
-
spatialDataColumn,
|
|
8224
|
-
spatialDataType,
|
|
8225
|
-
tileResolution
|
|
8226
|
-
})
|
|
8227
|
-
})
|
|
8228
|
-
);
|
|
8229
|
-
};
|
|
8230
|
-
|
|
8231
|
-
// src/sources/vector-tileset-source.ts
|
|
8232
|
-
var vectorTilesetSource = async function(options) {
|
|
8233
|
-
const { tableName, spatialDataColumn = DEFAULT_GEO_COLUMN } = options;
|
|
8234
|
-
const urlParameters = { name: tableName };
|
|
8235
|
-
return baseSource("tileset", options, urlParameters).then(
|
|
8121
|
+
return baseSource("raster", options, urlParameters).then(
|
|
8236
8122
|
(result) => ({
|
|
8237
8123
|
...result,
|
|
8238
|
-
widgetSource: new
|
|
8124
|
+
widgetSource: new WidgetRasterSource({
|
|
8239
8125
|
...options,
|
|
8240
8126
|
tileFormat: getTileFormat(result),
|
|
8241
|
-
spatialDataColumn,
|
|
8242
|
-
spatialDataType: "
|
|
8243
|
-
spatialDataBounds: result.bounds
|
|
8127
|
+
spatialDataColumn: "quadbin",
|
|
8128
|
+
spatialDataType: "quadbin",
|
|
8129
|
+
spatialDataBounds: result.bounds,
|
|
8130
|
+
rasterMetadata: result.raster_metadata
|
|
8244
8131
|
})
|
|
8245
8132
|
})
|
|
8246
8133
|
);
|
|
@@ -8342,6 +8229,137 @@ var trajectoryTableSource = async function(options) {
|
|
|
8342
8229
|
};
|
|
8343
8230
|
};
|
|
8344
8231
|
|
|
8232
|
+
// src/sources/vector-query-source.ts
|
|
8233
|
+
var vectorQuerySource = async function(options) {
|
|
8234
|
+
const {
|
|
8235
|
+
columns,
|
|
8236
|
+
filters,
|
|
8237
|
+
spatialDataColumn = DEFAULT_GEO_COLUMN,
|
|
8238
|
+
sqlQuery,
|
|
8239
|
+
tileResolution = DEFAULT_TILE_RESOLUTION,
|
|
8240
|
+
queryParameters,
|
|
8241
|
+
aggregationExp
|
|
8242
|
+
} = options;
|
|
8243
|
+
const spatialDataType = "geo";
|
|
8244
|
+
const urlParameters = {
|
|
8245
|
+
spatialDataColumn,
|
|
8246
|
+
spatialDataType,
|
|
8247
|
+
tileResolution: tileResolution.toString(),
|
|
8248
|
+
q: sqlQuery
|
|
8249
|
+
};
|
|
8250
|
+
if (columns) {
|
|
8251
|
+
urlParameters.columns = columns.join(",");
|
|
8252
|
+
}
|
|
8253
|
+
if (filters) {
|
|
8254
|
+
urlParameters.filters = filters;
|
|
8255
|
+
}
|
|
8256
|
+
if (queryParameters) {
|
|
8257
|
+
urlParameters.queryParameters = queryParameters;
|
|
8258
|
+
}
|
|
8259
|
+
if (aggregationExp) {
|
|
8260
|
+
urlParameters.aggregationExp = aggregationExp;
|
|
8261
|
+
}
|
|
8262
|
+
return baseSource("query", options, urlParameters).then(
|
|
8263
|
+
(result) => ({
|
|
8264
|
+
...result,
|
|
8265
|
+
widgetSource: new WidgetQuerySource({
|
|
8266
|
+
...options,
|
|
8267
|
+
// NOTE: Parameters with default values above must be explicitly passed here.
|
|
8268
|
+
spatialDataColumn,
|
|
8269
|
+
spatialDataType,
|
|
8270
|
+
tileResolution
|
|
8271
|
+
})
|
|
8272
|
+
})
|
|
8273
|
+
);
|
|
8274
|
+
};
|
|
8275
|
+
|
|
8276
|
+
// src/sources/vector-table-source.ts
|
|
8277
|
+
var vectorTableSource = async function(options) {
|
|
8278
|
+
const {
|
|
8279
|
+
columns,
|
|
8280
|
+
filters,
|
|
8281
|
+
spatialDataColumn = DEFAULT_GEO_COLUMN,
|
|
8282
|
+
tableName,
|
|
8283
|
+
tileResolution = DEFAULT_TILE_RESOLUTION,
|
|
8284
|
+
aggregationExp
|
|
8285
|
+
} = options;
|
|
8286
|
+
const spatialDataType = "geo";
|
|
8287
|
+
const urlParameters = {
|
|
8288
|
+
name: tableName,
|
|
8289
|
+
spatialDataColumn,
|
|
8290
|
+
spatialDataType,
|
|
8291
|
+
tileResolution: tileResolution.toString()
|
|
8292
|
+
};
|
|
8293
|
+
if (columns) {
|
|
8294
|
+
urlParameters.columns = columns.join(",");
|
|
8295
|
+
}
|
|
8296
|
+
if (filters) {
|
|
8297
|
+
urlParameters.filters = filters;
|
|
8298
|
+
}
|
|
8299
|
+
if (aggregationExp) {
|
|
8300
|
+
urlParameters.aggregationExp = aggregationExp;
|
|
8301
|
+
}
|
|
8302
|
+
return baseSource("table", options, urlParameters).then(
|
|
8303
|
+
(result) => ({
|
|
8304
|
+
...result,
|
|
8305
|
+
widgetSource: new WidgetTableSource({
|
|
8306
|
+
...options,
|
|
8307
|
+
// NOTE: Parameters with default values above must be explicitly passed here.
|
|
8308
|
+
spatialDataColumn,
|
|
8309
|
+
spatialDataType,
|
|
8310
|
+
tileResolution
|
|
8311
|
+
})
|
|
8312
|
+
})
|
|
8313
|
+
);
|
|
8314
|
+
};
|
|
8315
|
+
|
|
8316
|
+
// src/sources/vector-tileset-source.ts
|
|
8317
|
+
var vectorTilesetSource = async function(options) {
|
|
8318
|
+
const { tableName, spatialDataColumn = DEFAULT_GEO_COLUMN } = options;
|
|
8319
|
+
const urlParameters = { name: tableName };
|
|
8320
|
+
return baseSource("tileset", options, urlParameters).then(
|
|
8321
|
+
(result) => ({
|
|
8322
|
+
...result,
|
|
8323
|
+
widgetSource: new WidgetTilesetSource({
|
|
8324
|
+
...options,
|
|
8325
|
+
tileFormat: getTileFormat(result),
|
|
8326
|
+
spatialDataColumn,
|
|
8327
|
+
spatialDataType: "geo",
|
|
8328
|
+
spatialDataBounds: result.bounds
|
|
8329
|
+
})
|
|
8330
|
+
})
|
|
8331
|
+
);
|
|
8332
|
+
};
|
|
8333
|
+
|
|
8334
|
+
// src/sources/constants.ts
|
|
8335
|
+
var RasterBandColorinterp = /* @__PURE__ */ ((RasterBandColorinterp2) => {
|
|
8336
|
+
RasterBandColorinterp2["Gray"] = "gray";
|
|
8337
|
+
RasterBandColorinterp2["Red"] = "red";
|
|
8338
|
+
RasterBandColorinterp2["Green"] = "green";
|
|
8339
|
+
RasterBandColorinterp2["Blue"] = "blue";
|
|
8340
|
+
RasterBandColorinterp2["Alpha"] = "alpha";
|
|
8341
|
+
RasterBandColorinterp2["Palette"] = "palette";
|
|
8342
|
+
return RasterBandColorinterp2;
|
|
8343
|
+
})(RasterBandColorinterp || {});
|
|
8344
|
+
|
|
8345
|
+
// src/sources/index.ts
|
|
8346
|
+
var CARTO_SOURCES = {
|
|
8347
|
+
boundaryQuerySource,
|
|
8348
|
+
boundaryTableSource,
|
|
8349
|
+
h3QuerySource,
|
|
8350
|
+
h3TableSource,
|
|
8351
|
+
h3TilesetSource,
|
|
8352
|
+
quadbinQuerySource,
|
|
8353
|
+
quadbinTableSource,
|
|
8354
|
+
quadbinTilesetSource,
|
|
8355
|
+
rasterSource,
|
|
8356
|
+
trajectoryQuerySource,
|
|
8357
|
+
trajectoryTableSource,
|
|
8358
|
+
vectorQuerySource,
|
|
8359
|
+
vectorTableSource,
|
|
8360
|
+
vectorTilesetSource
|
|
8361
|
+
};
|
|
8362
|
+
|
|
8345
8363
|
// src/api/query.ts
|
|
8346
8364
|
var query = async function(options) {
|
|
8347
8365
|
const {
|
|
@@ -11187,6 +11205,7 @@ export {
|
|
|
11187
11205
|
AggregationTypes,
|
|
11188
11206
|
ApiVersion,
|
|
11189
11207
|
basemap_styles_default as BASEMAP,
|
|
11208
|
+
CARTO_SOURCES,
|
|
11190
11209
|
CartoAPIError,
|
|
11191
11210
|
CellSet,
|
|
11192
11211
|
DEFAULT_API_BASE_URL,
|