New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@har-sdk/types

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@har-sdk/types - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

dist/bundle.esm5.js

51

dist/bundle.umd.js

@@ -1,49 +0,2 @@

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@har-sdk/types'] = {}));
}(this, (function (exports) { 'use strict';
var dist = {};
(function (exports) {
exports.__esModule = true;
exports.OpenAPIV2 = exports.OpenAPIV3 = void 0;
(function (OpenAPIV3) {
(function (HttpMethods) {
HttpMethods["GET"] = "get";
HttpMethods["PUT"] = "put";
HttpMethods["POST"] = "post";
HttpMethods["DELETE"] = "delete";
HttpMethods["OPTIONS"] = "options";
HttpMethods["HEAD"] = "head";
HttpMethods["PATCH"] = "patch";
HttpMethods["TRACE"] = "trace";
})(OpenAPIV3.HttpMethods || (OpenAPIV3.HttpMethods = {}));
})(exports.OpenAPIV3 || (exports.OpenAPIV3 = {}));
(function (OpenAPIV2) {
(function (HttpMethods) {
HttpMethods["GET"] = "get";
HttpMethods["PUT"] = "put";
HttpMethods["POST"] = "post";
HttpMethods["DELETE"] = "delete";
HttpMethods["OPTIONS"] = "options";
HttpMethods["HEAD"] = "head";
HttpMethods["PATCH"] = "patch";
})(OpenAPIV2.HttpMethods || (OpenAPIV2.HttpMethods = {}));
})(exports.OpenAPIV2 || (exports.OpenAPIV2 = {}));
}(dist));
const isOASV2 = (doc) => doc.swagger !== undefined;
const isOASV3 = (doc) => doc.openapi !== undefined;
const isPostman = (doc) => doc.info.version !== undefined;
exports.__moduleExports = dist;
exports.isOASV2 = isOASV2;
exports.isOASV3 = isOASV3;
exports.isPostman = isPostman;
Object.defineProperty(exports, '__esModule', { value: true });
})));
var e,o;e=this,o=function(e,o){e.isOASV2=e=>void 0!==e.swagger,e.isOASV3=e=>void 0!==e.openapi,e.isPostman=e=>void 0!==e.info.version,Object.keys(o).forEach((function(i){"default"===i||e.hasOwnProperty(i)||Object.defineProperty(e,i,{enumerable:!0,get:function(){return o[i]}})}))},"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@har-sdk/core")):"function"==typeof define&&define.amd?define(["exports","@har-sdk/core"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self)["@har-sdk/types"]={},e.core);
//# sourceMappingURL=bundle.umd.js.map

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

import { OpenAPIV2, OpenAPIV3, OpenAPI, Postman } from './collection';
import { OpenAPIV2, OpenAPIV3, OpenAPI, Postman } from '@har-sdk/core';
declare type Document = OpenAPI.Document | Postman.Document;

@@ -3,0 +3,0 @@ export declare const isOASV2: (doc: Document) => doc is OpenAPIV2.Document<{}>;

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

export * from './collection';
export * from '@har-sdk/core';
export * from './helpers';

@@ -1,36 +0,3 @@

var dist = {};
(function (exports) {
exports.__esModule = true;
exports.OpenAPIV2 = exports.OpenAPIV3 = void 0;
(function (OpenAPIV3) {
(function (HttpMethods) {
HttpMethods["GET"] = "get";
HttpMethods["PUT"] = "put";
HttpMethods["POST"] = "post";
HttpMethods["DELETE"] = "delete";
HttpMethods["OPTIONS"] = "options";
HttpMethods["HEAD"] = "head";
HttpMethods["PATCH"] = "patch";
HttpMethods["TRACE"] = "trace";
})(OpenAPIV3.HttpMethods || (OpenAPIV3.HttpMethods = {}));
})(exports.OpenAPIV3 || (exports.OpenAPIV3 = {}));
(function (OpenAPIV2) {
(function (HttpMethods) {
HttpMethods["GET"] = "get";
HttpMethods["PUT"] = "put";
HttpMethods["POST"] = "post";
HttpMethods["DELETE"] = "delete";
HttpMethods["OPTIONS"] = "options";
HttpMethods["HEAD"] = "head";
HttpMethods["PATCH"] = "patch";
})(OpenAPIV2.HttpMethods || (OpenAPIV2.HttpMethods = {}));
})(exports.OpenAPIV2 || (exports.OpenAPIV2 = {}));
}(dist));
const isOASV2 = (doc) => doc.swagger !== undefined;
const isOASV3 = (doc) => doc.openapi !== undefined;
const isPostman = (doc) => doc.info.version !== undefined;
export { dist as __moduleExports, isOASV2, isOASV3, isPostman };
export * from '@har-sdk/core';
export * from './helpers';
//# sourceMappingURL=index.js.map
{
"name": "@har-sdk/types",
"version": "1.0.0",
"version": "1.1.0",
"private": false,

@@ -24,5 +24,6 @@ "repository": {

"main": "./dist/bundle.umd.js",
"module": "./dist/index.js",
"typings": "./dist/index.d.ts",
"homepage": "https://github.com/NeuraLegion/har-sdk#readme",
"module": "./dist/bundle.esm5.js",
"es2015": "./dist/index.js",
"types": "./dist/index.d.ts",
"homepage": "https://github.com/NeuraLegion/har-sdk/tree/master/packages/types#readme",
"scripts": {

@@ -33,4 +34,4 @@ "prebuild": "npm run compile -- --clean",

"compile": "tsc -b tsconfig.build.json",
"lint": "eslint -c .eslintrc.js --ignore-path ../../.eslintignore . --ext ts --fix",
"format": "prettier --ignore-path ../../.prettierignore --check **/*.ts"
"lint": "eslint --ignore-path ../../.eslintignore .",
"format": "prettier --ignore-path ../../.prettierignore --check ."
},

@@ -40,11 +41,9 @@ "keywords": [

"postman",
"types",
"yml",
"yaml",
"har",
"json"
"oas",
"openapi",
"har"
],
"dependencies": {
"openapi-types": "^9.0.3"
"@har-sdk/core": "1.0.0"
}
}
# @har-sdk/types
**THIS PACKAGE HAS BEEN DEPRECATED. THE DEVELOPMENT HAS MOVED TO A [@HAR-SDK/CORE](https://github.com/NeuraLegion/har-sdk/tree/master/packages/oas#readme) PACKAGE**
Types for OpenAPI and Postman documents

@@ -14,23 +16,14 @@

```ts
import { { OpenAPI, OpenAPIV2, OpenAPIV3, Postman, Collection } } from '@har-sdk/types';
import { OpenAPIV2, isOASV2 } from '@har-sdk/types';
function process(doc: Collection.Document) {};
const apiDoc = {
swagger: '2.0',
host: 'localhost',
info: {
title: 'Some valid API document'
},
paths: {}
} as OpenAPIV2.Document;
function processOpenAPI(doc: OpenAPI.Document) {};
function processOpenAPIV2(doc: OpenAPIV2.Document) {};
function processOPENAPIV3(doc: OpenAPIV3.Document) {};
function processPostman(doc: Postman.Document) {};
isOASV2(apiDoc); // returns true
```
## API
`Collection` - describes all types (OpenAPI and Postman)
`OpenAPI` - describes OpenAPI types (OpenAPIV2, OpenAPIV3)
`isOASV2(doc: Collection.Document)` - Checks if OpenAPIV2
`isOASV3(doc: Collection.Document)` - Checks if OpenAPIV3
`isPostman(doc: Collection.Document)` - Checks if Postman

Sorry, the diff of this file is not supported yet

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