Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vonage/vetch

Package Overview
Dependencies
Maintainers
52
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vonage/vetch - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

dist/enums/contentType.d.ts

12

dist/enums/HTTPMethods.d.ts

@@ -0,11 +1,15 @@

/**
* Enum representing the HTTP methods that can be used for Vonage API requests.
*/
export declare enum HTTPMethods {
/** Represents an HTTP GET request. */
GET = "GET",
HEAD = "HEAD",
/** Represents an HTTP POST request. */
POST = "POST",
/** Represents an HTTP DELETE request. */
DELETE = "DELETE",
/** Represents an HTTP PUT request. */
PUT = "PUT",
CONNECT = "CONNECT",
OPTIONS = "OPTIONS",
TRACE = "TRACE",
/** Represents an HTTP PATCH request. */
PATCH = "PATCH"
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HTTPMethods = void 0;
/**
* Enum representing the HTTP methods that can be used for Vonage API requests.
*/
var HTTPMethods;
(function (HTTPMethods) {
/** Represents an HTTP GET request. */
HTTPMethods["GET"] = "GET";
HTTPMethods["HEAD"] = "HEAD";
/** Represents an HTTP POST request. */
HTTPMethods["POST"] = "POST";
/** Represents an HTTP DELETE request. */
HTTPMethods["DELETE"] = "DELETE";
/** Represents an HTTP PUT request. */
HTTPMethods["PUT"] = "PUT";
HTTPMethods["CONNECT"] = "CONNECT";
HTTPMethods["OPTIONS"] = "OPTIONS";
HTTPMethods["TRACE"] = "TRACE";
/** Represents an HTTP PATCH request. */
HTTPMethods["PATCH"] = "PATCH";
})(HTTPMethods || (exports.HTTPMethods = HTTPMethods = {}));
//# sourceMappingURL=HTTPMethods.js.map

@@ -0,5 +1,20 @@

/**
* @deprecated
* Enum representing the expected response types for API requests. This was
* originaly used to set what the expected response type will be. It is better
* to use the content-type header from the response to decode properly.
*/
export declare enum ResponseTypes {
/**
* Represents a JSON-formatted response.
*/
json = "json",
/**
* Represents a stream response, typically for handling large data or files.
*/
stream = "stream",
/**
* Represents a plain text response.
*/
text = "text"
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResponseTypes = void 0;
/**
* @deprecated
* Enum representing the expected response types for API requests. This was
* originaly used to set what the expected response type will be. It is better
* to use the content-type header from the response to decode properly.
*/
var ResponseTypes;
(function (ResponseTypes) {
/**
* Represents a JSON-formatted response.
*/
ResponseTypes["json"] = "json";
/**
* Represents a stream response, typically for handling large data or files.
*/
ResponseTypes["stream"] = "stream";
/**
* Represents a plain text response.
*/
ResponseTypes["text"] = "text";
})(ResponseTypes || (exports.ResponseTypes = ResponseTypes = {}));
//# sourceMappingURL=responseTypes.js.map

@@ -1,11 +0,3 @@

import { Vetch } from './vetch';
import { VetchOptions } from './interfaces/vetchOptions';
export { Vetch, VetchOptions };
export declare const instance: Vetch;
export declare function request<T>(opts: VetchOptions): Promise<import("./interfaces/vetchResponse").VetchResponse<T>>;
export { VetchError } from './types/vetchError';
export { Headers } from './interfaces/headers';
export { VetchPromise } from './types/vetchPromise';
export { VetchResponse } from './interfaces/vetchResponse';
export { ResponseTypes } from './enums/responseTypes';
export * from './enums/HTTPMethods';
export * from './types';
export * from './enums';
export * from './errors/vetchError';

@@ -17,15 +17,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ResponseTypes = exports.VetchError = exports.request = exports.instance = exports.Vetch = void 0;
const vetch_1 = require("./vetch");
Object.defineProperty(exports, "Vetch", { enumerable: true, get: function () { return vetch_1.Vetch; } });
exports.instance = new vetch_1.Vetch();
async function request(opts) {
return exports.instance.request(opts);
}
exports.request = request;
var vetchError_1 = require("./types/vetchError");
Object.defineProperty(exports, "VetchError", { enumerable: true, get: function () { return vetchError_1.VetchError; } });
var responseTypes_1 = require("./enums/responseTypes");
Object.defineProperty(exports, "ResponseTypes", { enumerable: true, get: function () { return responseTypes_1.ResponseTypes; } });
__exportStar(require("./enums/HTTPMethods"), exports);
//# sourceMappingURL=index.js.map
__exportStar(require("./types"), exports);
__exportStar(require("./enums"), exports);
__exportStar(require("./errors/vetchError"), exports);

@@ -1,2 +0,11 @@

import { VetchResponse } from '../interfaces/vetchResponse';
import { VetchResponse } from './vetchResponse';
/**
* Type representing a promise that resolves with a standardized Vetch API
* response. Vetch ("Vonage Fetch") ensures a consistent API response
* structure, irrespective of the HTTP adapter utilized by the developer.
*
* @deprecated
*
* @template T - The type of the data payload in the VetchResponse, expected to be an object that has been decoded from JSON or WebForm.
*/
export type VetchPromise<T> = Promise<VetchResponse<T>>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=vetchPromise.js.map
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@vonage/vetch",
"version": "1.6.0",
"description": "Vonage package for server side fetch.",
"version": "1.7.0",
"description": "Vonage's type and enum definitions module for server-side HTTP interactions.",
"homepage": "https://github.com/vonage/vonage-node-sdk/tree/master/packages/vetch#readme",

@@ -14,3 +15,16 @@ "bugs": {

"license": "Apache-2.0",
"author": "Kelly J Andrews <kelly@kellyjandrews.com>",
"contributors": [
{
"name": "Kelly J Andrews",
"url": "https://github.com/kellyjandrews"
},
{
"name": "Chris Tankersley",
"url": "https://github.com/dragonmantank"
},
{
"name": "Chuck \"MANCHUCK\" Reeves",
"url": "https://github.com/manchuck"
}
],
"main": "dist/index.js",

@@ -24,12 +38,8 @@ "types": "dist/index.d.ts",

"clean": "npx shx rm -rf dist tsconfig.tsbuildinfo",
"compile": "npx tsc --build --verbose"
"compile": "npx tsc --build --verbose",
"prepublishOnly": "npm run build"
},
"dependencies": {
"debug": "^4.3.4",
"lodash.merge": "^4.6.2",
"node-fetch": "^2.2"
"node-fetch": "^2.7"
},
"devDependencies": {
"nock": "^13.3.4"
},
"publishConfig": {

@@ -36,0 +46,0 @@ "directory": "dist"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc