@zyzgroup/core-web 0.0.83 → 0.0.84
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/zyzgroup_core_web.iife.js +12 -12
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +40 -47
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +12 -12
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/axios.d.ts +11 -18
- package/types/axios.d.ts.map +1 -1
package/package.json
CHANGED
package/types/axios.d.ts
CHANGED
|
@@ -1,42 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface FetchWithAxiosInterceptors {
|
|
3
|
-
requestInterceptor?: (config: InternalAxiosRequestConfig | AxiosRequestConfig) => InternalAxiosRequestConfig;
|
|
4
|
-
requestInterceptorCatch?: (error: any) => any;
|
|
5
|
-
responseInterceptor?: <T = AxiosResponse>(response: T) => T;
|
|
6
|
-
responseInterceptorCatch?: (error: any) => any;
|
|
7
|
-
}
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from "axios";
|
|
8
2
|
export interface FetchWithAxiosRequestConfig extends AxiosRequestConfig {
|
|
9
|
-
|
|
3
|
+
interceptor?: {
|
|
4
|
+
request?: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig;
|
|
5
|
+
requestError?: (error: any) => any;
|
|
6
|
+
response?: <T = AxiosResponse>(response: T) => T;
|
|
7
|
+
responseError?: (error: any) => any;
|
|
8
|
+
};
|
|
10
9
|
retry?: number;
|
|
11
10
|
retryDelay?: number;
|
|
12
11
|
retryCounted?: number;
|
|
13
|
-
retryStatus?: string[];
|
|
14
|
-
}
|
|
15
|
-
export interface FetchWithAxiosRequestError extends AxiosError<any, any> {
|
|
16
|
-
config: FetchWithAxiosRequestConfig & InternalAxiosRequestConfig;
|
|
17
12
|
}
|
|
18
13
|
export declare class FetchWithAxios {
|
|
19
14
|
instance: AxiosInstance;
|
|
20
|
-
interceptors?: FetchWithAxiosInterceptors;
|
|
21
|
-
requestCanceler: FetchWithAxiosRequestCancel;
|
|
22
15
|
constructor(config?: FetchWithAxiosRequestConfig);
|
|
23
16
|
request<T>(config: FetchWithAxiosRequestConfig): Promise<T>;
|
|
24
17
|
get<T>(url: string, config?: FetchWithAxiosRequestConfig): Promise<T>;
|
|
25
18
|
delete<T>(url: string, config?: FetchWithAxiosRequestConfig): Promise<T>;
|
|
26
19
|
head<T>(url: string, config?: FetchWithAxiosRequestConfig): Promise<T>;
|
|
27
20
|
options<T>(url: string, config?: FetchWithAxiosRequestConfig): Promise<T>;
|
|
28
|
-
post<T>(url: string, data?: Record<string,
|
|
29
|
-
put<T>(url: string, data?: Record<string,
|
|
30
|
-
patch<T>(url: string, data?: Record<string,
|
|
21
|
+
post<T>(url: string, data?: Record<string, any>, config?: FetchWithAxiosRequestConfig): Promise<T>;
|
|
22
|
+
put<T>(url: string, data?: Record<string, any>, config?: FetchWithAxiosRequestConfig): Promise<T>;
|
|
23
|
+
patch<T>(url: string, data?: Record<string, any>, config?: FetchWithAxiosRequestConfig): Promise<T>;
|
|
31
24
|
getUri(config?: FetchWithAxiosRequestConfig): string;
|
|
32
25
|
}
|
|
33
26
|
export declare class FetchWithAxiosRequestCancel<T extends AxiosRequestConfig = FetchWithAxiosRequestConfig> {
|
|
34
27
|
pendingRequestMap: Map<string, AbortController>;
|
|
35
28
|
constructor();
|
|
29
|
+
private getRequestId;
|
|
36
30
|
pendingRequest(config: T): Promise<void>;
|
|
37
31
|
confirmRequest(config: T): Promise<void>;
|
|
38
32
|
cancelRequest(config: T): Promise<void>;
|
|
39
33
|
cancelAllRequest(): Promise<void>;
|
|
40
|
-
private getRequestId;
|
|
41
34
|
}
|
|
42
35
|
//# sourceMappingURL=axios.d.ts.map
|
package/types/axios.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../src/axios.ts"],"names":[],"mappings":"AAAA,OAAc,EACZ,
|
|
1
|
+
{"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../src/axios.ts"],"names":[],"mappings":"AAAA,OAAc,EACZ,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,0BAA0B,EAC3B,MAAM,OAAO,CAAC;AA0Bf,MAAM,WAAW,2BAA4B,SAAQ,kBAAkB;IAErE,WAAW,CAAC,EAAE;QACZ,OAAO,CAAC,EAAE,CACR,MAAM,EAAE,0BAA0B,KAC/B,0BAA0B,CAAC;QAChC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;QACnC,QAAQ,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,EAAE,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;QACjD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;KACrC,CAAC;IAEF,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,cAAc;IACzB,QAAQ,EAAE,aAAa,CAAC;gBASZ,MAAM,CAAC,EAAE,2BAA2B;IAqDnC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,2BAA2B,GAAG,OAAO,CAAC,CAAC,CAAC;IAI3D,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,2BAA2B;IAIxD,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,2BAA2B;IAI3D,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,2BAA2B;IAIzD,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAA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