@acrool/react-fetcher 0.0.2-alpha.5 → 0.0.2-alpha.7

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,4 +1,2 @@
1
- import { default as axios } from 'axios';
2
- type TCreateAxiosInstanceConfig = ReturnType<typeof axios.create>;
3
- export declare const createAxiosInstance: (config?: TCreateAxiosInstanceConfig) => import('axios').AxiosInstance;
4
- export {};
1
+ import { CreateAxiosDefaults } from 'axios';
2
+ export declare const createAxiosInstance: (config?: CreateAxiosDefaults) => import('axios').AxiosInstance;
@@ -0,0 +1,10 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { IUseFetcherArgs } from './types';
3
+ import { TFileMapVariables } from './utils';
4
+ /**
5
+ * GrqpahQL 的查詢氣
6
+ * @param axiosInstance
7
+ * @param query
8
+ */
9
+ declare const createGraphQLFetcher: <TData, TArgs extends IUseFetcherArgs<TFileMapVariables>>(axiosInstance: AxiosInstance, query: string) => ((args?: TArgs) => Promise<TData>);
10
+ export default createGraphQLFetcher;
@@ -0,0 +1,2 @@
1
+ export { default as createGraphQLFetcher } from './createGraphQLFetcher';
2
+ export type { IUseFetcherArgs as IUseGraphQLFetcherArgs } from './types';
@@ -1 +1,2 @@
1
1
  export { default as createRestFulFetcher } from './createRestFulFetcher';
2
+ export type { IUseFetcherArgs as IUseRestFulFetcherArgs } from './types';
@@ -1,3 +1,3 @@
1
- export * from './createGraphQL2Fetcher';
1
+ export * from './createGraphQLFetcher';
2
2
  export * from './createRestFulFetcher';
3
3
  export type { IRequestConfig } from './types';
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig, InternalAxiosRequestConfig } from 'axios';
2
- export interface IFetchOptions {
2
+ interface IFetchOptions {
3
3
  pendingRequest?: boolean;
4
4
  requestCode?: string;
5
5
  forceGuest?: boolean;
@@ -10,3 +10,4 @@ export interface IInternalRequestConfig extends InternalAxiosRequestConfig, IFet
10
10
  }
11
11
  export interface IRequestConfig extends AxiosRequestConfig, IFetchOptions {
12
12
  }
13
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrool/react-fetcher",
3
- "version": "0.0.2-alpha.5",
3
+ "version": "0.0.2-alpha.7",
4
4
  "description": "Fetcher library based for Reactjs",
5
5
  "keywords": [
6
6
  "acrool",
@@ -1,10 +0,0 @@
1
- import { AxiosInstance } from 'axios';
2
- import { IUseFetcherArgs } from './types';
3
- import { TFileMapVariables } from './utils';
4
- /**
5
- * GrqpahQL 的查詢氣
6
- * @param axiosInstance
7
- * @param query
8
- */
9
- declare const createGraphQL2Fetcher: <TData, TArgs extends IUseFetcherArgs<TFileMapVariables>>(axiosInstance: AxiosInstance, query: string) => ((args?: TArgs) => Promise<TData>);
10
- export default createGraphQL2Fetcher;
@@ -1 +0,0 @@
1
- export { default as createGraphQLFetcher } from './createGraphQL2Fetcher';