@types/superagent
Advanced tools
Comparing version 3.5.2 to 3.5.3
@@ -5,2 +5,3 @@ // Type definitions for SuperAgent 3.5 | ||
// Michael Ledin <https://github.com/mxl/> | ||
// Pap Lőrinc <https://github.com/paplorinc/> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -25,5 +26,5 @@ // TypeScript Version: 2.2 | ||
cookies: string; | ||
method: string; | ||
url: string; | ||
cookies: string; | ||
} | ||
@@ -39,63 +40,61 @@ interface SuperAgentStatic extends SuperAgent<SuperAgentRequest> { | ||
interface SuperAgent<Req> extends stream.Stream { | ||
interface SuperAgent<Req extends SuperAgentRequest> extends stream.Stream { | ||
attachCookies(req: Req): void; | ||
checkout(url: string, callback?: CallbackHandler): Req; | ||
connect(url: string, callback?: CallbackHandler): Req; | ||
copy(url: string, callback?: CallbackHandler): Req; | ||
del(url: string, callback?: CallbackHandler): Req; | ||
delete(url: string, callback?: CallbackHandler): Req; | ||
get(url: string, callback?: CallbackHandler): Req; | ||
post(url: string, callback?: CallbackHandler): Req; | ||
put(url: string, callback?: CallbackHandler): Req; | ||
head(url: string, callback?: CallbackHandler): Req; | ||
del(url: string, callback?: CallbackHandler): Req; | ||
delete(url: string, callback?: CallbackHandler): Req; | ||
options(url: string, callback?: CallbackHandler): Req; | ||
trace(url: string, callback?: CallbackHandler): Req; | ||
copy(url: string, callback?: CallbackHandler): Req; | ||
lock(url: string, callback?: CallbackHandler): Req; | ||
merge(url: string, callback?: CallbackHandler): Req; | ||
mkactivity(url: string, callback?: CallbackHandler): Req; | ||
mkcol(url: string, callback?: CallbackHandler): Req; | ||
move(url: string, callback?: CallbackHandler): Req; | ||
purge(url: string, callback?: CallbackHandler): Req; | ||
notify(url: string, callback?: CallbackHandler): Req; | ||
options(url: string, callback?: CallbackHandler): Req; | ||
parse(fn: (res: Response, callback: (err: Error | null, body: any) => void) => void): this; | ||
patch(url: string, callback?: CallbackHandler): Req; | ||
post(url: string, callback?: CallbackHandler): Req; | ||
propfind(url: string, callback?: CallbackHandler): Req; | ||
proppatch(url: string, callback?: CallbackHandler): Req; | ||
unlock(url: string, callback?: CallbackHandler): Req; | ||
purge(url: string, callback?: CallbackHandler): Req; | ||
put(url: string, callback?: CallbackHandler): Req; | ||
report(url: string, callback?: CallbackHandler): Req; | ||
mkactivity(url: string, callback?: CallbackHandler): Req; | ||
checkout(url: string, callback?: CallbackHandler): Req; | ||
merge(url: string, callback?: CallbackHandler): Req; | ||
// m-search(url: string, callback?: CallbackHandler): Req; | ||
notify(url: string, callback?: CallbackHandler): Req; | ||
saveCookies(res: Response): void; | ||
search(url: string, callback?: CallbackHandler): Req; | ||
subscribe(url: string, callback?: CallbackHandler): Req; | ||
trace(url: string, callback?: CallbackHandler): Req; | ||
unlock(url: string, callback?: CallbackHandler): Req; | ||
unsubscribe(url: string, callback?: CallbackHandler): Req; | ||
patch(url: string, callback?: CallbackHandler): Req; | ||
search(url: string, callback?: CallbackHandler): Req; | ||
connect(url: string, callback?: CallbackHandler): Req; | ||
parse(fn: (res: Response, callback: (err: Error | null, body: any) => void) => void): this; | ||
saveCookies(res: Response): void; | ||
attachCookies(req: Req): void; | ||
} | ||
interface Response extends NodeJS.ReadableStream { | ||
text: string; | ||
accepted: boolean; | ||
badRequest: boolean; | ||
body: any; | ||
charset: string; | ||
clientError: boolean; | ||
error: Error; | ||
files: any; | ||
forbidden: boolean; | ||
get(header: string): string; | ||
header: any; | ||
type: string; | ||
charset: string; | ||
status: number; | ||
statusType: number; | ||
info: boolean; | ||
noContent: boolean; | ||
notAcceptable: boolean; | ||
notFound: boolean; | ||
ok: boolean; | ||
redirect: boolean; | ||
clientError: boolean; | ||
serverError: boolean; | ||
error: Error; | ||
accepted: boolean; | ||
noContent: boolean; | ||
badRequest: boolean; | ||
status: number; | ||
statusType: number; | ||
text: string; | ||
type: string; | ||
unauthorized: boolean; | ||
notAcceptable: boolean; | ||
notFound: boolean; | ||
forbidden: boolean; | ||
xhr: XMLHttpRequest; | ||
get(header: string): string; | ||
} | ||
interface Request extends Promise<Response> /* extends NodeJS.WritableStream */ { | ||
interface Request extends Promise<Response> { | ||
abort(): void; | ||
@@ -106,2 +105,4 @@ accept(type: string): this; | ||
buffer(val?: boolean): this; | ||
ca(cert: Buffer): this; | ||
cert(cert: Buffer | string): this; | ||
clearTimeout(): this; | ||
@@ -111,6 +112,10 @@ end(callback?: CallbackHandler): this; | ||
get(field: string): string; | ||
on(name: string, handler: (event: any) => void): this; | ||
key(cert: Buffer | string): this; | ||
ok(callback: (res: Response) => boolean): this; | ||
on(name: 'error', handler: (err: any) => void): this; | ||
on(name: 'progress', handler: (event: ProgressEvent) => void): this; | ||
on(name: string, handler: (event: any) => void): this; | ||
parse(fn: (res: Response, callback: (err: Error | null, body: any) => void) => void): this; | ||
part(): this; | ||
pfx(cert: Buffer | string): this; | ||
pipe(stream: NodeJS.WritableStream, options?: object): stream.Writable; | ||
@@ -120,6 +125,7 @@ query(val: object | string): this; | ||
responseType(type: string): this; | ||
retry(count?: number): this; | ||
send(data?: string | object): this; | ||
serialize(serializer: Serializer): this; | ||
set(field: object): this; | ||
set(field: string, val: string): this; | ||
set(field: object): this; | ||
timeout(ms: number | { deadline?: number, response?: number }): this; | ||
@@ -131,3 +137,2 @@ type(val: string): this; | ||
write(data: string | Buffer, encoding?: string): this; | ||
parse(fn: (res: Response, callback: (err: Error | null, body: any) => void) => void): this; | ||
} | ||
@@ -134,0 +139,0 @@ |
{ | ||
"name": "@types/superagent", | ||
"version": "3.5.2", | ||
"version": "3.5.3", | ||
"description": "TypeScript definitions for SuperAgent", | ||
@@ -14,2 +14,6 @@ "license": "MIT", | ||
"url": "https://github.com/mxl/" | ||
}, | ||
{ | ||
"name": "Pap Lőrinc", | ||
"url": "https://github.com/paplorinc/" | ||
} | ||
@@ -27,4 +31,4 @@ ], | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "a4ab88f96043a475c83bb85844a67251c4678e02b13c285887b0d4594c6b019a", | ||
"typesPublisherContentHash": "fac840a84c1d6aa0007bae6a12a868b2dffe8a2594f522faf65b90ffd9859921", | ||
"typeScriptVersion": "2.2" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Fri, 30 Jun 2017 21:28:46 GMT | ||
* Last updated: Wed, 12 Jul 2017 21:17:34 GMT | ||
* Dependencies: fs, https, stream, node | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Nico Zelaya <https://github.com/NicoZelaya/>, Michael Ledin <https://github.com/mxl/>. | ||
These definitions were written by Nico Zelaya <https://github.com/NicoZelaya/>, Michael Ledin <https://github.com/mxl/>, Pap Lőrinc <https://github.com/paplorinc/>. |
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
8270
129