@devtable/dashboard 10.38.0 → 10.40.0

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,5 +1,7 @@
1
1
  import { DataSourceType, TPayloadForSQL } from '~/model';
2
2
  import { IDataSource } from './types';
3
+ import { AxiosError } from 'axios';
4
+ import { AnyObject } from '..';
3
5
  export declare type QueryFailureError = {
4
6
  code: 'BAD_REQUEST';
5
7
  detail: {
@@ -24,7 +26,7 @@ interface IQueryByHTTP {
24
26
  configString: string;
25
27
  name: string;
26
28
  }
27
- export declare function queryByHTTP({ type, key, configString, name }: IQueryByHTTP, signal: AbortSignal): Promise<any>;
29
+ export declare function queryByHTTP({ type, key, configString, name }: IQueryByHTTP, signal: AbortSignal): Promise<import("axios").AxiosResponse<AnyObject, any> | AxiosError<AnyObject, any>>;
28
30
  export declare type TQuerySources = Record<string, string[]>;
29
31
  export declare function listDataSources(): Promise<IDataSource[]>;
30
32
  export declare type GlobalSQLSnippetDBType = {
@@ -1,7 +1,7 @@
1
1
  import { DataSourceType } from '~/model';
2
2
  import { AnyObject, IDashboardConfig } from '..';
3
- import { DefaultApiClient, IAPIClient } from '../shared';
4
- import { Method } from 'axios';
3
+ import { DefaultApiClient, IAPIClient, IAPIClientRequestOptions } from '../shared';
4
+ import { AxiosResponse, Method } from 'axios';
5
5
  export { FacadeApiClient, DefaultApiClient } from '../shared';
6
6
  export type { IAPIClient, IAPIClientRequestOptions } from '../shared';
7
7
  export declare type TQueryPayload = {
@@ -12,16 +12,22 @@ export declare type TQueryPayload = {
12
12
  };
13
13
  export interface IDashboardAPIClient extends IAPIClient {
14
14
  query: <T = $TSFixMe>(signal?: AbortSignal) => (data: TQueryPayload, options?: AnyObject) => Promise<T>;
15
+ httpDataSourceQuery: <T = $TSFixMe>(signal?: AbortSignal) => (data: TQueryPayload, options?: AnyObject) => Promise<AxiosResponse<T>>;
15
16
  }
16
17
  export declare class DashboardApiClient extends DefaultApiClient implements IDashboardAPIClient {
17
18
  makeQueryENV?: (() => AnyObject) | null;
18
19
  query<T>(signal: AbortSignal | undefined): (data: TQueryPayload, options?: AnyObject) => Promise<T>;
20
+ httpDataSourceQuery<T>(signal: AbortSignal | undefined): (data: TQueryPayload, options?: AnyObject) => Promise<AxiosResponse<T>>;
19
21
  }
20
22
  export declare class DashboardApiFacadeClient implements IDashboardAPIClient {
21
23
  implementation: IDashboardAPIClient;
22
24
  constructor(implementation: IDashboardAPIClient);
23
25
  query<T>(signal?: AbortSignal): (data: TQueryPayload, options?: AnyObject | undefined) => Promise<T>;
24
- getRequest<T>(method: Method, signal?: AbortSignal): (url: string, data: import("../shared").AnyObject, options?: import("..").IAPIClientRequestOptions | undefined) => Promise<T>;
26
+ httpDataSourceQuery<T>(signal?: AbortSignal): (data: TQueryPayload, options?: AnyObject | undefined) => Promise<AxiosResponse<T, any>>;
27
+ getRequest<T>(method: Method, signal?: AbortSignal): (url: string, data: import("../shared").AnyObject, options: IAPIClientRequestOptions, forResponse?: boolean | undefined) => Promise<T>;
28
+ get<T>(signal?: AbortSignal): (url: string, data: import("../shared").AnyObject, options: IAPIClientRequestOptions, forResponse?: boolean | undefined) => Promise<T>;
29
+ post<T>(signal?: AbortSignal): (url: string, data: import("../shared").AnyObject, options: IAPIClientRequestOptions, forResponse?: boolean | undefined) => Promise<T>;
30
+ put<T>(signal?: AbortSignal): (url: string, data: import("../shared").AnyObject, options: IAPIClientRequestOptions, forResponse?: boolean | undefined) => Promise<T>;
25
31
  }
26
32
  export declare function configureAPIClient(config: IDashboardConfig): void;
27
33
  /**
@@ -0,0 +1,4 @@
1
+ export declare const DataTableWithPagination: ({ data, loading }: {
2
+ data: TQueryData;
3
+ loading: boolean;
4
+ }) => import('./react/jsx-runtime').JSX.Element;
@@ -1,5 +1,7 @@
1
1
  import { ReactNode } from './react';
2
- export declare const DataPreview: import('./react').FunctionComponent<{
2
+ export declare const DataPreview: (({ id, moreActions }: {
3
3
  id: string;
4
- moreActions?: ReactNode;
5
- }>;
4
+ moreActions: ReactNode | null;
5
+ }) => import('./react/jsx-runtime').JSX.Element) & {
6
+ displayName: string;
7
+ };
@@ -0,0 +1,10 @@
1
+ import { SetStateAction } from './react';
2
+ declare type Props = {
3
+ data: TQueryData;
4
+ page: number;
5
+ setPage: React.Dispatch<SetStateAction<number>>;
6
+ limit: number;
7
+ setLimit: React.Dispatch<SetStateAction<number>>;
8
+ };
9
+ export declare const PaginationControl: ({ data, page, setPage, limit, setLimit }: Props) => import('./react/jsx-runtime').JSX.Element | null;
10
+ export {};