@carto/api-client 0.5.6 → 0.5.7-alpha.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.
@@ -1193,6 +1193,8 @@ interface CategoryRequestOptions extends BaseRequestOptions {
1193
1193
  operationColumn?: string;
1194
1194
  /** Local only. */
1195
1195
  joinOperation?: 'count' | 'avg' | 'min' | 'max' | 'sum';
1196
+ /** Maximum number of items to return. Backend calculates also __carto_others category. Remote only. */
1197
+ maxItems?: number;
1196
1198
  }
1197
1199
  /**
1198
1200
  * Options for {@link WidgetRemoteSource#getFeatures}.
@@ -1193,6 +1193,8 @@ interface CategoryRequestOptions extends BaseRequestOptions {
1193
1193
  operationColumn?: string;
1194
1194
  /** Local only. */
1195
1195
  joinOperation?: 'count' | 'avg' | 'min' | 'max' | 'sum';
1196
+ /** Maximum number of items to return. Backend calculates also __carto_others category. Remote only. */
1197
+ maxItems?: number;
1196
1198
  }
1197
1199
  /**
1198
1200
  * Options for {@link WidgetRemoteSource#getFeatures}.
@@ -6271,7 +6271,7 @@ var WidgetRemoteSource = class extends WidgetSource {
6271
6271
  spatialFiltersMode,
6272
6272
  ...params
6273
6273
  } = options;
6274
- const { column, operation: operation2, operationColumn, operationExp } = params;
6274
+ const { column, operation: operation2, operationColumn, operationExp, maxItems } = params;
6275
6275
  if (operation2 === AggregationTypes.Custom) {
6276
6276
  assert2(operationExp, "operationExp is required for custom operation");
6277
6277
  }
@@ -6286,7 +6286,8 @@ var WidgetRemoteSource = class extends WidgetSource {
6286
6286
  column,
6287
6287
  operation: operation2,
6288
6288
  operationExp,
6289
- operationColumn: operationColumn || column
6289
+ operationColumn: operationColumn || column,
6290
+ maxItems
6290
6291
  },
6291
6292
  opts: { signal, headers: this.props.headers }
6292
6293
  }).then((res) => normalizeObjectKeys(res.rows));