@uni-helper/axios-adapter 1.5.3 → 1.16.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.
package/dist/index.d.cts CHANGED
@@ -1,18 +1,19 @@
1
- import { AxiosAdapter } from 'axios';
2
- import { U as UserOptions } from './types-76de936f.js';
1
+ import { t as UserOptions } from "./types-BSLo1MIA.cjs";
2
+ import { AxiosAdapter } from "axios";
3
3
 
4
+ //#region src/globalExtensions.d.ts
4
5
  declare module 'axios' {
5
- interface AxiosRequestConfig extends Omit<UniApp.RequestOptions, 'success' | 'fail' | 'complete' | 'header'>, Omit<UniApp.UploadFileOption, 'success' | 'fail' | 'complete' | 'header' | 'formData'>, Omit<UniApp.DownloadFileOption, 'success' | 'fail' | 'complete' | 'header'>, Partial<Pick<UniApp.RequestTask, 'onHeadersReceived'>> {
6
- }
7
- interface AxiosResponse {
8
- cookies?: string[];
9
- }
10
- interface Axios {
11
- upload<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
12
- download<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
13
- }
6
+ interface AxiosRequestConfig extends Omit<UniApp.RequestOptions, 'success' | 'fail' | 'complete' | 'header'>, Omit<UniApp.UploadFileOption, 'success' | 'fail' | 'complete' | 'header' | 'formData'>, Omit<UniApp.DownloadFileOption, 'success' | 'fail' | 'complete' | 'header'>, Partial<Pick<UniApp.RequestTask, 'onHeadersReceived'>> {}
7
+ interface AxiosResponse {
8
+ cookies?: string[];
9
+ }
10
+ interface Axios {
11
+ upload: <T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>) => Promise<R>;
12
+ download: <T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>) => Promise<R>;
13
+ }
14
14
  }
15
-
15
+ //#endregion
16
+ //#region src/index.d.ts
16
17
  declare function createUniAppAxiosAdapter(userOptions?: UserOptions): AxiosAdapter;
17
-
18
- export { createUniAppAxiosAdapter };
18
+ //#endregion
19
+ export { createUniAppAxiosAdapter };
package/dist/index.d.ts CHANGED
@@ -1,18 +1,19 @@
1
- import { AxiosAdapter } from 'axios';
2
- import { U as UserOptions } from './types-76de936f.js';
1
+ import { t as UserOptions } from "./types-C-Kh3_5J.js";
2
+ import { AxiosAdapter } from "axios";
3
3
 
4
+ //#region src/globalExtensions.d.ts
4
5
  declare module 'axios' {
5
- interface AxiosRequestConfig extends Omit<UniApp.RequestOptions, 'success' | 'fail' | 'complete' | 'header'>, Omit<UniApp.UploadFileOption, 'success' | 'fail' | 'complete' | 'header' | 'formData'>, Omit<UniApp.DownloadFileOption, 'success' | 'fail' | 'complete' | 'header'>, Partial<Pick<UniApp.RequestTask, 'onHeadersReceived'>> {
6
- }
7
- interface AxiosResponse {
8
- cookies?: string[];
9
- }
10
- interface Axios {
11
- upload<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
12
- download<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
13
- }
6
+ interface AxiosRequestConfig extends Omit<UniApp.RequestOptions, 'success' | 'fail' | 'complete' | 'header'>, Omit<UniApp.UploadFileOption, 'success' | 'fail' | 'complete' | 'header' | 'formData'>, Omit<UniApp.DownloadFileOption, 'success' | 'fail' | 'complete' | 'header'>, Partial<Pick<UniApp.RequestTask, 'onHeadersReceived'>> {}
7
+ interface AxiosResponse {
8
+ cookies?: string[];
9
+ }
10
+ interface Axios {
11
+ upload: <T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>) => Promise<R>;
12
+ download: <T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>) => Promise<R>;
13
+ }
14
14
  }
15
-
15
+ //#endregion
16
+ //#region src/index.d.ts
16
17
  declare function createUniAppAxiosAdapter(userOptions?: UserOptions): AxiosAdapter;
17
-
18
- export { createUniAppAxiosAdapter };
18
+ //#endregion
19
+ export { createUniAppAxiosAdapter };