@varlet/axle 0.11.1 → 0.11.2

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/lib/api.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { UseAxleOptions, UseAxle, UseAxleInstance } from './use.cjs';
2
- import { e as AxleInstance, d as RunnerMethod, A as AxleRequestConfig } from './instance-ab0b388e.js';
2
+ import { e as AxleInstance, d as RunnerMethod, A as AxleRequestConfig } from './instance-857fe07c.js';
3
3
  import 'vue';
4
4
  import 'axios';
5
5
 
@@ -9,7 +9,7 @@ type ApiUseOptions<V, R, P, D> = Partial<UseAxleOptions<V, R, P, D>> & {
9
9
  };
10
10
  declare function createApi(axle: AxleInstance, useAxle: UseAxle): <R = any, P = Record<string, any>, D = Record<string, any>>(url: string, method: RunnerMethod) => {
11
11
  url: string;
12
- load: (params?: P | undefined, pathParams?: ApiPathParams, config?: AxleRequestConfig<D> | undefined) => Promise<R>;
12
+ load: (params?: P | undefined, pathParams?: ApiPathParams, config?: AxleRequestConfig<D, Record<string, any>> | undefined) => Promise<R>;
13
13
  use: <V = R>(options?: ApiUseOptions<V, R, P, D>) => UseAxleInstance<V, R, P, D>;
14
14
  patchUrl: (url: string, pathParams: ApiPathParams) => string;
15
15
  };
package/lib/api.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { UseAxleOptions, UseAxle, UseAxleInstance } from './use.js';
2
- import { e as AxleInstance, d as RunnerMethod, A as AxleRequestConfig } from './instance-ab0b388e.js';
2
+ import { e as AxleInstance, d as RunnerMethod, A as AxleRequestConfig } from './instance-857fe07c.js';
3
3
  import 'vue';
4
4
  import 'axios';
5
5
 
@@ -9,7 +9,7 @@ type ApiUseOptions<V, R, P, D> = Partial<UseAxleOptions<V, R, P, D>> & {
9
9
  };
10
10
  declare function createApi(axle: AxleInstance, useAxle: UseAxle): <R = any, P = Record<string, any>, D = Record<string, any>>(url: string, method: RunnerMethod) => {
11
11
  url: string;
12
- load: (params?: P | undefined, pathParams?: ApiPathParams, config?: AxleRequestConfig<D> | undefined) => Promise<R>;
12
+ load: (params?: P | undefined, pathParams?: ApiPathParams, config?: AxleRequestConfig<D, Record<string, any>> | undefined) => Promise<R>;
13
13
  use: <V = R>(options?: ApiUseOptions<V, R, P, D>) => UseAxleInstance<V, R, P, D>;
14
14
  patchUrl: (url: string, pathParams: ApiPathParams) => string;
15
15
  };
package/lib/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RequestInterceptor, a as ResponseInterceptor } from './instance-ab0b388e.js';
2
- export { e as AxleInstance, A as AxleRequestConfig, b as FetchMethod, F as FetchRunner, I as Interceptor, c as ModifyMethod, M as ModifyRunner, d as RunnerMethod, h as createAxle, f as createFetchRunner, g as createModifyRunner } from './instance-ab0b388e.js';
1
+ import { R as RequestInterceptor, a as ResponseInterceptor } from './instance-857fe07c.js';
2
+ export { e as AxleInstance, A as AxleRequestConfig, b as FetchMethod, F as FetchRunner, I as Interceptor, c as ModifyMethod, M as ModifyRunner, d as RunnerMethod, h as createAxle, f as createFetchRunner, g as createModifyRunner } from './instance-857fe07c.js';
3
3
  import { AxiosResponse, AxiosInterceptorOptions, AxiosRequestConfig } from 'axios';
4
4
  export { AxiosError, AxiosInstance, AxiosInterceptorOptions, AxiosRequestConfig, AxiosRequestHeaders, AxiosResponse, HeadersDefaults, InternalAxiosRequestConfig, ResponseType, isAxiosError } from 'axios';
5
5
 
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RequestInterceptor, a as ResponseInterceptor } from './instance-ab0b388e.js';
2
- export { e as AxleInstance, A as AxleRequestConfig, b as FetchMethod, F as FetchRunner, I as Interceptor, c as ModifyMethod, M as ModifyRunner, d as RunnerMethod, h as createAxle, f as createFetchRunner, g as createModifyRunner } from './instance-ab0b388e.js';
1
+ import { R as RequestInterceptor, a as ResponseInterceptor } from './instance-857fe07c.js';
2
+ export { e as AxleInstance, A as AxleRequestConfig, b as FetchMethod, F as FetchRunner, I as Interceptor, c as ModifyMethod, M as ModifyRunner, d as RunnerMethod, h as createAxle, f as createFetchRunner, g as createModifyRunner } from './instance-857fe07c.js';
3
3
  import { AxiosResponse, AxiosInterceptorOptions, AxiosRequestConfig } from 'axios';
