@carto/ps-react-maps 3.5.0-canary.0 → 3.5.0-canary.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { GetQueryStats, StatsResponse } from './types';
|
|
2
|
-
export declare function getQueryStats<Attribute extends string | number>({ baseUrl, connection, accessToken, query, attribute, fetcherOptions: { signal, ...other }, queryParameters, apiVersion, }: GetQueryStats): Promise<StatsResponse<Attribute>>;
|
|
2
|
+
export declare function getQueryStats<Attribute extends string | number>({ baseUrl, connection, accessToken, query, attribute, fetcherOptions: { signal, ...other }, queryParameters, params, apiVersion, }: GetQueryStats): Promise<StatsResponse<Attribute>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { GetTableStats, StatsResponse } from './types';
|
|
2
|
-
export declare function getTableStats<Attribute extends string | number>({ baseUrl, connection, accessToken, table, attribute, fetcherOptions: { signal, ...other }, apiVersion, }: GetTableStats): Promise<StatsResponse<Attribute>>;
|
|
2
|
+
export declare function getTableStats<Attribute extends string | number>({ baseUrl, connection, accessToken, table, attribute, params, fetcherOptions: { signal, ...other }, apiVersion, }: GetTableStats): Promise<StatsResponse<Attribute>>;
|
|
@@ -17,11 +17,16 @@ export interface StringStatsResponse {
|
|
|
17
17
|
}[];
|
|
18
18
|
}
|
|
19
19
|
export type StatsResponse<T> = T extends number ? NumberStatsResponse : StringStatsResponse;
|
|
20
|
-
export interface
|
|
21
|
-
query: string;
|
|
20
|
+
export interface Stats extends ExecuteSQL {
|
|
22
21
|
attribute: string;
|
|
22
|
+
params?: {
|
|
23
|
+
maxNumberOfCategories?: number;
|
|
24
|
+
categoriesOrderBy?: 'frequency_asc' | 'frequency_desc' | 'alphabetical_asc' | 'alphabetical_desc';
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface GetQueryStats extends Stats {
|
|
28
|
+
query: string;
|
|
23
29
|
}
|
|
24
|
-
export interface GetTableStats extends Omit<
|
|
30
|
+
export interface GetTableStats extends Omit<Stats, 'query'> {
|
|
25
31
|
table: string;
|
|
26
|
-
attribute: string;
|
|
27
32
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import { Source } from '../providers/sources/types';
|
|
3
|
-
import { StatsResponse } from './types';
|
|
4
|
-
export declare function useStats<Attribute extends string | number>({ source, attribute, accessToken, fetcherOptions, useQueryProps: { enabled, ...useQueryProps }, }: {
|
|
3
|
+
import { Stats, StatsResponse } from './types';
|
|
4
|
+
export declare function useStats<Attribute extends string | number>({ source, attribute, accessToken, params, fetcherOptions, useQueryProps: { enabled, ...useQueryProps }, }: {
|
|
5
5
|
source: Source | undefined;
|
|
6
|
-
attribute:
|
|
7
|
-
accessToken:
|
|
8
|
-
|
|
6
|
+
attribute: Stats['attribute'];
|
|
7
|
+
accessToken: Stats['accessToken'];
|
|
8
|
+
params?: Stats['params'];
|
|
9
|
+
fetcherOptions?: Stats['fetcherOptions'];
|
|
9
10
|
useQueryProps?: Omit<UseQueryOptions<StatsResponse<Attribute>, Error>, 'queryKey' | 'queryFn'>;
|
|
10
11
|
}): import('@tanstack/react-query').UseQueryResult<StatsResponse<Attribute>, Error>;
|