@carto/api-client 0.5.6-alpha.bundle.3 → 0.5.6

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.
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -98,6 +98,14 @@
98
98
  ["h3" /* H3 */]: ["h3", "hex", "h3id", "hex_id", "h3hex"],
99
99
  ["quadbin" /* QUADBIN */]: ["quadbin"]
100
100
  });
101
+ var AggregationTypes = {
102
+ Count: "count",
103
+ Avg: "avg",
104
+ Min: "min",
105
+ Max: "max",
106
+ Sum: "sum",
107
+ Custom: "custom"
108
+ };
101
109
 
102
110
  // src/utils.ts
103
111
  var FILTER_TYPES = new Set(Object.values(FilterType));
@@ -19461,7 +19469,7 @@
19461
19469
  }
19462
19470
  async getFormula({
19463
19471
  column = "*",
19464
- operation: operation2 = "count",
19472
+ operation: operation2 = AggregationTypes.Count,
19465
19473
  joinOperation,
19466
19474
  filters,
19467
19475
  filterOwner,
@@ -19472,13 +19480,13 @@
19472
19480
  filters,
19473
19481
  filterOwner
19474
19482
  );
19475
- if (filteredFeatures.length === 0 && operation2 !== "count") {
19483
+ if (filteredFeatures.length === 0 && operation2 !== AggregationTypes.Count) {
19476
19484
  return { value: null };
19477
19485
  }
19478
- if (operation2 === "custom") {
19486
+ if (operation2 === AggregationTypes.Custom) {
19479
19487
  throw new Error("Custom aggregation not supported for tilesets");
19480
19488
  }
19481
- if (column && column !== "*" || operation2 !== "count") {
19489
+ if (column && column !== "*" || operation2 !== AggregationTypes.Count) {
19482
19490
  assertColumn(this._features, column);
19483
19491
  }
19484
19492
  const targetOperation = aggregationFunctions[operation2];
@@ -19487,7 +19495,7 @@
19487
19495
  };
19488
19496
  }
19489
19497
  async getHistogram({
19490
- operation: operation2 = "count",
19498
+ operation: operation2 = AggregationTypes.Count,
19491
19499
  ticks,
19492
19500
  column,
19493
19501
  joinOperation,
@@ -19514,7 +19522,7 @@
19514
19522
  }
19515
19523
  async getCategories({
19516
19524
  column,
19517
- operation: operation2 = "count",
19525
+ operation: operation2 = AggregationTypes.Count,
19518
19526
  operationColumn,
19519
19527
  joinOperation,
19520
19528
  filters,
@@ -19718,4 +19726,4 @@
19718
19726
  });
19719
19727
  });
19720
19728
  })();
19721
- //# sourceMappingURL=worker.global.js.map
19729
+ //# sourceMappingURL=worker-compat.js.map