@malloy-publisher/sdk 0.0.59 → 0.0.60

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,11 +1,11 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  export interface ServerContextValue {
3
3
  server: string;
4
- accessToken?: string;
4
+ getAccessToken?: () => Promise<string>;
5
5
  }
6
6
  export interface ServerProviderProps {
7
7
  server?: string;
8
- accessToken?: string;
8
+ getAccessToken?: () => Promise<string>;
9
9
  children: ReactNode;
10
10
  }
11
11
  export declare const ServerProvider: React.FC<ServerProviderProps>;
@@ -0,0 +1 @@
1
+ export { getAxiosConfig } from './useQueryWithApiError';
@@ -2,6 +2,7 @@ import { QueryClient, UseQueryOptions, UseQueryResult, UseMutationOptions, UseMu
2
2
  import { ApiError } from '../components/ApiErrorDisplay';
3
3
  import { RawAxiosRequestConfig } from 'axios';
4
4
  declare const globalQueryClient: QueryClient;
5
+ export declare const getAxiosConfig: (server: string, getAccessToken: () => Promise<string>) => Promise<RawAxiosRequestConfig>;
5
6
  export declare function useQueryWithApiError<TData = unknown, TError = ApiError>(options: Omit<UseQueryOptions<TData, TError>, "throwOnError" | "retry"> & {
6
7
  queryFn: (config: RawAxiosRequestConfig) => Promise<TData>;
7
8
  }): UseQueryResult<TData, TError>;