axios-annotations 1.3.1 → 1.3.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/decorator/abort-source.d.ts +2 -2
- package/decorator/delete-mapping.d.ts +1 -3
- package/decorator/get-mapping.d.ts +1 -3
- package/decorator/ignore-residual-params.d.ts +1 -3
- package/decorator/patch-mapping.d.ts +1 -3
- package/decorator/post-mapping.d.ts +1 -3
- package/decorator/put-mapping.d.ts +1 -1
- package/decorator/request-body.d.ts +1 -1
- package/decorator/request-config.d.ts +27 -5
- package/decorator/request-header.d.ts +1 -5
- package/decorator/request-mapping.d.ts +1 -6
- package/decorator/request-param.d.ts +1 -3
- package/decorator/request-with.d.ts +1 -3
- package/lib/plugins/cache/index.js +1 -0
- package/package.json +1 -1
- package/plugins/cache/index.js +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {CancelToken} from "axios";
|
|
2
2
|
|
|
3
3
|
export class AbortControllerAdapter {
|
|
4
4
|
constructor(CancelToken: CancelToken);
|
|
@@ -6,4 +6,4 @@ export class AbortControllerAdapter {
|
|
|
6
6
|
abort(reason?: string): void;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export default function AbortSource(abortController: (AbortController | AbortControllerAdapter) | ((...args: any[]) => (AbortController | AbortControllerAdapter))): (() =>
|
|
9
|
+
export default function AbortSource(abortController: (AbortController | AbortControllerAdapter) | ((...args: any[]) => (AbortController | AbortControllerAdapter))): ((target: any) => any);
|
|
@@ -1,7 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Config from "../core/config";
|
|
3
|
-
import Service from "../core/service";
|
|
1
|
+
import {AxiosInstance, AxiosRequestConfig} from "axios";
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
declare class Config {
|
|
4
|
+
constructor(protocol?: string, host?: string, port?: number, prefix?: string, plugins?: ((config: Config) => void)[]);
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
static forName(name: string): Config;
|
|
7
|
+
|
|
8
|
+
host: string;
|
|
9
|
+
|
|
10
|
+
port: number | null | string;
|
|
11
|
+
|
|
12
|
+
protocol: string;
|
|
13
|
+
|
|
14
|
+
prefix: string;
|
|
15
|
+
|
|
16
|
+
origin: string;
|
|
17
|
+
|
|
18
|
+
baseURL: string;
|
|
19
|
+
|
|
20
|
+
axios: AxiosInstance;
|
|
21
|
+
|
|
22
|
+
plugins: ((config: Config) => void)[];
|
|
23
|
+
|
|
24
|
+
register(name: string): Config;
|
|
25
|
+
|
|
26
|
+
unregister(): Config;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default function RequestConfig(config: Config | ((...args: any[]) => Partial<AxiosRequestConfig>) | Partial<AxiosRequestConfig>): ((target: any) => any);
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default function RequestHeader(header: string, value: string): (() => AxiosPromise<any>);
|
|
4
|
-
|
|
5
|
-
export default function RequestHeader(header: string, value: ((...args: any[]) => string)): (() => AxiosPromise<any>);
|
|
1
|
+
export default function RequestHeader(header: string, value: string | ((...args: any[]) => string)): ((target: any) => any);
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import Service from "../core/service";
|
|
3
|
-
|
|
4
|
-
export default function RequestMapping(path: string, method: string): (() => AxiosPromise<any>);
|
|
5
|
-
|
|
6
|
-
export default function RequestMapping(path: string): (() => Service);
|
|
1
|
+
export default function RequestMapping(path: string, method?: string): ((target: any) => any);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function CachePlugin(){return function(e){var t=e.axios.defaults.adapter;e.axios.defaults.adapter=function(e){return t(e)}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=CachePlugin;
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib/plugins/cache/index");
|