@vonage/vetch
Advanced tools
Comparing version 3.0.0-beta.1 to 3.0.0-beta.3
@@ -1,6 +0,6 @@ | ||
export declare class VetchError<T = any> extends Error { | ||
export declare class VetchError extends Error { | ||
code?: string; | ||
response?: VetchResponse<T>; | ||
response?: VetchResponse; | ||
config: VetchOptions; | ||
constructor(message: string, options: VetchOptions, response: VetchResponse<T>); | ||
constructor(message: string, options: VetchOptions, response: VetchResponse); | ||
} | ||
@@ -13,7 +13,7 @@ export interface Headers { | ||
} | ||
export declare type VetchPromise<T = any> = Promise<VetchResponse<T>>; | ||
export declare type VetchPromise = Promise<VetchResponse>; | ||
export declare const VetchPromise: PromiseConstructor; | ||
export interface VetchResponse<T = any> { | ||
export interface VetchResponse { | ||
config: VetchOptions; | ||
data: T; | ||
data: any; | ||
status: number; | ||
@@ -39,3 +39,3 @@ statusText: string; | ||
export interface VetchOptions { | ||
adapter?: <T = any>(options: VetchOptions, defaultAdapter: (options: VetchOptions) => VetchPromise<T>) => VetchPromise<T>; | ||
adapter?: <T = any>(options: VetchOptions, defaultAdapter: (options: VetchOptions) => VetchPromise) => VetchPromise; | ||
url?: string; | ||
@@ -42,0 +42,0 @@ baseUrl?: string; |
@@ -6,2 +6,2 @@ import { VetchOptions } from './common'; | ||
export declare const instance: Vetch; | ||
export declare function request<T>(opts: VetchOptions): Promise<import("./common").VetchResponse<T>>; | ||
export declare function request<T>(opts: VetchOptions): Promise<import("./common").VetchResponse>; |
@@ -6,3 +6,3 @@ import { VetchOptions, VetchPromise } from './common'; | ||
private _defaultAdapter; | ||
request<T = any>(opts?: VetchOptions): VetchPromise<T>; | ||
request<T = any>(opts?: VetchOptions): VetchPromise; | ||
private getResponseData; | ||
@@ -9,0 +9,0 @@ private validateOpts; |
{ | ||
"name": "@vonage/vetch", | ||
"version": "3.0.0-beta.1", | ||
"version": "3.0.0-beta.3", | ||
"description": "Vonage package for server side fetch.", | ||
@@ -32,3 +32,3 @@ "author": "Kelly J Andrews <kelly@kellyjandrews.com>", | ||
}, | ||
"gitHead": "6d98fecdc7bb04854bc4a54576a434ce958596e6", | ||
"gitHead": "53aeb7325bf640f15f9003d132b5b49ef98aca39", | ||
"devDependencies": { | ||
@@ -35,0 +35,0 @@ "@types/lodash": "^4.14.172", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28143