@foxford/services 1.4.8 → 1.4.9

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/index.d.ts CHANGED
@@ -61,14 +61,14 @@ export interface ApiResponse<T = any, R = T> {
61
61
  config: ApiRequestConfig;
62
62
  request?: any;
63
63
  }
64
- export interface ApiError<T = any> extends Error {
64
+ export type ApiError<T = any> = {
65
65
  config: ApiRequestConfig;
66
66
  code?: string;
67
67
  request?: any;
68
68
  response?: ApiResponse<T>;
69
69
  isApiError: boolean;
70
70
  toJSON: () => object;
71
- }
71
+ };
72
72
  export type ApiPromise<T = any, R = T> = Promise<ApiResponse<T, R>>;
73
73
  export interface CancelStatic {
74
74
  new (message?: string): Cancel;
@@ -129,7 +129,6 @@ export interface ResponseError {
129
129
  errorText: string;
130
130
  headers: ApiResponse["headers"];
131
131
  data: ApiResponse["data"];
132
- config?: ApiRequestConfig;
133
132
  }
134
133
  export type ApiErrorExtended = ApiError & {
135
134
  config: ApiRequestConfig & {
package/index.js.flow CHANGED
@@ -92,14 +92,14 @@ export interface ApiResponse<T = any, R = T> {
92
92
  config: ApiRequestConfig;
93
93
  request?: any;
94
94
  }
95
- export type ApiError<T = any> = {
95
+ export type ApiError<T = any> = {|
96
96
  config: ApiRequestConfig,
97
97
  code?: string,
98
98
  request?: any,
99
99
  response?: ApiResponse<T>,
100
100
  isApiError: boolean,
101
101
  toJSON: () => { [key: string]: any },
102
- } & Error;
102
+ |};
103
103
  export type ApiPromise<T = any, R = T> = Promise<ApiResponse<T, R>>;
104
104
  export interface CancelStatic {
105
105
  new(message?: string): Cancel;
@@ -175,7 +175,6 @@ export interface ResponseError {
175
175
  errorText: string;
176
176
  headers: $PropertyType<ApiResponse<>, "headers">;
177
177
  data: $PropertyType<ApiResponse<>, "data">;
178
- config?: ApiRequestConfig;
179
178
  }
180
179
  export type ApiErrorExtended = {|
181
180
  ...ApiError<>,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxford/services",
3
- "version": "1.4.8",
3
+ "version": "1.4.9",
4
4
  "description": "Foxford services",
5
5
  "keywords": [
6
6
  "foxford",
@@ -53,5 +53,5 @@
53
53
  "README.md"
54
54
  ],
55
55
  "sideEffects": false,
56
- "sha": "8e10b356"
56
+ "sha": "87ba97c8"
57
57
  }