4
4
  export { AxiosError, AxiosInstance, AxiosInterceptorOptions, AxiosRequestConfig, AxiosRequestHeaders, AxiosResponse, HeadersDefaults, InternalAxiosRequestConfig, ResponseType, isAxiosError } from 'axios';
5
5
 
@@ -1,6 +1,7 @@
1
1
  import { AxiosRequestConfig, AxiosResponse, AxiosInterceptorOptions, InternalAxiosRequestConfig, HeadersDefaults, AxiosInstance, ResponseType } from 'axios';
2
2
 
3
- interface AxleRequestConfig<D = any> extends AxiosRequestConfig<D> {
3
+ interface AxleRequestConfig<D = any, E = Record<string, any>> extends AxiosRequestConfig<D> {
4
+ extra?: E;
4
5
  }
5
6
 
6
7
  type FetchRunner = <R = AxiosResponse, P = Record<string, any>, D = Record<string, any>>(url: string, params?: P, config?: AxleRequestConfig<D>) => Promise<R>;
@@ -56,8 +57,8 @@ type AxleInstance = {
56
57
  useResponseInterceptor(...interceptors: ResponseInterceptor[]): void;
57
58
  axios: AxiosInstance;
58
59
  };
59
- declare function createFetchRunner(service: AxiosInstance, method: FetchMethod, responseType: ResponseType): <R = AxiosResponse<any, any>, P = Record<string, any>, D = Record<string, any>>(url: string, params?: P | undefined, config?: AxleRequestConfig<D> | undefined) => Promise<R>;
60
- declare function createModifyRunner(service: AxiosInstance, method: ModifyMethod, contentType: 'application/json' | 'multipart/form-data' | 'application/x-www-form-urlencoded'): <R = AxiosResponse<any, any>, P = Record<string, any>, D = Record<string, any>>(url: string, params?: P | undefined, config?: AxleRequestConfig<D> | undefined) => Promise<R>;
60
+ declare function createFetchRunner(service: AxiosInstance, method: FetchMethod, responseType: ResponseType): <R = AxiosResponse<any, any>, P = Record<string, any>, D = Record<string, any>>(url: string, params?: P | undefined, config?: AxleRequestConfig<D, Record<string, any>> | undefined) => Promise<R>;
61
+ declare function createModifyRunner(service: AxiosInstance, method: ModifyMethod, contentType: 'application/json' | 'multipart/form-data' | 'application/x-www-form-urlencoded'): <R = AxiosResponse<any, any>, P = Record<string, any>, D = Record<string, any>>(url: string, params?: P | undefined, config?: AxleRequestConfig<D, Record<string, any>> | undefined) => Promise<R>;
61
62
  declare function createAxle(config?: AxleRequestConfig): AxleInstance;
62
63
 
63
64
  export { AxleRequestConfig as A, FetchRunner as F, Interceptor as I, ModifyRunner as M, RequestInterceptor as R, ResponseInterceptor as a, FetchMethod as b, ModifyMethod as c, RunnerMethod as d, AxleInstance as e, createFetchRunner as f, createModifyRunner as g, createAxle as h };
package/lib/use.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Ref, WritableComputedRef } from 'vue';
2
- import { A as AxleRequestConfig, d as RunnerMethod, e as AxleInstance } from './instance-ab0b388e.js';
2
+ import { A as AxleRequestConfig, d as RunnerMethod, e as AxleInstance } from './instance-857fe07c.js';
3
3
  import 'axios';
4
4
 
5
5
  declare function useValues<T extends Ref<any>[]>(...valueCollection: T): WritableComputedRef<T[number]['value'][]>;
package/lib/use.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Ref, WritableComputedRef } from 'vue';
2
- import { A as AxleRequestConfig, d as RunnerMethod, e as AxleInstance } from './instance-ab0b388e.js';
2
+ import { A as AxleRequestConfig, d as RunnerMethod, e as AxleInstance } from './instance-857fe07c.js';
3
3
  import 'axios';
4
4
 
5
5
  declare function useValues<T extends Ref<any>[]>(...valueCollection: T): WritableComputedRef<T[number]['value'][]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/axle",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Progressive request tool based on axios",
5
5
  "keywords": [
6
6
  "axle",