@carto/api-client 0.5.19 → 0.5.21

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.
@@ -8374,7 +8374,7 @@ var query = async function(options) {
8374
8374
  } = options;
8375
8375
  const urlParameters = { q: sqlQuery };
8376
8376
  if (queryParameters) {
8377
- urlParameters.queryParameters = JSON.stringify(queryParameters);
8377
+ urlParameters.queryParameters = queryParameters;
8378
8378
  }
8379
8379
  const baseUrl = buildQueryUrl({ apiBaseUrl, connectionName });
8380
8380
  const headers = {
@@ -9513,7 +9513,13 @@ function domainFromAttribute(attribute, scaleType, scaleLength) {
9513
9513
  return attribute.categories.map((c) => c.category).filter((c) => c !== void 0 && c !== null);
9514
9514
  }
9515
9515
  if (scaleType === "quantile" && attribute.quantiles) {
9516
- return "global" in attribute.quantiles ? attribute.quantiles.global[scaleLength] : attribute.quantiles[scaleLength];
9516
+ const quantiles = "global" in attribute.quantiles ? attribute.quantiles.global : attribute.quantiles;
9517
+ if (scaleLength === 2 && !quantiles[2] && quantiles[4]?.length === 5) {
9518
+ return [quantiles[4][0], quantiles[4][2], quantiles[4][4]];
9519
+ }
9520
+ if (quantiles[scaleLength]) {
9521
+ return quantiles[scaleLength];
9522
+ }
9517
9523
  }
9518
9524
  let { min: min2 } = attribute;
9519
9525
  if (scaleType === "log" && min2 === 0) {
@@ -10862,7 +10868,7 @@ async function _fetchTilestats(attribute, dataset, context) {
10862
10868
  if (type === "query") {
10863
10869
  parameters.q = source;
10864
10870
  if (queryParameters) {
10865
- parameters.queryParameters = JSON.stringify(queryParameters);
10871
+ parameters.queryParameters = queryParameters;
10866
10872
  }
10867
10873
  }
10868
10874
  const stats = await requestWithParameters({