hevy-shared 1.0.986 → 1.0.987

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.
@@ -32,6 +32,7 @@ export interface HTTPResponse<T = unknown> {
32
32
  export interface HTTPError<T = unknown> extends Error {
33
33
  response: HTTPResponse<T>;
34
34
  }
35
+ export declare const HTTP_METHODS: readonly ["get", "delete", "head", "options", "post", "put", "patch"];
35
36
  export declare const isHTTPError: <T = unknown>(e: unknown) => e is HTTPError<T>;
36
37
  export declare const isHTTPErrorResponse: (response: HTTPResponse<unknown>) => response is HTTPResponse<{
37
38
  error: string;
@@ -1,6 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isHTTPErrorResponse = exports.isHTTPError = void 0;
3
+ exports.isHTTPErrorResponse = exports.isHTTPError = exports.HTTP_METHODS = void 0;
4
+ exports.HTTP_METHODS = [
5
+ 'get',
6
+ 'delete',
7
+ 'head',
8
+ 'options',
9
+ 'post',
10
+ 'put',
11
+ 'patch',
12
+ ];
4
13
  const isHTTPError = (e) => {
5
14
  return (e instanceof Error &&
6
15
  'response' in e &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-shared",
3
- "version": "1.0.986",
3
+ "version": "1.0.987",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",