@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.
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "homepage": "https://github.com/CartoDB/carto-api-client#readme",
9
9
  "author": "Don McCurdy <donmccurdy@carto.com>",
10
10
  "packageManager": "yarn@4.3.1",
11
- "version": "0.5.6",
11
+ "version": "0.5.7-alpha.1",
12
12
  "license": "MIT",
13
13
  "publishConfig": {
14
14
  "access": "public"
@@ -59,6 +59,8 @@ export interface CategoryRequestOptions extends BaseRequestOptions {
59
59
  operationColumn?: string;
60
60
  /** Local only. */
61
61
  joinOperation?: 'count' | 'avg' | 'min' | 'max' | 'sum';
62
+ /** Maximum number of items to return. Backend calculates also __carto_others category. Remote only. */
63
+ maxItems?: number;
62
64
  }
63
65
 
64
66
  /**
@@ -74,7 +74,7 @@ export abstract class WidgetRemoteSource<
74
74
  spatialFiltersMode,
75
75
  ...params
76
76
  } = options;
77
- const {column, operation, operationColumn, operationExp} = params;
77
+ const {column, operation, operationColumn, operationExp, maxItems} = params;
78
78
 
79
79
  if (operation === AggregationTypes.Custom) {
80
80
  assert(operationExp, 'operationExp is required for custom operation');
@@ -94,6 +94,7 @@ export abstract class WidgetRemoteSource<
94
94
  operation,
95
95
  operationExp,
96
96
  operationColumn: operationColumn || column,
97
+ maxItems,
97
98
  },
98
99
  opts: {signal, headers: this.props.headers},
99
100
  }).then((res: CategoriesModelResponse) => normalizeObjectKeys(res.rows));