go-mokapi 0.51.2 → 0.53.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "go-mokapi",
3
- "version": "0.51.2",
3
+ "version": "0.53.0",
4
4
  "description": "Easy and flexible API mocking",
5
5
  "homepage": "https://mokapi.io",
6
6
  "repository": {
package/types/http.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import { JSONValue } from ".";
2
-
3
1
  /**
4
2
  * Make GET request.
5
3
  * https://mokapi.io/docs/javascript-api/mokapi-http/get
@@ -23,7 +21,7 @@ export function get(url: string, args?: Args): Response;
23
21
  * headers: { 'Content-Type': "application/json" }
24
22
  * })
25
23
  */
26
- export function post(url: string, body?: JSONValue, args?: Args): Response;
24
+ export function post(url: string, body?: any, args?: Args): Response;
27
25
 
28
26
  /**
29
27
  * Make PUT request.
@@ -37,7 +35,7 @@ export function post(url: string, body?: JSONValue, args?: Args): Response;
37
35
  * headers: { 'Content-Type': "application/json" }
38
36
  * })
39
37
  */
40
- export function put(url: string, body?: JSONValue, args?: Args): Response;
38
+ export function put(url: string, body?: any, args?: Args): Response;
41
39
 
42
40
  /**
43
41
  * Make HEAD request.
@@ -60,7 +58,7 @@ export function head(url: string, args?: Args): Response;
60
58
  * @example
61
59
  * patch("https://foo.bar/foo")
62
60
  */
63
- export function patch(url: string, body?: JSONValue, args?: Args): Response;
61
+ export function patch(url: string, body?: any, args?: Args): Response;
64
62
 
65
63
  /**
66
64
  * Make PATCH request.
@@ -72,7 +70,7 @@ export function patch(url: string, body?: JSONValue, args?: Args): Response;
72
70
  * @example
73
71
  * del("https://foo.bar/foo")
74
72
  */
75
- export function del(url: string, body?: JSONValue, args?: Args): Response;
73
+ export function del(url: string, body?: any, args?: Args): Response;
76
74
 
77
75
  /**
78
76
  * Make OPTIONS request.
@@ -84,7 +82,7 @@ export function del(url: string, body?: JSONValue, args?: Args): Response;
84
82
  * @example
85
83
  * options("https://foo.bar/foo")
86
84
  */
87
- export function options(url: string, body?: JSONValue, args?: Args): Response;
85
+ export function options(url: string, body?: any, args?: Args): Response;
88
86
 
89
87
  /**
90
88
  * Sends an HTTP request and returns a Promise resolving to the response.
@@ -224,5 +222,5 @@ export interface Response {
224
222
  * const res = get(url)
225
223
  * res.json()
226
224
  */
227
- json(): JSONValue;
225
+ json(): any;
228
226
  }