api-def 0.6.0-alpha16 → 0.6.0-alpha18

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/cjs/Api.d.ts CHANGED
@@ -28,4 +28,5 @@ export declare class Api implements ApiInfo {
28
28
  post: <R = unknown>(path: string, config: RequestConfig) => Promise<ApiResponse<R>>;
29
29
  put: <R = unknown>(path: string, config: RequestConfig) => Promise<ApiResponse<R>>;
30
30
  delete: <R = unknown>(path: string, config: RequestConfig) => Promise<ApiResponse<R>>;
31
+ patch: <R = unknown>(path: string, config: RequestConfig) => Promise<ApiResponse<R>>;
31
32
  }
package/cjs/Api.js CHANGED
@@ -98,6 +98,7 @@ var Api = /** @class */ (function () {
98
98
  this.post = this.hotRequest(ApiConstants_1.RequestMethod.POST);
99
99
  this.put = this.hotRequest(ApiConstants_1.RequestMethod.PUT);
100
100
  this.delete = this.hotRequest(ApiConstants_1.RequestMethod.DELETE);
101
+ this.patch = this.hotRequest(ApiConstants_1.RequestMethod.PATCH);
101
102
  this.name = info.name;
102
103
  this.baseUrl = info.baseUrl;
103
104
  this.middleware = info.middleware || [];
@@ -8,6 +8,7 @@ export declare const RequestMethod: {
8
8
  readonly GET: "get";
9
9
  readonly PUT: "put";
10
10
  readonly DELETE: "delete";
11
+ readonly PATCH: "patch";
11
12
  };
12
13
  export declare type RequestMethod = EnumOf<typeof RequestMethod>;
13
14
  export declare const RequestEvent: {
@@ -10,6 +10,7 @@ exports.RequestMethod = {
10
10
  GET: "get",
11
11
  PUT: "put",
12
12
  DELETE: "delete",
13
+ PATCH: "patch",
13
14
  };
14
15
  exports.RequestEvent = {
15
16
  /** @deprecated use 'BEFORE_SEND' */
@@ -19,6 +19,7 @@ var convertToRequestError = function (config) {
19
19
  response: response,
20
20
  code: code,
21
21
  isRequestError: true,
22
+ toJSON: undefined,
22
23
  });
23
24
  };
24
25
  exports.convertToRequestError = convertToRequestError;
package/esm/Api.d.ts CHANGED
@@ -28,4 +28,5 @@ export declare class Api implements ApiInfo {
28
28
  post: <R = unknown>(path: string, config: RequestConfig) => Promise<ApiResponse<R>>;
29
29
  put: <R = unknown>(path: string, config: RequestConfig) => Promise<ApiResponse<R>>;
30
30
  delete: <R = unknown>(path: string, config: RequestConfig) => Promise<ApiResponse<R>>;
31
+ patch: <R = unknown>(path: string, config: RequestConfig) => Promise<ApiResponse<R>>;
31
32
  }
package/esm/Api.js CHANGED
@@ -92,6 +92,7 @@ var Api = /** @class */ (function () {
92
92
  this.post = this.hotRequest(RequestMethod.POST);
93
93
  this.put = this.hotRequest(RequestMethod.PUT);
94
94
  this.delete = this.hotRequest(RequestMethod.DELETE);
95
+ this.patch = this.hotRequest(RequestMethod.PATCH);
95
96
  this.name = info.name;
96
97
  this.baseUrl = info.baseUrl;
97
98
  this.middleware = info.middleware || [];
@@ -8,6 +8,7 @@ export declare const RequestMethod: {
8
8
  readonly GET: "get";
9
9
  readonly PUT: "put";
10
10
  readonly DELETE: "delete";
11
+ readonly PATCH: "patch";
11
12
  };
12
13
  export declare type RequestMethod = EnumOf<typeof RequestMethod>;
13
14
  export declare const RequestEvent: {
@@ -7,6 +7,7 @@ export var RequestMethod = {
7
7
  GET: "get",
8
8
  PUT: "put",
9
9
  DELETE: "delete",
10
+ PATCH: "patch",
10
11
  };
11
12
  export var RequestEvent = {
12
13
  /** @deprecated use 'BEFORE_SEND' */
@@ -15,5 +15,6 @@ export var convertToRequestError = function (config) {
15
15
  response: response,
16
16
  code: code,
17
17
  isRequestError: true,
18
+ toJSON: undefined,
18
19
  });
19
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-def",
3
- "version": "0.6.0-alpha16",
3
+ "version": "0.6.0-alpha18",
4
4
  "description": "Typed API definitions with middleware support",
5
5
  "main": "cjs/index.js",
6
6
  "types": "esm/index.d.ts",