@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.
- package/dist/acrool-react-fetcher.es.js +642 -643
- package/dist/createAxios.d.ts +2 -4
- package/dist/fetchers/createGraphQLFetcher/createGraphQLFetcher.d.ts +10 -0
- package/dist/fetchers/createGraphQLFetcher/index.d.ts +2 -0
- package/dist/fetchers/createRestFulFetcher/index.d.ts +1 -0
- package/dist/fetchers/index.d.ts +1 -1
- package/dist/fetchers/types.d.ts +2 -1
- package/package.json +1 -1
- package/dist/fetchers/createGraphQL2Fetcher/createGraphQL2Fetcher.d.ts +0 -10
- package/dist/fetchers/createGraphQL2Fetcher/index.d.ts +0 -1
- /package/dist/fetchers/{createGraphQL2Fetcher → createGraphQLFetcher}/types.d.ts +0 -0
- /package/dist/fetchers/{createGraphQL2Fetcher → createGraphQLFetcher}/utils.d.ts +0 -0
package/dist/createAxios.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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;
|
package/dist/fetchers/index.d.ts
CHANGED
package/dist/fetchers/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig, InternalAxiosRequestConfig } from 'axios';
|
|
2
|
-
|
|
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,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';
|
|
File without changes
|
|
File without changes
|