🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@types/hapi__wreck

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/hapi__wreck - npm Package Compare versions

Comparing version
15.0.1
to
17.0.0
+8
-36
hapi__wreck/package.json
{
"name": "@types/hapi__wreck",
"version": "15.0.1",
"description": "TypeScript definitions for @hapi/wreck",
"license": "MIT",
"contributors": [
{
"name": "Marcin Porębski",
"url": "https://github.com/marcinporebski",
"githubUsername": "marcinporebski"
},
{
"name": "Rodrigo Saboya",
"url": "https://github.com/saboya",
"githubUsername": "saboya"
},
{
"name": "Silas Rech",
"url": "https://github.com/lenovouser",
"githubUsername": "lenovouser"
},
{
"name": "Geoff Goodman",
"url": "https://github.com/ggoodman",
"githubUsername": "ggoodman"
}
],
"version": "17.0.0",
"typings": null,
"description": "Stub TypeScript definitions entry for @hapi/wreck, which provides its own types definitions",
"main": "",
"types": "index",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/hapi__wreck"
},
"scripts": {},
"author": "",
"repository": "https://github.com/hapijs/wreck",
"license": "MIT",
"dependencies": {
"@types/hapi__boom": "*",
"@types/node": "*"
},
"typesPublisherContentHash": "61c72fe65071a73abf42c4eca99bc169ad42b6459c4591a2bb844567ec782879",
"typeScriptVersion": "2.4"
"hapi__wreck": "*"
}
}

@@ -1,16 +0,3 @@

# Installation
> `npm install --save @types/hapi__wreck`
This is a stub types definition for @hapi/wreck (https://github.com/hapijs/wreck).
# Summary
This package contains type definitions for @hapi/wreck (https://github.com/hapijs/wreck).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hapi__wreck
Additional Details
* Last updated: Thu, 20 Jun 2019 00:27:39 GMT
* Dependencies: @types/hapi__boom, @types/node
* Global values: none
# Credits
These definitions were written by Marcin Porębski <https://github.com/marcinporebski>, Rodrigo Saboya <https://github.com/saboya>, Silas Rech <https://github.com/lenovouser>, and Geoff Goodman <https://github.com/ggoodman>.
@hapi/wreck provides its own type definitions, so you don't need @types/hapi__wreck installed!
// Type definitions for @hapi/wreck 15.0
// Project: https://github.com/hapijs/wreck
// Definitions by: Marcin Porębski <https://github.com/marcinporebski>
// Rodrigo Saboya <https://github.com/saboya>
// Silas Rech <https://github.com/lenovouser>
// Geoff Goodman <https://github.com/ggoodman>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
/// <reference types="node" />
import * as Boom from "@hapi/boom";
import * as events from "events";
import * as http from "http";
import * as stream from "stream";
import * as Url from "url";
interface RequestOptions {
baseUrl?: string;
socketPath? : string;
payload?: any;
headers?: { [key: string]: any };
redirects?: number;
redirect303?: boolean;
beforeRedirect?: (redirectMethod: string, statusCode: number, location: string, resHeaders: { [key: string]: any }, redirectOptions: any, next: () => {}) => void;
redirected?: (statusCode: number, location: string, req: http.ClientRequest) => void;
timeout?: number;
maxBytes?: number;
rejectUnauthorized?: boolean;
downstreamRes?: any;
agent?: http.Agent | false;
secureProtocol?: string;
ciphers?: string;
events?: boolean;
}
interface ReadOptions {
timeout?: number;
json?: true | "strict" | "force";
gunzip?: boolean | "force";
maxBytes?: number;
}
interface RequestResponse {
res: http.IncomingMessage,
payload: any,
}
declare type RequestCallback = (uri: string, options: RequestOptions & { payload?: any }) => void;
declare type ResponseCallback = (err: Boom | undefined, details: { req: http.ClientRequest, res: http.IncomingMessage | undefined, start: number, url: Url.URL }) => void;
declare class WreckEventEmitter extends events.EventEmitter {
on(event: "request", listener: RequestCallback): this;
on(event: "response", listener: ResponseCallback): this;
}
interface WreckObject {
defaults: (options: RequestOptions) => WreckObject;
request: (method: string, uri: string, options: RequestOptions) => Promise<http.IncomingMessage> & { req: http.ClientRequest };
read: (response: http.IncomingMessage, options: ReadOptions) => Promise<any>;
get: (uri: string, options: RequestOptions & ReadOptions) => Promise<RequestResponse>;
post: (uri: string, options: RequestOptions & ReadOptions) => Promise<RequestResponse>;
patch: (uri: string, options: RequestOptions & ReadOptions) => Promise<RequestResponse>;
put: (uri: string, options: RequestOptions & ReadOptions) => Promise<RequestResponse>;
delete: (uri: string, options: RequestOptions & ReadOptions) => Promise<RequestResponse>;
toReadableStream: (payload: any, encoding?: string) => stream.Readable;
parseCacheControl: (field: string) => any;
agents: {
http: http.Agent,
https: http.Agent,
httpsAllowUnauthorized: http.Agent
};
events?: WreckEventEmitter;
}
declare var wreck: WreckObject;
export = wreck;