From 836e57e76558b4a97189c4ccf65c751807db7655 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Fri, 1 Sep 2017 13:54:42 -0500 Subject: [PATCH 01/12] Update dts-gen example with proper command line option --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4b16884273..5631d78375 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ Your package should have this structure: | tsconfig.json | This allows you to run `tsc` within the package. | | tslint.json | Enables linting. | -Generate these by running `npm install -g dts-gen` and `dts-gen --dt --name my-package-name --template module`. +Generate these by running `npm install -g dts-gen` and `dts-gen --dt --name my-package-name --module module`. See all options at [dts-gen](https://github.com/Microsoft/dts-gen). You may edit the `tsconfig.json` to add new files, to add `"target": "es6"` (needed for async functions), to add to `"lib"`, or to add the `"jsx"` compiler option. From 722a3b0a0a4e04766cca4487c16b8b386a11ad62 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Wed, 14 Feb 2018 18:30:27 -0600 Subject: [PATCH 02/12] add dts-gen files --- types/postman-collection/index.d.ts | 5877 +++++++++++++++++ .../postman-collection-tests.ts | 0 types/postman-collection/tsconfig.json | 22 + types/postman-collection/tslint.json | 1 + 4 files changed, 5900 insertions(+) create mode 100644 types/postman-collection/index.d.ts create mode 100644 types/postman-collection/postman-collection-tests.ts create mode 100644 types/postman-collection/tsconfig.json create mode 100644 types/postman-collection/tslint.json diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts new file mode 100644 index 0000000000..92e39e82d2 --- /dev/null +++ b/types/postman-collection/index.d.ts @@ -0,0 +1,5877 @@ +// Type definitions for postman-collection 3.0 +// Project: https://github.com/postmanlabs/postman-collection#readme +// Definitions by: My Self +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export class Certificate { + constructor(options: any, ...args: any[]); + + canApplyTo(url: any): any; + + toJSON(): any; + + update(options: any): void; + + static isCertificate(obj: any): any; + +} + +export class CertificateList { + constructor(parent: any, list: any); + + resolveOne(url: any): any; + + static isCertificateList(obj: any): any; + +} + +export class Collection { + constructor(definition: any, environments: any); + + syncVariablesFrom(obj: any, track: any): any; + + syncVariablesTo(obj: any): any; + + toJSON(): any; + + static isCollection(obj: any): any; + +} + +export class Cookie { + constructor(options: any); + + update(options: any): void; + + valueOf(): any; + + static isCookie(obj: any): any; + + static parse(str: any): any; + + static splitParam(param: any): any; + +} + +export class Description { + constructor(definition: any); + + toJSON(): any; + + toString(): any; + + update(content: any, type: any): void; + + static isDescription(obj: any): any; + +} + +export class Event { + constructor(definition: any); + + update(definition: any): void; + +} + +export class EventList { + constructor(parent: any, populate: any); + + listeners(name: any): any; + + listenersOwn(name: any): any; + + static isEventList(obj: any): any; + +} + +export class FormParam { + constructor(options: any, ...args: any[]); + + toString(): any; + + valueOf(): any; + + static parse(): void; + +} + +export class Header { + constructor(options: any, name: any, ...args: any[]); + + toString(): any; + + update(options: any): void; + + valueOf(): any; + + static create(...args: any[]): any; + + static isHeader(obj: any): any; + + static parse(headerString: any): any; + + static parseSingle(header: any): any; + + static unparse(headers: any, separator: any): any; + + static unparseSingle(header: any): any; + +} + +export class HeaderList { + constructor(parent: any, headers: any); + + contentSize(): any; + + static isHeaderList(obj: any): any; + +} + +export class Item { + constructor(definition: any, ...args: any[]); + + authorizeRequestUsing(type: any, options: any): any; + + getAuth(): any; + + getEvents(name: any): any; + + static isItem(obj: any): any; + +} + +export class ItemGroup { + constructor(definition: any, ...args: any[]); + + authorizeRequestsUsing(type: any, options: any): void; + + forEachItem(callback: any): any; + + forEachItemGroup(callback: any): void; + + oneDeep(idOrName: any): any; + + static isItemGroup(obj: any): any; + +} + +export class Property { + constructor(definition: any, ...args: any[]); + + describe(content: any, type: any): void; + + toObjectResolved(scope: any, overrides: any, options: any): any; + + static replaceSubstitutions(str: any, variables: any, ...args: any[]): any; + + static replaceSubstitutionsIn(obj: any, variables: any, mutate: any): any; + +} + +export class PropertyBase { + constructor(definition: any); + + findInParents(property: any, customizer: any): any; + + findParentContaining(property: any, customizer: any): any; + + forEachParent(options: any, iterator: any): void; + + meta(...args: any[]): any; + + parent(): any; + + setParent(parent: any): void; + + toJSON(): any; + + static propertyIsMeta(value: any, key: any): any; + + static propertyUnprefixMeta(value: any, key: any): any; + + static toJSON(obj: any): any; + +} + +export class PropertyList { + constructor(type: any, parent: any, populate: any); + + add(item: any, ...args: any[]): void; + + all(): any; + + append(item: any): any; + + assimilate(source: any, prune: any): void; + + clear(): void; + + count(): any; + + each(iterator: any, context: any): void; + + eachParent(iterator: any, context: any): void; + + filter(rule: any, context: any): any; + + find(rule: any, context: any): any; + + get(key: any): any; + + has(item: any, value: any, ...args: any[]): any; + + idx(index: any): any; + + indexOf(item: any): any; + + insert(item: any, before: any): void; + + insertAfter(item: any, after: any): any; + + map(iterator: any, context: any): any; + + one(id: any): any; + + populate(items: any): void; + + prepend(item: any): any; + + remove(predicate: any, context: any, ...args: any[]): any; + + repopulate(items: any): void; + + toJSON(): any; + + toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + toString(): any; + + upsert(item: any): any; + + static isPropertyList(obj: any): any; + +} + +export class ProxyConfig { + constructor(options: any); + + getProtocols(): any; + + getProxyUrl(): any; + + test(urlStr: any): any; + + update(options: any): void; + + updateProtocols(protocols: any): void; + + static isProxyConfig(obj: any): any; + +} + +export class ProxyConfigList { + constructor(parent: any, populate: any); + + resolve(url: any): any; + + static isProxyConfigList(obj: any): any; + +} + +export class QueryParam { + constructor(options: any, ...args: any[]); + + toString(): any; + + update(param: any): void; + + valueOf(): any; + + static parse(query: any): any; + + static parseSingle(param: any, idx: any, all: any): any; + + static unparse(params: any, options: any): any; + + static unparseSingle(obj: any, encode: any): any; + +} + +export class Request { + constructor(options: any, ...args: any[]); + + addHeader(header: any): void; + + addQueryParams(params: any): void; + + authorize(): void; + + authorizeUsing(type: any, options: any): void; + + clone(): any; + + forEachHeader(callback: any): any; + + getHeaders(options: any): any; + + removeHeader(toRemove: any, options: any): any; + + removeQueryParams(params: any): void; + + toJSON(): any; + + update(options: any): void; + + upsertHeader(header: any): any; + + static isRequest(obj: any): any; + +} + +export class RequestAuth { + constructor(options: any, parent: any); + + clear(type: any): void; + + current(): any; + + parameters(): any; + + update(options: any, type: any): void; + + use(type: any, options: any): void; + + static isValidType(type: any): any; + +} + +export class RequestBody { + constructor(options: any, ...args: any[]); + + isEmpty(): any; + + toString(): any; + + update(options: any): void; + + static MODES: { + file: string; + formdata: string; + raw: string; + urlencoded: string; + }; + +} + +export class Response { + constructor(options: any, ...args: any[]); + + dataURI(): any; + + details(): any; + + encoding(): any; + + json(reviver: any, strict: any): any; + + mime(contentType: any, contentDisposition: any): any; + + reason(): any; + + size(): any; + + text(): any; + + toJSON(): any; + + update(options: any): void; + + static createFromNode(response: any, cookies: any): any; + + static isResponse(obj: any): any; + + static mimeInfo(type: any, disposition: any): any; + +} + +export class Script { + constructor(options: any, ...args: any[]); + + toSource(): any; + + update(options: any): void; + + static isScript(obj: any): any; + +} + +export class Url { + constructor(options: any, ...args: any[]); + + addQueryParams(params: any): void; + + getHost(): any; + + getOAuth1BaseUrl(): any; + + getPath(options: any): any; + + getPathWithQuery(): any; + + getQueryString(options: any): any; + + getRaw(): any; + + getRemote(options: any): any; + + removeQueryParams(params: any): any; + + toString(forceProtocol: any): any; + + update(url: any): any; + + static isUrl(obj: any): any; + + static parse(url: any): any; + +} + +export class UrlMatchPattern { + constructor(options: any, ...args: any[]); + + createMatchPattern(): any; + + getProtocols(): any; + + globPatternToRegexp(pattern: any): any; + + matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; + + matchAnyHost(matchRegexObject: any): any; + + matchSuffixHostPattern(matchRegexObject: any, remote: any): any; + + test(urlStr: any): any; + + testHost(host: any): any; + + testPath(path: any): any; + + testProtocol(protocol: any): any; + + toJSON(): any; + + toString(): any; + + update(options: any): void; + + static MATCH_ALL_URLS: string; + + static PROTOCOL_DELIMITER: string; + +} + +export class UrlMatchPatternList { + constructor(parent: any, list: any); + + test(urlStr: any): any; + +} + +export class Variable { + constructor(definition: any, ...args: any[]); + + cast(value: any): any; + + castIn(value: any): any; + + castOut(value: any): any; + + get(): any; + + set(value: any): void; + + toString(): any; + + update(options: any): void; + + valueOf(value: any, ...args: any[]): any; + + valueType(typeName: any, _noCast: any): any; + + static isVariable(obj: any): any; + +} + +export class VariableList { + constructor(parent: any, populate: any); + + replace(str: any, overrides: any): any; + + substitute(obj: any, overrides: any, mutate: any): any; + + syncFromObject(obj: any, track: any, prune: any): any; + + syncToObject(obj: any): any; + + static isVariableList(obj: any): any; + +} + +export class VariableScope { + constructor(definition: any, layers: any); + + addLayer(list: any): void; + + clear(): void; + + get(key: any): any; + + has(variableName: any): any; + + set(key: any, value: any, type: any): any; + + syncVariablesFrom(obj: any, track: any): any; + + syncVariablesTo(obj: any): any; + + toJSON(): any; + + toObject(excludeDisabled: any, caseSensitive: any): any; + + unset(key: any): void; + + variables(): any; + + static isVariableScope(obj: any): any; + +} + +export class Version { + constructor(options: any); + + set(value: any): void; + + toString(): any; + +} + +export function CookieList(parent: any, cookies: any): void; + +export namespace Certificate { + namespace isCertificate { + const prototype: { + }; + + } + + namespace prototype { + function canApplyTo(url: any): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(options: any): void; + + namespace canApplyTo { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace CertificateList { + namespace isCertificateList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function resolveOne(url: any): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace resolveOne { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace Collection { + namespace isCollection { + const prototype: { + }; + + } + + namespace prototype { + function authorizeRequestsUsing(type: any, options: any): void; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachItem(callback: any): any; + + function forEachItemGroup(callback: any): void; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function oneDeep(idOrName: any): any; + + function parent(): any; + + function setParent(parent: any): void; + + function syncVariablesFrom(obj: any, track: any): any; + + function syncVariablesTo(obj: any): any; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + namespace authorizeRequestsUsing { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachItem { + const prototype: { + }; + + } + + namespace forEachItemGroup { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace oneDeep { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace syncVariablesFrom { + const prototype: { + }; + + } + + namespace syncVariablesTo { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + } + +} + +export namespace Cookie { + namespace isCookie { + const prototype: { + }; + + } + + namespace parse { + const prototype: { + }; + + } + + namespace prototype { + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function update(options: any): void; + + function valueOf(): any; + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace valueOf { + const prototype: { + }; + + } + + } + + namespace splitParam { + const prototype: { + }; + + } + +} + +export namespace CookieList { + function isCookieList(obj: any): any; + + namespace isCookieList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace Description { + namespace format { + } + + namespace isDescription { + const prototype: { + }; + + } + + namespace prototype { + function toJSON(): any; + + function toString(): any; + + function update(content: any, type: any): void; + + namespace toJSON { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace Event { + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(definition: any): void; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace EventList { + namespace isEventList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function listeners(name: any): any; + + function listenersOwn(name: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace listeners { + const prototype: { + }; + + } + + namespace listenersOwn { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace FormParam { + namespace parse { + const prototype: { + }; + + } + + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toString(): any; + + function valueOf(): any; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace valueOf { + const prototype: { + }; + + } + + } + +} + +export namespace Header { + namespace create { + const prototype: { + }; + + } + + namespace isHeader { + const prototype: { + }; + + } + + namespace parse { + const prototype: { + }; + + } + + namespace parseSingle { + const prototype: { + }; + + } + + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toString(): any; + + function update(options: any): void; + + function valueOf(): any; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace valueOf { + const prototype: { + }; + + } + + } + + namespace unparse { + const prototype: { + }; + + } + + namespace unparseSingle { + const prototype: { + }; + + } + +} + +export namespace HeaderList { + namespace isHeaderList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function contentSize(): any; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace contentSize { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace Item { + namespace isItem { + const prototype: { + }; + + } + + namespace prototype { + function authorizeRequestUsing(type: any, options: any): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function getAuth(): any; + + function getEvents(name: any): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + namespace authorizeRequestUsing { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace getAuth { + const prototype: { + }; + + } + + namespace getEvents { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + } + +} + +export namespace ItemGroup { + namespace isItemGroup { + const prototype: { + }; + + } + + namespace prototype { + function authorizeRequestsUsing(type: any, options: any): void; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachItem(callback: any): any; + + function forEachItemGroup(callback: any): void; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function oneDeep(idOrName: any): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + namespace authorizeRequestsUsing { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachItem { + const prototype: { + }; + + } + + namespace forEachItemGroup { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace oneDeep { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + } + +} + +export namespace Property { + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + } + + namespace replaceSubstitutions { + const prototype: { + }; + + } + + namespace replaceSubstitutionsIn { + const prototype: { + }; + + } + +} + +export namespace PropertyBase { + namespace propertyIsMeta { + const prototype: { + }; + + } + + namespace propertyUnprefixMeta { + const prototype: { + }; + + } + + namespace prototype { + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + } + + namespace toJSON { + const prototype: { + }; + + } + +} + +export namespace PropertyList { + namespace isPropertyList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace ProxyConfig { + namespace isProxyConfig { + const prototype: { + }; + + } + + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function getProtocols(): any; + + function getProxyUrl(): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function test(urlStr: any): any; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(options: any): void; + + function updateProtocols(protocols: any): void; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace getProtocols { + const prototype: { + }; + + } + + namespace getProxyUrl { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace test { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace updateProtocols { + const prototype: { + }; + + } + + } + +} + +export namespace ProxyConfigList { + namespace isProxyConfigList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function resolve(url: any): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace resolve { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace QueryParam { + namespace parse { + const prototype: { + }; + + } + + namespace parseSingle { + const prototype: { + }; + + } + + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toString(): any; + + function update(param: any): void; + + function valueOf(): any; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace valueOf { + const prototype: { + }; + + } + + } + + namespace unparse { + const prototype: { + }; + + } + + namespace unparseSingle { + const prototype: { + }; + + } + +} + +export namespace Request { + namespace isRequest { + const prototype: { + }; + + } + + namespace prototype { + function addHeader(header: any): void; + + function addQueryParams(params: any): void; + + function authorize(): void; + + function authorizeUsing(type: any, options: any): void; + + function clone(): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachHeader(callback: any): any; + + function forEachParent(options: any, iterator: any): void; + + function getHeaders(options: any): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function removeHeader(toRemove: any, options: any): any; + + function removeQueryParams(params: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(options: any): void; + + function upsertHeader(header: any): any; + + namespace addHeader { + const prototype: { + }; + + } + + namespace addQueryParams { + const prototype: { + }; + + } + + namespace authorize { + const prototype: { + }; + + } + + namespace authorizeUsing { + const prototype: { + }; + + } + + namespace clone { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachHeader { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace getHeaders { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace removeHeader { + const prototype: { + }; + + } + + namespace removeQueryParams { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace upsertHeader { + const prototype: { + }; + + } + + } + +} + +export namespace RequestAuth { + namespace isValidType { + const prototype: { + }; + + } + + namespace prototype { + function clear(type: any): void; + + function current(): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parameters(): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(options: any, type: any): void; + + function use(type: any, options: any): void; + + namespace clear { + const prototype: { + }; + + } + + namespace current { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parameters { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace use { + const prototype: { + }; + + } + + } + +} + +export namespace RequestBody { + namespace prototype { + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function isEmpty(): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toString(): any; + + function update(options: any): void; + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace isEmpty { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace Response { + namespace createFromNode { + const prototype: { + }; + + } + + namespace isResponse { + const prototype: { + }; + + } + + namespace mimeInfo { + const prototype: { + }; + + } + + namespace prototype { + function dataURI(): any; + + function describe(content: any, type: any): void; + + function details(): any; + + function encoding(): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function json(reviver: any, strict: any): any; + + function meta(...args: any[]): any; + + function mime(contentType: any, contentDisposition: any): any; + + function parent(): any; + + function reason(): any; + + function setParent(parent: any): void; + + function size(): any; + + function text(): any; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(options: any): void; + + namespace dataURI { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace details { + const prototype: { + }; + + } + + namespace encoding { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace json { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace mime { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace reason { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace size { + const prototype: { + }; + + } + + namespace text { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace Script { + namespace isScript { + const prototype: { + }; + + } + + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toSource(): any; + + function update(options: any): void; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toSource { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace Url { + namespace isUrl { + const prototype: { + }; + + } + + namespace parse { + const prototype: { + }; + + } + + namespace prototype { + function addQueryParams(params: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function getHost(): any; + + function getOAuth1BaseUrl(): any; + + function getPath(options: any): any; + + function getPathWithQuery(): any; + + function getQueryString(options: any): any; + + function getRaw(): any; + + function getRemote(options: any): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function removeQueryParams(params: any): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toString(forceProtocol: any): any; + + function update(url: any): any; + + namespace addQueryParams { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace getHost { + const prototype: { + }; + + } + + namespace getOAuth1BaseUrl { + const prototype: { + }; + + } + + namespace getPath { + const prototype: { + }; + + } + + namespace getPathWithQuery { + const prototype: { + }; + + } + + namespace getQueryString { + const prototype: { + }; + + } + + namespace getRaw { + const prototype: { + }; + + } + + namespace getRemote { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace removeQueryParams { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace UrlMatchPattern { + namespace prototype { + function createMatchPattern(): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function getProtocols(): any; + + function globPatternToRegexp(pattern: any): any; + + function matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; + + function matchAnyHost(matchRegexObject: any): any; + + function matchSuffixHostPattern(matchRegexObject: any, remote: any): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function test(urlStr: any): any; + + function testHost(host: any): any; + + function testPath(path: any): any; + + function testProtocol(protocol: any): any; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toString(): any; + + function update(options: any): void; + + namespace createMatchPattern { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace getProtocols { + const prototype: { + }; + + } + + namespace globPatternToRegexp { + const prototype: { + }; + + } + + namespace matchAbsoluteHostPattern { + const prototype: { + }; + + } + + namespace matchAnyHost { + const prototype: { + }; + + } + + namespace matchSuffixHostPattern { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace test { + const prototype: { + }; + + } + + namespace testHost { + const prototype: { + }; + + } + + namespace testPath { + const prototype: { + }; + + } + + namespace testProtocol { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace UrlMatchPatternList { + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function test(urlStr: any): any; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace test { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace Variable { + namespace isVariable { + const prototype: { + }; + + } + + namespace prototype { + function cast(value: any): any; + + function castIn(value: any): any; + + function castOut(value: any): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function set(value: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toString(): any; + + function update(options: any): void; + + function valueOf(value: any, ...args: any[]): any; + + function valueType(typeName: any, _noCast: any): any; + + namespace cast { + const prototype: { + }; + + } + + namespace castIn { + const prototype: { + }; + + } + + namespace castOut { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace set { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace valueOf { + const prototype: { + }; + + } + + namespace valueType { + const prototype: { + }; + + } + + } + + namespace types { + class number { + constructor(p0: any); + + // Native method; no parameter or return type inference available + toExponential(p0: any): any; + + // Native method; no parameter or return type inference available + toFixed(p0: any): any; + + // Native method; no parameter or return type inference available + toLocaleString(): any; + + // Native method; no parameter or return type inference available + toPrecision(p0: any): any; + + // Native method; no parameter or return type inference available + toString(p0: any): any; + + // Native method; no parameter or return type inference available + valueOf(): any; + + static EPSILON: number; + + static MAX_SAFE_INTEGER: number; + + static MAX_VALUE: number; + + static MIN_SAFE_INTEGER: number; + + static MIN_VALUE: number; + + static NEGATIVE_INFINITY: number; + + static NaN: number; + + static POSITIVE_INFINITY: number; + + static isFinite(p0: any): any; + + static isInteger(p0: any): any; + + static isNaN(p0: any): any; + + static isSafeInteger(p0: any): any; + + static parseFloat(p0: any): any; + + static parseInt(p0: any, p1: any): any; + + } + + class string { + constructor(p0: any); + + // Native method; no parameter or return type inference available + anchor(p0: any): any; + + // Native method; no parameter or return type inference available + big(): any; + + // Native method; no parameter or return type inference available + blink(): any; + + // Native method; no parameter or return type inference available + bold(): any; + + // Native method; no parameter or return type inference available + charAt(p0: any): any; + + // Native method; no parameter or return type inference available + charCodeAt(p0: any): any; + + // Native method; no parameter or return type inference available + codePointAt(p0: any): any; + + // Native method; no parameter or return type inference available + concat(p0: any): any; + + // Native method; no parameter or return type inference available + endsWith(p0: any): any; + + // Native method; no parameter or return type inference available + fixed(): any; + + // Native method; no parameter or return type inference available + fontcolor(p0: any): any; + + // Native method; no parameter or return type inference available + fontsize(p0: any): any; + + // Native method; no parameter or return type inference available + includes(p0: any): any; + + // Native method; no parameter or return type inference available + indexOf(p0: any): any; + + // Native method; no parameter or return type inference available + italics(): any; + + // Native method; no parameter or return type inference available + lastIndexOf(p0: any): any; + + // Native method; no parameter or return type inference available + link(p0: any): any; + + // Native method; no parameter or return type inference available + localeCompare(p0: any): any; + + // Native method; no parameter or return type inference available + match(p0: any): any; + + // Native method; no parameter or return type inference available + normalize(): any; + + // Native method; no parameter or return type inference available + padEnd(p0: any): any; + + // Native method; no parameter or return type inference available + padStart(p0: any): any; + + // Native method; no parameter or return type inference available + repeat(p0: any): any; + + // Native method; no parameter or return type inference available + replace(p0: any, p1: any): any; + + // Native method; no parameter or return type inference available + search(p0: any): any; + + // Native method; no parameter or return type inference available + slice(p0: any, p1: any): any; + + // Native method; no parameter or return type inference available + small(): any; + + // Native method; no parameter or return type inference available + split(p0: any, p1: any): any; + + // Native method; no parameter or return type inference available + startsWith(p0: any): any; + + // Native method; no parameter or return type inference available + strike(): any; + + // Native method; no parameter or return type inference available + sub(): any; + + // Native method; no parameter or return type inference available + substr(p0: any, p1: any): any; + + // Native method; no parameter or return type inference available + substring(p0: any, p1: any): any; + + // Native method; no parameter or return type inference available + sup(): any; + + // Native method; no parameter or return type inference available + toLocaleLowerCase(): any; + + // Native method; no parameter or return type inference available + toLocaleUpperCase(): any; + + // Native method; no parameter or return type inference available + toLowerCase(): any; + + // Native method; no parameter or return type inference available + toString(): any; + + // Native method; no parameter or return type inference available + toUpperCase(): any; + + // Native method; no parameter or return type inference available + trim(): any; + + // Native method; no parameter or return type inference available + trimLeft(): any; + + // Native method; no parameter or return type inference available + trimRight(): any; + + // Native method; no parameter or return type inference available + valueOf(): any; + + static fromCharCode(p0: any): any; + + static fromCodePoint(p0: any): any; + + static raw(p0: any): any; + + } + + namespace any { + function out(val: any): any; + + namespace out { + // Too-deep object hierarchy from postman_collection.Variable.types.any.out + const prototype: any; + + } + + } + + namespace json { + function out(val: any): any; + + namespace out { + // Too-deep object hierarchy from postman_collection.Variable.types.json.out + const prototype: any; + + } + + } + + namespace number { + namespace prototype { + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const toExponential: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const toFixed: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const toLocaleString: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const toPrecision: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const toString: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const valueOf: any; + + } + + } + + namespace string { + namespace prototype { + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const anchor: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const big: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const blink: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const bold: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const charAt: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const charCodeAt: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const codePointAt: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const concat: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const endsWith: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const fixed: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const fontcolor: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const fontsize: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const includes: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const indexOf: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const italics: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const lastIndexOf: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const length: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const link: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const localeCompare: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const match: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const normalize: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const padEnd: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const padStart: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const repeat: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const replace: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const search: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const slice: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const small: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const split: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const startsWith: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const strike: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const sub: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const substr: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const substring: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const sup: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const toLocaleLowerCase: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const toLocaleUpperCase: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const toLowerCase: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const toString: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const toUpperCase: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const trim: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const trimLeft: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const trimRight: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const valueOf: any; + + } + + } + + } + +} + +export namespace VariableList { + namespace isVariableList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function replace(str: any, overrides: any): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function substitute(obj: any, overrides: any, mutate: any): any; + + function syncFromObject(obj: any, track: any, prune: any): any; + + function syncToObject(obj: any): any; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace replace { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace substitute { + const prototype: { + }; + + } + + namespace syncFromObject { + const prototype: { + }; + + } + + namespace syncToObject { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace VariableScope { + namespace isVariableScope { + const prototype: { + }; + + } + + namespace prototype { + function addLayer(list: any): void; + + function clear(): void; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(variableName: any): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function set(key: any, value: any, type: any): any; + + function setParent(parent: any): void; + + function syncVariablesFrom(obj: any, track: any): any; + + function syncVariablesTo(obj: any): any; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function unset(key: any): void; + + function variables(): any; + + namespace addLayer { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace set { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace syncVariablesFrom { + const prototype: { + }; + + } + + namespace syncVariablesTo { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace unset { + const prototype: { + }; + + } + + namespace variables { + const prototype: { + }; + + } + + } + +} + +export namespace Version { + namespace prototype { + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function set(value: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toString(): any; + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace set { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + } + +} + diff --git a/types/postman-collection/postman-collection-tests.ts b/types/postman-collection/postman-collection-tests.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/postman-collection/tsconfig.json b/types/postman-collection/tsconfig.json new file mode 100644 index 0000000000..3f176970e4 --- /dev/null +++ b/types/postman-collection/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "postman-collection-tests.ts" + ] +} diff --git a/types/postman-collection/tslint.json b/types/postman-collection/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/postman-collection/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b044535ed9892ca463096a46a8d11b5bf10bb272 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Thu, 15 Feb 2018 09:55:50 -0600 Subject: [PATCH 03/12] add example tests --- types/postman-collection/postman-collection-tests.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/postman-collection/postman-collection-tests.ts b/types/postman-collection/postman-collection-tests.ts index e69de29bb2..fd65e5e3d9 100644 --- a/types/postman-collection/postman-collection-tests.ts +++ b/types/postman-collection/postman-collection-tests.ts @@ -0,0 +1,7 @@ +import * as pmCollection from 'postman-collection'; + +/* Example https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/base64-js/base64-js-tests.ts +base64js.byteLength(""); // $ExpectType number +base64js.toByteArray(""); // $ExpectType Uint8Array +base64js.fromByteArray(new Uint8Array(0)); // $ExpectType string +*/ From 009e85b173cfa589189096fbdf4449d29db400e9 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Thu, 15 Feb 2018 09:56:05 -0600 Subject: [PATCH 04/12] remove unnecessary namespaces pt 1 --- types/postman-collection/index.d.ts | 4692 ++++----------------------- 1 file changed, 558 insertions(+), 4134 deletions(-) diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts index 92e39e82d2..1247493c85 100644 --- a/types/postman-collection/index.d.ts +++ b/types/postman-collection/index.d.ts @@ -1,563 +1,566 @@ // Type definitions for postman-collection 3.0 -// Project: https://github.com/postmanlabs/postman-collection#readme -// Definitions by: My Self +// Project: https://github.com/postmanlabs/postman-collection +// Definitions by: Kyle Buzby // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export class Certificate { - constructor(options: any, ...args: any[]); - - canApplyTo(url: any): any; - - toJSON(): any; - - update(options: any): void; - - static isCertificate(obj: any): any; - +declare module PostmanCollection { + export class Certificate { + constructor(options: any, ...args: any[]); + + canApplyTo(url: any): any; + + toJSON(): any; + + update(options: any): void; + + static isCertificate(obj: any): any; + + } + + export class CertificateList { + constructor(parent: any, list: any); + + resolveOne(url: any): any; + + static isCertificateList(obj: any): any; + + } + + export class Collection { + constructor(definition: any, environments: any); + + syncVariablesFrom(obj: any, track: any): any; + + syncVariablesTo(obj: any): any; + + toJSON(): any; + + static isCollection(obj: any): any; + + } + + export class Cookie { + constructor(options: any); + + update(options: any): void; + + valueOf(): any; + + static isCookie(obj: any): any; + + static parse(str: any): any; + + static splitParam(param: any): any; + + } + + export class Description { + constructor(definition: any); + + toJSON(): any; + + toString(): any; + + update(content: any, type: any): void; + + static isDescription(obj: any): any; + + } + + export class Event { + constructor(definition: any); + + update(definition: any): void; + + } + + export class EventList { + constructor(parent: any, populate: any); + + listeners(name: any): any; + + listenersOwn(name: any): any; + + static isEventList(obj: any): any; + + } + + export class FormParam { + constructor(options: any, ...args: any[]); + + toString(): any; + + valueOf(): any; + + static parse(): void; + + } + + export class Header { + constructor(options: any, name: any, ...args: any[]); + + toString(): any; + + update(options: any): void; + + valueOf(): any; + + static create(...args: any[]): any; + + static isHeader(obj: any): any; + + static parse(headerString: any): any; + + static parseSingle(header: any): any; + + static unparse(headers: any, separator: any): any; + + static unparseSingle(header: any): any; + + } + + export class HeaderList { + constructor(parent: any, headers: any); + + contentSize(): any; + + static isHeaderList(obj: any): any; + + } + + export class Item { + constructor(definition: any, ...args: any[]); + + authorizeRequestUsing(type: any, options: any): any; + + getAuth(): any; + + getEvents(name: any): any; + + static isItem(obj: any): any; + + } + + export class ItemGroup { + constructor(definition: any, ...args: any[]); + + authorizeRequestsUsing(type: any, options: any): void; + + forEachItem(callback: any): any; + + forEachItemGroup(callback: any): void; + + oneDeep(idOrName: any): any; + + static isItemGroup(obj: any): any; + + } + + export class Property { + constructor(definition: any, ...args: any[]); + + describe(content: any, type: any): void; + + toObjectResolved(scope: any, overrides: any, options: any): any; + + static replaceSubstitutions(str: any, variables: any, ...args: any[]): any; + + static replaceSubstitutionsIn(obj: any, variables: any, mutate: any): any; + + } + + export class PropertyBase { + constructor(definition: any); + + findInParents(property: any, customizer: any): any; + + findParentContaining(property: any, customizer: any): any; + + forEachParent(options: any, iterator: any): void; + + meta(...args: any[]): any; + + parent(): any; + + setParent(parent: any): void; + + toJSON(): any; + + static propertyIsMeta(value: any, key: any): any; + + static propertyUnprefixMeta(value: any, key: any): any; + + static toJSON(obj: any): any; + + } + + export class PropertyList { + constructor(type: any, parent: any, populate: any); + + add(item: any, ...args: any[]): void; + + all(): any; + + append(item: any): any; + + assimilate(source: any, prune: any): void; + + clear(): void; + + count(): any; + + each(iterator: any, context: any): void; + + eachParent(iterator: any, context: any): void; + + filter(rule: any, context: any): any; + + find(rule: any, context: any): any; + + get(key: any): any; + + has(item: any, value: any, ...args: any[]): any; + + idx(index: any): any; + + indexOf(item: any): any; + + insert(item: any, before: any): void; + + insertAfter(item: any, after: any): any; + + map(iterator: any, context: any): any; + + one(id: any): any; + + populate(items: any): void; + + prepend(item: any): any; + + remove(predicate: any, context: any, ...args: any[]): any; + + repopulate(items: any): void; + + toJSON(): any; + + toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + toString(): any; + + upsert(item: any): any; + + static isPropertyList(obj: any): any; + + } + + export class ProxyConfig { + constructor(options: any); + + getProtocols(): any; + + getProxyUrl(): any; + + test(urlStr: any): any; + + update(options: any): void; + + updateProtocols(protocols: any): void; + + static isProxyConfig(obj: any): any; + + } + + export class ProxyConfigList { + constructor(parent: any, populate: any); + + resolve(url: any): any; + + static isProxyConfigList(obj: any): any; + + } + + export class QueryParam { + constructor(options: any, ...args: any[]); + + toString(): any; + + update(param: any): void; + + valueOf(): any; + + static parse(query: any): any; + + static parseSingle(param: any, idx: any, all: any): any; + + static unparse(params: any, options: any): any; + + static unparseSingle(obj: any, encode: any): any; + + } + + export class Request { + constructor(options: any, ...args: any[]); + + addHeader(header: any): void; + + addQueryParams(params: any): void; + + authorize(): void; + + authorizeUsing(type: any, options: any): void; + + clone(): any; + + forEachHeader(callback: any): any; + + getHeaders(options: any): any; + + removeHeader(toRemove: any, options: any): any; + + removeQueryParams(params: any): void; + + toJSON(): any; + + update(options: any): void; + + upsertHeader(header: any): any; + + static isRequest(obj: any): any; + + } + + export class RequestAuth { + constructor(options: any, parent: any); + + clear(type: any): void; + + current(): any; + + parameters(): any; + + update(options: any, type: any): void; + + use(type: any, options: any): void; + + static isValidType(type: any): any; + + } + + export class RequestBody { + constructor(options: any, ...args: any[]); + + isEmpty(): any; + + toString(): any; + + update(options: any): void; + + static MODES: { + file: string; + formdata: string; + raw: string; + urlencoded: string; + }; + + } + + export class Response { + constructor(options: any, ...args: any[]); + + dataURI(): any; + + details(): any; + + encoding(): any; + + json(reviver: any, strict: any): any; + + mime(contentType: any, contentDisposition: any): any; + + reason(): any; + + size(): any; + + text(): any; + + toJSON(): any; + + update(options: any): void; + + static createFromNode(response: any, cookies: any): any; + + static isResponse(obj: any): any; + + static mimeInfo(type: any, disposition: any): any; + + } + + export class Script { + constructor(options: any, ...args: any[]); + + toSource(): any; + + update(options: any): void; + + static isScript(obj: any): any; + + } + + export class Url { + constructor(options: any, ...args: any[]); + + addQueryParams(params: any): void; + + getHost(): any; + + getOAuth1BaseUrl(): any; + + getPath(options: any): any; + + getPathWithQuery(): any; + + getQueryString(options: any): any; + + getRaw(): any; + + getRemote(options: any): any; + + removeQueryParams(params: any): any; + + toString(forceProtocol: any): any; + + update(url: any): any; + + static isUrl(obj: any): any; + + static parse(url: any): any; + + } + + export class UrlMatchPattern { + constructor(options: any, ...args: any[]); + + createMatchPattern(): any; + + getProtocols(): any; + + globPatternToRegexp(pattern: any): any; + + matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; + + matchAnyHost(matchRegexObject: any): any; + + matchSuffixHostPattern(matchRegexObject: any, remote: any): any; + + test(urlStr: any): any; + + testHost(host: any): any; + + testPath(path: any): any; + + testProtocol(protocol: any): any; + + toJSON(): any; + + toString(): any; + + update(options: any): void; + + static MATCH_ALL_URLS: string; + + static PROTOCOL_DELIMITER: string; + + } + + export class UrlMatchPatternList { + constructor(parent: any, list: any); + + test(urlStr: any): any; + + } + + export class Variable { + constructor(definition: any, ...args: any[]); + + cast(value: any): any; + + castIn(value: any): any; + + castOut(value: any): any; + + get(): any; + + set(value: any): void; + + toString(): any; + + update(options: any): void; + + valueOf(value: any, ...args: any[]): any; + + valueType(typeName: any, _noCast: any): any; + + static isVariable(obj: any): any; + + } + + export class VariableList { + constructor(parent: any, populate: any); + + replace(str: any, overrides: any): any; + + substitute(obj: any, overrides: any, mutate: any): any; + + syncFromObject(obj: any, track: any, prune: any): any; + + syncToObject(obj: any): any; + + static isVariableList(obj: any): any; + + } + + export class VariableScope { + constructor(definition: any, layers: any); + + addLayer(list: any): void; + + clear(): void; + + get(key: any): any; + + has(variableName: any): any; + + set(key: any, value: any, type: any): any; + + syncVariablesFrom(obj: any, track: any): any; + + syncVariablesTo(obj: any): any; + + toJSON(): any; + + toObject(excludeDisabled: any, caseSensitive: any): any; + + unset(key: any): void; + + variables(): any; + + static isVariableScope(obj: any): any; + + } + + export class Version { + constructor(options: any); + + set(value: any): void; + + toString(): any; + + } + + export function CookieList(parent: any, cookies: any): void; + } -export class CertificateList { - constructor(parent: any, list: any); - - resolveOne(url: any): any; - - static isCertificateList(obj: any): any; - -} - -export class Collection { - constructor(definition: any, environments: any); - - syncVariablesFrom(obj: any, track: any): any; - - syncVariablesTo(obj: any): any; - - toJSON(): any; - - static isCollection(obj: any): any; - -} - -export class Cookie { - constructor(options: any); - - update(options: any): void; - - valueOf(): any; - - static isCookie(obj: any): any; - - static parse(str: any): any; - - static splitParam(param: any): any; - -} - -export class Description { - constructor(definition: any); - - toJSON(): any; - - toString(): any; - - update(content: any, type: any): void; - - static isDescription(obj: any): any; - -} - -export class Event { - constructor(definition: any); - - update(definition: any): void; - -} - -export class EventList { - constructor(parent: any, populate: any); - - listeners(name: any): any; - - listenersOwn(name: any): any; - - static isEventList(obj: any): any; - -} - -export class FormParam { - constructor(options: any, ...args: any[]); - - toString(): any; - - valueOf(): any; - - static parse(): void; - -} - -export class Header { - constructor(options: any, name: any, ...args: any[]); - - toString(): any; - - update(options: any): void; - - valueOf(): any; - - static create(...args: any[]): any; - - static isHeader(obj: any): any; - - static parse(headerString: any): any; - - static parseSingle(header: any): any; - - static unparse(headers: any, separator: any): any; - - static unparseSingle(header: any): any; - -} - -export class HeaderList { - constructor(parent: any, headers: any); - - contentSize(): any; - - static isHeaderList(obj: any): any; - -} - -export class Item { - constructor(definition: any, ...args: any[]); - - authorizeRequestUsing(type: any, options: any): any; - - getAuth(): any; - - getEvents(name: any): any; - - static isItem(obj: any): any; - -} - -export class ItemGroup { - constructor(definition: any, ...args: any[]); - - authorizeRequestsUsing(type: any, options: any): void; - - forEachItem(callback: any): any; - - forEachItemGroup(callback: any): void; - - oneDeep(idOrName: any): any; - - static isItemGroup(obj: any): any; - -} - -export class Property { - constructor(definition: any, ...args: any[]); - - describe(content: any, type: any): void; - - toObjectResolved(scope: any, overrides: any, options: any): any; - - static replaceSubstitutions(str: any, variables: any, ...args: any[]): any; - - static replaceSubstitutionsIn(obj: any, variables: any, mutate: any): any; - -} - -export class PropertyBase { - constructor(definition: any); - - findInParents(property: any, customizer: any): any; - - findParentContaining(property: any, customizer: any): any; - - forEachParent(options: any, iterator: any): void; - - meta(...args: any[]): any; - - parent(): any; - - setParent(parent: any): void; - - toJSON(): any; - - static propertyIsMeta(value: any, key: any): any; - - static propertyUnprefixMeta(value: any, key: any): any; - - static toJSON(obj: any): any; - -} - -export class PropertyList { - constructor(type: any, parent: any, populate: any); - - add(item: any, ...args: any[]): void; - - all(): any; - - append(item: any): any; - - assimilate(source: any, prune: any): void; - - clear(): void; - - count(): any; - - each(iterator: any, context: any): void; - - eachParent(iterator: any, context: any): void; - - filter(rule: any, context: any): any; - - find(rule: any, context: any): any; - - get(key: any): any; - - has(item: any, value: any, ...args: any[]): any; - - idx(index: any): any; - - indexOf(item: any): any; - - insert(item: any, before: any): void; - - insertAfter(item: any, after: any): any; - - map(iterator: any, context: any): any; - - one(id: any): any; - - populate(items: any): void; - - prepend(item: any): any; - - remove(predicate: any, context: any, ...args: any[]): any; - - repopulate(items: any): void; - - toJSON(): any; - - toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - toString(): any; - - upsert(item: any): any; - - static isPropertyList(obj: any): any; - -} - -export class ProxyConfig { - constructor(options: any); - - getProtocols(): any; - - getProxyUrl(): any; - - test(urlStr: any): any; - - update(options: any): void; - - updateProtocols(protocols: any): void; - - static isProxyConfig(obj: any): any; - -} - -export class ProxyConfigList { - constructor(parent: any, populate: any); - - resolve(url: any): any; - - static isProxyConfigList(obj: any): any; - -} - -export class QueryParam { - constructor(options: any, ...args: any[]); - - toString(): any; - - update(param: any): void; - - valueOf(): any; - - static parse(query: any): any; - - static parseSingle(param: any, idx: any, all: any): any; - - static unparse(params: any, options: any): any; - - static unparseSingle(obj: any, encode: any): any; - -} - -export class Request { - constructor(options: any, ...args: any[]); - - addHeader(header: any): void; - - addQueryParams(params: any): void; - - authorize(): void; - - authorizeUsing(type: any, options: any): void; - - clone(): any; - - forEachHeader(callback: any): any; - - getHeaders(options: any): any; - - removeHeader(toRemove: any, options: any): any; - - removeQueryParams(params: any): void; - - toJSON(): any; - - update(options: any): void; - - upsertHeader(header: any): any; - - static isRequest(obj: any): any; - -} - -export class RequestAuth { - constructor(options: any, parent: any); - - clear(type: any): void; - - current(): any; - - parameters(): any; - - update(options: any, type: any): void; - - use(type: any, options: any): void; - - static isValidType(type: any): any; - -} - -export class RequestBody { - constructor(options: any, ...args: any[]); - - isEmpty(): any; - - toString(): any; - - update(options: any): void; - - static MODES: { - file: string; - formdata: string; - raw: string; - urlencoded: string; - }; - -} - -export class Response { - constructor(options: any, ...args: any[]); - - dataURI(): any; - - details(): any; - - encoding(): any; - - json(reviver: any, strict: any): any; - - mime(contentType: any, contentDisposition: any): any; - - reason(): any; - - size(): any; - - text(): any; - - toJSON(): any; - - update(options: any): void; - - static createFromNode(response: any, cookies: any): any; - - static isResponse(obj: any): any; - - static mimeInfo(type: any, disposition: any): any; - -} - -export class Script { - constructor(options: any, ...args: any[]); - - toSource(): any; - - update(options: any): void; - - static isScript(obj: any): any; - -} - -export class Url { - constructor(options: any, ...args: any[]); - - addQueryParams(params: any): void; - - getHost(): any; - - getOAuth1BaseUrl(): any; - - getPath(options: any): any; - - getPathWithQuery(): any; - - getQueryString(options: any): any; - - getRaw(): any; - - getRemote(options: any): any; - - removeQueryParams(params: any): any; - - toString(forceProtocol: any): any; - - update(url: any): any; - - static isUrl(obj: any): any; - - static parse(url: any): any; - -} - -export class UrlMatchPattern { - constructor(options: any, ...args: any[]); - - createMatchPattern(): any; - - getProtocols(): any; - - globPatternToRegexp(pattern: any): any; - - matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; - - matchAnyHost(matchRegexObject: any): any; - - matchSuffixHostPattern(matchRegexObject: any, remote: any): any; - - test(urlStr: any): any; - - testHost(host: any): any; - - testPath(path: any): any; - - testProtocol(protocol: any): any; - - toJSON(): any; - - toString(): any; - - update(options: any): void; - - static MATCH_ALL_URLS: string; - - static PROTOCOL_DELIMITER: string; - -} - -export class UrlMatchPatternList { - constructor(parent: any, list: any); - - test(urlStr: any): any; - -} - -export class Variable { - constructor(definition: any, ...args: any[]); - - cast(value: any): any; - - castIn(value: any): any; - - castOut(value: any): any; - - get(): any; - - set(value: any): void; - - toString(): any; - - update(options: any): void; - - valueOf(value: any, ...args: any[]): any; - - valueType(typeName: any, _noCast: any): any; - - static isVariable(obj: any): any; - -} - -export class VariableList { - constructor(parent: any, populate: any); - - replace(str: any, overrides: any): any; - - substitute(obj: any, overrides: any, mutate: any): any; - - syncFromObject(obj: any, track: any, prune: any): any; - - syncToObject(obj: any): any; - - static isVariableList(obj: any): any; - -} - -export class VariableScope { - constructor(definition: any, layers: any); - - addLayer(list: any): void; - - clear(): void; - - get(key: any): any; - - has(variableName: any): any; - - set(key: any, value: any, type: any): any; - - syncVariablesFrom(obj: any, track: any): any; - - syncVariablesTo(obj: any): any; - - toJSON(): any; - - toObject(excludeDisabled: any, caseSensitive: any): any; - - unset(key: any): void; - - variables(): any; - - static isVariableScope(obj: any): any; - -} - -export class Version { - constructor(options: any); - - set(value: any): void; - - toString(): any; - -} - -export function CookieList(parent: any, cookies: any): void; - export namespace Certificate { namespace isCertificate { const prototype: { @@ -587,73 +590,6 @@ export namespace Certificate { function toObjectResolved(scope: any, overrides: any, options: any): any; function update(options: any): void; - - namespace canApplyTo { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } } @@ -732,204 +668,6 @@ export namespace CertificateList { function upsert(item: any): any; - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace resolveOne { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } } @@ -971,97 +709,6 @@ export namespace Collection { function toJSON(): any; function toObjectResolved(scope: any, overrides: any, options: any): any; - - namespace authorizeRequestsUsing { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachItem { - const prototype: { - }; - - } - - namespace forEachItemGroup { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace oneDeep { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace syncVariablesFrom { - const prototype: { - }; - - } - - namespace syncVariablesTo { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - } } @@ -1098,60 +745,6 @@ export namespace Cookie { function valueOf(): any; - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace valueOf { - const prototype: { - }; - - } - } namespace splitParam { @@ -1236,197 +829,6 @@ export namespace CookieList { function upsert(item: any): any; - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } } @@ -1449,24 +851,6 @@ export namespace Description { function update(content: any, type: any): void; - namespace toJSON { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } } @@ -1492,67 +876,6 @@ export namespace Event { function toObjectResolved(scope: any, overrides: any, options: any): any; function update(definition: any): void; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } } @@ -1632,211 +955,6 @@ export namespace EventList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace listeners { - const prototype: { - }; - - } - - namespace listenersOwn { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } } @@ -1870,73 +988,6 @@ export namespace FormParam { function toString(): any; function valueOf(): any; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace valueOf { - const prototype: { - }; - - } - } } @@ -1990,79 +1041,6 @@ export namespace Header { function update(options: any): void; function valueOf(): any; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace valueOf { - const prototype: { - }; - - } - } namespace unparse { @@ -2152,205 +1130,6 @@ export namespace HeaderList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace contentSize { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } } @@ -2386,79 +1165,6 @@ export namespace Item { function toJSON(): any; function toObjectResolved(scope: any, overrides: any, options: any): any; - - namespace authorizeRequestUsing { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace getAuth { - const prototype: { - }; - - } - - namespace getEvents { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - } } @@ -2497,84 +1203,6 @@ export namespace ItemGroup { function toObjectResolved(scope: any, overrides: any, options: any): any; - namespace authorizeRequestsUsing { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachItem { - const prototype: { - }; - - } - - namespace forEachItemGroup { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace oneDeep { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - } } @@ -2599,60 +1227,6 @@ export namespace Property { function toObjectResolved(scope: any, overrides: any, options: any): any; - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - } namespace replaceSubstitutions { @@ -2696,57 +1270,7 @@ export namespace PropertyBase { function setParent(parent: any): void; function toJSON(): any; - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - } - - namespace toJSON { - const prototype: { - }; - - } - } export namespace PropertyList { @@ -2820,201 +1344,7 @@ export namespace PropertyList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } - } export namespace ProxyConfig { @@ -3052,93 +1382,7 @@ export namespace ProxyConfig { function update(options: any): void; function updateProtocols(protocols: any): void; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace getProtocols { - const prototype: { - }; - - } - - namespace getProxyUrl { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace test { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace updateProtocols { - const prototype: { - }; - - } - } - } export namespace ProxyConfigList { @@ -3214,207 +1458,7 @@ export namespace ProxyConfigList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace resolve { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } - } export namespace QueryParam { @@ -3454,79 +1498,6 @@ export namespace QueryParam { function update(param: any): void; function valueOf(): any; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace valueOf { - const prototype: { - }; - - } - } namespace unparse { @@ -3540,7 +1511,6 @@ export namespace QueryParam { }; } - } export namespace Request { @@ -3590,129 +1560,7 @@ export namespace Request { function update(options: any): void; function upsertHeader(header: any): any; - - namespace addHeader { - const prototype: { - }; - - } - - namespace addQueryParams { - const prototype: { - }; - - } - - namespace authorize { - const prototype: { - }; - - } - - namespace authorizeUsing { - const prototype: { - }; - - } - - namespace clone { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachHeader { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace getHeaders { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace removeHeader { - const prototype: { - }; - - } - - namespace removeQueryParams { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace upsertHeader { - const prototype: { - }; - - } - } - } export namespace RequestAuth { @@ -3750,93 +1598,7 @@ export namespace RequestAuth { function update(options: any, type: any): void; function use(type: any, options: any): void; - - namespace clear { - const prototype: { - }; - - } - - namespace current { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parameters { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace use { - const prototype: { - }; - - } - } - } export namespace RequestBody { @@ -3860,69 +1622,7 @@ export namespace RequestBody { function toString(): any; function update(options: any): void; - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace isEmpty { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } - } export namespace Response { @@ -3980,117 +1680,7 @@ export namespace Response { function toObjectResolved(scope: any, overrides: any, options: any): any; function update(options: any): void; - - namespace dataURI { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace details { - const prototype: { - }; - - } - - namespace encoding { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace json { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace mime { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace reason { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace size { - const prototype: { - }; - - } - - namespace text { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } - } export namespace Script { @@ -4122,75 +1712,7 @@ export namespace Script { function toSource(): any; function update(options: any): void; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toSource { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } - } export namespace Url { @@ -4242,117 +1764,7 @@ export namespace Url { function toString(forceProtocol: any): any; function update(url: any): any; - - namespace addQueryParams { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace getHost { - const prototype: { - }; - - } - - namespace getOAuth1BaseUrl { - const prototype: { - }; - - } - - namespace getPath { - const prototype: { - }; - - } - - namespace getPathWithQuery { - const prototype: { - }; - - } - - namespace getQueryString { - const prototype: { - }; - - } - - namespace getRaw { - const prototype: { - }; - - } - - namespace getRemote { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace removeQueryParams { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } - } export namespace UrlMatchPattern { @@ -4398,135 +1810,7 @@ export namespace UrlMatchPattern { function toString(): any; function update(options: any): void; - - namespace createMatchPattern { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace getProtocols { - const prototype: { - }; - - } - - namespace globPatternToRegexp { - const prototype: { - }; - - } - - namespace matchAbsoluteHostPattern { - const prototype: { - }; - - } - - namespace matchAnyHost { - const prototype: { - }; - - } - - namespace matchSuffixHostPattern { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace test { - const prototype: { - }; - - } - - namespace testHost { - const prototype: { - }; - - } - - namespace testPath { - const prototype: { - }; - - } - - namespace testProtocol { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } - } export namespace UrlMatchPatternList { @@ -4596,207 +1880,7 @@ export namespace UrlMatchPatternList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace test { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } - } export namespace Variable { @@ -4843,114 +1927,6 @@ export namespace Variable { function valueType(typeName: any, _noCast: any): any; - namespace cast { - const prototype: { - }; - - } - - namespace castIn { - const prototype: { - }; - - } - - namespace castOut { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace set { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace valueOf { - const prototype: { - }; - - } - - namespace valueType { - const prototype: { - }; - - } - } namespace types { @@ -5166,169 +2142,6 @@ export namespace Variable { } } - - namespace number { - namespace prototype { - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const toExponential: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const toFixed: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const toLocaleString: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const toPrecision: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const toString: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const valueOf: any; - - } - - } - - namespace string { - namespace prototype { - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const anchor: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const big: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const blink: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const bold: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const charAt: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const charCodeAt: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const codePointAt: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const concat: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const endsWith: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const fixed: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const fontcolor: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const fontsize: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const includes: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const indexOf: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const italics: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const lastIndexOf: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const length: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const link: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const localeCompare: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const match: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const normalize: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const padEnd: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const padStart: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const repeat: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const replace: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const search: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const slice: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const small: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const split: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const startsWith: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const strike: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const sub: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const substr: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const substring: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const sup: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const toLocaleLowerCase: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const toLocaleUpperCase: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const toLowerCase: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const toString: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const toUpperCase: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const trim: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const trimLeft: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const trimRight: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const valueOf: any; - - } - - } - } } @@ -5412,223 +2225,6 @@ export namespace VariableList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace replace { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace substitute { - const prototype: { - }; - - } - - namespace syncFromObject { - const prototype: { - }; - - } - - namespace syncToObject { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } } @@ -5678,123 +2274,7 @@ export namespace VariableScope { function unset(key: any): void; function variables(): any; - - namespace addLayer { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace set { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace syncVariablesFrom { - const prototype: { - }; - - } - - namespace syncVariablesTo { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace unset { - const prototype: { - }; - - } - - namespace variables { - const prototype: { - }; - - } - } - } export namespace Version { @@ -5816,62 +2296,6 @@ export namespace Version { function toJSON(): any; function toString(): any; - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace set { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - } - } From bf9864b51f6d7d0b9fa3410cbe00d7cad47aa337 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Wed, 21 Feb 2018 17:26:28 -0600 Subject: [PATCH 05/12] roughly complete documented types from the web site TODO: update function signatures for parameters that are functions --- types/postman-collection/index.d.ts | 2733 ++++++--------------------- 1 file changed, 617 insertions(+), 2116 deletions(-) diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts index 1247493c85..5365b9cfaf 100644 --- a/types/postman-collection/index.d.ts +++ b/types/postman-collection/index.d.ts @@ -2,2300 +2,801 @@ // Project: https://github.com/postmanlabs/postman-collection // Definitions by: Kyle Buzby // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + +export class PropertyBase { + constructor(definition: any); -declare module PostmanCollection { - export class Certificate { - constructor(options: any, ...args: any[]); - - canApplyTo(url: any): any; - - toJSON(): any; - - update(options: any): void; - - static isCertificate(obj: any): any; - - } - - export class CertificateList { - constructor(parent: any, list: any); - - resolveOne(url: any): any; - - static isCertificateList(obj: any): any; - - } - - export class Collection { - constructor(definition: any, environments: any); - - syncVariablesFrom(obj: any, track: any): any; - - syncVariablesTo(obj: any): any; - - toJSON(): any; - - static isCollection(obj: any): any; - - } - - export class Cookie { - constructor(options: any); - - update(options: any): void; - - valueOf(): any; - - static isCookie(obj: any): any; - - static parse(str: any): any; - - static splitParam(param: any): any; - - } - - export class Description { - constructor(definition: any); - - toJSON(): any; - - toString(): any; - - update(content: any, type: any): void; - - static isDescription(obj: any): any; - - } - - export class Event { - constructor(definition: any); - - update(definition: any): void; - - } - - export class EventList { - constructor(parent: any, populate: any); - - listeners(name: any): any; - - listenersOwn(name: any): any; - - static isEventList(obj: any): any; - - } - - export class FormParam { - constructor(options: any, ...args: any[]); - - toString(): any; - - valueOf(): any; - - static parse(): void; - - } - - export class Header { - constructor(options: any, name: any, ...args: any[]); - - toString(): any; - - update(options: any): void; - - valueOf(): any; - - static create(...args: any[]): any; - - static isHeader(obj: any): any; - - static parse(headerString: any): any; - - static parseSingle(header: any): any; - - static unparse(headers: any, separator: any): any; - - static unparseSingle(header: any): any; - - } - - export class HeaderList { - constructor(parent: any, headers: any); - - contentSize(): any; - - static isHeaderList(obj: any): any; - - } - - export class Item { - constructor(definition: any, ...args: any[]); - - authorizeRequestUsing(type: any, options: any): any; - - getAuth(): any; - - getEvents(name: any): any; - - static isItem(obj: any): any; - - } - - export class ItemGroup { - constructor(definition: any, ...args: any[]); - - authorizeRequestsUsing(type: any, options: any): void; - - forEachItem(callback: any): any; - - forEachItemGroup(callback: any): void; - - oneDeep(idOrName: any): any; - - static isItemGroup(obj: any): any; - - } - - export class Property { - constructor(definition: any, ...args: any[]); - - describe(content: any, type: any): void; - - toObjectResolved(scope: any, overrides: any, options: any): any; - - static replaceSubstitutions(str: any, variables: any, ...args: any[]): any; - - static replaceSubstitutionsIn(obj: any, variables: any, mutate: any): any; - - } - - export class PropertyBase { - constructor(definition: any); - - findInParents(property: any, customizer: any): any; - - findParentContaining(property: any, customizer: any): any; - - forEachParent(options: any, iterator: any): void; - - meta(...args: any[]): any; - - parent(): any; - - setParent(parent: any): void; - - toJSON(): any; - - static propertyIsMeta(value: any, key: any): any; - - static propertyUnprefixMeta(value: any, key: any): any; - - static toJSON(obj: any): any; - - } - - export class PropertyList { - constructor(type: any, parent: any, populate: any); - - add(item: any, ...args: any[]): void; - - all(): any; - - append(item: any): any; - - assimilate(source: any, prune: any): void; - - clear(): void; - - count(): any; - - each(iterator: any, context: any): void; - - eachParent(iterator: any, context: any): void; - - filter(rule: any, context: any): any; - - find(rule: any, context: any): any; - - get(key: any): any; - - has(item: any, value: any, ...args: any[]): any; - - idx(index: any): any; - - indexOf(item: any): any; - - insert(item: any, before: any): void; - - insertAfter(item: any, after: any): any; - - map(iterator: any, context: any): any; - - one(id: any): any; - - populate(items: any): void; - - prepend(item: any): any; - - remove(predicate: any, context: any, ...args: any[]): any; - - repopulate(items: any): void; - - toJSON(): any; - - toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - toString(): any; - - upsert(item: any): any; - - static isPropertyList(obj: any): any; - - } - - export class ProxyConfig { - constructor(options: any); - - getProtocols(): any; - - getProxyUrl(): any; - - test(urlStr: any): any; - - update(options: any): void; - - updateProtocols(protocols: any): void; - - static isProxyConfig(obj: any): any; - - } - - export class ProxyConfigList { - constructor(parent: any, populate: any); - - resolve(url: any): any; - - static isProxyConfigList(obj: any): any; - - } - - export class QueryParam { - constructor(options: any, ...args: any[]); - - toString(): any; - - update(param: any): void; - - valueOf(): any; - - static parse(query: any): any; - - static parseSingle(param: any, idx: any, all: any): any; - - static unparse(params: any, options: any): any; - - static unparseSingle(obj: any, encode: any): any; - - } - - export class Request { - constructor(options: any, ...args: any[]); - - addHeader(header: any): void; - - addQueryParams(params: any): void; - - authorize(): void; - - authorizeUsing(type: any, options: any): void; - - clone(): any; - - forEachHeader(callback: any): any; - - getHeaders(options: any): any; - - removeHeader(toRemove: any, options: any): any; - - removeQueryParams(params: any): void; - - toJSON(): any; - - update(options: any): void; - - upsertHeader(header: any): any; - - static isRequest(obj: any): any; - - } - - export class RequestAuth { - constructor(options: any, parent: any); - - clear(type: any): void; - - current(): any; - - parameters(): any; - - update(options: any, type: any): void; - - use(type: any, options: any): void; - - static isValidType(type: any): any; - - } - - export class RequestBody { - constructor(options: any, ...args: any[]); - - isEmpty(): any; - - toString(): any; - - update(options: any): void; - - static MODES: { - file: string; - formdata: string; - raw: string; - urlencoded: string; - }; - - } - - export class Response { - constructor(options: any, ...args: any[]); - - dataURI(): any; - - details(): any; - - encoding(): any; - - json(reviver: any, strict: any): any; - - mime(contentType: any, contentDisposition: any): any; - - reason(): any; - - size(): any; - - text(): any; - - toJSON(): any; - - update(options: any): void; - - static createFromNode(response: any, cookies: any): any; - - static isResponse(obj: any): any; - - static mimeInfo(type: any, disposition: any): any; - - } - - export class Script { - constructor(options: any, ...args: any[]); - - toSource(): any; - - update(options: any): void; - - static isScript(obj: any): any; - - } - - export class Url { - constructor(options: any, ...args: any[]); - - addQueryParams(params: any): void; - - getHost(): any; - - getOAuth1BaseUrl(): any; - - getPath(options: any): any; - - getPathWithQuery(): any; - - getQueryString(options: any): any; - - getRaw(): any; - - getRemote(options: any): any; - - removeQueryParams(params: any): any; - - toString(forceProtocol: any): any; - - update(url: any): any; - - static isUrl(obj: any): any; - - static parse(url: any): any; - - } - - export class UrlMatchPattern { - constructor(options: any, ...args: any[]); - - createMatchPattern(): any; - - getProtocols(): any; - - globPatternToRegexp(pattern: any): any; - - matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; - - matchAnyHost(matchRegexObject: any): any; - - matchSuffixHostPattern(matchRegexObject: any, remote: any): any; - - test(urlStr: any): any; - - testHost(host: any): any; - - testPath(path: any): any; - - testProtocol(protocol: any): any; - - toJSON(): any; - - toString(): any; - - update(options: any): void; - - static MATCH_ALL_URLS: string; - - static PROTOCOL_DELIMITER: string; - - } - - export class UrlMatchPatternList { - constructor(parent: any, list: any); - - test(urlStr: any): any; - - } - - export class Variable { - constructor(definition: any, ...args: any[]); - - cast(value: any): any; - - castIn(value: any): any; - - castOut(value: any): any; - - get(): any; - - set(value: any): void; - - toString(): any; - - update(options: any): void; - - valueOf(value: any, ...args: any[]): any; - - valueType(typeName: any, _noCast: any): any; - - static isVariable(obj: any): any; - - } - - export class VariableList { - constructor(parent: any, populate: any); - - replace(str: any, overrides: any): any; - - substitute(obj: any, overrides: any, mutate: any): any; - - syncFromObject(obj: any, track: any, prune: any): any; - - syncToObject(obj: any): any; - - static isVariableList(obj: any): any; - - } - - export class VariableScope { - constructor(definition: any, layers: any); - - addLayer(list: any): void; - - clear(): void; - - get(key: any): any; - - has(variableName: any): any; - - set(key: any, value: any, type: any): any; - - syncVariablesFrom(obj: any, track: any): any; - - syncVariablesTo(obj: any): any; - - toJSON(): any; - - toObject(excludeDisabled: any, caseSensitive: any): any; - - unset(key: any): void; - - variables(): any; - - static isVariableScope(obj: any): any; - - } - - export class Version { - constructor(options: any); - - set(value: any): void; - - toString(): any; - - } - - export function CookieList(parent: any, cookies: any): void; - -} + findInParents(property: string, customizer?: any): any | undefined; // TODO Update customizer function def -export namespace Certificate { - namespace isCertificate { - const prototype: { - }; + findParentContaining(property: any, customizer: any): any; // TODO Update customizer function def - } + forEachParent(iterator: any): void; // TODO Update iterator function def + forEachParent(options: any | boolean, iterator: any): void; // TODO Update iterator function def - namespace prototype { - function canApplyTo(url: any): any; + meta(): any; - function describe(content: any, type: any): void; + parent(): any | undefined; - function findInParents(property: any, customizer: any): any; + setParent(parent: any): void; - function findParentContaining(property: any, customizer: any): any; + toJSON(): any; - function forEachParent(options: any, iterator: any): void; + static propertyIsMeta(value: any, key: any): any; - function meta(...args: any[]): any; + static propertyUnprefixMeta(value: any, key: any): any; - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(options: any): void; - } + static toJSON(obj: any): any; } -export namespace CertificateList { - namespace isCertificateList { - const prototype: { - }; +export interface PropertyDefinition { + id?: string; + name?: string; + disabled?: boolean; +} - } +export class Property extends PropertyBase implements PropertyDefinition { + auth: RequestAuth; + disabled: boolean; + id: string; + name: string; - namespace prototype { - function add(item: any, ...args: any[]): void; + constructor(definition?: PropertyDefinition); - function all(): any; + describe(content: string, type?: string): void; - function append(item: any): any; + toObjectResolved(scope: any, overrides: any, options: any): any; - function assimilate(source: any, prune: any): void; + static replaceSubstitutions(str: string, variables: VariableList | any | (VariableList | any)[]): string; - function clear(): void; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function resolveOne(url: any): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - - } + static replaceSubstitutionsIn(obj: any, variables: (VariableList | any)[], mutate: boolean): any; } -export namespace Collection { - namespace isCollection { - const prototype: { - }; +export interface CertificateDefinition extends PropertyDefinition { + name?: string; + matches?: any[]; + key?: any; + cert?: any; + passphrase?: string; +} - } +export class Certificate extends Property { + cert: any; + id: string; + key: any; + matches: any; // TODO update to UrlMatchPatternList? + name: string; + passphrase: any; - namespace prototype { - function authorizeRequestsUsing(type: any, options: any): void; + constructor(options: any); - function describe(content: any, type: any): void; + canApplyTo(url: string | Url): any; - function findInParents(property: any, customizer: any): any; + toJSON(): CertificateDefinition; - function findParentContaining(property: any, customizer: any): any; + update(options: CertificateDefinition): void; - function forEachItem(callback: any): any; - - function forEachItemGroup(callback: any): void; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function oneDeep(idOrName: any): any; - - function parent(): any; - - function setParent(parent: any): void; - - function syncVariablesFrom(obj: any, track: any): any; - - function syncVariablesTo(obj: any): any; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - } + static isCertificate(obj: any): boolean; } -export namespace Cookie { - namespace isCookie { - const prototype: { - }; - } +export class PropertyList { + constructor(type: any, parent: any, populate: any); - namespace parse { - const prototype: { - }; + add(item: any | TElement): void; - } + all(): any; - namespace prototype { - function findInParents(property: any, customizer: any): any; + append(item: TElement): any; - function findParentContaining(property: any, customizer: any): any; + assimilate(source: PropertyList | any[], prune: boolean): void; - function forEachParent(options: any, iterator: any): void; + clear(): void; - function meta(...args: any[]): any; + count(): number; - function parent(): any; + each(iterator: any, context: any): void; - function setParent(parent: any): void; + eachParent(iterator: any, context?: any): void; - function toJSON(): any; + filter(rule: any, context: any): any; - function update(options: any): void; + find(rule: any, context?: any): Item | ItemGroup; - function valueOf(): any; + get(key: string | any): TElement; - } + has(item: string | TElement, value?: any): boolean; - namespace splitParam { - const prototype: { - }; + idx(index: number): TElement; - } + indexOf(item: string | any): number; + + insert(item: TElement, before: TElement | string): void; + + insertAfter(item: TElement, after: TElement | string): any; + + map(iterator: any, context: any): any; + + one(id: string): TElement; + + populate(items: any | any[]): void; + + prepend(item: TElement): any; + + remove(predicate: any | string | TElement, context: any): any; + + repopulate(items: any | any[]): void; + + toJSON(): any; + + toObject(excludeDisabled?: any | null, caseSensitive?: any | null, multiValue?: any | null, sanitizeKeys?: any): any; + + toString(): string; + + upsert(item: TElement): boolean | null; + + static isPropertyList(obj: any): any; } -export namespace CookieList { - function isCookieList(obj: any): any; +export class CertificateList extends PropertyList { + constructor(parent: any, list: CertificateDefinition[]); - namespace isCookieList { - const prototype: { - }; + resolveOne(url: string): CertificateDefinition; - } - - namespace prototype { - function add(item: any, ...args: any[]): void; - - function all(): any; - - function append(item: any): any; - - function assimilate(source: any, prune: any): void; - - function clear(): void; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - - - } + static isCertificateList(obj: any): boolean; } -export namespace Description { - namespace format { - } +export interface ItemGroupDefinition extends PropertyDefinition { + item?: (ItemDefinition | ItemGroupDefinition)[]; + auth?: RequestAuthDefinition; + event?: EventDefinition[]; +} + +export class ItemGroup extends Property { + auth: RequestAuth; + items: PropertyList; - namespace isDescription { - const prototype: { - }; + constructor(definition?: ItemGroupDefinition); - } + authorizeRequestsUsing(type: any, options: any): void; // TODO add better types for parameters - namespace prototype { - function toJSON(): any; + forEachItem(callback: any): any; - function toString(): any; + forEachItemGroup(callback: any): void; - function update(content: any, type: any): void; + oneDeep(idOrName: string): TItem; - } + static isItemGroup(obj: any): boolean; } -export namespace Event { - namespace prototype { - function describe(content: any, type: any): void; +export interface CollectionDefinition extends ItemGroupDefinition { + info?: { + id?: string; + name?: string; + version?: string; + }; + item?: (ItemDefinition | ItemGroupDefinition)[]; + variable?: VariableDefinition; + auth?: RequestAuthDefinition; + event?: EventDefinition[]; + version?: string | Version; +} - function findInParents(property: any, customizer: any): any; +export class Collection extends ItemGroup implements CollectionDefinition { + events: EventList; + variables: VariableList; + version: Version; - function findParentContaining(property: any, customizer: any): any; + constructor(definition?: CollectionDefinition, environments?: any[]); - function forEachParent(options: any, iterator: any): void; + syncVariablesFrom(obj: any, track?: boolean): any; - function meta(...args: any[]): any; + syncVariablesTo(obj?: any): any; - function parent(): any; + toJSON(): any; - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(definition: any): void; - } + static isCollection(obj: any): boolean; } -export namespace EventList { - namespace isEventList { - const prototype: { - }; - - } - - namespace prototype { - function add(item: any, ...args: any[]): void; - - function all(): any; - - function append(item: any): any; - - function assimilate(source: any, prune: any): void; - - function clear(): void; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function listeners(name: any): any; - - function listenersOwn(name: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } +export interface CookieDefinition { + key?: string; + value?: string; + expires?: string | Date; + maxAge?: number; + domain?: string; + path?: string; + secure?: boolean; + httpOnly?: boolean; + hostOnly?: boolean; + session?: boolean; + extensions?: {key: string; value: string}[]; } -export namespace FormParam { - namespace parse { - const prototype: { - }; +export class Cookie extends PropertyBase implements CookieDefinition { + domain: string; + expires: Date | string; + extensions: {key: string; value: string}[]; + hostOnly: any; + httpOnly: any; + maxAge: number; + name: string; + path: string; + secure: any; + session: any; + value: string; - } + constructor(options?: CookieDefinition); - namespace prototype { - function describe(content: any, type: any): void; + update(options: any): void; - function findInParents(property: any, customizer: any): any; + valueOf(): string; - function findParentContaining(property: any, customizer: any): any; + static isCookie(obj: any): boolean; - function forEachParent(options: any, iterator: any): void; + static parse(str: string): any; - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toString(): any; - - function valueOf(): any; - } + static splitParam(param: any): any; } -export namespace Header { - namespace create { - const prototype: { - }; +export class CookieList extends PropertyList { + constructor(parent: any, cookies: any[]); - } + static isCookieList(obj: any): boolean; +} - namespace isHeader { - const prototype: { - }; +export interface DescriptionDefinition { + content: string; + format: string; +} - } +export class Description implements DescriptionDefinition { + format: string; // TODO huh? + content: string; + type: string; - namespace parse { - const prototype: { - }; + constructor(definition?: DescriptionDefinition); - } + toJSON(): any; - namespace parseSingle { - const prototype: { - }; + toString(): string; - } + update(content: string | DescriptionDefinition, type?: string): void; - namespace prototype { - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toString(): any; - - function update(options: any): void; - - function valueOf(): any; - } - - namespace unparse { - const prototype: { - }; - - } - - namespace unparseSingle { - const prototype: { - }; - - } + static isDescription(obj: any): boolean; } -export namespace HeaderList { - namespace isHeaderList { - const prototype: { - }; +export interface EventDefinition extends PropertyDefinition { + listen: string; + script: string | Script; +} - } +export class Event extends Property implements EventDefinition { + listen: string; + script: string; - namespace prototype { - function add(item: any, ...args: any[]): void; + constructor(definition: EventDefinition); - function all(): any; + update(definition: EventDefinition): void; +} - function append(item: any): any; +export class EventList extends PropertyList { + constructor(parent: any, populate: any[]); - function assimilate(source: any, prune: any): void; + listeners(name: string): Event[]; - function clear(): void; + listenersOwn(name: string): Event[]; - function contentSize(): any; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } + static isEventList(obj: any): boolean; } -export namespace Item { - namespace isItem { - const prototype: { - }; +export interface FormParamDefinition extends PropertyDefinition { + key: string; + value: string; +} - } +export class FormParam extends Property implements FormParamDefinition{ + key: string; + value: string; - namespace prototype { - function authorizeRequestUsing(type: any, options: any): any; + static _postman_propertyAllowsMultipleValues: boolean; + static _postman_propertyIndex: string; - function describe(content: any, type: any): void; + constructor(options: FormParamDefinition); - function findInParents(property: any, customizer: any): any; + toString(): string; - function findParentContaining(property: any, customizer: any): any; + valueOf(): any | string; - function forEachParent(options: any, iterator: any): void; + // static parse(): void; // TODO not implemented yet +} - function getAuth(): any; +export interface HeaderDefinition extends PropertyDefinition { + key: string; + value: string; +} - function getEvents(name: any): any; +export class Header extends Property implements HeaderDefinition { + key: string; + value: string; - function meta(...args: any[]): any; + constructor(options: HeaderDefinition | string, name?: string); - function parent(): any; + toString(): string; - function setParent(parent: any): void; + update(options: any): void; - function toJSON(): any; + valueOf(): string; - function toObjectResolved(scope: any, overrides: any, options: any): any; - } + static create(value?: HeaderDefinition | string, name?: string): Header; + + static isHeader(obj: any): boolean; + + static parse(headerString: string): HeaderDefinition[]; + + static parseSingle(header: string): HeaderDefinition; + + static unparse(headers: HeaderList | any[], separator?: string): string; + + static unparseSingle(header: Header): string; +} + +export class HeaderList extends PropertyList
{ + constructor(parent: any, headers: Header[]); + + contentSize(): number; + + static isHeaderList(obj: any): boolean; +} + +export interface ItemDefinition extends PropertyDefinition { + request?: RequestDefinition; + responses?: ResponseDefinition[]; + events?: EventDefinition[]; +} + +export class Item extends Property implements ItemDefinition { + events: EventDefinition[]; + request: Request; + responses: ResponseDefinition[]; + + constructor(definition?: ItemDefinition); + + authorizeRequestUsing(type: string | RequestAuthDefinition, options?: VariableList): any; + + getAuth(): RequestAuth; + + getEvents(name: string): Event[]; + + static isItem(obj: any): boolean; } -export namespace ItemGroup { - namespace isItemGroup { - const prototype: { - }; +export interface ProxyConfigDefinition extends PropertyDefinition { + match?: string; + host?: string; + port?: number; + tunnel?: boolean; + disabled?: boolean; +} - } +export class ProxyConfig extends Property implements ProxyConfigDefinition { + static host: string; + static match: string; + static port: number; + static tunnel: boolean; - namespace prototype { - function authorizeRequestsUsing(type: any, options: any): void; + constructor(options?: ProxyConfigDefinition); - function describe(content: any, type: any): void; + getProtocols(): string[]; - function findInParents(property: any, customizer: any): any; + getProxyUrl(): string; - function findParentContaining(property: any, customizer: any): any; + test(urlStr?: string): any; - function forEachItem(callback: any): any; + update(options: ProxyConfigDefinition): void; - function forEachItemGroup(callback: any): void; + updateProtocols(protocols: string[]): void; - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function oneDeep(idOrName: any): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - } + static isProxyConfig(obj: any): boolean; } -export namespace Property { - namespace prototype { - function describe(content: any, type: any): void; +export class ProxyConfigList extends PropertyList { + constructor(parent: any, populate: ProxyConfig[]); - function findInParents(property: any, customizer: any): any; + resolve(url?: Url): ProxyConfigDefinition; - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - } - - namespace replaceSubstitutions { - const prototype: { - }; - - } - - namespace replaceSubstitutionsIn { - const prototype: { - }; - - } + static isProxyConfigList(obj: any): boolean; } -export namespace PropertyBase { - namespace propertyIsMeta { - const prototype: { - }; - - } - - namespace propertyUnprefixMeta { - const prototype: { - }; - - } - - namespace prototype { - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - } +export interface QueryParamDefinition extends PropertyDefinition { + key: string; + value: string; } -export namespace PropertyList { - namespace isPropertyList { - const prototype: { - }; +export class QueryParam extends Property implements QueryParamDefinition { + static _postman_propertyAllowsMultipleValues: boolean; + static _postman_propertyIndexKey: string; - } + key: string; + value: string; - namespace prototype { - function add(item: any, ...args: any[]): void; + constructor(options: QueryParamDefinition | string); - function all(): any; + toString(): string; - function append(item: any): any; + update(param: string | {key: string, value?: string}): void; - function assimilate(source: any, prune: any): void; + valueOf(): any; - function clear(): void; + static parse(query: string): any[]; - function count(): any; + static parseSingle(param: string, idx: number, all: string[]): any; - function each(iterator: any, context: any): void; + static unparse(params: any | any[], options?: {encode?: boolean | null, ignoreDisabled?: boolean | null}): string; - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } -} - -export namespace ProxyConfig { - namespace isProxyConfig { - const prototype: { - }; - - } - - namespace prototype { - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function getProtocols(): any; - - function getProxyUrl(): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function test(urlStr: any): any; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(options: any): void; - - function updateProtocols(protocols: any): void; - } -} - -export namespace ProxyConfigList { - namespace isProxyConfigList { - const prototype: { - }; - - } - - namespace prototype { - function add(item: any, ...args: any[]): void; - - function all(): any; - - function append(item: any): any; - - function assimilate(source: any, prune: any): void; - - function clear(): void; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function resolve(url: any): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } -} - -export namespace QueryParam { - namespace parse { - const prototype: { - }; - - } - - namespace parseSingle { - const prototype: { - }; - - } - - namespace prototype { - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toString(): any; - - function update(param: any): void; - - function valueOf(): any; - } - - namespace unparse { - const prototype: { - }; - - } - - namespace unparseSingle { - const prototype: { - }; - - } -} - -export namespace Request { - namespace isRequest { - const prototype: { - }; - - } - - namespace prototype { - function addHeader(header: any): void; - - function addQueryParams(params: any): void; - - function authorize(): void; - - function authorizeUsing(type: any, options: any): void; - - function clone(): any; - - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachHeader(callback: any): any; - - function forEachParent(options: any, iterator: any): void; - - function getHeaders(options: any): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function removeHeader(toRemove: any, options: any): any; - - function removeQueryParams(params: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(options: any): void; - - function upsertHeader(header: any): any; - } -} - -export namespace RequestAuth { - namespace isValidType { - const prototype: { - }; - - } - - namespace prototype { - function clear(type: any): void; - - function current(): any; - - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parameters(): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(options: any, type: any): void; - - function use(type: any, options: any): void; - } -} - -export namespace RequestBody { - namespace prototype { - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function isEmpty(): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toString(): any; - - function update(options: any): void; - } -} - -export namespace Response { - namespace createFromNode { - const prototype: { - }; - - } - - namespace isResponse { - const prototype: { - }; - - } - - namespace mimeInfo { - const prototype: { - }; - - } - - namespace prototype { - function dataURI(): any; - - function describe(content: any, type: any): void; - - function details(): any; - - function encoding(): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function json(reviver: any, strict: any): any; - - function meta(...args: any[]): any; - - function mime(contentType: any, contentDisposition: any): any; - - function parent(): any; - - function reason(): any; - - function setParent(parent: any): void; - - function size(): any; - - function text(): any; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(options: any): void; - } -} - -export namespace Script { - namespace isScript { - const prototype: { - }; - - } - - namespace prototype { - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toSource(): any; - - function update(options: any): void; - } -} - -export namespace Url { - namespace isUrl { - const prototype: { - }; - - } - - namespace parse { - const prototype: { - }; - - } - - namespace prototype { - function addQueryParams(params: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function getHost(): any; - - function getOAuth1BaseUrl(): any; - - function getPath(options: any): any; - - function getPathWithQuery(): any; - - function getQueryString(options: any): any; - - function getRaw(): any; - - function getRemote(options: any): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function removeQueryParams(params: any): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toString(forceProtocol: any): any; - - function update(url: any): any; - } -} - -export namespace UrlMatchPattern { - namespace prototype { - function createMatchPattern(): any; - - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function getProtocols(): any; - - function globPatternToRegexp(pattern: any): any; - - function matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; - - function matchAnyHost(matchRegexObject: any): any; - - function matchSuffixHostPattern(matchRegexObject: any, remote: any): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function test(urlStr: any): any; - - function testHost(host: any): any; - - function testPath(path: any): any; - - function testProtocol(protocol: any): any; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toString(): any; - - function update(options: any): void; - } -} - -export namespace UrlMatchPatternList { - namespace prototype { - function add(item: any, ...args: any[]): void; - - function all(): any; - - function append(item: any): any; - - function assimilate(source: any, prune: any): void; - - function clear(): void; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function test(urlStr: any): any; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } -} - -export namespace Variable { - namespace isVariable { - const prototype: { - }; - - } - - namespace prototype { - function cast(value: any): any; - - function castIn(value: any): any; - - function castOut(value: any): any; - - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function set(value: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toString(): any; - - function update(options: any): void; - - function valueOf(value: any, ...args: any[]): any; - - function valueType(typeName: any, _noCast: any): any; - - } - - namespace types { - class number { - constructor(p0: any); - - // Native method; no parameter or return type inference available - toExponential(p0: any): any; - - // Native method; no parameter or return type inference available - toFixed(p0: any): any; - - // Native method; no parameter or return type inference available - toLocaleString(): any; - - // Native method; no parameter or return type inference available - toPrecision(p0: any): any; - - // Native method; no parameter or return type inference available - toString(p0: any): any; - - // Native method; no parameter or return type inference available - valueOf(): any; - - static EPSILON: number; - - static MAX_SAFE_INTEGER: number; - - static MAX_VALUE: number; - - static MIN_SAFE_INTEGER: number; - - static MIN_VALUE: number; - - static NEGATIVE_INFINITY: number; - - static NaN: number; - - static POSITIVE_INFINITY: number; - - static isFinite(p0: any): any; - - static isInteger(p0: any): any; - - static isNaN(p0: any): any; - - static isSafeInteger(p0: any): any; - - static parseFloat(p0: any): any; - - static parseInt(p0: any, p1: any): any; - - } - - class string { - constructor(p0: any); - - // Native method; no parameter or return type inference available - anchor(p0: any): any; - - // Native method; no parameter or return type inference available - big(): any; - - // Native method; no parameter or return type inference available - blink(): any; - - // Native method; no parameter or return type inference available - bold(): any; - - // Native method; no parameter or return type inference available - charAt(p0: any): any; - - // Native method; no parameter or return type inference available - charCodeAt(p0: any): any; - - // Native method; no parameter or return type inference available - codePointAt(p0: any): any; - - // Native method; no parameter or return type inference available - concat(p0: any): any; - - // Native method; no parameter or return type inference available - endsWith(p0: any): any; - - // Native method; no parameter or return type inference available - fixed(): any; - - // Native method; no parameter or return type inference available - fontcolor(p0: any): any; - - // Native method; no parameter or return type inference available - fontsize(p0: any): any; - - // Native method; no parameter or return type inference available - includes(p0: any): any; - - // Native method; no parameter or return type inference available - indexOf(p0: any): any; - - // Native method; no parameter or return type inference available - italics(): any; - - // Native method; no parameter or return type inference available - lastIndexOf(p0: any): any; - - // Native method; no parameter or return type inference available - link(p0: any): any; - - // Native method; no parameter or return type inference available - localeCompare(p0: any): any; - - // Native method; no parameter or return type inference available - match(p0: any): any; - - // Native method; no parameter or return type inference available - normalize(): any; - - // Native method; no parameter or return type inference available - padEnd(p0: any): any; - - // Native method; no parameter or return type inference available - padStart(p0: any): any; - - // Native method; no parameter or return type inference available - repeat(p0: any): any; - - // Native method; no parameter or return type inference available - replace(p0: any, p1: any): any; - - // Native method; no parameter or return type inference available - search(p0: any): any; - - // Native method; no parameter or return type inference available - slice(p0: any, p1: any): any; - - // Native method; no parameter or return type inference available - small(): any; - - // Native method; no parameter or return type inference available - split(p0: any, p1: any): any; - - // Native method; no parameter or return type inference available - startsWith(p0: any): any; - - // Native method; no parameter or return type inference available - strike(): any; - - // Native method; no parameter or return type inference available - sub(): any; - - // Native method; no parameter or return type inference available - substr(p0: any, p1: any): any; - - // Native method; no parameter or return type inference available - substring(p0: any, p1: any): any; - - // Native method; no parameter or return type inference available - sup(): any; - - // Native method; no parameter or return type inference available - toLocaleLowerCase(): any; - - // Native method; no parameter or return type inference available - toLocaleUpperCase(): any; - - // Native method; no parameter or return type inference available - toLowerCase(): any; - - // Native method; no parameter or return type inference available - toString(): any; - - // Native method; no parameter or return type inference available - toUpperCase(): any; - - // Native method; no parameter or return type inference available - trim(): any; - - // Native method; no parameter or return type inference available - trimLeft(): any; - - // Native method; no parameter or return type inference available - trimRight(): any; - - // Native method; no parameter or return type inference available - valueOf(): any; - - static fromCharCode(p0: any): any; - - static fromCodePoint(p0: any): any; - - static raw(p0: any): any; - - } - - namespace any { - function out(val: any): any; - - namespace out { - // Too-deep object hierarchy from postman_collection.Variable.types.any.out - const prototype: any; - - } - - } - - namespace json { - function out(val: any): any; - - namespace out { - // Too-deep object hierarchy from postman_collection.Variable.types.json.out - const prototype: any; - - } - - } - } + static unparseSingle(obj: any, encode: boolean): string; } -export namespace VariableList { - namespace isVariableList { - const prototype: { - }; +export interface RequestDefinition extends PropertyDefinition { + url: string | Url; + method: string; + header?: HeaderDefinition; + body?: RequestBody; + auth: RequestAuthDefinition; + proxy: ProxyConfigDefinition; + certificate?: CertificateDefinition; +} - } +export class Request extends Property implements RequestDefinition { + auth: RequestAuth; + body?: RequestBody; + certificate?: Certificate; + headers: HeaderList; + method: string; + proxy: ProxyConfig; + url: Url; - namespace prototype { - function add(item: any, ...args: any[]): void; + constructor(options: RequestDefinition); - function all(): any; + addHeader(header: Header | HeaderDefinition): void; - function append(item: any): any; + addQueryParams(params: string | QueryParam[]): void; - function assimilate(source: any, prune: any): void; + authorize(): Request; - function clear(): void; + authorizeUsing(type: string | RequestAuthDefinition, options?: VariableList): void; - function count(): any; + clone(): Request; - function each(iterator: any, context: any): void; + forEachHeader(callback: any): void; - function eachParent(iterator: any, context: any): void; + getHeaders(options?: {ignoreCase?: boolean, enabled?: boolean}): any; - function filter(rule: any, context: any): any; + removeHeader(toRemove: string | Header, options: {ignoreCase: boolean}): any; - function find(rule: any, context: any): any; + removeQueryParams(params: string | string[]): void; - function findInParents(property: any, customizer: any): any; + toJSON(): any; - function findParentContaining(property: any, customizer: any): any; + update(options: RequestDefinition): void; - function forEachParent(options: any, iterator: any): void; + upsertHeader(header: any): void; - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function replace(str: any, overrides: any): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function substitute(obj: any, overrides: any, mutate: any): any; - - function syncFromObject(obj: any, track: any, prune: any): any; - - function syncToObject(obj: any): any; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } + static isRequest(obj: any): boolean; } -export namespace VariableScope { - namespace isVariableScope { - const prototype: { - }; - - } - - namespace prototype { - function addLayer(list: any): void; - - function clear(): void; - - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(variableName: any): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function set(key: any, value: any, type: any): any; - - function setParent(parent: any): void; - - function syncVariablesFrom(obj: any, track: any): any; - - function syncVariablesTo(obj: any): any; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function unset(key: any): void; - - function variables(): any; - } +export interface RequestAuthDefinition extends PropertyDefinition { + type?: string; } -export namespace Version { - namespace prototype { - function findInParents(property: any, customizer: any): any; +export class RequestAuth extends Property implements RequestAuthDefinition { + type: string; - function findParentContaining(property: any, customizer: any): any; + constructor(options: RequestAuthDefinition, parent?: Property | PropertyList); - function forEachParent(options: any, iterator: any): void; + clear(type: string): void; - function meta(...args: any[]): any; + current(): any | undefined; - function parent(): any; + parameters(): VariableList; - function set(value: any): void; + update(options: VariableList | any[] | any, type?: string): void; - function setParent(parent: any): void; + use(type: string, options: VariableList): void; - function toJSON(): any; + static isValidType(type: any): boolean; - function toString(): any; - } } + +export class RequestBody extends PropertyBase { + static MODES: { + raw: string; + formadata: string; + urlencoded: string; + file: string; + }; + + file: string; + formdata: PropertyList; + mode: string; + raw: string; + urlencoded: PropertyList; + + constructor(options: any); + + isEmpty(): boolean; + + toString(): string; + + update(options: any): void; +} + +export interface ResponseDefinition extends PropertyDefinition { + code: number; + reason?: string; + header?: HeaderDefinition[]; + cookie?: CookieDefinition[]; + body?: string; + stream?: Buffer | Uint8Array; + responseTime: number; +} + +export class Response extends Property implements ResponseDefinition { + body: string; + code: number; + cookies: CookieList; + headers: HeaderList; + originalRequest: Request; + responseTime: number; + status: string; + reason?: string; + + constructor(options: ResponseDefinition); + + dataURI(): string; + + details(): any; + + encoding(): any; + + json(reviver?: any, strict?: boolean): any; + + mime(contentType: any, contentDisposition: any): any; //TODO ?? + + size(): number; + + text(): string | undefined; + + toJSON(): any; + + update(options: any): void; + + static createFromNode(response: any, cookies: any): any; + + static isResponse(obj: any): boolean; + + static mimeInfo(type: any, disposition: any): any; // TODO ?? + +} + +export class Script extends Property { + exec: string[]; + src: Url; + type: string; + + constructor(options: any); + + toSource(): string; + + update(options?: {type?: string, src?: string, exec?: string | string[]}): void; + + static isScript(obj: any): boolean; +} + +export class Url extends PropertyBase { + auth: string; + hash: string; + host: string[]; + path: string[]; + port: string; + protocol: string; + query: PropertyList; + variables: VariableList; + + constructor(options: any | string); + + addQueryParams(params: any | string): void; + + getHost(): string; + + getOAuth1BaseUrl(): any; + + getPath(options?: {unresolved: boolean}): string; + + getPathWithQuery(): any | string; + + getQueryString(options?: {encode: boolean | null, ignoredDisabled: boolean | null} | null): string; + + getRaw(): string; + + getRemote(options: {forcePort: boolean}): string; + + removeQueryParams(params: QueryParam[] | string[] | string): void; + + toString(forceProtocol?: boolean): string; + + update(url: string | any): void; + + static isUrl(obj: any): boolean; + + static parse(url: string): any; + +} + +/* No documentation for this right now? +export class UrlMatchPattern { + constructor(options: any, ...args: any[]); + + createMatchPattern(): any; + + getProtocols(): any; + + globPatternToRegexp(pattern: any): any; + + matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; + + matchAnyHost(matchRegexObject: any): any; + + matchSuffixHostPattern(matchRegexObject: any, remote: any): any; + + test(urlStr: any): any; + + testHost(host: any): any; + + testPath(path: any): any; + + testProtocol(protocol: any): any; + + toJSON(): any; + + toString(): any; + + update(options: any): void; + + static MATCH_ALL_URLS: string; + + static PROTOCOL_DELIMITER: string; + +} + +export class UrlMatchPatternList extends PropertyList { + constructor(parent: any, list: any); + + test(urlStr: any): any; + +}*/ + +export interface VariableDefinition extends PropertyDefinition { + value?: any; + type?: VariableTypes; +} + +export enum VariableTypes { + string = 'string', + boolean = 'boolean', + number = 'number', + json = 'json', + any = 'any' +} + +export class Variable extends Property implements VariableDefinition { + key: string; + type: VariableTypes; + value: any; + + constructor(definition?: VariableDefinition); + + cast(value: any): any; + + castIn(value: any): any; + + castOut(value: any): any; + + get(): any; + + set(value: any): void; + + toString(): string; + + update(options: VariableDefinition): void; + + valueOf(value?: any): any; + + valueType(typeName: string, _noCast: boolean): string; + + static isVariable(obj: any): boolean; + +} + +export class VariableList extends PropertyList { + constructor(parent: Property, populate: any); + + replace(str: string, overrides?: any): string; + + substitute(obj: any | any[], overrides?: any[] | null, mutate?: boolean): any; + + syncFromObject(obj: any, track?: boolean, prune?: boolean): any; + + syncToObject(obj?: any): any; + + static isVariableList(obj: any): boolean; + +} + +export interface VariableScopeDefinition extends PropertyDefinition { + id?: string; + name?: string; + values?: VariableDefinition[] +} + +export class VariableScope extends Property implements VariableScopeDefinition { + values?: VariableDefinition[]; + + constructor(definition: VariableScopeDefinition, layers?: VariableList[]); + + addLayer(list: any): void; + + clear(): void; + + get(key: string): any; + + has(variableName: string): boolean; + + set(key: string, value: any, type: VariableTypes): void; + + syncVariablesFrom(obj: any, track: any): any; + + syncVariablesTo(obj: any): any; + + toJSON(): any; + + toObject(excludeDisabled: boolean, caseSensitive: boolean): any; + + unset(key: string): void; + + variables(): any; + + static isVariableScope(obj: any): boolean; +} + +export class Version extends PropertyBase { + build: string; + major: string; + minor: string; + patch: string; + prerelease: string; + raw: string; + string: string; + + constructor(options: any | string); + + set(value: any | string): void; + + toString(): string; +} From 5ad783bf51bfe9dabc59fb508858032f9defc509 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Tue, 27 Feb 2018 22:14:05 -0600 Subject: [PATCH 06/12] add strictFunctionTypes for dtslint --- types/postman-collection/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/postman-collection/tsconfig.json b/types/postman-collection/tsconfig.json index 3f176970e4..9b0b244020 100644 --- a/types/postman-collection/tsconfig.json +++ b/types/postman-collection/tsconfig.json @@ -7,6 +7,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" From a07b4e7d1d9b361ef739c3402deb86a7a870e60b Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Tue, 27 Feb 2018 22:14:24 -0600 Subject: [PATCH 07/12] fix tslint errors --- types/postman-collection/index.d.ts | 113 +++++++++++----------------- 1 file changed, 45 insertions(+), 68 deletions(-) diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts index 5365b9cfaf..8ed90d8827 100644 --- a/types/postman-collection/index.d.ts +++ b/types/postman-collection/index.d.ts @@ -2,21 +2,21 @@ // Project: https://github.com/postmanlabs/postman-collection // Definitions by: Kyle Buzby // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - +/// + export class PropertyBase { constructor(definition: any); - findInParents(property: string, customizer?: any): any | undefined; // TODO Update customizer function def + findInParents(property: string, customizer?: any): any ; // TODO Update customizer function def findParentContaining(property: any, customizer: any): any; // TODO Update customizer function def - forEachParent(iterator: any): void; // TODO Update iterator function def - forEachParent(options: any | boolean, iterator: any): void; // TODO Update iterator function def + forEachParent(iterator: (item: any) => void): void; + forEachParent(options: any /* TODO | boolean*/, iterator: (item: any) => void): void; meta(): any; - parent(): any | undefined; + parent(): any; setParent(parent: any): void; @@ -27,7 +27,6 @@ export class PropertyBase { static propertyUnprefixMeta(value: any, key: any): any; static toJSON(obj: any): any; - } export interface PropertyDefinition { @@ -48,10 +47,9 @@ export class Property extends PropertyBase implements PropertyDefinition { toObjectResolved(scope: any, overrides: any, options: any): any; - static replaceSubstitutions(str: string, variables: VariableList | any | (VariableList | any)[]): string; - - static replaceSubstitutionsIn(obj: any, variables: (VariableList | any)[], mutate: boolean): any; + static replaceSubstitutions(str: string, variables: VariableList | VariableList[]): string; + static replaceSubstitutionsIn(obj: any, variables: VariableList[], mutate: boolean): any; } export interface CertificateDefinition extends PropertyDefinition { @@ -62,13 +60,13 @@ export interface CertificateDefinition extends PropertyDefinition { passphrase?: string; } -export class Certificate extends Property { +export class Certificate extends Property implements CertificateDefinition { cert: any; id: string; key: any; - matches: any; // TODO update to UrlMatchPatternList? + matches: any[]; name: string; - passphrase: any; + passphrase: string; constructor(options: any); @@ -79,14 +77,12 @@ export class Certificate extends Property { update(options: CertificateDefinition): void; static isCertificate(obj: any): boolean; - } - export class PropertyList { constructor(type: any, parent: any, populate: any); - add(item: any | TElement): void; + add(item: TElement): void; all(): any; @@ -106,13 +102,13 @@ export class PropertyList { find(rule: any, context?: any): Item | ItemGroup; - get(key: string | any): TElement; + get(key: /*TODO string |*/ any): TElement; has(item: string | TElement, value?: any): boolean; idx(index: number): TElement; - indexOf(item: string | any): number; + indexOf(item: /*TODO string |*/ any): number; insert(item: TElement, before: TElement | string): void; @@ -122,24 +118,23 @@ export class PropertyList { one(id: string): TElement; - populate(items: any | any[]): void; + populate(items: any): void; prepend(item: TElement): any; - remove(predicate: any | string | TElement, context: any): any; + remove(predicate: any /*TODO | string | TElement*/, context: any): any; - repopulate(items: any | any[]): void; + repopulate(items: any): void; toJSON(): any; - toObject(excludeDisabled?: any | null, caseSensitive?: any | null, multiValue?: any | null, sanitizeKeys?: any): any; + toObject(excludeDisabled?: any, caseSensitive?: any, multiValue?: any, sanitizeKeys?: any): any; toString(): string; upsert(item: TElement): boolean | null; static isPropertyList(obj: any): any; - } export class CertificateList extends PropertyList { @@ -148,15 +143,14 @@ export class CertificateList extends PropertyList { resolveOne(url: string): CertificateDefinition; static isCertificateList(obj: any): boolean; - } export interface ItemGroupDefinition extends PropertyDefinition { - item?: (ItemDefinition | ItemGroupDefinition)[]; + item?: Array; auth?: RequestAuthDefinition; event?: EventDefinition[]; } - + export class ItemGroup extends Property { auth: RequestAuth; items: PropertyList; @@ -172,7 +166,6 @@ export class ItemGroup extends Property { oneDeep(idOrName: string): TItem; static isItemGroup(obj: any): boolean; - } export interface CollectionDefinition extends ItemGroupDefinition { @@ -181,7 +174,7 @@ export interface CollectionDefinition extends ItemGroupDefinition { name?: string; version?: string; }; - item?: (ItemDefinition | ItemGroupDefinition)[]; + item?: Array; variable?: VariableDefinition; auth?: RequestAuthDefinition; event?: EventDefinition[]; @@ -202,7 +195,6 @@ export class Collection extends ItemGroup implements CollectionDefiniti toJSON(): any; static isCollection(obj: any): boolean; - } export interface CookieDefinition { @@ -216,14 +208,13 @@ export interface CookieDefinition { httpOnly?: boolean; hostOnly?: boolean; session?: boolean; - extensions?: {key: string; value: string}[]; - + extensions?: Array<{key: string; value: string}>; } export class Cookie extends PropertyBase implements CookieDefinition { domain: string; expires: Date | string; - extensions: {key: string; value: string}[]; + extensions: Array<{key: string; value: string}>; hostOnly: any; httpOnly: any; maxAge: number; @@ -244,7 +235,6 @@ export class Cookie extends PropertyBase implements CookieDefinition { static parse(str: string): any; static splitParam(param: any): any; - } export class CookieList extends PropertyList { @@ -272,7 +262,6 @@ export class Description implements DescriptionDefinition { update(content: string | DescriptionDefinition, type?: string): void; static isDescription(obj: any): boolean; - } export interface EventDefinition extends PropertyDefinition { @@ -286,7 +275,7 @@ export class Event extends Property implements EventDefinition { constructor(definition: EventDefinition); - update(definition: EventDefinition): void; + update(definition: EventDefinition): void; } export class EventList extends PropertyList { @@ -297,7 +286,6 @@ export class EventList extends PropertyList { listenersOwn(name: string): Event[]; static isEventList(obj: any): boolean; - } export interface FormParamDefinition extends PropertyDefinition { @@ -305,7 +293,7 @@ export interface FormParamDefinition extends PropertyDefinition { value: string; } -export class FormParam extends Property implements FormParamDefinition{ +export class FormParam extends Property implements FormParamDefinition { key: string; value: string; @@ -316,7 +304,7 @@ export class FormParam extends Property implements FormParamDefinition{ toString(): string; - valueOf(): any | string; + valueOf(): any; // static parse(): void; // TODO not implemented yet } @@ -348,7 +336,7 @@ export class Header extends Property implements HeaderDefinition { static unparse(headers: HeaderList | any[], separator?: string): string; - static unparseSingle(header: Header): string; + static unparseSingle(header: Header): string; } export class HeaderList extends PropertyList
{ @@ -356,7 +344,7 @@ export class HeaderList extends PropertyList
{ contentSize(): number; - static isHeaderList(obj: any): boolean; + static isHeaderList(obj: any): boolean; } export interface ItemDefinition extends PropertyDefinition { @@ -379,7 +367,6 @@ export class Item extends Property implements ItemDefinition { getEvents(name: string): Event[]; static isItem(obj: any): boolean; - } export interface ProxyConfigDefinition extends PropertyDefinition { @@ -409,7 +396,6 @@ export class ProxyConfig extends Property implements ProxyConfigDefinition { updateProtocols(protocols: string[]): void; static isProxyConfig(obj: any): boolean; - } export class ProxyConfigList extends PropertyList { @@ -418,7 +404,6 @@ export class ProxyConfigList extends PropertyList { resolve(url?: Url): ProxyConfigDefinition; static isProxyConfigList(obj: any): boolean; - } export interface QueryParamDefinition extends PropertyDefinition { @@ -445,10 +430,9 @@ export class QueryParam extends Property implements QueryParamDefinition { static parseSingle(param: string, idx: number, all: string[]): any; - static unparse(params: any | any[], options?: {encode?: boolean | null, ignoreDisabled?: boolean | null}): string; + static unparse(params: any, options?: {encode?: boolean | null, ignoreDisabled?: boolean | null}): string; static unparseSingle(obj: any, encode: boolean): string; - } export interface RequestDefinition extends PropertyDefinition { @@ -497,7 +481,6 @@ export class Request extends Property implements RequestDefinition { upsertHeader(header: any): void; static isRequest(obj: any): boolean; - } export interface RequestAuthDefinition extends PropertyDefinition { @@ -511,19 +494,17 @@ export class RequestAuth extends Property implements RequestAuthDefinition { clear(type: string): void; - current(): any | undefined; + current(): any; parameters(): VariableList; - update(options: VariableList | any[] | any, type?: string): void; + update(options: /*TODO VariableList | any[] |*/ any, type?: string): void; use(type: string, options: VariableList): void; static isValidType(type: any): boolean; - } - export class RequestBody extends PropertyBase { static MODES: { raw: string; @@ -544,7 +525,7 @@ export class RequestBody extends PropertyBase { toString(): string; - update(options: any): void; + update(options: any): void; } export interface ResponseDefinition extends PropertyDefinition { @@ -577,7 +558,7 @@ export class Response extends Property implements ResponseDefinition { json(reviver?: any, strict?: boolean): any; - mime(contentType: any, contentDisposition: any): any; //TODO ?? + mime(contentType: any, contentDisposition: any): any; // TODO ?? size(): number; @@ -592,7 +573,6 @@ export class Response extends Property implements ResponseDefinition { static isResponse(obj: any): boolean; static mimeInfo(type: any, disposition: any): any; // TODO ?? - } export class Script extends Property { @@ -606,7 +586,7 @@ export class Script extends Property { update(options?: {type?: string, src?: string, exec?: string | string[]}): void; - static isScript(obj: any): boolean; + static isScript(obj: any): boolean; } export class Url extends PropertyBase { @@ -619,9 +599,9 @@ export class Url extends PropertyBase { query: PropertyList; variables: VariableList; - constructor(options: any | string); + constructor(options: any /*TODO| string*/); - addQueryParams(params: any | string): void; + addQueryParams(params: any /*TODO | string*/): void; getHost(): string; @@ -629,7 +609,7 @@ export class Url extends PropertyBase { getPath(options?: {unresolved: boolean}): string; - getPathWithQuery(): any | string; + getPathWithQuery(): any /*TODO | string*/; getQueryString(options?: {encode: boolean | null, ignoredDisabled: boolean | null} | null): string; @@ -641,12 +621,11 @@ export class Url extends PropertyBase { toString(forceProtocol?: boolean): string; - update(url: string | any): void; + update(url: /*TODO string |*/ any): void; static isUrl(obj: any): boolean; static parse(url: string): any; - } /* No documentation for this right now? @@ -731,7 +710,6 @@ export class Variable extends Property implements VariableDefinition { valueType(typeName: string, _noCast: boolean): string; static isVariable(obj: any): boolean; - } export class VariableList extends PropertyList { @@ -739,20 +717,19 @@ export class VariableList extends PropertyList { replace(str: string, overrides?: any): string; - substitute(obj: any | any[], overrides?: any[] | null, mutate?: boolean): any; + substitute(obj: any, overrides?: any[] | null, mutate?: boolean): any; syncFromObject(obj: any, track?: boolean, prune?: boolean): any; syncToObject(obj?: any): any; static isVariableList(obj: any): boolean; - } export interface VariableScopeDefinition extends PropertyDefinition { id?: string; name?: string; - values?: VariableDefinition[] + values?: VariableDefinition[]; } export class VariableScope extends Property implements VariableScopeDefinition { @@ -782,7 +759,7 @@ export class VariableScope extends Property implements VariableScopeDefinition { variables(): any; - static isVariableScope(obj: any): boolean; + static isVariableScope(obj: any): boolean; } export class Version extends PropertyBase { @@ -794,9 +771,9 @@ export class Version extends PropertyBase { raw: string; string: string; - constructor(options: any | string); + constructor(options: any /*TODO | string*/); - set(value: any | string): void; + set(value: any /*TODO | string*/): void; - toString(): string; -} + toString(): string; +} From d7629ffffac1ff973c581d2c166a229a6bc2af8b Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Tue, 27 Feb 2018 22:26:21 -0600 Subject: [PATCH 08/12] add some function types --- types/postman-collection/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts index 8ed90d8827..e0025d9bda 100644 --- a/types/postman-collection/index.d.ts +++ b/types/postman-collection/index.d.ts @@ -7,9 +7,9 @@ export class PropertyBase { constructor(definition: any); - findInParents(property: string, customizer?: any): any ; // TODO Update customizer function def + findInParents(property: string, customizer?: (item: any) => boolean): PropertyBase ; - findParentContaining(property: any, customizer: any): any; // TODO Update customizer function def + findParentContaining(property: any, customizer: (item: any) => boolean): PropertyBase; forEachParent(iterator: (item: any) => void): void; forEachParent(options: any /* TODO | boolean*/, iterator: (item: any) => void): void; From 63ca62a96bbc16ac3bd46b6dc6f46506a20483d7 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Tue, 27 Feb 2018 22:26:30 -0600 Subject: [PATCH 09/12] add start of tests --- .../postman-collection-tests.ts | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/types/postman-collection/postman-collection-tests.ts b/types/postman-collection/postman-collection-tests.ts index fd65e5e3d9..9f98e7d689 100644 --- a/types/postman-collection/postman-collection-tests.ts +++ b/types/postman-collection/postman-collection-tests.ts @@ -1,7 +1,26 @@ import * as pmCollection from 'postman-collection'; -/* Example https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/base64-js/base64-js-tests.ts -base64js.byteLength(""); // $ExpectType number -base64js.toByteArray(""); // $ExpectType Uint8Array -base64js.fromByteArray(new Uint8Array(0)); // $ExpectType string -*/ +const certificate = new pmCollection.Certificate({}); +certificate.cert; // $ExpectType any +certificate.id; // $ExpectType string +certificate.key; // $ExpectType any +certificate.matches; // $ExpectType any[] +certificate.name; // $ExpectType string +certificate.passphrase; // $ExpectType string +certificate.auth; // $ExpectType RequestAuth +certificate.disabled; // $ExpectType boolean + +certificate.canApplyTo("string"); // $ExpectType any +certificate.canApplyTo(new pmCollection.Url({})); // $ExpectType any + +certificate.toJSON(); // $ExpectType CertificateDefinition +certificate.update({}); // $ExpectType void + +certificate as pmCollection.Property; // $ExpectType Property + +pmCollection.Certificate.isCertificate(certificate); // $ExpectType boolean + +let collection: pmCollection.Collection; +collection = new pmCollection.Collection(); +collection = new pmCollection.Collection({}); +collection = new pmCollection.Collection({}, []); From 45b3a22d74a0c14154a3adc21cf79fd9aba386de Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Sun, 11 Mar 2018 21:02:53 -0500 Subject: [PATCH 10/12] implement types and tests --- types/postman-collection/index.d.ts | 522 ++++++----- .../postman-collection-tests.ts | 868 +++++++++++++++++- 2 files changed, 1133 insertions(+), 257 deletions(-) diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts index e0025d9bda..a02953720a 100644 --- a/types/postman-collection/index.d.ts +++ b/types/postman-collection/index.d.ts @@ -2,139 +2,140 @@ // Project: https://github.com/postmanlabs/postman-collection // Definitions by: Kyle Buzby // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 /// -export class PropertyBase { - constructor(definition: any); +export interface PropertyBaseDefinition { + description?: string | DescriptionDefinition; +} - findInParents(property: string, customizer?: (item: any) => boolean): PropertyBase ; +export class PropertyBase implements PropertyBaseDefinition { + description?: string | DescriptionDefinition; - findParentContaining(property: any, customizer: (item: any) => boolean): PropertyBase; + constructor(definition?: PropertyBaseDefinition | {info: PropertyBaseDefinition} | string); + + findInParents(property: string, customizer?: (item: PropertyBase) => boolean): PropertyBase ; + + findParentContaining(property: any, customizer: (item: PropertyBase) => boolean): PropertyBase; forEachParent(iterator: (item: any) => void): void; - forEachParent(options: any /* TODO | boolean*/, iterator: (item: any) => void): void; + forEachParent(options: {withRoot: boolean}, iterator: (item: any) => void): void; meta(): any; - parent(): any; + parent(): PropertyBase | undefined; - setParent(parent: any): void; + setParent(parent: PropertyBase): void; - toJSON(): any; + toJSON(): TDefinition; - static propertyIsMeta(value: any, key: any): any; + static propertyIsMeta(_value: any, key: string): boolean; - static propertyUnprefixMeta(value: any, key: any): any; + static propertyUnprefixMeta(_value: any, key: string): string; static toJSON(obj: any): any; } -export interface PropertyDefinition { +export interface PropertyDefinition extends PropertyBaseDefinition { id?: string; name?: string; disabled?: boolean; } -export class Property extends PropertyBase implements PropertyDefinition { - auth: RequestAuth; +export class Property extends PropertyBase implements PropertyDefinition { disabled: boolean; id: string; name: string; - constructor(definition?: PropertyDefinition); + constructor(definition?: TDefinition | {info: TDefinition, disabled: boolean}); describe(content: string, type?: string): void; - toObjectResolved(scope: any, overrides: any, options: any): any; + toObjectResolved(scope: {variables: VariableList} | null, overrides: any[], options?: {ignoreOwnVariables: boolean}): TDefinition; static replaceSubstitutions(str: string, variables: VariableList | VariableList[]): string; - static replaceSubstitutionsIn(obj: any, variables: VariableList[], mutate: boolean): any; + static replaceSubstitutionsIn(obj: T, variables: VariableList[], mutate: boolean): T; } export interface CertificateDefinition extends PropertyDefinition { - name?: string; - matches?: any[]; - key?: any; - cert?: any; + matches?: string[] | UrlMatchPatternList; + key?: {src?: string} | string; + cert?: {src?: string} | string; passphrase?: string; } -export class Certificate extends Property implements CertificateDefinition { - cert: any; - id: string; - key: any; - matches: any[]; - name: string; +export class Certificate extends Property implements CertificateDefinition { + cert: {src?: string}; + key: {src?: string}; + matches: UrlMatchPatternList; passphrase: string; - constructor(options: any); + constructor(options: CertificateDefinition); - canApplyTo(url: string | Url): any; - - toJSON(): CertificateDefinition; + canApplyTo(url: string | Url): boolean; update(options: CertificateDefinition): void; static isCertificate(obj: any): boolean; } -export class PropertyList { - constructor(type: any, parent: any, populate: any); +export class PropertyList extends PropertyBase { + constructor(type: string, parent: any, populate: TElement[]); add(item: TElement): void; - all(): any; + all(): TElement[]; - append(item: TElement): any; + append(item: TElement): void; - assimilate(source: PropertyList | any[], prune: boolean): void; + assimilate(source: PropertyList | TElement[], prune: boolean): void; clear(): void; count(): number; - each(iterator: any, context: any): void; + each(iterator: (item: TElement) => void, context?: any): void; - eachParent(iterator: any, context?: any): void; + eachParent(iterator: (item: any) => void, context?: any): void; - filter(rule: any, context: any): any; + filter(rule: (item: TElement) => boolean, context: any): TElement[]; - find(rule: any, context?: any): Item | ItemGroup; + find(rule: (item: TElement) => boolean, context: any): TElement; - get(key: /*TODO string |*/ any): TElement; + get(key: string): TElement | undefined; has(item: string | TElement, value?: any): boolean; idx(index: number): TElement; - indexOf(item: /*TODO string |*/ any): number; + indexOf(item: string): number; insert(item: TElement, before: TElement | string): void; - insertAfter(item: TElement, after: TElement | string): any; + insertAfter(item: TElement, after: TElement | string): void; - map(iterator: any, context: any): any; + map(iterator: (item: TElement) => any, context?: any): any; one(id: string): TElement; - populate(items: any): void; + populate(items: TElement[]): void; - prepend(item: TElement): any; + prepend(item: TElement): void; - remove(predicate: any /*TODO | string | TElement*/, context: any): any; + remove(predicate: ((item: TElement) => boolean) | string | TElement, context: any): void; repopulate(items: any): void; toJSON(): any; - toObject(excludeDisabled?: any, caseSensitive?: any, multiValue?: any, sanitizeKeys?: any): any; + toObject(excludeDisabled?: boolean, caseSensitive?: boolean, multiValue?: boolean, sanitizeKeys?: boolean): any; toString(): string; upsert(item: TElement): boolean | null; - static isPropertyList(obj: any): any; + static isPropertyList(obj: any): boolean; } export class CertificateList extends PropertyList { @@ -151,17 +152,18 @@ export interface ItemGroupDefinition extends PropertyDefinition { event?: EventDefinition[]; } -export class ItemGroup extends Property { - auth: RequestAuth; +export class ItemGroup extends Property { + auth?: RequestAuth; items: PropertyList; + events: EventList; constructor(definition?: ItemGroupDefinition); - authorizeRequestsUsing(type: any, options: any): void; // TODO add better types for parameters + authorizeRequestsUsing(type: string | RequestAuthDefinition, options?: VariableList): void; - forEachItem(callback: any): any; + forEachItem(callback: (el: TItem) => void): void; - forEachItemGroup(callback: any): void; + forEachItemGroup(callback: (el: ItemGroup) => void): void; oneDeep(idOrName: string): TItem; @@ -174,25 +176,21 @@ export interface CollectionDefinition extends ItemGroupDefinition { name?: string; version?: string; }; - item?: Array; variable?: VariableDefinition; - auth?: RequestAuthDefinition; - event?: EventDefinition[]; - version?: string | Version; } -export class Collection extends ItemGroup implements CollectionDefinition { +export class Collection extends ItemGroup { events: EventList; variables: VariableList; - version: Version; + version?: Version; constructor(definition?: CollectionDefinition, environments?: any[]); syncVariablesFrom(obj: any, track?: boolean): any; - syncVariablesTo(obj?: any): any; + syncVariablesTo(obj: any): any; - toJSON(): any; + toJSON(): CollectionDefinition; static isCollection(obj: any): boolean; } @@ -202,8 +200,8 @@ export interface CookieDefinition { value?: string; expires?: string | Date; maxAge?: number; - domain?: string; - path?: string; + domain: string; + path: string; secure?: boolean; httpOnly?: boolean; hostOnly?: boolean; @@ -211,67 +209,66 @@ export interface CookieDefinition { extensions?: Array<{key: string; value: string}>; } -export class Cookie extends PropertyBase implements CookieDefinition { +export class Cookie extends PropertyBase implements CookieDefinition { domain: string; - expires: Date | string; - extensions: Array<{key: string; value: string}>; - hostOnly: any; - httpOnly: any; - maxAge: number; - name: string; + expires: Date; + extensions?: Array<{key: string; value: string}>; + hostOnly?: boolean; + httpOnly?: boolean; + maxAge?: number; path: string; - secure: any; - session: any; - value: string; + secure?: boolean; + session?: boolean; + value?: string; constructor(options?: CookieDefinition); - update(options: any): void; + update(options: CookieDefinition): void; valueOf(): string; static isCookie(obj: any): boolean; - static parse(str: string): any; + static parse(str: string): CookieDefinition; - static splitParam(param: any): any; + static splitParam(param: string): {key: string, value: string | boolean }; } export class CookieList extends PropertyList { - constructor(parent: any, cookies: any[]); + constructor(parent: any, cookies: Cookie[]); static isCookieList(obj: any): boolean; } export interface DescriptionDefinition { content: string; - format: string; + type?: string; } export class Description implements DescriptionDefinition { - format: string; // TODO huh? content: string; type: string; - constructor(definition?: DescriptionDefinition); + constructor(definition?: DescriptionDefinition | string); - toJSON(): any; + toJSON(): DescriptionDefinition; toString(): string; - update(content: string | DescriptionDefinition, type?: string): void; + update(content: DescriptionDefinition): void; + update(content: string, type?: string): void; static isDescription(obj: any): boolean; } export interface EventDefinition extends PropertyDefinition { - listen: string; - script: string | Script; + listen?: string; + script: string | string[] | ScriptDefinition | Script; } -export class Event extends Property implements EventDefinition { - listen: string; - script: string; +export class Event extends Property implements EventDefinition { + listen?: string; + script: Script; constructor(definition: EventDefinition); @@ -279,7 +276,7 @@ export class Event extends Property implements EventDefinition { } export class EventList extends PropertyList { - constructor(parent: any, populate: any[]); + constructor(parent: any, populate: Event[]); listeners(name: string): Event[]; @@ -289,16 +286,13 @@ export class EventList extends PropertyList { } export interface FormParamDefinition extends PropertyDefinition { - key: string; - value: string; + key?: string; + value?: any; } -export class FormParam extends Property implements FormParamDefinition { +export class FormParam extends Property implements FormParamDefinition { key: string; - value: string; - - static _postman_propertyAllowsMultipleValues: boolean; - static _postman_propertyIndex: string; + value: any; constructor(options: FormParamDefinition); @@ -310,19 +304,20 @@ export class FormParam extends Property implements FormParamDefinition { } export interface HeaderDefinition extends PropertyDefinition { - key: string; - value: string; + key?: string; + value?: string; + system?: boolean; } -export class Header extends Property implements HeaderDefinition { +export class Header extends Property implements HeaderDefinition { key: string; value: string; - constructor(options: HeaderDefinition | string, name?: string); + constructor(options: string | HeaderDefinition, name?: string) toString(): string; - update(options: any): void; + update(options: HeaderDefinition): void; valueOf(): string; @@ -334,9 +329,9 @@ export class Header extends Property implements HeaderDefinition { static parseSingle(header: string): HeaderDefinition; - static unparse(headers: HeaderList | any[], separator?: string): string; + static unparse(headers: HeaderList | HeaderDefinition[], separator?: string): string; - static unparseSingle(header: Header): string; + static unparseSingle(header: HeaderDefinition): string; } export class HeaderList extends PropertyList
{ @@ -353,35 +348,34 @@ export interface ItemDefinition extends PropertyDefinition { events?: EventDefinition[]; } -export class Item extends Property implements ItemDefinition { - events: EventDefinition[]; +export class Item extends Property { + events: EventList; request: Request; - responses: ResponseDefinition[]; + responses: PropertyList; constructor(definition?: ItemDefinition); - authorizeRequestUsing(type: string | RequestAuthDefinition, options?: VariableList): any; + authorizeRequestUsing(type: string | RequestAuthDefinition, options?: VariableList): void; getAuth(): RequestAuth; - getEvents(name: string): Event[]; + getEvents(name?: string): Event[]; static isItem(obj: any): boolean; } export interface ProxyConfigDefinition extends PropertyDefinition { - match?: string; + match?: string | {pattern: string} | UrlMatchPattern; host?: string; port?: number; tunnel?: boolean; - disabled?: boolean; } -export class ProxyConfig extends Property implements ProxyConfigDefinition { - static host: string; - static match: string; - static port: number; - static tunnel: boolean; +export class ProxyConfig extends Property implements ProxyConfigDefinition { + host: string; + match: UrlMatchPattern; + port: number; + tunnel: boolean; constructor(options?: ProxyConfigDefinition); @@ -389,7 +383,7 @@ export class ProxyConfig extends Property implements ProxyConfigDefinition { getProxyUrl(): string; - test(urlStr?: string): any; + test(urlStr?: string): boolean; update(options: ProxyConfigDefinition): void; @@ -401,22 +395,24 @@ export class ProxyConfig extends Property implements ProxyConfigDefinition { export class ProxyConfigList extends PropertyList { constructor(parent: any, populate: ProxyConfig[]); - resolve(url?: Url): ProxyConfigDefinition; + resolve(url: string | Url): ProxyConfig; static isProxyConfigList(obj: any): boolean; } export interface QueryParamDefinition extends PropertyDefinition { - key: string; - value: string; + key: string | null; + value: string | null; + system?: boolean; } -export class QueryParam extends Property implements QueryParamDefinition { +export class QueryParam extends Property implements QueryParamDefinition { static _postman_propertyAllowsMultipleValues: boolean; static _postman_propertyIndexKey: string; - key: string; - value: string; + key: string | null; + value: string | null; + system?: boolean; constructor(options: QueryParamDefinition | string); @@ -424,61 +420,59 @@ export class QueryParam extends Property implements QueryParamDefinition { update(param: string | {key: string, value?: string}): void; - valueOf(): any; + valueOf(): string; - static parse(query: string): any[]; + static parse(query: string): QueryParamDefinition[]; - static parseSingle(param: string, idx: number, all: string[]): any; + static parseSingle(param: string, idx: number, all: string[]): QueryParamDefinition; - static unparse(params: any, options?: {encode?: boolean | null, ignoreDisabled?: boolean | null}): string; + static unparse(params: QueryParamDefinition[], options?: {encode?: boolean, ignoreDisabled?: boolean}): string; - static unparseSingle(obj: any, encode: boolean): string; + static unparseSingle(obj: QueryParamDefinition, encode: boolean): string; } export interface RequestDefinition extends PropertyDefinition { url: string | Url; - method: string; + method?: string; header?: HeaderDefinition; body?: RequestBody; - auth: RequestAuthDefinition; - proxy: ProxyConfigDefinition; + auth?: RequestAuthDefinition; + proxy?: ProxyConfigDefinition; certificate?: CertificateDefinition; } -export class Request extends Property implements RequestDefinition { - auth: RequestAuth; +export class Request extends Property implements RequestDefinition { + auth?: RequestAuth; body?: RequestBody; certificate?: Certificate; headers: HeaderList; method: string; - proxy: ProxyConfig; + proxy?: ProxyConfig; url: Url; - constructor(options: RequestDefinition); + constructor(options: RequestDefinition | string); addHeader(header: Header | HeaderDefinition): void; - addQueryParams(params: string | QueryParam[]): void; + addQueryParams(params: string | QueryParamDefinition[]): void; - authorize(): Request; - - authorizeUsing(type: string | RequestAuthDefinition, options?: VariableList): void; + authorizeUsing(type: string | RequestAuthDefinition | null, options?: VariableList): void; clone(): Request; - forEachHeader(callback: any): void; + forEachHeader(callback: (header: Header, context: Request) => void): void; getHeaders(options?: {ignoreCase?: boolean, enabled?: boolean}): any; - removeHeader(toRemove: string | Header, options: {ignoreCase: boolean}): any; + removeHeader(toRemove: string | Header, options?: {ignoreCase: boolean}): void; - removeQueryParams(params: string | string[]): void; + removeQueryParams(params: string | string[] | QueryParamDefinition[]): void; - toJSON(): any; + toJSON(): RequestDefinition; update(options: RequestDefinition): void; - upsertHeader(header: any): void; + upsertHeader(header: HeaderDefinition): void; static isRequest(obj: any): boolean; } @@ -487,10 +481,10 @@ export interface RequestAuthDefinition extends PropertyDefinition { type?: string; } -export class RequestAuth extends Property implements RequestAuthDefinition { +export class RequestAuth extends Property implements RequestAuthDefinition { type: string; - constructor(options: RequestAuthDefinition, parent?: Property | PropertyList); + constructor(options: RequestAuthDefinition, parent?: Property | PropertyList); clear(type: string): void; @@ -498,67 +492,76 @@ export class RequestAuth extends Property implements RequestAuthDefinition { parameters(): VariableList; - update(options: /*TODO VariableList | any[] |*/ any, type?: string): void; + update(options: VariableList | Array<{key: string, value: string}> | {key: string, value: string}, type?: string): void; - use(type: string, options: VariableList): void; + use(type: string, options: VariableList | Array<{key: string, value: string}> | {key: string, value: string}): void; static isValidType(type: any): boolean; } -export class RequestBody extends PropertyBase { +export interface RequestBodyDefinition extends PropertyBaseDefinition { + mode: string; + raw?: string; + urlencoded?: QueryParamDefinition[] | PropertyList | string; + file?: string | {src: string}; + formdata?: FormParamDefinition[] | PropertyList; +} + +export class RequestBody extends PropertyBase implements RequestBodyDefinition { static MODES: { raw: string; - formadata: string; + formdata: string; urlencoded: string; file: string; }; - file: string; - formdata: PropertyList; + file?: {src: string}; + formdata?: PropertyList; mode: string; - raw: string; - urlencoded: PropertyList; + raw?: string; + urlencoded?: PropertyList; - constructor(options: any); + constructor(options: RequestBodyDefinition); isEmpty(): boolean; toString(): string; - update(options: any): void; + update(options: RequestBodyDefinition): void; } export interface ResponseDefinition extends PropertyDefinition { code: number; - reason?: string; header?: HeaderDefinition[]; cookie?: CookieDefinition[]; body?: string; stream?: Buffer | Uint8Array; responseTime: number; + originalRequest?: RequestDefinition; } -export class Response extends Property implements ResponseDefinition { - body: string; +export class Response extends Property implements ResponseDefinition { + body?: string; code: number; cookies: CookieList; headers: HeaderList; - originalRequest: Request; + originalRequest?: Request; responseTime: number; status: string; - reason?: string; + stream?: Buffer | Uint8Array; + responseSize?: number; constructor(options: ResponseDefinition); dataURI(): string; - details(): any; + details(): {name: string, detail: string, code: number, standardName: string} | undefined; - encoding(): any; + encoding(): {format: string, source: string}; json(reviver?: any, strict?: boolean): any; - mime(contentType: any, contentDisposition: any): any; // TODO ?? + reason(): string; size(): number; @@ -566,130 +569,143 @@ export class Response extends Property implements ResponseDefinition { toJSON(): any; - update(options: any): void; + update(options: ResponseDefinition): void; - static createFromNode(response: any, cookies: any): any; + static createFromNode(response: { + body: string | Buffer | Uint8Array, + headers?: HeaderDefinition[], + statusCode: number, + statusMessage?: string, + elapsedTime: number + }, cookies: CookieDefinition[]): Response; static isResponse(obj: any): boolean; - - static mimeInfo(type: any, disposition: any): any; // TODO ?? } -export class Script extends Property { - exec: string[]; - src: Url; +export interface ScriptDefinition extends PropertyDefinition { + type?: string; + src?: string | Url; + exec?: string | string[]; +} + +export class Script extends Property implements ScriptDefinition { + exec?: string[]; + src?: Url; type: string; - constructor(options: any); + constructor(options?: ScriptDefinition | string | string[]); - toSource(): string; + toSource(): string | undefined; - update(options?: {type?: string, src?: string, exec?: string | string[]}): void; + update(options: ScriptDefinition | string | string[]): void; static isScript(obj: any): boolean; } -export class Url extends PropertyBase { - auth: string; - hash: string; - host: string[]; +export interface UrlDefinition extends PropertyBaseDefinition { + auth?: {user: string, password: string}; + hash?: string; + host?: string[] | string; + path: string[] | string; + port?: string; + query?: QueryParamDefinition[] | PropertyList | string; + variable?: VariableDefinition[]; + protocol?: string; +} + +export class Url extends PropertyBase implements UrlDefinition { + auth?: {user: string, password: string}; + hash?: string; + host?: string[]; path: string[]; - port: string; - protocol: string; + port?: string; + protocol?: string; query: PropertyList; variables: VariableList; - constructor(options: any /*TODO| string*/); + constructor(options: UrlDefinition | string); - addQueryParams(params: any /*TODO | string*/): void; + addQueryParams(params: QueryParamDefinition[] | string): void; getHost(): string; - getOAuth1BaseUrl(): any; + getOAuth1BaseUrl(): string; getPath(options?: {unresolved: boolean}): string; - getPathWithQuery(): any /*TODO | string*/; + getPathWithQuery(): string; - getQueryString(options?: {encode: boolean | null, ignoredDisabled: boolean | null} | null): string; + getQueryString(options?: {encode?: boolean, ignoredDisabled?: boolean}): string; getRaw(): string; - getRemote(options: {forcePort: boolean}): string; + getRemote(options?: {forcePort: boolean}): string; - removeQueryParams(params: QueryParam[] | string[] | string): void; + removeQueryParams(params: QueryParamDefinition[] | QueryParamDefinition | string[] | string): void; toString(forceProtocol?: boolean): string; - update(url: /*TODO string |*/ any): void; + update(url: UrlDefinition | string): void; static isUrl(obj: any): boolean; - static parse(url: string): any; + static parse(url: string): UrlDefinition; } -/* No documentation for this right now? export class UrlMatchPattern { - constructor(options: any, ...args: any[]); + pattern?: string; - createMatchPattern(): any; + constructor(options: string | {pattern: string}); - getProtocols(): any; + createMatchPattern(): {protocols: string[], host: string, path: RegExp} | undefined; - globPatternToRegexp(pattern: any): any; + getProtocols(): string[]; - matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; + globPatternToRegexp(pattern: string): RegExp; - matchAnyHost(matchRegexObject: any): any; + matchAbsoluteHostPattern(matchRegexObject: {protocols: string[], host: string, path: RegExp}, remote: string): boolean; - matchSuffixHostPattern(matchRegexObject: any, remote: any): any; + matchAnyHost(matchRegexObject: {protocols: string[], host: string, path: RegExp}): boolean; - test(urlStr: any): any; + matchSuffixHostPattern(matchRegexObject: {protocols: string[], host: string, path: RegExp}, remote: string): boolean; - testHost(host: any): any; + test(urlStr: string): boolean; - testPath(path: any): any; + testHost(host: string): boolean; - testProtocol(protocol: any): any; + testPath(path: string): boolean; - toJSON(): any; + testProtocol(protocol: string): boolean; - toString(): any; + toJSON(): {pattern: string}; - update(options: any): void; + toString(): string; + + update(options: {pattern: string}): void; static MATCH_ALL_URLS: string; static PROTOCOL_DELIMITER: string; - } export class UrlMatchPatternList extends PropertyList { - constructor(parent: any, list: any); + constructor(parent: Property, list: string[]); - test(urlStr: any): any; - -}*/ + test(urlStr: string): boolean; +} export interface VariableDefinition extends PropertyDefinition { value?: any; - type?: VariableTypes; + type?: string; + key?: string; } -export enum VariableTypes { - string = 'string', - boolean = 'boolean', - number = 'number', - json = 'json', - any = 'any' -} - -export class Variable extends Property implements VariableDefinition { - key: string; - type: VariableTypes; +export class Variable extends Property implements VariableDefinition { + key?: string; + type: string; value: any; - constructor(definition?: VariableDefinition); + constructor(definition?: VariableDefinition | {[index: string]: VariableDefinition}); cast(value: any): any; @@ -705,39 +721,45 @@ export class Variable extends Property implements VariableDefinition { update(options: VariableDefinition): void; - valueOf(value?: any): any; + valueOf(value: any): any; valueType(typeName: string, _noCast: boolean): string; static isVariable(obj: any): boolean; + + static types: { + string: StringConstructor; + boolean: BooleanConstructor; + number: NumberConstructor; + json: {in: (val: any) => string, out: (val: string) => any}; + any: {in: (val: T) => T, out: (val: T) => T}; + }; } export class VariableList extends PropertyList { - constructor(parent: Property, populate: any); + constructor(parent: Property, populate: Variable[]); - replace(str: string, overrides?: any): string; + replace(str: string, overrides?: VariableList): string; - substitute(obj: any, overrides?: any[] | null, mutate?: boolean): any; + substitute(obj: T, overrides?: VariableList, mutate?: boolean): T; - syncFromObject(obj: any, track?: boolean, prune?: boolean): any; + syncFromObject(obj: {[key: string]: VariableDefinition}, track?: boolean, prune?: boolean): {created: string[], updated: string[], deleted: string[]} | undefined; - syncToObject(obj?: any): any; + syncToObject(obj?: {[key: string]: VariableDefinition}): {[key: string]: VariableDefinition}; static isVariableList(obj: any): boolean; } export interface VariableScopeDefinition extends PropertyDefinition { - id?: string; - name?: string; values?: VariableDefinition[]; } -export class VariableScope extends Property implements VariableScopeDefinition { +export class VariableScope extends Property implements VariableScopeDefinition { values?: VariableDefinition[]; - constructor(definition: VariableScopeDefinition, layers?: VariableList[]); + constructor(definition: VariableScopeDefinition | VariableList | VariableDefinition[], layers?: VariableList[] | VariableList); - addLayer(list: any): void; + addLayer(list: VariableList): void; clear(): void; @@ -745,11 +767,11 @@ export class VariableScope extends Property implements VariableScopeDefinition { has(variableName: string): boolean; - set(key: string, value: any, type: VariableTypes): void; + set(key: string, value: any, type: string): void; - syncVariablesFrom(obj: any, track: any): any; + syncVariablesFrom(obj: {[key: string]: VariableDefinition}, track?: boolean, prune?: boolean): {created: string[], updated: string[], deleted: string[]} | undefined; - syncVariablesTo(obj: any): any; + syncVariablesTo(obj?: {[key: string]: VariableDefinition}): {[key: string]: VariableDefinition}; toJSON(): any; @@ -757,23 +779,33 @@ export class VariableScope extends Property implements VariableScopeDefinition { unset(key: string): void; - variables(): any; + variables(): {[key: string]: VariableDefinition}; static isVariableScope(obj: any): boolean; } -export class Version extends PropertyBase { - build: string; - major: string; - minor: string; - patch: string; - prerelease: string; - raw: string; - string: string; +export interface VersionDefinition extends PropertyBaseDefinition { + build?: string; + major?: string; + minor?: string; + patch?: string; + prerelease?: string; + raw?: string; + version?: string; +} - constructor(options: any /*TODO | string*/); +export class Version extends PropertyBase implements VersionDefinition { + build?: string; + major?: string; + minor?: string; + patch?: string; + prerelease?: string; + raw?: string; + string?: string; - set(value: any /*TODO | string*/): void; + constructor(options?: VersionDefinition | string); + + set(value?: VersionDefinition | string): void; toString(): string; } diff --git a/types/postman-collection/postman-collection-tests.ts b/types/postman-collection/postman-collection-tests.ts index 9f98e7d689..4e7cd41263 100644 --- a/types/postman-collection/postman-collection-tests.ts +++ b/types/postman-collection/postman-collection-tests.ts @@ -1,26 +1,870 @@ import * as pmCollection from 'postman-collection'; +// PropertyBaseDefinition tests +const pbDef: pmCollection.PropertyBaseDefinition = {}; +pbDef.description; // $ExpectType string | DescriptionDefinition | undefined + +// PropertyBase tests +const PropertyBase = pmCollection.PropertyBase; + +let pb = new PropertyBase(); +pb = new PropertyBase("string definition"); +pb = new PropertyBase({description: "string description"}); +pb = new PropertyBase({info: {}}); +pb = new PropertyBase({info: {description: "string description"}}); + +pb.description; // $ExpectType string | DescriptionDefinition | undefined +pb.findInParents("string"); // $ExpectType PropertyBase +pb.findInParents("string", (el) => true); // $ExpectType PropertyBase + +pb.findParentContaining("string", (el) => true); // $ExpectType PropertyBase + +pb.forEachParent((el) => {}); // $ExpectType void +pb.forEachParent({withRoot: true}, (el) => {}); // $ExpectType void + +pb.meta(); // $ExpectType any + +pb.parent(); // $ExpectType PropertyBase | undefined + +pb.setParent(pb); // $ExpectType void + +pb.toJSON(); // $ExpectType {} + +PropertyBase.propertyIsMeta(null, "string"); // $ExpectType boolean + +PropertyBase.propertyUnprefixMeta(null, "_String"); // $ExpectType string + +PropertyBase.toJSON({}); // $ExpectType any + +// PropertyDefinition Tests +const propDef: pmCollection.PropertyDefinition = {}; +propDef.id; // $ExpectType string | undefined +propDef.name; // $ExpectType string | undefined +propDef.disabled; // $$ExpectType boolean | undefined +propDef.description; // $$ExpectType string | DescriptionDefinition | undefined + +// Property Tests +const Property = pmCollection.Property; +let p = new Property(); +p = new Property(propDef); +p = new Property({info: propDef, disabled: true}); + +p.id; // $ExpectType string +p.name; // $ExpectType string +p.disabled; // $ExpectType boolean + +p.describe("string"); // $ExpectType void +p.describe("String", "string"); // $ExpectType void + +p.toObjectResolved(null, []); // $ExpectType {} +p.toObjectResolved({variables: new pmCollection.VariableList(p, [])}, []); // $ExpectType {} +p.toObjectResolved(null, [], {ignoreOwnVariables: true}); // $ExpectType {} + +Property.replaceSubstitutions("string", new pmCollection.VariableList(p, [])); // $ExpectType string +Property.replaceSubstitutionsIn({}, [new pmCollection.VariableList(p, [])], false); // $ExpectType {} + +// CertificateDefinition Tests +const certDef: pmCollection.CertificateDefinition = {}; +certDef.matches; // $ExpectType string[] | UrlMatchPatternList | undefined +certDef.key; // $ExpectType string | { src?: string | undefined; } | undefined +certDef.cert; // $ExpectType string | { src?: string | undefined; } | undefined +certDef.passphrase; // $ExpectType string | undefined + +// Certificate Tests const certificate = new pmCollection.Certificate({}); -certificate.cert; // $ExpectType any -certificate.id; // $ExpectType string -certificate.key; // $ExpectType any -certificate.matches; // $ExpectType any[] -certificate.name; // $ExpectType string +certificate.cert; // $ExpectType { src?: string | undefined; } +certificate.key; // $ExpectType { src?: string | undefined; } +certificate.matches; // $ExpectType UrlMatchPatternList certificate.passphrase; // $ExpectType string -certificate.auth; // $ExpectType RequestAuth -certificate.disabled; // $ExpectType boolean -certificate.canApplyTo("string"); // $ExpectType any -certificate.canApplyTo(new pmCollection.Url({})); // $ExpectType any +certificate.canApplyTo("string"); // $ExpectType boolean +certificate.canApplyTo(new pmCollection.Url({host: "string", path: "string"})); // $ExpectType boolean -certificate.toJSON(); // $ExpectType CertificateDefinition certificate.update({}); // $ExpectType void -certificate as pmCollection.Property; // $ExpectType Property - pmCollection.Certificate.isCertificate(certificate); // $ExpectType boolean +// PropertyList Tests +const pList = new pmCollection.PropertyList("Certificate", null, []); +pList.add(certificate); // $ExpectType void +pList.all(); // $ExpectType Certificate[] +pList.append(certificate); // $ExpectType void +pList.assimilate(pList, false); // $ExpectType void +pList.assimilate([certificate], false); // ExpectType void +pList.clear(); // $ExpectType void +pList.count(); // $ExpectType number +pList.each((el: pmCollection.Certificate) => {}); // $ExpectType void +pList.each((el: pmCollection.Certificate) => {}, pList); // $ExpectType void +pList.eachParent((el: any) => {}); // $ExpectType void +pList.eachParent((el: any) => {}, pList); // $ExpectType void +pList.filter((el) => true, pList); // $ExpectType Certificate[] +pList.find((el) => true, pList); // $ExpectType Certificate +pList.get("string"); // $ExpectType Certificate | undefined +pList.has("string"); // $ExpectType boolean +pList.has("string", null); // $ExpectType boolean +pList.has(certificate); // $ExpectType boolean +pList.idx(1); // ExpectType Certificate +pList.indexOf("string"); // ExpectType number +pList.insert(certificate, "string"); // ExpectType void +pList.insert(certificate, certificate); // ExpectType void +pList.insertAfter(certificate, "string"); // ExpectType void +pList.insertAfter(certificate, certificate); // ExpectType void +pList.map((el) => el); // ExpectType any +pList.map((el) => el, pList); // ExpectType any +pList.one("string"); // ExpectType Certificate +pList.populate([]); // ExpectType void +pList.remove((el) => true, pList); // ExpectType void +pList.remove("string", pList); // ExpectType void +pList.remove(certificate, pList); // $ExpectType void +pList.repopulate(null); // $ExpectType void +pList.toJSON(); // $ExpectType any +pList.toObject(true, true, true, true); // $ExpectType any +pList.toString(); // $ExpectType string +pList.upsert(certificate); // $ExpectType boolean | null +pmCollection.PropertyList.isPropertyList(pList); // $ExpectType boolean + +// CertificateList Tests +const certList = new pmCollection.CertificateList(null, [pList]); +certList.resolveOne("string"); // $ExpectType CertificateDefinition +pmCollection.CertificateList.isCertificateList(certList); // $ExpectType boolean + +// ItemGroupDefinition Tests +const igDef: pmCollection.ItemGroupDefinition = {}; +igDef.item; // $ExpectType (ItemGroupDefinition | ItemDefinition)[] | undefined +igDef.auth; // $ExpectType RequestAuthDefinition | undefined +igDef.event; // $ExpectType EventDefinition[] | undefined + +// ItemGroup Tests +const ig = new pmCollection.ItemGroup(); +ig.auth; // $ExpectType RequestAuth | undefined +ig.items; // $ExpectType PropertyList +ig.events; // $ExpectType EventList + +ig.authorizeRequestsUsing("string"); // $ExpectType void +ig.authorizeRequestsUsing({}); // $ExpectType void +ig.authorizeRequestsUsing("string", new pmCollection.VariableList(ig, [])); // $ExpectType void + +ig.forEachItem((el) => {}); // $ExpectType void +ig.forEachItemGroup((el) => {}); // $ExpectType void + +ig.oneDeep("string"); // $ExpectType Certificate + +pmCollection.ItemGroup.isItemGroup(ig); // $ExpectType boolean + +// CollectionDefinition Tests +const colDef: pmCollection.CollectionDefinition = {}; +colDef.info; // $ExpectType { id?: string | undefined; name?: string | undefined; version?: string | undefined; } | undefined +colDef.variable; // $ExpectType VariableDefinition | undefined + let collection: pmCollection.Collection; collection = new pmCollection.Collection(); collection = new pmCollection.Collection({}); collection = new pmCollection.Collection({}, []); + +collection.events; // $ExpectType EventList +collection.variables; // $ExpectType VariableList +collection.version; // $ExpectType Version | undefined +// TODO update when get to VariableList +collection.syncVariablesFrom({}); // $ExpectType any +// TODO update +collection.syncVariablesFrom({}, true); // ExpectType any + +// TODO update +collection.syncVariablesTo({}); // ExpectType any +collection.toJSON(); // $ExpectType CollectionDefinition + +pmCollection.Collection.isCollection(collection); // $ExpectType boolean + +// CookieDefinition Tests +const cookieDef: pmCollection.CookieDefinition = { + domain: "string", + path: "string" +}; +cookieDef.key; // $ExpectType string | undefined +cookieDef.value; // ExpectType string | undefined +cookieDef.expires; // $ExpectType string | Date | undefined +cookieDef.maxAge; // $ExpectType number | undefined +cookieDef.domain; // $ExpectType string +cookieDef.path; // $ExpectType string +cookieDef.secure; // $ExpectType boolean | undefined +cookieDef.httpOnly; // $ExpectType boolean | undefined +cookieDef.hostOnly; // $ExpectType boolean | undefined +cookieDef.session; // $ExpectType boolean | undefined +cookieDef.extensions; // $ExpectType { key: string; value: string; }[] | undefined + +// Cookie Tests + +let cookie = new pmCollection.Cookie(); +cookie = new pmCollection.Cookie(cookieDef); + +cookie.domain; // $ExpectType string +cookie.expires; // $ExpectType Date +cookie.extensions; // $ExpectType { key: string; value: string; }[] | undefined +cookie.hostOnly; // $ExpectType boolean | undefined +cookie.httpOnly; // $ExpectType boolean | undefined +cookie.maxAge; // $ExpectType number | undefined +cookie.path; // $ExpectType string +cookie.secure; // $ExpectType boolean | undefined +cookie.session; // $ExpectType boolean | undefined +cookie.value; // $ExpectType string | undefined + +cookie.update(cookieDef); // $ExpectType void + +cookie.valueOf(); // $ExpectType string + +pmCollection.Cookie.isCookie({}); // $ExpectType boolean +pmCollection.Cookie.parse("string"); // $ExpectType CookieDefinition +pmCollection.Cookie.splitParam("string"); // $ExpectType { key: string; value: string | boolean; } + +// CookieList Tests + +const cookieList = new pmCollection.CookieList(null, [cookie]); + +pmCollection.CookieList.isCookieList(cookieList); // $ExpectType boolean + +// DescriptionDefinition Tests + +const descDef: pmCollection.DescriptionDefinition = { + content: "string", + type: "string" +}; +descDef.content; // $ExpectType string +descDef.type; // $ExpectType string | undefined + +// Description Tests + +let desc = new pmCollection.Description(); +desc = new pmCollection.Description("string"); +desc = new pmCollection.Description(descDef); + +desc.content; // $ExpectType string +desc.type; // $ExpectType string + +desc.toJSON(); // $ExpectType DescriptionDefinition +desc.toString(); // $ExpectType string +desc.update("string"); // $ExpectType void +desc.update("string", "string"); // $ExpectType void +desc.update(descDef); // $ExpectType void + +pmCollection.Description.isDescription(desc); // $ExpectType boolean + +// EventDefinition Tests + +const eventDesc: pmCollection.EventDefinition = { + script: "string" +}; +eventDesc.listen; // $ExpectType string | undefined +eventDesc.script; // $ExpectType string | string[] | ScriptDefinition | Script + +// Event Tests + +const event = new pmCollection.Event(eventDesc); +event.listen; // $ExpectType string | undefined +event.script; // $ExpectType Script + +event.update(eventDesc); // $ExpectType void + +// EventList Tests + +const eventList = new pmCollection.EventList(null, [event]); +eventList.listeners("string"); // $ExpectType Event[] +eventList.listenersOwn("string"); // $ExpectType Event[] + +pmCollection.EventList.isEventList(eventList); // $ExpectType boolean + +// FormParamDefinition Tests + +const fpDef: pmCollection.FormParamDefinition = {}; +fpDef.key; // $ExpectType string | undefined +fpDef.value; // $ExpectType any + +// FormParam Tests + +const fp = new pmCollection.FormParam(fpDef); +fp.key; // $ExpectType string +fp.value; // $ExpectType any + +fp.toString(); // $ExpectType string +fp.valueOf(); // $ExpectType any + +// HeaderDefinition Tests + +const headerDef: pmCollection.HeaderDefinition = { + key: "string", + value: "string" +}; +headerDef.key; // $ExpectType string | undefined +headerDef.value; // $ExpectType string | undefined +headerDef.system; // $ExpectType boolean | undefined + +// Header Tests + +let header = new pmCollection.Header("string"); +header = new pmCollection.Header("string", "string"); +header = new pmCollection.Header(headerDef); + +header.key; // $ExpectType string +header.value; // $ExpectType string + +header.toString(); // $ExpectType string + +header.update(headerDef); // $ExpectType void + +header.valueOf(); // $ExpectType string + +pmCollection.Header.create("string"); // $ExpectType Header +pmCollection.Header.create("string", "string"); // $ExpectType Header +pmCollection.Header.create(headerDef, "string"); // $ExpectType Header + +pmCollection.Header.isHeader(header); // $ExpectType boolean + +pmCollection.Header.parse("string"); // $ExpectType HeaderDefinition[] + +pmCollection.Header.parseSingle("string"); // $ExpectType HeaderDefinition + +pmCollection.Header.unparse(new pmCollection.HeaderList(null, [header])); // $ExpectType string +pmCollection.Header.unparse([headerDef]); // $ExpectType string +pmCollection.Header.unparse([headerDef], "\n"); // $ExpectType string + +pmCollection.Header.unparseSingle(headerDef); // $ExpectType string + +// HeaderList Tests + +const headerList = new pmCollection.HeaderList(null, [header]); + +headerList.contentSize(); // $ExpectType number + +pmCollection.HeaderList.isHeaderList(headerList); // $ExpectType boolean + +// ItemDefinition Tests + +const itemDef: pmCollection.ItemDefinition = {}; +itemDef.request; // $ExpectType RequestDefinition | undefined +itemDef.responses; // $ExpectType ResponseDefinition[] | undefined +itemDef.events; // $ExpectType EventDefinition[] | undefined + +// Item Tests +let item = new pmCollection.Item(); +item = new pmCollection.Item(itemDef); + +item.events; // $ExpectType EventList +item.request; // $ExpectType Request +item.responses; // $ExpectType PropertyList + +item.authorizeRequestUsing("string"); // $ExpectType void +item.authorizeRequestUsing({}); // $ExpectType void +item.authorizeRequestUsing("string", new pmCollection.VariableList(item, [])); // $ExpectType void + +item.getAuth(); // $ExpectType RequestAuth + +item.getEvents(); // $ExpectType Event[] +item.getEvents("string"); // $ExpectType Event[] + +pmCollection.Item.isItem(item); // $ExpectType boolean + +// ProxyConfigDefinition Tests + +const proxyConfDef: pmCollection.ProxyConfigDefinition = {}; +proxyConfDef.match; // $ExpectType string | { pattern: string; } | UrlMatchPattern | undefined +proxyConfDef.host; // $ExpectType string | undefined +proxyConfDef.port; // $ExpectType number | undefined +proxyConfDef.tunnel; // $ExpectType boolean | undefined + +// ProxyConfig Tests + +let proxyConf = new pmCollection.ProxyConfig(); +proxyConf = new pmCollection.ProxyConfig(proxyConfDef); + +proxyConf.host; // $ExpectType string +proxyConf.match; // $ExpectType UrlMatchPattern +proxyConf.port; // $ExpectType number +proxyConf.tunnel; // $ExpectType boolean + +proxyConf.getProtocols(); // $ExpectType string[] + +proxyConf.getProxyUrl(); // $ExpectType string + +proxyConf.test("string"); // $ExpectType boolean + +proxyConf.update(proxyConfDef); // $ExpectType void + +proxyConf.updateProtocols(["string"]); // $ExpectType void + +pmCollection.ProxyConfig.isProxyConfig(proxyConf); // $ExpectType boolean + +// ProxyConfigList Tests + +const proxyConfigList = new pmCollection.ProxyConfigList(null, [proxyConf]); + +proxyConfigList.resolve("string"); // $ExpectType ProxyConfig +proxyConfigList.resolve(new pmCollection.Url({host: "string", path: "string"})); // $ExpectType ProxyConfig + +pmCollection.ProxyConfigList.isProxyConfigList(proxyConfigList); // $ExpectType boolean + +// QueryParamDefinition Tests + +const qpDef: pmCollection.QueryParamDefinition = { + key: null, + value: null +}; +qpDef.key; // $ExpectType string | null +qpDef.value; // $ExpectType string | null +qpDef.system; // $ExpectType boolean | undefined + +// QueryParam Tests + +let qp = new pmCollection.QueryParam("string"); +qp = new pmCollection.QueryParam(qpDef); + +qp.key; // $ExpectType string | null +qp.value; // $ExpectType string | null +qp.system; // $ExpectType boolean | undefined + +qp.toString(); // $ExpectType string + +qp.update("string"); // $ExpectType void +qp.update({key: "string"}); // $ExpectType void +qp.update({key: "string", value: "string"}); // $ExpectType void + +qp.valueOf(); // $ExpectType string + +pmCollection.QueryParam._postman_propertyAllowsMultipleValues; // $ExpectType boolean +pmCollection.QueryParam._postman_propertyIndexKey; // $ExpectType string + +pmCollection.QueryParam.parse("string"); // $ExpectType QueryParamDefinition[] + +pmCollection.QueryParam.parseSingle("string", 1, ["string"]); // $ExpectType QueryParamDefinition + +pmCollection.QueryParam.unparse([qpDef]); // $ExpectType string +pmCollection.QueryParam.unparse([qpDef], {encode: true}); // $ExpectType string +pmCollection.QueryParam.unparse([qpDef], {encode: true, ignoreDisabled: true}); // $ExpectType string + +pmCollection.QueryParam.unparseSingle(qpDef, true); // $ExpectType string + +// RequestDefinition Tests + +const reqDef: pmCollection.RequestDefinition = { + url: "string" +}; +reqDef.url; // $ExpectType string | Url +reqDef.method; // $ExpectType string | undefined +reqDef.header; // $ExpectType HeaderDefinition | undefined +reqDef.body; // $ExpectType RequestBody | undefined +reqDef.auth; // $ExpectType RequestAuthDefinition | undefined +reqDef.proxy; // $ExpectType ProxyConfigDefinition | undefined +reqDef.certificate; // $ExpectType CertificateDefinition | undefined + +// Request Tests +let req = new pmCollection.Request("string"); +req = new pmCollection.Request(reqDef); + +req.auth; // $ExpectType RequestAuth | undefined +req.body; // $ExpectType RequestBody | undefined +req.certificate; // $ExpectType Certificate | undefined +req.headers; // $ExpectType HeaderList +req.method; // $ExpectType string +req.proxy; // $ExpectType ProxyConfig | undefined +req.url; // $ExpectType Url + +req.update(reqDef); // $ExpectType void + +req.authorizeUsing("string"); // $ExpectType void +req.authorizeUsing({}); // $ExpectType void +req.authorizeUsing(null); // $ExpectType void +req.authorizeUsing("string", new pmCollection.VariableList(p, [])); + +req.getHeaders(); // $ExpectType any +req.getHeaders({ignoreCase: true}); // $ExpectType any +req.getHeaders({enabled: true}); // $ExpectType any +req.getHeaders({ignoreCase: true, enabled: true}); // $ExpectType any + +req.forEachHeader((header: pmCollection.Header, context: pmCollection.Request) => {}); // $ExpectType void + +req.addHeader(header); // $ExpectType void +req.addHeader(headerDef); // $ExpectType void + +req.removeHeader("string"); // $ExpectType void +req.removeHeader(header); // $ExpectType void +req.removeHeader(header, {ignoreCase: true}); // $ExpectType void + +req.upsertHeader(headerDef); // $ExpectType void + +req.addQueryParams("string"); // $ExpectType void +req.addQueryParams([qpDef]); // $ExpectType void + +// TODO check these - they might also need plain qpDef as a parameter +req.removeQueryParams("string"); // $ExpectType void +req.removeQueryParams(["string"]); // $ExpectType void +req.removeQueryParams([qpDef]); // $ExpectType void + +req.toJSON(); // $ExpectType RequestDefinition + +req.clone(); // $ExpectType Request + +pmCollection.Request.isRequest(req); // $ExpectType boolean + +// RequestAuthDefinition Tests + +const reqAuthDef: pmCollection.RequestAuthDefinition = {}; +reqAuthDef.type; // $ExpectType string | undefined + +// RequestAuth Tests + +let reqAuth = new pmCollection.RequestAuth(reqAuthDef); +reqAuth = new pmCollection.RequestAuth(reqAuthDef, collection); + +reqAuth.type; // $ExpectType string + +reqAuth.update(new pmCollection.VariableList(collection, [])); // $ExpectType void +reqAuth.update({key: "string", value: "string"}); // $ExpectType void +reqAuth.update([{key: "string", value: "string"}]); // $ExpectType void +reqAuth.update([{key: "string", value: "string"}], "string"); // $ExpectType void + +reqAuth.use("string", new pmCollection.VariableList(collection, [])); // $ExpectType void +reqAuth.use("string", {key: "string", value: "string"}); // $ExpectType void +reqAuth.use("string", [{key: "string", value: "string"}]); // $ExpectType void + +reqAuth.current(); // $ExpectType any + +reqAuth.parameters(); // $ExpectType VariableList + +reqAuth.clear("string"); // $ExpectType void + +pmCollection.RequestAuth.isValidType(reqAuth); // $ExpectType boolean + +// RequestBodyDefinition Tests + +const reqBodyDef: pmCollection.RequestBodyDefinition = {mode: 'raw'}; +reqBodyDef.mode; // $ExpectType string +reqBodyDef.raw; // $ExpectType string | undefined +reqBodyDef.urlencoded; // $ExpectType string | QueryParamDefinition[] | PropertyList | undefined +reqBodyDef.file; // $ExpectType string | { src: string; } | undefined +reqBodyDef.formdata; // $ExpectType FormParamDefinition[] | PropertyList | undefined + +// RequestBody Tests + +const reqBody = new pmCollection.RequestBody(reqBodyDef); + +reqBody.file; // $ExpectType { src: string; } | undefined +reqBody.formdata; // $ExpectType PropertyList | undefined +reqBody.mode; // $ExpectType string +reqBody.raw; // $ExpectType string | undefined +reqBody.urlencoded; // $ExpectType PropertyList | undefined + +reqBody.update(reqBodyDef); // $ExpectType void + +reqBody.toString(); // $ExpectType string + +reqBody.isEmpty(); // $ExpectType boolean + +pmCollection.RequestBody.MODES.raw; // $ExpectType string +pmCollection.RequestBody.MODES.formdata; // $ExpectType string +pmCollection.RequestBody.MODES.urlencoded; // $ExpectType string +pmCollection.RequestBody.MODES.file; // $ExpectType string + +// ResponseDefinition Tests +const respDef: pmCollection.ResponseDefinition = {code: 200, responseTime: 1}; +respDef.code; // $ExpectType number +respDef.header; // $ExpectType HeaderDefinition[] | undefined +respDef.cookie; // $ExpectType CookieDefinition[] | undefined +respDef.body; // $ExpectType string | undefined +respDef.stream; // $ExpectType Buffer | Uint8Array | undefined +respDef.responseTime; // $ExpectType number +respDef.originalRequest; // $ExpectType RequestDefinition | undefined + +// Response Tests +const response = new pmCollection.Response(respDef); +response.body; // $ExpectType string | undefined +response.code; // $ExpectType number +response.cookies; // $ExpectType CookieList +response.headers; // $ExpectType HeaderList +response.originalRequest; // $ExpectType Request | undefined +response.responseTime; // $ExpectType number +response.status; // $ExpectType string +response.stream; // $ExpectType Buffer | Uint8Array | undefined +response.responseSize; // $ExpectType number | undefined + +response.update(respDef); // $ExpectType void + +response.toJSON(); // $ExpectType any + +response.reason(); // ExpectType string | undefined + +response.details(); // $ExpectType { name: string; detail: string; code: number; standardName: string; } | undefined + +response.text(); // $ExpectType string | undefined + +response.json(); // $ExpectType any + +response.dataURI(); // $ExpectType string + +response.size(); // $ExpectType number + +response.encoding(); // $ExpectType { format: string; source: string; } + +pmCollection.Response.createFromNode({body: "string", statusCode: 200, elapsedTime: 1}, []); // $ExpectType Response + +pmCollection.Response.isResponse(response); // $ExpectType boolean + +// ScriptDefinition Tests + +const scriptDef: pmCollection.ScriptDefinition = {}; +scriptDef.type; // $ExpectType string | undefined +scriptDef.src; // $ExpectType string | Url | undefined +scriptDef.exec; // $ExpectType string | string[] | undefined + +// Script Tests + +let script = new pmCollection.Script(); +script = new pmCollection.Script(scriptDef); +script = new pmCollection.Script("string"); +script = new pmCollection.Script(["string"]); + +script.exec; // $ExpectType string[] | undefined +script.src; // $ExpectType Url | undefined +script.type; // $ExpectType string + +script.update(scriptDef); // $ExpectType void +script.update("string"); // $ExpectType void +script.update(["string"]); // $ExpectType void + +script.toSource(); // $ExpectType string | undefined + +pmCollection.Script.isScript(script); // $ExpectType boolean + +// UrlDefinition Tests + +let urlDef: pmCollection.UrlDefinition = { + host: "string", + path: "string" +}; +urlDef = { + host: ["string"], + path: ["string"] +}; + +urlDef.auth; // $ExpectType { user: string; password: string; } | undefined +urlDef.hash; // $ExpectType string | undefined +urlDef.host; // $ExpectType string | string[] | undefined +urlDef.path; // $ExpectType string | string[] +urlDef.port; // $ExpectType string | undefined +urlDef.query; // $ExpectType string | QueryParamDefinition[] | PropertyList | undefined +urlDef.variable; // $ExpectType VariableDefinition[] | undefined +urlDef.protocol; // $ExpectType string | undefined + +// Url Tests + +let url = new pmCollection.Url(urlDef); +url = new pmCollection.Url("string"); + +url.auth; // $ExpectType { user: string; password: string; } | undefined +url.hash; // $ExpectType string | undefined +url.host; // $ExpectType string[] | undefined +url.path; // $ExpectType string[] +url.port; // $ExpectType string | undefined +url.protocol; // $ExpectType string | undefined +url.query; // $ExpectType PropertyList +url.variables; // $ExpectType VariableList + +url.addQueryParams("string"); // $ExpectType void +url.addQueryParams([qp, qpDef]); // $ExpectType void + +url.removeQueryParams("string"); // $ExpectType void +url.removeQueryParams(["string"]); // $ExpectType void +url.removeQueryParams(qp); // $ExpectType void +url.removeQueryParams([qp]); // $ExpectType void + +url.getRaw(); // $ExpectType string + +url.toString(); // $ExpectType string +url.toString(false); // $ExpectType string + +url.getPath(); // $ExpectType string +url.getPath({unresolved: true}); // $ExpectType string + +url.getQueryString(); // $ExpectType string +url.getQueryString({encode: true}); // $ExpectType string +url.getQueryString({ignoredDisabled: true}); // $ExpectType string +url.getQueryString({encode: true, ignoredDisabled: true}); // $ExpectType string + +url.getPathWithQuery(); // $ExpectType string + +url.getHost(); // $ExpectType string + +url.getRemote(); // $ExpectType string +url.getRemote({forcePort: true}); // $ExpectType string + +url.getOAuth1BaseUrl(); // $ExpectType string + +pmCollection.Url.parse("string"); // $ExpectType UrlDefinition + +pmCollection.Url.isUrl(url); // $ExpectType boolean + +// UrlMatchPattern Tests +let urlMatch = new pmCollection.UrlMatchPattern("string"); +urlMatch = new pmCollection.UrlMatchPattern({pattern: "string"}); + +urlMatch.pattern; // $ExpectType string | undefined + +urlMatch.update({pattern: "string"}); // $ExpectType void + +urlMatch.createMatchPattern(); // $ExpectType { protocols: string[]; host: string; path: RegExp; } | undefined + +urlMatch.globPatternToRegexp("string"); // $ExpectType RegExp + +urlMatch.testProtocol("string"); // $ExpectType boolean + +urlMatch.getProtocols(); // $ExpectType string[] + +urlMatch.testHost("string"); // $ExpectType boolean + +urlMatch.matchAnyHost({protocols: [], host: "string", path: new RegExp('')}); // $ExpectType boolean + +urlMatch.matchSuffixHostPattern({protocols: [], host: "string", path: new RegExp('')}, "string"); // $ExpectType boolean + +urlMatch.matchAbsoluteHostPattern({protocols: [], host: "string", path: new RegExp('')}, "string"); // $ExpectType boolean + +urlMatch.testPath("string"); // $ExpectType boolean + +urlMatch.test("string"); // $ExpectType boolean + +urlMatch.toString(); // $ExpectType string + +urlMatch.toJSON(); // $ExpectType { pattern: string; } + +pmCollection.UrlMatchPattern.MATCH_ALL_URLS; // $ExpectType string + +pmCollection.UrlMatchPattern.PROTOCOL_DELIMITER; // $ExpectType string + +// UrlMatchPatternList Tests +const urlMatchList = new pmCollection.UrlMatchPatternList(collection, []); + +urlMatchList.test("string"); // $ExpectType boolean + +// VariableDefinition Tests +const varDef: pmCollection.VariableDefinition = {}; +varDef.value; // $ExpectType any +varDef.type; // $ExpectType string | undefined +varDef.key; // $ExpectType string | undefined + +// Variable Tests +let variable = new pmCollection.Variable(varDef); +variable = new pmCollection.Variable({key: varDef}); + +variable.key; // $ExpectType string | undefined +variable.type; // $ExpectType string +variable.value; // $ExpectType any + +variable.get(); // $ExpectType any + +variable.set(null); // $ExpectType void + +variable.valueOf(null); // $ExpectType any + +variable.toString(); // $ExpectType string + +variable.cast({}); // $ExpectType any + +variable.castIn({}); // $ExpectType any + +variable.castOut({}); // $ExpectType any + +variable.valueType("string", true); // $ExpectType string + +variable.update(varDef); // $ExpectType void + +pmCollection.Variable.isVariable(variable); // $ExpectType boolean + +pmCollection.Variable.types.string; // $ExpectType StringConstructor +pmCollection.Variable.types.boolean; // $ExpectType BooleanConstructor +pmCollection.Variable.types.number; // $ExpectType NumberConstructor +pmCollection.Variable.types.json; // $ExpectType { in: (val: any) => string; out: (val: string) => any; } +pmCollection.Variable.types.any; // $ExpectType { in: (val: T) => T; out: (val: T) => T; } + +// VariableList Tests + +const vList = new pmCollection.VariableList(collection, [variable]); + +vList.replace("string"); // $ExpectType string +vList.replace("string", vList); // $ExpectType string + +vList.substitute("string"); // $ExpectType "string" +vList.substitute({}, vList); // $ExpectType {} +vList.substitute(null, vList, false); // $ExpectType null + +vList.syncFromObject({}); // $ExpectType { created: string[]; updated: string[]; deleted: string[]; } | undefined +vList.syncFromObject({}, false); // $ExpectType { created: string[]; updated: string[]; deleted: string[]; } | undefined +vList.syncFromObject({}, false, false); // $ExpectType { created: string[]; updated: string[]; deleted: string[]; } | undefined + +vList.syncToObject(); // $ExpectType { [key: string]: VariableDefinition; } +vList.syncToObject({key: varDef}); // $ExpectType { [key: string]: VariableDefinition; } + +pmCollection.VariableList.isVariableList(vList); // $ExpectType boolean + +// VariableScopeDefinition Tests +const varScopeDef: pmCollection.VariableScopeDefinition = {}; +varScopeDef.values; // $ExpectType VariableDefinition[] | undefined + +// VariableScope Tests +let varScope = new pmCollection.VariableScope(varScopeDef, []); +varScope = new pmCollection.VariableScope(vList, []); +varScope = new pmCollection.VariableScope([varDef], []); +varScope = new pmCollection.VariableScope(varScopeDef, [vList]); + +varScope.values; // $ExpectType VariableDefinition[] | undefined + +varScope.variables(); // ExpectType { [key: string]: VariableDefinition; } + +varScope.toObject(false, false); // $ExpectType any + +varScope.has("string"); // $ExpectType boolean + +varScope.get("string"); // $ExpectType any + +varScope.set("string", {}, "any"); // $ExpectType void + +varScope.unset("string"); // $ExpectType void + +varScope.clear(); // $ExpectType void + +varScope.syncVariablesFrom({}); // $ExpectType { created: string[]; updated: string[]; deleted: string[]; } | undefined +varScope.syncVariablesFrom({}, false); // $ExpectType { created: string[]; updated: string[]; deleted: string[]; } | undefined +varScope.syncVariablesFrom({}, false, false); // $ExpectType { created: string[]; updated: string[]; deleted: string[]; } | undefined + +varScope.syncVariablesTo(); // $ExpectType { [key: string]: VariableDefinition; } +varScope.syncVariablesTo({key: varDef}); // $ExpectType { [key: string]: VariableDefinition; } + +varScope.toJSON(); // $ExpectType any + +varScope.addLayer(vList); // $ExpectType void + +pmCollection.VariableScope.isVariableScope(varScope); // $ExpectType boolean + +// VersionDefinition Tests +const verDef: pmCollection.VersionDefinition = {}; +verDef.build; // $ExpectType string | undefined +verDef.major; // $ExpectType string | undefined +verDef.minor; // $ExpectType string | undefined +verDef.patch; // $ExpectType string | undefined +verDef.prerelease; // $ExpectType string | undefined +verDef.raw; // $ExpectType string | undefined +verDef.version; // $ExpectType string | undefined + +// Version Tests +let version = new pmCollection.Version(); +version = new pmCollection.Version(verDef); +version = new pmCollection.Version("string"); + +version.build; // $ExpectType string | undefined +version.major; // $ExpectType string | undefined +version.minor; // $ExpectType string | undefined +version.patch; // $ExpectType string | undefined +version.prerelease; // $ExpectType string | undefined +version.raw; // $ExpectType string | undefined +version.string; // $ExpectType string | undefined + +version.set(); // ExpectType void +version.set(verDef); // $ExpectType void +version.set("string"); // $ExpectType void + +version.toString(); // $ExpectType string From fd99d9184ecd3a5f3eb6560e4989533e77268332 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Sun, 11 Mar 2018 21:13:02 -0500 Subject: [PATCH 11/12] fix some todos --- types/postman-collection/index.d.ts | 6 +++--- .../postman-collection/postman-collection-tests.ts | 13 ++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts index a02953720a..ba8e0e581a 100644 --- a/types/postman-collection/index.d.ts +++ b/types/postman-collection/index.d.ts @@ -186,9 +186,9 @@ export class Collection extends ItemGroup { constructor(definition?: CollectionDefinition, environments?: any[]); - syncVariablesFrom(obj: any, track?: boolean): any; + syncVariablesFrom(obj: {[key: string]: VariableDefinition}, track?: boolean, prune?: boolean): {created: string[], updated: string[], deleted: string[]} | undefined; - syncVariablesTo(obj: any): any; + syncVariablesTo(obj?: {[key: string]: VariableDefinition}): {[key: string]: VariableDefinition}; toJSON(): CollectionDefinition; @@ -466,7 +466,7 @@ export class Request extends Property implements RequestDefin removeHeader(toRemove: string | Header, options?: {ignoreCase: boolean}): void; - removeQueryParams(params: string | string[] | QueryParamDefinition[]): void; + removeQueryParams(params: string | string[] | QueryParamDefinition[] | QueryParamDefinition): void; toJSON(): RequestDefinition; diff --git a/types/postman-collection/postman-collection-tests.ts b/types/postman-collection/postman-collection-tests.ts index 4e7cd41263..2574aa5917 100644 --- a/types/postman-collection/postman-collection-tests.ts +++ b/types/postman-collection/postman-collection-tests.ts @@ -164,13 +164,12 @@ collection = new pmCollection.Collection({}, []); collection.events; // $ExpectType EventList collection.variables; // $ExpectType VariableList collection.version; // $ExpectType Version | undefined -// TODO update when get to VariableList -collection.syncVariablesFrom({}); // $ExpectType any -// TODO update -collection.syncVariablesFrom({}, true); // ExpectType any -// TODO update -collection.syncVariablesTo({}); // ExpectType any +collection.syncVariablesFrom({}); // $ExpectType { created: string[]; updated: string[]; deleted: string[]; } | undefined +collection.syncVariablesFrom({}, true); // $ExpectType { created: string[]; updated: string[]; deleted: string[]; } | undefined + +collection.syncVariablesTo({}); // ExpectType $ExpectType { [key: string]: VariableDefinition; } + collection.toJSON(); // $ExpectType CollectionDefinition pmCollection.Collection.isCollection(collection); // $ExpectType boolean @@ -492,10 +491,10 @@ req.upsertHeader(headerDef); // $ExpectType void req.addQueryParams("string"); // $ExpectType void req.addQueryParams([qpDef]); // $ExpectType void -// TODO check these - they might also need plain qpDef as a parameter req.removeQueryParams("string"); // $ExpectType void req.removeQueryParams(["string"]); // $ExpectType void req.removeQueryParams([qpDef]); // $ExpectType void +req.removeQueryParams(qpDef); // $ExpectType void req.toJSON(); // $ExpectType RequestDefinition From 7ed85e1751b04f4b2ca0466144b32818690ffa4b Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Tue, 13 Mar 2018 16:26:03 -0500 Subject: [PATCH 12/12] Revert README This commit should not have been included. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d4a489ed0a..c50d026338 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ Your package should have this structure: | tsconfig.json | This allows you to run `tsc` within the package. | | tslint.json | Enables linting. | -Generate these by running `npm install -g dts-gen` and `dts-gen --dt --name my-package-name --module module`. +Generate these by running `npm install -g dts-gen` and `dts-gen --dt --name my-package-name --template module`. See all options at [dts-gen](https://github.com/Microsoft/dts-gen). You may edit the `tsconfig.json` to add new files, to add `"target": "es6"` (needed for async functions), to add to `"lib"`, or to add the `"jsx"` compiler option.