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.
@@ -1,4 +1,4 @@
1
- import {AxiosPromise, CancelToken} from "axios";
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))): (() => AxiosPromise<any>);
9
+ export default function AbortSource(abortController: (AbortController | AbortControllerAdapter) | ((...args: any[]) => (AbortController | AbortControllerAdapter))): ((target: any) => any);
@@ -1,3 +1 @@
1
- import {AxiosPromise} from "axios";
2
-
3
- export default function DeleteMapping(path?: string): (() => AxiosPromise<any>);
1
+ export default function DeleteMapping(path?: string): ((target: any) => any);
@@ -1,3 +1 @@
1
- import {AxiosPromise} from "axios";
2
-
3
- export default function GetMapping(path?: string): (() => AxiosPromise<any>);
1
+ export default function GetMapping(path?: string): ((target: any) => any);
@@ -1,3 +1 @@
1
- import {AxiosPromise} from "axios";
2
-
3
- export default function IgnoreResidualParams(ignore?: boolean): (() => AxiosPromise<any>);
1
+ export default function IgnoreResidualParams(ignore?: boolean): ((target: any) => any);
@@ -1,3 +1 @@
1
- import {AxiosPromise} from "axios";
2
-
3
- export default function PatchMapping(path?: string): (() => AxiosPromise<any>);
1
+ export default function PatchMapping(path?: string): ((target: any) => any);
@@ -1,3 +1 @@
1
- import {AxiosPromise} from "axios";
2
-
3
- export default function PostMapping(path?: string): (() => AxiosPromise<any>);
1
+ export default function PostMapping(path?: string): ((target: any) => any);
@@ -1,3 +1,3 @@
1
1
  import {AxiosPromise} from "axios";
2
2
 
3
- export default function PutMapping(path?: string): (() => AxiosPromise<any>);
3
+ export default function PutMapping(path?: string): ((target: any) => any);
@@ -1,3 +1,3 @@
1
1
  import {AxiosPromise} from "axios";
2
2
 
3
- export default function RequestBody(name?: string): (() => AxiosPromise<any>);
3
+ export default function RequestBody(name?: string): ((target: any) => any);
@@ -1,7 +1,29 @@
1
- import {AxiosPromise, AxiosRequestConfig} from "axios";
2
- import Config from "../core/config";
3
- import Service from "../core/service";
1
+ import {AxiosInstance, AxiosRequestConfig} from "axios";
4
2
 
5
- export default function RequestConfig(config: Config): (() => Service);
3
+ declare class Config {
4
+ constructor(protocol?: string, host?: string, port?: number, prefix?: string, plugins?: ((config: Config) => void)[]);
6
5
 
7
- export default function RequestConfig(config: ((...args: any[]) => Partial<AxiosRequestConfig>) | Partial<AxiosRequestConfig>): (() => AxiosPromise<any>);
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
- import {AxiosPromise} from "axios";
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
- import {AxiosPromise} from "axios";
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);
@@ -1,3 +1 @@
1
- import {AxiosPromise} from "axios";
2
-
3
- export default function RequestParam(name: string, required?: boolean): (() => AxiosPromise<any>);
1
+ export default function RequestParam(name: string, required?: boolean): ((target: any) => any);
@@ -1,3 +1 @@
1
- import {AxiosPromise} from "axios";
2
-
3
- export default function RequestWith(registration: string): (() => AxiosPromise<any>);
1
+ export default function RequestWith(registration: 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axios-annotations",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@github.com/sitorhy/axios-annotations.git"
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib/plugins/cache/index");