@carto/api-client 0.5.8 → 0.5.9-alpha.PR193.1

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.
@@ -6083,7 +6083,8 @@ async function requestWithParameters({
6083
6083
  headers: customHeaders = {},
6084
6084
  errorContext,
6085
6085
  maxLengthURL = DEFAULT_MAX_LENGTH_URL,
6086
- localCache
6086
+ localCache,
6087
+ signal
6087
6088
  }) {
6088
6089
  parameters = {
6089
6090
  v: V3_MINOR_VERSION,
@@ -6106,8 +6107,9 @@ async function requestWithParameters({
6106
6107
  const fetchPromise = url.length > maxLengthURL ? fetch(baseUrl, {
6107
6108
  method: "POST",
6108
6109
  body: JSON.stringify(parameters),
6109
- headers
6110
- }) : fetch(url, { headers });
6110
+ headers,
6111
+ signal
6112
+ }) : fetch(url, { headers, signal });
6111
6113
  let response;
6112
6114
  let responseJson;
6113
6115
  const jsonPromise = fetchPromise.then((_response) => {
@@ -6206,7 +6208,7 @@ async function baseSource(endpoint, options, urlParameters) {
6206
6208
  Authorization: `Bearer ${options.accessToken}`,
6207
6209
  ...options.headers
6208
6210
  };
6209
- const parameters = { client: clientId, ...urlParameters };
6211
+ const parameters = { client: clientId, ...options.tags, ...urlParameters };
6210
6212
  const errorContext = {
6211
6213
  requestType: "Map instantiation",
6212
6214
  connection: options.connectionName,
@@ -6427,7 +6429,8 @@ function executeModel(props) {
6427
6429
  filtersLogicalOperator = "and",
6428
6430
  spatialDataType = "geo",
6429
6431
  spatialDataColumn = DEFAULT_GEO_COLUMN,
6430
- spatialFiltersMode = "intersects"
6432
+ spatialFiltersMode = "intersects",
6433
+ tags
6431
6434
  } = source;
6432
6435
  const queryParams = {
6433
6436
  type,
@@ -6436,7 +6439,8 @@ function executeModel(props) {
6436
6439
  params,
6437
6440
  queryParameters: source.queryParameters || "",
6438
6441
  filters,
6439
- filtersLogicalOperator
6442
+ filtersLogicalOperator,
6443
+ tags
6440
6444
  };
6441
6445
  queryParams.spatialDataType = spatialDataType;
6442
6446
  queryParams.spatialDataColumn = spatialDataColumn;
@@ -6571,7 +6575,8 @@ var WidgetRemoteSource = class extends WidgetSource {
6571
6575
  filters: getApplicableFilters(filterOwner, filters || props.filters),
6572
6576
  filtersLogicalOperator: props.filtersLogicalOperator,
6573
6577
  spatialDataType: props.spatialDataType,
6574
- spatialDataColumn: props.spatialDataColumn
6578
+ spatialDataColumn: props.spatialDataColumn,
6579
+ tags: props.tags
6575
6580
  };
6576
6581
  }
6577
6582
  async getCategories(options) {
@@ -8384,7 +8389,8 @@ var query = async function(options) {
8384
8389
  localCache,
8385
8390
  connectionName,
8386
8391
  sqlQuery,
8387
- queryParameters
8392
+ queryParameters,
8393
+ internalParameters
8388
8394
  } = options;
8389
8395
  const urlParameters = { q: sqlQuery };
8390
8396
  if (queryParameters) {
@@ -8395,7 +8401,12 @@ var query = async function(options) {
8395
8401
  Authorization: `Bearer ${options.accessToken}`,
8396
8402
  ...options.headers
8397
8403
  };
8398
- const parameters = { client: clientId, ...urlParameters };
8404
+ const parameters = {
8405
+ client: clientId,
8406
+ ...options.tags,
8407
+ ...internalParameters,
8408
+ ...urlParameters
8409
+ };
8399
8410
  const errorContext = {
8400
8411
  requestType: "SQL",
8401
8412
  connection: options.connectionName,
@@ -8408,7 +8419,8 @@ var query = async function(options) {
8408
8419
  headers,
8409
8420
  errorContext,
8410
8421
  maxLengthURL,
8411
- localCache
8422
+ localCache,
8423
+ signal: options.signal
8412
8424
  });
8413
8425
  };
8414
8426