@carto/api-client 0.0.1-2 → 0.0.32

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carto/api-client",
3
- "version": "0.0.1-2",
3
+ "version": "0.0.32",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "tag": "alpha"
@@ -89,9 +89,9 @@ export abstract class WidgetBaseSource<Props extends WidgetBaseSourceProps> {
89
89
  * charts including grouped bar charts, pie charts, and tree charts.
90
90
  */
91
91
  async getCategories(
92
- props: CategoryRequestOptions
92
+ options: CategoryRequestOptions
93
93
  ): Promise<CategoryResponse> {
94
- const {filterOwner, spatialFilter, abortController, ...params} = props;
94
+ const {filterOwner, spatialFilter, abortController, ...params} = options;
95
95
  const {column, operation, operationColumn} = params;
96
96
 
97
97
  type CategoriesModelResponse = {rows: {name: string; value: number}[]};
@@ -116,14 +116,14 @@ export abstract class WidgetBaseSource<Props extends WidgetBaseSourceProps> {
116
116
  * Returns a scalar numerical statistic over all matching data. Suitable
117
117
  * for 'headline' or 'scorecard' figures such as counts and sums.
118
118
  */
119
- async getFormula(props: FormulaRequestOptions): Promise<FormulaResponse> {
119
+ async getFormula(options: FormulaRequestOptions): Promise<FormulaResponse> {
120
120
  const {
121
121
  filterOwner,
122
122
  spatialFilter,
123
123
  abortController,
124
124
  operationExp,
125
125
  ...params
126
- } = props;
126
+ } = options;
127
127
  const {column, operation} = params;
128
128
 
129
129
  type FormulaModelResponse = {rows: {value: number}[]};
@@ -145,9 +145,9 @@ export abstract class WidgetBaseSource<Props extends WidgetBaseSourceProps> {
145
145
  * over a numerical range. Suitable for histogram charts.
146
146
  */
147
147
  async getHistogram(
148
- props: HistogramRequestOptions
148
+ options: HistogramRequestOptions
149
149
  ): Promise<HistogramResponse> {
150
- const {filterOwner, spatialFilter, abortController, ...params} = props;
150
+ const {filterOwner, spatialFilter, abortController, ...params} = options;
151
151
  const {column, operation, ticks} = params;
152
152
 
153
153
  type HistogramModelResponse = {rows: {tick: number; value: number}[]};
@@ -181,8 +181,8 @@ export abstract class WidgetBaseSource<Props extends WidgetBaseSourceProps> {
181
181
  * Suitable for displaying certain 'headline' or 'scorecard' statistics,
182
182
  * or rendering a range slider UI for filtering.
183
183
  */
184
- async getRange(props: RangeRequestOptions): Promise<RangeResponse> {
185
- const {filterOwner, spatialFilter, abortController, ...params} = props;
184
+ async getRange(options: RangeRequestOptions): Promise<RangeResponse> {
185
+ const {filterOwner, spatialFilter, abortController, ...params} = options;
186
186
  const {column} = params;
187
187
 
188
188
  type RangeModelResponse = {rows: {min: number; max: number}[]};
@@ -203,8 +203,8 @@ export abstract class WidgetBaseSource<Props extends WidgetBaseSourceProps> {
203
203
  * Returns a list of bivariate datapoints defined as numerical 'x' and 'y'
204
204
  * values. Suitable for rendering scatter plots.
205
205
  */
206
- async getScatter(props: ScatterRequestOptions): Promise<ScatterResponse> {
207
- const {filterOwner, spatialFilter, abortController, ...params} = props;
206
+ async getScatter(options: ScatterRequestOptions): Promise<ScatterResponse> {
207
+ const {filterOwner, spatialFilter, abortController, ...params} = options;
208
208
  const {xAxisColumn, xAxisJoinOperation, yAxisColumn, yAxisJoinOperation} =
209
209
  params;
210
210
 
@@ -237,8 +237,8 @@ export abstract class WidgetBaseSource<Props extends WidgetBaseSourceProps> {
237
237
  * Returns a list of arbitrary data rows, with support for pagination and
238
238
  * sorting. Suitable for displaying tables and lists.
239
239
  */
240
- async getTable(props: TableRequestOptions): Promise<TableResponse> {
241
- const {filterOwner, spatialFilter, abortController, ...params} = props;
240
+ async getTable(options: TableRequestOptions): Promise<TableResponse> {
241
+ const {filterOwner, spatialFilter, abortController, ...params} = options;
242
242
  const {columns, sortBy, sortDirection, page = 0, rowsPerPage = 10} = params;
243
243
 
244
244
  type TableModelResponse = {
@@ -272,9 +272,9 @@ export abstract class WidgetBaseSource<Props extends WidgetBaseSourceProps> {
272
272
  * time intervals. Suitable for rendering time series charts.
273
273
  */
274
274
  async getTimeSeries(
275
- props: TimeSeriesRequestOptions
275
+ options: TimeSeriesRequestOptions
276
276
  ): Promise<TimeSeriesResponse> {
277
- const {filterOwner, abortController, spatialFilter, ...params} = props;
277
+ const {filterOwner, abortController, spatialFilter, ...params} = options;
278
278
  const {
279
279
  column,
280
280
  operationColumn,